From 55b798135c31de675fbe1ce1284cad1a5f2fa3bd Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Fri, 10 Oct 2025 14:33:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=97=A0=E6=95=88=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E6=B8=85=E7=90=86=EF=BC=8C=E8=AF=95=E5=8E=8B=E5=8C=85?= =?UTF-8?q?=E8=B5=84=E6=96=99=E7=95=8C=E9=9D=A2=E7=9C=8B=E6=9D=BF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vs/SGGL_SeDin_New/v17/.wsuo | Bin 74240 -> 73216 bytes .vs/SGGL_SeDin_New/v17/DocumentLayout.json | 4 - SGGL/BLL/API/APIBaseInfoService.cs | 2 +- SGGL/BLL/API/APIGetHttpService.cs | 2 +- SGGL/BLL/API/APIPersonService.cs | 2 - SGGL/BLL/API/APIUserService.cs | 64 +- SGGL/BLL/API/HJGL/APIHJGLIndexService.cs | 23 +- SGGL/BLL/API/HJGL/APINDETrustService.cs | 21 +- .../BLL/API/HJGL/APIPackagingManageService.cs | 126 ++-- SGGL/BLL/API/HJGL/APIPipeJointService.cs | 2 +- .../API/HJGL/APIPipelineComponentService.cs | 51 +- .../BLL/API/HJGL/APIPreWeldingDailyService.cs | 93 ++- .../API/HJGL/APITrainNumberManagerService.cs | 56 +- SGGL/BLL/API/HSSE/APICheckSpecialService.cs | 6 +- SGGL/BLL/API/HSSE/APIHazardRegisterService.cs | 8 +- .../API/HSSE/APISeDinMonthReportService.cs | 25 +- SGGL/BLL/API/HSSE/APITestRecordService.cs | 4 +- SGGL/BLL/API/HSSE/APITrainingTaskService.cs | 2 +- SGGL/BLL/API/HTGL/APIHTGLPersonService.cs | 4 +- SGGL/BLL/BLL.csproj | 18 - .../BaseInfo/BaseCompanytemplateService.cs | 125 ++-- SGGL/BLL/BaseInfo/BaseFactoryService.cs | 18 +- SGGL/BLL/BaseInfo/CQMSTrainObjectService.cs | 7 +- SGGL/BLL/BaseInfo/CertificateService.cs | 2 +- SGGL/BLL/BaseInfo/CheckTemplateService.cs | 1 - SGGL/BLL/BaseInfo/CompanyModelKindService.cs | 6 +- SGGL/BLL/BaseInfo/CompanyModelService.cs | 6 +- SGGL/BLL/BaseInfo/CostTypeService.cs | 4 +- SGGL/BLL/BaseInfo/MaterialTypeService.cs | 2 +- .../NoticeAndSupervisionTypeService.cs | 2 +- SGGL/BLL/BaseInfo/PictureTypeService.cs | 2 +- SGGL/BLL/BaseInfo/PositionService.cs | 8 +- SGGL/BLL/BaseInfo/PostTitleService.cs | 2 +- .../BaseInfo/PracticeCertificateService.cs | 2 +- SGGL/BLL/BaseInfo/ProjectTypeService.cs | 2 +- SGGL/BLL/BaseInfo/PunishTypeService.cs | 2 +- .../BaseInfo/QualityQuestionTypeService.cs | 2 +- SGGL/BLL/BaseInfo/RewardTypeService.cs | 2 +- .../BaseInfo/RulesRegulationsTypeService.cs | 2 +- SGGL/BLL/BaseInfo/SafetyMeasuresService.cs | 2 +- .../BaseInfo/SolutionTempleteTypeService.cs | 1 - SGGL/BLL/BaseInfo/SpecialEquipmentService.cs | 4 +- SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs | 2 +- .../BLL/BaseInfo/SuperviseCheckTypeService.cs | 5 +- SGGL/BLL/BaseInfo/TrainLevelService.cs | 2 +- SGGL/BLL/BaseInfo/TrainTypeService.cs | 4 +- SGGL/BLL/BaseInfo/UnitTypeService.cs | 2 +- SGGL/BLL/BaseInfo/WorkPostService.cs | 4 +- SGGL/BLL/BaseInfo/WorkStageService.cs | 1 - SGGL/BLL/CLGL/TwArrivalStatisticsService.cs | 137 ++-- .../CLGL/TwInOutplandetailRelationService.cs | 56 +- SGGL/BLL/CLGL/TwInOutplandetailService.cs | 25 +- SGGL/BLL/CLGL/TwInOutplanmasterService.cs | 253 ++++--- SGGL/BLL/CLGL/TwInputdetailService.cs | 32 +- SGGL/BLL/CLGL/TwInputmasterService.cs | 143 ++-- SGGL/BLL/CLGL/TwMaterialstockService.cs | 11 +- SGGL/BLL/CLGL/TwOutputdetailService..cs | 43 +- SGGL/BLL/CLGL/TwOutputmasterService.cs | 249 ++++--- .../CQMS/Check/CheckControlApproveService.cs | 1 - SGGL/BLL/CQMS/Check/CheckControlService.cs | 4 +- .../Check/CheckEquipmentApproveService.cs | 1 - SGGL/BLL/CQMS/Check/CheckEquipmentService.cs | 1 - .../BLL/CQMS/Check/CheckMaterialacceptance.cs | 5 +- SGGL/BLL/CQMS/Check/CheckMonthService.cs | 1 - SGGL/BLL/CQMS/Check/DesignApproveService.cs | 1 - SGGL/BLL/CQMS/Check/DesignService.cs | 1 - SGGL/BLL/CQMS/Check/FileCabinetService.cs | 1 - .../CQMS/Check/JointCheckApproveService.cs | 4 +- SGGL/BLL/CQMS/Check/MonthDesignService.cs | 1 - SGGL/BLL/CQMS/Check/MonthNDTCheckService.cs | 1 - SGGL/BLL/CQMS/Check/MonthRectifyService.cs | 1 - .../CQMS/Check/MonthSpotCheckDetailService.cs | 1 - SGGL/BLL/CQMS/Check/MonthWelderService.cs | 1 - .../Check/SpecialEquipmentDetailService.cs | 1 - .../BLL/CQMS/Check/SpotCheckApproveService.cs | 1 - SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs | 1 - SGGL/BLL/CQMS/Check/SpotCheckService.cs | 2 +- .../TechnicalContactListApproveService.cs | 1 - .../CQMS/Check/TechnicalContactListService.cs | 1 - .../ConTechnologyDisclosureService.cs | 8 +- .../Comprehensive/QualityAssuranceService.cs | 6 +- .../Comprehensive/ReviewDrawingsService.cs | 2 - .../ProjectQualityWorkSummaryReportService.cs | 6 +- .../ProjectQuarterlyProjectQualityService.cs | 56 +- .../Material/CQMS_ConstructionTestService.cs | 4 +- .../CQMS/Material/CQMS_EquipmentService.cs | 4 +- .../Material/CQMS_InspectionApproveService.cs | 2 - .../CQMS/Material/CQMS_InspectionService.cs | 3 +- .../BLL/CQMS/Material/CQMS_MaterialService.cs | 4 +- .../CQMS/Material/CQMS_MaterialTestService.cs | 4 +- .../CQMS_NoticeAndSupervisionService.cs | 4 +- .../Meeting/CQMS_MeetingApproveService.cs | 1 - SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs | 2 +- SGGL/BLL/CQMS/Models/QualityModelService.cs | 13 +- .../CQMS_TestPlanDetailService.cs | 6 +- .../CQMS/PersonManage/CQMS_TestPlanService.cs | 4 +- .../CQMS/Plan/CQMS_MainPlanApproveService.cs | 1 - SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs | 15 +- .../CQMS_TechnicalProposalReviewService.cs | 4 +- .../QCManage_QCGroupRegistrationService.cs | 6 +- .../RewardAndPunishApproveService.cs | 1 - .../RewardAndPunish/RewardAndPunishService.cs | 7 +- .../CQMS_TechnicalDiscloseService.cs | 5 +- SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs | 1 - .../Unqualified/WorkContactApproveService.cs | 1 - SGGL/BLL/CQMS/WBS/WorkPackageDetailService.cs | 3 - SGGL/BLL/CQMS/WBS/WorkPackageInitService.cs | 2 +- .../WBS/WorkPackageParentDetailService.cs | 2 - SGGL/BLL/Common/AttachFileService.cs | 24 + SGGL/BLL/Common/CommonService.cs | 4 +- SGGL/BLL/Common/Const.cs | 28 +- SGGL/BLL/Common/CreateQRCodeService.cs | 7 +- SGGL/BLL/Common/FastReport.cs | 8 +- SGGL/BLL/Common/Funs.cs | 9 +- SGGL/BLL/Common/MultiHeaderTable.cs | 2 +- SGGL/BLL/Common/PrinterDocService.cs | 7 +- SGGL/BLL/Common/ProjectDataFlowSetService.cs | 4 +- SGGL/BLL/Common/Sys_CQMS_DataInTempService.cs | 5 +- SGGL/BLL/Common/WeatherService.cs | 2 +- SGGL/BLL/Common/WordHelp.cs | 9 +- .../ServerCheck/DCGLCheckNoticeItemService.cs | 7 +- .../DCGLCheckRectifyItemService.cs | 6 +- .../ServerCheck/DCGLCheckRectifyService.cs | 8 +- SGGL/BLL/DigData/CQMSDataDWService .cs | 15 +- SGGL/BLL/DigData/HSEDataDWService.cs | 9 +- SGGL/BLL/DigData/HTGLDataDWService.cs | 13 +- SGGL/BLL/DigData/JDGLDataDWService.cs | 1 - SGGL/BLL/DigData/ProblemAnalysisService.cs | 1 - SGGL/BLL/DigData/ProjectWBSAnalysisService.cs | 6 +- SGGL/BLL/DigData/WBSAnalysisService.cs | 35 +- SGGL/BLL/Doc/DocService.cs | 5 +- SGGL/BLL/DropListService.cs | 5 +- .../HJGL/BaseInfo/Base_DNCompareService.cs | 5 +- .../BaseInfo/Base_MaterialColorService.cs | 8 +- .../HJGL/BaseInfo/MaterialCodeLibService.cs | 2 +- SGGL/BLL/HJGL/DataImport/DataImportService.cs | 33 +- .../DataImport/HJGL_DesignBasisDataImport.cs | 34 +- .../HJGL_DesignBasisDataImportVerSionLog.cs | 24 +- .../HJGL/PersonManage/WelderQualifyService.cs | 2 +- SGGL/BLL/HJGL/PointTrust/PointBatchService.cs | 6 +- .../HJGLPackagingmanagedetailService.cs | 6 +- .../HJGL/PreDesign/HJGL_MaterialService.cs | 41 +- .../HJGL/PreDesign/PackagingManageService .cs | 3 - .../ProductionSchedulingPlanService.cs | 6 +- .../PreDesign/TrainNumberManageService.cs | 12 +- .../BLL/HJGL/PreDesign/YardPlanningService.cs | 27 +- .../TestPackage/TestPackageApproveService.cs | 4 +- .../TestPackage/TestPackageEditService.cs | 48 +- .../TestPackage/TestPackagePrintService.cs | 2 - SGGL/BLL/HJGL/WPQ/WPQListService.cs | 14 +- .../HJGL_ComponentJointService.cs | 25 +- .../HJGL_WeldingReportService.cs | 33 +- .../WeldingManage/PipelineComponentService.cs | 74 +- .../BLL/HJGL/WeldingManage/PipelineService.cs | 10 +- .../HJGL/WeldingManage/WeldJointService.cs | 3 - .../BLL/HJGL/WeldingManage/WeldTaskService.cs | 27 +- .../HJGL/WeldingManage/WeldingDailyService.cs | 54 +- .../HSSE/Accident/AccidentHandleService.cs | 2 +- .../Accident/AccidentPersonRecordService.cs | 2 +- .../Accident/AccidentReportOtherService.cs | 2 +- .../HSSE/Accident/AccidentReportService.cs | 2 +- SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs | 2 +- .../Check_CheckColligationDetailService.cs | 2 +- .../Check/Check_CheckSpecialDetailService.cs | 2 +- .../HSSE/Check/Check_CheckSpecialService.cs | 14 +- .../Check/Check_ProjectLeaderCheckService.cs | 6 +- SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs | 2 +- SGGL/BLL/HSSE/Check/PunishNoticeService.cs | 2 +- .../HSSE/CostGoods/CostManageItemService.cs | 6 +- SGGL/BLL/HSSE/CostGoods/CostManageService.cs | 41 +- .../CostGoods/CostSmallDetailItemService.cs | 2 +- .../HSSE/CostGoods/CostSmallDetailService.cs | 2 +- .../HSSE/CostGoods/ExpenseDetailService.cs | 6 +- SGGL/BLL/HSSE/CostGoods/ExpenseService.cs | 14 +- .../HSSE/EduTrain/AccidentCaseItemService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs | 2 +- .../EduTrain/CompanyTrainingItemService.cs | 1 - .../HSSE/EduTrain/CompanyTrainingService.cs | 1 - .../EduTrain_TrainRecordDetailService.cs | 2 +- .../EduTrain/EduTrain_TrainRecordService.cs | 2 +- .../EduTrain/EduTrain_TrainTestService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TestPlanService.cs | 1 - SGGL/BLL/HSSE/EduTrain/TestRecordService.cs | 5 +- .../HSSE/EduTrain/TestTrainingItemService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs | 1 - .../HSSE/EduTrain/TrainTestDBItemService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs | 2 +- .../HSSE/EduTrain/TrainingPlanItemService.cs | 1 - SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs | 1 - SGGL/BLL/HSSE/EduTrain/TrainingService.cs | 2 +- SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs | 1 - .../HSSE/Emergency/DrillRecordListService.cs | 2 +- .../HSSE/Emergency/EmergencyListService.cs | 2 +- .../HSSE/Emergency/EmergencySupplyService.cs | 2 +- .../Emergency/EmergencyTeamAndTrainService.cs | 2 +- .../HSSE/Environmental/EIAReportService.cs | 2 +- .../EnvironmentalCheckService.cs | 3 - .../EnvironmentalEmergencyPlanService.cs | 2 +- .../EnvironmentalMonitoringService.cs | 2 +- .../UnexpectedEnvironmentalService.cs | 2 +- .../HSSE/HSSESystem/HSSEMainDutyService.cs | 2 +- .../ServerSafetyInstitutionService.cs | 2 +- .../Hazard/ConstructionRiskApproveService.cs | 1 - .../Hazard/ConstructionRiskCheckService.cs | 7 +- .../Hazard/ConstructionRiskListService.cs | 4 +- .../Hazard_EnvironmentalRiskItemService.cs | 1 - .../Hazard_EnvironmentalRiskListService.cs | 2 +- .../HSSE/Hazard/Hazard_HazardListService.cs | 1 - .../Hazard_HazardSelectedItemService.cs | 7 +- .../HSSE_Hazard_HazardRegisterService.cs | 1 - .../EquipmentInItemService.cs | 2 +- .../InApproveManager/EquipmentInService.cs | 2 +- .../EquipmentOutItemService.cs | 2 +- .../InApproveManager/EquipmentOutService.cs | 2 +- .../EquipmentQualityInItemService.cs | 2 +- .../EquipmentQualityInService.cs | 2 +- .../GeneralEquipmentInItemService.cs | 2 +- .../GeneralEquipmentInService.cs | 2 +- .../GeneralEquipmentOutItemService.cs | 2 +- .../GeneralEquipmentOutService.cs | 2 +- .../ConstructionStandardIdentifyService.cs | 2 +- ...ConstructionStandardSelectedItemService.cs | 2 +- .../ProjectAccidentCauseReportItemService.cs | 2 +- .../ProjectAccidentCauseReportService.cs | 2 +- ...rillConductedQuarterlyReportItemService.cs | 2 +- ...ectDrillConductedQuarterlyReportService.cs | 2 +- ...ojectDrillPlanHalfYearReportItemService.cs | 2 +- .../ProjectDrillPlanHalfYearReportService.cs | 2 +- .../ProjectEPSummaryReportService.cs | 8 +- .../ProjectMillionsMonthlyReportService.cs | 7 +- .../ProjectSafetyQuarterlyReportService.cs | 2 +- .../ProjectWorkSummaryReportService.cs | 12 +- SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs | 2 +- SGGL/BLL/HSSE/Law/LawRegulationListService.cs | 2 +- SGGL/BLL/HSSE/Law/ManageRuleService.cs | 2 +- SGGL/BLL/HSSE/Law/RulesRegulationsService.cs | 2 +- SGGL/BLL/HSSE/License/HSETechnicalService.cs | 2 +- .../BLL/HSSE/License/LicenseManagerService.cs | 17 +- SGGL/BLL/HSSE/License/LicensePublicService.cs | 2 +- .../HSSE/Manager/CompletionReportService.cs | 2 +- SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs | 2 +- SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs | 2 +- SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs | 2 +- .../SafetyLeaderGroupMeetingService.cs | 4 +- .../BLL/HSSE/Meeting/SpecialMeetingService.cs | 2 +- SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs | 2 +- .../HazardDetectionService.cs | 2 +- .../OccupationalDiseaseAccidentService.cs | 2 +- .../PhysicalExaminationService.cs | 25 +- .../EquipmentPersonQualityService.cs | 2 +- .../EquipmentQualityAuditDetailService.cs | 2 +- .../QualityAudit/EquipmentQualityService.cs | 2 +- .../GeneralEquipmentQualityService.cs | 2 +- .../HSSE/QualityAudit/PersonQualityService.cs | 15 +- .../QualityAudit/SafePersonQualityService.cs | 2 +- .../SubUnitQualityAuditDetailService.cs | 2 +- .../QualityAudit/SubUnitQualityService.cs | 2 +- SGGL/BLL/HSSE/Resources/SignManageService.cs | 2 +- .../SafetyOrganizationService.cs | 2 +- .../BLL/HSSE/SitePerson/PersonInOutService.cs | 1 - .../SitePerson/SitePerson_CheckingService.cs | 2 +- .../SitePerson_DayReportUnitDetailService.cs | 2 +- ...SitePerson_MonthReportUnitDetailService.cs | 2 +- .../SitePerson_PersonItemService.cs | 11 +- .../SitePerson/SitePerson_PersonService.cs | 7 +- .../HSSE/Solution/ConstructSolutionService.cs | 2 +- .../HSSE/Solution/ExpertArgumentService.cs | 2 +- SGGL/BLL/HSSE/Solution/LargerHazardService.cs | 8 +- .../HSSE/Solution/SolutionTemplateService.cs | 2 +- SGGL/BLL/HSSE/Technique/EmergencyService.cs | 2 +- .../HSSE/Technique/EnvironmentalService.cs | 2 +- SGGL/BLL/HSSE/Technique/HazardListService.cs | 2 +- .../HSSE/Technique/HazardListTypeService.cs | 2 +- SGGL/BLL/HSSE/Technique/RectifyItemService.cs | 2 +- SGGL/BLL/HSSE/Technique/RectifyService.cs | 4 +- .../HSSE/Technique/SpecialSchemeService.cs | 2 +- .../Technique_CheckItemDetailService.cs | 2 +- .../Technique_CheckItemSetService.cs | 2 +- SGGL/BLL/Notice/NoticeService.cs | 2 +- .../OfficeCheck/Check/CheckNoticeService.cs | 7 +- .../BLL/OfficeCheck/Check/CheckTeamService.cs | 2 +- .../ProjectEvaluationService.cs | 2 +- SGGL/BLL/OpenService/FileInsertService.cs | 7 +- SGGL/BLL/OpenService/GetDataService.cs | 6 +- .../ActionPlanFormationService.cs | 10 +- .../ActionPlanReviewService.cs | 4 +- .../BidApproveUserReviewService.cs | 6 +- .../BidApproveUserReview_Sch1Service.cs | 2 +- .../BidDocStandingBookService.cs | 40 +- .../BidDocumentsReviewService.cs | 10 +- .../BiddingManagement/SetSubReviewService.cs | 13 +- .../PhtglBidprojectquantityService .cs | 106 +-- .../PhtglMainprojectquantityService .cs | 20 +- .../BillOfQuantities/PhtglQuantityService.cs | 140 ++-- .../ContractCompile/ContractReviewService.cs | 72 +- .../PHTGL/ContractCompile/ContractService.cs | 20 +- .../ContractStandingBookService.cs | 36 +- .../ContractCompile/PHTGL_ApproveService.cs | 70 +- .../PhtglContracttrackService .cs | 117 ++-- .../PhtglContracttrackmatchwbsService.cs | 4 +- .../PhtglContracttrackprogressService.cs | 140 ++-- .../InvoiceManage/PhtglInvoiceService .cs | 248 ++++--- .../PhtglInvoicedetailService.cs | 10 +- SGGL/BLL/PHTGL/OAWebSevice.cs | 6 +- .../ConstructionLogHJGLService.cs | 1 - .../ConstructionLogMachineService.cs | 1 - .../ConstructionLogManagementService.cs | 1 - .../ConstructionLogPersonService.cs | 1 - .../ConstructionLogProblemService.cs | 1 - .../ConstructionLogRecordService.cs | 1 - .../ConstructionLogService.cs | 2 +- ...tructionLogWorkEfficiencyCompanyService.cs | 1 - ...nstructionLogWorkEfficiencyMonthService.cs | 1 - ...tructionLogWorkEfficiencyProjectService.cs | 1 - .../ConstructionLogWorkEfficiencyService.cs | 1 - .../ConstructionPlanApproveService.cs | 1 - .../ConstructionPlanService.cs | 2 +- .../ConstructionReportApproveService.cs | 1 - .../ConstructionReportService.cs | 2 +- .../InformationProject/PictureService.cs | 2 +- .../ProjectConstructionLogService.cs | 2 +- .../WorkHandoverApproveService.cs | 1 - .../WorkHandoverDetailService.cs | 1 - .../InformationProject/WorkHandoverService.cs | 2 +- .../PZHGL/ProjectData/ProjectMapService.cs | 2 +- SGGL/BLL/Person/PersonTotalService.cs | 2 +- SGGL/BLL/Person/Person_DutyService.cs | 4 +- SGGL/BLL/Person/Person_DutyTemplateService.cs | 2 +- .../Person/Person_PersonContractService.cs | 13 +- SGGL/BLL/Person/Person_PersonTrainService.cs | 4 +- SGGL/BLL/Person/Person_PersonsService.cs | 3 - .../Person_QuarterCheckApproveService.cs | 2 +- .../Person/Person_QuarterCheckItemService.cs | 2 +- SGGL/BLL/Person/Person_QuarterCheckService.cs | 2 +- SGGL/BLL/Person/Person_ShuntApproveService.cs | 1 - SGGL/BLL/Person/Person_ShuntService.cs | 23 +- SGGL/BLL/Person/Person_TrainingPlanService.cs | 2 +- .../Test/ServerTestPlanService.cs | 2 +- .../Test/ServerTestPlanTrainingService.cs | 2 +- .../Test/ServerTestRecordService.cs | 2 +- SGGL/BLL/ProjectData/MainItemService.cs | 1 - SGGL/BLL/ProjectData/ProjectSateService.cs | 2 +- SGGL/BLL/ProjectData/ProjectService.cs | 2 - SGGL/BLL/ProjectData/ProjectUnitService.cs | 2 +- SGGL/BLL/ProjectData/Project_SysSetService.cs | 8 +- SGGL/BLL/ProjectData/TeamGroupService.cs | 2 +- SGGL/BLL/ProjectData/UnitWorkService.cs | 6 +- ...nformationProject_SafetyBriefingService.cs | 6 +- SGGL/BLL/SmartSite/EquipmentService.cs | 2 +- SGGL/BLL/SmartSite/EquipmentSoftService.cs | 4 +- SGGL/BLL/SysManage/DepartService.cs | 6 +- SGGL/BLL/SysManage/LogService.cs | 3 +- SGGL/BLL/SysManage/RoleItemService.cs | 2 +- SGGL/BLL/SysManage/RoleService.cs | 2 +- SGGL/BLL/SysManage/SysHttplogService.cs | 3 - SGGL/BLL/SysManage/SysMenuService.cs | 2 +- SGGL/BLL/SysManage/UnitService.cs | 4 +- .../InterFaceService/DataForJTApiService.cs | 6 +- .../InterFaceService/InterFaceLogService .cs | 142 ++-- .../InterFaceService/InterFaceSetService .cs | 187 +++-- .../InterFaceService/InterFaceTaskService .cs | 124 ++-- .../TimerTask/CustomJobListener.cs | 14 +- SGGL/BLL/TaskScheduling/TimerTask/TaskJob.cs | 10 +- .../TaskScheduling/TimerTask/TimerTaskBase.cs | 47 +- SGGL/BLL/WebService/CNCECHSSEWebService.cs | 18 +- SGGL/BLL/WebService/FileStructService.cs | 8 +- .../ConstructionMonthReportMainCostService.cs | 2 +- .../ConstructionMonthReportService.cs | 5 +- .../ConstructionMonthReportSubCostService.cs | 2 +- SGGL/BLL/ZHGL/DataSync/BaseDataService.cs | 3 +- SGGL/BLL/ZHGL/DataSync/CQMSDataService.cs | 6 +- .../ZHGL/DataSync/HJGLData_DefectService.cs | 10 +- .../BLL/ZHGL/DataSync/HJGLData_HJGLService.cs | 26 +- .../BLL/ZHGL/DataSync/HSSEData_HSSEService.cs | 12 +- .../HSSEData_HiddenDangerDetailService.cs | 6 +- .../DataSync/Hazard_RealTimeDeviceService.cs | 4 +- SGGL/BLL/ZHGL/DataSync/LotAPIService.cs | 6 +- SGGL/BLL/ZHGL/DataSync/MainSevice.cs | 662 +++++++++--------- .../Project_HJGLData_DefectService.cs | 90 ++- .../Project_HJGLData_HJGLService.cs | 7 +- .../Project_HSSEData_HSSEService.cs | 24 +- ...ject_HSSEData_HiddenDangerDetailService.cs | 88 +-- .../Project_SYHSEData_SYHSEService.cs | 16 +- .../ZHGL/DataSync/SYHSEData_DataService.cs | 73 +- .../SYHSEData_HiddenDangerCheckService.cs | 4 +- .../DataSync/SYHSEData_RiskControlService.cs | 4 +- .../ZHGL/DataSync/SYHSEData_SYHSEService.cs | 4 +- SGGL/BLL/ZHGL/DataSync/ServerService.cs | 5 - .../Emergency/UnitDrillRecordListService.cs | 3 +- .../Emergency/UnitEmergencyListService.cs | 3 +- .../ArchitectureReportItemService.cs | 5 +- .../ArchitectureReportService.cs | 5 +- .../ChemicalReportItemService.cs | 5 +- .../Environmental/ChemicalReportService.cs | 5 +- .../ZHGL/Environmental/EnergyReportService.cs | 5 +- .../Environmental/EnergyreportItemService .cs | 15 +- .../ProjectArchitectureReportItemService.cs | 5 +- .../ProjectArchitectureReportService.cs | 5 +- .../ProjectChemicalReportItemService.cs | 5 +- .../ProjectChemicalReportService.cs | 5 +- .../ProjectEnergyReportService.cs | 8 +- .../ProjectEnergyreportItemService .cs | 7 +- .../Information/AccidentCauseReportService.cs | 7 +- .../ActionWorkLedgerItemService.cs | 5 +- .../Information/ActionWorkLedgerService.cs | 5 +- ...rillConductedQuarterlyReportItemService.cs | 5 +- .../DrillConductedQuarterlyReportService.cs | 5 +- .../DrillPlanHalfYearReportItemService.cs | 5 +- .../DrillPlanHalfYearReportService.cs | 5 +- .../Information/EPSummaryReportService.cs | 6 +- .../QualityWorkSummaryReportService.cs | 6 +- .../QuarterlyProjectQualityService.cs | 8 +- .../ZHGL/Information/SafetyBriefingService.cs | 36 +- .../SafetyProductionEvaluationItemService.cs | 5 +- .../SafetyProductionEvaluationService.cs | 5 +- .../SafetyQuarterlyReportService.cs | 2 - .../BLL/ZHGL/Information/UrgeReportService.cs | 6 +- .../Meeting/CompanySafetyMeetingService.cs | 2 +- .../Meeting/CompanySpecialMeetingService.cs | 2 +- .../ZHGL/Plan/MainContractOpinionService.cs | 3 +- .../ZHGL/Plan/ProjectPlanOpinionService.cs | 5 +- SGGL/BLL/ZHGL/RealName/BasicDataService.cs | 2 +- SGGL/BLL/ZHGL/RealName/CityService.cs | 2 +- SGGL/BLL/ZHGL/RealName/CountryService.cs | 2 +- SGGL/BLL/ZHGL/RealName/OnPostService.cs | 1 - .../ZHGL/RealName/RealName_ProjectService.cs | 2 +- SGGL/BLL/ZHGL/RealName/SynchroSetService.cs | 14 +- .../SubUnitCheckRectifyItemService.cs | 5 +- .../Supervise/SubUnitCheckRectifyService.cs | 6 +- .../SuperviseCheckRectifyItemService.cs | 9 +- .../SuperviseCheckReportItemService.cs | 5 +- .../Supervise/SuperviseCheckReportService.cs | 6 +- SGGL/FineUIPro.Mobile/AttachFile/Look.aspx | 20 +- SGGL/FineUIPro.Mobile/AttachFile/Look.aspx.cs | 38 +- .../AttachFile/Look.aspx.designer.cs | 27 + .../AttachFile/webuploader.aspx.cs | 16 +- .../AttachFile/EditOffice.aspx.cs | 25 +- .../AttachFile/IndexOffice.aspx.cs | 5 - SGGL/FineUIPro.Web/AttachFile/Look.aspx.cs | 12 +- SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs | 1 - .../AttachFile/OnlineEditing.aspx.cs | 7 +- .../AttachFile/fileupload.ashx.cs | 4 +- SGGL/FineUIPro.Web/AttachFile/save.aspx.cs | 16 +- .../AttachFile/webuploader.aspx.cs | 4 +- .../BaseInfo/BaseFactory.aspx.cs | 5 - .../BaseInfo/BaseFactoryEdit.aspx.cs | 15 +- .../BaseInfo/Certificate.aspx.cs | 12 +- .../BaseInfo/CheckTemplate.aspx.cs | 6 +- .../BaseInfo/CheckTemplateEdit.aspx.cs | 8 +- .../BaseInfo/CompanyModel.aspx.cs | 2 - .../BaseInfo/CompanyModelEdit.aspx.cs | 7 +- .../BaseInfo/CompanyModelKind.aspx.cs | 2 - .../BaseInfo/CompanyModelKindEdit.aspx.cs | 10 +- .../BaseInfo/Companytemplate.aspx.cs | 6 +- .../BaseInfo/CompanytemplateEdit.aspx.cs | 8 +- SGGL/FineUIPro.Web/BaseInfo/CostType.aspx.cs | 6 +- .../BaseInfo/CostTypeEdit.aspx.cs | 2 +- .../BaseInfo/CostTypeItemEdit.aspx.cs | 3 +- .../CLGL/ArrivalStatistics.aspx.cs | 3 - SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs | 3 - .../CLGL/InPlanMasterDataIn.aspx.cs | 10 +- .../CLGL/InPlanMasterEdit.aspx.cs | 4 +- SGGL/FineUIPro.Web/CLGL/InputMaster.aspx.cs | 24 +- .../CLGL/InputMasterEdit.aspx.cs | 5 - SGGL/FineUIPro.Web/CLGL/MaterialStock.aspx.cs | 11 +- SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs | 52 +- .../CLGL/OutPlanMasterEdit.aspx.cs | 88 +-- .../CLGL/OutPlanMasterOut.aspx.cs | 42 +- .../CLGL/OutPlanMasterSelect.aspx.cs | 27 +- .../CLGL/OutPlanMasterSelectStock.aspx.cs | 18 +- SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.cs | 38 +- .../CLGL/OutputMasterEdit.aspx.cs | 5 - .../CQMS/Check/MaterialAcceptance.aspx.cs | 3 - .../CQMS/Check/MaterialAcceptanceEdit.aspx.cs | 11 +- .../ConTechnologyDisclosure.aspx.cs | 3 - .../ConTechnologyDisclosureDataIn.aspx.cs | 10 +- .../ConTechnologyDisclosureDataInNew.aspx.cs | 2 +- ...nTechnologyDisclosureDataInNewEdit.aspx.cs | 4 - .../ConTechnologyDisclosureEdit.aspx.cs | 6 +- .../Comprehensive/QualityAssurance.aspx.cs | 3 - .../QualityAssuranceEdit.aspx.cs | 12 +- .../CQMS/Comprehensive/ReviewDrawings.aspx.cs | 2 +- .../ReviewDrawingsDataIn.aspx.cs | 2 - .../ReviewDrawingsDataInNew.aspx.cs | 7 +- .../ReviewDrawingsDataInNewEdit.aspx.cs | 4 - .../Comprehensive/ReviewDrawingsEdit.aspx.cs | 10 +- .../QualityWorkSummaryReport.aspx.cs | 3 - .../QualityWorkSummaryReportEdit.aspx.cs | 4 +- .../QuarterlyProjectQualityEdit.aspx.cs | 6 +- .../Material/ConstructionTestEdit.aspx.cs | 7 - .../Material/ConstructionTestView.aspx.cs | 7 - .../CQMS/Material/EquipmentIn.aspx.cs | 4 +- .../CQMS/Material/EquipmentSearch.aspx.cs | 1 - .../CQMS/Material/EquipmentStatistics.aspx.cs | 1 - .../CQMS/Material/EquipmentView.aspx.cs | 4 +- .../CQMS/Material/Inspection.aspx.cs | 1 - .../CQMS/Material/InspectionEdit.aspx.cs | 5 +- .../CQMS/Material/InspectionView.aspx.cs | 6 +- .../CQMS/Material/MaterialEdit.aspx.cs | 2 +- .../CQMS/Material/MaterialIn.aspx.cs | 6 +- .../CQMS/Material/MaterialSearch.aspx.cs | 1 - .../CQMS/Material/MaterialStatistics.aspx.cs | 3 +- .../CQMS/Material/MaterialTest.aspx.cs | 2 +- .../CQMS/Material/MaterialTestEdit.aspx.cs | 8 +- .../CQMS/Material/MaterialTestView.aspx.cs | 6 +- .../CQMS/Material/MaterialView.aspx.cs | 3 +- .../Material/NoticeAndSupervisionEdit.aspx.cs | 6 +- .../Material/NoticeAndSupervisionView.aspx.cs | 6 +- .../CQMS/Meeting/MonthMeeting.aspx.cs | 1 - .../CQMS/Meeting/MonthMeetingEdit.aspx.cs | 21 +- .../CQMS/Meeting/MonthMeetingFile.aspx.cs | 7 +- .../CQMS/Meeting/MonthMeetingView.aspx.cs | 7 - .../CQMS/Meeting/SpecialMeeting.aspx.cs | 1 - .../CQMS/Meeting/SpecialMeetingEdit.aspx.cs | 5 - .../CQMS/Meeting/SpecialMeetingFile.aspx.cs | 7 +- .../CQMS/Meeting/SpecialMeetingView.aspx.cs | 7 - .../CQMS/Models/QualityModelEdit.aspx.cs | 8 +- .../CQMS/PersonManage/CheckerItemView.aspx.cs | 3 +- .../CQMS/PersonManage/TestPlanEdit.aspx.cs | 4 +- .../CQMS/PersonManage/TestPlanView.aspx.cs | 5 +- .../CQMS/PersonManage/TestRecordEdit.aspx.cs | 5 +- .../CQMS/PersonManage/TestRecordView.aspx.cs | 5 +- .../CQMS/PersonManage/WelderItemView.aspx.cs | 3 +- SGGL/FineUIPro.Web/CQMS/Plan/MainPlan.aspx.cs | 10 +- .../CQMS/Plan/MainPlanEdit.aspx.cs | 35 +- .../CQMS/Plan/MainPlanView.aspx.cs | 5 +- SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx.cs | 1 - .../CQMS/Plan/SubPlanEdit.aspx.cs | 5 +- .../Plan/TechnicalProposalReviewEdit.aspx.cs | 7 - .../Plan/TechnicalProposalReviewView.aspx.cs | 7 - .../QCManage/QCGroupRegistration.aspx.cs | 12 +- .../QCManage/QCGroupRegistrationEdit.aspx.cs | 29 +- .../QCManage/QCGroupRegistrationView.aspx.cs | 27 +- .../QCManage/QCStatics.aspx.cs | 18 +- .../RewardAndPunish/RewardAndPunish.aspx.cs | 3 +- .../RewardAndPunishEdit.aspx.cs | 5 - .../RewardAndPunishView.aspx.cs | 7 - .../CQMS/Technical/Rectify.aspx.cs | 6 +- .../CQMS/Technical/RectifyEdit.aspx.cs | 4 +- .../CQMS/Technical/RectifyItemEdit.aspx.cs | 2 +- .../Technical/RectifySelectCloumn.aspx.cs | 4 - .../Technical/TechnicalDiscloseEdit.aspx.cs | 7 - .../Technical/TechnicalDiscloseView.aspx.cs | 7 - .../CQMS/Train/TrainPlanEdit.aspx.cs | 7 - .../CQMS/Train/TrainPlanView.aspx.cs | 10 +- .../CQMS/Train/TrainRecordEdit.aspx.cs | 9 +- .../CQMS/Train/TrainRecordView.aspx.cs | 7 - .../FineUIPro.Web/CQMS/WBS/SelectUnit.aspx.cs | 5 +- .../Controls/ChartControl.ascx.cs | 10 +- .../FineUIPro.Web/Controls/Fastreport.aspx.cs | 11 +- .../Controls/UnitProjectTControl.ascx.cs | 9 +- .../FineUIPro.Web/Controls/WBSControl.ascx.cs | 4 +- .../DCGL/ServerCheck/CheckNotice.aspx.cs | 2 - .../DCGL/ServerCheck/CheckRectifyEdit.aspx.cs | 6 +- SGGL/FineUIPro.Web/DataShow/Check.aspx.cs | 12 +- .../DataShow/CompanyPerson.aspx.cs | 3 +- .../DataShow/ConstructionEquipment.aspx.cs | 5 +- SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs | 7 +- .../DataShow/Environmental.aspx.cs | 2 +- .../FineUIPro.Web/DataShow/HJGLDefect.aspx.cs | 2 +- .../FineUIPro.Web/DataShow/HJGLWelder.aspx.cs | 7 +- .../DataShow/HJGLWelding.aspx.cs | 10 +- .../DataShow/HJGLWeldingItem.aspx.cs | 4 +- .../DataShow/HiddenRectification.aspx.cs | 16 +- .../DataShow/HiddenRectificationItem.aspx.cs | 5 +- .../DataShow/LargeEngineering.aspx.cs | 12 +- .../DataShow/LargeEngineeringItem.aspx.cs | 4 +- SGGL/FineUIPro.Web/DataShow/License.aspx.cs | 4 +- SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs | 12 +- SGGL/FineUIPro.Web/DataShow/Project.aspx.cs | 15 +- .../DataShow/ProjectDivision.aspx.cs | 4 +- .../DataShow/ProjectPerson.aspx.cs | 4 +- .../DataShow/QualityAcceptance.aspx.cs | 3 +- .../DataShow/QualityControlPoint.aspx.cs | 7 +- .../DataShow/QualityInstruments.aspx.cs | 14 +- .../DataShow/QualityInstrumentsItem.aspx.cs | 4 +- .../DataShow/QualityPerson.aspx.cs | 14 +- .../DataShow/QualityProblem.aspx.cs | 2 +- .../DataShow/QualityProblemItem.aspx.cs | 5 +- .../DataShow/QualityTraining.aspx.cs | 11 +- .../DataShow/QualityTrainingItem1.aspx.cs | 5 +- .../DataShow/QualityTrainingItem2.aspx.cs | 5 +- .../DataShow/SecurityRisk.aspx.cs | 15 +- .../DataShow/SecurityRiskItem.aspx.cs | 2 +- .../DataShow/WorkingHoursItem.aspx.cs | 4 +- .../DigData/CQMSDataCollect.aspx.cs | 6 +- SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.cs | 8 +- SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.cs | 8 +- SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.cs | 6 +- SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.cs | 6 +- .../DigData/ProjectDataDW.aspx.cs | 11 +- .../DigData/ProjectWBSAnalysis.aspx.cs | 12 +- .../DigData/ProjectWBSDW.aspx.cs | 40 +- .../DigData/ShowProjectWBS.aspx.cs | 17 +- .../DigData/ShowProjectWBSPackage.aspx.cs | 12 +- .../FineUIPro.Web/DigData/WBSAnalysis.aspx.cs | 10 +- SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs | 29 +- SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx | 9 +- .../HJGL/BaseInfo/MaterialCodeLibIn.aspx.cs | 100 +-- .../HJGL/BaseInfo/MaterialColor.aspx.cs | 7 +- .../HJGL/BaseInfo/MaterialColorEdit.aspx.cs | 5 +- .../HJGL/BaseInfo/MaterialColorInaspx.aspx.cs | 5 - .../HJGL/BaseInfo/MediumIn.aspx.cs | 4 +- .../HJGL/BaseInfo/WeldingLocation.aspx.cs | 2 +- .../HJGL/DataImport/DrawingImportEdit.aspx.cs | 10 +- .../DataImport/MaterialInformation.aspx.cs | 37 +- .../HJGL/DataImport/MaterialStock.aspx.cs | 5 +- .../HJGL/DataImport/TDMImport.aspx.cs | 2 +- .../HJGL/DataImport/TDMImportEdit.aspx.cs | 2 +- .../HJGL/HotProcessHard/HardReport.aspx.cs | 4 +- .../HJGL/HotProcessHard/HardTrust.aspx.cs | 4 +- .../HotProcessHard/HotProessReport.aspx.cs | 4 +- .../HotProcessHard/HotProessTrust.aspx.cs | 8 +- .../HotProessTrustItemEdit.aspx.cs | 9 +- .../HJGL/InfoQuery/JointQuery.aspx.cs | 29 +- .../HJGL/InfoQuery/PipelineQuery.aspx.cs | 133 ++-- .../HJGL/LeakVacuum/LV_ItemEndCheck.aspx.cs | 6 +- .../HJGL/LeakVacuum/LeakVacuumAudit.aspx.cs | 4 +- .../LeakVacuum/LeakVacuumComplete.aspx.cs | 6 +- .../HJGL/LeakVacuum/LeakVacuumEdit.aspx.cs | 4 +- .../HJGL/NDT/NDTBatchImport.aspx.cs | 61 +- .../HJGL/PersonManage/CheckerManage.aspx.cs | 2 +- .../HJGL/PointTrust/PointBatch.aspx.cs | 1 - .../PointTrust/PointWeldJointView.aspx.cs | 2 +- .../HJGL/PointTrust/TrustBatch.aspx.cs | 7 +- .../HJGL/PreDesign/MaterialManage.aspx.cs | 2 +- .../HJGL/PreDesign/MaterialManageEdit.aspx.cs | 2 +- .../HJGL/PreDesign/MaterialManageIn.aspx.cs | 6 +- .../HJGL/PreDesign/MaterialManageView.aspx.cs | 3 +- .../HJGL/PreDesign/PackagingManage.aspx.cs | 4 +- .../PreDesign/PackagingManageEdit.aspx.cs | 47 +- .../PreDesign/PackagingManageSelect.aspx.cs | 12 +- .../PackagingManageSelectStock.aspx.cs | 21 +- .../PreDesign/PackagingManageView.aspx.cs | 63 +- .../HJGL/PreDesign/PipelingDivide.aspx.cs | 107 ++- .../HJGL/PreDesign/PrePipeline.aspx.cs | 93 ++- .../PreDesign/PrePipelineBatchEdit.aspx.cs | 2 +- .../PreDesign/PrePipelineQRCodeIn.aspx.cs | 50 +- .../ProductionSchedulingPlan.aspx.cs | 10 - .../PreDesign/TrainNumberManageEdit.aspx.cs | 7 +- .../HJGL/PreDesign/TrainNumberManager.aspx | 2 +- .../HJGL/PreDesign/TrainNumberManager.aspx.cs | 21 +- .../PreDesign/TrainNumberManagerPrint.aspx.cs | 5 - .../PreDesign/TrainNumberManagerView.aspx.cs | 6 +- .../HJGL/PreDesign/YardPlanning.aspx.cs | 118 ++-- .../HJGL/PreDesign/YardPlanningEdit.aspx.cs | 17 +- .../PurgingCleaning/PC_ItemEndCheck.aspx.cs | 4 +- .../PurgingCleaningAudit.aspx.cs | 4 +- .../PurgingCleaningComplete.aspx.cs | 4 +- .../PurgingCleaningEdit.aspx.cs | 4 +- .../RepairAndExpand/RepairAndExpand.aspx.cs | 4 +- .../HJGL/RepairAndExpand/RepairTrust.aspx.cs | 7 +- .../HJGL/TestPackage/BItemEndCheck.aspx.cs | 4 +- .../HJGL/TestPackage/ItemEndCheck.aspx.cs | 4 +- .../TestPackage/ItemEndCheckEdit2.aspx.cs | 5 +- .../HJGL/TestPackage/TestPackageAudit.aspx.cs | 42 +- .../HJGL/TestPackage/TestPackageComplete.aspx | 43 +- .../TestPackage/TestPackageComplete.aspx.cs | 653 +++-------------- .../TestPackageComplete.aspx.designer.cs | 36 + .../HJGL/TestPackage/TestPackageData.aspx.cs | 87 ++- .../TestPackage/TestPackageDatePrint.aspx.cs | 12 +- .../HJGL/TestPackage/TestPackageEdit.aspx.cs | 10 +- .../TestPackage/TestPackageImport.aspx.cs | 63 +- .../TestPackage/TestPackageItemEdit.aspx.cs | 4 +- SGGL/FineUIPro.Web/HJGL/WPQ/WPQEdit.aspx.cs | 1 - SGGL/FineUIPro.Web/HJGL/WPQ/WPQList.aspx.cs | 2 +- .../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 2 - .../HJGL/WeldingManage/PipelineEdit.aspx.cs | 12 +- .../HJGL/WeldingManage/PipelineList.aspx.cs | 6 +- .../HJGL/WeldingManage/PipelineListIn.aspx.cs | 4 +- .../WeldingManage/PipelineListPDMSIn.aspx.cs | 3 - .../HJGL/WeldingManage/PipelineMatIn.aspx.cs | 46 +- .../WeldingManage/PreWeldReportAudit.aspx.cs | 4 +- .../WeldingManage/SelectTaskWeldJoint.aspx.cs | 12 +- .../WeldingManage/WeldJointBatchEdit.aspx.cs | 6 +- .../HJGL/WeldingManage/WeldJointEdit.aspx.cs | 1 - .../HJGL/WeldingManage/WeldJointList.aspx.cs | 115 ++- .../HJGL/WeldingManage/WeldMatMatch.aspx.cs | 101 +-- .../WeldingManage/WeldMatMatchGet.aspx.cs | 15 +- .../HJGL/WeldingManage/WeldReport.aspx.cs | 27 +- .../HJGL/WeldingManage/WeldReportEdit.aspx.cs | 24 +- .../HJGL/WeldingManage/WeldTask.aspx.cs | 43 +- .../HJGL/WeldingManage/WeldingConDate.aspx.cs | 3 +- .../HJGL/WeldingManage/WeldingPlan.aspx.cs | 14 +- .../HJGL/WeldingManage/WeldingPlanIn.aspx.cs | 32 +- .../HJGL/WeldingReport/CheckResult.aspx.cs | 2 +- .../HJGL/WeldingReport/WelderEfficacy.aspx.cs | 2 +- .../Accident/AccidentPersonRecordEdit.aspx.cs | 2 +- .../ActionPlan/ActionPlanListEdit.aspx.cs | 18 +- .../ActionPlan/ActionPlanListView.aspx.cs | 5 +- .../HSSE/Check/CheckSpecial.aspx.cs | 2 - .../HSSE/Check/OfficeCheck.aspx.cs | 4 +- .../HSSE/Check/ProjectLeaderCheck.aspx.cs | 2 +- .../HSSE/Check/ProjectLeaderCheckEdit.aspx.cs | 9 +- .../HSSE/Check/ProjectLeaderCheckView.aspx.cs | 12 +- .../HSSE/Check/PunishNoticeView.aspx.cs | 3 +- .../HSSE/Check/RectifyNotices.aspx.cs | 4 +- .../HSSE/CostGoods/CostManage.aspx.cs | 12 +- .../HSSE/CostGoods/CostManageAudit.aspx.cs | 38 +- .../HSSE/CostGoods/CostManageEdit.aspx.cs | 32 +- .../HSSE/CostGoods/CostManageItemEdit.aspx.cs | 10 +- .../HSSE/CostGoods/CostManageView.aspx.cs | 8 +- .../HSSE/CostGoods/CostSummary.aspx.cs | 31 +- .../HSSE/CostGoods/CostSummaryUnit.aspx.cs | 35 +- .../HSSE/CostGoods/Expense.aspx.cs | 21 +- .../HSSE/CostGoods/ExpenseEdit.aspx.cs | 30 +- .../HSSE/CostGoods/ExpenseUnit.aspx.cs | 44 +- .../HSSE/CostGoods/ExpenseView.aspx.cs | 3 +- .../HSSE/EduTrain/TestTrainingSave.aspx.cs | 3 +- .../HSSE/Emergency/DrillRecordList.aspx.cs | 4 +- .../Emergency/DrillRecordListEdit.aspx.cs | 2 +- .../EnvironmentalMonitoring.aspx.cs | 6 +- .../EnvironmentalMonitoringApiView.aspx.cs | 9 +- .../HSSE/Hazard/ConstructionRisk.aspx.cs | 8 +- .../Hazard/ConstructionRiskCheckSee.aspx.cs | 1 - .../ConstructionRiskControlCheck.aspx.cs | 17 +- .../ConstructionRiskControlEdit.aspx.cs | 40 +- .../Hazard/ConstructionRiskDataIn.aspx.cs | 4 +- .../HSSE/Hazard/ConstructionRiskMap.aspx.cs | 3 +- .../HSSE/Hazard/LocationSelect.aspx.cs | 13 +- .../FineUIPro.Web/HSSE/Hazard/ShowWBS.aspx.cs | 1 - .../HiddenRectificationList.aspx.cs | 4 +- .../ConstructionStandardIdentifyEdit.aspx.cs | 4 +- .../EPSummaryReport.aspx.cs | 2 +- .../EPSummaryReportEdit.aspx.cs | 4 - .../MillionsMonthlyReport.aspx.cs | 6 +- .../MillionsMonthlyReportEdit.aspx.cs | 17 +- .../MillionsMonthlyReportView.aspx.cs | 13 +- .../WorkSummaryReport.aspx.cs | 2 +- .../WorkSummaryReportEdit.aspx.cs | 6 +- .../HSSE/Manager/ManagerMonth_SeDin.aspx.cs | 2 +- .../Manager/ManagerMonth_SeDinEdit.aspx.cs | 14 +- .../Meeting/SafetyLeaderGroupMeeting.aspx.cs | 4 +- .../PhysicalExamination.aspx.cs | 2 +- .../PhysicalExaminationEdit.aspx.cs | 6 +- .../HSSE/QualityAudit/PersonQuality.aspx.cs | 2 +- .../QualityAudit/PersonQualityEdit.aspx.cs | 4 +- .../HSSE/SitePerson/PersonInfo.aspx.cs | 3 - .../HSSE/SitePerson/PersonList.aspx.cs | 6 +- .../SitePerson/SitePersonNowStatistic.aspx.cs | 6 +- .../HSSE/SitePerson/WorkPostStatistic.aspx.cs | 1 - .../ExpertArgumentListEditItem.aspx.cs | 4 +- .../HSSE/Solution/LargerHazardEdit.aspx.cs | 1 - .../HSSE/Technique/RectifyEdit.aspx.cs | 4 +- SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs | 2 - .../Check/CheckContentEdit.aspx.cs | 5 +- .../OfficeCheck/Check/CheckInfo.aspx.cs | 8 +- .../OfficeCheck/Check/CheckNoticeEdit.aspx.cs | 10 +- .../OfficeCheck/Check/CheckReport.aspx.cs | 8 +- .../OfficeCheck/Check/CheckTeamEdit.aspx.cs | 3 +- .../OfficeCheck/Check/RectifyEdit.aspx.cs | 20 +- .../ActionPlanFormation.aspx.cs | 6 +- .../ActionPlanReview.aspx.cs | 2 +- .../ActionPlanReviewDetail.aspx.cs | 2 +- .../ActionPlanReviewEdit.aspx.cs | 2 +- .../ApproveUserReview.aspx.cs | 8 +- .../ApproveUserReviewDetail.aspx.cs | 18 +- .../ApproveUserReviewEdit.aspx.cs | 25 +- .../BidDocumentsReview.aspx.cs | 4 +- .../BidDocumentsReviewDetail.aspx.cs | 2 +- .../BidDocumentsReviewEdit.aspx.cs | 12 +- .../BiddingManagement/SetSubReview.aspx.cs | 10 +- .../SetSubReviewDetail.aspx.cs | 2 +- .../SetSubReviewEdit.aspx.cs | 6 +- .../BidProjectQuantityEdit.aspx.cs | 6 +- .../BidProjectQuantityList.aspx.cs | 5 +- .../MainProjectQuantityEdit.aspx.cs | 6 +- .../PHTGL_QuantityEdit.aspx.cs | 10 +- .../BillOfQuantities/TemQuantityIn.aspx.cs | 22 +- .../BillOfQuantities/TemQuantityList.aspx.cs | 16 +- .../TemQuantitySelect.aspx.cs | 11 +- .../ContractReviewDetail.aspx.cs | 2 +- .../ContractReviewEdit.aspx.cs | 2 +- .../ContractTrackComparison.aspx.cs | 24 +- .../ContractCompile/ContractTrackEdit.aspx.cs | 36 +- .../ContractCompile/ContractTrackIn.aspx.cs | 6 +- .../ContractCompile/ContractTrackList.aspx.cs | 32 +- .../ContractTrackMatchWBS.aspx.cs | 6 +- .../ContractTrackProgressChart.aspx.cs | 35 +- .../ContractTrackProgressDetection.aspx.cs | 19 +- ...ContractTrackProgressDetectionGrid.aspx.cs | 95 ++- .../PHTGL/ContractCompile/ContractWBS.aspx.cs | 92 ++- .../PHTGL/Filing/ActionPlanFile.aspx.cs | 3 +- .../PHTGL/Filing/ApproveUserFile.aspx.cs | 3 +- .../PHTGL/Filing/BidDocumentsFile.aspx.cs | 1 - .../Filing/BidDocumentsStandingBook.aspx.cs | 40 +- .../BidDocumentsStandingBookEdit.aspx.cs | 33 +- ...idDocumentsStandingBookEditProject.aspx.cs | 5 - .../Filing/BidDocumentsStandingBookIn.aspx.cs | 18 +- .../PHTGL/Filing/ContractStandingBook.aspx.cs | 37 +- .../Filing/ContractStandingBookEdit.aspx.cs | 31 +- .../Filing/ContractStandingBookIn.aspx.cs | 50 +- SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx.cs | 3 +- .../PHTGL/Filing/SetSubFile.aspx.cs | 1 - .../PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs | 10 +- .../PHTGL/InvoiceManage/InvoiceOrder.aspx.cs | 47 +- .../InvoiceManage/InvoiceOrderDetail.aspx.cs | 90 ++- .../InvoiceOrderReviewEdit.aspx.cs | 56 +- .../InvoiceManage/InvoiceStandingBook.aspx.cs | 15 +- .../InvoiceStandingBookEdit.aspx.cs | 13 +- .../ConstructionLogWorkEfficiency.aspx.cs | 1 - .../ConstructionMonthReport.aspx.cs | 2 +- .../ConstructionMonthReportEdit.aspx.cs | 2 - .../ProjectConstructionLog.aspx.cs | 4 +- ...ojectConstructionLogWorkEfficiency.aspx.cs | 2 - .../Person/CompanyPerson.aspx.cs | 2 +- .../FineUIPro.Web/Person/DepartPerson.aspx.cs | 13 +- .../Person/DepartPersonShunt.aspx.cs | 22 +- .../Person/PersonContractEdit.aspx.cs | 6 +- SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs | 15 +- .../Person/PersonItemEdit.aspx.cs | 14 +- SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs | 13 +- .../Person/PersonTrainEdit.aspx.cs | 6 +- .../Person/ProjectPerson.aspx.cs | 6 +- .../Person/ProjectPersonEdit.aspx.cs | 19 +- .../Person/ProjectPersonView.aspx.cs | 7 +- .../PersonManage/Test/TestPlanEdit.aspx.cs | 8 +- .../Personal/PersonalInfo.aspx.cs | 7 +- .../ProjectData/LocationSelect.aspx.cs | 10 +- .../ProjectData/ProjectSetSave.aspx.cs | 5 +- .../ProjectData/ProjectSysSet.aspx.cs | 2 +- .../ProjectData/ProjectUnitSave.aspx.cs | 8 +- .../ProjectData/ProjectUnitView.aspx.cs | 2 +- .../ProjectData/UnitWorkEdit.aspx.cs | 4 +- .../InformationProject/SafetyBriefing.aspx.cs | 2 +- .../SafetyBriefingEdit.aspx.cs | 4 +- .../SmartSite/EquipmentManage.aspx.cs | 4 +- .../SmartSite/EquipmentManageEdit.aspx.cs | 29 +- .../SmartSite/SoftManage.aspx.cs | 2 +- .../SmartSite/SoftManageEdit.aspx.cs | 31 +- SGGL/FineUIPro.Web/SysManage/DocEdit.aspx.cs | 1 - SGGL/FineUIPro.Web/SysManage/DocView.aspx.cs | 1 - SGGL/FineUIPro.Web/SysManage/HttpLog.aspx.cs | 17 +- .../SysManage/ProjectToDo.aspx.cs | 8 +- .../SysManage/SysConstSet.aspx.cs | 8 +- .../SysManage/UpdatePassword.aspx.cs | 3 +- .../InterFace/IFLogList.aspx.cs | 25 +- .../InterFace/InterFaceEdit.aspx.cs | 38 +- .../InterFace/InterFaceSet.aspx.cs | 26 +- .../InterFace/InterFaceTask.aspx.cs | 10 +- .../InterFace/InterFaceTaskEdit.aspx.cs | 32 +- .../DataIn/AccidentCauseReportImport.aspx.cs | 10 +- .../DrillConductedQuarterlyReportBar.aspx.cs | 2 +- ...DrillConductedQuarterlyReportBarIn.aspx.cs | 12 +- ...rillConductedQuarterlyReportImport.aspx.cs | 10 +- .../DrillPlanHalfYearReportImport.aspx.cs | 10 +- .../ZHGL/DataSync/CQMSData_CQMS.aspx.cs | 14 +- .../ZHGL/DataSync/CQMSData_CQMSEdit.aspx.cs | 22 +- .../ZHGL/DataSync/DataStatistics.aspx.cs | 7 +- .../ZHGL/DataSync/HJGLData_HJGL.aspx.cs | 9 +- .../ZHGL/DataSync/HJGLData_HJGLEdit.aspx.cs | 70 +- .../ZHGL/DataSync/HSSEData_HSSE.aspx.cs | 13 +- .../ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs | 14 +- .../Project_CQMSData_CQMS.aspx.cs | 14 +- .../Project_CQMSData_CQMSEdit.aspx.cs | 16 +- .../Project_HJGLData_HJGL.aspx.cs | 9 +- .../Project_HJGLData_HJGLEdit.aspx.cs | 71 +- .../Project_HSSEData_HSSE.aspx.cs | 13 +- .../Project_HSSEData_HSSEEdit.aspx.cs | 16 +- .../Project_SYHSEData_SYHSE.aspx.cs | 9 +- .../Project_SYHSEData_SYHSEEdit.aspx.cs | 12 +- .../ZHGL/DataSync/SYHSEData_Data.aspx.cs | 7 +- .../ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs | 18 +- .../ZHGL/DataSync/SYHSEData_SYHSE.aspx.cs | 9 +- .../ZHGL/DataSync/SYHSEData_SYHSEEdit.aspx.cs | 10 +- .../ZHGL/Emergency/DrillRecordList.aspx.cs | 4 +- .../Emergency/DrillRecordListEdit.aspx.cs | 2 +- .../ZHGL/Emergency/EmergencyList.aspx.cs | 18 +- .../ZHGL/Emergency/EmergencyListView.aspx.cs | 17 +- .../Environmental/ArchitectureReport.aspx.cs | 6 +- .../ArchitectureReportSave.aspx.cs | 42 +- .../ZHGL/Environmental/ChemicalReport.aspx.cs | 10 +- .../Environmental/ChemicalReportSave.aspx.cs | 1 - .../ZHGL/Environmental/EnergyReport.aspx.cs | 3 - .../Environmental/EnergyReportSave.aspx.cs | 14 +- .../Environmental/OperationReport.aspx.cs | 7 +- .../Environmental/OperationReportEdit.aspx.cs | 45 +- .../ProjectArchitectureReport.aspx.cs | 8 +- .../ProjectArchitectureReportSave.aspx.cs | 4 +- .../ProjectChemicalReport.aspx.cs | 4 +- .../ProjectChemicalReportSave.aspx.cs | 1 - .../Environmental/ProjectEnergyReport.aspx.cs | 5 +- .../ProjectEnergyReportSave.aspx.cs | 5 +- .../ProjectOperationReport.aspx.cs | 3 - .../ProjectOperationReportEdit.aspx.cs | 7 - .../Information/AccidentCauseReport.aspx.cs | 4 +- .../AccidentCauseReportSave.aspx.cs | 2 +- .../ZHGL/Information/ActionWorkLedger.aspx.cs | 2 - .../DrillConductedQuarterlyReportAdd.aspx.cs | 2 +- .../DrillPlanHalfYearReportAdd.aspx.cs | 2 +- .../Information/MillionsMonthlyReport.aspx.cs | 6 +- .../QualityWorkSummaryReportEdit.aspx.cs | 4 +- .../QuarterlyProjectQuality.aspx.cs | 7 +- .../QuarterlyProjectQualityEdit.aspx.cs | 20 +- .../ZHGL/Information/ReportAuditSee.aspx.cs | 4 +- .../ZHGL/Information/ReportSubmit.aspx.cs | 10 +- .../ZHGL/Information/SafetyBriefing.aspx.cs | 9 +- .../Information/SafetyBriefingEdit.aspx.cs | 32 +- .../SafetyProductionEvaluation.aspx.cs | 2 - .../Information/SafetyQuarterlyReport.aspx.cs | 2 +- .../SafetyQuarterlyReportEdit.aspx.cs | 9 +- .../Information/WorkSummaryReport.aspx.cs | 2 +- .../Information/WorkSummaryReportEdit.aspx.cs | 2 +- .../ZHGL/Meeting/CompanySafetyMeeting.aspx.cs | 4 +- .../Meeting/CompanySpecialMeeting.aspx.cs | 4 +- .../Meeting/CompanySpecialMeetingView.aspx.cs | 4 +- .../ZHGL/Plan/ActionPlanList.aspx.cs | 1 - .../ZHGL/Plan/ActionPlanListView.aspx.cs | 5 +- SGGL/FineUIPro.Web/ZHGL/Plan/MainPlan.aspx.cs | 2 - .../ZHGL/Plan/MainPlanEdit.aspx.cs | 7 +- .../ZHGL/Plan/MainPlanView.aspx.cs | 5 +- .../ZHGL/Plan/ProjectPlan.aspx.cs | 1 - .../ZHGL/Plan/TechnicalProposalReview.aspx.cs | 1 - .../Plan/TechnicalProposalReviewView.aspx.cs | 7 - .../ZHGL/RealName/SynchroRecord.aspx.cs | 4 +- .../ZHGL/RealName/SynchroSet.aspx.cs | 2 +- .../Supervise/SuperviseCheckRectify.aspx.cs | 4 +- .../SuperviseCheckReportEdit.aspx.cs | 2 +- SGGL/FineUIPro.Web/common/PageBase.cs | 8 +- SGGL/FineUIPro.Web/common/main2.aspx.cs | 11 +- .../common/mainMenu_HJGL.aspx.cs | 120 ++-- .../common/mainMenu_HJGL2.aspx.cs | 7 +- .../common/mainMenu_HJGL3.aspx.cs | 3 - .../common/mainMenu_HJGL_AVEVA.aspx.cs | 3 +- .../common/mainMenu_HSSE2.aspx.cs | 7 +- .../common/mainMenu_JDGL.aspx.cs | 2 +- .../common/mainMenu_SYHSE.aspx.cs | 8 +- .../common/mainMenu_SYHSEN.aspx.cs | 7 +- SGGL/FineUIPro.Web/index.aspx.cs | 4 +- SGGL/FineUIPro.Web/indexProject.aspx.cs | 19 +- .../HJGL/PackagingManageController.cs | 134 +++- .../HJGL/TrainNumberManageController.cs | 98 ++- 933 files changed, 5897 insertions(+), 7541 deletions(-) diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index 87c5769b3caa758bc0ee2f7e2eed575d051ecb80..f2dbb8d22e58454d87ab6d7c948f72dd86c0cb5f 100644 GIT binary patch delta 2222 zcmcJQT}<0m6u^6LTPW}^u))TMz?iFmj5=CMKM+{A00V?lW`{VDu=3%@<}$S%pnOy| zw~3I9o`)GjCjOW3;9gwsl*KHLIAVw_ZhO}ReepqOqA7_O1kb^LO*i&1r{46Jd+s^+ zo_qf1o_iaZ(*&++&bryAOU;k)IA`_Y$#KUwtN{FcjqL}&x=C8Yrd6p_)WbxQfz`m0 zddIVQsM?HVDJC*+M>!#C9IMEGplt`rNk|N0Lsn^l(o%68kuxTmQ}z@o3MtBvqR5Y9 z|AZnNu_s4cus10>awF4-(AkQGJ$aBbFmbJCx6U~PWy{PCz`jIz~H<1Bk5E(+=LSTg*i<{bY zVbhqKYW$VS7SKE**A6L;cgrm=2r9qBS9%{Wp&ElZ@5DQeqR#@nTjB{-j}M zf~6#vUPZZ%6g*uz;Y)UNiK7-nSZ}0-@Me$hE`=|}qbpQq(Toe>lnr~t&>>#a!0(M; zNfs2%QS(K3tHgpeRZ_a5B=6{`K=jqz;1nnLGRA^AP6%{5q3z{BaN8`*<~Zd?dC)a? zA9uNux|Dp3puZEyN#t$h6ml9lgS>-`BJUz&$T+ep_7q%W6UU@bVHK08$a4@S8Uy%t zx}|bdL|z~IRxMp@E|!h4JecQWF7W3Kvqo6TYm#(m$%tMb&dY+c`CVGN>Z!1ty>H|9 zI36l&Toegi7p(NLPViUad1fk`|NQ}B=Sk?>eI{u2F%S5yEflHr%sX_=?7u z+(s+p7d0Udki_z3+@^<#vdaNdM zk4nYxhpe}kocNywfmZ{oX*vt1hqCX6ig-hK0UTP3z5g6=?cb%%ftb)h3oHC5F%8xkdd%Hs zlf~{e+HGAHBMJ_qx7%(u+HBn=4o7KMv8mK6?hK}I`IH7Kmowq~dodz+dQlBiSIVJ% z(I7f5PcitVHx1H8e_|@3>DO@eVbv=lVSFhazQ1_GL#=;_zC?u zFK?R8Vq8mwt~z&fD_fpf<%~1f|84P1aSXe)1>7T=8BGpbVQdJq`8q5Xbw$zfCuU|m AZvX%Q delta 2112 zcmcgsUrd`-6z{$L3I#s?3shhXu^HR&b6-nKTbT2M66H??3UyAi7+OjdoU>VqQ8%{E zEV?j=<2w)Yfd^8|vg~cWOPt2&63C)%S@xnNW?A-P=7SouzylA0=Rg}jUDU-GZ~5h% z`#bl$=kUAtp5$jza!EQnz{)QLYj|F~?3?;(^)}lL6MTaOVZz)m7n)2aj@ZBfrL}hU zG_0B*AC-}M1hG96qA)G3L~P4&xrSH{`oH3uTD0qEi_tb`eEPNweX<2;D>8odY_Mtc zNt`Gdq6+OEgo_-uFESvA=S(qq3 z!RlbOxUY~AOSdx{6^W7oF4JSN8(3H=3t7!ZB2gZ)It|3aO8Gx0thfn_+#yyfWtOh) zWHLR8-G)sdQ8TRvx~%k^vIRjRFd)+;d;REt5Gw(h={A2Mqv!wF@5^_Jw``}GUaLW} zHVL;Qn!fF-9@q5B#jVWsvN=`9)80-7OPwktd?EO<>50-F+<~q>jgyF(+2EeM5742+ z>!RKM1)Gga=^a=zF?E>;l>&*z0oj5CH5LjIY1xMp4r|@Layfe0KD1eSqGy_=cJc>m zq`EKxbne2s{$|hSqihH!Tz%j#dJan5Q8oY*?h}@N%#$zH{J9*GJ0u}>EitRrSQ0gm z4P21N1#ewvx)ar-dZ}S%>t0B-GRyNw^upWC@25K!+1484fmo;s%CP4C8Y_58_xMR! zNOVu@woX{$DyUq-Q@FupI+q8Ix2IDsMcydMLZXL@MBg;iE0;F!1eHT$>!_cRS!#gm z0e_*1T28j%Z;Ag`mm?izT(H3nmO8-GgXAAXKg4mT)P9c6AN5bilT2vgt2`Cw>6m8L zdhxc?jj+4I&S=!-btyi#E2g+2UZ3K1h9io{9rKO2qrS+950z#3hu9orn#oiG$+2YW zhy;%D2GKBnhk-VAwyi@M3bm^EJL(v5#YRWNVa4TfcokPTjJvvhQN`yP8Fjj&4zDv3 zo}?yBkB$ahpYk%Zkj_Y)C@7d&O&{COpmMCt7BC(8s;7O|hvU5$mgi3nu3x#h`H2aV zlihZQ)8T0z@kW&9W`{>{c^#_aRa+v8>WsBG)o{y5Eb0+IO_uZ2n>pw1Rx%shx?>gf z$-8E7OjSYE)Q^U=0@K=3r=--yd}#P?SPY+@XE3!K0`0wqbNh;z9S&cziq!d+8Kkav z!OeR%F?en*pRZ;-hdL6r%AC4)P|BDDr)Ks-a=Z2$^*H`N diff --git a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json index 086d13fc..75ab69a7 100644 --- a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json +++ b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json @@ -70,10 +70,6 @@ { "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" - }, - { - "$type": "Bookmark", - "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" } ] } diff --git a/SGGL/BLL/API/APIBaseInfoService.cs b/SGGL/BLL/API/APIBaseInfoService.cs index 52a65a14..dbd75469 100644 --- a/SGGL/BLL/API/APIBaseInfoService.cs +++ b/SGGL/BLL/API/APIBaseInfoService.cs @@ -93,7 +93,7 @@ namespace BLL return getDataLists; } } - + /// /// + /// diff --git a/SGGL/BLL/API/APIGetHttpService.cs b/SGGL/BLL/API/APIGetHttpService.cs index 63e8e9ac..1b5eb5c2 100644 --- a/SGGL/BLL/API/APIGetHttpService.cs +++ b/SGGL/BLL/API/APIGetHttpService.cs @@ -18,7 +18,7 @@ namespace BLL /// public static string Http(string url, string method = "GET", string contenttype = "application/json;charset=utf-8", Hashtable header = null, string data = null) { - ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 ; + ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = string.IsNullOrEmpty(method) ? "GET" : method; diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs index 74b2c0b9..22fc70d4 100644 --- a/SGGL/BLL/API/APIPersonService.cs +++ b/SGGL/BLL/API/APIPersonService.cs @@ -1,10 +1,8 @@ using Model; -using NPOI.SS.Formula.PTG; using System; using System.Collections.Generic; using System.Configuration; using System.Linq; -using System.Web.Security; namespace BLL { diff --git a/SGGL/BLL/API/APIUserService.cs b/SGGL/BLL/API/APIUserService.cs index d481f636..b8bb2285 100644 --- a/SGGL/BLL/API/APIUserService.cs +++ b/SGGL/BLL/API/APIUserService.cs @@ -16,8 +16,8 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var getUser = db.Person_Persons.FirstOrDefault(x =>( x.Account == userInfo.Account || x.Telephone == userInfo.Telephone || x.PersonName == userInfo.Account) - && x.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true) + var getUser = db.Person_Persons.FirstOrDefault(x => (x.Account == userInfo.Account || x.Telephone == userInfo.Telephone || x.PersonName == userInfo.Account) + && x.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true) && (x.Account.Length > 1 || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId)); if (getUser != null) { @@ -107,8 +107,8 @@ namespace BLL { var getUser = (from x in db.Person_Persons join y in db.Sys_Role on x.RoleIds equals y.RoleId - where x.UnitId == unitId && x.IsPost == true && (strParam == null || x.PersonName.Contains(strParam)) - && x.RoleIds .Length > 1 && x.Account.Length > 1 + where x.UnitId == unitId && x.IsPost == true && (strParam == null || x.PersonName.Contains(strParam)) + && x.RoleIds.Length > 1 && x.Account.Length > 1 orderby x.PersonName select new Model.BaseInfoItem { BaseInfoId = x.PersonId, BaseInfoName = x.PersonName, BaseInfoCode = x.Telephone }).ToList(); @@ -131,10 +131,10 @@ namespace BLL List roleList = Funs.GetStrListByStr(roleIds, ','); if (!string.IsNullOrEmpty(projectId)) { - var getDatas = from x in db.Person_Persons + var getDatas = from x in db.Person_Persons join y in db.SitePerson_Person on x.PersonId equals y.PersonId - where y.ProjectId == projectId && y.States == Const.State_1 && y.RoleIds.Length>1 && x.Account.Length > 1 - select new Model.UserItem + where y.ProjectId == projectId && y.States == Const.State_1 && y.RoleIds.Length > 1 && x.Account.Length > 1 + select new Model.UserItem { PersonId = x.PersonId, Account = x.Account, @@ -173,27 +173,27 @@ namespace BLL } else { - var getPersons =from x in db.Person_Persons - where x.IsPost == true && x.RoleIds.Length>1 && x.Account.Length > 1 - select new Model.UserItem - { - PersonId = x.PersonId, - Account = x.Account, - UserCode = x.JobNum, - Password = x.Password, - PersonName = x.PersonName, - RoleId = x.RoleIds, - RoleName = db.Sys_Role.First(z => z.RoleId == x.RoleIds).RoleName, - UnitId = x.UnitId, - UnitName = db.Base_Unit.First(z => z.UnitId == x.UnitId).UnitName, - //LoginProjectId = y.ProjectId, - //LoginProjectName = db.Base_Project.First(z => z.ProjectId == y.ProjectId).ProjectName, - IdentityCard = x.IdentityCard, - Email = x.Email, - Telephone = x.Telephone, - IsOffice = x.IsOffice, - SignatureUrl = x.SignatureUrl.Replace('\\', '/'), - }; + var getPersons = from x in db.Person_Persons + where x.IsPost == true && x.RoleIds.Length > 1 && x.Account.Length > 1 + select new Model.UserItem + { + PersonId = x.PersonId, + Account = x.Account, + UserCode = x.JobNum, + Password = x.Password, + PersonName = x.PersonName, + RoleId = x.RoleIds, + RoleName = db.Sys_Role.First(z => z.RoleId == x.RoleIds).RoleName, + UnitId = x.UnitId, + UnitName = db.Base_Unit.First(z => z.UnitId == x.UnitId).UnitName, + //LoginProjectId = y.ProjectId, + //LoginProjectName = db.Base_Project.First(z => z.ProjectId == y.ProjectId).ProjectName, + IdentityCard = x.IdentityCard, + Email = x.Email, + Telephone = x.Telephone, + IsOffice = x.IsOffice, + SignatureUrl = x.SignatureUrl.Replace('\\', '/'), + }; if (!string.IsNullOrEmpty(unitId)) { @@ -236,7 +236,7 @@ namespace BLL join y in db.SitePerson_Person on x.PersonId equals y.PersonId join z in db.Project_ProjectUnit on x.UnitId equals z.UnitId where y.ProjectId == projectId && z.ProjectId == projectId && z.UnitType == unitType && y.States == Const.State_1 - && (strParam == null || x.PersonName.Contains(strParam)) && y.RoleIds.Length>1 && x.Account.Length > 1 + && (strParam == null || x.PersonName.Contains(strParam)) && y.RoleIds.Length > 1 && x.Account.Length > 1 select new Model.UserItem { PersonId = x.PersonId, @@ -268,7 +268,7 @@ namespace BLL join y in db.SitePerson_Person on x.PersonId equals y.PersonId join z in db.Project_ProjectUnit on x.UnitId equals z.UnitId where y.ProjectId == projectId && z.ProjectId == projectId && z.UnitType == unitType && y.States == Const.State_1 - && (strParam == null || x.PersonName.Contains(strParam)) && y.RoleIds.Contains(item) && y.RoleIds.Length>1 && x.Account.Length > 1 + && (strParam == null || x.PersonName.Contains(strParam)) && y.RoleIds.Contains(item) && y.RoleIds.Length > 1 && x.Account.Length > 1 select new Model.UserItem { PersonId = x.PersonId, @@ -348,7 +348,7 @@ namespace BLL using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var getUser = db.Person_Persons.FirstOrDefault(x => x.PersonId == personId); - if (getUser != null&&!string .IsNullOrEmpty(SignatureUrl)) + if (getUser != null && !string.IsNullOrEmpty(SignatureUrl)) { getUser.SignatureUrl = SignatureUrl; db.SubmitChanges(); @@ -445,7 +445,7 @@ namespace BLL { var getDatas = (from x in db.Person_Persons join y in db.SitePerson_Person on x.PersonId equals y.PersonId - where y.ProjectId == projectId && y.States == Const.State_1 && y.RoleIds.Length>1 && x.Account.Length > 1 + where y.ProjectId == projectId && y.States == Const.State_1 && y.RoleIds.Length > 1 && x.Account.Length > 1 select new Model.UserItem { PersonId = x.PersonId, diff --git a/SGGL/BLL/API/HJGL/APIHJGLIndexService.cs b/SGGL/BLL/API/HJGL/APIHJGLIndexService.cs index 37d17258..3a888a2b 100644 --- a/SGGL/BLL/API/HJGL/APIHJGLIndexService.cs +++ b/SGGL/BLL/API/HJGL/APIHJGLIndexService.cs @@ -1,12 +1,8 @@ using System; -using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Model; namespace BLL { - public class APIHJGLIndexService + public class APIHJGLIndexService { public static Model.HJGLIndexItem GetJGLIndexItem(string projectid) { @@ -37,7 +33,8 @@ namespace BLL UnitWorkName = z.UnitWorkName, MaterialCode = z.MaterialCode }).ToList(); - var tb_type06 = getCH_CheckItemList.GroupBy(x => x.JointAttribute).Select(x => new { + var tb_type06 = getCH_CheckItemList.GroupBy(x => x.JointAttribute).Select(x => new + { JointAttribute = x.Key, Current_pass_film = x.Sum(m => m.CHT_PassFilm) ?? 0, Cht_totalfilm = x.Sum(m => m.CHT_TotalFilm) ?? 0 @@ -46,16 +43,16 @@ namespace BLL var XC_model = tb_type06.Where(x => x.JointAttribute == "安装口").FirstOrDefault(); double PassRate1 = 0; double PassRate2 = 0; - if (GC_model!=null &&GC_model.Cht_totalfilm>0) + if (GC_model != null && GC_model.Cht_totalfilm > 0) { PassRate1 = Math.Round((100 * GC_model.Current_pass_film * 1.0) / GC_model.Cht_totalfilm, 1); } - if (XC_model!=null&& XC_model.Cht_totalfilm > 0) + if (XC_model != null && XC_model.Cht_totalfilm > 0) { PassRate2 = Math.Round((100 * XC_model.Current_pass_film * 1.0) / XC_model.Cht_totalfilm, 1); } - hJGLIndexItem.GCFirstPassRate = PassRate1.ToString()+" %"; - hJGLIndexItem.XCFirstPassRate = PassRate2.ToString()+" %"; + hJGLIndexItem.GCFirstPassRate = PassRate1.ToString() + " %"; + hJGLIndexItem.XCFirstPassRate = PassRate2.ToString() + " %"; hJGLIndexItem.GCProgress = BLL.HJGL_WeldingReportService.GetGCRate_finished(projectid).ToString() + "/" + HJGL_WeldingReportService.GetSumSize(projectid, 1).ToString() + " DIN"; hJGLIndexItem.XCProgress = BLL.HJGL_WeldingReportService.GetXCRate_finished(projectid).ToString() + "/" + HJGL_WeldingReportService.GetSumSize(projectid, 2).ToString() + " DIN"; @@ -66,12 +63,12 @@ namespace BLL } else { - hJGLIndexItem.PipePrefabricationRate = Math.Floor(Math.Round(decimal.Parse((PipeRate1 / (PipeRate1 + PipeRate2)).ToString("0.000")), 2) * 100).ToString()+" %"; + hJGLIndexItem.PipePrefabricationRate = Math.Floor(Math.Round(decimal.Parse((PipeRate1 / (PipeRate1 + PipeRate2)).ToString("0.000")), 2) * 100).ToString() + " %"; } - hJGLIndexItem.GCWelderEfficacy = HJGL_WeldingReportService.GetWelderEfficacy_GC(projectid).ToString()+" DIN/天"; - hJGLIndexItem.XCWelderEfficacy = HJGL_WeldingReportService.GetWelderEfficacy_XC(projectid).ToString()+" DIN/天"; + hJGLIndexItem.GCWelderEfficacy = HJGL_WeldingReportService.GetWelderEfficacy_GC(projectid).ToString() + " DIN/天"; + hJGLIndexItem.XCWelderEfficacy = HJGL_WeldingReportService.GetWelderEfficacy_XC(projectid).ToString() + " DIN/天"; return hJGLIndexItem; } diff --git a/SGGL/BLL/API/HJGL/APINDETrustService.cs b/SGGL/BLL/API/HJGL/APINDETrustService.cs index f72da822..6d9b39a9 100644 --- a/SGGL/BLL/API/HJGL/APINDETrustService.cs +++ b/SGGL/BLL/API/HJGL/APINDETrustService.cs @@ -1,5 +1,4 @@ -using FineUIPro; -using System; +using System; using System.Collections.Generic; using System.Linq; @@ -263,13 +262,13 @@ namespace BLL /// /// /// - public static string ManualPointSave(string weldJointId) + public static string ManualPointSave(string weldJointId) { - string res = ""; + string res = ""; using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var PointBatchItemModel = db.HJGL_Batch_PointBatchItem.FirstOrDefault(e => e.WeldJointId == weldJointId); - var PointBatchId= PointBatchItemModel.PointBatchId; + var PointBatchId = PointBatchItemModel.PointBatchId; var batch = BLL.PointBatchService.GetPointBatchById(PointBatchId); if (!batch.EndDate.HasValue) { @@ -290,7 +289,7 @@ namespace BLL where z.PointBatchId == PointBatchId select x).FirstOrDefault(); if (pipeline != null) - { + { Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId); if (rate != null) { @@ -310,13 +309,13 @@ namespace BLL select x).Count(); if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG) { - res = "安装口已达检测标准,无需再点此安装口!"; + res = "安装口已达检测标准,无需再点此安装口!"; return res; } if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA) { res = "预制口已达检测标准,无需再点此预制口!"; - return res; + return res; } } } @@ -354,7 +353,7 @@ namespace BLL if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG) { res = "安装口已达检测标准,无需再点此安装口!"; - return res; + return res; } if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA) { @@ -365,7 +364,7 @@ namespace BLL } } PointBatchDetailService.UpdatePointBatchDetail(PointBatchItemModel.PointBatchItemId, "1", System.DateTime.Now); - + } else @@ -375,7 +374,7 @@ namespace BLL } return res; - } + } #region 点口调整 /// /// 点口调整 diff --git a/SGGL/BLL/API/HJGL/APIPackagingManageService.cs b/SGGL/BLL/API/HJGL/APIPackagingManageService.cs index 8e5c0e25..b381035f 100644 --- a/SGGL/BLL/API/HJGL/APIPackagingManageService.cs +++ b/SGGL/BLL/API/HJGL/APIPackagingManageService.cs @@ -1,43 +1,40 @@ -using System; +using Model; +using System; using System.Collections.Generic; using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Model; namespace BLL { - public class APIPackagingManageService + public class APIPackagingManageService { public static List GetPackagingManageList(string projectId) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var q = (from x in db.HJGL_PackagingManage - join n in db.Base_Project on x.ProjectId equals n.ProjectId - join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt - from t in tt.DefaultIfEmpty() - where x.ProjectId == projectId - select new PackagingManageDetailItem - { - PackagingManageId = x.PackagingManageId, - PackagingCode = x.PackagingCode, - ProjectName = n.ProjectName, - ContactName = x.ContactName, - ContactPhone = x.ContactPhone, - StackingPosition = x.StackingPosition, - State= x.State, - ReceiveMan=t.PersonName, - ReceiveDate = string.Format("{0:g}", x.ReceiveDate), - TrainNumber=x.TrainNumber, - }).Distinct(); + join n in db.Base_Project on x.ProjectId equals n.ProjectId + join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt + from t in tt.DefaultIfEmpty() + where x.ProjectId == projectId + select new PackagingManageDetailItem + { + PackagingManageId = x.PackagingManageId, + PackagingCode = x.PackagingCode, + ProjectName = n.ProjectName, + ContactName = x.ContactName, + ContactPhone = x.ContactPhone, + StackingPosition = x.StackingPosition, + State = x.State, + ReceiveMan = t.PersonName, + ReceiveDate = string.Format("{0:g}", x.ReceiveDate), + TrainNumber = x.TrainNumber, + }).Distinct(); return q.ToList(); } } - public static Model.PackagingManageItem GetPackagingInformationById(string projectId,string personId, string packagingManageId) + public static Model.PackagingManageItem GetPackagingInformationById(string projectId, string personId, string packagingManageId) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { @@ -54,41 +51,41 @@ namespace BLL PackagingManageId = x.PackagingManageId, PackagingCode = x.PackagingCode, ProjectName = n.ProjectName, - ProjectId = x.ProjectId, + ProjectId = x.ProjectId, ContactName = x.ContactName, ContactPhone = x.ContactPhone, StackingPosition = x.StackingPosition, - State =x.State, + State = x.State, ReceiveMan = t.PersonName, ReceiveDate = string.Format("{0:g}", x.ReceiveDate), TrainNumber = x.TrainNumber, }).FirstOrDefault(); - var tb_packing = (from x in db.HJGL_PackagingManage where x.PackagingManageId==packagingManageId select x ).FirstOrDefault() ; + var tb_packing = (from x in db.HJGL_PackagingManage where x.PackagingManageId == packagingManageId select x).FirstOrDefault(); var PipelineComponentIdList = tb_packing?.PipelineComponentId?.Split(','); if (PipelineComponentIdList != null && PipelineComponentIdList.Count() > 0) { packagingPrepipeItem = (from x in db.HJGL_Pipeline_Component - join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId - join z in db.WBS_UnitWork on y.UnitWorkId equals z.UnitWorkId - where PipelineComponentIdList.Contains(x.PipelineComponentId) - select new PackagingPrepipeItem - { - PipelineComponentId = x.PipelineComponentId, - PipelineComponentCode = x.PipelineComponentCode, - PreUnit = "1/个", - UnitWorkName = z.UnitWorkName, - PlanStartDate = string.Format("{0:g}", y.PlanStartDate), + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + join z in db.WBS_UnitWork on y.UnitWorkId equals z.UnitWorkId + where PipelineComponentIdList.Contains(x.PipelineComponentId) + select new PackagingPrepipeItem + { + PipelineComponentId = x.PipelineComponentId, + PipelineComponentCode = x.PipelineComponentCode, + PreUnit = "1/个", + UnitWorkName = z.UnitWorkName, + PlanStartDate = string.Format("{0:g}", y.PlanStartDate), - }).ToList(); + }).ToList(); } - + bool isPower = Person_PersonsService.IsGeneralUnitByPersonId(personId, projectId); if (!isPower) { - var roleList= Person_PersonsService.GetRoleListByProjectIdPersonId(projectId, personId); + var roleList = Person_PersonsService.GetRoleListByProjectIdPersonId(projectId, personId); if (roleList.Contains(Const.CQEngineer)) { - isPower=true; + isPower = true; } } packagingManageItem.packagingManageDetailItem = q; @@ -99,10 +96,10 @@ namespace BLL } } - public static void GetPackingInfoConfirmArrival(string packagingManageId,string PersonId) + public static void GetPackingInfoConfirmArrival(string packagingManageId, string PersonId) { - var q= BLL.HJGLPackagingmanageService.GetHJGL_PackagingManageById(packagingManageId); - if (q!=null) + var q = BLL.HJGLPackagingmanageService.GetHJGL_PackagingManageById(packagingManageId); + if (q != null) { q.State = HJGLPackagingmanageService.state_2; q.ReceiveMan = PersonId; @@ -152,7 +149,7 @@ namespace BLL PackagingManageId = table.PackagingManageId, PipelineId = ComponentModel.PipelineId, PipelineComponentId = item, - CreateTime = DateTime.Now, + CreateTime = DateTime.Now, }; newDetailList.Add(model); } @@ -160,7 +157,44 @@ namespace BLL HJGLPackagingmanagedetailService.DeleteByPackagingManageId(table.PackagingManageId); HJGLPackagingmanagedetailService.AddBulk(newDetailList); - } + } + } + /// + /// 新增或更新包装信息(Id为空则新增,否则更新),返回创建或更新后的Id。 + /// + public static string AddOrUpdatePackaging(Model.HJGL_PackagingManage model) + { + if (model == null) + throw new ArgumentNullException(nameof(model)); + + if (string.IsNullOrEmpty(model.PackagingManageId)) + { + // 新增 + model.PackagingManageId = SQLHelper.GetNewID(typeof(Model.HJGL_PackagingManage)); + HJGLPackagingmanageService.AddHJGL_PackagingManage(model); + return model.PackagingManageId; + } + else + { + // 修改 + var exist = HJGLPackagingmanageService.GetHJGL_PackagingManageById(model.PackagingManageId); + if (exist == null) + { + HJGLPackagingmanageService.AddHJGL_PackagingManage(model); + return model.PackagingManageId; + } + else + { + HJGLPackagingmanageService.UpdateHJGL_PackagingManage(model); + return model.PackagingManageId; + } + } + } + + + public static string GetNewPackagingCode(string projectId) + { + return HJGLPackagingmanageService.GetNewPackagingCode(projectId); } } } diff --git a/SGGL/BLL/API/HJGL/APIPipeJointService.cs b/SGGL/BLL/API/HJGL/APIPipeJointService.cs index 4fae36da..80b20f82 100644 --- a/SGGL/BLL/API/HJGL/APIPipeJointService.cs +++ b/SGGL/BLL/API/HJGL/APIPipeJointService.cs @@ -37,7 +37,7 @@ namespace BLL { // 从数据库中获取符合条件的管线数据 var pipelines = db.HJGL_Pipeline - .Where(p =>p.ProjectId==projectid&& p.PipelineCode.Contains(pipelineCode)) + .Where(p => p.ProjectId == projectid && p.PipelineCode.Contains(pipelineCode)) .OrderBy(p => p.PipelineCode) .ToList(); return pipelines; diff --git a/SGGL/BLL/API/HJGL/APIPipelineComponentService.cs b/SGGL/BLL/API/HJGL/APIPipelineComponentService.cs index 69132cea..67a1d64e 100644 --- a/SGGL/BLL/API/HJGL/APIPipelineComponentService.cs +++ b/SGGL/BLL/API/HJGL/APIPipelineComponentService.cs @@ -1,14 +1,11 @@ -using NPOI.OpenXmlFormats.Shared; +using Model; using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Model; namespace BLL { - public class APIPipelineComponentService + public class APIPipelineComponentService { public static List GetPackagingManageList(string projectid) { @@ -16,25 +13,25 @@ namespace BLL { var q = (from x in db.HJGL_Pipeline_Component - join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId - join z in db.Base_Unit on x.PreUnit equals z.UnitId into tt - join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into pp + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + join z in db.Base_Unit on x.PreUnit equals z.UnitId into tt + join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into pp from t in tt.DefaultIfEmpty() from p in pp.DefaultIfEmpty() where y.ProjectId == projectid - select new PipelineComponentItem - { - PipelineComponentId = x.PipelineComponentId, - PipelineComponentCode = x.PipelineComponentCode, - PreUnit = t.UnitName, - DrawingName = x.DrawingName, - BoxNumber = x.BoxNumber, - State = x.State, - PlanStartDate = string.Format("{0:g}", y.PlanStartDate) , - QRCode = x.QRCode, - ReceiveMan=p.PersonName, - ReceiveDate= string.Format("{0:g}", x.ReceiveDate) - }).Distinct(); + select new PipelineComponentItem + { + PipelineComponentId = x.PipelineComponentId, + PipelineComponentCode = x.PipelineComponentCode, + PreUnit = t.UnitName, + DrawingName = x.DrawingName, + BoxNumber = x.BoxNumber, + State = x.State, + PlanStartDate = string.Format("{0:g}", y.PlanStartDate), + QRCode = x.QRCode, + ReceiveMan = p.PersonName, + ReceiveDate = string.Format("{0:g}", x.ReceiveDate) + }).Distinct(); return q.ToList(); } @@ -52,8 +49,8 @@ namespace BLL from t in tt.DefaultIfEmpty() from p in pp.DefaultIfEmpty() join unitwork in db.WBS_UnitWork on y.UnitWorkId equals unitwork.UnitWorkId into unitworks - from unitwork in unitworks.DefaultIfEmpty() - where x.PipelineComponentId== PipelineComponentId + from unitwork in unitworks.DefaultIfEmpty() + where x.PipelineComponentId == PipelineComponentId select new PipelineComponentItem { PipelineComponentId = x.PipelineComponentId, @@ -61,12 +58,12 @@ namespace BLL PreUnit = t.UnitName, DrawingName = x.DrawingName, BoxNumber = x.BoxNumber, - State = x.State, + State = x.State, PlanStartDate = string.Format("{0:g}", y.PlanStartDate), QRCode = x.QRCode, ReceiveMan = p.PersonName, ReceiveDate = string.Format("{0:g}", x.ReceiveDate), - UnitWorkName=unitwork.UnitWorkName, + UnitWorkName = unitwork.UnitWorkName, Remark = x.Remark }).FirstOrDefault(); if (q != null) @@ -84,7 +81,7 @@ namespace BLL } } - public static void GetComponentConfirmArrival(string PipelineComponentId,string PersonId,string message) + public static void GetComponentConfirmArrival(string PipelineComponentId, string PersonId, string message) { var q = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(PipelineComponentId); if (q != null) @@ -92,7 +89,7 @@ namespace BLL if (!string.IsNullOrEmpty(message)) { q.State = HJGL_PipelineComponentService.StatePenRec; - q.Remark=message; + q.Remark = message; } else { diff --git a/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs b/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs index abc781ce..198c7671 100644 --- a/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs +++ b/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs @@ -1,11 +1,7 @@ - -using NPOI.SS.Formula.Functions; -using System; +using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; -using static QRCoder.PayloadGenerator; namespace BLL { @@ -237,7 +233,7 @@ namespace BLL ProjectId = newItem.ProjectId, UnitWorkId = newItem.UnitWorkId, UnitId = newItem.UnitId, - WeldingDate = newItem.WeldingDate, + WeldingDate = newItem.WeldingDate, Tabler = newItem.Tabler, TableDate = newItem.TableDate, Remark = newItem.Remark, @@ -257,54 +253,55 @@ namespace BLL } #endregion - public static string SaveWeldingDailyByWeldJointId(string WeldJointId, string Personid, string time) + public static string SaveWeldingDailyByWeldJointId(string WeldJointId, string Personid, string time) { string res = ""; using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { - try { - var peson=db.Person_Persons.FirstOrDefault(x => x.PersonId == Personid); - if (peson == null) + { + try { - res = "人员不存在"; - return res; - } - var joint = db.View_HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == WeldJointId); - if (joint == null) - { - res = "焊口不存在"; - return res; - } - var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date && x.UnitWorkId == joint.UnitWorkId); - var weldTask=db.HJGL_WeldTask.FirstOrDefault(x=>x.WeldJointId==joint.WeldJointId); - if (weldingDaily == null) - { - string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + peson.PersonName + "-"; - weldingDaily = new Model.HJGL_WeldingDaily(); - weldingDaily.WeldingDailyId = Guid.NewGuid().ToString(); - weldingDaily.WeldingDailyCode = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", joint.ProjectId, perfix); - weldingDaily.WeldingDate = Convert.ToDateTime(time).Date; - weldingDaily.ProjectId = joint.ProjectId; - weldingDaily.UnitWorkId = joint.UnitWorkId; - weldingDaily.UnitId = weldTask?.UnitId; - weldingDaily.Tabler = Personid; - weldingDaily.TableDate = Convert.ToDateTime(time).Date; - db.HJGL_WeldingDaily.InsertOnSubmit(weldingDaily); - db.SubmitChanges(); - } - BLL.HJGL_PipelineComponentjointService.UpdateStateByWeldJointId(WeldJointId, (DateTime)weldingDaily.WeldingDate);//更改预制口实际时间和状态 - PipelineService.UpdataDateByWeldJointId(WeldJointId);//更改安装口时间和状态 + var peson = db.Person_Persons.FirstOrDefault(x => x.PersonId == Personid); + if (peson == null) + { + res = "人员不存在"; + return res; + } + var joint = db.View_HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == WeldJointId); + if (joint == null) + { + res = "焊口不存在"; + return res; + } + var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date && x.UnitWorkId == joint.UnitWorkId); + var weldTask = db.HJGL_WeldTask.FirstOrDefault(x => x.WeldJointId == joint.WeldJointId); + if (weldingDaily == null) + { + string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + peson.PersonName + "-"; + weldingDaily = new Model.HJGL_WeldingDaily(); + weldingDaily.WeldingDailyId = Guid.NewGuid().ToString(); + weldingDaily.WeldingDailyCode = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", joint.ProjectId, perfix); + weldingDaily.WeldingDate = Convert.ToDateTime(time).Date; + weldingDaily.ProjectId = joint.ProjectId; + weldingDaily.UnitWorkId = joint.UnitWorkId; + weldingDaily.UnitId = weldTask?.UnitId; + weldingDaily.Tabler = Personid; + weldingDaily.TableDate = Convert.ToDateTime(time).Date; + db.HJGL_WeldingDaily.InsertOnSubmit(weldingDaily); + db.SubmitChanges(); + } + BLL.HJGL_PipelineComponentjointService.UpdateStateByWeldJointId(WeldJointId, (DateTime)weldingDaily.WeldingDate);//更改预制口实际时间和状态 + PipelineService.UpdataDateByWeldJointId(WeldJointId);//更改安装口时间和状态 var batchC = BLL.Project_SysSetService.GetSysSetBySetId("5", joint.ProjectId); - if (batchC != null) - { - string batchCondition = batchC.SetValue; - InsertWeldingDailyItem(WeldJointId, Personid, Personid, joint.JointAttribute, weldingDaily.WeldingDate, batchCondition, true, weldingDaily.WeldingDailyId, joint.ProjectId); - } - BLL.WeldJointService.UpdateWeldJointAddG(WeldJointId, joint.JointAttribute, Const.BtnAdd); + if (batchC != null) + { + string batchCondition = batchC.SetValue; + InsertWeldingDailyItem(WeldJointId, Personid, Personid, joint.JointAttribute, weldingDaily.WeldingDate, batchCondition, true, weldingDaily.WeldingDailyId, joint.ProjectId); + } + BLL.WeldJointService.UpdateWeldJointAddG(WeldJointId, joint.JointAttribute, Const.BtnAdd); } catch (Exception ex) { - APICommonService.SaveSysAPILog("erro", ex.ToString(),"-1"); + APICommonService.SaveSysAPILog("erro", ex.ToString(), "-1"); } } @@ -463,9 +460,9 @@ namespace BLL /// private static string InsertWeldingDailyItem(string weldJointId, string coverWelderId, string backingWelderId, string jointAttribute, DateTime? weldingDate, string batchCondition, bool isSave, string weldingDailyId, string projectId) { - string errlog = string.Empty; + string errlog = string.Empty; var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId); - var pipeline = BLL.PipelineService.GetPipelineByPipelineId(newWeldJoint.PipelineId); + var pipeline = BLL.PipelineService.GetPipelineByPipelineId(newWeldJoint.PipelineId); var weldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(weldingDailyId); if (newWeldJoint != null /*&& string.IsNullOrEmpty(newWeldJoint.WeldingDailyId)*/) { diff --git a/SGGL/BLL/API/HJGL/APITrainNumberManagerService.cs b/SGGL/BLL/API/HJGL/APITrainNumberManagerService.cs index aa7e5475..b0de9b18 100644 --- a/SGGL/BLL/API/HJGL/APITrainNumberManagerService.cs +++ b/SGGL/BLL/API/HJGL/APITrainNumberManagerService.cs @@ -1,8 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { @@ -15,13 +12,17 @@ namespace BLL /// public static void SaveTrainInfoConfirmArrival(string id, string PersonId) { - var model=TrainNumberManageService.GetModelById(id); - if (model!=null) + var model = TrainNumberManageService.GetModelById(id); + if (model != null) { model.ReceiveDate = DateTime.Now; TrainNumberManageService.Update(model); } - var packManagerList= HJGLPackagingmanageService.GetPackagingManage(id); + else + { + throw new Exception("车次信息有误,请检查!"); + } + var packManagerList = HJGLPackagingmanageService.GetPackagingManage(id); foreach (var item in packManagerList) { BLL.APIPackagingManageService.GetPackingInfoConfirmArrival(item.PackagingManageId, PersonId); @@ -65,13 +66,52 @@ namespace BLL { throw new Exception("未找到对应的包装信息"); } - if (packModel.State != HJGLPackagingmanageService.state_0) + /*if (packModel.State != HJGLPackagingmanageService.state_0) { throw new Exception("当前包装状态不可修改车次号"); - } + }*/ packModel.TrainNumberId = null; packModel.TrainNumber = null; HJGLPackagingmanageService.UpdateHJGL_PackagingManage(packModel); } + + /// + /// 新增或更新车次信息。若 model.Id 为空则新增,否则修改。返回创建或更新后的Id。 + /// 新增时 State=0,ReceiveDate=null;修改时保持原有 State 和 ReceiveDate。 + /// + public static string AddOrUpdateTrainNumber(Model.HJGL_TrainNumberManage model) + { + if (model == null) + { + throw new ArgumentNullException(nameof(model)); + } + + if (string.IsNullOrEmpty(model.Id)) + { + // 新增 + model.Id = SQLHelper.GetNewID(typeof(Model.HJGL_TrainNumberManage)); + model.ReceiveDate = null; + TrainNumberManageService.Add(model); + return model.Id; + } + else + { + // 修改 + var exist = TrainNumberManageService.GetModelById(model.Id); + if (exist == null) + { + model.ReceiveDate = null; + TrainNumberManageService.Add(model); + return model.Id; + } + else + { + // 保持原有ReceiveDate + model.ReceiveDate = exist.ReceiveDate; + TrainNumberManageService.Update(model); + return model.Id; + } + } + } } } diff --git a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs index 960422dd..aa4b3702 100644 --- a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs +++ b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs @@ -106,7 +106,7 @@ namespace BLL { CheckSpecialId = newItem.CheckSpecialId, CheckSpecialCode = newItem.CheckSpecialCode, - // CheckItemSetId = newItem.CheckItemSetId, + // CheckItemSetId = newItem.CheckItemSetId, CheckType = newItem.CheckType, ProjectId = newItem.ProjectId, CheckPerson = newItem.CheckPersonId, @@ -119,7 +119,7 @@ namespace BLL CompileMan = newItem.CompileManId, States = Const.State_0, }; - var getCheckSet=db.Technique_CheckItemSet.FirstOrDefault(x=>x.CheckItemSetId == newItem.CheckItemSetId); + var getCheckSet = db.Technique_CheckItemSet.FirstOrDefault(x => x.CheckItemSetId == newItem.CheckItemSetId); if (getCheckSet != null) { newCheckSpecial.CheckItemSetId = newItem.CheckItemSetId; @@ -318,7 +318,7 @@ namespace BLL LimitedDate = Funs.GetNewDateTime(newDetail.LimitedDate), CompletedDate = Funs.GetNewDateTime(newDetail.CompletedDate), Suggestions = newDetail.Suggestions, - // WorkArea = newDetail.WorkArea, + // WorkArea = newDetail.WorkArea, CheckArea = newDetail.WorkAreaId, CheckContent = newDetail.CheckContent, }; diff --git a/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs b/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs index 984e0eb3..9e76ea3a 100644 --- a/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs +++ b/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs @@ -82,8 +82,8 @@ namespace BLL RegisterTypes2Id = string.IsNullOrEmpty(hazardRegister.RegisterTypes2Id) ? null : hazardRegister.RegisterTypes2Id, RegisterTypes3Id = string.IsNullOrEmpty(hazardRegister.RegisterTypes3Id) ? null : hazardRegister.RegisterTypes3Id, RegisterTypes4Id = string.IsNullOrEmpty(hazardRegister.RegisterTypes4Id) ? null : hazardRegister.RegisterTypes4Id, - WorkPackageId=WorkPackageService.getWorkPageIdsByControlItemAndCycle(hazardRegister.WorkPackageId, null), - WorkPackageName= WorkPackageService.getWorkPageNamesByControlItemAndCycle(hazardRegister.WorkPackageId, null), + WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(hazardRegister.WorkPackageId, null), + WorkPackageName = WorkPackageService.getWorkPageNamesByControlItemAndCycle(hazardRegister.WorkPackageId, null), }; var isUpdate = db.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.HazardRegisterId == newHazardRegister.HazardRegisterId); if (isUpdate == null) @@ -152,7 +152,7 @@ namespace BLL { var hazardRegisters = (from x in db.HSSE_Hazard_HazardRegister join y in db.Base_Project on x.ProjectId equals y.ProjectId - join u in db.Base_Unit on x.ResponsibleUnit equals u.UnitId + join u in db.Base_Unit on x.ResponsibleUnit equals u.UnitId where x.ProjectId != null && x.States != null select new Model.HazardRegisterItem { @@ -173,7 +173,7 @@ namespace BLL ResponsibilityUnitName = db.Base_Unit.First(U => x.ResponsibleUnit == U.UnitId).UnitName, ResponsibilityManName = "", RectificationTime = x.RectificationTime, - Risk_Level = (x.HazardValue =="3"?"重大":"一般"), + Risk_Level = (x.HazardValue == "3" ? "重大" : "一般"), }).OrderBy(x => x.CheckTime).Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList(); return hazardRegisters; diff --git a/SGGL/BLL/API/HSSE/APISeDinMonthReportService.cs b/SGGL/BLL/API/HSSE/APISeDinMonthReportService.cs index c648825c..a17385ba 100644 --- a/SGGL/BLL/API/HSSE/APISeDinMonthReportService.cs +++ b/SGGL/BLL/API/HSSE/APISeDinMonthReportService.cs @@ -1,5 +1,4 @@ -using Model; -using System; +using System; using System.Collections.Generic; using System.Linq; @@ -195,9 +194,9 @@ namespace BLL } var getMaxMonthReport = (from x in Funs.DB.SeDin_MonthReport - where x.ProjectId == projectId && x.ReporMonth < monthD + where x.ProjectId == projectId && x.ReporMonth < monthD orderby x.ReporMonth descending - select x).FirstOrDefault(); + select x).FirstOrDefault(); if (getMaxMonthReport != null) { var getMonthReport2 = Funs.DB.SeDin_MonthReport2.FirstOrDefault(x => x.MonthReportId == getMaxMonthReport.MonthReportId); @@ -480,7 +479,7 @@ namespace BLL ///当月费用 var getCostManage = from x in db.CostGoods_CostManageItem join y in db.CostGoods_CostManage on x.CostManageId equals y.CostManageId - where y.ProjectId ==projectId && y.CostManageDate >= startDateD && y.CostManageDate < endDateD.Value.AddDays(1) + where y.ProjectId == projectId && y.CostManageDate >= startDateD && y.CostManageDate < endDateD.Value.AddDays(1) && y.States == Const.State_2 select x; if (getCostManage.Count() > 0) @@ -521,11 +520,11 @@ namespace BLL if (monthD >= Funs.GetNewDateTime("2023-07-01")) { getLists.SafetyYear += getLastMonthReport6.SafetyYear; - getLists.SafetyTotal += getLastMonthReport6.SafetyTotal; + getLists.SafetyTotal += getLastMonthReport6.SafetyTotal; getLists.ProgressYear += getLastMonthReport6.ProgressYear; getLists.ProgressTotal += getLastMonthReport6.ProgressTotal; getLists.EducationYear += getLastMonthReport6.EducationYear; - getLists.EducationTotal += getLastMonthReport6.EducationTotal; + getLists.EducationTotal += getLastMonthReport6.EducationTotal; } else { @@ -540,16 +539,16 @@ namespace BLL else { if (monthD >= Funs.GetNewDateTime("2023-07-01")) - { + { getLists.SafetyTotal += getLastMonthReport6.SafetyTotal; getLists.ProgressTotal += getLastMonthReport6.ProgressTotal; getLists.EducationTotal += getLastMonthReport6.EducationTotal; - + } else - { - getLists.SafetyTotal += (getLastMonthReport6.SafetyTotal + getLastMonthReport6.ProgressTotal + getLastMonthReport6.EducationTotal); - + { + getLists.SafetyTotal += (getLastMonthReport6.SafetyTotal + getLastMonthReport6.ProgressTotal + getLastMonthReport6.EducationTotal); + } getLists.LaborTotal += getLastMonthReport6.LaborTotal; getLists.SumTotal += getLastMonthReport6.SumTotal; @@ -557,7 +556,7 @@ namespace BLL } } - return getLists; + return getLists; } } #endregion diff --git a/SGGL/BLL/API/HSSE/APITestRecordService.cs b/SGGL/BLL/API/HSSE/APITestRecordService.cs index b9304d33..50dfb257 100644 --- a/SGGL/BLL/API/HSSE/APITestRecordService.cs +++ b/SGGL/BLL/API/HSSE/APITestRecordService.cs @@ -94,7 +94,7 @@ namespace BLL var item = db.Training_TestRecordItem.FirstOrDefault(x => x.TestRecordId == getTestRecord.TestRecordId); if (item == null) { - List getTestTrainingItemList = new List(); + List getTestTrainingItemList = new List(); var testPlanTrainings = (from x in db.Training_TestPlanTraining where x.TestPlanId == getTestPlan.TestPlanId select new { x.TestPlanId, x.TrainingId, x.TestType1Count, x.TestType2Count, x.TestType3Count }).Distinct(); @@ -522,7 +522,7 @@ namespace BLL foreach (var item in getTrainingTasks) { item.States = "2"; - + } getTestPlan.States = "3"; db.SubmitChanges(); diff --git a/SGGL/BLL/API/HSSE/APITrainingTaskService.cs b/SGGL/BLL/API/HSSE/APITrainingTaskService.cs index 854cbbec..eb5614f8 100644 --- a/SGGL/BLL/API/HSSE/APITrainingTaskService.cs +++ b/SGGL/BLL/API/HSSE/APITrainingTaskService.cs @@ -102,7 +102,7 @@ namespace BLL else { var person = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == personId && plan.ProjectId == e.ProjectId); - if (person != null && plan.UnitIds.Contains(person.UnitId) + if (person != null && plan.UnitIds.Contains(person.UnitId) && (string.IsNullOrEmpty(plan.WorkPostId) || plan.WorkPostId.Contains(person.WorkPostId))) { var trainType = db.Base_TrainType.FirstOrDefault(e => e.TrainTypeId == plan.TrainTypeId); diff --git a/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs b/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs index 2f9619de..b6bdd1fd 100644 --- a/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs +++ b/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs @@ -73,7 +73,7 @@ namespace BLL } Person_Persons getPerson = new Person_Persons(); getPerson = Person_PersonsService.GetPerson_PersonsByIdCard(item.IdentityCard); - if (getPerson==null) + if (getPerson == null) { getPerson = Person_PersonsService.GetPerson_PersonsByJobNum(item.UserCode); @@ -114,7 +114,7 @@ namespace BLL PersonName = item.UserName, IdentityCard = item.IdentityCard, UnitId = Const.UnitId_SEDIN, - + DataFrom = "API" }; diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 996d4b16..020661c5 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -897,24 +897,6 @@ False True - - {00020813-0000-0000-C000-000000000046} - 1 - 6 - 0 - primary - False - True - - - {00020905-0000-0000-C000-000000000046} - 8 - 4 - 0 - primary - False - False - {0002E157-0000-0000-C000-000000000046} 5 diff --git a/SGGL/BLL/BaseInfo/BaseCompanytemplateService.cs b/SGGL/BLL/BaseInfo/BaseCompanytemplateService.cs index 9841501c..253e0579 100644 --- a/SGGL/BLL/BaseInfo/BaseCompanytemplateService.cs +++ b/SGGL/BLL/BaseInfo/BaseCompanytemplateService.cs @@ -1,15 +1,13 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { - - public static class Base_CompanytemplateService + + public static class Base_CompanytemplateService { #region 获取列表 /// @@ -20,19 +18,19 @@ namespace BLL get; set; } - public static List GetBase_CompanyTemplateByModle(Model.Base_CompanyTemplate table) - { - var q= from x in Funs.DB.Base_CompanyTemplate - where - ( string.IsNullOrEmpty(table.TemplateId)||x.TemplateId.Contains(table.TemplateId)) && - ( string.IsNullOrEmpty(table.Code)||x.Code.Contains(table.Code)) && - ( string.IsNullOrEmpty(table.Name)||x.Name.Contains(table.Name)) && - ( string.IsNullOrEmpty(table.FilePath)||x.FilePath.Contains(table.FilePath)) && - ( string.IsNullOrEmpty(table.Remarks)||x.Remarks.Contains(table.Remarks)) - select x - ; - - return q.ToList(); + public static List GetBase_CompanyTemplateByModle(Model.Base_CompanyTemplate table) + { + var q = from x in Funs.DB.Base_CompanyTemplate + where + (string.IsNullOrEmpty(table.TemplateId) || x.TemplateId.Contains(table.TemplateId)) && + (string.IsNullOrEmpty(table.Code) || x.Code.Contains(table.Code)) && + (string.IsNullOrEmpty(table.Name) || x.Name.Contains(table.Name)) && + (string.IsNullOrEmpty(table.FilePath) || x.FilePath.Contains(table.FilePath)) && + (string.IsNullOrEmpty(table.Remarks) || x.Remarks.Contains(table.Remarks)) + select x + ; + + return q.ToList(); } /// 获取分页列表 @@ -42,55 +40,56 @@ namespace BLL /// public static IEnumerable getListData(Model.Base_CompanyTemplate table, Grid Grid1) { - var q= GetBase_CompanyTemplateByModle(table); + var q = GetBase_CompanyTemplateByModle(table); count = q.Count(); if (count == 0) { return null; } // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); - // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q select new { - x.TemplateId, - x.Code, - x.Name, - x.FilePath, - x.Remarks, - + x.TemplateId, + x.Code, + x.Name, + x.FilePath, + x.Remarks, + }; } #endregion - public static Model.Base_CompanyTemplate GetBase_CompanyTemplateById(string TemplateId) - { - return Funs.DB.Base_CompanyTemplate.FirstOrDefault(x=>x.TemplateId==TemplateId); + public static Model.Base_CompanyTemplate GetBase_CompanyTemplateById(string TemplateId) + { + return Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.TemplateId == TemplateId); } public static Model.Base_CompanyTemplate GetBase_CompanyTemplateByCode(string Code) { - return Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.Code== Code); + return Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.Code == Code); } public static bool IsExitCode(string Code) { bool result = false; - var q= (from x in Funs.DB.Base_CompanyTemplate where x.Code ==Code select x ).FirstOrDefault(); - if (q!=null) + var q = (from x in Funs.DB.Base_CompanyTemplate where x.Code == Code select x).FirstOrDefault(); + if (q != null) { result = true; } return result; } - + public static void AddBase_CompanyTemplate(Model.Base_CompanyTemplate newtable) { - - Model.Base_CompanyTemplate table = new Model.Base_CompanyTemplate{ - TemplateId=newtable.TemplateId, - Code=newtable.Code, - Name=newtable.Name, - FilePath=newtable.FilePath, - Remarks=newtable.Remarks, + + Model.Base_CompanyTemplate table = new Model.Base_CompanyTemplate + { + TemplateId = newtable.TemplateId, + Code = newtable.Code, + Name = newtable.Name, + FilePath = newtable.FilePath, + Remarks = newtable.Remarks, }; Funs.DB.Base_CompanyTemplate.InsertOnSubmit(table); Funs.DB.SubmitChanges(); @@ -103,41 +102,41 @@ namespace BLL Funs.DB.SubmitChanges(); } - + public static void UpdateBase_CompanyTemplate(Model.Base_CompanyTemplate newtable) { - - Model.Base_CompanyTemplate table = Funs.DB.Base_CompanyTemplate.FirstOrDefault(x=>x.TemplateId==newtable.TemplateId); - if (table != null) + + Model.Base_CompanyTemplate table = Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.TemplateId == newtable.TemplateId); + if (table != null) { - table.TemplateId=newtable.TemplateId; - table.Code=newtable.Code; - table.Name=newtable.Name; - table.FilePath=newtable.FilePath; - table.Remarks=newtable.Remarks; + table.TemplateId = newtable.TemplateId; + table.Code = newtable.Code; + table.Name = newtable.Name; + table.FilePath = newtable.FilePath; + table.Remarks = newtable.Remarks; Funs.DB.SubmitChanges(); } - + } - public static void DeleteBase_CompanyTemplateById (string TemplateId) - { - - Model.Base_CompanyTemplate table =Funs.DB.Base_CompanyTemplate.FirstOrDefault(x=>x.TemplateId==TemplateId); - if (table != null) - { + public static void DeleteBase_CompanyTemplateById(string TemplateId) + { + + Model.Base_CompanyTemplate table = Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.TemplateId == TemplateId); + if (table != null) + { Funs.DB.Base_CompanyTemplate.DeleteOnSubmit(table); Funs.DB.SubmitChanges(); - } - + } + } - public static void DeleteALLBase_CompanyTemplate () - { - if( Funs.DB.Base_CompanyTemplate !=null) - { - Funs.DB.Base_CompanyTemplate.DeleteAllOnSubmit( Funs.DB.Base_CompanyTemplate); + public static void DeleteALLBase_CompanyTemplate() + { + if (Funs.DB.Base_CompanyTemplate != null) + { + Funs.DB.Base_CompanyTemplate.DeleteAllOnSubmit(Funs.DB.Base_CompanyTemplate); Funs.DB.SubmitChanges(); - } + } } public static void InitBase_CompanyTemplateDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { diff --git a/SGGL/BLL/BaseInfo/BaseFactoryService.cs b/SGGL/BLL/BaseInfo/BaseFactoryService.cs index 6cd2328b..81f24115 100644 --- a/SGGL/BLL/BaseInfo/BaseFactoryService.cs +++ b/SGGL/BLL/BaseInfo/BaseFactoryService.cs @@ -1,9 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -28,7 +26,7 @@ namespace BLL (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && (string.IsNullOrEmpty(table.FactoryCode) || x.FactoryCode.Contains(table.FactoryCode)) && (string.IsNullOrEmpty(table.FactoryName) || x.FactoryName.Contains(table.FactoryName)) && - (string.IsNullOrEmpty(table.Address) || x.Address.Contains(table.Address)) + (string.IsNullOrEmpty(table.Address) || x.Address.Contains(table.Address)) select x ; @@ -36,8 +34,8 @@ namespace BLL } public static List GetBase_FactoryList() { - var q = (from x in Funs.DB.Base_Factory orderby x.FactoryCode select x).ToList(); - + var q = (from x in Funs.DB.Base_Factory orderby x.FactoryCode select x).ToList(); + return q; } @@ -73,10 +71,10 @@ namespace BLL { return Funs.DB.Base_Factory.FirstOrDefault(x => x.FactoryId == FactoryId); } - public static string GetBase_FactoryNameById(object FactoryId) + public static string GetBase_FactoryNameById(object FactoryId) { string name = string.Empty; - if (FactoryId!=null) + if (FactoryId != null) { var model = Funs.DB.Base_Factory.FirstOrDefault(x => x.FactoryId == FactoryId.ToString()); if (model != null) @@ -85,9 +83,9 @@ namespace BLL } } - return name; + return name; } - public static Model.Base_Factory GetBase_FactoryByCode(string FactoryCode) + public static Model.Base_Factory GetBase_FactoryByCode(string FactoryCode) { return Funs.DB.Base_Factory.FirstOrDefault(x => x.FactoryCode == FactoryCode); } @@ -101,7 +99,7 @@ namespace BLL FactoryCode = newtable.FactoryCode, FactoryName = newtable.FactoryName, Address = newtable.Address, - MapCoordinates= newtable.MapCoordinates, + MapCoordinates = newtable.MapCoordinates, }; Funs.DB.Base_Factory.InsertOnSubmit(table); Funs.DB.SubmitChanges(); diff --git a/SGGL/BLL/BaseInfo/CQMSTrainObjectService.cs b/SGGL/BLL/BaseInfo/CQMSTrainObjectService.cs index ab755b93..f0007bf9 100644 --- a/SGGL/BLL/BaseInfo/CQMSTrainObjectService.cs +++ b/SGGL/BLL/BaseInfo/CQMSTrainObjectService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { @@ -27,7 +24,7 @@ namespace BLL public static string GetTrainObjectNameById(string trainObjectId) { string name = string.Empty; - var o= Funs.DB.Base_CQMSTrainObject.FirstOrDefault(e => e.TrainObjectId == trainObjectId); + var o = Funs.DB.Base_CQMSTrainObject.FirstOrDefault(e => e.TrainObjectId == trainObjectId); if (o != null) { name = o.TrainObjectName; diff --git a/SGGL/BLL/BaseInfo/CertificateService.cs b/SGGL/BLL/BaseInfo/CertificateService.cs index e7d28b52..6519b38e 100644 --- a/SGGL/BLL/BaseInfo/CertificateService.cs +++ b/SGGL/BLL/BaseInfo/CertificateService.cs @@ -32,7 +32,7 @@ namespace BLL CertificateName = certificate.CertificateName, CertificateType = certificate.CertificateType, IsRegisterHSSE = certificate.IsRegisterHSSE, - Type= certificate.Type, + Type = certificate.Type, Remark = certificate.Remark }; db.Base_Certificate.InsertOnSubmit(newCertificate); diff --git a/SGGL/BLL/BaseInfo/CheckTemplateService.cs b/SGGL/BLL/BaseInfo/CheckTemplateService.cs index 9613a5b7..b4dde7f2 100644 --- a/SGGL/BLL/BaseInfo/CheckTemplateService.cs +++ b/SGGL/BLL/BaseInfo/CheckTemplateService.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/BaseInfo/CompanyModelKindService.cs b/SGGL/BLL/BaseInfo/CompanyModelKindService.cs index 27f9abc4..7b2b07ca 100644 --- a/SGGL/BLL/BaseInfo/CompanyModelKindService.cs +++ b/SGGL/BLL/BaseInfo/CompanyModelKindService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/BaseInfo/CompanyModelService.cs b/SGGL/BLL/BaseInfo/CompanyModelService.cs index 77195260..44d2a7f6 100644 --- a/SGGL/BLL/BaseInfo/CompanyModelService.cs +++ b/SGGL/BLL/BaseInfo/CompanyModelService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/BaseInfo/CostTypeService.cs b/SGGL/BLL/BaseInfo/CostTypeService.cs index 1f57548e..d7118f86 100644 --- a/SGGL/BLL/BaseInfo/CostTypeService.cs +++ b/SGGL/BLL/BaseInfo/CostTypeService.cs @@ -62,7 +62,7 @@ namespace BLL Model.SGGLDB db = Funs.DB; Model.Base_CostTypeItem newCostType = new Model.Base_CostTypeItem { - CostTypeItemId= costTypeItem.CostTypeItemId, + CostTypeItemId = costTypeItem.CostTypeItemId, CostTypeId = costTypeItem.CostTypeId, SortIndex = costTypeItem.SortIndex, CostTypeItemName = costTypeItem.CostTypeItemName, @@ -174,7 +174,7 @@ namespace BLL /// /// 下拉框名字 /// 是否显示请选择 - public static void InitCostTypeItemDropDownList(FineUIPro.DropDownList dropName,string costTypeId, bool isShowPlease) + public static void InitCostTypeItemDropDownList(FineUIPro.DropDownList dropName, string costTypeId, bool isShowPlease) { dropName.Items.Clear(); dropName.DataValueField = "CostTypeItemId"; diff --git a/SGGL/BLL/BaseInfo/MaterialTypeService.cs b/SGGL/BLL/BaseInfo/MaterialTypeService.cs index 9ad2cb82..ae81f988 100644 --- a/SGGL/BLL/BaseInfo/MaterialTypeService.cs +++ b/SGGL/BLL/BaseInfo/MaterialTypeService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class MaterialTypeService { - + /// /// 根据主键获取材料类型 diff --git a/SGGL/BLL/BaseInfo/NoticeAndSupervisionTypeService.cs b/SGGL/BLL/BaseInfo/NoticeAndSupervisionTypeService.cs index 4329bf73..07253b6f 100644 --- a/SGGL/BLL/BaseInfo/NoticeAndSupervisionTypeService.cs +++ b/SGGL/BLL/BaseInfo/NoticeAndSupervisionTypeService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class NoticeAndSupervisionTypeService { - + /// /// 根据主键获取告知和监检类型 diff --git a/SGGL/BLL/BaseInfo/PictureTypeService.cs b/SGGL/BLL/BaseInfo/PictureTypeService.cs index 046800af..a456d8a0 100644 --- a/SGGL/BLL/BaseInfo/PictureTypeService.cs +++ b/SGGL/BLL/BaseInfo/PictureTypeService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class PictureTypeService { - + /// /// 根据主键获取项目图片分类 diff --git a/SGGL/BLL/BaseInfo/PositionService.cs b/SGGL/BLL/BaseInfo/PositionService.cs index da5833b6..a85bad4a 100644 --- a/SGGL/BLL/BaseInfo/PositionService.cs +++ b/SGGL/BLL/BaseInfo/PositionService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class PositionService { - + /// /// 根据主键获取主键 @@ -20,10 +20,10 @@ namespace BLL return Funs.DB.Base_Position.FirstOrDefault(e => e.PositionId == positionId); } - public static string GetPositionNameById(string positionId) + public static string GetPositionNameById(string positionId) { - string name =string.Empty; - var getData= Funs.DB.Base_Position.FirstOrDefault(e => e.PositionId == positionId); + string name = string.Empty; + var getData = Funs.DB.Base_Position.FirstOrDefault(e => e.PositionId == positionId); if (getData != null) { name = getData.PositionName; diff --git a/SGGL/BLL/BaseInfo/PostTitleService.cs b/SGGL/BLL/BaseInfo/PostTitleService.cs index 1f829351..bfa43f49 100644 --- a/SGGL/BLL/BaseInfo/PostTitleService.cs +++ b/SGGL/BLL/BaseInfo/PostTitleService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class PostTitleService { - + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/PracticeCertificateService.cs b/SGGL/BLL/BaseInfo/PracticeCertificateService.cs index c56c8397..04eed0be 100644 --- a/SGGL/BLL/BaseInfo/PracticeCertificateService.cs +++ b/SGGL/BLL/BaseInfo/PracticeCertificateService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class PracticeCertificateService { - + /// /// 根据主键获取执业资格证书 diff --git a/SGGL/BLL/BaseInfo/ProjectTypeService.cs b/SGGL/BLL/BaseInfo/ProjectTypeService.cs index 7d574b9e..a0200a9b 100644 --- a/SGGL/BLL/BaseInfo/ProjectTypeService.cs +++ b/SGGL/BLL/BaseInfo/ProjectTypeService.cs @@ -8,7 +8,7 @@ namespace BLL public static class ProjectTypeService { - + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/PunishTypeService.cs b/SGGL/BLL/BaseInfo/PunishTypeService.cs index eafe9afb..176f4898 100644 --- a/SGGL/BLL/BaseInfo/PunishTypeService.cs +++ b/SGGL/BLL/BaseInfo/PunishTypeService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class PunishTypeService { - + /// /// 根据主键获取处罚定义 diff --git a/SGGL/BLL/BaseInfo/QualityQuestionTypeService.cs b/SGGL/BLL/BaseInfo/QualityQuestionTypeService.cs index 564395f1..e4eeb92a 100644 --- a/SGGL/BLL/BaseInfo/QualityQuestionTypeService.cs +++ b/SGGL/BLL/BaseInfo/QualityQuestionTypeService.cs @@ -6,7 +6,7 @@ namespace BLL { public class QualityQuestionTypeService { - + /// /// 获取实体集合 diff --git a/SGGL/BLL/BaseInfo/RewardTypeService.cs b/SGGL/BLL/BaseInfo/RewardTypeService.cs index b6eb4dcb..4e8246d9 100644 --- a/SGGL/BLL/BaseInfo/RewardTypeService.cs +++ b/SGGL/BLL/BaseInfo/RewardTypeService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class RewardTypeService { - + /// /// 根据主键获取奖励定义 diff --git a/SGGL/BLL/BaseInfo/RulesRegulationsTypeService.cs b/SGGL/BLL/BaseInfo/RulesRegulationsTypeService.cs index e4e6d42a..2e93d039 100644 --- a/SGGL/BLL/BaseInfo/RulesRegulationsTypeService.cs +++ b/SGGL/BLL/BaseInfo/RulesRegulationsTypeService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class RulesRegulationsTypeService { - + /// /// 根据主键获取规章制度类别 diff --git a/SGGL/BLL/BaseInfo/SafetyMeasuresService.cs b/SGGL/BLL/BaseInfo/SafetyMeasuresService.cs index 8d1321d7..5a1bbde9 100644 --- a/SGGL/BLL/BaseInfo/SafetyMeasuresService.cs +++ b/SGGL/BLL/BaseInfo/SafetyMeasuresService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class SafetyMeasuresService { - + /// /// 根据主键获取安全措施 diff --git a/SGGL/BLL/BaseInfo/SolutionTempleteTypeService.cs b/SGGL/BLL/BaseInfo/SolutionTempleteTypeService.cs index 41497afd..c630439a 100644 --- a/SGGL/BLL/BaseInfo/SolutionTempleteTypeService.cs +++ b/SGGL/BLL/BaseInfo/SolutionTempleteTypeService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/BaseInfo/SpecialEquipmentService.cs b/SGGL/BLL/BaseInfo/SpecialEquipmentService.cs index 560d5dde..c62b6117 100644 --- a/SGGL/BLL/BaseInfo/SpecialEquipmentService.cs +++ b/SGGL/BLL/BaseInfo/SpecialEquipmentService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class SpecialEquipmentService { - + /// /// 根据主键获取机具设备 @@ -29,7 +29,7 @@ namespace BLL public static string GetSpecialEquipmentNameById(string specialEquipmentId) { string name = string.Empty; - var q= Funs.DB.Base_SpecialEquipment.FirstOrDefault(e => e.SpecialEquipmentId == specialEquipmentId); + var q = Funs.DB.Base_SpecialEquipment.FirstOrDefault(e => e.SpecialEquipmentId == specialEquipmentId); if (q != null) { name = q.SpecialEquipmentName; diff --git a/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs b/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs index e695fae2..18f4dd79 100644 --- a/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs +++ b/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class SpecialSchemeTypeService { - + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/SuperviseCheckTypeService.cs b/SGGL/BLL/BaseInfo/SuperviseCheckTypeService.cs index 2fd0e9f0..364c4e93 100644 --- a/SGGL/BLL/BaseInfo/SuperviseCheckTypeService.cs +++ b/SGGL/BLL/BaseInfo/SuperviseCheckTypeService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/BaseInfo/TrainLevelService.cs b/SGGL/BLL/BaseInfo/TrainLevelService.cs index 49e2f92c..420ea802 100644 --- a/SGGL/BLL/BaseInfo/TrainLevelService.cs +++ b/SGGL/BLL/BaseInfo/TrainLevelService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class TrainLevelService { - + /// /// 根据主键获取主键 diff --git a/SGGL/BLL/BaseInfo/TrainTypeService.cs b/SGGL/BLL/BaseInfo/TrainTypeService.cs index 2bb05af2..4efd5631 100644 --- a/SGGL/BLL/BaseInfo/TrainTypeService.cs +++ b/SGGL/BLL/BaseInfo/TrainTypeService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class TrainTypeService { - + /// /// 根据主键获取培训类型 @@ -35,7 +35,7 @@ namespace BLL Remark = trainType.Remark, IsAboutSendCard = trainType.IsAboutSendCard, IsRepeat = trainType.IsRepeat, - TrainType=trainType.TrainType, + TrainType = trainType.TrainType, }; db.Base_TrainType.InsertOnSubmit(newTrainType); db.SubmitChanges(); diff --git a/SGGL/BLL/BaseInfo/UnitTypeService.cs b/SGGL/BLL/BaseInfo/UnitTypeService.cs index 8e9c09d3..04ea840f 100644 --- a/SGGL/BLL/BaseInfo/UnitTypeService.cs +++ b/SGGL/BLL/BaseInfo/UnitTypeService.cs @@ -6,7 +6,7 @@ namespace BLL public static class UnitTypeService { - + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/BaseInfo/WorkPostService.cs b/SGGL/BLL/BaseInfo/WorkPostService.cs index a5463683..a4021730 100644 --- a/SGGL/BLL/BaseInfo/WorkPostService.cs +++ b/SGGL/BLL/BaseInfo/WorkPostService.cs @@ -6,7 +6,7 @@ namespace BLL { public static class WorkPostService { - + /// /// 根据主键获取信息 @@ -31,7 +31,7 @@ namespace BLL WorkPostCode = workPost.WorkPostCode, WorkPostName = workPost.WorkPostName, PostType = workPost.PostType, - IsCQMS=workPost.IsCQMS, + IsCQMS = workPost.IsCQMS, IsHsse = workPost.IsHsse, CNCodes = workPost.CNCodes, Remark = workPost.Remark diff --git a/SGGL/BLL/BaseInfo/WorkStageService.cs b/SGGL/BLL/BaseInfo/WorkStageService.cs index 2f007cd4..4fa775c8 100644 --- a/SGGL/BLL/BaseInfo/WorkStageService.cs +++ b/SGGL/BLL/BaseInfo/WorkStageService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs b/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs index 1788a627..b3c4aa53 100644 --- a/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs +++ b/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs @@ -1,78 +1,73 @@  using Model; using System; -using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using System.Windows.Media.Animation; -namespace BLL +namespace BLL { public class TwArrivalStatisticsService { - public static List GetStatistics(string projectid,string materialCode,string WarehouseCode) + public static List GetStatistics(string projectid, string materialCode, string WarehouseCode) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - string PipeArea= WarehouseCode == "工厂预制"?"1":"2"; + string PipeArea = WarehouseCode == "工厂预制" ? "1" : "2"; ///所需材料数量列表 var NeedOutMateriaList = from x in db.HJGL_PipeLineMat - join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode - join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId - where z.ProjectId == projectid && (string.IsNullOrEmpty(materialCode) || x.MaterialCode .Contains( materialCode)) && z.PipeArea== PipeArea + join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode + join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId + where z.ProjectId == projectid && (string.IsNullOrEmpty(materialCode) || x.MaterialCode.Contains(materialCode)) && z.PipeArea == PipeArea group x by x.MaterialCode into g - select new - { - g.Key, - NeedNum = g.Sum(x => x.Number) ?? 0, - }; + select new + { + g.Key, + NeedNum = g.Sum(x => x.Number) ?? 0, + }; ///实际材料入库数量列表 var RealInMateriaList = from x in db.Tw_InputDetail join master in db.Tw_InputMaster on x.InputMasterId equals master.Id - join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode - where master.ProjectId== projectid && master.WarehouseCode== WarehouseCode + join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode + where master.ProjectId == projectid && master.WarehouseCode == WarehouseCode group x by x.MaterialCode into g - where (string.IsNullOrEmpty(materialCode) || g.Key.Contains( materialCode)) + where (string.IsNullOrEmpty(materialCode) || g.Key.Contains(materialCode)) select new { g.Key, RealNum = g.Sum(x => x.ActNum) ?? 0, }; //库存数量 - var tw_MaterialStock=from x in db.Tw_MaterialStock - where x.WarehouseCode==WarehouseCode && x.ProjectId== projectid - select x; + var tw_MaterialStock = from x in db.Tw_MaterialStock + where x.WarehouseCode == WarehouseCode && x.ProjectId == projectid + select x; - var StatisticsList =(from x in NeedOutMateriaList - join y in RealInMateriaList on x.Key equals y.Key into gg - from y in gg.DefaultIfEmpty() - join z in db.HJGL_MaterialCodeLib on x.Key equals z.MaterialCode into zz - from z in zz.DefaultIfEmpty() - join m in tw_MaterialStock on x.Key equals m.PipeLineMatCode into mm - from m in mm.DefaultIfEmpty() - select new Tw_ArrivalStatisticsOutPut - { - MaterialCode = x.Key, - StockNum = m==null?0: (decimal)m.StockNum, - NeedNum = x.NeedNum, - RealNum = y==null?0:y.RealNum, - MaterialName = z.MaterialName, - MaterialSpec=z.MaterialSpec, - MaterialUnit=z.MaterialUnit, - MaterialDef = z.MaterialDef, - MatchRate = (x.NeedNum == 0 ?0:Math.Round((y == null ? 0 : y.RealNum) / x.NeedNum, 4,MidpointRounding.ToEven)), - }).ToList(); + var StatisticsList = (from x in NeedOutMateriaList + join y in RealInMateriaList on x.Key equals y.Key into gg + from y in gg.DefaultIfEmpty() + join z in db.HJGL_MaterialCodeLib on x.Key equals z.MaterialCode into zz + from z in zz.DefaultIfEmpty() + join m in tw_MaterialStock on x.Key equals m.PipeLineMatCode into mm + from m in mm.DefaultIfEmpty() + select new Tw_ArrivalStatisticsOutPut + { + MaterialCode = x.Key, + StockNum = m == null ? 0 : (decimal)m.StockNum, + NeedNum = x.NeedNum, + RealNum = y == null ? 0 : y.RealNum, + MaterialName = z.MaterialName, + MaterialSpec = z.MaterialSpec, + MaterialUnit = z.MaterialUnit, + MaterialDef = z.MaterialDef, + MatchRate = (x.NeedNum == 0 ? 0 : Math.Round((y == null ? 0 : y.RealNum) / x.NeedNum, 4, MidpointRounding.ToEven)), + }).ToList(); foreach (var item in StatisticsList) { - item.MatchRateString = Math.Round(item.MatchRate*100, 2).ToString()+"%" ; - } - return StatisticsList ; + item.MatchRateString = Math.Round(item.MatchRate * 100, 2).ToString() + "%"; + } + return StatisticsList; } } @@ -83,8 +78,8 @@ namespace BLL /// /// /// - public static List GetMatMatchOutput(List requiredMaterials ,string warehouseCode ,string projectId) - { + public static List GetMatMatchOutput(List requiredMaterials, string warehouseCode, string projectId) + { Tw_MaterialStockOutput twMaterialStockOutput = new Tw_MaterialStockOutput { WarehouseCode = warehouseCode, @@ -113,11 +108,11 @@ namespace BLL if (stock != null) { stock.StockNum -= material.MatchNum; - } + } } - + var results = requiredMaterials; - return results; + return results; } /// /// 获取管线匹配率 @@ -127,7 +122,7 @@ namespace BLL public static decimal? GetPipeMatch(string pipelineId) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { + { var twPipeMatMatchOutputs = new List(); var pipelineModel = PipelineService.GetPipelineByPipelineId(pipelineId); string warehouseCode = PipelineService @@ -138,7 +133,7 @@ namespace BLL join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId join m in db.WBS_UnitWork on z.UnitWorkId equals m.UnitWorkId - where z.PipelineId== pipelineId && x.PrefabricatedComponents != "" //x.PrefabricatedComponents!="" 用于筛选非散件材料 + where z.PipelineId == pipelineId && x.PrefabricatedComponents != "" //x.PrefabricatedComponents!="" 用于筛选非散件材料 select new Tw_PipeMatMatchOutput { Id = Guid.NewGuid().ToString(), @@ -154,10 +149,10 @@ namespace BLL MaterialDef = y.MaterialDef, NeedNum = x.Number, } - ).ToList(); - - twPipeMatMatchOutputs = GetMatMatchOutput(requiredMaterials, warehouseCode, pipelineModel.ProjectId); - var result = twPipeMatMatchOutputs.Count==0?0: twPipeMatMatchOutputs.Sum(x=>x.MatchRate)/ twPipeMatMatchOutputs.Count; + ).ToList(); + + twPipeMatMatchOutputs = GetMatMatchOutput(requiredMaterials, warehouseCode, pipelineModel.ProjectId); + var result = twPipeMatMatchOutputs.Count == 0 ? 0 : twPipeMatMatchOutputs.Sum(x => x.MatchRate) / twPipeMatMatchOutputs.Count; return result; } } @@ -170,29 +165,29 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var results = new List(); - string [] taskPipeLineList= null; + var results = new List(); + string[] taskPipeLineList = null; var inoutPlanMasterl = db.Tw_InOutPlanMaster.FirstOrDefault(x => x.Id == outPlanMasterId); - if (inoutPlanMasterl!=null) + if (inoutPlanMasterl != null) { - if (inoutPlanMasterl.WeldTaskId.Split('|').Length==4) - { - taskPipeLineList = Funs.DB.View_HJGL_WeldingTask.Where(e => - e.UnitWorkId == inoutPlanMasterl.WeldTaskId.Split('|')[0].ToString() - && e.UnitId == inoutPlanMasterl.WeldTaskId.Split('|')[1].ToString() - && e.TaskDate.Value.Date == DateTime - .ParseExact(inoutPlanMasterl.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date - && e.SerialNumber == inoutPlanMasterl.WeldTaskId.Split('|')[3].ToString() - ).Distinct().OrderBy(x => x.PipeLineSortIndex).Select(x => x.PipelineId).ToArray(); + if (inoutPlanMasterl.WeldTaskId.Split('|').Length == 4) + { + taskPipeLineList = Funs.DB.View_HJGL_WeldingTask.Where(e => + e.UnitWorkId == inoutPlanMasterl.WeldTaskId.Split('|')[0].ToString() + && e.UnitId == inoutPlanMasterl.WeldTaskId.Split('|')[1].ToString() + && e.TaskDate.Value.Date == DateTime + .ParseExact(inoutPlanMasterl.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date + && e.SerialNumber == inoutPlanMasterl.WeldTaskId.Split('|')[3].ToString() + ).Distinct().OrderBy(x => x.PipeLineSortIndex).Select(x => x.PipelineId).ToArray(); } } // 获取所需材料列表 var requiredMaterials = (from x in db.Tw_InOutPlanDetail_Relation join master in db.Tw_InOutPlanMaster on x.InOutPlanMasterId equals master.Id join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode - join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId - where x.InOutPlanMasterId == outPlanMasterId + join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId + where x.InOutPlanMasterId == outPlanMasterId select new Tw_PipeMatMatchOutput { Id = Guid.NewGuid().ToString(), @@ -213,7 +208,7 @@ namespace BLL } - var masterModle = db.Tw_InOutPlanMaster.FirstOrDefault(x => x.Id == outPlanMasterId); + var masterModle = db.Tw_InOutPlanMaster.FirstOrDefault(x => x.Id == outPlanMasterId); results = GetMatMatchOutput(requiredMaterials, masterModle.WarehouseCode, masterModle.ProjectId); return results; } @@ -259,7 +254,7 @@ namespace BLL foreach (string id in pipelineIds) { newRequiredMaterials.AddRange(requiredMaterials.Where(x => x.PipelineId == id)); - } + } results = GetMatMatchOutput(newRequiredMaterials, warehouseCode, projectId); return results; } diff --git a/SGGL/BLL/CLGL/TwInOutplandetailRelationService.cs b/SGGL/BLL/CLGL/TwInOutplandetailRelationService.cs index 485ef651..f8f618b1 100644 --- a/SGGL/BLL/CLGL/TwInOutplandetailRelationService.cs +++ b/SGGL/BLL/CLGL/TwInOutplandetailRelationService.cs @@ -4,8 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; namespace BLL @@ -33,7 +31,7 @@ namespace BLL (string.IsNullOrEmpty(table.PipelineId) || x.PipelineId.Contains(table.PipelineId)) && (string.IsNullOrEmpty(table.InOutPlanMasterId) || x.InOutPlanMasterId.Contains(table.InOutPlanMasterId)) && (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode)) && - (string.IsNullOrEmpty(table.PrefabricatedComponents) || x.PrefabricatedComponents.Contains(table.PrefabricatedComponents)) + (string.IsNullOrEmpty(table.PrefabricatedComponents) || x.PrefabricatedComponents.Contains(table.PrefabricatedComponents)) select x ; @@ -58,7 +56,7 @@ namespace BLL // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId - join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm + join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm from mat in mm.DefaultIfEmpty() orderby x.PipelineId, x.PrefabricatedComponents select new @@ -70,7 +68,7 @@ namespace BLL x.MaterialCode, x.PrefabricatedComponents, x.Number, - mat.MaterialName, + mat.MaterialName, mat.MaterialDef }; } @@ -81,14 +79,14 @@ namespace BLL return Funs.DB.Tw_InOutPlanDetail_Relation.FirstOrDefault(x => x.Id == Id); } - public static Model.Tw_InOutPlanDetail_Relation GetByPipelineId(string pipelineId,string WarehouseCode) + public static Model.Tw_InOutPlanDetail_Relation GetByPipelineId(string pipelineId, string WarehouseCode) { int typeInt = (int)TwConst.TypeInt.散件出库; - var q= from x in Funs.DB.Tw_InOutPlanDetail_Relation - join y in Funs.DB .Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id - where x.PipelineId == pipelineId && y.WarehouseCode == WarehouseCode && y.TypeInt!= typeInt - select x; - return q.FirstOrDefault(); + var q = from x in Funs.DB.Tw_InOutPlanDetail_Relation + join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id + where x.PipelineId == pipelineId && y.WarehouseCode == WarehouseCode && y.TypeInt != typeInt + select x; + return q.FirstOrDefault(); } public static void Add(Model.Tw_InOutPlanDetail_Relation newtable) { @@ -156,14 +154,14 @@ namespace BLL Funs.DB.SubmitChanges(); } } - + public static void InsertByPipeLineMat(string inOutPlanMasterId, List tw_PipeLineMats) { - var master =TwInOutplanmasterService.GetById(inOutPlanMasterId); + var master = TwInOutplanmasterService.GetById(inOutPlanMasterId); if (master == null) { return; - } + } var outMateriaList = from x in tw_PipeLineMats group x by new { x.MaterialCode, x.MaterialUnit } into g @@ -183,7 +181,7 @@ namespace BLL outMateriaList.Where(x => x.MaterialName.Contains("个"));//管件 break; } - + foreach (var item in outMateriaList) { Model.Tw_InOutPlanDetail detail = new Model.Tw_InOutPlanDetail @@ -206,27 +204,27 @@ namespace BLL } - + public static IEnumerable GetPrintListByOutputMasterIds(List outputMasterIds) { var q = from x in Funs.DB.Tw_InOutPlanDetail_Relation join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode - join plan in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals plan.Id + join plan in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals plan.Id join master in Funs.DB.Tw_OutputMaster on plan.Id equals master.InOutPlanMasterId join pipe in Funs.DB.HJGL_Pipeline on x.PipelineId equals pipe.PipelineId where outputMasterIds.Contains(master.Id) - orderby master.CusBillCode - select new - { - 出库单编号 = master.CusBillCode, - 管线号=pipe.PipelineCode, - 预制组件号= x.PrefabricatedComponents, - 材料编码 = x.MaterialCode, - 材料名称 = y.MaterialName, - 材料描述 = y.MaterialDef, - 单位=y.MaterialUnit, - 所需量 = x.Number, - }; + orderby master.CusBillCode + select new + { + 出库单编号 = master.CusBillCode, + 管线号 = pipe.PipelineCode, + 预制组件号 = x.PrefabricatedComponents, + 材料编码 = x.MaterialCode, + 材料名称 = y.MaterialName, + 材料描述 = y.MaterialDef, + 单位 = y.MaterialUnit, + 所需量 = x.Number, + }; return q; } } diff --git a/SGGL/BLL/CLGL/TwInOutplandetailService.cs b/SGGL/BLL/CLGL/TwInOutplandetailService.cs index 5d419c90..51f195bd 100644 --- a/SGGL/BLL/CLGL/TwInOutplandetailService.cs +++ b/SGGL/BLL/CLGL/TwInOutplandetailService.cs @@ -3,7 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -11,7 +10,7 @@ namespace BLL public static class TwInOutplandetailService { - + #region 获取列表 /// /// 记录数 @@ -30,14 +29,14 @@ namespace BLL from mat in mm.DefaultIfEmpty() join master in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals master.Id into masters from master in masters.DefaultIfEmpty() - join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseCode,master.ProjectId } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseCode, stock .ProjectId} into st + join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseCode, master.ProjectId } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseCode, stock.ProjectId } into st from stock in st.DefaultIfEmpty() where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.InOutPlanMasterId) || x.InOutPlanMasterId.Contains(table.InOutPlanMasterId)) && (string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) && - (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode)) - orderby x.SortIndex + (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode)) + orderby x.SortIndex select new Model.Tw_InOutDetailOutput { Id = x.Id, @@ -48,9 +47,9 @@ namespace BLL ActNum = x.ActNum, PipelineComponentCode = y.PipelineComponentCode, MaterialName = mat.MaterialName, - MaterialDef= mat.MaterialDef, + MaterialDef = mat.MaterialDef, StockNum = stock.StockNum ?? 0, - } + } ; return q; @@ -73,7 +72,7 @@ namespace BLL q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q - select x; + select x; } #endregion @@ -100,7 +99,7 @@ namespace BLL Funs.DB.Tw_InOutPlanDetail.InsertOnSubmit(table); Funs.DB.SubmitChanges(); } - + /// /// 批量添加计划明细 /// @@ -111,8 +110,8 @@ namespace BLL int sortIndex = 1; foreach (var item in list) { - item.Id= SQLHelper.GetNewID(); - item.SortIndex= sortIndex; + item.Id = SQLHelper.GetNewID(); + item.SortIndex = sortIndex; item.InOutPlanMasterId = inoutPlanMasterId; Add(item); sortIndex++; @@ -130,7 +129,7 @@ namespace BLL table.MaterialCode = newtable.MaterialCode; table.PlanNum = newtable.PlanNum; table.ActNum = newtable.ActNum; - table.SortIndex= newtable.SortIndex; + table.SortIndex = newtable.SortIndex; Funs.DB.SubmitChanges(); } @@ -146,7 +145,7 @@ namespace BLL } } - public static void DeleteByInOutPlanMasterId (string inoutPlanMasterId) + public static void DeleteByInOutPlanMasterId(string inoutPlanMasterId) { var list = Funs.DB.Tw_InOutPlanDetail.Where(x => x.InOutPlanMasterId == inoutPlanMasterId); if (list != null) diff --git a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs index b66eb84e..50a2f7df 100644 --- a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs +++ b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs @@ -1,16 +1,11 @@ using EmitMapper; using FineUIPro; -using Microsoft.Office.Interop.Word; using MiniExcelLibs; using Model; -using NPOI.Util; using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Numerics; -using System.Text; -using System.Web.UI.WebControls; namespace BLL @@ -33,7 +28,7 @@ namespace BLL var q = from x in Funs.DB.Tw_InOutPlanMaster join y in Funs.DB.HJGL_WeldTask on x.WeldTaskId equals y.WeldTaskId into yy from y in yy.DefaultIfEmpty() - join person in Funs.DB.Person_Persons on x.CreateMan equals person.PersonId into persons + join person in Funs.DB.Person_Persons on x.CreateMan equals person.PersonId into persons from person in persons.DefaultIfEmpty() join auditperson in Funs.DB.Person_Persons on x.AuditMan equals auditperson.PersonId into auditpersons from auditperson in auditpersons.DefaultIfEmpty() @@ -42,22 +37,22 @@ namespace BLL join warehouseperson in Funs.DB.Person_Persons on x.WarehouseMan equals warehouseperson.PersonId into warehousepersons from warehouseperson in warehousepersons.DefaultIfEmpty() join unit in Funs.DB.Base_Unit on x.ReqUnitId equals unit.UnitId into units - from unit in units.DefaultIfEmpty() - orderby x.CreateDate descending + from unit in units.DefaultIfEmpty() + orderby x.CreateDate descending where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && (string.IsNullOrEmpty(table.CusBillCode) || x.CusBillCode.Contains(table.CusBillCode)) && (string.IsNullOrEmpty(table.WarehouseCode) || x.WarehouseCode.Contains(table.WarehouseCode)) && (string.IsNullOrEmpty(table.CreateMan) || x.CreateMan.Contains(table.CreateMan)) && - (string.IsNullOrEmpty(table.OutputMasterId) || x.OutputMasterId.Contains(table.OutputMasterId)) && + (string.IsNullOrEmpty(table.OutputMasterId) || x.OutputMasterId.Contains(table.OutputMasterId)) && (string.IsNullOrEmpty(table.ReqUnitId) || x.ReqUnitId.Contains(table.ReqUnitId)) && - (string.IsNullOrEmpty(table.UnitWorkId) || x.WeldTaskId.Contains(table.UnitWorkId))&& - (string.IsNullOrEmpty(table.WeldTaskId) || x.WeldTaskId.Contains(table.WeldTaskId))&& + (string.IsNullOrEmpty(table.UnitWorkId) || x.WeldTaskId.Contains(table.UnitWorkId)) && + (string.IsNullOrEmpty(table.WeldTaskId) || x.WeldTaskId.Contains(table.WeldTaskId)) && (table.InOutType == null || x.InOutType == table.InOutType) && (table.TypeInt == null || x.TypeInt == table.TypeInt) && (table.Category == null || x.Category == table.Category) && - (table.State == null || x.State == table.State) + (table.State == null || x.State == table.State) select new Model.Tw_InOutMasterOutput { Id = x.Id, @@ -76,7 +71,7 @@ namespace BLL WeldTaskId = x.WeldTaskId, ReqUnitId = x.ReqUnitId, ReqUnitName = unit.UnitName, - UnitWorkId = y.UnitWorkId, + UnitWorkId = y.UnitWorkId, WeldTaskCode = y.TaskCode, AuditMan = x.AuditMan, AuditManName = auditperson.PersonName, @@ -87,8 +82,8 @@ namespace BLL AuditDate2 = x.AuditDate2, WarehouseMan = x.WarehouseMan, WarehouseDate = x.WarehouseDate, - WarehouseManName= warehouseperson.PersonName, - PipeLineSortIndex=y.PipeLineSortIndex + WarehouseManName = warehouseperson.PersonName, + PipeLineSortIndex = y.PipeLineSortIndex } ; @@ -115,41 +110,41 @@ namespace BLL var result = q.ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return (from x in result - select new Model.Tw_InOutMasterOutput - { - Id = x.Id, - ProjectId = x.ProjectId, - CusBillCode = x.CusBillCode, - WarehouseCode = x.WarehouseCode, - Source = x.Source, - InOutType = x.InOutType, - TypeInt = x.TypeInt, - Category = x.Category, - State = x.State, - CreateMan = x.CreateMan, - CreateManName = x.CreateManName, - CreateDate = x.CreateDate, - OutputMasterId = x.OutputMasterId, - WeldTaskId = x.WeldTaskId, - ReqUnitId = x.ReqUnitId, - ReqUnitName = x.ReqUnitName, - UnitWorkId = x.UnitWorkId, - WeldTaskCode = x.WeldTaskId != null ? x.WeldTaskId.Contains('|') ? Funs.DB.HJGL_WeldTask.FirstOrDefault(e => e.UnitWorkId == x.WeldTaskId.Split('|')[0].ToString() && e.UnitId == x.WeldTaskId.Split('|')[1].ToString() && e.TaskDate.Value.Date == DateTime.ParseExact(x.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date)?.TaskCode : "" : "", - CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, - TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, - StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, - AuditMan = x.AuditMan, - AuditManName = x.AuditManName, - AuditDate = x.AuditDate, - Remark = x.Remark, - AuditMan2=x.AuditMan2, - AuditManName2 = x.AuditManName2, - AuditDate2 = x.AuditDate2, - WarehouseMan = x.WarehouseMan, - WarehouseDate = x.WarehouseDate, - WarehouseManName= x.WarehouseManName, - PipeLineSortIndex = x.PipeLineSortIndex, - }).ToList(); + select new Model.Tw_InOutMasterOutput + { + Id = x.Id, + ProjectId = x.ProjectId, + CusBillCode = x.CusBillCode, + WarehouseCode = x.WarehouseCode, + Source = x.Source, + InOutType = x.InOutType, + TypeInt = x.TypeInt, + Category = x.Category, + State = x.State, + CreateMan = x.CreateMan, + CreateManName = x.CreateManName, + CreateDate = x.CreateDate, + OutputMasterId = x.OutputMasterId, + WeldTaskId = x.WeldTaskId, + ReqUnitId = x.ReqUnitId, + ReqUnitName = x.ReqUnitName, + UnitWorkId = x.UnitWorkId, + WeldTaskCode = x.WeldTaskId != null ? x.WeldTaskId.Contains('|') ? Funs.DB.HJGL_WeldTask.FirstOrDefault(e => e.UnitWorkId == x.WeldTaskId.Split('|')[0].ToString() && e.UnitId == x.WeldTaskId.Split('|')[1].ToString() && e.TaskDate.Value.Date == DateTime.ParseExact(x.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date)?.TaskCode : "" : "", + CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, + TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, + StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, + AuditMan = x.AuditMan, + AuditManName = x.AuditManName, + AuditDate = x.AuditDate, + Remark = x.Remark, + AuditMan2 = x.AuditMan2, + AuditManName2 = x.AuditManName2, + AuditDate2 = x.AuditDate2, + WarehouseMan = x.WarehouseMan, + WarehouseDate = x.WarehouseDate, + WarehouseManName = x.WarehouseManName, + PipeLineSortIndex = x.PipeLineSortIndex, + }).ToList(); } public static IEnumerable GetListData(Model.Tw_InOutMasterOutput table, Grid grid1) @@ -194,38 +189,38 @@ namespace BLL Remark = x.Remark, AuditMan2 = x.AuditMan2, AuditManName2 = x.AuditManName2, - AuditDate2 = x.AuditDate2, + AuditDate2 = x.AuditDate2, WarehouseMan = x.WarehouseMan, - WarehouseDate = x.WarehouseDate, - WarehouseManName= x.WarehouseManName + WarehouseDate = x.WarehouseDate, + WarehouseManName = x.WarehouseManName }; } - public static string GetWeldTaskCode( string WeldTaskId) + public static string GetWeldTaskCode(string WeldTaskId) { - string result=String.Empty; + string result = String.Empty; if (string.IsNullOrEmpty(WeldTaskId)) return result; - if (WeldTaskId.Split('|').Length==3) //用于处理历史数据 - { + if (WeldTaskId.Split('|').Length == 3) //用于处理历史数据 + { result = (from x in Funs.DB.HJGL_WeldTask - where x.UnitWorkId == WeldTaskId.Split('|')[0].ToString() - && x.UnitId == WeldTaskId.Split('|')[1].ToString() - && x.TaskDate.Value.Date == - DateTime.ParseExact(WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null) - select x.TaskCode).FirstOrDefault() + where x.UnitWorkId == WeldTaskId.Split('|')[0].ToString() + && x.UnitId == WeldTaskId.Split('|')[1].ToString() + && x.TaskDate.Value.Date == + DateTime.ParseExact(WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null) + select x.TaskCode).FirstOrDefault() ?.ToString(); } else if (WeldTaskId.Split('|').Length == 4) { result = (from x in Funs.DB.HJGL_WeldTask - where x.UnitWorkId == WeldTaskId.Split('|')[0].ToString() - && x.UnitId == WeldTaskId.Split('|')[1].ToString() - && x.TaskDate.Value.Date == - DateTime.ParseExact(WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null) - && x.SerialNumber== WeldTaskId.Split('|')[3] + where x.UnitWorkId == WeldTaskId.Split('|')[0].ToString() + && x.UnitId == WeldTaskId.Split('|')[1].ToString() + && x.TaskDate.Value.Date == + DateTime.ParseExact(WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null) + && x.SerialNumber == WeldTaskId.Split('|')[3] select x.TaskCode).FirstOrDefault() ?.ToString(); } @@ -243,7 +238,7 @@ namespace BLL /// /// /// - public static ResponeData ImportData(string OriFileName,string path, string projectid, string creatUserId) + public static ResponeData ImportData(string OriFileName, string path, string projectid, string creatUserId) { var responeData = new ResponeData(); List temeplateDtoIns; @@ -269,9 +264,9 @@ namespace BLL string errorWarehouseCode = ""; foreach (var item in warehouseCodeList) { - if (!DropListService.HJGL_WarehouseCode().Select(x=>x.Value== item).Any()) + if (!DropListService.HJGL_WarehouseCode().Select(x => x.Value == item).Any()) { - errorWarehouseCode+=item+","; + errorWarehouseCode += item + ","; } } @@ -280,15 +275,15 @@ namespace BLL if (temeplateDtoIns.Count == 0) { responeData.code = 0; - responeData.message = errorWarehouseCode+"仓库不存在!"; + responeData.message = errorWarehouseCode + "仓库不存在!"; return responeData; } } var typeString = temeplateDtoIns.Select(x => x.TypeString).Distinct().ToList(); //获取导入文件的类型 - if (typeString.Where(x=>string.IsNullOrEmpty(x)).Count()>0) + if (typeString.Where(x => string.IsNullOrEmpty(x)).Count() > 0) { responeData.code = 0; - responeData.message ="导入数据中类型列不能为空!"; + responeData.message = "导入数据中类型列不能为空!"; return responeData; } if (typeString.Contains("采购入库") && typeString.Contains("其他入库")) @@ -300,10 +295,10 @@ namespace BLL var materialCodeList = temeplateDtoIns.Select(x => x.MaterialCode).Distinct().ToList(); //获取导入文件的材料编码 - var IsExitMaterialCode= - from x in Funs.DB.HJGL_MaterialCodeLib - where materialCodeList.Contains(x.MaterialCode) - select x.MaterialCode; + var IsExitMaterialCode = + from x in Funs.DB.HJGL_MaterialCodeLib + where materialCodeList.Contains(x.MaterialCode) + select x.MaterialCode; if (IsExitMaterialCode.Count() < materialCodeList.Count) { var errorMaterialCode = materialCodeList.Except(IsExitMaterialCode.ToList()); @@ -314,7 +309,7 @@ namespace BLL return responeData; } } - string cusbilcode = GetDataInCusBillCode(projectid,UnitService.GetUnitCodeByUnitId(Person_PersonsService.GetPerson_PersonsById(creatUserId).UnitId), temeplateDtoIns.FirstOrDefault().TypeString); + string cusbilcode = GetDataInCusBillCode(projectid, UnitService.GetUnitCodeByUnitId(Person_PersonsService.GetPerson_PersonsById(creatUserId).UnitId), temeplateDtoIns.FirstOrDefault().TypeString); foreach (var item in temeplateDtoIns) { item.CusBillCode = cusbilcode; @@ -348,7 +343,7 @@ namespace BLL var twInOutPlanDetails = mapperDetail.Map(CusBillCodeDtoIns.Where(x => !string.IsNullOrEmpty(x.MaterialCode) && !string.IsNullOrEmpty(x.PlanNum)).ToList()); twInOutPlanMaster.Id = SQLHelper.GetNewID(); - twInOutPlanMaster.InOutType= (int)TwConst.InOutType.入库; + twInOutPlanMaster.InOutType = (int)TwConst.InOutType.入库; twInOutPlanMaster.State = (int)TwConst.State.待审核; if ("采购入库".Equals(FirstCusBillCodeDtoIns.TypeString)) @@ -365,12 +360,12 @@ namespace BLL twInOutPlanMaster.TypeInt = (int)TwConst.TypeInt.其他入库; } - twInOutPlanMaster.Category= (int)TwConst.Category.全部; + twInOutPlanMaster.Category = (int)TwConst.Category.全部; twInOutPlanMaster.ProjectId = projectid; twInOutPlanMaster.CreateMan = creatUserId; twInOutPlanMaster.CreateDate = DateTime.Now; twInOutPlanMaster.Remark = OriFileName; - Add(twInOutPlanMaster); + Add(twInOutPlanMaster); TwInOutplandetailService.AddList(twInOutPlanDetails, twInOutPlanMaster.Id); //插入入库明细 } @@ -404,8 +399,8 @@ namespace BLL AuditMan = newtable.AuditMan, AuditDate = newtable.AuditDate, Remark = newtable.Remark, - AuditMan2=newtable.AuditMan2, - AuditDate2=newtable.AuditDate2, + AuditMan2 = newtable.AuditMan2, + AuditDate2 = newtable.AuditDate2, WarehouseMan = newtable.WarehouseMan, WarehouseDate = newtable.WarehouseDate, }; @@ -464,16 +459,16 @@ namespace BLL /// /// /// - public static string GenPlanMasterByOutputMasterId(string outputMasterId,TwConst.TypeInt typeInt) + public static string GenPlanMasterByOutputMasterId(string outputMasterId, TwConst.TypeInt typeInt) { string message = ""; #region 数据校验 - + //获取出库单 var outMasterQuery = new Tw_InOutMasterOutput(); outMasterQuery.Id = outputMasterId; - var outMaster = TwOutputmasterService.GetListData(outMasterQuery) .FirstOrDefault() ; + var outMaster = TwOutputmasterService.GetListData(outMasterQuery).FirstOrDefault(); if (outMaster == null || outMaster.State != (int)TwConst.State.已完成) { message = "出库单状态错误,无法生成计划单!"; @@ -482,7 +477,7 @@ namespace BLL //判断是否已经生成过计划单 var queryIsExitInMaster = new Tw_InOutMasterOutput(); queryIsExitInMaster.OutputMasterId = outMaster.Id; - queryIsExitInMaster.TypeInt= (int)typeInt; + queryIsExitInMaster.TypeInt = (int)typeInt; var IsExitInMaster = GetModle(queryIsExitInMaster).FirstOrDefault(); if (IsExitInMaster != null) { @@ -497,11 +492,11 @@ namespace BLL { case TwConst.TypeInt.补料出库: details = details.Where(x => x.PlanNum > x.ActNum).ToList(); - foreach (var item in details) + foreach (var item in details) { item.PlanNum = (item.PlanNum - item.ActNum); } - if (details.Count==0) + if (details.Count == 0) { message = "该出库单无需补料"; return message; @@ -519,14 +514,14 @@ namespace BLL return message; } break; - } + } #endregion //生成计划单 var planMasterModel = new Model.Tw_InOutMasterOutput() { Id = Guid.NewGuid().ToString(), OutputMasterId = outMaster.Id, - ProjectId = outMaster.ProjectId, + ProjectId = outMaster.ProjectId, WarehouseCode = outMaster.WarehouseCode, Source = 2, Category = outMaster.Category, @@ -541,26 +536,26 @@ namespace BLL switch (typeInt) { case TwConst.TypeInt.补料出库: - planMasterModel.CusBillCode = GetCusBillCodeByTaskCode(outMaster.WeldTaskCode,TwConst.TypeInt.补料出库,(BLL.TwConst.Category)planMasterModel.Category); - planMasterModel.TypeInt= (int)TwConst.TypeInt.补料出库; - planMasterModel.InOutType= (int)TwConst.InOutType.出库; + planMasterModel.CusBillCode = GetCusBillCodeByTaskCode(outMaster.WeldTaskCode, TwConst.TypeInt.补料出库, (BLL.TwConst.Category)planMasterModel.Category); + planMasterModel.TypeInt = (int)TwConst.TypeInt.补料出库; + planMasterModel.InOutType = (int)TwConst.InOutType.出库; break; case TwConst.TypeInt.退料入库: string pre = ""; pre += DateTime.Now.ToString("yyyyMMdd"); pre += UnitService.GetUnitCodeByUnitId(outMaster.ReqUnitId); - pre += "-"+ UnitWorkService.getUnitWorkByUnitWorkId(outMaster.UnitWorkId)?.UnitWorkCode; - planMasterModel.CusBillCode = GetCusBillCodeByTaskCode(pre , TwConst.TypeInt.退料入库, (BLL.TwConst.Category)planMasterModel.Category); + pre += "-" + UnitWorkService.getUnitWorkByUnitWorkId(outMaster.UnitWorkId)?.UnitWorkCode; + planMasterModel.CusBillCode = GetCusBillCodeByTaskCode(pre, TwConst.TypeInt.退料入库, (BLL.TwConst.Category)planMasterModel.Category); planMasterModel.TypeInt = (int)TwConst.TypeInt.退料入库; planMasterModel.InOutType = (int)TwConst.InOutType.入库; - ; + ; break; } Add(planMasterModel); //生成明细 TwInOutplandetailService.AddList(details, planMasterModel.Id); return message; - } + } /// /// 获取出库申请单编号 /// @@ -568,17 +563,17 @@ namespace BLL /// /// /// - public static string GetCusBillCodeByTaskCode(string taskCode,TwConst.TypeInt typeInt,TwConst.Category category ) + public static string GetCusBillCodeByTaskCode(string taskCode, TwConst.TypeInt typeInt, TwConst.Category category) { string cusBillCode = ""; - switch (typeInt ) + switch (typeInt) { case TwConst.TypeInt.领料出库: - if (category== TwConst.Category.管段) + if (category == TwConst.Category.管段) { cusBillCode = taskCode + "-AP-P01"; } - else if (category == TwConst.Category.管件) + else if (category == TwConst.Category.管件) { cusBillCode = taskCode + "-AP-PF01"; } @@ -611,12 +606,12 @@ namespace BLL } - public static string GetDataInCusBillCode(string projectid, string unitcode,string typeString,string unitWorkCode="",string Category = "") + public static string GetDataInCusBillCode(string projectid, string unitcode, string typeString, string unitWorkCode = "", string Category = "") { if (typeString == TwConst.TypeInt.其他入库.ToString()) { //生成规则是20240919-unitcode-AP-GR01 - string cusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now) ; + string cusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now); var queryAll = new Tw_InOutMasterOutput() { ProjectId = projectid, @@ -629,14 +624,14 @@ namespace BLL else if (typeString == TwConst.TypeInt.散件出库.ToString()) { //生成规则是20240919-unitcode-AP-GR01 - string cusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now) + unitcode+"-" + unitWorkCode +"-"; + string cusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now) + unitcode + "-" + unitWorkCode + "-"; var queryAll = new Tw_InOutMasterOutput() { ProjectId = projectid, CusBillCode = cusBillCode, Category = Category == TwConst.Category.管段.ToString() ? (int)TwConst.Category.管段 : (int)TwConst.Category.管件 - }; + }; var queryAllresult = GetModle(queryAll).Count(); if (Category == TwConst.Category.管段.ToString()) { @@ -660,7 +655,7 @@ namespace BLL TypeInt = (int)TwConst.TypeInt.其他出库, }; var queryAllresult = GetModle(queryAll).Count(); - cusBillCode = cusBillCode +"-AP-"+ (queryAllresult + 1).ToString().PadLeft(2, '0'); + cusBillCode = cusBillCode + "-AP-" + (queryAllresult + 1).ToString().PadLeft(2, '0'); return cusBillCode; } @@ -686,38 +681,38 @@ namespace BLL /// /// /// - public static void GenOutPlanmasterByWeldTaskId(string unitworkid,string unitid,DateTime date,string serialNumber, string Personid) + public static void GenOutPlanmasterByWeldTaskId(string unitworkid, string unitid, DateTime date, string serialNumber, string Personid) { Model.SGGLDB db = Funs.DB; - Model.View_HJGL_WeldingTask weldTask = db.View_HJGL_WeldingTask.FirstOrDefault(e => e.UnitWorkId==unitworkid && e.UnitId==unitid&& e.TaskDate.Value.Date==date.Date && e.SerialNumber==serialNumber); - if (weldTask==null) + Model.View_HJGL_WeldingTask weldTask = db.View_HJGL_WeldingTask.FirstOrDefault(e => e.UnitWorkId == unitworkid && e.UnitId == unitid && e.TaskDate.Value.Date == date.Date && e.SerialNumber == serialNumber); + if (weldTask == null) { return; } - string WeldTaskId= unitworkid+"|"+unitid+ "|" + string.Format("{0:yyyyMMdd}", date)+"|"+serialNumber; + string WeldTaskId = unitworkid + "|" + unitid + "|" + string.Format("{0:yyyyMMdd}", date) + "|" + serialNumber; //判断是否已经生成过出库计划单 var queryIsExitInMaster = new Tw_InOutMasterOutput(); queryIsExitInMaster.WeldTaskId = WeldTaskId; - queryIsExitInMaster.InOutType=(int)TwConst.InOutType.出库; + queryIsExitInMaster.InOutType = (int)TwConst.InOutType.出库; queryIsExitInMaster.TypeInt = (int)TwConst.TypeInt.领料出库; var IsExitInMaster = TwInOutplanmasterService.GetModle(queryIsExitInMaster).FirstOrDefault(); if (IsExitInMaster != null) { return; - } - var pipelineList = db.View_HJGL_WeldingTask.Where(e => e.UnitWorkId == unitworkid && e.UnitId == unitid && e.TaskDate.Value.Date == date.Date && e.SerialNumber == serialNumber).OrderBy(x=>x.PipeLineSortIndex).Select(x=>x.PipelineId).Distinct().ToList(); + } + var pipelineList = db.View_HJGL_WeldingTask.Where(e => e.UnitWorkId == unitworkid && e.UnitId == unitid && e.TaskDate.Value.Date == date.Date && e.SerialNumber == serialNumber).OrderBy(x => x.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList(); //领料出库需要排除散件材料 - var MaterDatial= from x in db.HJGL_PipeLineMat - join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode - where pipelineList.Contains(x.PipelineId) && x.PrefabricatedComponents !=null - select new - { - x.PipelineId, - x.PrefabricatedComponents, - x.MaterialCode, - x.Number, - y.MaterialUnit, - }; + var MaterDatial = from x in db.HJGL_PipeLineMat + join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode + where pipelineList.Contains(x.PipelineId) && x.PrefabricatedComponents != null + select new + { + x.PipelineId, + x.PrefabricatedComponents, + x.MaterialCode, + x.Number, + y.MaterialUnit, + }; //var outMateriaList = from x in db.HJGL_PipeLineMat // join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode // where pipelineList.Contains(x.PipelineId) @@ -729,7 +724,7 @@ namespace BLL // planNum = g.Sum(x => x.Number) ?? 0, // MaterialName = g.Key.MaterialUnit, // }; - var outMateriaList = from x in MaterDatial + var outMateriaList = from x in MaterDatial group x by new { x.MaterialCode, x.MaterialUnit } into g select new @@ -749,7 +744,7 @@ namespace BLL Id = Guid.NewGuid().ToString(), ProjectId = weldTask.ProjectId, // CusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now) + UnitService.GetUnitCodeByUnitId(weldTask.UnitId) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(weldTask.UnitWorkId)?.UnitWorkCode + "AP-PF01", - CusBillCode=TwInOutplanmasterService.GetCusBillCodeByTaskCode(weldTaskCode,TwConst.TypeInt.领料出库,TwConst.Category.管件), + CusBillCode = TwInOutplanmasterService.GetCusBillCodeByTaskCode(weldTaskCode, TwConst.TypeInt.领料出库, TwConst.Category.管件), WarehouseCode = PipelineService.GetPipeArea().Where(x => x.Value == PipelineService.GetPipelineByPipelineId(weldTask.PipelineId).PipeArea).Select(x => x.Text).FirstOrDefault(), Source = 1, InOutType = (int)TwConst.InOutType.出库, @@ -774,7 +769,7 @@ namespace BLL TwInOutplandetailService.Add(detail); } var twinoutplandetailRelationList = MaterDatial.ToList().Select(x => new Tw_InOutPlanDetail_Relation - { + { PipelineId = x.PipelineId, MaterialCode = x.MaterialCode, Number = x.Number, @@ -788,7 +783,7 @@ namespace BLL { Id = Guid.NewGuid().ToString(), ProjectId = weldTask.ProjectId, - CusBillCode =TwInOutplanmasterService.GetCusBillCodeByTaskCode(weldTaskCode, TwConst.TypeInt.领料出库, TwConst.Category.管段), + CusBillCode = TwInOutplanmasterService.GetCusBillCodeByTaskCode(weldTaskCode, TwConst.TypeInt.领料出库, TwConst.Category.管段), WarehouseCode = PipelineService.GetPipeArea().Where(x => x.Value == PipelineService.GetPipelineByPipelineId(weldTask.PipelineId).PipeArea).Select(x => x.Text).FirstOrDefault(), Source = 1, InOutType = (int)TwConst.InOutType.出库, diff --git a/SGGL/BLL/CLGL/TwInputdetailService.cs b/SGGL/BLL/CLGL/TwInputdetailService.cs index 33329c0d..a0c62e0e 100644 --- a/SGGL/BLL/CLGL/TwInputdetailService.cs +++ b/SGGL/BLL/CLGL/TwInputdetailService.cs @@ -1,9 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -35,7 +33,7 @@ namespace BLL (string.IsNullOrEmpty(table.InputMasterId) || x.InputMasterId.Contains(table.InputMasterId)) && (string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) && (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode)) - orderby x.SortIndex + orderby x.SortIndex select new Model.Tw_InOutDetailOutput { Id = x.Id, @@ -128,20 +126,20 @@ namespace BLL public static IEnumerable GePrintListByInputMasterIds(List inputMasterIds) { var q = from x in Funs.DB.Tw_InputDetail - join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm - from mat in mm.DefaultIfEmpty() - join y in Funs.DB.Tw_InputMaster on x.InputMasterId equals y.Id - where inputMasterIds.Contains(x.InputMasterId) - orderby y.CusBillCode,x.SortIndex - select new - { - 入库单编号 = y.CusBillCode, - 材料编码 = x.MaterialCode, - 材料名称 = mat.MaterialName, - 材料描述 = mat.MaterialDef, - 计划数量 = x.PlanNum, - 实际数量 = x.ActNum, - }; + join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm + from mat in mm.DefaultIfEmpty() + join y in Funs.DB.Tw_InputMaster on x.InputMasterId equals y.Id + where inputMasterIds.Contains(x.InputMasterId) + orderby y.CusBillCode, x.SortIndex + select new + { + 入库单编号 = y.CusBillCode, + 材料编码 = x.MaterialCode, + 材料名称 = mat.MaterialName, + 材料描述 = mat.MaterialDef, + 计划数量 = x.PlanNum, + 实际数量 = x.ActNum, + }; return q; } } diff --git a/SGGL/BLL/CLGL/TwInputmasterService.cs b/SGGL/BLL/CLGL/TwInputmasterService.cs index 0a532b5e..7f2d06eb 100644 --- a/SGGL/BLL/CLGL/TwInputmasterService.cs +++ b/SGGL/BLL/CLGL/TwInputmasterService.cs @@ -4,14 +4,13 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { public static class TwInputmasterService - { + { #region 获取列表 /// /// 记录数 @@ -39,8 +38,8 @@ namespace BLL (string.IsNullOrEmpty(table.CusBillCode) || x.CusBillCode.Contains(table.CusBillCode)) && (string.IsNullOrEmpty(table.WarehouseCode) || x.WarehouseCode.Contains(table.WarehouseCode)) && (string.IsNullOrEmpty(table.CreateMan) || x.CreateMan.Contains(table.CreateMan)) && - (string.IsNullOrEmpty(table.ReqUnitId) || x.ReqUnitId.Contains(table.ReqUnitId)) && - (table.TypeInt == null || x.TypeInt == table.TypeInt) && + (string.IsNullOrEmpty(table.ReqUnitId) || x.ReqUnitId.Contains(table.ReqUnitId)) && + (table.TypeInt == null || x.TypeInt == table.TypeInt) && (table.Category == null || x.Category == table.Category) && (table.State == null || x.State == table.State) select new Model.Tw_InOutMasterOutput @@ -88,36 +87,36 @@ namespace BLL var result = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in result - select new Model.Tw_InOutMasterOutput - { - Id = x.Id, - ProjectId = x.ProjectId, - CusBillCode = x.CusBillCode, - InOutPlanMasterId = x.InOutPlanMasterId, - WarehouseCode = x.WarehouseCode, - Source = x.Source, - TypeInt = x.TypeInt, - State = x.State, - CreateMan = x.CreateMan, - CreateManName = x.CreateManName, - CreateDate = x.CreateDate, - ReqUnitId = x.ReqUnitId, - ReqUnitName = x.ReqUnitName, - Category = x.Category, - CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, - TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, - StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, - AuditMan = x.AuditMan, - AuditManName = x.AuditManName, - AuditDate = x.AuditDate, - Remark=x.Remark, - WarehouseMan = x.WarehouseMan, - WarehouseDate = x.WarehouseDate, - WarehouseManName= x.WarehouseManName - }; + select new Model.Tw_InOutMasterOutput + { + Id = x.Id, + ProjectId = x.ProjectId, + CusBillCode = x.CusBillCode, + InOutPlanMasterId = x.InOutPlanMasterId, + WarehouseCode = x.WarehouseCode, + Source = x.Source, + TypeInt = x.TypeInt, + State = x.State, + CreateMan = x.CreateMan, + CreateManName = x.CreateManName, + CreateDate = x.CreateDate, + ReqUnitId = x.ReqUnitId, + ReqUnitName = x.ReqUnitName, + Category = x.Category, + CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, + TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, + StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, + AuditMan = x.AuditMan, + AuditManName = x.AuditManName, + AuditDate = x.AuditDate, + Remark = x.Remark, + WarehouseMan = x.WarehouseMan, + WarehouseDate = x.WarehouseDate, + WarehouseManName = x.WarehouseManName + }; } - public static List GetListData(Model.Tw_InOutMasterOutput table ) + public static List GetListData(Model.Tw_InOutMasterOutput table) { var q = GetModle(table); Count = q.Count(); @@ -128,33 +127,33 @@ namespace BLL var result = q.ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return (from x in result - select new Model.Tw_InOutMasterOutput - { - Id = x.Id, - ProjectId = x.ProjectId, - CusBillCode = x.CusBillCode, - InOutPlanMasterId = x.InOutPlanMasterId, - WarehouseCode = x.WarehouseCode, - Source = x.Source, - TypeInt = x.TypeInt, - State = x.State, - CreateMan = x.CreateMan, - CreateManName = x.CreateManName, - CreateDate = x.CreateDate, - ReqUnitId = x.ReqUnitId, - ReqUnitName = x.ReqUnitName, - Category = x.Category, - CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, - TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, - StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, - AuditMan = x.AuditMan, - AuditManName = x.AuditManName, - AuditDate = x.AuditDate, - Remark = x.Remark, - WarehouseMan = x.WarehouseMan, - WarehouseDate = x.WarehouseDate, - WarehouseManName= x.WarehouseManName - }).ToList(); + select new Model.Tw_InOutMasterOutput + { + Id = x.Id, + ProjectId = x.ProjectId, + CusBillCode = x.CusBillCode, + InOutPlanMasterId = x.InOutPlanMasterId, + WarehouseCode = x.WarehouseCode, + Source = x.Source, + TypeInt = x.TypeInt, + State = x.State, + CreateMan = x.CreateMan, + CreateManName = x.CreateManName, + CreateDate = x.CreateDate, + ReqUnitId = x.ReqUnitId, + ReqUnitName = x.ReqUnitName, + Category = x.Category, + CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, + TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, + StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, + AuditMan = x.AuditMan, + AuditManName = x.AuditManName, + AuditDate = x.AuditDate, + Remark = x.Remark, + WarehouseMan = x.WarehouseMan, + WarehouseDate = x.WarehouseDate, + WarehouseManName = x.WarehouseManName + }).ToList(); } #endregion @@ -181,16 +180,16 @@ namespace BLL CreateMan = newtable.CreateMan, CreateDate = newtable.CreateDate, ReqUnitId = newtable.ReqUnitId, - AuditMan= newtable.AuditMan, + AuditMan = newtable.AuditMan, AuditDate = newtable.AuditDate, Remark = newtable.Remark, - WarehouseMan= newtable.WarehouseMan, + WarehouseMan = newtable.WarehouseMan, WarehouseDate = newtable.WarehouseDate }; Funs.DB.Tw_InputMaster.InsertOnSubmit(table); Funs.DB.SubmitChanges(); } - + public static void Update(Model.Tw_InputMaster newtable) { @@ -233,16 +232,16 @@ namespace BLL /// /// 根据计划单生成入库单 /// - public static void GenInMasterByPlanId(string planId, List detailLists,string remark) + public static void GenInMasterByPlanId(string planId, List detailLists, string remark) { //获取计划单 var planQueryModel = new Tw_InOutMasterOutput(); planQueryModel.Id = planId; - var plan = TwInOutplanmasterService.GetListData(planQueryModel).FirstOrDefault(); - if (plan == null || plan.State!= (int)TwConst.State.已审核) + var plan = TwInOutplanmasterService.GetListData(planQueryModel).FirstOrDefault(); + if (plan == null || plan.State != (int)TwConst.State.已审核) { return; - } + } //判断是否已经生成过入库单 var queryIsExitInMaster = new Tw_InOutMasterOutput(); queryIsExitInMaster.InOutPlanMasterId = planId; @@ -269,7 +268,7 @@ namespace BLL ReqUnitId = plan.ReqUnitId, AuditMan = plan.AuditMan, AuditDate = plan.AuditDate, - Remark= remark, + Remark = remark, WarehouseMan = plan.WarehouseMan, WarehouseDate = plan.WarehouseDate }; @@ -292,20 +291,20 @@ namespace BLL TwMaterialstockService.UpdateStockNum(master.ProjectId, detail.MaterialCode, master.WarehouseCode, TwConst.InOutType.入库, detailTable.ActNum); } - var planTable =TwInOutplanmasterService.GetById(plan.Id); + var planTable = TwInOutplanmasterService.GetById(plan.Id); if (planTable != null) { planTable.State = (int)TwConst.State.已完成; TwInOutplanmasterService.Update(planTable); } - + } /// /// 根据计划单撤销入库单 /// /// public static void RevokeGenInMasterByPlanId(string planId) - { + { //校验计划单状态 var plan = TwInOutplanmasterService.GetById(planId); if (plan == null || plan.State != (int)TwConst.State.已完成) @@ -329,7 +328,7 @@ namespace BLL { TwInputdetailService.DeleteById(detail.Id); //撤销入库,即减去库存 - TwMaterialstockService.UpdateStockNum(master.ProjectId,detail.MaterialCode, master.WarehouseCode,TwConst.InOutType.出库, detail.ActNum); + TwMaterialstockService.UpdateStockNum(master.ProjectId, detail.MaterialCode, master.WarehouseCode, TwConst.InOutType.出库, detail.ActNum); } plan.State = (int)TwConst.State.已审核; TwInOutplanmasterService.Update(plan); @@ -347,7 +346,7 @@ namespace BLL { string cusBillCode = ""; switch (typeInt) - { + { case TwConst.TypeInt.退料入库: if (category == TwConst.Category.管段) { diff --git a/SGGL/BLL/CLGL/TwMaterialstockService.cs b/SGGL/BLL/CLGL/TwMaterialstockService.cs index 72e15ab3..6d3bcc3e 100644 --- a/SGGL/BLL/CLGL/TwMaterialstockService.cs +++ b/SGGL/BLL/CLGL/TwMaterialstockService.cs @@ -3,7 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -130,13 +129,13 @@ namespace BLL /// /// /// - public static void UpdateStockNum(string ProjectId, string MaterialCode, string WarehouseCode,TwConst.InOutType inOutType , decimal? StockNum) + public static void UpdateStockNum(string ProjectId, string MaterialCode, string WarehouseCode, TwConst.InOutType inOutType, decimal? StockNum) { Model.Tw_MaterialStock table = Funs.DB.Tw_MaterialStock.FirstOrDefault(x => x.ProjectId == ProjectId && x.PipeLineMatCode == MaterialCode && x.WarehouseCode == WarehouseCode); //如果是入库,则库存数量加上,如果是出库,则库存数量减去 - if (inOutType==TwConst.InOutType.出库) + if (inOutType == TwConst.InOutType.出库) { - StockNum=-StockNum;//出库,库存数量减去 + StockNum = -StockNum;//出库,库存数量减去 } if (table != null) { @@ -147,12 +146,12 @@ namespace BLL else { Model.Tw_MaterialStock newtable = new Model.Tw_MaterialStock - { + { Id = Guid.NewGuid().ToString(), ProjectId = ProjectId, PipeLineMatCode = MaterialCode, WarehouseCode = WarehouseCode, - StockNum = StockNum??0, + StockNum = StockNum ?? 0, }; Funs.DB.Tw_MaterialStock.InsertOnSubmit(newtable); Funs.DB.SubmitChanges(); diff --git a/SGGL/BLL/CLGL/TwOutputdetailService..cs b/SGGL/BLL/CLGL/TwOutputdetailService..cs index 93005ebb..7327842e 100644 --- a/SGGL/BLL/CLGL/TwOutputdetailService..cs +++ b/SGGL/BLL/CLGL/TwOutputdetailService..cs @@ -1,10 +1,7 @@ using FineUIPro; -using NPOI.OpenXmlFormats.Wordprocessing; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -27,7 +24,7 @@ namespace BLL var q = from x in Funs.DB.Tw_OutputDetail join y in Funs.DB.HJGL_Pipeline_Component on x.PipelineComponentId equals y.PipelineComponentId into yy from y in yy.DefaultIfEmpty() - join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm + join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm from mat in mm.DefaultIfEmpty() join master in Funs.DB.Tw_OutputMaster on x.OutputMasterId equals master.Id into masters from master in masters.DefaultIfEmpty() @@ -37,14 +34,14 @@ namespace BLL (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.OutputMasterId) || x.OutputMasterId.Contains(table.OutputMasterId)) && (string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) && - (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode))&& - (table.TypeInt ==null || master.TypeInt==table.TypeInt) + (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode)) && + (table.TypeInt == null || master.TypeInt == table.TypeInt) select new Model.Tw_InOutDetailOutput { Id = x.Id, OutputMasterId = x.OutputMasterId, - CusBillCode=master.CusBillCode, - TypeInt=master.TypeInt, + CusBillCode = master.CusBillCode, + TypeInt = master.TypeInt, PipelineComponentId = x.PipelineComponentId, MaterialCode = x.MaterialCode, PlanNum = x.PlanNum, @@ -52,7 +49,7 @@ namespace BLL PipelineComponentCode = y.PipelineComponentCode, MaterialName = mat.MaterialName, StockNum = stock.StockNum ?? 0, - DiffNum = (x.ActNum??0) - (x.PlanNum??0), + DiffNum = (x.ActNum ?? 0) - (x.PlanNum ?? 0), MaterialDef = mat.MaterialDef } ; @@ -134,20 +131,20 @@ namespace BLL public static IEnumerable GetPrintListByOutputMasterIds(List outputMasterIds) { - var q= from x in Funs.DB.Tw_OutputDetail - join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode - join master in Funs.DB.Tw_OutputMaster on x.OutputMasterId equals master.Id - where outputMasterIds.Contains(x.OutputMasterId) - orderby master.CusBillCode - select new - { - 出库单编号 = master.CusBillCode, - 材料编码 = x.MaterialCode, - 材料名称 = y.MaterialName, - 材料描述 = y.MaterialDef, - 计划数量 = x.PlanNum, - 实际数量 = x.ActNum, - }; + var q = from x in Funs.DB.Tw_OutputDetail + join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode + join master in Funs.DB.Tw_OutputMaster on x.OutputMasterId equals master.Id + where outputMasterIds.Contains(x.OutputMasterId) + orderby master.CusBillCode + select new + { + 出库单编号 = master.CusBillCode, + 材料编码 = x.MaterialCode, + 材料名称 = y.MaterialName, + 材料描述 = y.MaterialDef, + 计划数量 = x.PlanNum, + 实际数量 = x.ActNum, + }; return q; } diff --git a/SGGL/BLL/CLGL/TwOutputmasterService.cs b/SGGL/BLL/CLGL/TwOutputmasterService.cs index 1e10ce33..1dc3177e 100644 --- a/SGGL/BLL/CLGL/TwOutputmasterService.cs +++ b/SGGL/BLL/CLGL/TwOutputmasterService.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -13,7 +12,7 @@ namespace BLL /// 入库单逻辑层 /// public static class TwOutputmasterService - { + { #region 获取列表 /// /// 记录数 @@ -26,12 +25,12 @@ namespace BLL public static IQueryable GetModle(Model.Tw_InOutMasterOutput table) { var q = from x in Funs.DB.Tw_OutputMaster - join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id into yy - from y in yy.DefaultIfEmpty() - //join z in Funs.DB.HJGL_WeldTask on y.WeldTaskId equals z.WeldTaskId into zz - //from z in zz.DefaultIfEmpty() + join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id into yy + from y in yy.DefaultIfEmpty() + //join z in Funs.DB.HJGL_WeldTask on y.WeldTaskId equals z.WeldTaskId into zz + //from z in zz.DefaultIfEmpty() join person in Funs.DB.Person_Persons on x.CreateMan equals person.PersonId into persons - from person in persons.DefaultIfEmpty() + from person in persons.DefaultIfEmpty() join auditperson in Funs.DB.Person_Persons on x.AuditMan equals auditperson.PersonId into auditpersons from auditperson in auditpersons.DefaultIfEmpty() join auditperson2 in Funs.DB.Person_Persons on x.AuditMan2 equals auditperson2.PersonId into auditpersons2 @@ -39,48 +38,48 @@ namespace BLL join warehouseperson in Funs.DB.Person_Persons on x.WarehouseMan equals warehouseperson.PersonId into warehousepersons from warehouseperson in warehousepersons.DefaultIfEmpty() join unit in Funs.DB.Base_Unit on x.ReqUnitId equals unit.UnitId into units - from unit in units.DefaultIfEmpty() - where - (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && - (string.IsNullOrEmpty(table.InOutPlanMasterId) || x.InOutPlanMasterId .Contains(table.InOutPlanMasterId)) && - (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && - (string.IsNullOrEmpty(table.CusBillCode) || x.CusBillCode.Contains(table.CusBillCode)) && - (string.IsNullOrEmpty(table.WarehouseCode) || x.WarehouseCode.Contains(table.WarehouseCode)) && - (string.IsNullOrEmpty(table.CreateMan) || x.CreateMan.Contains(table.CreateMan)) && - (string.IsNullOrEmpty(table.ReqUnitId) || x.ReqUnitId.Contains(table.ReqUnitId)) && - (string.IsNullOrEmpty(table.UnitWorkId) || y.WeldTaskId.Contains(table.UnitWorkId)) && - (table.TypeInt == null || x.TypeInt == table.TypeInt) && - (table.Category == null || x.Category == table.Category) && - (table.State == null || x.State == table.State) - orderby x.CreateDate descending - select new Model.Tw_InOutMasterOutput - { - Id = x.Id, - ProjectId = x.ProjectId, - CusBillCode = x.CusBillCode, - InOutPlanMasterId = x.InOutPlanMasterId, - WarehouseCode = x.WarehouseCode, - Category = x.Category, - Source = x.Source, - TypeInt = x.TypeInt, - State = x.State, - CreateMan = x.CreateMan, - CreateManName = person.PersonName, - CreateDate = x.CreateDate, - ReqUnitId = x.ReqUnitId, - ReqUnitName = unit.UnitName, - WeldTaskId = y.WeldTaskId, - AuditMan = x.AuditMan, - AuditManName = auditperson.PersonName, - AuditDate = x.AuditDate, - AuditMan2 = x.AuditMan2, - AuditManName2 = auditperson2.PersonName, - AuditDate2 = x.AuditDate2, - WarehouseMan = x.WarehouseMan, - WarehouseDate = x.WarehouseDate, - WarehouseManName = warehouseperson.PersonName, - Remark=y.Remark - }; + from unit in units.DefaultIfEmpty() + where + (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && + (string.IsNullOrEmpty(table.InOutPlanMasterId) || x.InOutPlanMasterId.Contains(table.InOutPlanMasterId)) && + (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && + (string.IsNullOrEmpty(table.CusBillCode) || x.CusBillCode.Contains(table.CusBillCode)) && + (string.IsNullOrEmpty(table.WarehouseCode) || x.WarehouseCode.Contains(table.WarehouseCode)) && + (string.IsNullOrEmpty(table.CreateMan) || x.CreateMan.Contains(table.CreateMan)) && + (string.IsNullOrEmpty(table.ReqUnitId) || x.ReqUnitId.Contains(table.ReqUnitId)) && + (string.IsNullOrEmpty(table.UnitWorkId) || y.WeldTaskId.Contains(table.UnitWorkId)) && + (table.TypeInt == null || x.TypeInt == table.TypeInt) && + (table.Category == null || x.Category == table.Category) && + (table.State == null || x.State == table.State) + orderby x.CreateDate descending + select new Model.Tw_InOutMasterOutput + { + Id = x.Id, + ProjectId = x.ProjectId, + CusBillCode = x.CusBillCode, + InOutPlanMasterId = x.InOutPlanMasterId, + WarehouseCode = x.WarehouseCode, + Category = x.Category, + Source = x.Source, + TypeInt = x.TypeInt, + State = x.State, + CreateMan = x.CreateMan, + CreateManName = person.PersonName, + CreateDate = x.CreateDate, + ReqUnitId = x.ReqUnitId, + ReqUnitName = unit.UnitName, + WeldTaskId = y.WeldTaskId, + AuditMan = x.AuditMan, + AuditManName = auditperson.PersonName, + AuditDate = x.AuditDate, + AuditMan2 = x.AuditMan2, + AuditManName2 = auditperson2.PersonName, + AuditDate2 = x.AuditDate2, + WarehouseMan = x.WarehouseMan, + WarehouseDate = x.WarehouseDate, + WarehouseManName = warehouseperson.PersonName, + Remark = y.Remark + }; return q; } @@ -101,39 +100,39 @@ namespace BLL } var result = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList(); return from x in result - select new Model.Tw_InOutMasterOutput - { - Id = x.Id, - ProjectId = x.ProjectId, - CusBillCode = x.CusBillCode, - WarehouseCode = x.WarehouseCode, - InOutPlanMasterId = x.InOutPlanMasterId, - Source = x.Source, - TypeInt = x.TypeInt, - State = x.State, - Category= x.Category, - CreateMan = x.CreateMan, - CreateManName = x.CreateManName, - CreateDate = x.CreateDate, - ReqUnitId = x.ReqUnitId, - ReqUnitName = x.ReqUnitName, - TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, - StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, - CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, - WeldTaskId = x.WeldTaskId, - WeldTaskCode = x.WeldTaskId != null ? x.WeldTaskId.Contains('|') ? Funs.DB.HJGL_WeldTask.FirstOrDefault(e => e.UnitWorkId == x.WeldTaskId.Split('|')[0].ToString() && e.UnitId == x.WeldTaskId.Split('|')[1].ToString() && e.TaskDate.Value.Date == DateTime.ParseExact(x.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date)?.TaskCode : "" : "", - UnitWorkId= x.WeldTaskId != null? x.WeldTaskId.Split('|')[0].ToString():null, - AuditMan = x.AuditMan, - AuditManName = x.AuditManName, - AuditDate = x.AuditDate, - AuditMan2 = x.AuditMan2, - AuditManName2 = x.AuditManName2, - AuditDate2 = x.AuditDate2, - WarehouseMan = x.WarehouseMan, - WarehouseManName = x.WarehouseManName, - WarehouseDate = x.WarehouseDate + select new Model.Tw_InOutMasterOutput + { + Id = x.Id, + ProjectId = x.ProjectId, + CusBillCode = x.CusBillCode, + WarehouseCode = x.WarehouseCode, + InOutPlanMasterId = x.InOutPlanMasterId, + Source = x.Source, + TypeInt = x.TypeInt, + State = x.State, + Category = x.Category, + CreateMan = x.CreateMan, + CreateManName = x.CreateManName, + CreateDate = x.CreateDate, + ReqUnitId = x.ReqUnitId, + ReqUnitName = x.ReqUnitName, + TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, + StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, + CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, + WeldTaskId = x.WeldTaskId, + WeldTaskCode = x.WeldTaskId != null ? x.WeldTaskId.Contains('|') ? Funs.DB.HJGL_WeldTask.FirstOrDefault(e => e.UnitWorkId == x.WeldTaskId.Split('|')[0].ToString() && e.UnitId == x.WeldTaskId.Split('|')[1].ToString() && e.TaskDate.Value.Date == DateTime.ParseExact(x.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date)?.TaskCode : "" : "", + UnitWorkId = x.WeldTaskId != null ? x.WeldTaskId.Split('|')[0].ToString() : null, + AuditMan = x.AuditMan, + AuditManName = x.AuditManName, + AuditDate = x.AuditDate, + AuditMan2 = x.AuditMan2, + AuditManName2 = x.AuditManName2, + AuditDate2 = x.AuditDate2, + WarehouseMan = x.WarehouseMan, + WarehouseManName = x.WarehouseManName, + WarehouseDate = x.WarehouseDate - }; + }; } public static List GetListData(Model.Tw_InOutMasterOutput table) @@ -146,39 +145,39 @@ namespace BLL } var result = q.ToList(); return (from x in result - select new Model.Tw_InOutMasterOutput - { - Id = x.Id, - ProjectId = x.ProjectId, - CusBillCode = x.CusBillCode, - InOutPlanMasterId = x.InOutPlanMasterId, - WarehouseCode = x.WarehouseCode, - Source = x.Source, - TypeInt = x.TypeInt, - State = x.State, - Category = x.Category, - CreateMan = x.CreateMan, - CreateManName = x.CreateManName, - CreateDate = x.CreateDate, - ReqUnitId = x.ReqUnitId, - ReqUnitName = x.ReqUnitName, - TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, - StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, - CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, - WeldTaskId = x.WeldTaskId, - WeldTaskCode = x.WeldTaskId != null ? x.WeldTaskId.Contains('|') ? Funs.DB.HJGL_WeldTask.FirstOrDefault(e => e.UnitWorkId == x.WeldTaskId.Split('|')[0].ToString() && e.UnitId == x.WeldTaskId.Split('|')[1].ToString() && e.TaskDate.Value.Date == DateTime.ParseExact(x.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date)?.TaskCode : "" : "", - UnitWorkId = x.WeldTaskId != null ? x.WeldTaskId.Split('|')[0].ToString() : null, - AuditMan = x.AuditMan, - AuditManName = x.AuditManName, - AuditDate = x.AuditDate, - AuditMan2 = x.AuditMan2, - AuditManName2 = x.AuditManName2, - AuditDate2 = x.AuditDate2, - WarehouseMan = x.WarehouseMan, - WarehouseManName = x.WarehouseManName, - WarehouseDate = x.WarehouseDate + select new Model.Tw_InOutMasterOutput + { + Id = x.Id, + ProjectId = x.ProjectId, + CusBillCode = x.CusBillCode, + InOutPlanMasterId = x.InOutPlanMasterId, + WarehouseCode = x.WarehouseCode, + Source = x.Source, + TypeInt = x.TypeInt, + State = x.State, + Category = x.Category, + CreateMan = x.CreateMan, + CreateManName = x.CreateManName, + CreateDate = x.CreateDate, + ReqUnitId = x.ReqUnitId, + ReqUnitName = x.ReqUnitName, + TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key, + StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key, + CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, + WeldTaskId = x.WeldTaskId, + WeldTaskCode = x.WeldTaskId != null ? x.WeldTaskId.Contains('|') ? Funs.DB.HJGL_WeldTask.FirstOrDefault(e => e.UnitWorkId == x.WeldTaskId.Split('|')[0].ToString() && e.UnitId == x.WeldTaskId.Split('|')[1].ToString() && e.TaskDate.Value.Date == DateTime.ParseExact(x.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date)?.TaskCode : "" : "", + UnitWorkId = x.WeldTaskId != null ? x.WeldTaskId.Split('|')[0].ToString() : null, + AuditMan = x.AuditMan, + AuditManName = x.AuditManName, + AuditDate = x.AuditDate, + AuditMan2 = x.AuditMan2, + AuditManName2 = x.AuditManName2, + AuditDate2 = x.AuditDate2, + WarehouseMan = x.WarehouseMan, + WarehouseManName = x.WarehouseManName, + WarehouseDate = x.WarehouseDate - }).ToList(); + }).ToList(); } #endregion @@ -204,7 +203,7 @@ namespace BLL State = newtable.State, CreateMan = newtable.CreateMan, CreateDate = newtable.CreateDate, - ReqUnitId = newtable.ReqUnitId, + ReqUnitId = newtable.ReqUnitId, AuditMan = newtable.AuditMan, AuditDate = newtable.AuditDate, AuditMan2 = newtable.AuditMan2, @@ -263,28 +262,28 @@ namespace BLL { //获取出库单 var planQueryModel = new Tw_InOutMasterOutput(); - planQueryModel.Id = planId; - var plan = TwInOutplanmasterService.GetListData(planQueryModel).FirstOrDefault(); - if (plan == null || plan.State != (int)TwConst.State.已审核) + planQueryModel.Id = planId; + var plan = TwInOutplanmasterService.GetListData(planQueryModel).FirstOrDefault(); + if (plan == null || plan.State != (int)TwConst.State.已审核) { return; } //判断是否已经生成过出库单 var queryIsExitInMaster = new Tw_InOutMasterOutput(); queryIsExitInMaster.InOutPlanMasterId = planId; - queryIsExitInMaster.TypeInt= plan.TypeInt; + queryIsExitInMaster.TypeInt = plan.TypeInt; var IsExitInMaster = GetModle(queryIsExitInMaster).FirstOrDefault(); if (IsExitInMaster != null) { return; - } + } //生成出库单 var master = new Model.Tw_OutputMaster() { Id = Guid.NewGuid().ToString(), InOutPlanMasterId = plan.Id, ProjectId = plan.ProjectId, - CusBillCode = GetCusBillCode(plan.WeldTaskCode, (TwConst.TypeInt)plan.TypeInt, (BLL.TwConst.Category)plan.Category,plan.CusBillCode), + CusBillCode = GetCusBillCode(plan.WeldTaskCode, (TwConst.TypeInt)plan.TypeInt, (BLL.TwConst.Category)plan.Category, plan.CusBillCode), WarehouseCode = plan.WarehouseCode, Category = plan.Category, Source = plan.Source, @@ -299,8 +298,8 @@ namespace BLL AuditDate2 = plan.AuditDate2, WarehouseMan = plan.WarehouseMan, WarehouseDate = plan.WarehouseDate, - - }; + + }; Add(master); //生成出库单明细 foreach (var detail in detailLists) @@ -318,7 +317,7 @@ namespace BLL } plan.State = (int)TwConst.State.已完成; - TwInOutplanmasterService.Update(plan); + TwInOutplanmasterService.Update(plan); } /// /// 根据计划单撤销出库单 @@ -346,8 +345,8 @@ namespace BLL //撤销出库,即增加库存 TwMaterialstockService.UpdateStockNum(master.ProjectId, detail.MaterialCode, master.WarehouseCode, TwConst.InOutType.入库, detail.ActNum); } - var planModel= TwInOutplanmasterService.GetById(planId); - planModel.State= (int)TwConst.State.已审核; + var planModel = TwInOutplanmasterService.GetById(planId); + planModel.State = (int)TwConst.State.已审核; planModel.WarehouseMan = null; planModel.WarehouseDate = null; TwInOutplanmasterService.Update(planModel); diff --git a/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs b/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs index f6369ccd..fe304fd5 100644 --- a/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs +++ b/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Data; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/CheckControlService.cs b/SGGL/BLL/CQMS/Check/CheckControlService.cs index 5d612be8..bec2a113 100644 --- a/SGGL/BLL/CQMS/Check/CheckControlService.cs +++ b/SGGL/BLL/CQMS/Check/CheckControlService.cs @@ -8,7 +8,7 @@ namespace BLL { public class CheckControlService { - + /// /// 根据质量检查与控制Id删除一个质量检查与控制信息 /// @@ -504,7 +504,7 @@ namespace BLL x.WorkPackageName, CNProfessionalName = (from y in db.Base_CNProfessional where y.CNProfessionalId == x.CNProfessionalCode select y.ProfessionalName).First(), UnitWork = (from y in db.WBS_UnitWork where y.UnitWorkId == x.UnitWorkId select y.UnitWorkCode + "-" + y.UnitWorkName + (y.ProjectType == "1" ? "(建筑)" : "(安装)")).First(), - CheckMan = (from y in db.Person_Persons where y.PersonId == x.CheckMan select y.PersonName).First(), + CheckMan = (from y in db.Person_Persons where y.PersonId == x.CheckMan select y.PersonName).First(), }; var list = qq1.Skip(index * page).Take(page).ToList(); diff --git a/SGGL/BLL/CQMS/Check/CheckEquipmentApproveService.cs b/SGGL/BLL/CQMS/Check/CheckEquipmentApproveService.cs index 51b2ff95..77c96a9e 100644 --- a/SGGL/BLL/CQMS/Check/CheckEquipmentApproveService.cs +++ b/SGGL/BLL/CQMS/Check/CheckEquipmentApproveService.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs b/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs index 8c16d859..db9502aa 100644 --- a/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs +++ b/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs @@ -3,7 +3,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using System.Web.UI.WebControls; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/CheckMaterialacceptance.cs b/SGGL/BLL/CQMS/Check/CheckMaterialacceptance.cs index afeb4c7c..3cb1d490 100644 --- a/SGGL/BLL/CQMS/Check/CheckMaterialacceptance.cs +++ b/SGGL/BLL/CQMS/Check/CheckMaterialacceptance.cs @@ -1,10 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -31,7 +28,7 @@ namespace BLL (string.IsNullOrEmpty(table.FileName) || x.FileName.Contains(table.FileName)) && (string.IsNullOrEmpty(table.CompileMan) || x.CompileMan.Contains(table.CompileMan)) && (string.IsNullOrEmpty(table.State) || x.State.Contains(table.State)) && - (string.IsNullOrEmpty(table.FilePath) || x.FilePath.Contains(table.FilePath)) + (string.IsNullOrEmpty(table.FilePath) || x.FilePath.Contains(table.FilePath)) select x ; diff --git a/SGGL/BLL/CQMS/Check/CheckMonthService.cs b/SGGL/BLL/CQMS/Check/CheckMonthService.cs index f6dbb961..4991d587 100644 --- a/SGGL/BLL/CQMS/Check/CheckMonthService.cs +++ b/SGGL/BLL/CQMS/Check/CheckMonthService.cs @@ -1,7 +1,6 @@ using System; using System.Collections; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/DesignApproveService.cs b/SGGL/BLL/CQMS/Check/DesignApproveService.cs index 35d6f909..81e3c7fc 100644 --- a/SGGL/BLL/CQMS/Check/DesignApproveService.cs +++ b/SGGL/BLL/CQMS/Check/DesignApproveService.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/DesignService.cs b/SGGL/BLL/CQMS/Check/DesignService.cs index 7d22f318..817ba7cc 100644 --- a/SGGL/BLL/CQMS/Check/DesignService.cs +++ b/SGGL/BLL/CQMS/Check/DesignService.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Web.UI.WebControls; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/FileCabinetService.cs b/SGGL/BLL/CQMS/Check/FileCabinetService.cs index fbff4223..7b3ee1ee 100644 --- a/SGGL/BLL/CQMS/Check/FileCabinetService.cs +++ b/SGGL/BLL/CQMS/Check/FileCabinetService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/JointCheckApproveService.cs b/SGGL/BLL/CQMS/Check/JointCheckApproveService.cs index 31f59089..208c6357 100644 --- a/SGGL/BLL/CQMS/Check/JointCheckApproveService.cs +++ b/SGGL/BLL/CQMS/Check/JointCheckApproveService.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { @@ -387,7 +386,8 @@ namespace BLL return newApprove; } return null; - }; + } + ; } } diff --git a/SGGL/BLL/CQMS/Check/MonthDesignService.cs b/SGGL/BLL/CQMS/Check/MonthDesignService.cs index a5bd5263..56c65ce9 100644 --- a/SGGL/BLL/CQMS/Check/MonthDesignService.cs +++ b/SGGL/BLL/CQMS/Check/MonthDesignService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/MonthNDTCheckService.cs b/SGGL/BLL/CQMS/Check/MonthNDTCheckService.cs index 1615e2d2..d37ef309 100644 --- a/SGGL/BLL/CQMS/Check/MonthNDTCheckService.cs +++ b/SGGL/BLL/CQMS/Check/MonthNDTCheckService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/MonthRectifyService.cs b/SGGL/BLL/CQMS/Check/MonthRectifyService.cs index e81f3ce0..492cce77 100644 --- a/SGGL/BLL/CQMS/Check/MonthRectifyService.cs +++ b/SGGL/BLL/CQMS/Check/MonthRectifyService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/MonthSpotCheckDetailService.cs b/SGGL/BLL/CQMS/Check/MonthSpotCheckDetailService.cs index 3584049e..52751f41 100644 --- a/SGGL/BLL/CQMS/Check/MonthSpotCheckDetailService.cs +++ b/SGGL/BLL/CQMS/Check/MonthSpotCheckDetailService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/MonthWelderService.cs b/SGGL/BLL/CQMS/Check/MonthWelderService.cs index 18822aea..6e96de9e 100644 --- a/SGGL/BLL/CQMS/Check/MonthWelderService.cs +++ b/SGGL/BLL/CQMS/Check/MonthWelderService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/SpecialEquipmentDetailService.cs b/SGGL/BLL/CQMS/Check/SpecialEquipmentDetailService.cs index 561ca451..0f4e3bc9 100644 --- a/SGGL/BLL/CQMS/Check/SpecialEquipmentDetailService.cs +++ b/SGGL/BLL/CQMS/Check/SpecialEquipmentDetailService.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/SpotCheckApproveService.cs b/SGGL/BLL/CQMS/Check/SpotCheckApproveService.cs index 5ab817cf..baf58497 100644 --- a/SGGL/BLL/CQMS/Check/SpotCheckApproveService.cs +++ b/SGGL/BLL/CQMS/Check/SpotCheckApproveService.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs b/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs index 983994d5..e9c7b6a8 100644 --- a/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs +++ b/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/SpotCheckService.cs b/SGGL/BLL/CQMS/Check/SpotCheckService.cs index 544018c8..c84fb439 100644 --- a/SGGL/BLL/CQMS/Check/SpotCheckService.cs +++ b/SGGL/BLL/CQMS/Check/SpotCheckService.cs @@ -8,7 +8,7 @@ namespace BLL { public class SpotCheckService { - + /// /// 添加实体验收记录 diff --git a/SGGL/BLL/CQMS/Check/TechnicalContactListApproveService.cs b/SGGL/BLL/CQMS/Check/TechnicalContactListApproveService.cs index 9bc1fdc0..af0c842d 100644 --- a/SGGL/BLL/CQMS/Check/TechnicalContactListApproveService.cs +++ b/SGGL/BLL/CQMS/Check/TechnicalContactListApproveService.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs b/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs index e650593b..0ab72629 100644 --- a/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs +++ b/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Web.UI.WebControls; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Comprehensive/ConTechnologyDisclosureService.cs b/SGGL/BLL/CQMS/Comprehensive/ConTechnologyDisclosureService.cs index 4a7d6d3d..ebc040da 100644 --- a/SGGL/BLL/CQMS/Comprehensive/ConTechnologyDisclosureService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/ConTechnologyDisclosureService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { @@ -65,7 +61,7 @@ namespace BLL newCon.DisclosureDate = con.DisclosureDate; newCon.UnitWorkId = con.UnitWorkId; newCon.AttendMan = con.AttendMan; - newCon.DisclosurePersonNum = con.DisclosurePersonNum; + newCon.DisclosurePersonNum = con.DisclosurePersonNum; newCon.RemarkCode = con.RemarkCode; Funs.DB.SubmitChanges(); } diff --git a/SGGL/BLL/CQMS/Comprehensive/QualityAssuranceService.cs b/SGGL/BLL/CQMS/Comprehensive/QualityAssuranceService.cs index 6fcb57cc..7761db37 100644 --- a/SGGL/BLL/CQMS/Comprehensive/QualityAssuranceService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/QualityAssuranceService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/Comprehensive/ReviewDrawingsService.cs b/SGGL/BLL/CQMS/Comprehensive/ReviewDrawingsService.cs index 33213111..582644cf 100644 --- a/SGGL/BLL/CQMS/Comprehensive/ReviewDrawingsService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/ReviewDrawingsService.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Collections; namespace BLL { diff --git a/SGGL/BLL/CQMS/ManageReport/ProjectQualityWorkSummaryReportService.cs b/SGGL/BLL/CQMS/ManageReport/ProjectQualityWorkSummaryReportService.cs index 22b6c60c..030e9263 100644 --- a/SGGL/BLL/CQMS/ManageReport/ProjectQualityWorkSummaryReportService.cs +++ b/SGGL/BLL/CQMS/ManageReport/ProjectQualityWorkSummaryReportService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/ManageReport/ProjectQuarterlyProjectQualityService.cs b/SGGL/BLL/CQMS/ManageReport/ProjectQuarterlyProjectQualityService.cs index 7983d795..5ebb4b1c 100644 --- a/SGGL/BLL/CQMS/ManageReport/ProjectQuarterlyProjectQualityService.cs +++ b/SGGL/BLL/CQMS/ManageReport/ProjectQuarterlyProjectQualityService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { @@ -27,11 +23,11 @@ namespace BLL /// 单位Id /// 年度 /// 季度工程项目质量信息表 - public static Model.InformationProject_QuarterlyProjectQuality GetQuarterlyProjectQualityByUnitIdAndYearAndQuarter(string unitId, int year,int quarter) + public static Model.InformationProject_QuarterlyProjectQuality GetQuarterlyProjectQualityByUnitIdAndYearAndQuarter(string unitId, int year, int quarter) { return Funs.DB.InformationProject_QuarterlyProjectQuality.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Quarter == quarter); } - + /// /// 添加季度工程项目质量信息表 /// @@ -43,38 +39,38 @@ namespace BLL QuarterlyProjectQualityId = quarterlyProjectQuality.QuarterlyProjectQualityId, ProjectId = quarterlyProjectQuality.ProjectId, UnitId = quarterlyProjectQuality.UnitId, - Year=quarterlyProjectQuality.Year, + Year = quarterlyProjectQuality.Year, Quarter = quarterlyProjectQuality.Quarter, - QualityManagePersonNum=quarterlyProjectQuality.QualityManagePersonNum, - AdvancedTitlePersonNum=quarterlyProjectQuality.AdvancedTitlePersonNum, - IntermediateTitlePersonNum=quarterlyProjectQuality.IntermediateTitlePersonNum, - BeImplementedProjectNum=quarterlyProjectQuality.BeImplementedProjectNum, - StartImplementedProjectNum=quarterlyProjectQuality.StartImplementedProjectNum, - AccumulativeStartImplemented=quarterlyProjectQuality.AccumulativeStartImplemented, - CompleteProjectNum=quarterlyProjectQuality.CompleteProjectNum, + QualityManagePersonNum = quarterlyProjectQuality.QualityManagePersonNum, + AdvancedTitlePersonNum = quarterlyProjectQuality.AdvancedTitlePersonNum, + IntermediateTitlePersonNum = quarterlyProjectQuality.IntermediateTitlePersonNum, + BeImplementedProjectNum = quarterlyProjectQuality.BeImplementedProjectNum, + StartImplementedProjectNum = quarterlyProjectQuality.StartImplementedProjectNum, + AccumulativeStartImplemented = quarterlyProjectQuality.AccumulativeStartImplemented, + CompleteProjectNum = quarterlyProjectQuality.CompleteProjectNum, YearCompleteProjectNum = quarterlyProjectQuality.YearCompleteProjectNum, - QuarterTotal= quarterlyProjectQuality.QuarterTotal, - QuarterFirstPassNum=quarterlyProjectQuality.QuarterFirstPassNum, - QuarterFirstPassRate=quarterlyProjectQuality.QuarterFirstPassRate, - YearTotal=quarterlyProjectQuality.YearTotal, - YearFirstPassNum=quarterlyProjectQuality.YearFirstPassNum, - YearFirstPassRate=quarterlyProjectQuality.YearFirstPassRate, - QuaterCheckSuperviseNum=quarterlyProjectQuality.QuaterCheckSuperviseNum, - QuaterCorrectiveNoticeNum=quarterlyProjectQuality.QuaterCorrectiveNoticeNum, - QuaterQualityProblemNum=quarterlyProjectQuality.QuaterQualityProblemNum, - QuaterClosedQualityProblemNum=quarterlyProjectQuality.QuaterClosedQualityProblemNum, + QuarterTotal = quarterlyProjectQuality.QuarterTotal, + QuarterFirstPassNum = quarterlyProjectQuality.QuarterFirstPassNum, + QuarterFirstPassRate = quarterlyProjectQuality.QuarterFirstPassRate, + YearTotal = quarterlyProjectQuality.YearTotal, + YearFirstPassNum = quarterlyProjectQuality.YearFirstPassNum, + YearFirstPassRate = quarterlyProjectQuality.YearFirstPassRate, + QuaterCheckSuperviseNum = quarterlyProjectQuality.QuaterCheckSuperviseNum, + QuaterCorrectiveNoticeNum = quarterlyProjectQuality.QuaterCorrectiveNoticeNum, + QuaterQualityProblemNum = quarterlyProjectQuality.QuaterQualityProblemNum, + QuaterClosedQualityProblemNum = quarterlyProjectQuality.QuaterClosedQualityProblemNum, YearCheckSuperviseNum = quarterlyProjectQuality.YearCheckSuperviseNum, - YearCorrectiveNoticeNum=quarterlyProjectQuality.YearCorrectiveNoticeNum, + YearCorrectiveNoticeNum = quarterlyProjectQuality.YearCorrectiveNoticeNum, YearQualityProblemNum = quarterlyProjectQuality.YearQualityProblemNum, - YearClosedQualityProblemNum=quarterlyProjectQuality.YearClosedQualityProblemNum, + YearClosedQualityProblemNum = quarterlyProjectQuality.YearClosedQualityProblemNum, QuaterQualityAccidentNum = quarterlyProjectQuality.QuaterQualityAccidentNum, QuaterDirectEconomicLoss = quarterlyProjectQuality.QuaterDirectEconomicLoss, YearQualityAccidentNum = quarterlyProjectQuality.YearQualityAccidentNum, - YearDirectEconomicLoss=quarterlyProjectQuality.YearDirectEconomicLoss, - ResponsiblePerson=quarterlyProjectQuality.ResponsiblePerson, + YearDirectEconomicLoss = quarterlyProjectQuality.YearDirectEconomicLoss, + ResponsiblePerson = quarterlyProjectQuality.ResponsiblePerson, CompileMan = quarterlyProjectQuality.CompileMan, CompileDate = quarterlyProjectQuality.CompileDate, - Tel=quarterlyProjectQuality.Tel + Tel = quarterlyProjectQuality.Tel }; Funs.DB.InformationProject_QuarterlyProjectQuality.InsertOnSubmit(newQuarterlyProjectQuality); Funs.DB.SubmitChanges(); diff --git a/SGGL/BLL/CQMS/Material/CQMS_ConstructionTestService.cs b/SGGL/BLL/CQMS/Material/CQMS_ConstructionTestService.cs index fa5dc31e..54f3d410 100644 --- a/SGGL/BLL/CQMS/Material/CQMS_ConstructionTestService.cs +++ b/SGGL/BLL/CQMS/Material/CQMS_ConstructionTestService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/Material/CQMS_EquipmentService.cs b/SGGL/BLL/CQMS/Material/CQMS_EquipmentService.cs index ede171f4..8d1f47b6 100644 --- a/SGGL/BLL/CQMS/Material/CQMS_EquipmentService.cs +++ b/SGGL/BLL/CQMS/Material/CQMS_EquipmentService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/Material/CQMS_InspectionApproveService.cs b/SGGL/BLL/CQMS/Material/CQMS_InspectionApproveService.cs index 086c41f6..a1fa49b7 100644 --- a/SGGL/BLL/CQMS/Material/CQMS_InspectionApproveService.cs +++ b/SGGL/BLL/CQMS/Material/CQMS_InspectionApproveService.cs @@ -1,8 +1,6 @@ using System; -using System.Collections.Generic; using System.Data; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Material/CQMS_InspectionService.cs b/SGGL/BLL/CQMS/Material/CQMS_InspectionService.cs index 0a7351b1..dd3efff0 100644 --- a/SGGL/BLL/CQMS/Material/CQMS_InspectionService.cs +++ b/SGGL/BLL/CQMS/Material/CQMS_InspectionService.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System.Linq; +using System.Linq; using System.Web.UI.WebControls; namespace BLL diff --git a/SGGL/BLL/CQMS/Material/CQMS_MaterialService.cs b/SGGL/BLL/CQMS/Material/CQMS_MaterialService.cs index f481d62c..93bd4d7e 100644 --- a/SGGL/BLL/CQMS/Material/CQMS_MaterialService.cs +++ b/SGGL/BLL/CQMS/Material/CQMS_MaterialService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/Material/CQMS_MaterialTestService.cs b/SGGL/BLL/CQMS/Material/CQMS_MaterialTestService.cs index 0b999e79..03aa416f 100644 --- a/SGGL/BLL/CQMS/Material/CQMS_MaterialTestService.cs +++ b/SGGL/BLL/CQMS/Material/CQMS_MaterialTestService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/Material/CQMS_NoticeAndSupervisionService.cs b/SGGL/BLL/CQMS/Material/CQMS_NoticeAndSupervisionService.cs index aa3b4b89..da0365b0 100644 --- a/SGGL/BLL/CQMS/Material/CQMS_NoticeAndSupervisionService.cs +++ b/SGGL/BLL/CQMS/Material/CQMS_NoticeAndSupervisionService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/Meeting/CQMS_MeetingApproveService.cs b/SGGL/BLL/CQMS/Meeting/CQMS_MeetingApproveService.cs index 73f74f84..0c4481fd 100644 --- a/SGGL/BLL/CQMS/Meeting/CQMS_MeetingApproveService.cs +++ b/SGGL/BLL/CQMS/Meeting/CQMS_MeetingApproveService.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Data; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs b/SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs index 1b122356..19c279d2 100644 --- a/SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs +++ b/SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs @@ -10,7 +10,7 @@ namespace BLL /// public static class CQMS_MeetingService { - + /// /// 根据主键获取质量会议 diff --git a/SGGL/BLL/CQMS/Models/QualityModelService.cs b/SGGL/BLL/CQMS/Models/QualityModelService.cs index 334adca1..8ec0eac3 100644 --- a/SGGL/BLL/CQMS/Models/QualityModelService.cs +++ b/SGGL/BLL/CQMS/Models/QualityModelService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { @@ -219,10 +216,10 @@ namespace BLL var q = db.Model_QualityModel.FirstOrDefault(e => e.QualityModelId == QualityModelId); if (q != null) { - q.CompanyModelId = q.CompanyModelId + "$" + (from y in db.Base_CompanyModel where y.CompanyModelId == q.CompanyModelId select y.ModelType).First() + "$"+ (from y in db.Base_CompanyModelKind - join z in db.Base_CompanyModel on y.CompanyModelKindId equals z.CompanyModelKindId - where z.CompanyModelId == q.CompanyModelId - select y.CompanyModelKindName).First(); + q.CompanyModelId = q.CompanyModelId + "$" + (from y in db.Base_CompanyModel where y.CompanyModelId == q.CompanyModelId select y.ModelType).First() + "$" + (from y in db.Base_CompanyModelKind + join z in db.Base_CompanyModel on y.CompanyModelKindId equals z.CompanyModelKindId + where z.CompanyModelId == q.CompanyModelId + select y.CompanyModelKindName).First(); q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan); q.AttachUrlModel = AttachFileService.getFileUrl(q.CompanyModelId); q.AttachUrl = AttachFileService.getFileUrl(q.QualityModelId); diff --git a/SGGL/BLL/CQMS/PersonManage/CQMS_TestPlanDetailService.cs b/SGGL/BLL/CQMS/PersonManage/CQMS_TestPlanDetailService.cs index 1970f3e6..236ad2dc 100644 --- a/SGGL/BLL/CQMS/PersonManage/CQMS_TestPlanDetailService.cs +++ b/SGGL/BLL/CQMS/PersonManage/CQMS_TestPlanDetailService.cs @@ -1,10 +1,6 @@ -using System; +using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Collections; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/PersonManage/CQMS_TestPlanService.cs b/SGGL/BLL/CQMS/PersonManage/CQMS_TestPlanService.cs index beb43c14..aebd80d8 100644 --- a/SGGL/BLL/CQMS/PersonManage/CQMS_TestPlanService.cs +++ b/SGGL/BLL/CQMS/PersonManage/CQMS_TestPlanService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs index 4648a809..e7f4a0c2 100644 --- a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs +++ b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Data; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs index f3ae2505..17c3af06 100644 --- a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs +++ b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Web.UI.WebControls; namespace BLL { @@ -60,7 +59,7 @@ namespace BLL newSubPlan.CompileDate = SubPlan.CompileDate; newSubPlan.State = SubPlan.State; newSubPlan.Edition = SubPlan.Edition; - newSubPlan.FilePath=SubPlan.FilePath; + newSubPlan.FilePath = SubPlan.FilePath; db.Plan_SubPlan.InsertOnSubmit(newSubPlan); db.SubmitChanges(); } @@ -226,8 +225,8 @@ namespace BLL StateStr = ConvertState(x.State), CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(), UnitName = BLL.UnitService.GetUnitNameByUnitId(x.UnitId), - UnitWorkNames=BLL.UnitWorkService.GetUnitWorkName(x.UnitWorkIds), - CNProfessionalNames=BLL.CNProfessionalService.GetCNProfessionalNameByCode(x.CNProfessionalCodes), + UnitWorkNames = BLL.UnitWorkService.GetUnitWorkName(x.UnitWorkIds), + CNProfessionalNames = BLL.CNProfessionalService.GetCNProfessionalNameByCode(x.CNProfessionalCodes), HandleManName = BLL.CQMS_SubPlanApproveService.GetHandleManName(x.SubPlanId), FilePath = x.FilePath, }; @@ -239,9 +238,9 @@ namespace BLL cd.SubPlanId = item.SubPlanId; cd.ProjectId = item.ProjectId; cd.Code = item.Code; - cd.UnitId=item.UnitId + "$" + item.UnitName; + cd.UnitId = item.UnitId + "$" + item.UnitName; cd.PlanName = item.PlanName; - cd.UnitWorkIds=item.UnitWorkIds + "$" + item.UnitWorkNames; + cd.UnitWorkIds = item.UnitWorkIds + "$" + item.UnitWorkNames; cd.CNProfessionalCodes = item.CNProfessionalCodes + "$" + item.CNProfessionalNames; cd.CompileDate = item.CompileDate; cd.CompileMan = item.CompileMan + "$" + item.CompileManName; @@ -261,13 +260,13 @@ namespace BLL /// 一个分包施工质量计划实体 public static Model.Plan_SubPlan GetSubPlanBySubPlanIdForApi(string SubPlanId) { - var q= Funs.DB.Plan_SubPlan.FirstOrDefault(x => x.SubPlanId == SubPlanId); + var q = Funs.DB.Plan_SubPlan.FirstOrDefault(x => x.SubPlanId == SubPlanId); if (q != null) { q.UnitId = q.UnitId + "$" + BLL.UnitService.GetUnitNameByUnitId(q.UnitId); q.UnitWorkIds = q.UnitWorkIds + "$" + BLL.UnitWorkService.GetUnitWorkName(q.UnitWorkIds); q.CNProfessionalCodes = q.CNProfessionalCodes + "$" + BLL.CNProfessionalService.GetCNProfessionalNameByCode(q.CNProfessionalCodes); - q.CompileMan=q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan); + q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan); q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_SubPlanApproveService.GetHandleManName(q.SubPlanId); } return q; diff --git a/SGGL/BLL/CQMS/Plan/CQMS_TechnicalProposalReviewService.cs b/SGGL/BLL/CQMS/Plan/CQMS_TechnicalProposalReviewService.cs index 3388deb7..bdd5af04 100644 --- a/SGGL/BLL/CQMS/Plan/CQMS_TechnicalProposalReviewService.cs +++ b/SGGL/BLL/CQMS/Plan/CQMS_TechnicalProposalReviewService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs b/SGGL/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs index f5503186..2d2a77ce 100644 --- a/SGGL/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs +++ b/SGGL/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { @@ -54,7 +52,7 @@ namespace BLL newQCGroupRegistration.Code = QCGroupRegistration.Code; newQCGroupRegistration.Name = QCGroupRegistration.Name; newQCGroupRegistration.CompileMan = QCGroupRegistration.CompileMan; - newQCGroupRegistration.CompileDate = QCGroupRegistration.CompileDate; + newQCGroupRegistration.CompileDate = QCGroupRegistration.CompileDate; newQCGroupRegistration.UnitId = QCGroupRegistration.UnitId; newQCGroupRegistration.Subjects = QCGroupRegistration.Subjects; newQCGroupRegistration.Process = QCGroupRegistration.Process; diff --git a/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishApproveService.cs b/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishApproveService.cs index 4c5338be..b3c1707a 100644 --- a/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishApproveService.cs +++ b/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishApproveService.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Data; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishService.cs b/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishService.cs index a305ca85..707af226 100644 --- a/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishService.cs +++ b/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishService.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Web.UI.WebControls; @@ -10,7 +9,7 @@ namespace BLL /// public static class RewardAndPunishService { - + /// /// 根据主键获取质量奖罚 @@ -63,7 +62,7 @@ namespace BLL State = RewardAndPunish.State, CompileMan = RewardAndPunish.CompileMan, CompileDate = RewardAndPunish.CompileDate, - RewardAndPunishDecision=RewardAndPunish.RewardAndPunishDecision, + RewardAndPunishDecision = RewardAndPunish.RewardAndPunishDecision, }; db.RewardAndPunish_RewardAndPunish.InsertOnSubmit(newRewardAndPunish); diff --git a/SGGL/BLL/CQMS/Technical/CQMS_TechnicalDiscloseService.cs b/SGGL/BLL/CQMS/Technical/CQMS_TechnicalDiscloseService.cs index fe5ee23e..0a8fcb26 100644 --- a/SGGL/BLL/CQMS/Technical/CQMS_TechnicalDiscloseService.cs +++ b/SGGL/BLL/CQMS/Technical/CQMS_TechnicalDiscloseService.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs b/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs index 475a0175..a7dd1ea2 100644 --- a/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs +++ b/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Web.UI.WebControls; namespace BLL { diff --git a/SGGL/BLL/CQMS/Unqualified/WorkContactApproveService.cs b/SGGL/BLL/CQMS/Unqualified/WorkContactApproveService.cs index a98472e3..672b21fd 100644 --- a/SGGL/BLL/CQMS/Unqualified/WorkContactApproveService.cs +++ b/SGGL/BLL/CQMS/Unqualified/WorkContactApproveService.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageDetailService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageDetailService.cs index 98777b83..1ca4c7c5 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageDetailService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageDetailService.cs @@ -1,9 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Web.UI.WebControls; namespace BLL { diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageInitService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageInitService.cs index b5af2eab..15fa27f2 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageInitService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageInitService.cs @@ -87,7 +87,7 @@ namespace BLL public static string GetWorkPackageCodeByPackageContent(string packageContent) { string workPackageCode = string.Empty; - var q= Funs.DB.WBS_WorkPackageInit.FirstOrDefault(x => x.PackageContent == packageContent); + var q = Funs.DB.WBS_WorkPackageInit.FirstOrDefault(x => x.PackageContent == packageContent); if (q != null) { workPackageCode = q.WorkPackageCode; diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageParentDetailService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageParentDetailService.cs index 4f14044a..50ac13b8 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageParentDetailService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageParentDetailService.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/Common/AttachFileService.cs b/SGGL/BLL/Common/AttachFileService.cs index e38782ca..185a565e 100644 --- a/SGGL/BLL/Common/AttachFileService.cs +++ b/SGGL/BLL/Common/AttachFileService.cs @@ -465,6 +465,30 @@ namespace BLL } + /// + /// 判断文件类型是否是图片 + /// + /// + /// + public static bool IsImage(string FiletExtension) + { + bool result = false; + List list = new List(); + list.Add(".png"); + list.Add(".jpg"); + list.Add(".jpeg"); + foreach (var item in list) + { + if (item == FiletExtension) + { + result = true; + break; + } + } + return result; + } + + #region 根据图片路径转换为base64 /// /// 根据图片路径转换为base64 diff --git a/SGGL/BLL/Common/CommonService.cs b/SGGL/BLL/Common/CommonService.cs index 93c94a29..d2ac7d52 100644 --- a/SGGL/BLL/Common/CommonService.cs +++ b/SGGL/BLL/Common/CommonService.cs @@ -355,8 +355,8 @@ namespace BLL } else { - var uinit =UnitService.GetUnitByUnitId(unitId); - if (uinit != null && uinit.IsBranch ==true) + var uinit = UnitService.GetUnitByUnitId(unitId); + if (uinit != null && uinit.IsBranch == true) { result = true; } diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 47c1d207..9b2dcfea 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -857,7 +857,7 @@ namespace BLL /// /// 发起检查 /// - public const string CheckInfoMenuId = "6090DD54-FE59-4011-92EE-9906C9BC69B6"; + public const string CheckInfoMenuId = "6090DD54-FE59-4011-92EE-9906C9BC69B6"; /// /// 实业 @@ -3221,19 +3221,19 @@ namespace BLL /// /// 工程量清单菜单id /// - public const string TemQuantityListMenuId0= "326AA80C-6B01-4214-ACF2-B29595BA28D5"; - public const string TemQuantityListMenuId1= "0A679077-6D89-4272-A1B0-CF384DEDC9B8"; - public const string TemQuantityListMenuId2= "0E04FA16-FFA6-4987-A0A5-A4658F0099F2"; - public const string TemQuantityListMenuId3= "FAC4F0F7-A7C0-4F66-8BCB-846C082BCA40"; - public const string TemQuantityListMenuId4= "10586190-0FDD-4DA8-A877-CE4599D6F0DF"; - public const string TemQuantityListMenuId5= "1C770E20-7912-484C-9739-499B1B2F8DEB"; - public const string TemQuantityListMenuId5_1= "3593DF22-78C1-4A73-8468-B20CB44D88C9"; - public const string TemQuantityListMenuId5_2= "3ECE6333-6785-424D-996E-B923A650D8C7"; - public const string TemQuantityListMenuId5_3= "480F8C85-F5F2-4C5C-BE72-2ADABB7250CF"; - public const string TemQuantityListMenuId6= "92101A90-9C22-4B43-B012-9AFF8402F85D"; - public const string TemQuantityListMenuId7= "33A03E2C-4E00-4722-AA14-F50419468154"; - public const string TemQuantityListMenuId8= "A5A31FE8-0643-4396-99E3-A4A31A947789"; - public const string TemQuantityListMenuId9= "481E6B1E-A3D5-4012-B828-FE62EB6BA861"; + public const string TemQuantityListMenuId0 = "326AA80C-6B01-4214-ACF2-B29595BA28D5"; + public const string TemQuantityListMenuId1 = "0A679077-6D89-4272-A1B0-CF384DEDC9B8"; + public const string TemQuantityListMenuId2 = "0E04FA16-FFA6-4987-A0A5-A4658F0099F2"; + public const string TemQuantityListMenuId3 = "FAC4F0F7-A7C0-4F66-8BCB-846C082BCA40"; + public const string TemQuantityListMenuId4 = "10586190-0FDD-4DA8-A877-CE4599D6F0DF"; + public const string TemQuantityListMenuId5 = "1C770E20-7912-484C-9739-499B1B2F8DEB"; + public const string TemQuantityListMenuId5_1 = "3593DF22-78C1-4A73-8468-B20CB44D88C9"; + public const string TemQuantityListMenuId5_2 = "3ECE6333-6785-424D-996E-B923A650D8C7"; + public const string TemQuantityListMenuId5_3 = "480F8C85-F5F2-4C5C-BE72-2ADABB7250CF"; + public const string TemQuantityListMenuId6 = "92101A90-9C22-4B43-B012-9AFF8402F85D"; + public const string TemQuantityListMenuId7 = "33A03E2C-4E00-4722-AA14-F50419468154"; + public const string TemQuantityListMenuId8 = "A5A31FE8-0643-4396-99E3-A4A31A947789"; + public const string TemQuantityListMenuId9 = "481E6B1E-A3D5-4012-B828-FE62EB6BA861"; /// /// 招标工程量清单定制 /// diff --git a/SGGL/BLL/Common/CreateQRCodeService.cs b/SGGL/BLL/Common/CreateQRCodeService.cs index 4f2c0f1f..93e76a6e 100644 --- a/SGGL/BLL/Common/CreateQRCodeService.cs +++ b/SGGL/BLL/Common/CreateQRCodeService.cs @@ -1,9 +1,8 @@ -using NPOI.OpenXmlFormats.Shared; +using QRCoder; using System; using System.IO; using System.Text; using ThoughtWorks.QRCode.Codec; -using QRCoder; namespace BLL { @@ -61,7 +60,7 @@ namespace BLL int iconBorderWidth:水印图标的边框。不能设为0,否则会显示“参数错误”,程序运行出错。 bool drawQuietZones:静止区,即是否绘画二维码的空白边框区域,默认为true。 */ - public static string CreateCode_Simple(string nr,string filename) + public static string CreateCode_Simple(string nr, string filename) { try { @@ -89,7 +88,7 @@ namespace BLL { Directory.CreateDirectory(filepath); } - // string filename = DateTime.Now.ToString("yyyymmddhhmmssfff").ToString() + ".jpg"; + // string filename = DateTime.Now.ToString("yyyymmddhhmmssfff").ToString() + ".jpg"; filename = filename + ".jpg"; //if (File.Exists(filepath + filename)) //{ diff --git a/SGGL/BLL/Common/FastReport.cs b/SGGL/BLL/Common/FastReport.cs index a044c483..9ecf8a8b 100644 --- a/SGGL/BLL/Common/FastReport.cs +++ b/SGGL/BLL/Common/FastReport.cs @@ -1,11 +1,7 @@ -using System.Web; -using System.Web.Security; +using FastReport; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Data; -using FastReport; +using System.Web; namespace BLL { diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index a92041d7..df9536a4 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -2,7 +2,6 @@ namespace BLL { using MiniExcelLibs; using Model; - using NPOI.SS.Formula.Functions; using Quartz; using RestSharp; using System; @@ -1212,7 +1211,7 @@ namespace BLL p.SetValue(entity, Convert.ToInt32(row[p.Name]), null); continue; } - + p.SetValue(entity, row[p.Name], null); } list.Add(entity); @@ -1364,7 +1363,7 @@ namespace BLL /// /// ÿҳ /// - public static int GetEndPageNumber(int pageTotal,int pagesize ) + public static int GetEndPageNumber(int pageTotal, int pagesize) { double aa = (pageTotal + pagesize - 1) / pagesize; //ʹ/ÿҳʾҳdouble @@ -1451,7 +1450,7 @@ namespace BLL return response.Content; } - public static string RequestPost(string Baseurl, Dictionary Token, string JsonBody) + public static string RequestPost(string Baseurl, Dictionary Token, string JsonBody) { ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; @@ -1461,7 +1460,7 @@ namespace BLL foreach (var item in Token) { request.AddHeader(item.Key, item.Value); - } + } request.AddHeader("ClientId", SysConstSetService.ClientId); request.AddHeader("OperationCode", Baseurl.Substring(Baseurl.LastIndexOf("/", StringComparison.Ordinal) + 1)); if (!string.IsNullOrEmpty(JsonBody)) diff --git a/SGGL/BLL/Common/MultiHeaderTable.cs b/SGGL/BLL/Common/MultiHeaderTable.cs index 1e99cd70..3fa8c588 100644 --- a/SGGL/BLL/Common/MultiHeaderTable.cs +++ b/SGGL/BLL/Common/MultiHeaderTable.cs @@ -1,6 +1,6 @@ using FineUIPro; -using System.Collections.Generic; using System; +using System.Collections.Generic; /// /// 处理多表头的类 /// diff --git a/SGGL/BLL/Common/PrinterDocService.cs b/SGGL/BLL/Common/PrinterDocService.cs index 99df54a3..fb910e90 100644 --- a/SGGL/BLL/Common/PrinterDocService.cs +++ b/SGGL/BLL/Common/PrinterDocService.cs @@ -1,6 +1,5 @@ namespace BLL { - using System; using System.Collections.Generic; using System.Data; using System.Linq; @@ -272,9 +271,9 @@ public static string GetRectifyNoticesTableHtmlAll(string projectId) { StringBuilder sb = new StringBuilder(); - var getRectifyNoticesAll = from x in Funs.DB.Check_RectifyNotices + var getRectifyNoticesAll = from x in Funs.DB.Check_RectifyNotices orderby x.RectifyNoticesCode - where x.ProjectId == projectId + where x.ProjectId == projectId select x; sb.Append(""); foreach (var getRectifyNotices in getRectifyNoticesAll) @@ -641,7 +640,7 @@ where x.ProjectId == projectId select x; foreach (var getRectifyNotices in getRectifyNoticesAll) - { + { sb.Append(""); sb.Append(""); sb.AppendFormat(" ", "安全隐患整改反馈单"); diff --git a/SGGL/BLL/Common/ProjectDataFlowSetService.cs b/SGGL/BLL/Common/ProjectDataFlowSetService.cs index 10e39813..8ba576b4 100644 --- a/SGGL/BLL/Common/ProjectDataFlowSetService.cs +++ b/SGGL/BLL/Common/ProjectDataFlowSetService.cs @@ -1,6 +1,4 @@ -using Model; - -namespace BLL +namespace BLL { using System; using System.Collections; diff --git a/SGGL/BLL/Common/Sys_CQMS_DataInTempService.cs b/SGGL/BLL/Common/Sys_CQMS_DataInTempService.cs index 8b1bbef5..4e709f76 100644 --- a/SGGL/BLL/Common/Sys_CQMS_DataInTempService.cs +++ b/SGGL/BLL/Common/Sys_CQMS_DataInTempService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/Common/WeatherService.cs b/SGGL/BLL/Common/WeatherService.cs index cc194d10..76906644 100644 --- a/SGGL/BLL/Common/WeatherService.cs +++ b/SGGL/BLL/Common/WeatherService.cs @@ -9,7 +9,7 @@ namespace BLL /// public class WeatherService { - + /// /// 根据主键获取事故类型 diff --git a/SGGL/BLL/Common/WordHelp.cs b/SGGL/BLL/Common/WordHelp.cs index 3a65d367..eb9404bb 100644 --- a/SGGL/BLL/Common/WordHelp.cs +++ b/SGGL/BLL/Common/WordHelp.cs @@ -1,5 +1,4 @@ using Aspose.Words; -using Microsoft.Office.Interop.Excel; using System; using System.IO; using System.Net; @@ -242,7 +241,7 @@ namespace BLL } } } - public static void WordIntoPdf(string wordPath, string pdfPath) +/* public static void WordIntoPdf(string wordPath, string pdfPath) { Microsoft.Office.Interop.Word.Application application = new Microsoft.Office.Interop.Word.Application(); Microsoft.Office.Interop.Word.Document document = null; @@ -261,7 +260,7 @@ namespace BLL document.Close(); } } - +*/ /// /// html代码转word /// @@ -281,7 +280,7 @@ namespace BLL sw.Flush(); sw.Close(); } - public static string WordToHtml(object wordFileName) +/* public static string WordToHtml(object wordFileName) { //在此处放置用户代码以初始化页面 Microsoft.Office.Interop.Word.ApplicationClass word = new Microsoft.Office.Interop.Word.ApplicationClass(); @@ -340,7 +339,7 @@ namespace BLL //process.Start(); } - #endregion + #endregion*/ //public static string GetPathByDocToHTML(string strFile) //{ // if (string.IsNullOrEmpty(strFile)) diff --git a/SGGL/BLL/DCGL/ServerCheck/DCGLCheckNoticeItemService.cs b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckNoticeItemService.cs index 31313172..1bc69b81 100644 --- a/SGGL/BLL/DCGL/ServerCheck/DCGLCheckNoticeItemService.cs +++ b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckNoticeItemService.cs @@ -1,9 +1,4 @@ -using Model; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyItemService.cs b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyItemService.cs index 9cb9afe4..10fb27b3 100644 --- a/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyItemService.cs +++ b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyItemService.cs @@ -1,9 +1,5 @@ -using Model; -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs index 01b1c0aa..051820f1 100644 --- a/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs +++ b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { - public static class DCGLCheckRectifyService + public static class DCGLCheckRectifyService { /// /// 根据整改ID获取督查检查信息 diff --git a/SGGL/BLL/DigData/CQMSDataDWService .cs b/SGGL/BLL/DigData/CQMSDataDWService .cs index 394a110a..aa4eeef8 100644 --- a/SGGL/BLL/DigData/CQMSDataDWService .cs +++ b/SGGL/BLL/DigData/CQMSDataDWService .cs @@ -2,7 +2,6 @@ using System; using System.Collections; using System.Linq; -using Model; namespace BLL { @@ -36,7 +35,7 @@ namespace BLL /// /// /// - public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) + public static IEnumerable getDataDWList(string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) { IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) @@ -82,7 +81,7 @@ namespace BLL int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格 // this.lbSpotCheck2.Text= okCount.ToString(); - return all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%"; + return all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%"; } /// @@ -90,17 +89,17 @@ namespace BLL /// /// /// - public static string getSpotCheckDataRate(string projectId) + public static string getSpotCheckDataRate(string projectId) { var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode - where (y.ProjectId == projectId || projectId == null) && y.State == "8" + where (y.ProjectId == projectId || projectId == null) && y.State == "8" select x; /// 资料验收合格项目 var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true); int okYSCount = getOKSpotCheckDetail.Count(); //验收合格 int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格 - return okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%"; + return okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%"; } /// @@ -110,7 +109,7 @@ namespace BLL /// public static string getCheckControlStates(string projectId) { - var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl + var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl where (x.ProjectId == projectId || projectId == null) select x; int allCheckControlCount = getCheck_CheckControl.Count(); @@ -136,7 +135,7 @@ namespace BLL int allHJCount = getJots.Count(); var getOk = getJots.Where(x => x.CheckResult == "1"); int okHJCount = getOk.Count(); - return allHJCount > 0 ? Math.Round(okHJCount * 100.0 / (allHJCount * 1.0)).ToString() + "%" : "0%"; + return allHJCount > 0 ? Math.Round(okHJCount * 100.0 / (allHJCount * 1.0)).ToString() + "%" : "0%"; } } } \ No newline at end of file diff --git a/SGGL/BLL/DigData/HSEDataDWService.cs b/SGGL/BLL/DigData/HSEDataDWService.cs index 0803eba6..0d674c36 100644 --- a/SGGL/BLL/DigData/HSEDataDWService.cs +++ b/SGGL/BLL/DigData/HSEDataDWService.cs @@ -2,7 +2,6 @@ using System; using System.Collections; using System.Linq; -using Model; namespace BLL { @@ -36,7 +35,7 @@ namespace BLL /// /// /// - public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) + public static IEnumerable getDataDWList(string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) { IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) @@ -57,9 +56,9 @@ namespace BLL x.ProjectId, x.ProjectName, x.ProjectCode, - Count1=db1.SitePerson_Person.Where(p=>p.ProjectId == x.ProjectId && p.States == Const.ProjectPersonStates_1).Count(), //人员数量 + Count1 = db1.SitePerson_Person.Where(p => p.ProjectId == x.ProjectId && p.States == Const.ProjectPersonStates_1).Count(), //人员数量 Count2 = getProjecctSafeHours(x.ProjectId), //安全人工时 - Count3 =db1.EduTrain_TrainRecord.Where(p => p.ProjectId == x.ProjectId && p.States == BLL.Const.State_2).Count(), //安全培训次数 + Count3 = db1.EduTrain_TrainRecord.Where(p => p.ProjectId == x.ProjectId && p.States == BLL.Const.State_2).Count(), //安全培训次数 ProblemRate = getProblemRate(x.ProjectId), //安全巡检整改率 }; } @@ -79,7 +78,7 @@ namespace BLL if (getPersonInOutNumber != null) { count = getPersonInOutNumber.WorkHours ?? 0; - } + } return count; } diff --git a/SGGL/BLL/DigData/HTGLDataDWService.cs b/SGGL/BLL/DigData/HTGLDataDWService.cs index 72324a87..cdc2163d 100644 --- a/SGGL/BLL/DigData/HTGLDataDWService.cs +++ b/SGGL/BLL/DigData/HTGLDataDWService.cs @@ -2,7 +2,6 @@ using System; using System.Collections; using System.Linq; -using Model; namespace BLL { @@ -25,7 +24,7 @@ namespace BLL /// 定义变量 /// private static IQueryable getDataLists = from x in Funs.DB.Base_Project - select x; + select x; /// /// 合同管理数据仓库 @@ -35,7 +34,7 @@ namespace BLL /// /// /// - public static IEnumerable getDataDWList( string projectId, Grid Grid1) + public static IEnumerable getDataDWList(string projectId, Grid Grid1) { var getDataList = from x in Funs.DB.Base_Project select x; if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) @@ -55,7 +54,7 @@ namespace BLL x.ProjectId, x.ProjectName, x.ProjectCode, - Count1= getTotalProfit(x.ProjectId), + Count1 = getTotalProfit(x.ProjectId), }; } #endregion @@ -67,16 +66,16 @@ namespace BLL if (getContract.Count() > 0) { contractAmount = getContract.Sum(x => x.ContractAmount ?? 0); - } + } decimal estimatedAmount = 0; var getContractTrack = Funs.DB.PHTGL_ContractTrack.Where(x => x.ProjectId == projectId); if (getContractTrack.Count() > 0) { estimatedAmount = getContractTrack.Sum(x => x.EstimatedAmount ?? 0); - } + } - return estimatedAmount > 0 ? Math.Round(contractAmount / estimatedAmount).ToString() + "%" : "0%"; + return estimatedAmount > 0 ? Math.Round(contractAmount / estimatedAmount).ToString() + "%" : "0%"; } } diff --git a/SGGL/BLL/DigData/JDGLDataDWService.cs b/SGGL/BLL/DigData/JDGLDataDWService.cs index 9fae9a90..98487e0a 100644 --- a/SGGL/BLL/DigData/JDGLDataDWService.cs +++ b/SGGL/BLL/DigData/JDGLDataDWService.cs @@ -2,7 +2,6 @@ using System; using System.Collections; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/DigData/ProblemAnalysisService.cs b/SGGL/BLL/DigData/ProblemAnalysisService.cs index 83367bf0..f1c1beac 100644 --- a/SGGL/BLL/DigData/ProblemAnalysisService.cs +++ b/SGGL/BLL/DigData/ProblemAnalysisService.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs b/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs index 0f2411fb..3b5649c1 100644 --- a/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs +++ b/SGGL/BLL/DigData/ProjectWBSAnalysisService.cs @@ -1,11 +1,7 @@ using FineUIPro; -using NPOI.SS.Formula.Functions; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Web.Util; -using Model; namespace BLL { @@ -112,7 +108,7 @@ namespace BLL { x.WorkPackageId, x.PackageContent, - Count1 = WBSAnalysisService.getWBSExpertArgumentCount(projectId,x.WorkPackageId), + Count1 = WBSAnalysisService.getWBSExpertArgumentCount(projectId, x.WorkPackageId), Count2 = WBSAnalysisService.getWBSAccidentCount(projectId, x.WorkPackageId), Count3 = WBSAnalysisService.getWBSHSEProblemCount(projectId, x.WorkPackageId), Count4 = WBSAnalysisService.getWBSSpotCheckRate(projectId, x.WorkPackageId), diff --git a/SGGL/BLL/DigData/WBSAnalysisService.cs b/SGGL/BLL/DigData/WBSAnalysisService.cs index 219290ec..ea0d559b 100644 --- a/SGGL/BLL/DigData/WBSAnalysisService.cs +++ b/SGGL/BLL/DigData/WBSAnalysisService.cs @@ -1,11 +1,8 @@ using FineUIPro; -using NPOI.SS.Formula.Functions; -using Org.BouncyCastle.Crypto.Tls; using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { @@ -28,7 +25,7 @@ namespace BLL /// 定义变量 /// private static IQueryable getDataLists = from x in Funs.DB.WBS_WorkPackageInit - select x; + select x; /// /// 合同管理数据仓库 @@ -39,9 +36,9 @@ namespace BLL /// /// public static IEnumerable getDataDWList(string workPackageId, Grid Grid1) - { + { var getDataList = getDataLists; - if (string.IsNullOrEmpty(workPackageId) ) + if (string.IsNullOrEmpty(workPackageId)) { List listWork = new List(); Model.WBS_WorkPackageInit work1 = new Model.WBS_WorkPackageInit @@ -85,9 +82,9 @@ namespace BLL { x.WorkPackageCode, x.PackageContent, - Count1= getWBSExpertArgumentCount(null, x.WorkPackageCode), - Count2 = getWBSAccidentCount(null,x.WorkPackageCode), - Count3 = getWBSHSEProblemCount(null, x.WorkPackageCode), + Count1 = getWBSExpertArgumentCount(null, x.WorkPackageCode), + Count2 = getWBSAccidentCount(null, x.WorkPackageCode), + Count3 = getWBSHSEProblemCount(null, x.WorkPackageCode), Count4 = getWBSSpotCheckRate(null, x.WorkPackageCode), Count5 = getWBSSpotCheckDataRate(null, x.WorkPackageCode), Count6 = getWBSCheckControlCount(null, x.WorkPackageCode), @@ -100,13 +97,13 @@ namespace BLL /// /// /// - public static int getWBSExpertArgumentCount(string projectId,string workPackageId) + public static int getWBSExpertArgumentCount(string projectId, string workPackageId) { var getLargerHazardListItem = from x in Funs.DB.Solution_LargerHazardListItem join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId - where x.WorkPackageId.Contains(workPackageId) + where x.WorkPackageId.Contains(workPackageId) && y.States == Const.State_1 - select new {x.LargerHazardListItemId,y.LargerHazardListId,y.ProjectId,x.WorkPackageId }; + select new { x.LargerHazardListItemId, y.LargerHazardListId, y.ProjectId, x.WorkPackageId }; if (!string.IsNullOrEmpty(projectId)) { getLargerHazardListItem = getLargerHazardListItem.Where(x => x.ProjectId == projectId); @@ -121,7 +118,7 @@ namespace BLL /// /// public static int getWBSAccidentCount(string projectId, string workPackageId) - { + { var getAccidentPersonRecord = from x in Funs.DB.Accident_AccidentPersonRecord where x.WorkPackageId.Contains(workPackageId) && x.States == Const.State_2 @@ -142,7 +139,7 @@ namespace BLL public static int getWBSHSEProblemCount(string projectId, string workPackageId) { var getHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister - where x.States != "4" && x.States != "0" + where x.States != "4" && x.States != "0" && x.WorkPackageId.Contains(workPackageId) select x; if (!string.IsNullOrEmpty(projectId)) @@ -162,9 +159,9 @@ namespace BLL { var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode - where x.WorkPackageId.Contains(workPackageId) && (projectId ==null || y.ProjectId == projectId) + where x.WorkPackageId.Contains(workPackageId) && (projectId == null || y.ProjectId == projectId) && y.State == "8" - select new { x.SpotCheckCode ,y.ProjectId,x.IsDataOK,x.IsOnesOK}; + select new { x.SpotCheckCode, y.ProjectId, x.IsDataOK, x.IsOnesOK }; if (!string.IsNullOrEmpty(projectId)) { getSpotCheckDetail = getSpotCheckDetail.Where(x => x.ProjectId == projectId); @@ -186,9 +183,9 @@ namespace BLL //// 实体验收 资料验收 var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode - where x.WorkPackageId.Contains(workPackageId) + where x.WorkPackageId.Contains(workPackageId) && y.State == "8" - select new { x.SpotCheckCode, y.ProjectId, x.IsDataOK, x.IsOnesOK,x.IsOK }; + select new { x.SpotCheckCode, y.ProjectId, x.IsDataOK, x.IsOnesOK, x.IsOK }; if (!string.IsNullOrEmpty(projectId)) { getSpotCheckDetail = getSpotCheckDetail.Where(x => x.ProjectId == projectId); @@ -209,7 +206,7 @@ namespace BLL public static int getWBSCheckControlCount(string projectId, string workPackageId) { var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl - where x.WorkPackageId.Contains(workPackageId) + where x.WorkPackageId.Contains(workPackageId) select x; if (!string.IsNullOrEmpty(projectId)) { diff --git a/SGGL/BLL/Doc/DocService.cs b/SGGL/BLL/Doc/DocService.cs index 37a3b0f3..a2e90d65 100644 --- a/SGGL/BLL/Doc/DocService.cs +++ b/SGGL/BLL/Doc/DocService.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System.Linq; +using System.Linq; namespace BLL { @@ -8,7 +7,7 @@ namespace BLL /// public static class DocService { - + /// /// 根据主键获取帮助文档 diff --git a/SGGL/BLL/DropListService.cs b/SGGL/BLL/DropListService.cs index 685a962e..f616d01e 100644 --- a/SGGL/BLL/DropListService.cs +++ b/SGGL/BLL/DropListService.cs @@ -1,5 +1,4 @@ -using BLL; -using System.Collections.Generic; +using System.Collections.Generic; namespace BLL { @@ -18,7 +17,7 @@ namespace BLL /// 下拉框名字 /// 是否显示请选择 public static void InitConstDropDownList(FineUIPro.DropDownList dropName, string groupId, bool isShowPlease) - { + { dropName.DataValueField = "Value"; dropName.DataTextField = "Text"; if (groupId == Group_IsPost) diff --git a/SGGL/BLL/HJGL/BaseInfo/Base_DNCompareService.cs b/SGGL/BLL/HJGL/BaseInfo/Base_DNCompareService.cs index a7df7932..707f4ba1 100644 --- a/SGGL/BLL/HJGL/BaseInfo/Base_DNCompareService.cs +++ b/SGGL/BLL/HJGL/BaseInfo/Base_DNCompareService.cs @@ -1,5 +1,4 @@ using Model; -using System; using System.Collections.Generic; using System.Linq; @@ -145,11 +144,11 @@ namespace BLL /// /// /// - public static decimal? GetThicknessByDNDia(int DN,string sch) + public static decimal? GetThicknessByDNDia(int DN, string sch) { decimal result = 0; var q = GetDNCompareByDN(DN); - if (q!=null) + if (q != null) { var diaProperty = q.GetType().GetProperty(sch); diaProperty = (diaProperty == null ? q.GetType().GetProperty(sch.Replace("Sch", "SCH")) : diaProperty); diff --git a/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs b/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs index 763b3fcc..0a1541ac 100644 --- a/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs +++ b/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs @@ -1,10 +1,8 @@ using FineUIPro; using Model; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -26,7 +24,7 @@ namespace BLL } private static IQueryable GetByQueryModle(Model.BaseMaterialcolorOutput table) { - var q = from x in Funs.DB.Base_MaterialColor + var q = from x in Funs.DB.Base_MaterialColor join y in Funs.DB.Base_Material on x.MaterialId equals y.MaterialId into yy from y in yy.DefaultIfEmpty() select new BaseMaterialcolorOutput @@ -39,7 +37,7 @@ namespace BLL ColorName = x.ColorName, ColorCardNo = x.ColorCardNo, RGB = x.RGB, - Remark= x.Remark, + Remark = x.Remark, }; if (table == null) @@ -150,7 +148,7 @@ namespace BLL { MaterialColorId = newtable.MaterialColorId, UnitId = newtable.UnitId, - ProjectId= newtable.ProjectId, + ProjectId = newtable.ProjectId, MaterialId = newtable.MaterialId, ColorName = newtable.ColorName, ColorCardNo = newtable.ColorCardNo, diff --git a/SGGL/BLL/HJGL/BaseInfo/MaterialCodeLibService.cs b/SGGL/BLL/HJGL/BaseInfo/MaterialCodeLibService.cs index 0cc5296a..affcee68 100644 --- a/SGGL/BLL/HJGL/BaseInfo/MaterialCodeLibService.cs +++ b/SGGL/BLL/HJGL/BaseInfo/MaterialCodeLibService.cs @@ -111,5 +111,5 @@ [ExcelColumnName("类型")] public string MaterialName { get; set; } } - + } diff --git a/SGGL/BLL/HJGL/DataImport/DataImportService.cs b/SGGL/BLL/HJGL/DataImport/DataImportService.cs index 51721ab3..d2917108 100644 --- a/SGGL/BLL/HJGL/DataImport/DataImportService.cs +++ b/SGGL/BLL/HJGL/DataImport/DataImportService.cs @@ -43,20 +43,20 @@ namespace BLL /// /// /// - public static Model.HJGL_DataImport GetLatestFileByFileName(string FileName,string ImportType, string project) + public static Model.HJGL_DataImport GetLatestFileByFileName(string FileName, string ImportType, string project) { var q = (from x in Funs.DB.HJGL_DataImport - where x.FileName.Contains(FileName) && x.ProjectId == project&&x.ImportType==ImportType + where x.FileName.Contains(FileName) && x.ProjectId == project && x.ImportType == ImportType select x ).OrderByDescending(x => x.Version).FirstOrDefault(); return q; } - public static string ConvertFileType(object ImportType) + public static string ConvertFileType(object ImportType) { - string TypeName=string.Empty; + string TypeName = string.Empty; if (ImportType != null) { - switch (ImportType.ToString ()) + switch (ImportType.ToString()) { case "0": TypeName = "ISO轴测图"; @@ -77,7 +77,7 @@ namespace BLL } return TypeName; - + } public static List GetListVersionByUnitWorkId(string UnitWorkId) { @@ -115,13 +115,14 @@ namespace BLL System.Web.HttpContext.Current.Response.TransmitFile(url, 0, fileSize); System.Web.HttpContext.Current.Response.Flush(); System.Web.HttpContext.Current.Response.Close(); - } - + } + } catch (System.Exception ex) { throw; - }; + } + ; } /// @@ -150,11 +151,11 @@ namespace BLL catch (System.Exception) { - result =false; + result = false; } return result; - - } + + } /// /// 获取当前文件新的版本号 /// @@ -173,7 +174,7 @@ namespace BLL var newVersion = MaxVersion + 0.1m; return newVersion; } - public static string Getlatest3DModelNameByUnitWorkId(string UnitWorkId ) + public static string Getlatest3DModelNameByUnitWorkId(string UnitWorkId) { string result = ""; var q = (from x in Funs.DB.HJGL_DataImport @@ -184,13 +185,13 @@ namespace BLL from t in tt.DefaultIfEmpty() select new { - FileName = (from x2 in tt where x2.Version == tt.Max(x => x.Version ) select x2.FileName).FirstOrDefault() + FileName = (from x2 in tt where x2.Version == tt.Max(x => x.Version) select x2.FileName).FirstOrDefault() } ).FirstOrDefault(); //where t.Key == UnitWorkId & x.FileType == "1" select x.Version).Distinct().ToList(); - if (q!=null&&!string.IsNullOrEmpty(q.FileName)) + if (q != null && !string.IsNullOrEmpty(q.FileName)) { - result=q.FileName.Substring (0,q.FileName.LastIndexOf('.')); + result = q.FileName.Substring(0, q.FileName.LastIndexOf('.')); } return result; diff --git a/SGGL/BLL/HJGL/DataImport/HJGL_DesignBasisDataImport.cs b/SGGL/BLL/HJGL/DataImport/HJGL_DesignBasisDataImport.cs index f29a9430..c453c01d 100644 --- a/SGGL/BLL/HJGL/DataImport/HJGL_DesignBasisDataImport.cs +++ b/SGGL/BLL/HJGL/DataImport/HJGL_DesignBasisDataImport.cs @@ -3,8 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -65,9 +63,9 @@ namespace BLL { return Funs.DB.HJGL_DesignBasisDataImport.FirstOrDefault(x => x.DesignBasisDataImportId == DesignBasisDataImportId); } - public static List GetDataByUnitWorkIdAndVersion(string unitworkid,decimal version,string dataclassification) + public static List GetDataByUnitWorkIdAndVersion(string unitworkid, decimal version, string dataclassification) { - var q = Funs.DB.HJGL_DesignBasisDataImport.Where(e => e.UnitWorkId == unitworkid && e.Version == version&& e.DataClassification==dataclassification).OrderBy(e => e.CreateDate).ToList(); + var q = Funs.DB.HJGL_DesignBasisDataImport.Where(e => e.UnitWorkId == unitworkid && e.Version == version && e.DataClassification == dataclassification).OrderBy(e => e.CreateDate).ToList(); return q; @@ -100,7 +98,7 @@ namespace BLL FileId = newtable.FileId, Version = newtable.Version, Remark = newtable.Remark, - DataClassification=newtable.DataClassification, + DataClassification = newtable.DataClassification, CreateMan = newtable.CreateMan, CreateDate = newtable.CreateDate, }; @@ -108,11 +106,12 @@ namespace BLL db1.HJGL_DesignBasisDataImport.InsertOnSubmit(table); db1.SubmitChanges(); } - public static List GetListVersionByUnitWorkId(string UnitWorkId,string dataclassification) + public static List GetListVersionByUnitWorkId(string UnitWorkId, string dataclassification) { //decimal a = 0.1M; - var q = (from x in Funs.DB.HJGL_DesignBasisDataImport where x.UnitWorkId == UnitWorkId &&x.DataClassification==dataclassification - select x.Version).Distinct().ToList(); + var q = (from x in Funs.DB.HJGL_DesignBasisDataImport + where x.UnitWorkId == UnitWorkId && x.DataClassification == dataclassification + select x.Version).Distinct().ToList(); return q; } /// @@ -120,11 +119,12 @@ namespace BLL /// /// /// - public static decimal GetNewVersionByUnitWorkId(string UnitWorkId,string dataclassification) + public static decimal GetNewVersionByUnitWorkId(string UnitWorkId, string dataclassification) { decimal MaxVersion = 0.0M; - var q = (from x in Funs.DB.HJGL_DesignBasisDataImport where x.UnitWorkId == UnitWorkId && x.DataClassification == dataclassification - select x.Version).Distinct().ToList(); + var q = (from x in Funs.DB.HJGL_DesignBasisDataImport + where x.UnitWorkId == UnitWorkId && x.DataClassification == dataclassification + select x.Version).Distinct().ToList(); if (q != null && q.Count() > 0) { MaxVersion = (decimal)q.Max(); @@ -133,11 +133,11 @@ namespace BLL return newVersion; } - public static decimal GetNowVersionByUnitWorkId(string unitworkId,string dataclassification) + public static decimal GetNowVersionByUnitWorkId(string unitworkId, string dataclassification) { - decimal newVersion=0.0M; - var q= Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.UnitWorkId == unitworkId && x.DataClassification == dataclassification); - if (q!=null) + decimal newVersion = 0.0M; + var q = Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.UnitWorkId == unitworkId && x.DataClassification == dataclassification); + if (q != null) { newVersion = (decimal)q.Version; @@ -145,10 +145,10 @@ namespace BLL return newVersion; } - public static void InitVersionDownList(FineUIPro.DropDownList dropName, string UnitWorkId,string dataClassification) + public static void InitVersionDownList(FineUIPro.DropDownList dropName, string UnitWorkId, string dataClassification) { - dropName.DataSource = GetListVersionByUnitWorkId(UnitWorkId,dataClassification); + dropName.DataSource = GetListVersionByUnitWorkId(UnitWorkId, dataClassification); dropName.DataBind(); } diff --git a/SGGL/BLL/HJGL/DataImport/HJGL_DesignBasisDataImportVerSionLog.cs b/SGGL/BLL/HJGL/DataImport/HJGL_DesignBasisDataImportVerSionLog.cs index fa959a7a..72b939ab 100644 --- a/SGGL/BLL/HJGL/DataImport/HJGL_DesignBasisDataImportVerSionLog.cs +++ b/SGGL/BLL/HJGL/DataImport/HJGL_DesignBasisDataImportVerSionLog.cs @@ -1,10 +1,4 @@ -using FineUIPro; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Model; +using System.Linq; namespace BLL @@ -17,10 +11,10 @@ namespace BLL return Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.DesignBasisDataImportVerSionLogId == DesignBasisDataImportVerSionLogId); } - public static Model.HJGL_DesignBasisDataImportVerSionLog GetHJGL_DesignBasisDataImportVerSionLogByunitworkId(string unitworkId,string DataClassification) + public static Model.HJGL_DesignBasisDataImportVerSionLog GetHJGL_DesignBasisDataImportVerSionLogByunitworkId(string unitworkId, string DataClassification) { - var q = Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.UnitWorkId == unitworkId&&x.DataClassification== DataClassification); - + var q = Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.UnitWorkId == unitworkId && x.DataClassification == DataClassification); + return q; } public static void AddHJGL_DesignBasisDataImportVerSionLog(Model.HJGL_DesignBasisDataImportVerSionLog newtable) @@ -50,18 +44,18 @@ namespace BLL table.ProjectId = newtable.ProjectId; table.UnitWorkId = newtable.UnitWorkId; table.Version = newtable.Version; - table.DataClassification=newtable.DataClassification; + table.DataClassification = newtable.DataClassification; db1.SubmitChanges(); } } - public static void UpdateVersion(string projectId,string unitworkId,decimal version,string DataClassification) + public static void UpdateVersion(string projectId, string unitworkId, decimal version, string DataClassification) { - var q = GetHJGL_DesignBasisDataImportVerSionLogByunitworkId(unitworkId,DataClassification); + var q = GetHJGL_DesignBasisDataImportVerSionLogByunitworkId(unitworkId, DataClassification); var db1 = Funs.DB; - if (q!=null) + if (q != null) { q.Version = version; db1.SubmitChanges(); @@ -75,7 +69,7 @@ namespace BLL ProjectId = projectId, UnitWorkId = unitworkId, Version = version, - DataClassification= DataClassification + DataClassification = DataClassification }; db1.HJGL_DesignBasisDataImportVerSionLog.InsertOnSubmit(table); db1.SubmitChanges(); diff --git a/SGGL/BLL/HJGL/PersonManage/WelderQualifyService.cs b/SGGL/BLL/HJGL/PersonManage/WelderQualifyService.cs index 7a394f1f..6eda56d7 100644 --- a/SGGL/BLL/HJGL/PersonManage/WelderQualifyService.cs +++ b/SGGL/BLL/HJGL/PersonManage/WelderQualifyService.cs @@ -662,7 +662,7 @@ namespace BLL #endregion #region 审核焊工合格项目 - public static string AuditWelderQualify(string welderQualifyId,string personId) + public static string AuditWelderQualify(string welderQualifyId, string personId) { string str = string.Empty; using (var db = new Model.SGGLDB(Funs.ConnString)) diff --git a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs index cf0e465e..4fc01cc7 100644 --- a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs +++ b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs @@ -1,12 +1,8 @@ -using NPOI.SS.Formula.Functions; -using System; +using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Windows.Media.Animation; -using System.Windows; -using Model; namespace BLL { diff --git a/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs b/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs index cecc20c1..86749d7e 100644 --- a/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs +++ b/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs @@ -1,17 +1,15 @@ using FineUIPro; using Model; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { public static class HJGLPackagingmanagedetailService - { + { #region 获取列表 /// /// 记录数 @@ -206,7 +204,7 @@ namespace BLL MaterialMade = libItem.MaterialMade, MaterialDef = libItem.MaterialDef, Number = tb.Number, - CusBillCode = twOutItem.CusBillCode, + CusBillCode = twOutItem.CusBillCode, }; result = q.ToList(); return result; diff --git a/SGGL/BLL/HJGL/PreDesign/HJGL_MaterialService.cs b/SGGL/BLL/HJGL/PreDesign/HJGL_MaterialService.cs index c7ff9f15..784ed5f9 100644 --- a/SGGL/BLL/HJGL/PreDesign/HJGL_MaterialService.cs +++ b/SGGL/BLL/HJGL/PreDesign/HJGL_MaterialService.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Web.UI.WebControls; namespace BLL { @@ -106,7 +105,7 @@ namespace BLL /// /// /// - public static DataTable GetSHOPStockDt( string projectid) + public static DataTable GetSHOPStockDt(string projectid) { string strSql = @" SELECT mat.MaterialCode, lib.MaterialName, @@ -167,7 +166,7 @@ namespace BLL SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); return tb; - } + } public static DataTable GetFIELDStockDt(string projectid) { string strSql = @" @@ -240,7 +239,7 @@ namespace BLL /// 管线划分 /// public static List GetMaterialStockItems(string projectid, string PipeArea) - { + { List list = new List(); DataTable dataTable = new DataTable(); switch (PipeArea) @@ -252,9 +251,9 @@ namespace BLL dataTable = GetFIELDStockDt(projectid); break; } - if (dataTable!=null) + if (dataTable != null) { - list =Funs.TableToEntity(dataTable); + list = Funs.TableToEntity(dataTable); } return list; } @@ -262,8 +261,8 @@ namespace BLL { decimal num = 0; - var list = GetMaterialStockItems(projectid, PipeArea); - if (list!=null && list.Count>0) + var list = GetMaterialStockItems(projectid, PipeArea); + if (list != null && list.Count > 0) { var item = list.Where(x => x.MaterialCode == materialcode).FirstOrDefault(); if (item != null) @@ -280,17 +279,17 @@ namespace BLL /// /// /// - public static bool isInStockByMaterialCode(string MaterialCode, decimal num,string PipeArea,string projectid) + public static bool isInStockByMaterialCode(string MaterialCode, decimal num, string PipeArea, string projectid) { - bool state=false; + bool state = false; List list = GetMaterialStockItems(projectid, PipeArea); if (list != null && list.Count > 0) { var Material = list.Where(x => x.MaterialCode == MaterialCode).FirstOrDefault(); - if (Material!=null) + if (Material != null) { var StockNum = Material.MaterialNum; - if (num<= StockNum) + if (num <= StockNum) { state = true; } @@ -299,7 +298,7 @@ namespace BLL } return state; - + } /// /// 判断库存是否满足此管线 @@ -307,9 +306,9 @@ namespace BLL /// /// /// - public static bool isInStockByPipeline(string pipelineid,string projectid) + public static bool isInStockByPipeline(string pipelineid, string projectid) { - bool state = true ; + bool state = true; try { var q = from x in Funs.DB.HJGL_PipeLineMat @@ -324,7 +323,7 @@ namespace BLL { var pipemodel = BLL.PipelineService.GetPipelineByPipelineId(pipelineid); List materialStockItems = new List(); - if (pipemodel.PipeArea==PipelineService.PipeArea_SHOP) + if (pipemodel.PipeArea == PipelineService.PipeArea_SHOP) { if (HJGL_MaterialService.materialStockItems_SHOP.Count == 0) { @@ -334,13 +333,13 @@ namespace BLL } else if (pipemodel.PipeArea == PipelineService.PipeArea_FIELD) { - if(HJGL_MaterialService.materialStockItems_FIELD.Count == 0) + if (HJGL_MaterialService.materialStockItems_FIELD.Count == 0) { HJGL_MaterialService.materialStockItems_FIELD = GetMaterialStockItems(projectid, pipemodel.PipeArea); } materialStockItems = materialStockItems_FIELD; } - + //List materialStockItems = GetMaterialStockItems(projectid, pipemodel.PipeArea); if (materialStockItems != null && materialStockItems.Count > 0) //判断是否有库存信息 { @@ -382,10 +381,10 @@ namespace BLL { state = false; - ErrLogInfo.WriteLog(ex.ToString ()); + ErrLogInfo.WriteLog(ex.ToString()); } - - + + return state; } diff --git a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs index 7339744a..39c69551 100644 --- a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs +++ b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs @@ -1,12 +1,9 @@ using FineUIPro; using System; -using System.Collections; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; -using System.Text; namespace BLL { diff --git a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs index 8180e310..e31fa98a 100644 --- a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs +++ b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs @@ -1,10 +1,6 @@ using Model; -using System; using System.Collections.Generic; using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; namespace BLL { @@ -136,7 +132,7 @@ namespace BLL /// /// /// - public static void DeleteProductionSchedulingPlanByUnitWork(string projectId,string unitWorkName) + public static void DeleteProductionSchedulingPlanByUnitWork(string projectId, string unitWorkName) { SGGLDB db = Funs.DB; var q = (from x in db.HJGL_ProductionSchedulingPlan where x.ProjectId == projectId && x.MainItemName == unitWorkName select x).ToList(); diff --git a/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs b/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs index 1f4ec522..17572a55 100644 --- a/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs +++ b/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs @@ -1,6 +1,4 @@ -using FineUIPro; -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; namespace BLL @@ -30,7 +28,7 @@ namespace BLL if (!string.IsNullOrEmpty(table.TrainNumber)) { q = q.Where(x => x.TrainNumber.Contains(table.TrainNumber)); - } + } if (!string.IsNullOrEmpty(table.ProjectId)) { q = q.Where(x => x.ProjectId.Contains(table.ProjectId)); @@ -99,9 +97,9 @@ namespace BLL where x.ProjectId == ProjectId select x.TrainNumber; var max = q.Count(); - var NewTrainNumber=(max+1).ToString().PadLeft(2, '0'); + var NewTrainNumber = (max + 1).ToString().PadLeft(2, '0'); return NewTrainNumber; - + } public static void Add(Model.HJGL_TrainNumberManage newtable) @@ -118,7 +116,7 @@ namespace BLL ContactName = newtable.ContactName, ContactPhone = newtable.ContactPhone, Remark = newtable.Remark, - ReceiveDate=newtable.ReceiveDate, + ReceiveDate = newtable.ReceiveDate, }; Funs.DB.HJGL_TrainNumberManage.InsertOnSubmit(table); Funs.DB.SubmitChanges(); diff --git a/SGGL/BLL/HJGL/PreDesign/YardPlanningService.cs b/SGGL/BLL/HJGL/PreDesign/YardPlanningService.cs index d5f46421..9a5bf4dd 100644 --- a/SGGL/BLL/HJGL/PreDesign/YardPlanningService.cs +++ b/SGGL/BLL/HJGL/PreDesign/YardPlanningService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { @@ -16,10 +13,10 @@ namespace BLL } public static List GetHJGL_YardPlanningBySurperId(string SurperId) { - var q= (from x in Funs.DB.HJGL_YardPlanning where x.SurperId== SurperId select x ) .ToList(); + var q = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId == SurperId select x).ToList(); return q; } - public static Model.HJGL_YardPlanning GetHJGL_YardPlanningByProjectId(string projectId,string unitworkid) + public static Model.HJGL_YardPlanning GetHJGL_YardPlanningByProjectId(string projectId, string unitworkid) { return Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectId && e.UnitWorkId == unitworkid); @@ -30,9 +27,9 @@ namespace BLL /// /// /// - public static void SavePic(string projectid,string unitworkid, string imgurl) + public static void SavePic(string projectid, string unitworkid, string imgurl) { - var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectid && e.UnitWorkId==unitworkid); + var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectid && e.UnitWorkId == unitworkid); if (model != null) { model.FlowChartPic = imgurl; @@ -51,12 +48,12 @@ namespace BLL } public static void SavePic(string YardPlanningId, string imgurl) { - var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId== YardPlanningId); + var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId == YardPlanningId); if (model != null) { model.FlowChartPic = imgurl; UpdateHJGL_YardPlanning(model); - } + } } public static void AddHJGL_YardPlanning(Model.HJGL_YardPlanning newtable) { @@ -66,7 +63,7 @@ namespace BLL table.Remark = newtable.Remark; table.FlowChartPic = newtable.FlowChartPic; table.UnitWorkId = newtable.UnitWorkId; - table.YardPlanName=newtable.YardPlanName; + table.YardPlanName = newtable.YardPlanName; table.SurperId = newtable.SurperId; Funs.DB.HJGL_YardPlanning.InsertOnSubmit(table); Funs.DB.SubmitChanges(); @@ -102,8 +99,8 @@ namespace BLL } public static void DeleteHJGL_YardPlanningBySurperId(string SurperId) { - var q= GetHJGL_YardPlanningBySurperId(SurperId); - if (q.Count >0) + var q = GetHJGL_YardPlanningBySurperId(SurperId); + if (q.Count > 0) { Funs.DB.HJGL_YardPlanning.DeleteAllOnSubmit(q); Funs.DB.SubmitChanges(); @@ -116,13 +113,13 @@ namespace BLL var id = q.YardPlanningId; DeleteHJGL_YardPlanningById(YardPlanningId); var chirdList = GetHJGL_YardPlanningBySurperId(id); - if (chirdList.Count>0) + if (chirdList.Count > 0) { foreach (var item in chirdList) { DleteAllById(item.YardPlanningId); } - } + } } diff --git a/SGGL/BLL/HJGL/TestPackage/TestPackageApproveService.cs b/SGGL/BLL/HJGL/TestPackage/TestPackageApproveService.cs index d053e15c..74c6994a 100644 --- a/SGGL/BLL/HJGL/TestPackage/TestPackageApproveService.cs +++ b/SGGL/BLL/HJGL/TestPackage/TestPackageApproveService.cs @@ -1,6 +1,5 @@ using System.Data; using System.Linq; -using Model; namespace BLL { @@ -49,7 +48,8 @@ namespace BLL return newApprove; } return null; - }; + } + ; } /// diff --git a/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs b/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs index 405ecc4a..a631a58e 100644 --- a/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs +++ b/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs @@ -1,6 +1,4 @@ using Model; -using NPOI.SS.Formula.Functions; -using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.Linq; @@ -12,13 +10,20 @@ namespace BLL { public enum State : int { - 未确认 = 0, - 已确认 = 1, - 待整改 = 2, - 已整改 = 3, - 已完成 = 4, + 试压前条件未确认 = 0, + 试压前条件已确认 = 1, + 尾项检查待整改 = 2, + 尾项检查已整改 = 3, + 试压包已完成 = 4, } - + public static Dictionary StateMap = new Dictionary() + { + { 0, State.试压前条件未确认.ToString()}, + { 1, State.试压前条件已确认.ToString()}, + { 2, State.尾项检查待整改.ToString()}, + { 3, State.尾项检查已整改.ToString()}, + { 4, State.试压包已完成.ToString()}, + }; /// /// 根据试压Id获取用于试压信息 /// @@ -441,7 +446,7 @@ namespace BLL { var q = Funs.DB.PTP_TestPackage.Where(e => e.ProjectId == projectid).ToList(); return q; - } + } public static void DeletePipelineListByUnitWorkId(string unitworkId) { @@ -508,33 +513,33 @@ namespace BLL Model.SGGLDB db = Funs.DB; var testPackage = db.PTP_TestPackage.FirstOrDefault(p => p.PTP_ID == PTP_ID); if (testPackage == null) return null; // 无效试压包,直接返回空结果 - result.PTP_ID= PTP_ID; + result.PTP_ID = PTP_ID; result.TestPackageNo = testPackage.TestPackageNo; result.UnitWorkName = BLL.UnitWorkService.GetUnitWorkALLName(testPackage.UnitWorkId); //判断当前试压包的状态 - result.StateStr = State.未确认.ToString(); + result.StateStr = State.试压前条件未确认.ToString(); if (testPackage.AduditDate.HasValue) { - result.StateStr=State.已确认.ToString(); + result.StateStr = State.试压前条件已确认.ToString(); } - var PtpItemEndCheckList=(from x in db.PTP_ItemEndCheckList where x.PTP_ID==PTP_ID select x).FirstOrDefault(); - if (PtpItemEndCheckList != null ) + var PtpItemEndCheckList = (from x in db.PTP_ItemEndCheckList where x.PTP_ID == PTP_ID select x).FirstOrDefault(); + if (PtpItemEndCheckList != null) { if (PtpItemEndCheckList.State == Const.TestPackage_Complete) { - result.StateStr = State.已整改.ToString(); + result.StateStr = State.尾项检查已整改.ToString(); } else { - result.StateStr = State.待整改.ToString(); + result.StateStr = State.尾项检查待整改.ToString(); } } if (testPackage.FinishDate.HasValue) { - result.StateStr = State.已完成.ToString(); + result.StateStr = State.试压包已完成.ToString(); } // 当前试压包下所有管线ID集合 @@ -709,10 +714,10 @@ namespace BLL { Model.SGGLDB db = Funs.DB; // 获取该单位工程下所有试压包 - int totalPipelines = db.PTP_TestPackage.Count(x => x.ProjectId == projectId && x.UnitWorkId == unitWorkId) ; + int totalPipelines = db.PTP_TestPackage.Count(x => x.ProjectId == projectId && x.UnitWorkId == unitWorkId); if (totalPipelines == 0) - return 0M; - int finishedPipelines = db.PTP_TestPackage.Count(x => x.ProjectId == projectId && x.UnitWorkId == unitWorkId&&x.FinishDate.HasValue); + return 0M; + int finishedPipelines = db.PTP_TestPackage.Count(x => x.ProjectId == projectId && x.UnitWorkId == unitWorkId && x.FinishDate.HasValue); if (totalPipelines == 0) return 0M; return Math.Round((decimal)finishedPipelines / totalPipelines * 100, 2); @@ -725,7 +730,8 @@ namespace BLL var groupQuery = db.PTP_TestPackage .Where(x => x.ProjectId == projectId) .GroupBy(x => x.UnitWorkId) - .Select(g => new { + .Select(g => new + { UnitWorkId = g.Key, Total = g.Count(), Finished = g.Count(t => t.FinishDate.HasValue) diff --git a/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs b/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs index 60b6dc82..966c6fbc 100644 --- a/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs +++ b/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs @@ -3,8 +3,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/HJGL/WPQ/WPQListService.cs b/SGGL/BLL/HJGL/WPQ/WPQListService.cs index c9d1f40d..f1ae2fc5 100644 --- a/SGGL/BLL/HJGL/WPQ/WPQListService.cs +++ b/SGGL/BLL/HJGL/WPQ/WPQListService.cs @@ -1,7 +1,7 @@ -using System; +using Model; +using System; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { @@ -185,7 +185,7 @@ namespace BLL decimal dia = jot.Dia.HasValue ? jot.Dia.Value : 0; decimal sch = jot.Thickness.HasValue ? jot.Thickness.Value : 0; string unitId = string.Empty; - if (unitid!=Const._Null) + if (unitid != Const._Null) { unitId = unitid; } @@ -193,7 +193,7 @@ namespace BLL { unitId = pipe.UnitId; } - + string weldType = string.Empty; if (weldT != null) { @@ -382,12 +382,12 @@ namespace BLL } } } - catch (Exception ex ) + catch (Exception ex) { ErrLogInfo.WriteLog(ex.ToString()); - continue ; + continue; } - + } // 一、材质类别不相等 var wpq2 = from x in wpq where x.Material1Class != x.Material2Class select x; diff --git a/SGGL/BLL/HJGL/WeldingManage/HJGL_ComponentJointService.cs b/SGGL/BLL/HJGL/WeldingManage/HJGL_ComponentJointService.cs index 8f014136..696f5532 100644 --- a/SGGL/BLL/HJGL/WeldingManage/HJGL_ComponentJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/HJGL_ComponentJointService.cs @@ -3,7 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -11,7 +10,7 @@ namespace BLL public static class HJGL_PipelineComponentjointService { - + #region 获取列表 @@ -31,7 +30,7 @@ namespace BLL (string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) && (string.IsNullOrEmpty(table.PipelineComponentCode) || x.PipelineComponentCode.Contains(table.PipelineComponentCode)) && (string.IsNullOrEmpty(table.WeldJointId) || x.WeldJointId.Contains(table.WeldJointId)) && - (string.IsNullOrEmpty(table.WeldJointCode) || x.WeldJointCode.Contains(table.WeldJointCode)) + (string.IsNullOrEmpty(table.WeldJointCode) || x.WeldJointCode.Contains(table.WeldJointCode)) select x ; @@ -120,13 +119,13 @@ namespace BLL /// 根据焊口号更改状态 /// /// - public static void UpdateStateByWeldJointId(string WeldJointId,DateTime TaskDate) + public static void UpdateStateByWeldJointId(string WeldJointId, DateTime TaskDate) { Model.HJGL_Pipeline_ComponentJoint table = Funs.DB.HJGL_Pipeline_ComponentJoint.FirstOrDefault(x => x.WeldJointId == WeldJointId); if (table != null) - { - table.State =1; + { + table.State = 1; Funs.DB.SubmitChanges(); GetProductionByPipelineComponentId(table.PipelineComponentId, TaskDate); } @@ -134,10 +133,10 @@ namespace BLL } public static void GetProductionByPipelineComponentId(string PipelineComponentId, DateTime TaskDate) { - var q = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId).ToList(); - if (q.Count!=0) + var q = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId).ToList(); + if (q.Count != 0) { - var NotProductionNum = (from x in q where x.State == 0||x.State ==null select x).Count(); //未生产数量 + var NotProductionNum = (from x in q where x.State == 0 || x.State == null select x).Count(); //未生产数量 var ProductionNum = (from x in q where x.State == 1 select x).Count(); //已生产数量 if (NotProductionNum == 0) //全部完成 { @@ -154,10 +153,10 @@ namespace BLL HJGL_PipelineComponentService.UpdateProductionState(PipelineComponentId, 1, TaskDate); } - } - + } + } - + public static void DeleteHJGL_Pipeline_ComponentJointById(string Id) { @@ -172,7 +171,7 @@ namespace BLL public static void DeleteHJGL_Pipeline_ComponentJointByPipelineComponentId(string PipelineComponentId) { - var table = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId); + var table = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId); if (table != null) { Funs.DB.HJGL_Pipeline_ComponentJoint.DeleteAllOnSubmit(table); diff --git a/SGGL/BLL/HJGL/WeldingManage/HJGL_WeldingReportService.cs b/SGGL/BLL/HJGL/WeldingManage/HJGL_WeldingReportService.cs index a19c700b..3fe2383d 100644 --- a/SGGL/BLL/HJGL/WeldingManage/HJGL_WeldingReportService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/HJGL_WeldingReportService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { @@ -15,7 +10,7 @@ namespace BLL /// /// 0总达因,1预制口总达因,2安装口总达因 /// - public static decimal GetSumSize(string projectId,int type) + public static decimal GetSumSize(string projectId, int type) { decimal result = 0; @@ -42,7 +37,7 @@ namespace BLL } } - + return result; } /// @@ -56,7 +51,7 @@ namespace BLL var getWelds = Funs.DB.HJGL_WeldJoint.Where(x => x.ProjectId == projectId); if (getWelds.Count() > 0) { - + var getWeldsOk = getWelds.Where(x => x.WeldingDailyId != null); if (getWeldsOk.Count() > 0) { @@ -64,9 +59,9 @@ namespace BLL if (GCModel.Count() > 0) { result = GCModel.Sum(x => x.Size ?? 0); - + } - + } } return result; @@ -146,23 +141,23 @@ namespace BLL /// /// /// - public static decimal GetWelderEfficacy(string projectId) + public static decimal GetWelderEfficacy(string projectId) { decimal result = 0; var db = Funs.DB; var q = (from x in db.HJGL_WeldJoint join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId - where x.ProjectId ==projectId + where x.ProjectId == projectId group x by x.ProjectId into g - select new + select new { TotalDin = g.Sum(x => x.Size), - worktime = g.Select(x=>x.WeldingDailyId).Distinct().Count(), - }) ; + worktime = g.Select(x => x.WeldingDailyId).Distinct().Count(), + }); foreach (var item in q) { - result = decimal.Divide((decimal)item.TotalDin, item.worktime) ; - + result = decimal.Divide((decimal)item.TotalDin, item.worktime); + } return decimal.Truncate(result); @@ -173,7 +168,7 @@ namespace BLL var db = Funs.DB; var q = (from x in db.HJGL_WeldJoint join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId - where x.ProjectId == projectId && x.JointAttribute=="预制口" + where x.ProjectId == projectId && x.JointAttribute == "预制口" group x by x.ProjectId into g select new { diff --git a/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs b/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs index f2046f18..1bc23022 100644 --- a/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs @@ -1,11 +1,9 @@ -using System; -using System.Collections; +using Model; +using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web.UI.WebControls; -using Model; -using NPOI.SS.Formula.Functions; namespace BLL { @@ -33,7 +31,7 @@ namespace BLL /// 已装箱 /// public static int State2 = 2; - + /// /// 获取状态名称 @@ -44,9 +42,9 @@ namespace BLL ListItem[] list = new ListItem[5]; list[0] = new ListItem("未验收", State0.ToString()); list[1] = new ListItem("已验收", State1.ToString()); - list[2] = new ListItem("已出库", State2.ToString()); - list[3] = new ListItem("待整改", StatePenRec.ToString()); - list[4] = new ListItem("已整改", StateRec.ToString()); + list[2] = new ListItem("已出库", State2.ToString()); + list[3] = new ListItem("待整改", StatePenRec.ToString()); + list[4] = new ListItem("已整改", StateRec.ToString()); return list; } /// @@ -72,7 +70,7 @@ namespace BLL } public static Model.HJGL_Pipeline_Component GetPipelineComponentByCodeandpipelineId(string pipelineComponentCode, string pipelineId) { - var q = Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(x => x.PipelineComponentCode == pipelineComponentCode && x.PipelineId == pipelineId); + var q = Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(x => x.PipelineComponentCode == pipelineComponentCode && x.PipelineId == pipelineId); return q; } /// @@ -121,7 +119,7 @@ namespace BLL query = query.OrderBy(x => x.PrefabricatedComponents); - + return query.ToList(); } /// @@ -136,7 +134,7 @@ namespace BLL from libItem in libJoin.DefaultIfEmpty() join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin from lineItem in lineJoin.DefaultIfEmpty() - where lineItem != null && lineItem.PipeArea == "1" + where lineItem != null && lineItem.PipeArea == "1" && (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "") select new PipelinePrefabricatedComponentsItem { @@ -159,7 +157,7 @@ namespace BLL query = query.OrderBy(x => x.PrefabricatedComponents); - var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail + var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail where x.PipelineId == pipelineId && (x.PipelineComponentId == null || x.PipelineComponentId == "") select x).ToList(); @@ -278,22 +276,22 @@ namespace BLL var model_mat = BLL.PipelineMatService.GetPipeLineMat(pipeLineMatId); var PipelineId = model_mat.PipelineId; var PipeArea = BLL.PipelineService.GetPipelineByPipelineId(PipelineId).PipeArea; - if (PipeArea=="1" &&!string.IsNullOrEmpty(model_mat.PrefabricatedComponents)) + if (PipeArea == "1" && !string.IsNullOrEmpty(model_mat.PrefabricatedComponents)) { - // var model = GetPipelineComponentByMatId(pipeLineMatId); - var model = GetPipelineComponentByCodeandpipelineId(model_mat.PrefabricatedComponents,PipelineId); - if (model!=null) + // var model = GetPipelineComponentByMatId(pipeLineMatId); + var model = GetPipelineComponentByCodeandpipelineId(model_mat.PrefabricatedComponents, PipelineId); + if (model != null) { model.PipelineId = PipelineId; model.PipelineComponentCode = model_mat.PrefabricatedComponents; - model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", ""); + model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", ""); model.State = State0; model.ProductionState = 0; UpdatePipelineComponent(model); } else { - model=new Model.HJGL_Pipeline_Component(); + model = new Model.HJGL_Pipeline_Component(); model.PipelineComponentId = SQLHelper.GetNewID(); model.PipelineId = PipelineId; model.PipelineComponentCode = model_mat.PrefabricatedComponents; @@ -326,17 +324,17 @@ namespace BLL newPipeline.BoxNumber = pipeline.BoxNumber; newPipeline.AssembleUnit = pipeline.AssembleUnit; newPipeline.PipeLineMatId = pipeline.PipeLineMatId; - newPipeline.State= pipeline.State; - newPipeline.QRCode= pipeline.QRCode; + newPipeline.State = pipeline.State; + newPipeline.QRCode = pipeline.QRCode; newPipeline.PlanStartDate = pipeline.PlanStartDate; newPipeline.PlanEndDate = pipeline.PlanEndDate; newPipeline.ActStartDate = pipeline.ActStartDate; newPipeline.ActEndDate = pipeline.ActEndDate; newPipeline.DrawingName = pipeline.DrawingName; - newPipeline.ReceiveMan= pipeline.ReceiveMan; - newPipeline.ReceiveDate= pipeline.ReceiveDate; - newPipeline.ProductionState= pipeline.ProductionState; - newPipeline.IsPrint= pipeline.IsPrint; + newPipeline.ReceiveMan = pipeline.ReceiveMan; + newPipeline.ReceiveDate = pipeline.ReceiveDate; + newPipeline.ProductionState = pipeline.ProductionState; + newPipeline.IsPrint = pipeline.IsPrint; newPipeline.Remark = pipeline.Remark; db.HJGL_Pipeline_Component.InsertOnSubmit(newPipeline); db.SubmitChanges(); @@ -368,7 +366,7 @@ namespace BLL newPipeline.ReceiveMan = pipeline.ReceiveMan; newPipeline.ReceiveDate = pipeline.ReceiveDate; newPipeline.ProductionState = pipeline.ProductionState; - newPipeline.IsPrint=pipeline.IsPrint; + newPipeline.IsPrint = pipeline.IsPrint; newPipeline.Remark = pipeline.Remark; db.SubmitChanges(); } @@ -378,17 +376,17 @@ namespace BLL /// /// /// - public static void UpdateOutState(string pipelineComponentId,string BoxNumber) + public static void UpdateOutState(string pipelineComponentId, string BoxNumber) { - var q=GetPipelineComponentById(pipelineComponentId); - if (q.State==State1) + var q = GetPipelineComponentById(pipelineComponentId); + if (q.State == State1) { q.State = State2; - q.BoxNumber=BoxNumber; + q.BoxNumber = BoxNumber; UpdatePipelineComponent(q); } - + } /// /// 修改组件打印状态 @@ -416,22 +414,22 @@ namespace BLL public static void UpdateProductionState(string pipelineComponentId, int state, DateTime TaskDate) { var q = GetPipelineComponentById(pipelineComponentId); - if (q!=null) + if (q != null) { q.ProductionState = state; - if (state==2) + if (state == 2) { q.ActEndDate = TaskDate; } - else if(state==1) + else if (state == 1) { - if (q.ActStartDate ==null) + if (q.ActStartDate == null) { q.ActStartDate = TaskDate; } else { - if (DateTime.Compare(TaskDate,q.ActStartDate.Value) < 0) + if (DateTime.Compare(TaskDate, q.ActStartDate.Value) < 0) { q.ActStartDate = TaskDate; } @@ -494,13 +492,13 @@ namespace BLL /// /// public static List GetAcceptedPipelineComponent(string projectId, string pipelineCode, - string pipelineComponentCode,string flowingSection) + string pipelineComponentCode, string flowingSection) { Model.SGGLDB db = Funs.DB; var q = (from x in db.HJGL_Pipeline_Component join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId where y.ProjectId.Contains(projectId) && x.State.Equals(State1) && - (string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) && + (string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) && (string.IsNullOrEmpty(pipelineComponentCode) || x.PipelineComponentCode.Contains(pipelineComponentCode)) && (string.IsNullOrEmpty(flowingSection) || y.FlowingSection.Contains(flowingSection)) select x).ToList(); @@ -513,7 +511,7 @@ namespace BLL Model.SGGLDB db = Funs.DB; var q = (from x in db.HJGL_Pipeline_Component where x.PipelineId == PipelineId - select x).OrderBy(x=>x.PlanStartDate).ToList(); + select x).OrderBy(x => x.PlanStartDate).ToList(); return q; } diff --git a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs index 43b7e118..fe8c91d4 100644 --- a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs @@ -1,5 +1,4 @@ -using Microsoft.Office.Interop.Word; -using MiniExcelLibs; +using MiniExcelLibs; using Model; using System; using System.Collections.Generic; @@ -7,10 +6,7 @@ using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using System.Web.UI.DataVisualization.Charting; using System.Web.UI.WebControls; -using System.Windows.Media.Animation; -using static BLL.PipelineService; namespace BLL { @@ -258,7 +254,7 @@ namespace BLL /// public static Model.HJGL_Pipeline GetPipelineByPipelineCode(string projectId, string pipelineCode) { - return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode&&e.ProjectId==projectId ); + return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode && e.ProjectId == projectId); } /// /// 根据管线信息筛选管线 @@ -624,7 +620,7 @@ namespace BLL newPipeline.FlowingSection = pipeline.FlowingSection; db.HJGL_Pipeline.InsertOnSubmit(newPipeline); db.SubmitChanges(); - } + } } /// diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs index e9c4010f..3f21f363 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs @@ -1,9 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using System.Web; namespace BLL { diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs index 90c5745a..11cb83f2 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs @@ -1,9 +1,6 @@ -using Model; -using System; +using System; using System.Collections.Generic; using System.Linq; -using System.Linq.Expressions; -using System.Numerics; namespace BLL { @@ -32,12 +29,12 @@ namespace BLL ///获取焊接任务单编号 /// /// - public static string GetTaskCodeByDate(string projectId, string date,string unitworkid,string unitid) + public static string GetTaskCodeByDate(string projectId, string date, string unitworkid, string unitid) { string code = string.Empty; - var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.UnitWorkId== unitworkid && x.UnitId== unitid && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList(); + var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.UnitWorkId == unitworkid && x.UnitId == unitid && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList(); var count = list.Count; - code = date +"-"+ (count + 1).ToString("D3") + UnitService.GetUnitCodeByUnitId(unitid) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(unitworkid)?.UnitWorkCode; + code = date + "-" + (count + 1).ToString("D3") + UnitService.GetUnitCodeByUnitId(unitid) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(unitworkid)?.UnitWorkCode; /*if (list.Count > 0) { string oldCode = list[0]; @@ -74,26 +71,26 @@ namespace BLL public static string GetSerialNumberByDate(string projectId, string date, string unitworkid, string unitid) { - string code = string.Empty; + string code = string.Empty; var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.UnitWorkId == unitworkid && x.UnitId == unitid && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList(); var count = list.Count; - code = (count + 1).ToString("D3"); + code = (count + 1).ToString("D3"); return code; } - public static string GetSerialNumberByDate(string projectId,string taskCode) + public static string GetSerialNumberByDate(string projectId, string taskCode) { string result = string.Empty; - var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.TaskCode == taskCode orderby x.SerialNumber descending select x.SerialNumber).FirstOrDefault(); + var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.TaskCode == taskCode orderby x.SerialNumber descending select x.SerialNumber).FirstOrDefault(); result = list?.ToString(); return result; } - public static List GetWeldingTaskList(string ProjectId, string UnitWorkId, string unitId, DateTime taskDate, string canWelder,string serialNumber) + public static List GetWeldingTaskList(string ProjectId, string UnitWorkId, string unitId, DateTime taskDate, string canWelder, string serialNumber) { var q = from x in Funs.DB.View_HJGL_WeldingTask where x.ProjectId == ProjectId && x.UnitWorkId == UnitWorkId - && x.TaskDate.Value.Date == taskDate.Date + && x.TaskDate.Value.Date == taskDate.Date select x; if (!string.IsNullOrEmpty(unitId)) @@ -173,8 +170,8 @@ namespace BLL newWeldTask.TableDate = WeldTask.TableDate; newWeldTask.WeldingMode = WeldTask.WeldingMode; newWeldTask.IsSaved = WeldTask.IsSaved; - newWeldTask.SerialNumber= WeldTask.SerialNumber; - newWeldTask.PipeLineSortIndex= WeldTask.PipeLineSortIndex; + newWeldTask.SerialNumber = WeldTask.SerialNumber; + newWeldTask.PipeLineSortIndex = WeldTask.PipeLineSortIndex; db.SubmitChanges(); } } diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs index a71e9e64..d0384827 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs @@ -1,11 +1,9 @@ -using Aspose.Words; -using Model; +using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using WIA; namespace BLL { @@ -47,29 +45,29 @@ namespace BLL { List returnViewMatch = new List(); var weldlineLists = (from x in Funs.DB.View_HJGL_WeldJoint - where x.WeldingDailyId == weldingDailyId - select new SpWeldingDailyItem - { - WeldJointId = x.WeldJointId, - WeldJointCode = x.WeldJointCode, - PipelineCode = x.PipelineCode, - CoverWelderCode = x.CoverWelderCode, - CoverWelderId = x.CoverWelderId, - BackingWelderCode = x.BackingWelderCode, - BackingWelderId = x.BackingWelderId, - WeldTypeId = x.WeldTypeCode, - JointArea = x.JointArea, - WeldingLocationId = x.WeldingLocationId, - WeldingLocationCode = x.WeldingLocationCode, - JointAttribute = x.JointAttribute, - Size = x.Size, - Dia = x.Dia, - Thickness = x.Thickness, - WeldingMethodCode = x.WeldingMethodCode, - WeldingWireCode = x.WeldingWireCode, - WeldingRodCode = x.WeldingRodCode + where x.WeldingDailyId == weldingDailyId + select new SpWeldingDailyItem + { + WeldJointId = x.WeldJointId, + WeldJointCode = x.WeldJointCode, + PipelineCode = x.PipelineCode, + CoverWelderCode = x.CoverWelderCode, + CoverWelderId = x.CoverWelderId, + BackingWelderCode = x.BackingWelderCode, + BackingWelderId = x.BackingWelderId, + WeldTypeId = x.WeldTypeCode, + JointArea = x.JointArea, + WeldingLocationId = x.WeldingLocationId, + WeldingLocationCode = x.WeldingLocationCode, + JointAttribute = x.JointAttribute, + Size = x.Size, + Dia = x.Dia, + Thickness = x.Thickness, + WeldingMethodCode = x.WeldingMethodCode, + WeldingWireCode = x.WeldingWireCode, + WeldingRodCode = x.WeldingRodCode - }).ToList(); + }).ToList(); returnViewMatch = weldlineLists; //if (weldlineLists.Count() > 0) //{ @@ -409,7 +407,7 @@ namespace BLL DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); var WeldingDailyCode = (from x in Funs.DB.HJGL_WeldingDaily - where x.WeldingDailyId == WeldingDailyId + where x.WeldingDailyId == WeldingDailyId select x.WeldingDailyCode).FirstOrDefault(); if (!string.IsNullOrEmpty(WeldingDailyCode)) { @@ -417,7 +415,7 @@ namespace BLL } return value; } - public static Dictionary GetFileOutValueByUnitWorkId(string UnitWorkId,string Month) + public static Dictionary GetFileOutValueByUnitWorkId(string UnitWorkId, string Month) { var value = new Dictionary(); var p = from x in Funs.DB.HJGL_WeldingDaily @@ -435,7 +433,7 @@ namespace BLL } } - return value; + return value; } #region 焊接日报下拉项 /// diff --git a/SGGL/BLL/HSSE/Accident/AccidentHandleService.cs b/SGGL/BLL/HSSE/Accident/AccidentHandleService.cs index 380f2d1c..1e2a091d 100644 --- a/SGGL/BLL/HSSE/Accident/AccidentHandleService.cs +++ b/SGGL/BLL/HSSE/Accident/AccidentHandleService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class AccidentHandleService { - + /// /// 根据主键获取HSSE事故(含未遂)处理 diff --git a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs index 50e1e080..a06d477e 100644 --- a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs +++ b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class AccidentPersonRecordService { - + /// /// 根据主键获取HSSE事故(对人员)记录 diff --git a/SGGL/BLL/HSSE/Accident/AccidentReportOtherService.cs b/SGGL/BLL/HSSE/Accident/AccidentReportOtherService.cs index 97d3b7c9..53b7f552 100644 --- a/SGGL/BLL/HSSE/Accident/AccidentReportOtherService.cs +++ b/SGGL/BLL/HSSE/Accident/AccidentReportOtherService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class AccidentReportOtherService { - + /// /// 根据主键获取事故调查处理报告 diff --git a/SGGL/BLL/HSSE/Accident/AccidentReportService.cs b/SGGL/BLL/HSSE/Accident/AccidentReportService.cs index cfb8a4a9..fe678655 100644 --- a/SGGL/BLL/HSSE/Accident/AccidentReportService.cs +++ b/SGGL/BLL/HSSE/Accident/AccidentReportService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class AccidentReportService { - + /// /// 根据主键获取事故调查报告 diff --git a/SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs b/SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs index c8b25545..9dde7532 100644 --- a/SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs +++ b/SGGL/BLL/HSSE/Accident/NoFourLetoffService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class NoFourLetoffService { - + /// /// 根据主键获取四不放过 diff --git a/SGGL/BLL/HSSE/Check/Check_CheckColligationDetailService.cs b/SGGL/BLL/HSSE/Check/Check_CheckColligationDetailService.cs index 5f7a8a1f..3b2792bb 100644 --- a/SGGL/BLL/HSSE/Check/Check_CheckColligationDetailService.cs +++ b/SGGL/BLL/HSSE/Check/Check_CheckColligationDetailService.cs @@ -8,7 +8,7 @@ namespace BLL /// public class Check_CheckColligationDetailService { - + /// /// 根据综合检查id获取所有相关明细信息 diff --git a/SGGL/BLL/HSSE/Check/Check_CheckSpecialDetailService.cs b/SGGL/BLL/HSSE/Check/Check_CheckSpecialDetailService.cs index 04556b37..504dd896 100644 --- a/SGGL/BLL/HSSE/Check/Check_CheckSpecialDetailService.cs +++ b/SGGL/BLL/HSSE/Check/Check_CheckSpecialDetailService.cs @@ -8,7 +8,7 @@ namespace BLL /// public class Check_CheckSpecialDetailService { - + /// /// 根据专项检查id获取所有相关明细信息 diff --git a/SGGL/BLL/HSSE/Check/Check_CheckSpecialService.cs b/SGGL/BLL/HSSE/Check/Check_CheckSpecialService.cs index 73d4e40b..6713b5c3 100644 --- a/SGGL/BLL/HSSE/Check/Check_CheckSpecialService.cs +++ b/SGGL/BLL/HSSE/Check/Check_CheckSpecialService.cs @@ -1,10 +1,8 @@ using FineUIPro; -using NPOI.SS.Formula.Functions; using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { @@ -27,7 +25,7 @@ namespace BLL /// 定义变量 /// private static IQueryable getDataLists = from x in Funs.DB.Check_CheckSpecial - select x; + select x; /// /// 列表 @@ -61,13 +59,13 @@ namespace BLL } else { - getDataList = getDataList.Where(e => e.CheckType == checkType || e.CheckType == null ); - } + getDataList = getDataList.Where(e => e.CheckType == checkType || e.CheckType == null); + } } if (!string.IsNullOrEmpty(checkItemSetId) && checkItemSetId != Const._Null) { getDataList = getDataList.Where(e => e.CheckItemSetId == checkItemSetId); - } + } if (startTime.HasValue) { getDataList = getDataList.Where(e => e.CheckTime >= startTime); @@ -75,7 +73,7 @@ namespace BLL if (endTime.HasValue) { getDataList = getDataList.Where(e => e.CheckTime <= endTime); - } + } count = getDataList.Count(); if (count == 0) @@ -89,7 +87,7 @@ namespace BLL x.CheckSpecialId, x.CheckTime, x.CheckSpecialCode, - CheckItemName =Funs.DB.Technique_CheckItemSet .First(y=>y.CheckItemSetId ==x. CheckItemSetId).CheckItemName, + CheckItemName = Funs.DB.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItemSetId).CheckItemName, CheckTypeName = x.CheckType == "1" ? "联合检查" : "专项检查", StatesName = x.States == "2" ? "已完成" : (x.States == "1" ? "待整改" : "待提交"), }; diff --git a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs index f761e310..80c2b087 100644 --- a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs +++ b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs @@ -3,8 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Web.UI.WebControls; -using Model; namespace BLL { @@ -76,8 +74,8 @@ namespace BLL getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); var db1 = Funs.DB; return from x in getDataList - join y in db1.Base_Project on x.ProjectId equals y.ProjectId - into ps + join y in db1.Base_Project on x.ProjectId equals y.ProjectId + into ps from y in ps.DefaultIfEmpty() select new { diff --git a/SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs b/SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs index c2ee3e19..e3adcccd 100644 --- a/SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs +++ b/SGGL/BLL/HSSE/Check/IncentiveNoticeService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class IncentiveNoticeService { - + /// /// 根据主键获取奖励通知单 diff --git a/SGGL/BLL/HSSE/Check/PunishNoticeService.cs b/SGGL/BLL/HSSE/Check/PunishNoticeService.cs index e990caa9..0a5d4cb1 100644 --- a/SGGL/BLL/HSSE/Check/PunishNoticeService.cs +++ b/SGGL/BLL/HSSE/Check/PunishNoticeService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class PunishNoticeService { - + /// /// 根据主键获取处罚通知单 diff --git a/SGGL/BLL/HSSE/CostGoods/CostManageItemService.cs b/SGGL/BLL/HSSE/CostGoods/CostManageItemService.cs index e3d24cd0..b5f306c1 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostManageItemService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostManageItemService.cs @@ -1,7 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Web.UI.WebControls; namespace BLL { @@ -10,7 +8,7 @@ namespace BLL /// public static class CostManageItemService { - + /// /// 根据主键删除费用管理明细 diff --git a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs index 660ee615..1c9a0270 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs @@ -1,13 +1,10 @@ using Model; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Numerics; -using WIA; namespace BLL { @@ -374,7 +371,7 @@ namespace BLL } - public static string PushDataToHSE(string projectId, string contractNum,string costManageId) + public static string PushDataToHSE(string projectId, string contractNum, string costManageId) { try { @@ -384,12 +381,12 @@ namespace BLL where x.ProjectId == projectId && x.ContractNum == contractNum && x.States == Const.State_2 orderby x.CostManageDate descending select x; - var projectModel=ProjectService.GetProjectByProjectId(projectId); + var projectModel = ProjectService.GetProjectByProjectId(projectId); var contractModel = CostManageService.GetCostManageById(costManageId); //decimal totalAmount = costData.Sum(x => x.SumMoney ?? 0); var files = new List(); - if (contractModel!=null) - { + if (contractModel != null) + { var url = ConstValue.GetConstByConstText("PU_PUSH_URL")?.ConstValue; if (string.IsNullOrEmpty(url)) { @@ -414,16 +411,16 @@ namespace BLL { message = "获取Pu系统Token失败,Token为空"; return message; - } + } Dictionary headers = new Dictionary(); headers.Add("Authorization", "Bearer " + accessToken); #region 先获取当前费用是否已经推送过 var getRequestUrl = url + "/pu_api/payCraftAmountToHSE/get"; - var getRequestbody= $"{{\"projectNumber\":\"{projectModel.ProjectCode}\",\"contractNo\":\"{contractNum}\"}}"; - APICommonService.SaveSysHttpLog("PU_GetPuPayCraftAmount", getRequestUrl, getRequestbody, "Requset"); + var getRequestbody = $"{{\"projectNumber\":\"{projectModel.ProjectCode}\",\"contractNo\":\"{contractNum}\"}}"; + APICommonService.SaveSysHttpLog("PU_GetPuPayCraftAmount", getRequestUrl, getRequestbody, "Requset"); var getResponse = Funs.RequestPost(getRequestUrl, headers, getRequestbody); - APICommonService.SaveSysHttpLog("PU_GetPuPayCraftAmount", getRequestUrl, getResponse, "Response"); - var getResponseStr = JsonConvert.DeserializeObject(getResponse); + APICommonService.SaveSysHttpLog("PU_GetPuPayCraftAmount", getRequestUrl, getResponse, "Response"); + var getResponseStr = JsonConvert.DeserializeObject(getResponse); if (getResponseStr == null) { message = "推送数据到HSE系统失败"; @@ -433,9 +430,9 @@ namespace BLL { message = getResponseStr["message"]?.ToString(); return message; - } - var getResponseOutput = JsonConvert.DeserializeObject>(getResponseStr["data"]?.ToString()) ; - if (getResponseOutput.Any() && getResponseOutput.Count(x=>x.itemNo== costManageId)>0) + } + var getResponseOutput = JsonConvert.DeserializeObject>(getResponseStr["data"]?.ToString()); + if (getResponseOutput.Any() && getResponseOutput.Count(x => x.itemNo == costManageId) > 0) { message = "当前费用已推送,无需重复推送!"; return message; @@ -459,9 +456,9 @@ namespace BLL itemId= costManageId, contractNo = contractNum, amountHSE = contractModel.SumMoney.ToString(), - files = files - } - }; + files = files + } + }; var jsonBody = JsonConvert.SerializeObject(puAddApiInputs); APICommonService.SaveSysHttpLog("PU_AddPuPayCraftAmount", requestUrl, jsonBody, "Requset"); var responseHSE = Funs.RequestPost(requestUrl, headers, jsonBody); @@ -472,7 +469,7 @@ namespace BLL message = "推送数据到HSE系统失败"; return message; } - else if ( string.IsNullOrEmpty(responseHSEStr["code"]?.ToString())) + else if (string.IsNullOrEmpty(responseHSEStr["code"]?.ToString())) { message = responseHSE; return message; @@ -482,7 +479,7 @@ namespace BLL message = responseHSEStr["message"]?.ToString(); return message; } - else + else { message = ""; return message; @@ -534,12 +531,12 @@ namespace BLL }); continue;//只取第一个文件 - } + } } } } - + return result; } diff --git a/SGGL/BLL/HSSE/CostGoods/CostSmallDetailItemService.cs b/SGGL/BLL/HSSE/CostGoods/CostSmallDetailItemService.cs index 37fdb646..77138fce 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostSmallDetailItemService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostSmallDetailItemService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class CostSmallDetailItemService { - + /// /// 根据主键获取安全费用投入登记明细 diff --git a/SGGL/BLL/HSSE/CostGoods/CostSmallDetailService.cs b/SGGL/BLL/HSSE/CostGoods/CostSmallDetailService.cs index 3e00df41..e8ee1ec0 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostSmallDetailService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostSmallDetailService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class CostSmallDetailService { - + /// /// 根据主键获取安全费用投入登记 diff --git a/SGGL/BLL/HSSE/CostGoods/ExpenseDetailService.cs b/SGGL/BLL/HSSE/CostGoods/ExpenseDetailService.cs index aaf94ad4..2bad1eb6 100644 --- a/SGGL/BLL/HSSE/CostGoods/ExpenseDetailService.cs +++ b/SGGL/BLL/HSSE/CostGoods/ExpenseDetailService.cs @@ -1,7 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using WIA; namespace BLL { @@ -27,7 +25,7 @@ namespace BLL join y in db.Base_CostType on x.CostTypeId equals y.CostTypeId select new { - ExpenseId=expenseId, + ExpenseId = expenseId, SupCostTypeId = y.CostTypeId, SupCostTypeName = y.CostTypeName, SupSortIndex = y.CostTypeCode, diff --git a/SGGL/BLL/HSSE/CostGoods/ExpenseService.cs b/SGGL/BLL/HSSE/CostGoods/ExpenseService.cs index decd801a..ddd6b448 100644 --- a/SGGL/BLL/HSSE/CostGoods/ExpenseService.cs +++ b/SGGL/BLL/HSSE/CostGoods/ExpenseService.cs @@ -31,7 +31,7 @@ namespace BLL select x; if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) { - getData = getData.Where(x =>x.UnitId == unitId); + getData = getData.Where(x => x.UnitId == unitId); } if (year.HasValue) { @@ -69,10 +69,10 @@ namespace BLL ProjectId = expense.ProjectId, ExpenseCode = expense.ExpenseCode, UnitId = expense.UnitId, - ReportDate=expense.ReportDate, + ReportDate = expense.ReportDate, CreateDate = expense.CreateDate, States = expense.States, - CompileMan = expense.CompileMan, + CompileMan = expense.CompileMan, CompileDate = expense.CompileDate, SortIndex = expense.SortIndex, Year = expense.Year, @@ -94,7 +94,7 @@ namespace BLL { //newExpense.ProjectId = expense.ProjectId; newExpense.ExpenseCode = expense.ExpenseCode; - newExpense.UnitId = expense.UnitId; + newExpense.UnitId = expense.UnitId; newExpense.States = expense.States; newExpense.Months = expense.Months; newExpense.ReportDate = expense.ReportDate; @@ -142,16 +142,16 @@ namespace BLL /// /// /// - public static void SetSumYearExpense(string projectId,int Year) + public static void SetSumYearExpense(string projectId, int Year) { - var getYearEx = Funs.DB. CostGoods_Expense.FirstOrDefault(x=>x.ProjectId == projectId && x.Year == Year && x.UnitId == null); + var getYearEx = Funs.DB.CostGoods_Expense.FirstOrDefault(x => x.ProjectId == projectId && x.Year == Year && x.UnitId == null); if (getYearEx != null) { Funs.DB.CostGoods_Expense.DeleteOnSubmit(getYearEx); Funs.DB.SubmitChanges(); } - var getALLEx=from x in Funs.DB.CostGoods_Expense where x.ProjectId == projectId && x.Year == Year && x.UnitId != null select x; + var getALLEx = from x in Funs.DB.CostGoods_Expense where x.ProjectId == projectId && x.Year == Year && x.UnitId != null select x; if (getALLEx.Count() > 0) { Model.CostGoods_Expense newExpense = new Model.CostGoods_Expense diff --git a/SGGL/BLL/HSSE/EduTrain/AccidentCaseItemService.cs b/SGGL/BLL/HSSE/EduTrain/AccidentCaseItemService.cs index a73d23c9..0e129f5f 100644 --- a/SGGL/BLL/HSSE/EduTrain/AccidentCaseItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/AccidentCaseItemService.cs @@ -5,7 +5,7 @@ namespace BLL { public class AccidentCaseItemService { - + /// /// 根据常见事故案例明细Id获取事故案例明细 diff --git a/SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs b/SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs index 81f83935..7cfc31e3 100644 --- a/SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs +++ b/SGGL/BLL/HSSE/EduTrain/AccidentCaseService.cs @@ -5,7 +5,7 @@ namespace BLL { public class AccidentCaseService { - + /// /// 根据主键获取事故伤害及预防 diff --git a/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs b/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs index 5b282b88..bff9e4c1 100644 --- a/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs @@ -1,5 +1,4 @@ using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/EduTrain/CompanyTrainingService.cs b/SGGL/BLL/HSSE/EduTrain/CompanyTrainingService.cs index a472317e..f81223a7 100644 --- a/SGGL/BLL/HSSE/EduTrain/CompanyTrainingService.cs +++ b/SGGL/BLL/HSSE/EduTrain/CompanyTrainingService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordDetailService.cs b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordDetailService.cs index da11a58e..d22c6e2f 100644 --- a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordDetailService.cs +++ b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordDetailService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class EduTrain_TrainRecordDetailService { - + /// /// 根据教育培训主键获取所有的教育培训明细信息 diff --git a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs index 4f3f02ce..313bdc5f 100644 --- a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs +++ b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class EduTrain_TrainRecordService { - + /// /// 根据教育培训主键获取教育培训信息 diff --git a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainTestService.cs b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainTestService.cs index e58fd1e3..6a95b4b9 100644 --- a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainTestService.cs +++ b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainTestService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class EduTrain_TrainTestService { - + /// /// 根据教育培训主键获取所有的教育培训明细信息 diff --git a/SGGL/BLL/HSSE/EduTrain/TestPlanService.cs b/SGGL/BLL/HSSE/EduTrain/TestPlanService.cs index e951a993..7414819b 100644 --- a/SGGL/BLL/HSSE/EduTrain/TestPlanService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TestPlanService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs b/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs index 5e1d7713..c2ed027b 100644 --- a/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs @@ -2,7 +2,6 @@ using System; using System.Collections; using System.Linq; -using Model; namespace BLL { @@ -64,7 +63,7 @@ namespace BLL x.TestEndTime, x.TestScores, z.TrainTypeId, - db1.Base_TrainType.First(u=>u.TrainTypeId == z.TrainTypeId).TrainTypeName, + db1.Base_TrainType.First(u => u.TrainTypeId == z.TrainTypeId).TrainTypeName, z.TrainStartDate, }; } @@ -190,7 +189,7 @@ namespace BLL { item.TestEndTime = item.TestStartTime.Value.AddMinutes(item.Duration); item.TestScores = db.Training_TestRecordItem.Where(x => x.TestRecordId == item.TestRecordId).Sum(x => x.SubjectScore) ?? 0; - + icount++; } db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/EduTrain/TestTrainingItemService.cs b/SGGL/BLL/HSSE/EduTrain/TestTrainingItemService.cs index 55aa4fef..fe15d35f 100644 --- a/SGGL/BLL/HSSE/EduTrain/TestTrainingItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TestTrainingItemService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class TestTrainingItemService { - + /// /// 根据主键获取信息 diff --git a/SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs b/SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs index 8a9f4ce4..891fa36c 100644 --- a/SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TestTrainingService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/EduTrain/TrainTestDBItemService.cs b/SGGL/BLL/HSSE/EduTrain/TrainTestDBItemService.cs index 65370871..5a132d1c 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainTestDBItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainTestDBItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class TrainTestDBItemService { - + /// /// 根据主键删除安全试题库明细信息 diff --git a/SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs b/SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs index 6c9225d9..b88cc8a6 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainTestDBService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class TrainTestDBService { - + /// /// 根据主键获取安全试题库信息 diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs index faabeb05..706f6749 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingItemService.cs @@ -5,7 +5,7 @@ namespace BLL { public class TrainingItemService { - + /// /// diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs index 819b3a53..4add3ff4 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs index 88fe6465..73313bc1 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingService.cs index 805236b3..a505a339 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingService.cs @@ -5,7 +5,7 @@ namespace BLL { public class TrainingService { - + /// /// 根据上级Id查询所有教育培训主键列的值 diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs index 25854680..8e172df6 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/Emergency/DrillRecordListService.cs b/SGGL/BLL/HSSE/Emergency/DrillRecordListService.cs index 75566100..ed6e67fa 100644 --- a/SGGL/BLL/HSSE/Emergency/DrillRecordListService.cs +++ b/SGGL/BLL/HSSE/Emergency/DrillRecordListService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class DrillRecordListService { - + /// /// 根据主键获取应急演练 diff --git a/SGGL/BLL/HSSE/Emergency/EmergencyListService.cs b/SGGL/BLL/HSSE/Emergency/EmergencyListService.cs index eb4db2ba..e6087a21 100644 --- a/SGGL/BLL/HSSE/Emergency/EmergencyListService.cs +++ b/SGGL/BLL/HSSE/Emergency/EmergencyListService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class EmergencyListService { - + /// /// 根据主键获取应急预案管理 diff --git a/SGGL/BLL/HSSE/Emergency/EmergencySupplyService.cs b/SGGL/BLL/HSSE/Emergency/EmergencySupplyService.cs index 53f31961..db452e7a 100644 --- a/SGGL/BLL/HSSE/Emergency/EmergencySupplyService.cs +++ b/SGGL/BLL/HSSE/Emergency/EmergencySupplyService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class EmergencySupplyService { - + /// /// 根据主键获取应急物资管理 diff --git a/SGGL/BLL/HSSE/Emergency/EmergencyTeamAndTrainService.cs b/SGGL/BLL/HSSE/Emergency/EmergencyTeamAndTrainService.cs index 6528d9a4..f8fe6f7a 100644 --- a/SGGL/BLL/HSSE/Emergency/EmergencyTeamAndTrainService.cs +++ b/SGGL/BLL/HSSE/Emergency/EmergencyTeamAndTrainService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class EmergencyTeamAndTrainService { - + /// /// 根据主键获取应急队伍/培训 diff --git a/SGGL/BLL/HSSE/Environmental/EIAReportService.cs b/SGGL/BLL/HSSE/Environmental/EIAReportService.cs index 78f2a1ea..52427413 100644 --- a/SGGL/BLL/HSSE/Environmental/EIAReportService.cs +++ b/SGGL/BLL/HSSE/Environmental/EIAReportService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class EIAReportService { - + /// /// 根据主键获取环评报告 diff --git a/SGGL/BLL/HSSE/Environmental/EnvironmentalCheckService.cs b/SGGL/BLL/HSSE/Environmental/EnvironmentalCheckService.cs index fee9c321..5049b4e2 100644 --- a/SGGL/BLL/HSSE/Environmental/EnvironmentalCheckService.cs +++ b/SGGL/BLL/HSSE/Environmental/EnvironmentalCheckService.cs @@ -1,9 +1,6 @@ using Model; using Newtonsoft.Json; -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { diff --git a/SGGL/BLL/HSSE/Environmental/EnvironmentalEmergencyPlanService.cs b/SGGL/BLL/HSSE/Environmental/EnvironmentalEmergencyPlanService.cs index a86705a2..800ab3f8 100644 --- a/SGGL/BLL/HSSE/Environmental/EnvironmentalEmergencyPlanService.cs +++ b/SGGL/BLL/HSSE/Environmental/EnvironmentalEmergencyPlanService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class EnvironmentalEmergencyPlanService { - + /// /// 根据主键获取环境事件应急预案 diff --git a/SGGL/BLL/HSSE/Environmental/EnvironmentalMonitoringService.cs b/SGGL/BLL/HSSE/Environmental/EnvironmentalMonitoringService.cs index c73f949e..527f1837 100644 --- a/SGGL/BLL/HSSE/Environmental/EnvironmentalMonitoringService.cs +++ b/SGGL/BLL/HSSE/Environmental/EnvironmentalMonitoringService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class EnvironmentalMonitoringService { - + /// /// 根据主键获取环境监测数据 diff --git a/SGGL/BLL/HSSE/Environmental/UnexpectedEnvironmentalService.cs b/SGGL/BLL/HSSE/Environmental/UnexpectedEnvironmentalService.cs index 52be605b..4509a3f5 100644 --- a/SGGL/BLL/HSSE/Environmental/UnexpectedEnvironmentalService.cs +++ b/SGGL/BLL/HSSE/Environmental/UnexpectedEnvironmentalService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class UnexpectedEnvironmentalService { - + /// /// 根据主键获取突发环境事件 diff --git a/SGGL/BLL/HSSE/HSSESystem/HSSEMainDutyService.cs b/SGGL/BLL/HSSE/HSSESystem/HSSEMainDutyService.cs index 7aa276de..4077de10 100644 --- a/SGGL/BLL/HSSE/HSSESystem/HSSEMainDutyService.cs +++ b/SGGL/BLL/HSSE/HSSESystem/HSSEMainDutyService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class HSSEMainDutyService { - + /// /// 根据主键获取安全主体责任 diff --git a/SGGL/BLL/HSSE/HSSESystem/ServerSafetyInstitutionService.cs b/SGGL/BLL/HSSE/HSSESystem/ServerSafetyInstitutionService.cs index 65f1d729..db7e2680 100644 --- a/SGGL/BLL/HSSE/HSSESystem/ServerSafetyInstitutionService.cs +++ b/SGGL/BLL/HSSE/HSSESystem/ServerSafetyInstitutionService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ServerSafetyInstitutionService { - + /// /// 根据主键获取安全制度 diff --git a/SGGL/BLL/HSSE/Hazard/ConstructionRiskApproveService.cs b/SGGL/BLL/HSSE/Hazard/ConstructionRiskApproveService.cs index a9bfb873..507605b5 100644 --- a/SGGL/BLL/HSSE/Hazard/ConstructionRiskApproveService.cs +++ b/SGGL/BLL/HSSE/Hazard/ConstructionRiskApproveService.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Data; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/Hazard/ConstructionRiskCheckService.cs b/SGGL/BLL/HSSE/Hazard/ConstructionRiskCheckService.cs index 2c60aa8a..610bff2c 100644 --- a/SGGL/BLL/HSSE/Hazard/ConstructionRiskCheckService.cs +++ b/SGGL/BLL/HSSE/Hazard/ConstructionRiskCheckService.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; +using System.Linq; namespace BLL { public static class ConstructionRiskCheckService { - + /// /// 要求主键获取危险清单信息 diff --git a/SGGL/BLL/HSSE/Hazard/ConstructionRiskListService.cs b/SGGL/BLL/HSSE/Hazard/ConstructionRiskListService.cs index 1deb450a..0f5512bf 100644 --- a/SGGL/BLL/HSSE/Hazard/ConstructionRiskListService.cs +++ b/SGGL/BLL/HSSE/Hazard/ConstructionRiskListService.cs @@ -1,6 +1,4 @@ -using Org.BouncyCastle.Bcpg.Sig; -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Web.UI.WebControls; diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskItemService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskItemService.cs index 5948096e..9c5fe3ac 100644 --- a/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskItemService.cs +++ b/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskItemService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskListService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskListService.cs index 0b8c6878..ad3f3a6d 100644 --- a/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskListService.cs +++ b/SGGL/BLL/HSSE/Hazard/Hazard_EnvironmentalRiskListService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class Hazard_EnvironmentalRiskListService { - + /// /// 要求主键获取危险清单信息 diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_HazardListService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_HazardListService.cs index b8fe0d50..95d093d8 100644 --- a/SGGL/BLL/HSSE/Hazard/Hazard_HazardListService.cs +++ b/SGGL/BLL/HSSE/Hazard/Hazard_HazardListService.cs @@ -1,6 +1,5 @@ using System; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs index a323f07e..6d3bfe14 100644 --- a/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs +++ b/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs @@ -1,8 +1,7 @@ -using System.Collections; +using FineUIPro; +using System.Collections; using System.Collections.Generic; using System.Linq; -using FineUIPro; -using Model; namespace BLL { @@ -228,7 +227,7 @@ namespace BLL var returndata = Project_HSSEData_HSSEService.DeleteProjectSecurityRiskData(item.HazardId); if (returndata.code == 1) { - + } else { diff --git a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs index cb904158..b800d5ff 100644 --- a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs +++ b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs @@ -3,7 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs index c8c0a992..b4b1f43c 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class EquipmentInItemService { - + /// /// 根据主键获取特种设备机具入场报批明细信息 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentInService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentInService.cs index dad87495..a9ceeb47 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentInService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentInService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class EquipmentInService { - + /// /// 根据主键获取特种设备机具入场报批 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentOutItemService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentOutItemService.cs index 6bbcf503..3f6916ea 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentOutItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentOutItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class EquipmentOutItemService { - + /// /// 根据主键获取特种设备机具出场报批明细 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentOutService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentOutService.cs index 385ccc8c..6013eea2 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentOutService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentOutService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class EquipmentOutService { - + /// /// 根据主键获取特种设备机具出场报批 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInItemService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInItemService.cs index da08b1d7..7ef8fe5c 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class EquipmentQualityInItemService { - + /// /// 根据主表ID获取明细信息 diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInService.cs index 2d2d145e..9a29ee18 100644 --- a/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentQualityInService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class EquipmentQualityInService { - + /// /// 根据主键获取特种设备审批 diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs index 09d03ff7..e92ac845 100644 --- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class GeneralEquipmentInItemService { - + /// /// 根据主键获取一般设备机具入场报批明细信息 diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInService.cs index a99a0ca8..0e5b7efa 100644 --- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class GeneralEquipmentInService { - + /// /// 根据主键获取一般设备机具入场报批 diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutItemService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutItemService.cs index 635605d0..7ce99bba 100644 --- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class GeneralEquipmentOutItemService { - + /// /// 根据主键获取一般设备机具出场报批 diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutService.cs index e70b2a82..e9dda304 100644 --- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentOutService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class GeneralEquipmentOutService { - + /// /// 根据主键获取一般设备机具出场报批 diff --git a/SGGL/BLL/HSSE/InformationProject/ConstructionStandardIdentifyService.cs b/SGGL/BLL/HSSE/InformationProject/ConstructionStandardIdentifyService.cs index 1d33dc2e..7705700d 100644 --- a/SGGL/BLL/HSSE/InformationProject/ConstructionStandardIdentifyService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ConstructionStandardIdentifyService.cs @@ -4,7 +4,7 @@ namespace BLL { public static class ConstructionStandardIdentifyService { - + /// /// 根据标准规范辨识主键获取一个标准规范辨识信息 diff --git a/SGGL/BLL/HSSE/InformationProject/ConstructionStandardSelectedItemService.cs b/SGGL/BLL/HSSE/InformationProject/ConstructionStandardSelectedItemService.cs index 8a82fb21..41dd0cd8 100644 --- a/SGGL/BLL/HSSE/InformationProject/ConstructionStandardSelectedItemService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ConstructionStandardSelectedItemService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class ConstructionStandardSelectedItemService { - + /// /// 根据标准规范辨识Id获取对应所有标准规范项信息 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportItemService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportItemService.cs index 78387217..341a980d 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportItemService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class ProjectAccidentCauseReportItemService { - + /// /// 职工伤亡事故原因分析报表明细表 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportService.cs index 3473868c..e58e131c 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectAccidentCauseReportService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ProjectAccidentCauseReportService { - + /// /// 职工伤亡事故原因分析报表 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportItemService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportItemService.cs index 71baae6b..1330a8f3 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportItemService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class ProjectDrillConductedQuarterlyReportItemService { - + /// /// 根据主键获取应急演练开展情况季报表明细信息 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportService.cs index f57abf45..136dc8c2 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectDrillConductedQuarterlyReportService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ProjectDrillConductedQuarterlyReportService { - + /// /// 根据主键获取应急演练开展情况季报表 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportItemService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportItemService.cs index 68218e45..ec2d1a1c 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportItemService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class ProjectDrillPlanHalfYearReportItemService { - + /// /// 根据主键获取应急演练工作计划半年报明细信息 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportService.cs index 93d1a600..de61a2f3 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectDrillPlanHalfYearReportService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ProjectDrillPlanHalfYearReportService { - + /// /// 根据主键获取应急演练工作计划半年报 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectEPSummaryReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectEPSummaryReportService.cs index adc32ad9..1656cffe 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectEPSummaryReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectEPSummaryReportService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { @@ -33,7 +29,7 @@ namespace BLL ProjectId = ePSummaryReport.ProjectId, UnitId = ePSummaryReport.UnitId, YearId = ePSummaryReport.YearId, - Quarter= ePSummaryReport.Quarter, + Quarter = ePSummaryReport.Quarter, ResponsiblePerson = ePSummaryReport.ResponsiblePerson, ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel, ContactPerson = ePSummaryReport.ContactPerson, diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectMillionsMonthlyReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectMillionsMonthlyReportService.cs index 41338257..d68e4e29 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectMillionsMonthlyReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectMillionsMonthlyReportService.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Linq; namespace BLL { @@ -10,7 +7,7 @@ namespace BLL /// public static class ProjectMillionsMonthlyReportService { - + /// /// 根据主键获取企业安全数据统计月报 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectSafetyQuarterlyReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectSafetyQuarterlyReportService.cs index e5b3aa01..fda9fd2d 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectSafetyQuarterlyReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectSafetyQuarterlyReportService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ProjectSafetyQuarterlyReportService { - + /// /// 根据主键获取安全生产数据季报 diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectWorkSummaryReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectWorkSummaryReportService.cs index 694e8156..816bebb9 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectWorkSummaryReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectWorkSummaryReportService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { @@ -30,7 +26,7 @@ namespace BLL Model.InformationProject_WorkSummaryReport newWorkSummaryReport = new Model.InformationProject_WorkSummaryReport { WorkSummaryReportId = workSummaryReport.WorkSummaryReportId, - ProjectId=workSummaryReport.ProjectId, + ProjectId = workSummaryReport.ProjectId, YearId = workSummaryReport.YearId, UnitId = workSummaryReport.UnitId, ResponsiblePerson = workSummaryReport.ResponsiblePerson, @@ -50,8 +46,8 @@ namespace BLL Countermeasures = workSummaryReport.Countermeasures, NextYearWorkPlan = workSummaryReport.NextYearWorkPlan, JobSuggestion = workSummaryReport.JobSuggestion, - CompileMan=workSummaryReport.CompileMan, - CompileDate=workSummaryReport.CompileDate + CompileMan = workSummaryReport.CompileMan, + CompileDate = workSummaryReport.CompileDate }; Funs.DB.InformationProject_WorkSummaryReport.InsertOnSubmit(newWorkSummaryReport); Funs.DB.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs b/SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs index 170217a0..5ab663e9 100644 --- a/SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs +++ b/SGGL/BLL/HSSE/Law/HSSEStandardsListService.cs @@ -5,7 +5,7 @@ namespace BLL { public class HSSEStandardsListService { - + /// /// 根据id查询标准规范信息 diff --git a/SGGL/BLL/HSSE/Law/LawRegulationListService.cs b/SGGL/BLL/HSSE/Law/LawRegulationListService.cs index 0aa8f499..7217286e 100644 --- a/SGGL/BLL/HSSE/Law/LawRegulationListService.cs +++ b/SGGL/BLL/HSSE/Law/LawRegulationListService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class LawRegulationListService { - + /// /// 根据主键获取法律法规 diff --git a/SGGL/BLL/HSSE/Law/ManageRuleService.cs b/SGGL/BLL/HSSE/Law/ManageRuleService.cs index a6a46877..3ff5349c 100644 --- a/SGGL/BLL/HSSE/Law/ManageRuleService.cs +++ b/SGGL/BLL/HSSE/Law/ManageRuleService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class ManageRuleService { - + /// /// 根据主键获取管理规定 diff --git a/SGGL/BLL/HSSE/Law/RulesRegulationsService.cs b/SGGL/BLL/HSSE/Law/RulesRegulationsService.cs index 9b594406..55372586 100644 --- a/SGGL/BLL/HSSE/Law/RulesRegulationsService.cs +++ b/SGGL/BLL/HSSE/Law/RulesRegulationsService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class RulesRegulationsService { - + /// /// 根据主键获取生产规章制度 diff --git a/SGGL/BLL/HSSE/License/HSETechnicalService.cs b/SGGL/BLL/HSSE/License/HSETechnicalService.cs index 527239db..93db4a7c 100644 --- a/SGGL/BLL/HSSE/License/HSETechnicalService.cs +++ b/SGGL/BLL/HSSE/License/HSETechnicalService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class HSETechnicalService { - + /// /// 根据主键获取安全技术交底 diff --git a/SGGL/BLL/HSSE/License/LicenseManagerService.cs b/SGGL/BLL/HSSE/License/LicenseManagerService.cs index d2d330a2..c791bd5d 100644 --- a/SGGL/BLL/HSSE/License/LicenseManagerService.cs +++ b/SGGL/BLL/HSSE/License/LicenseManagerService.cs @@ -1,10 +1,6 @@ using FineUIPro; -using Model; -using NPOI.SS.Formula.Functions; using System; using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; using System.Linq; namespace BLL @@ -28,7 +24,7 @@ namespace BLL /// 定义变量 /// private static IQueryable getDataLists = from x in Funs.DB.License_LicenseManager - select x; + select x; /// /// @@ -47,7 +43,7 @@ namespace BLL /// /// /// - public static IEnumerable getListData(string projectId, string unitId, DateTime? startTime, DateTime? endTime, string licenseType, string unitId2, Grid Grid1) + public static IEnumerable getListData(string projectId, string unitId, DateTime? startTime, DateTime? endTime, string licenseType, string unitId2, Grid Grid1) { IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(projectId)) @@ -69,11 +65,11 @@ namespace BLL if (!string.IsNullOrEmpty(licenseType)) { getDataList = getDataList.Where(e => e.LicenseTypeId == licenseType); - } + } if (!string.IsNullOrEmpty(unitId2) && unitId2 != Const._Null) { - getDataList = getDataList.Where(e => e.UnitId == unitId2 ); + getDataList = getDataList.Where(e => e.UnitId == unitId2); } @@ -99,7 +95,7 @@ namespace BLL }; } - public static string getFlow(string id,string states) + public static string getFlow(string id, string states) { string strrValue = string.Empty; string name = string.Empty; @@ -120,7 +116,8 @@ namespace BLL else if (states == BLL.Const.State_1) { strrValue = "审核/审批完成"; - } else + } + else { strrValue = "待[" + name + "]办理"; } diff --git a/SGGL/BLL/HSSE/License/LicensePublicService.cs b/SGGL/BLL/HSSE/License/LicensePublicService.cs index f9a0a3c5..49a034d5 100644 --- a/SGGL/BLL/HSSE/License/LicensePublicService.cs +++ b/SGGL/BLL/HSSE/License/LicensePublicService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class LicensePublicService { - + /// /// 状态下拉框 /// diff --git a/SGGL/BLL/HSSE/Manager/CompletionReportService.cs b/SGGL/BLL/HSSE/Manager/CompletionReportService.cs index d4e574da..317d81be 100644 --- a/SGGL/BLL/HSSE/Manager/CompletionReportService.cs +++ b/SGGL/BLL/HSSE/Manager/CompletionReportService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class CompletionReportService { - + /// /// 根据主键获取完工报告 diff --git a/SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs b/SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs index f5937a83..e41e1c4d 100644 --- a/SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/AttendMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class AttendMeetingService { - + /// /// 根据主键获取其他会议记录 diff --git a/SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs b/SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs index 5fe301bf..f745907c 100644 --- a/SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/ClassMeetingService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ClassMeetingService { - + /// /// 根据主键获取班前会 diff --git a/SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs b/SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs index 40c39444..92c71bab 100644 --- a/SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/MonthMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class MonthMeetingService { - + /// /// 根据主键获取安全月例会 diff --git a/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs index 071fabf9..73e7accf 100644 --- a/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { @@ -11,7 +9,7 @@ namespace BLL /// public static class SafetyLeaderGroupMeetingService { - + /// /// 根据主键获取安全领导小组会议 diff --git a/SGGL/BLL/HSSE/Meeting/SpecialMeetingService.cs b/SGGL/BLL/HSSE/Meeting/SpecialMeetingService.cs index 44955ca8..f37eff4a 100644 --- a/SGGL/BLL/HSSE/Meeting/SpecialMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/SpecialMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class SpecialMeetingService { - + /// /// 根据主键获取专题例会 diff --git a/SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs b/SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs index a4d3b1c0..fd749ed2 100644 --- a/SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs +++ b/SGGL/BLL/HSSE/Meeting/WeekMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class WeekMeetingService { - + /// /// 根据主键获取周例会 diff --git a/SGGL/BLL/HSSE/OccupationHealth/HazardDetectionService.cs b/SGGL/BLL/HSSE/OccupationHealth/HazardDetectionService.cs index 3a7a1159..4976c418 100644 --- a/SGGL/BLL/HSSE/OccupationHealth/HazardDetectionService.cs +++ b/SGGL/BLL/HSSE/OccupationHealth/HazardDetectionService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class HazardDetectionService { - + /// /// 根据主键获取危害检测 diff --git a/SGGL/BLL/HSSE/OccupationHealth/OccupationalDiseaseAccidentService.cs b/SGGL/BLL/HSSE/OccupationHealth/OccupationalDiseaseAccidentService.cs index 264aa649..547be4f1 100644 --- a/SGGL/BLL/HSSE/OccupationHealth/OccupationalDiseaseAccidentService.cs +++ b/SGGL/BLL/HSSE/OccupationHealth/OccupationalDiseaseAccidentService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class OccupationalDiseaseAccidentService { - + /// /// 根据主键获取职业病事故 diff --git a/SGGL/BLL/HSSE/OccupationHealth/PhysicalExaminationService.cs b/SGGL/BLL/HSSE/OccupationHealth/PhysicalExaminationService.cs index 1e3b62bb..c4b07c8a 100644 --- a/SGGL/BLL/HSSE/OccupationHealth/PhysicalExaminationService.cs +++ b/SGGL/BLL/HSSE/OccupationHealth/PhysicalExaminationService.cs @@ -1,9 +1,6 @@ using FineUIPro; -using System; using System.Collections; -using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { @@ -26,16 +23,16 @@ namespace BLL /// 定义变量 /// private static IQueryable getDataLists = from x in Funs.DB.SitePerson_Person - select x; + select x; - /// - /// - /// - /// - /// - /// - /// - public static IEnumerable getListData(string projectId, string personName, Grid Grid1) + /// + /// + /// + /// + /// + /// + /// + public static IEnumerable getListData(string projectId, string personName, Grid Grid1) { var db1 = Funs.DB; IQueryable getDataList = from x in db1.SitePerson_Person @@ -48,14 +45,14 @@ namespace BLL { getDataList = getDataList.Where(e => e.PersonName.Contains(personName)); } - + count = getDataList.Count(); if (count == 0) { return null; } getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); - + return from x in getDataList select new { diff --git a/SGGL/BLL/HSSE/QualityAudit/EquipmentPersonQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/EquipmentPersonQualityService.cs index b182255c..f0d5d358 100644 --- a/SGGL/BLL/HSSE/QualityAudit/EquipmentPersonQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/EquipmentPersonQualityService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class EquipmentPersonQualityService { - + /// /// 根据主键获取特种设备作业人员资质 diff --git a/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityAuditDetailService.cs b/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityAuditDetailService.cs index 53b1828f..39c55420 100644 --- a/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityAuditDetailService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityAuditDetailService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class EquipmentQualityAuditDetailService { - + /// /// 根据主键获取特种设备资质审查明细 diff --git a/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityService.cs index 756c5b79..e607c05d 100644 --- a/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/EquipmentQualityService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class EquipmentQualityService { - + /// /// 根据主键获取特殊机具设备资质 diff --git a/SGGL/BLL/HSSE/QualityAudit/GeneralEquipmentQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/GeneralEquipmentQualityService.cs index 23e535e6..0bad34d5 100644 --- a/SGGL/BLL/HSSE/QualityAudit/GeneralEquipmentQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/GeneralEquipmentQualityService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class GeneralEquipmentQualityService { - + /// /// 根据主键获取一般机具设备资质 diff --git a/SGGL/BLL/HSSE/QualityAudit/PersonQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/PersonQualityService.cs index ea2bda7d..1e48080a 100644 --- a/SGGL/BLL/HSSE/QualityAudit/PersonQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/PersonQualityService.cs @@ -1,11 +1,8 @@ -using System; +using FineUIPro; +using System; +using System.Collections; using System.Collections.Generic; using System.Linq; -using Aspose.Words.Lists; -using FineUIPro; -using Org.BouncyCastle.Ocsp; -using System.Collections; -using Model; namespace BLL { @@ -47,7 +44,7 @@ namespace BLL return null; } getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); - + return from x in getDataList select new { @@ -181,7 +178,7 @@ namespace BLL public static void DeleteDataByPersonId(string personId) { Model.SGGLDB db = Funs.DB; - var personQuality =from x in Funs.DB.QualityAudit_PersonQuality where x.PersonId == personId select x; + var personQuality = from x in Funs.DB.QualityAudit_PersonQuality where x.PersonId == personId select x; if (personQuality.Count() > 0) { db.QualityAudit_PersonQuality.DeleteAllOnSubmit(personQuality); @@ -196,7 +193,7 @@ namespace BLL public static void DeleteData(string id) { Model.SGGLDB db = Funs.DB; - var deleteData = db.QualityAudit_PersonQuality.FirstOrDefault(e => e.PersonQualityId == id); + var deleteData = db.QualityAudit_PersonQuality.FirstOrDefault(e => e.PersonQualityId == id); if (deleteData != null) { db.QualityAudit_PersonQuality.DeleteOnSubmit(deleteData); diff --git a/SGGL/BLL/HSSE/QualityAudit/SafePersonQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/SafePersonQualityService.cs index 3fecf64f..4665c6df 100644 --- a/SGGL/BLL/HSSE/QualityAudit/SafePersonQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/SafePersonQualityService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class SafePersonQualityService { - + /// /// 根据主键获取安全人员资质 diff --git a/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityAuditDetailService.cs b/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityAuditDetailService.cs index a4fb47ad..57db730d 100644 --- a/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityAuditDetailService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityAuditDetailService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class SubUnitQualityAuditDetailService { - + /// /// 根据主键获取分包商资质审查明细 diff --git a/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityService.cs b/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityService.cs index 39bd5fa2..cb12f395 100644 --- a/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityService.cs +++ b/SGGL/BLL/HSSE/QualityAudit/SubUnitQualityService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class SubUnitQualityService { - + /// /// 根据主键获取分包商资质 diff --git a/SGGL/BLL/HSSE/Resources/SignManageService.cs b/SGGL/BLL/HSSE/Resources/SignManageService.cs index a82f95f7..e376341d 100644 --- a/SGGL/BLL/HSSE/Resources/SignManageService.cs +++ b/SGGL/BLL/HSSE/Resources/SignManageService.cs @@ -4,7 +4,7 @@ public static class SignManageService { - + /// /// 获取标牌信息 diff --git a/SGGL/BLL/HSSE/SecuritySystem/SafetyOrganizationService.cs b/SGGL/BLL/HSSE/SecuritySystem/SafetyOrganizationService.cs index e67b21bd..977f6561 100644 --- a/SGGL/BLL/HSSE/SecuritySystem/SafetyOrganizationService.cs +++ b/SGGL/BLL/HSSE/SecuritySystem/SafetyOrganizationService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class SafetyOrganizationService { - + /// /// 根据主键获取安全管理机构信息 diff --git a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs index 7a2bd10f..20c24fb3 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs @@ -3,7 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_CheckingService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_CheckingService.cs index ebad051e..3036af8f 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_CheckingService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_CheckingService.cs @@ -5,7 +5,7 @@ namespace BLL { public class SitePerson_CheckingService { - + /// /// 根据人员考勤主键获取人员考勤管理信息 diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_DayReportUnitDetailService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_DayReportUnitDetailService.cs index a6d71c70..7f51dbc9 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_DayReportUnitDetailService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_DayReportUnitDetailService.cs @@ -6,7 +6,7 @@ namespace BLL { public class SitePerson_DayReportUnitDetailService { - + /// diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_MonthReportUnitDetailService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_MonthReportUnitDetailService.cs index 83db0cbc..3d41c328 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_MonthReportUnitDetailService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_MonthReportUnitDetailService.cs @@ -4,7 +4,7 @@ namespace BLL { public class SitePerson_MonthReportUnitDetailService { - + /// /// 增加工作日报明细信息 diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs index e98b36e9..3a34a626 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs @@ -1,10 +1,7 @@ using FineUIPro; -using Microsoft.Office.Interop.Excel; -using Model; using System; using System.Collections; using System.Linq; -using System.Web.Security; namespace BLL { @@ -87,13 +84,13 @@ namespace BLL x.UnitId, x.UnitName, x.WorkPostId, - x.WorkPostName, + x.WorkPostName, x.TeamGroupId, x.TeamGroupName, x.RoleId, x.RoleName, x.InTime, - x.OutTime, + x.OutTime, x.OutResult, }; } @@ -126,7 +123,7 @@ namespace BLL db.SubmitChanges(); ////在岗 - if (sitePerson.States == Const.ProjectPersonStates_1 ) + if (sitePerson.States == Const.ProjectPersonStates_1) { Model.SitePerson_PersonItem newPersonItem = new Model.SitePerson_PersonItem { @@ -287,7 +284,7 @@ namespace BLL public static void UpdatePersonItem(Model.SitePerson_PersonItem newitem) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { + { var getPerson = Person_PersonsService.GetPerson_PersonsById(newitem.PersonId); if (getPerson != null) { diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index 85108c23..c1444f0a 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -1,14 +1,9 @@ using FineUIPro; using Model; -using NPOI.HSSF.Record.Aggregates; -using NPOI.SS.Formula.PTG; -using NPOI.XWPF.UserModel; using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Windows.Controls.Primitives; -using WIA; namespace BLL { @@ -844,7 +839,7 @@ namespace BLL Isprint = "0", States = person.States, IsSafetyMonitoring = person.IsSafetyMonitoring, - IsCQMSCheck=person.IsCQMSCheck, + IsCQMSCheck = person.IsCQMSCheck, }; if (newPerson.WorkPostId == Const.WorkPost_Welder) diff --git a/SGGL/BLL/HSSE/Solution/ConstructSolutionService.cs b/SGGL/BLL/HSSE/Solution/ConstructSolutionService.cs index b46c4842..2d0e18f6 100644 --- a/SGGL/BLL/HSSE/Solution/ConstructSolutionService.cs +++ b/SGGL/BLL/HSSE/Solution/ConstructSolutionService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class ConstructSolutionService { - + /// /// 根据主键获取施工方案/审查 diff --git a/SGGL/BLL/HSSE/Solution/ExpertArgumentService.cs b/SGGL/BLL/HSSE/Solution/ExpertArgumentService.cs index 793d4833..cf1f3390 100644 --- a/SGGL/BLL/HSSE/Solution/ExpertArgumentService.cs +++ b/SGGL/BLL/HSSE/Solution/ExpertArgumentService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ExpertArgumentService { - + #region 专家论证清单 /// diff --git a/SGGL/BLL/HSSE/Solution/LargerHazardService.cs b/SGGL/BLL/HSSE/Solution/LargerHazardService.cs index df047acf..0f1ef864 100644 --- a/SGGL/BLL/HSSE/Solution/LargerHazardService.cs +++ b/SGGL/BLL/HSSE/Solution/LargerHazardService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections; +using System.Linq; namespace BLL { @@ -30,7 +26,7 @@ namespace BLL Model.SGGLDB db = Funs.DB; Model.Solution_LargerHazard newLargerHazard = new Model.Solution_LargerHazard { - HazardName=largerHazard.HazardName, + HazardName = largerHazard.HazardName, HazardId = largerHazard.HazardId, HazardCode = largerHazard.HazardCode, HazardType = largerHazard.HazardType, diff --git a/SGGL/BLL/HSSE/Solution/SolutionTemplateService.cs b/SGGL/BLL/HSSE/Solution/SolutionTemplateService.cs index 785f5815..a5e0739f 100644 --- a/SGGL/BLL/HSSE/Solution/SolutionTemplateService.cs +++ b/SGGL/BLL/HSSE/Solution/SolutionTemplateService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class SolutionTemplateService { - + /// /// 根据主键获取方案模板 diff --git a/SGGL/BLL/HSSE/Technique/EmergencyService.cs b/SGGL/BLL/HSSE/Technique/EmergencyService.cs index 719ffc02..71635db4 100644 --- a/SGGL/BLL/HSSE/Technique/EmergencyService.cs +++ b/SGGL/BLL/HSSE/Technique/EmergencyService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class EmergencyService { - + /// /// 根据主键获取应急预案 diff --git a/SGGL/BLL/HSSE/Technique/EnvironmentalService.cs b/SGGL/BLL/HSSE/Technique/EnvironmentalService.cs index 9fd8c158..313f7d1d 100644 --- a/SGGL/BLL/HSSE/Technique/EnvironmentalService.cs +++ b/SGGL/BLL/HSSE/Technique/EnvironmentalService.cs @@ -4,7 +4,7 @@ namespace BLL { public static class EnvironmentalService { - + /// /// 获取环境危险源信息 diff --git a/SGGL/BLL/HSSE/Technique/HazardListService.cs b/SGGL/BLL/HSSE/Technique/HazardListService.cs index 4e756ee5..0a599b8d 100644 --- a/SGGL/BLL/HSSE/Technique/HazardListService.cs +++ b/SGGL/BLL/HSSE/Technique/HazardListService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class HazardListService { - + /// /// 根据主键获取危险源清单 diff --git a/SGGL/BLL/HSSE/Technique/HazardListTypeService.cs b/SGGL/BLL/HSSE/Technique/HazardListTypeService.cs index b6c0770a..fc1524f7 100644 --- a/SGGL/BLL/HSSE/Technique/HazardListTypeService.cs +++ b/SGGL/BLL/HSSE/Technique/HazardListTypeService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class HazardListTypeService { - + /// /// 根据主键获取危险源类型 diff --git a/SGGL/BLL/HSSE/Technique/RectifyItemService.cs b/SGGL/BLL/HSSE/Technique/RectifyItemService.cs index 0e006a05..1d83f9d1 100644 --- a/SGGL/BLL/HSSE/Technique/RectifyItemService.cs +++ b/SGGL/BLL/HSSE/Technique/RectifyItemService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class RectifyItemService { - + /// /// 根据主键获取安全隐患明细 diff --git a/SGGL/BLL/HSSE/Technique/RectifyService.cs b/SGGL/BLL/HSSE/Technique/RectifyService.cs index d3477abd..675a1ea7 100644 --- a/SGGL/BLL/HSSE/Technique/RectifyService.cs +++ b/SGGL/BLL/HSSE/Technique/RectifyService.cs @@ -1,7 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { diff --git a/SGGL/BLL/HSSE/Technique/SpecialSchemeService.cs b/SGGL/BLL/HSSE/Technique/SpecialSchemeService.cs index 0c530bd4..4d1f92c1 100644 --- a/SGGL/BLL/HSSE/Technique/SpecialSchemeService.cs +++ b/SGGL/BLL/HSSE/Technique/SpecialSchemeService.cs @@ -6,7 +6,7 @@ namespace BLL public static class SpecialSchemeService { - + /// /// 根据主键获取专项方案 diff --git a/SGGL/BLL/HSSE/Technique/Technique_CheckItemDetailService.cs b/SGGL/BLL/HSSE/Technique/Technique_CheckItemDetailService.cs index cce5ac81..c1dcca72 100644 --- a/SGGL/BLL/HSSE/Technique/Technique_CheckItemDetailService.cs +++ b/SGGL/BLL/HSSE/Technique/Technique_CheckItemDetailService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class Technique_CheckItemDetailService { - + /// /// 根据主键获取检查项明细 diff --git a/SGGL/BLL/HSSE/Technique/Technique_CheckItemSetService.cs b/SGGL/BLL/HSSE/Technique/Technique_CheckItemSetService.cs index 7af74f4a..40e754c3 100644 --- a/SGGL/BLL/HSSE/Technique/Technique_CheckItemSetService.cs +++ b/SGGL/BLL/HSSE/Technique/Technique_CheckItemSetService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class Technique_CheckItemSetService { - + /// /// 根据主键获取检查项 diff --git a/SGGL/BLL/Notice/NoticeService.cs b/SGGL/BLL/Notice/NoticeService.cs index d0d2e525..db94921b 100644 --- a/SGGL/BLL/Notice/NoticeService.cs +++ b/SGGL/BLL/Notice/NoticeService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class NoticeService { - + /// /// 根据主键获取通知 diff --git a/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs b/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs index c3629b5f..48b23b9c 100644 --- a/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs +++ b/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs @@ -1,5 +1,4 @@ -using NPOI.SS.Formula; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; namespace BLL @@ -26,12 +25,12 @@ namespace BLL public static void AddCheckNotice(Model.ProjectSupervision_CheckNotice checkNotice) { Model.ProjectSupervision_CheckNotice newCheckNotice = new Model.ProjectSupervision_CheckNotice(); - newCheckNotice.CheckNoticeId = checkNotice.CheckNoticeId; + newCheckNotice.CheckNoticeId = checkNotice.CheckNoticeId; newCheckNotice.SubjectUnitAdd = checkNotice.SubjectUnitAdd; newCheckNotice.SubjectUnitMan = checkNotice.SubjectUnitMan; newCheckNotice.SubjectUnitTel = checkNotice.SubjectUnitTel; newCheckNotice.CheckStartTime = checkNotice.CheckStartTime; - newCheckNotice.CheckEndTime = checkNotice.CheckEndTime; + newCheckNotice.CheckEndTime = checkNotice.CheckEndTime; newCheckNotice.CheckTeamLeader = checkNotice.CheckTeamLeader; newCheckNotice.CompileMan = checkNotice.CompileMan; newCheckNotice.CompileDate = checkNotice.CompileDate; diff --git a/SGGL/BLL/OfficeCheck/Check/CheckTeamService.cs b/SGGL/BLL/OfficeCheck/Check/CheckTeamService.cs index 7db7a43e..d966e13a 100644 --- a/SGGL/BLL/OfficeCheck/Check/CheckTeamService.cs +++ b/SGGL/BLL/OfficeCheck/Check/CheckTeamService.cs @@ -48,7 +48,7 @@ namespace BLL UserName = CheckTeam.UserName, UnitId = CheckTeam.UnitId, SexName = CheckTeam.SexName, - DepartId=CheckTeam.DepartId, + DepartId = CheckTeam.DepartId, }; Funs.DB.ProjectSupervision_CheckTeam.InsertOnSubmit(newCheckTeam); Funs.DB.SubmitChanges(); diff --git a/SGGL/BLL/OfficeCheck/ProjectEvaluation/ProjectEvaluationService.cs b/SGGL/BLL/OfficeCheck/ProjectEvaluation/ProjectEvaluationService.cs index 6acc2d44..152147c7 100644 --- a/SGGL/BLL/OfficeCheck/ProjectEvaluation/ProjectEvaluationService.cs +++ b/SGGL/BLL/OfficeCheck/ProjectEvaluation/ProjectEvaluationService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ProjectEvaluationService { - + /// /// 根据主键获取项目绩效评价 diff --git a/SGGL/BLL/OpenService/FileInsertService.cs b/SGGL/BLL/OpenService/FileInsertService.cs index 273de9e7..bf427c54 100644 --- a/SGGL/BLL/OpenService/FileInsertService.cs +++ b/SGGL/BLL/OpenService/FileInsertService.cs @@ -1,12 +1,9 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections; using System.IO; -using System.Web; -using System.Text.RegularExpressions; +using System.Linq; using System.Net; +using System.Text.RegularExpressions; namespace BLL { diff --git a/SGGL/BLL/OpenService/GetDataService.cs b/SGGL/BLL/OpenService/GetDataService.cs index 660eb57f..305e0f07 100644 --- a/SGGL/BLL/OpenService/GetDataService.cs +++ b/SGGL/BLL/OpenService/GetDataService.cs @@ -1,9 +1,7 @@ -using NPOI.SS.Formula.Functions; -using System; +using System; using System.Collections.Generic; using System.Configuration; using System.Linq; -using WIA; namespace BLL { @@ -518,7 +516,7 @@ namespace BLL { int count = 0; var getPersons = from x in db.SitePerson_Person - where x.States == Const.State_1 && (x.CardNo == null || x.CardNo =="" || x.CardNo.Length==0) && x.ProjectId == projectId + where x.States == Const.State_1 && (x.CardNo == null || x.CardNo == "" || x.CardNo.Length == 0) && x.ProjectId == projectId select x; foreach (var item in getPersons) { diff --git a/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanFormationService.cs b/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanFormationService.cs index 18a35f6b..6d800440 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanFormationService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanFormationService.cs @@ -231,7 +231,7 @@ namespace BLL /// ActionPlanID /// /// - public static Document Print( string ActionPlanID) + public static Document Print(string ActionPlanID) { string rootPath = Funs.RootPath; @@ -550,12 +550,12 @@ namespace BLL doc.UpdateWordCount(); File.Delete(Path); } - doc.Save(newUrl); - Document doc1 = new Aspose.Words.Document(newUrl); + doc.Save(newUrl); + Document doc1 = new Aspose.Words.Document(newUrl); File.Delete(newUrl); return doc1; } - public static void PrintFile( string Id) + public static void PrintFile(string Id) { string rootPath = Funs.RootPath; string newUrl = string.Empty; @@ -566,7 +566,7 @@ namespace BLL File.Delete(newUrl); } var q = PHTGL_ActionPlanFormationService.GetPHTGL_ActionPlanFormationById(Id); - var doc = BLL.PHTGL_ActionPlanFormationService.Print( Id); + var doc = BLL.PHTGL_ActionPlanFormationService.Print(Id); doc.Save(newUrl); //生成PDF文件 string pdfUrl = newUrl.Replace(".docx", ".pdf"); diff --git a/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs index 1dedc0da..4762192c 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs @@ -1,6 +1,6 @@ -using System.Collections.Generic; +using Model; +using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs index 5bc4c5f0..0254e93d 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs @@ -1,11 +1,11 @@ using Aspose.Words; +using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using Model; namespace BLL { @@ -186,7 +186,7 @@ namespace BLL File.Delete(newUrl); return doc1; } - public static void PrintFile( string Id) + public static void PrintFile(string Id) { string rootPath = Funs.RootPath; @@ -197,7 +197,7 @@ namespace BLL { File.Delete(newUrl); } - var doc = Print( Id); + var doc = Print(Id); doc.Save(newUrl); //生成PDF文件 diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReview_Sch1Service.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReview_Sch1Service.cs index 6882091f..02a06346 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReview_Sch1Service.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReview_Sch1Service.cs @@ -24,7 +24,7 @@ namespace BLL Model.PHTGL_BidApproveUserReview_Sch1 table = new Model.PHTGL_BidApproveUserReview_Sch1(); table.ID = newtable.ID; table.ApproveUserReviewID = newtable.ApproveUserReviewID; - var name= BLL.Person_PersonsService.GetPersonsNameById(newtable.ApproveUserName); + var name = BLL.Person_PersonsService.GetPersonsNameById(newtable.ApproveUserName); if (!string.IsNullOrEmpty(name)) { table.ApproveUserName = name; diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidDocStandingBookService.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidDocStandingBookService.cs index f69fd2ec..1315d05e 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/BidDocStandingBookService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/BidDocStandingBookService.cs @@ -1,11 +1,7 @@ using FineUIPro; -using MiniExcelLibs.Attributes; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -41,11 +37,11 @@ namespace BLL (string.IsNullOrEmpty(table.ApprovePersonFormCode) || x.ApprovePersonFormCode.Contains(table.ApprovePersonFormCode)) && (string.IsNullOrEmpty(table.BidWinner) || x.BidWinner.Contains(table.BidWinner)) && (string.IsNullOrEmpty(table.SetSubReviewCode) || x.SetSubReviewCode.Contains(table.SetSubReviewCode)) && - (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId))&& - (string.IsNullOrEmpty(table.BidNoticeCode) || x.BidNoticeCode.Contains(table.BidNoticeCode))&& - (string.IsNullOrEmpty(table.BidUnitFileCode) || x.BidUnitFileCode.Contains(table.BidUnitFileCode))&& - (table.State == null||x.State==table.State) - select x + (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && + (string.IsNullOrEmpty(table.BidNoticeCode) || x.BidNoticeCode.Contains(table.BidNoticeCode)) && + (string.IsNullOrEmpty(table.BidUnitFileCode) || x.BidUnitFileCode.Contains(table.BidUnitFileCode)) && + (table.State == null || x.State == table.State) + select x ; return q.ToList(); @@ -64,7 +60,7 @@ namespace BLL { return null; } - q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); + q = q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q select new @@ -108,8 +104,8 @@ namespace BLL Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook { BidDocumentsStandingBookId = newtable.BidDocumentsStandingBookId, - UnitId= newtable.UnitId, - DepartId= newtable.DepartId, + UnitId = newtable.UnitId, + DepartId = newtable.DepartId, EPCCode = newtable.EPCCode, ProjectShortName = newtable.ProjectShortName, ProjectCode = newtable.ProjectCode, @@ -125,10 +121,10 @@ namespace BLL ApprovePersonFormCode = newtable.ApprovePersonFormCode, BidWinner = newtable.BidWinner, SetSubReviewCode = newtable.SetSubReviewCode, - ProjectId= newtable.ProjectId, - State=newtable.State, - BidNoticeCode=newtable.BidNoticeCode, - BidUnitFileCode=newtable.BidUnitFileCode, + ProjectId = newtable.ProjectId, + State = newtable.State, + BidNoticeCode = newtable.BidNoticeCode, + BidUnitFileCode = newtable.BidUnitFileCode, }; var db1 = Funs.DB; db1.PHTGL_BidDocumentsStandingBook.InsertOnSubmit(table); @@ -150,8 +146,8 @@ namespace BLL if (table != null) { table.BidDocumentsStandingBookId = newtable.BidDocumentsStandingBookId; - table.UnitId= newtable.UnitId; - table.DepartId= newtable.DepartId; + table.UnitId = newtable.UnitId; + table.DepartId = newtable.DepartId; table.EPCCode = newtable.EPCCode; table.ProjectShortName = newtable.ProjectShortName; table.ProjectCode = newtable.ProjectCode; @@ -167,10 +163,10 @@ namespace BLL table.ApprovePersonFormCode = newtable.ApprovePersonFormCode; table.BidWinner = newtable.BidWinner; table.SetSubReviewCode = newtable.SetSubReviewCode; - table.ProjectId=newtable.ProjectId; - table.State=newtable.State; - table.BidNoticeCode= newtable.BidNoticeCode; - table.BidUnitFileCode=newtable.BidUnitFileCode; + table.ProjectId = newtable.ProjectId; + table.State = newtable.State; + table.BidNoticeCode = newtable.BidNoticeCode; + table.BidUnitFileCode = newtable.BidUnitFileCode; db1.SubmitChanges(); } diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs index 1dfb1ece..840d9350 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs @@ -1,9 +1,9 @@ using Aspose.Words; +using Model; using System; using System.Collections.Generic; using System.IO; using System.Linq; -using Model; namespace BLL { @@ -141,7 +141,7 @@ namespace BLL /// /// /// - public static void InitGetBidCompleteDropDownList(FineUIPro.DropDownList dropName,string projectid, bool isShowPlease) + public static void InitGetBidCompleteDropDownList(FineUIPro.DropDownList dropName, string projectid, bool isShowPlease) { dropName.DataValueField = "BidDocumentsReviewId"; dropName.DataTextField = "BidDocumentsCode"; @@ -244,9 +244,9 @@ namespace BLL Document doc1 = new Aspose.Words.Document(newUrl); File.Delete(newUrl); return doc1; - + } - public static void PrintFile( string Id) + public static void PrintFile(string Id) { string rootPath = Funs.RootPath; @@ -258,7 +258,7 @@ namespace BLL { File.Delete(newUrl); } - var doc = Print( Id); + var doc = Print(Id); doc.Save(newUrl); //生成PDF文件 diff --git a/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs index 160f9e6c..d727aef4 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs @@ -1,5 +1,5 @@ using Aspose.Words; -using NPOI.SS.Formula.Functions; +using Model; using System; using System.Collections.Generic; using System.Data; @@ -7,7 +7,6 @@ using System.Data.SqlClient; using System.IO; using System.Linq; using System.Web.UI.WebControls; -using Model; namespace BLL { @@ -238,7 +237,7 @@ namespace BLL + @" FROM PHTGL_SetSubReview_Sch1 AS Sch1 " + @"where 1=1 AND SetSubReviewID = @SetSubReviewID order by SortIndex "; break; - + } uploadfilepath = rootPath + initTemplatePath; newUrl = uploadfilepath.Replace(".docx", string.Format("{0:yyyy-MM}", DateTime.Now) + ".docx"); @@ -315,7 +314,7 @@ namespace BLL doc.Save(newUrl); Document doc1 = new Aspose.Words.Document(newUrl); - + File.Delete(newUrl); return doc1; } @@ -345,7 +344,7 @@ namespace BLL } } - + break; case PHTGL_SetSubReviewService.Type_MinPrice: if (Act != null) @@ -361,9 +360,9 @@ namespace BLL } } - + break; - + } newUrl = rootPath + initTemplatePath; diff --git a/SGGL/BLL/PHTGL/BillOfQuantities/PhtglBidprojectquantityService .cs b/SGGL/BLL/PHTGL/BillOfQuantities/PhtglBidprojectquantityService .cs index f3dd421a..b93c5ad3 100644 --- a/SGGL/BLL/PHTGL/BillOfQuantities/PhtglBidprojectquantityService .cs +++ b/SGGL/BLL/PHTGL/BillOfQuantities/PhtglBidprojectquantityService .cs @@ -1,11 +1,11 @@ -using System; +using FineUIPro; +using MiniExcelLibs; +using Model; +using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; -using FineUIPro; -using MiniExcelLibs; -using Model; namespace BLL { @@ -78,27 +78,27 @@ namespace BLL querytable.IsTemplate = false; querytable.ParentId = item.MainProjectQuantityId; var tb = PHTGL_QuantityService.GetPHTGL_QuantityByModle(querytable); - var exportmodel = (from x in tb - select new - { - 专业= x.Major, - 分部工程= x.SubProject, - 分项工程= x.SubItemProject, - 项目编码= x.ProjectCode, - 项目名称=x.ProjectName, - 项目特征描述= x.ProjectDescription, - 计量单位= x.UnitOfMeasurement, - 工程量=x.Quantity, - 全费用固定综合单价=x.TotalCostFixedComprehensiveUnitPrice, - 主材费=x.MainMaterialCost, - 合价=x.TotalPrice, - 计算规则=x.CalculationRule, - 工作内容=x.WorkContent, - 备注=x.Remarks, - }).ToList(); - sheets.Add(item.MainProjectQuantityName,exportmodel); + var exportmodel = (from x in tb + select new + { + 专业 = x.Major, + 分部工程 = x.SubProject, + 分项工程 = x.SubItemProject, + 项目编码 = x.ProjectCode, + 项目名称 = x.ProjectName, + 项目特征描述 = x.ProjectDescription, + 计量单位 = x.UnitOfMeasurement, + 工程量 = x.Quantity, + 全费用固定综合单价 = x.TotalCostFixedComprehensiveUnitPrice, + 主材费 = x.MainMaterialCost, + 合价 = x.TotalPrice, + 计算规则 = x.CalculationRule, + 工作内容 = x.WorkContent, + 备注 = x.Remarks, + }).ToList(); + sheets.Add(item.MainProjectQuantityName, exportmodel); } - string path = Funs.RootPath + @"File\Excel\Temp\招标工作清单-"+ bidProjectQuantity.BidProjectCode+ ".xlsx"; + string path = Funs.RootPath + @"File\Excel\Temp\招标工作清单-" + bidProjectQuantity.BidProjectCode + ".xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); MiniExcel.SaveAs(path, sheets); string fileName = "招标工作清单-" + bidProjectQuantity.BidProjectCode + ".xlsx"; @@ -117,7 +117,7 @@ namespace BLL { var sheets = new Dictionary(); var mainProjectList = PHTGL_MainProjectQuantityService.GetPHTGL_MainProjectQuantityById(mainProjectQuantityId);//获取主项 - if (mainProjectList==null) + if (mainProjectList == null) { return; } @@ -126,25 +126,25 @@ namespace BLL querytable.ParentId = mainProjectQuantityId; var tb = PHTGL_QuantityService.GetPHTGL_QuantityByModle(querytable); var exportmodel = (from x in tb - select new - { - 专业 = x.Major, - 分部工程 = x.SubProject, - 分项工程 = x.SubItemProject, - 项目编码 = x.ProjectCode, - 项目名称 = x.ProjectName, - 项目特征描述 = x.ProjectDescription, - 计量单位 = x.UnitOfMeasurement, - 工程量 = x.Quantity, - 全费用固定综合单价 = x.TotalCostFixedComprehensiveUnitPrice, - 主材费 = x.MainMaterialCost, - 合价 = x.TotalPrice, - 计算规则 = x.CalculationRule, - 工作内容 = x.WorkContent, - 备注 = x.Remarks, - }).ToList(); + select new + { + 专业 = x.Major, + 分部工程 = x.SubProject, + 分项工程 = x.SubItemProject, + 项目编码 = x.ProjectCode, + 项目名称 = x.ProjectName, + 项目特征描述 = x.ProjectDescription, + 计量单位 = x.UnitOfMeasurement, + 工程量 = x.Quantity, + 全费用固定综合单价 = x.TotalCostFixedComprehensiveUnitPrice, + 主材费 = x.MainMaterialCost, + 合价 = x.TotalPrice, + 计算规则 = x.CalculationRule, + 工作内容 = x.WorkContent, + 备注 = x.Remarks, + }).ToList(); sheets.Add(mainProjectList.MainProjectQuantityName, exportmodel); - + string path = Funs.RootPath + @"File\Excel\Temp\招标工作清单-" + mainProjectList.MainProjectQuantityCode + ".xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); MiniExcel.SaveAs(path, sheets); @@ -202,16 +202,16 @@ namespace BLL q = q.Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q - select new - { - x.BidProjectQuantityId, - x.LotNumber, - x.BidProjectCode, - x.IsMainProject, - x.ProjectId, - x.CreatorId, - x.CreateDate - }; + select new + { + x.BidProjectQuantityId, + x.LotNumber, + x.BidProjectCode, + x.IsMainProject, + x.ProjectId, + x.CreatorId, + x.CreateDate + }; } #endregion diff --git a/SGGL/BLL/PHTGL/BillOfQuantities/PhtglMainprojectquantityService .cs b/SGGL/BLL/PHTGL/BillOfQuantities/PhtglMainprojectquantityService .cs index 66ddb486..b16bfb63 100644 --- a/SGGL/BLL/PHTGL/BillOfQuantities/PhtglMainprojectquantityService .cs +++ b/SGGL/BLL/PHTGL/BillOfQuantities/PhtglMainprojectquantityService .cs @@ -1,8 +1,8 @@ -using System.Collections; +using FineUIPro; +using Model; +using System.Collections; using System.Collections.Generic; using System.Linq; -using FineUIPro; -using Model; namespace BLL { @@ -105,13 +105,13 @@ namespace BLL q = q.Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q - select new - { - x.MainProjectQuantityId, - x.MainProjectQuantityCode, - x.MainProjectQuantityName, - x.QuantityId - }; + select new + { + x.MainProjectQuantityId, + x.MainProjectQuantityCode, + x.MainProjectQuantityName, + x.QuantityId + }; } #endregion diff --git a/SGGL/BLL/PHTGL/BillOfQuantities/PhtglQuantityService.cs b/SGGL/BLL/PHTGL/BillOfQuantities/PhtglQuantityService.cs index b910b324..896d0194 100644 --- a/SGGL/BLL/PHTGL/BillOfQuantities/PhtglQuantityService.cs +++ b/SGGL/BLL/PHTGL/BillOfQuantities/PhtglQuantityService.cs @@ -1,12 +1,12 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using EmitMapper; +using EmitMapper; using FineUIPro; using MiniExcelLibs; using MiniExcelLibs.Attributes; using Model; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; namespace BLL { @@ -17,9 +17,9 @@ namespace BLL return Funs.DB.PHTGL_Quantity.FirstOrDefault(x => x.Id == Id); } - public static PHTGL_Quantity GetPHTGL_QuantityByNumBer(string serialNumber,string marjor) + public static PHTGL_Quantity GetPHTGL_QuantityByNumBer(string serialNumber, string marjor) { - return Funs.DB.PHTGL_Quantity.FirstOrDefault(x => x.SerialNumber == serialNumber && x.Major==marjor); + return Funs.DB.PHTGL_Quantity.FirstOrDefault(x => x.SerialNumber == serialNumber && x.Major == marjor); } public static void AddPHTGL_Quantity(PHTGL_Quantity newtable) @@ -136,24 +136,24 @@ namespace BLL public static ResponeData ImportData(string path, string majortype) { var responeData = new ResponeData(); - List rows= new List(); - List remarkQuery=new List(); + List rows = new List(); + List remarkQuery = new List(); string Major = ""; try { var sheetNames = MiniExcel.GetSheetNames(path); foreach (var item in sheetNames) { - if (item=="编制说明") + if (item == "编制说明") { - remarkQuery = MiniExcel.Query(path, sheetName: item).ToList(); + remarkQuery = MiniExcel.Query(path, sheetName: item).ToList(); } else { rows = MiniExcel.Query(path, sheetName: item).ToList(); } } - + } catch (Exception e) { @@ -174,7 +174,7 @@ namespace BLL Major = GetMajorItems().Where(x => x.Text == majortype).Select(x => x.Value).FirstOrDefault() ?? ""; - List consts=new List(); + List consts = new List(); int SortIndex = 0; foreach (var item in remarkQuery) { @@ -184,14 +184,14 @@ namespace BLL ID = SQLHelper.GetNewID(), ConstValue = item.A?.ToString(), SortIndex = SortIndex, - GroupId = "工程量清单-"+ Major + GroupId = "工程量清单-" + Major }; consts.Add(model); SortIndex++; } var old = ConstValue.drpConstItemList("工程量清单-" + Major); - if (old.Count>0) + if (old.Count > 0) { Funs.DB.Sys_Const.DeleteAllOnSubmit(old); Funs.DB.SubmitChanges(); @@ -203,8 +203,8 @@ namespace BLL { item.Major = Major; if (string.IsNullOrEmpty(Major)) break; - if (string .IsNullOrEmpty(item.ProjectName)) continue; - if (item.ProjectName== "项目名称") continue; + if (string.IsNullOrEmpty(item.ProjectName)) continue; + if (item.ProjectName == "项目名称") continue; var queryPhtglQuantity = new PHTGL_Quantity { Major = item.Major, @@ -401,36 +401,36 @@ namespace BLL public static List GetPHTGL_QuantityByModle(PHTGL_Quantity table) { var q = from x in Funs.DB.PHTGL_Quantity - where - (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && - (string.IsNullOrEmpty(table.Major) || x.Major.Contains(table.Major)) && - (string.IsNullOrEmpty(table.SubProject) || x.SubProject.Contains(table.SubProject)) && - (string.IsNullOrEmpty(table.SubItemProject) || - x.SubItemProject.Contains(table.SubItemProject)) && - (string.IsNullOrEmpty(table.ProjectCode) || x.ProjectCode.Contains(table.ProjectCode)) && - (string.IsNullOrEmpty(table.ProjectName) || x.ProjectName.Contains(table.ProjectName)) && - (string.IsNullOrEmpty(table.ProjectDescription) || - x.ProjectDescription.Contains(table.ProjectDescription)) && - (string.IsNullOrEmpty(table.UnitOfMeasurement) || - x.UnitOfMeasurement.Contains(table.UnitOfMeasurement)) && - (string.IsNullOrEmpty(table.Quantity) || x.Quantity.Contains(table.Quantity)) && - (string.IsNullOrEmpty(table.TotalCostFixedComprehensiveUnitPrice) || - x.TotalCostFixedComprehensiveUnitPrice.Contains(table.TotalCostFixedComprehensiveUnitPrice)) && - (string.IsNullOrEmpty(table.MainMaterialCost) || - x.MainMaterialCost.Contains(table.MainMaterialCost)) && - (string.IsNullOrEmpty(table.TotalPrice) || x.TotalPrice.Contains(table.TotalPrice)) && - (string.IsNullOrEmpty(table.CalculationRule) || - x.CalculationRule.Contains(table.CalculationRule)) && - (string.IsNullOrEmpty(table.WorkContent) || x.WorkContent.Contains(table.WorkContent)) && - (string.IsNullOrEmpty(table.Remarks) || x.Remarks.Contains(table.Remarks)) && - x.IsTemplate == table.IsTemplate && - (string.IsNullOrEmpty(table.ParentId) || x.ParentId.Contains(table.ParentId)) + where + (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && + (string.IsNullOrEmpty(table.Major) || x.Major.Contains(table.Major)) && + (string.IsNullOrEmpty(table.SubProject) || x.SubProject.Contains(table.SubProject)) && + (string.IsNullOrEmpty(table.SubItemProject) || + x.SubItemProject.Contains(table.SubItemProject)) && + (string.IsNullOrEmpty(table.ProjectCode) || x.ProjectCode.Contains(table.ProjectCode)) && + (string.IsNullOrEmpty(table.ProjectName) || x.ProjectName.Contains(table.ProjectName)) && + (string.IsNullOrEmpty(table.ProjectDescription) || + x.ProjectDescription.Contains(table.ProjectDescription)) && + (string.IsNullOrEmpty(table.UnitOfMeasurement) || + x.UnitOfMeasurement.Contains(table.UnitOfMeasurement)) && + (string.IsNullOrEmpty(table.Quantity) || x.Quantity.Contains(table.Quantity)) && + (string.IsNullOrEmpty(table.TotalCostFixedComprehensiveUnitPrice) || + x.TotalCostFixedComprehensiveUnitPrice.Contains(table.TotalCostFixedComprehensiveUnitPrice)) && + (string.IsNullOrEmpty(table.MainMaterialCost) || + x.MainMaterialCost.Contains(table.MainMaterialCost)) && + (string.IsNullOrEmpty(table.TotalPrice) || x.TotalPrice.Contains(table.TotalPrice)) && + (string.IsNullOrEmpty(table.CalculationRule) || + x.CalculationRule.Contains(table.CalculationRule)) && + (string.IsNullOrEmpty(table.WorkContent) || x.WorkContent.Contains(table.WorkContent)) && + (string.IsNullOrEmpty(table.Remarks) || x.Remarks.Contains(table.Remarks)) && + x.IsTemplate == table.IsTemplate && + (string.IsNullOrEmpty(table.ParentId) || x.ParentId.Contains(table.ParentId)) - select x; - //select new { x ,IntSerialNumber= Funs.GetNewIntOrZero(x.SerialNumber.Replace(".", "")) - // } + select x; + //select new { x ,IntSerialNumber= Funs.GetNewIntOrZero(x.SerialNumber.Replace(".", "")) + // } - ; + ; //var model = q.ToList().OrderBy(x => x.IntSerialNumber).Select(itemx => itemx.x).ToList(); var model = q.ToList().OrderBy(x => x.SerialNumber, new CustomComparer()).ToList(); return model; @@ -449,27 +449,27 @@ namespace BLL q = q.Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q - select new - { - x.Id, - x.SerialNumber, - x.Major, - x.SubProject, - x.SubItemProject, - x.ProjectCode, - x.ProjectName, - x.ProjectDescription, - x.UnitOfMeasurement, - x.Quantity, - x.TotalCostFixedComprehensiveUnitPrice, - x.MainMaterialCost, - x.TotalPrice, - x.CalculationRule, - x.WorkContent, - x.Remarks, - x.IsTemplate, - x.ParentId - }; + select new + { + x.Id, + x.SerialNumber, + x.Major, + x.SubProject, + x.SubItemProject, + x.ProjectCode, + x.ProjectName, + x.ProjectDescription, + x.UnitOfMeasurement, + x.Quantity, + x.TotalCostFixedComprehensiveUnitPrice, + x.MainMaterialCost, + x.TotalPrice, + x.CalculationRule, + x.WorkContent, + x.Remarks, + x.IsTemplate, + x.ParentId + }; } public static void CheckSubProjectName(List list) @@ -479,7 +479,7 @@ namespace BLL var SubProject = ""; var SubItemProject = ""; var SerialNumberArry = item.SerialNumber?.Split('.'); - if (SerialNumberArry.Length==2) + if (SerialNumberArry.Length == 2) { item.SubProject = GetPHTGL_QuantityByNumBer(SerialNumberArry[0], item.Major).ProjectName; UpdatePHTGL_Quantity(item); @@ -488,10 +488,10 @@ namespace BLL else if (SerialNumberArry.Length == 3) { item.SubProject = GetPHTGL_QuantityByNumBer(SerialNumberArry[0], item.Major).ProjectName; - item.SubItemProject= GetPHTGL_QuantityByNumBer(SerialNumberArry[0]+"."+ SerialNumberArry[1], item.Major).ProjectName; + item.SubItemProject = GetPHTGL_QuantityByNumBer(SerialNumberArry[0] + "." + SerialNumberArry[1], item.Major).ProjectName; UpdatePHTGL_Quantity(item); } - + } } @@ -501,7 +501,7 @@ namespace BLL { public int Compare(string x, string y) { - if (string.IsNullOrEmpty(x)||string.IsNullOrEmpty(y)) + if (string.IsNullOrEmpty(x) || string.IsNullOrEmpty(y)) { return 0; } diff --git a/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs b/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs index aa41388b..6afb389e 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs @@ -1,7 +1,6 @@ using Aspose.Words; using FineUIPro; -using ICSharpCode.SharpZipLib.Zip; -using Microsoft.SqlServer.Server; +using Model; using System; using System.Collections.Generic; using System.Data; @@ -10,7 +9,6 @@ using System.Drawing; using System.IO; using System.Linq; using System.Reflection; -using Model; namespace BLL { @@ -584,7 +582,7 @@ namespace BLL return doc1; } - public static void PrintFile( string ContractReviewId) + public static void PrintFile(string ContractReviewId) { string rootPath = Funs.RootPath; var ReviewModel = BLL.PHTGL_ContractReviewService.GetPHTGL_ContractReviewById(ContractReviewId); @@ -621,10 +619,10 @@ namespace BLL } - public static void PrintFileByDocument(Document doc,string name) + public static void PrintFileByDocument(Document doc, string name) { string rootPath = Funs.RootPath; - + string newUrl = string.Empty; newUrl = rootPath + "File\\Word\\PHTGL\\合同评审.docx"; newUrl = newUrl.Replace(".docx", string.Format("{0:yyyy-MM}", DateTime.Now) + ".docx"); @@ -639,7 +637,7 @@ namespace BLL //验证参数 if (doc1 == null) { throw new Exception("Word文件无效"); } doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式 - string fileName = Path.GetFileName(pdfUrl).Replace("合同评审", name ); + string fileName = Path.GetFileName(pdfUrl).Replace("合同评审", name); FileInfo info = new FileInfo(pdfUrl); long fileSize = info.Length; System.Web.HttpContext.Current.Response.Clear(); @@ -654,15 +652,15 @@ namespace BLL } - public static void PrintApprovalForm(string ContractReviewId) + public static void PrintApprovalForm(string ContractReviewId) { var ReviewModel = BLL.PHTGL_ContractReviewService.GetPHTGL_ContractReviewById(ContractReviewId); var getFireWork = BLL.ContractService.GetContractById(ReviewModel.ContractId); - string projectname=ProjectService.GetProjectNameByProjectId(getFireWork.ProjectId); + string projectname = ProjectService.GetProjectNameByProjectId(getFireWork.ProjectId); string rootPath = Funs.RootPath; - string startPath = rootPath + "File\\Word\\PHTGL\\"+ getFireWork.ContractNum + "-"+projectname + "-" + getFireWork.ContractName + "-合同管理资料"; - if (!Directory.Exists(startPath)) + string startPath = rootPath + "File\\Word\\PHTGL\\" + getFireWork.ContractNum + "-" + projectname + "-" + getFireWork.ContractName + "-合同管理资料"; + if (!Directory.Exists(startPath)) { Directory.CreateDirectory(startPath); } @@ -670,24 +668,24 @@ namespace BLL switch (getFireWork.ConfirmWay) { case "1": - PrintApprovalFormType_SetSub(ContractReviewId, startPath + "\\"); + PrintApprovalFormType_SetSub(ContractReviewId, startPath + "\\"); break; case "2": - PrintApprovalFormType_SetSub(ContractReviewId, startPath + "\\"); + PrintApprovalFormType_SetSub(ContractReviewId, startPath + "\\"); break; case "3": - PrintApprovalFormType_SetSub(ContractReviewId, startPath + "\\"); + PrintApprovalFormType_SetSub(ContractReviewId, startPath + "\\"); break; case "4": - PrintApprovalFormType_Act(ContractReviewId, startPath + "\\"); + PrintApprovalFormType_Act(ContractReviewId, startPath + "\\"); break; case "5": PrintApprovalFormType_Act(ContractReviewId, startPath + "\\"); - break; - default : - PrintApprovalFormType__Con(ContractReviewId, startPath + "\\"); + break; + default: + PrintApprovalFormType__Con(ContractReviewId, startPath + "\\"); break; } System.IO.Compression.ZipFile.CreateFromDirectory(startPath, zipPath); @@ -701,9 +699,9 @@ namespace BLL System.Web.HttpContext.Current.Response.Flush(); System.Web.HttpContext.Current.Response.Close(); Funs.DeleteDir(startPath); - File.Delete (zipPath); + File.Delete(zipPath); - } + } /// /// ConfirmWay 4,5 /// @@ -729,37 +727,37 @@ namespace BLL /// /// ConfirmWay 1,2,3 /// - public static void PrintApprovalFormType_SetSub(string ContractReviewId,string path) + public static void PrintApprovalFormType_SetSub(string ContractReviewId, string path) { - - Model.PHTGL_Contract Contract =new Model.PHTGL_Contract(); //合同信息 + + Model.PHTGL_Contract Contract = new Model.PHTGL_Contract(); //合同信息 Model.PHTGL_SetSubReview SetSub = new Model.PHTGL_SetSubReview(); //确认分包商信息 Model.PHTGL_BidApproveUserReview ApproveUser = new Model.PHTGL_BidApproveUserReview(); //评标小组名单信息 Model.PHTGL_BidDocumentsReview BidDoc = new Model.PHTGL_BidDocumentsReview();//招标文件信息 Model.PHTGL_ActionPlanReview ActPlan = new Model.PHTGL_ActionPlanReview();//实施计划信息 Model.PHTGL_ActionPlanFormation ActPlanFormat = new Model.PHTGL_ActionPlanFormation(); //实施计划编制信息 - var ReviewModel = BLL.PHTGL_ContractReviewService.GetPHTGL_ContractReviewById(ContractReviewId); - Contract = BLL.ContractService.GetContractById(ReviewModel.ContractId); - SetSub = BLL.PHTGL_SetSubReviewService.GetPHTGL_SetSubReviewBySetSubReviewCode(Contract.SetSubReviewCode); - ApproveUser = BLL.PHTGL_BidApproveUserReviewService.GetPHTGL_BidApproveUserReviewById(SetSub.ApproveUserReviewID); - BidDoc = BLL.PHTGL_BidDocumentsReviewService.GetPHTGL_BidDocumentsReviewById(ApproveUser.BidDocumentsReviewId); - ActPlan = BLL.PHTGL_ActionPlanReviewService.GetPHTGL_ActionPlanReviewById(BidDoc.ActionPlanReviewId); - ActPlanFormat = PHTGL_ActionPlanFormationService.GetPHTGL_ActionPlanFormationById(ActPlan.ActionPlanID); + var ReviewModel = BLL.PHTGL_ContractReviewService.GetPHTGL_ContractReviewById(ContractReviewId); + Contract = BLL.ContractService.GetContractById(ReviewModel.ContractId); + SetSub = BLL.PHTGL_SetSubReviewService.GetPHTGL_SetSubReviewBySetSubReviewCode(Contract.SetSubReviewCode); + ApproveUser = BLL.PHTGL_BidApproveUserReviewService.GetPHTGL_BidApproveUserReviewById(SetSub.ApproveUserReviewID); + BidDoc = BLL.PHTGL_BidDocumentsReviewService.GetPHTGL_BidDocumentsReviewById(ApproveUser.BidDocumentsReviewId); + ActPlan = BLL.PHTGL_ActionPlanReviewService.GetPHTGL_ActionPlanReviewById(BidDoc.ActionPlanReviewId); + ActPlanFormat = PHTGL_ActionPlanFormationService.GetPHTGL_ActionPlanFormationById(ActPlan.ActionPlanID); - var Doc_ActPlan = PHTGL_ActionPlanFormationService.Print(ActPlan.ActionPlanID); + var Doc_ActPlan = PHTGL_ActionPlanFormationService.Print(ActPlan.ActionPlanID); var Doc_BidDoc = PHTGL_BidDocumentsReviewService.Print(BidDoc.BidDocumentsReviewId); var Doc_ApproveUser = PHTGL_BidApproveUserReviewService.Print(ApproveUser.ApproveUserReviewID); var Doc_SetSub = PHTGL_SetSubReviewService.Print(SetSub.SetSubReviewID); var Doc_Contract = Print(ContractReviewId); - Doc_ActPlan.Save(path+ ActPlanFormat.ActionPlanCode+ "施工分包实施计划.pdf" , SaveFormat.Pdf); - Doc_BidDoc.Save(path + BidDoc.BidDocumentsCode + "招标文件审批表.pdf",SaveFormat.Pdf); - Doc_ApproveUser.Save(path+ "施工招标评标小组名单审批表.pdf", SaveFormat.Pdf); - Doc_SetSub.Save(path+ SetSub.SetSubReviewCode+ "确定分包商审批表.pdf", SaveFormat.Pdf); - Doc_Contract.Save(path+ Contract.ContractNum + "合同评审.pdf", SaveFormat.Pdf); + Doc_ActPlan.Save(path + ActPlanFormat.ActionPlanCode + "施工分包实施计划.pdf", SaveFormat.Pdf); + Doc_BidDoc.Save(path + BidDoc.BidDocumentsCode + "招标文件审批表.pdf", SaveFormat.Pdf); + Doc_ApproveUser.Save(path + "施工招标评标小组名单审批表.pdf", SaveFormat.Pdf); + Doc_SetSub.Save(path + SetSub.SetSubReviewCode + "确定分包商审批表.pdf", SaveFormat.Pdf); + Doc_Contract.Save(path + Contract.ContractNum + "合同评审.pdf", SaveFormat.Pdf); } - public static void PrintApprovalFormType__Con(string ContractReviewId,string path) + public static void PrintApprovalFormType__Con(string ContractReviewId, string path) { Model.PHTGL_Contract Contract = new Model.PHTGL_Contract(); //合同信息 var ReviewModel = BLL.PHTGL_ContractReviewService.GetPHTGL_ContractReviewById(ContractReviewId); diff --git a/SGGL/BLL/PHTGL/ContractCompile/ContractService.cs b/SGGL/BLL/PHTGL/ContractCompile/ContractService.cs index bce910e4..7dfc100b 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/ContractService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/ContractService.cs @@ -50,15 +50,15 @@ namespace BLL /// /// public static List GetCompletedContracts(string ProjectId) - { - var q= from x in Funs.DB.PHTGL_Contract - join y in Funs.DB.PHTGL_ContractReview on x.ContractId equals y.ContractId - where - y.State== Const.ContractReview_Complete && - x.ContractAttribute==0 && - x.ProjectId==ProjectId - select x; - return q.ToList(); + { + var q = from x in Funs.DB.PHTGL_Contract + join y in Funs.DB.PHTGL_ContractReview on x.ContractId equals y.ContractId + where + y.State == Const.ContractReview_Complete && + x.ContractAttribute == 0 && + x.ProjectId == ProjectId + select x; + return q.ToList(); } public static void InitAllProjectCodeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { @@ -82,7 +82,7 @@ namespace BLL dropName.DataTextField = "ContractNum"; var CompletedContractslist = GetCompletedContracts(projectId); dropName.DataSource = CompletedContractslist; - dropName.DataBind(); + dropName.DataBind(); } /// diff --git a/SGGL/BLL/PHTGL/ContractCompile/ContractStandingBookService.cs b/SGGL/BLL/PHTGL/ContractCompile/ContractStandingBookService.cs index 47db61d9..1b85c28c 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/ContractStandingBookService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/ContractStandingBookService.cs @@ -11,7 +11,7 @@ namespace BLL /// public static class ContractStandingBookService { - + #region 获取列表 /// /// 记录数 @@ -58,7 +58,7 @@ namespace BLL (string.IsNullOrEmpty(table.Retentionmoney) || x.Retentionmoney.Contains(table.Retentionmoney)) && (string.IsNullOrEmpty(table.CreateDate) || x.CreateDate.Contains(table.CreateDate)) && (string.IsNullOrEmpty(table.Status) || x.Status.Contains(table.Status)) && - (table.States == null || x.States==table.States) && + (table.States == null || x.States == table.States) && (string.IsNullOrEmpty(table.ContactUnitOfPartyA) || x.ContactUnitOfPartyA.Contains(table.ContactUnitOfPartyA)) && (string.IsNullOrEmpty(table.ContactPersonOfPartyA) || x.ContactPersonOfPartyA.Contains(table.ContactPersonOfPartyA)) && (string.IsNullOrEmpty(table.ContactPersonOfPartyB) || x.ContactPersonOfPartyB.Contains(table.ContactPersonOfPartyB)) && @@ -72,7 +72,7 @@ namespace BLL (string.IsNullOrEmpty(table.SubcontractingMethod) || x.SubcontractingMethod.Contains(table.SubcontractingMethod)) && (string.IsNullOrEmpty(table.IsItACentralizedPurchaseSupplier) || x.IsItACentralizedPurchaseSupplier.Contains(table.IsItACentralizedPurchaseSupplier)) && (string.IsNullOrEmpty(table.Clause) || x.Clause.Contains(table.Clause)) && - (string.IsNullOrEmpty(table.MainContent) || x.MainContent.Contains(table.MainContent)) + (string.IsNullOrEmpty(table.MainContent) || x.MainContent.Contains(table.MainContent)) select x ; @@ -92,7 +92,7 @@ namespace BLL { return null; } - q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); + q = q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q select new @@ -218,9 +218,9 @@ namespace BLL { ContractId = newtable.ContractId, ProjectId = newtable.ProjectId, - UnitId=newtable.UnitId, - ProjectName= newtable.ProjectName, - ProjectCode= newtable.ProjectCode, + UnitId = newtable.UnitId, + ProjectName = newtable.ProjectName, + ProjectCode = newtable.ProjectCode, ContractName = newtable.ContractName, ContractNum = newtable.ContractNum, Parties = newtable.Parties, @@ -286,9 +286,9 @@ namespace BLL if (newContract != null) { newContract.ProjectId = contract.ProjectId; - newContract.UnitId= contract.UnitId; - newContract.ProjectName=contract.ProjectName; - newContract.ProjectCode=contract.ProjectCode; + newContract.UnitId = contract.UnitId; + newContract.ProjectName = contract.ProjectName; + newContract.ProjectCode = contract.ProjectCode; newContract.ContractCode = contract.ContractCode; newContract.ContractName = contract.ContractName; newContract.ContractNum = contract.ContractNum; @@ -370,7 +370,7 @@ namespace BLL public class ContractStandingBooKDtoIn { - + /// /// 合同名称 /// @@ -379,7 +379,7 @@ namespace BLL /// /// 合同编号 /// - [ExcelColumnName("合同编号")] + [ExcelColumnName("合同编号")] public string ContractNum { get; set; } [ExcelColumnName("项目名称")] @@ -390,7 +390,7 @@ namespace BLL /// /// 签约方 /// - [ExcelColumnName("签约方")] + [ExcelColumnName("签约方")] public string Parties { get; set; } /// /// 币种(人民币、美元、欧元、印尼盾) @@ -408,7 +408,7 @@ namespace BLL /// [ExcelColumnName("合同类型")] public string ContractType { get; set; } - + /// /// /// @@ -424,7 +424,7 @@ namespace BLL /// [ExcelColumnName("合同属性")] public string ContractAttribute { get; set; } - + /// /// /// @@ -455,13 +455,13 @@ namespace BLL /// [ExcelColumnName("质保金")] public string Retentionmoney { get; set; } - + /// /// 合同状态 /// [ExcelColumnName("合同状态")] public string Status { get; set; } - + /// /// 甲方联系单位 /// @@ -527,7 +527,7 @@ namespace BLL /// [ExcelColumnName("乙方是否为集采供应商/分包商")] public string IsItACentralizedPurchaseSupplier { get; set; } - + } diff --git a/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs b/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs index 42b34d15..b1bc1214 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs @@ -1,6 +1,4 @@ -using Model; -using System; -using System.Collections; +using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; @@ -37,7 +35,7 @@ namespace BLL return q; } - + /// ///获取当前人员的所有审批信息 /// @@ -52,7 +50,7 @@ namespace BLL } public static Model.PHTGL_Approve GetPHTGL_ApproveByContractIdandUserId(string contractId, string UserID) { - var q=(from x in Funs.DB.PHTGL_Approve where x.ContractId==contractId && x.ApproveMan==UserID orderby x.ApproveDate descending select x ).FirstOrDefault(); + var q = (from x in Funs.DB.PHTGL_Approve where x.ContractId == contractId && x.ApproveMan == UserID orderby x.ApproveDate descending select x).FirstOrDefault(); //return Funs.DB.PHTGL_Approve.FirstOrDefault(e => e.ContractId == contractId && e.ApproveMan == UserID ); return q; } @@ -99,8 +97,8 @@ namespace BLL public static bool IsApprovingMan(string contractId, string approveMan) { bool IsExit = false; - var q = (from x in Funs.DB.PHTGL_Approve where x.ContractId == contractId && x.ApproveMan == approveMan && x.State==0 select x).ToList(); - if (q.Count>0) + var q = (from x in Funs.DB.PHTGL_Approve where x.ContractId == contractId && x.ApproveMan == approveMan && x.State == 0 select x).ToList(); + if (q.Count > 0) { IsExit = true; } @@ -172,7 +170,7 @@ namespace BLL /// public static List GetApproves_NopushOa() { - var q = (from x in Funs.DB.PHTGL_Approve where x.IsPushOa == 0 && x.ApproveMan != "" && x.State==0 select x).ToList(); + var q = (from x in Funs.DB.PHTGL_Approve where x.IsPushOa == 0 && x.ApproveMan != "" && x.State == 0 select x).ToList(); return q; } /// @@ -254,47 +252,47 @@ namespace BLL public static IEnumerable GetAllApproveData(string contractId) { var result = (from x in Funs.DB.PHTGL_Approve - join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId - where x.IsAgree != 0 && x.ContractId == contractId - orderby x.ApproveDate + join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId + where x.IsAgree != 0 && x.ContractId == contractId + orderby x.ApproveDate select new - { - ApproveMan = u.PersonName, - x.ApproveDate, - IsAgree = x.IsAgree == 1 ? "不同意" : "同意", - x.ApproveIdea, - x.ApproveId, - x.ApproveType, - x.ApproveForm - } + { + ApproveMan = u.PersonName, + x.ApproveDate, + IsAgree = x.IsAgree == 1 ? "不同意" : "同意", + x.ApproveIdea, + x.ApproveId, + x.ApproveType, + x.ApproveForm + } - ).ToList(); + ).ToList(); return result; } - public static IEnumerable GetAllApproveData(string contractId,string aproveForm) + public static IEnumerable GetAllApproveData(string contractId, string aproveForm) { var result = (from x in Funs.DB.PHTGL_Approve - join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId - where x.IsAgree != 0 && x.ContractId == contractId - orderby x.ApproveDate - select new - { - ApproveMan = u.PersonName, - x.ApproveDate, - IsAgree = x.IsAgree == 1 ? "不同意" : "同意", - x.ApproveIdea, - x.ApproveId, - x.ApproveType, - x.ApproveForm - } + join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId + where x.IsAgree != 0 && x.ContractId == contractId + orderby x.ApproveDate + select new + { + ApproveMan = u.PersonName, + x.ApproveDate, + IsAgree = x.IsAgree == 1 ? "不同意" : "同意", + x.ApproveIdea, + x.ApproveId, + x.ApproveType, + x.ApproveForm + } ).ToList(); if (!string.IsNullOrEmpty(aproveForm)) { result = result.Where(x => x.ApproveForm == aproveForm).ToList(); } - + return result; } diff --git a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs index afbbe131..5d03bdef 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs +++ b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs @@ -1,17 +1,12 @@ -using System; +using EmitMapper; +using FineUIPro; +using MiniExcelLibs; +using Model; +using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Linq; -using System.Threading.Tasks; -using EmitMapper; -using EmitMapper.MappingConfiguration; -using FineUIPro; -using MiniExcelLibs; -using MiniExcelLibs.Attributes; -using MiniExcelLibs.OpenXml; -using Model; -using WIA; namespace BLL { @@ -59,7 +54,7 @@ namespace BLL (string.IsNullOrEmpty(table.SettledQuantity) || x.SettledQuantity.Contains(table.SettledQuantity)) && (string.IsNullOrEmpty(table.ContractId) || - table.ContractId.Split(',').Contains(x.ContractId))&& + table.ContractId.Split(',').Contains(x.ContractId)) && (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) @@ -72,44 +67,44 @@ namespace BLL public static PHTGL_ContractTrack GetFirstPHTGL_ContractTrackByModle(PHTGL_ContractTrack table) { var q = (from x in Funs.DB.PHTGL_ContractTrack - where - (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && - (string.IsNullOrEmpty(table.ContractNum) || x.ContractNum.Contains(table.ContractNum)) && - (string.IsNullOrEmpty(table.MainItemCode) || x.MainItemCode.Contains(table.MainItemCode)) && - (string.IsNullOrEmpty(table.MainItemName) || x.MainItemName.Contains(table.MainItemName)) && - (string.IsNullOrEmpty(table.MajorName) || x.MajorName.Contains(table.MajorName)) && - (string.IsNullOrEmpty(table.MajorCode) || x.MajorCode.Contains(table.MajorCode)) && - (string.IsNullOrEmpty(table.SubProject) || x.SubProject.Contains(table.SubProject)) && - (string.IsNullOrEmpty(table.SubItemProject) || - x.SubItemProject.Contains(table.SubItemProject)) && - (string.IsNullOrEmpty(table.ProjectCode) || x.ProjectCode.Contains(table.ProjectCode)) && - (string.IsNullOrEmpty(table.ProjectName) || x.ProjectName.Contains(table.ProjectName)) && - (string.IsNullOrEmpty(table.ProjectDescription) || - x.ProjectDescription.Contains(table.ProjectDescription)) && - (string.IsNullOrEmpty(table.UnitOfMeasurement) || - x.UnitOfMeasurement.Contains(table.UnitOfMeasurement)) && - (string.IsNullOrEmpty(table.Quantity) || x.Quantity.Contains(table.Quantity)) && - (string.IsNullOrEmpty(table.CalculationRule) || - x.CalculationRule.Contains(table.CalculationRule)) && - (string.IsNullOrEmpty(table.WorkContent) || x.WorkContent.Contains(table.WorkContent)) && - (string.IsNullOrEmpty(table.Remarks) || x.Remarks.Contains(table.Remarks)) && - (string.IsNullOrEmpty(table.ConstructionSubcontractor) || - x.ConstructionSubcontractor.Contains(table.ConstructionSubcontractor)) && - (string.IsNullOrEmpty(table.ContractWeight) || - x.ContractWeight.Contains(table.ContractWeight)) && - (string.IsNullOrEmpty(table.MaterialSupplier) || - x.MaterialSupplier.Contains(table.MaterialSupplier)) && - (string.IsNullOrEmpty(table.EstimatedQuantity) || - x.EstimatedQuantity.Contains(table.EstimatedQuantity)) && - (string.IsNullOrEmpty(table.SettledQuantity) || - x.SettledQuantity.Contains(table.SettledQuantity)) && - (string.IsNullOrEmpty(table.ContractId) || - table.ContractId.Split(',').Contains(x.ContractId)) && - (string.IsNullOrEmpty(table.ProjectId) || - x.ProjectId.Contains(table.ProjectId)) + where + (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && + (string.IsNullOrEmpty(table.ContractNum) || x.ContractNum.Contains(table.ContractNum)) && + (string.IsNullOrEmpty(table.MainItemCode) || x.MainItemCode.Contains(table.MainItemCode)) && + (string.IsNullOrEmpty(table.MainItemName) || x.MainItemName.Contains(table.MainItemName)) && + (string.IsNullOrEmpty(table.MajorName) || x.MajorName.Contains(table.MajorName)) && + (string.IsNullOrEmpty(table.MajorCode) || x.MajorCode.Contains(table.MajorCode)) && + (string.IsNullOrEmpty(table.SubProject) || x.SubProject.Contains(table.SubProject)) && + (string.IsNullOrEmpty(table.SubItemProject) || + x.SubItemProject.Contains(table.SubItemProject)) && + (string.IsNullOrEmpty(table.ProjectCode) || x.ProjectCode.Contains(table.ProjectCode)) && + (string.IsNullOrEmpty(table.ProjectName) || x.ProjectName.Contains(table.ProjectName)) && + (string.IsNullOrEmpty(table.ProjectDescription) || + x.ProjectDescription.Contains(table.ProjectDescription)) && + (string.IsNullOrEmpty(table.UnitOfMeasurement) || + x.UnitOfMeasurement.Contains(table.UnitOfMeasurement)) && + (string.IsNullOrEmpty(table.Quantity) || x.Quantity.Contains(table.Quantity)) && + (string.IsNullOrEmpty(table.CalculationRule) || + x.CalculationRule.Contains(table.CalculationRule)) && + (string.IsNullOrEmpty(table.WorkContent) || x.WorkContent.Contains(table.WorkContent)) && + (string.IsNullOrEmpty(table.Remarks) || x.Remarks.Contains(table.Remarks)) && + (string.IsNullOrEmpty(table.ConstructionSubcontractor) || + x.ConstructionSubcontractor.Contains(table.ConstructionSubcontractor)) && + (string.IsNullOrEmpty(table.ContractWeight) || + x.ContractWeight.Contains(table.ContractWeight)) && + (string.IsNullOrEmpty(table.MaterialSupplier) || + x.MaterialSupplier.Contains(table.MaterialSupplier)) && + (string.IsNullOrEmpty(table.EstimatedQuantity) || + x.EstimatedQuantity.Contains(table.EstimatedQuantity)) && + (string.IsNullOrEmpty(table.SettledQuantity) || + x.SettledQuantity.Contains(table.SettledQuantity)) && + (string.IsNullOrEmpty(table.ContractId) || + table.ContractId.Split(',').Contains(x.ContractId)) && + (string.IsNullOrEmpty(table.ProjectId) || + x.ProjectId.Contains(table.ProjectId)) - select x).FirstOrDefault() - ; + select x).FirstOrDefault() + ; return q; } @@ -264,11 +259,11 @@ namespace BLL var table = Funs.DB.PHTGL_ContractTrack.FirstOrDefault(x => x.Id == id); if (table != null) { - + table.EstimatedQuantity = string.Empty; table.EstimatedAmount = 0m; table.SettledQuantity = string.Empty; - table.SettledAmount = 0m; + table.SettledAmount = 0m; Funs.DB.SubmitChanges(); } } @@ -350,7 +345,7 @@ namespace BLL Funs.GetNewDecimalOrZero(model.SettledQuantity); } - return result; + return result; } /// @@ -364,7 +359,7 @@ namespace BLL var model = GetPHTGL_ContractTrackById(id.ToString()); if (model != null) { - result =(model.EstimatedAmount??0 )- ( model.SettledAmount??0); + result = (model.EstimatedAmount ?? 0) - (model.SettledAmount ?? 0); } return result; @@ -373,19 +368,19 @@ namespace BLL { var responeData = new ResponeData(); List rows; - List thisContractTracks =new List(); - + List thisContractTracks = new List(); + var sheetNames = MiniExcel.GetSheetNames(path); foreach (var sheet in sheetNames) ////多sheet导入 { try { - rows = MiniExcel.Query(path, sheetName: sheet,startCell:"A2").ToList(); + rows = MiniExcel.Query(path, sheetName: sheet, startCell: "A2").ToList(); } catch (Exception ex) { responeData.code = 0; - responeData.message = sheet+"模板错误:" + ex.ToString(); + responeData.message = sheet + "模板错误:" + ex.ToString(); return responeData; } var mapper = @@ -396,7 +391,7 @@ namespace BLL if (modeList.Count == 0) { responeData.code = 0; - responeData.message = sheet+ "没有数据"; + responeData.message = sheet + "没有数据"; return responeData; } foreach (var item in modeList) @@ -418,8 +413,8 @@ namespace BLL item.ProjectCode = item.MainItemCode + "-" + item.ProjectCode; } - - if (resultModel!=null) + + if (resultModel != null) { item.Id = resultModel.Id; UpdatePHTGL_ContractTrack(item); @@ -435,9 +430,9 @@ namespace BLL } AddBulkPHTGL_ContractTrack(goingAddList); - PhtglContracttrackprogressService.CreateTemplateByContractList(goingAddList,projectid); + PhtglContracttrackprogressService.CreateTemplateByContractList(goingAddList, projectid); } - + return responeData; } diff --git a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackmatchwbsService.cs b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackmatchwbsService.cs index 7cc62f20..2ad592b0 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackmatchwbsService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackmatchwbsService.cs @@ -1,9 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -29,7 +27,7 @@ namespace BLL where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.ContractTrackId) || x.ContractTrackId.Contains(table.ContractTrackId)) && - (string.IsNullOrEmpty(table.ControlItemAndCycleId) || x.ControlItemAndCycleId.Contains(table.ControlItemAndCycleId)) + (string.IsNullOrEmpty(table.ControlItemAndCycleId) || x.ControlItemAndCycleId.Contains(table.ControlItemAndCycleId)) select x ; diff --git a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackprogressService.cs b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackprogressService.cs index 53139c81..0e4f423b 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackprogressService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackprogressService.cs @@ -1,12 +1,11 @@ -using System; +using FineUIPro; +using Model; +using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Threading.Tasks; -using FineUIPro; -using Model; namespace BLL { @@ -19,24 +18,9 @@ namespace BLL /// public static int Count { get; set; } - public static IQueryable GetPHTGL_ContractTrackProgressByModle( PHTGL_ContractTrackProgress table) + public static IQueryable GetPHTGL_ContractTrackProgressByModle(PHTGL_ContractTrackProgress table) { var q = from x in Funs.DB.PHTGL_ContractTrackProgress - where - (string.IsNullOrEmpty(table.ContractTrackProgressId) || - x.ContractTrackProgressId.Contains(table.ContractTrackProgressId)) && - (string.IsNullOrEmpty(table.ContractTrackId) || - x.ContractTrackId.Contains(table.ContractTrackId)) && - (string.IsNullOrEmpty(table.Date) || - x.Date.Contains(table.Date)) - orderby x.Date - select x - ; - return q; - } - public static PHTGL_ContractTrackProgress GetFirstOrDefaultByModle(PHTGL_ContractTrackProgress table) - { - var q = (from x in Funs.DB.PHTGL_ContractTrackProgress where (string.IsNullOrEmpty(table.ContractTrackProgressId) || x.ContractTrackProgressId.Contains(table.ContractTrackProgressId)) && @@ -45,7 +29,22 @@ namespace BLL (string.IsNullOrEmpty(table.Date) || x.Date.Contains(table.Date)) orderby x.Date - select x).FirstOrDefault() + select x + ; + return q; + } + public static PHTGL_ContractTrackProgress GetFirstOrDefaultByModle(PHTGL_ContractTrackProgress table) + { + var q = (from x in Funs.DB.PHTGL_ContractTrackProgress + where + (string.IsNullOrEmpty(table.ContractTrackProgressId) || + x.ContractTrackProgressId.Contains(table.ContractTrackProgressId)) && + (string.IsNullOrEmpty(table.ContractTrackId) || + x.ContractTrackId.Contains(table.ContractTrackId)) && + (string.IsNullOrEmpty(table.Date) || + x.Date.Contains(table.Date)) + orderby x.Date + select x).FirstOrDefault() ; return q; } @@ -63,18 +62,18 @@ namespace BLL q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q - select new - { - x.ContractTrackProgressId, - x.ContractTrackId, - x.BCWS_Quantity, - x.BCWS_OutputValue, - x.BCWS_Percentage, - x.ACWP_Quantity, - x.ACWP_OutputValue, - x.ACWP_Percentage, - x.Date - }; + select new + { + x.ContractTrackProgressId, + x.ContractTrackId, + x.BCWS_Quantity, + x.BCWS_OutputValue, + x.BCWS_Percentage, + x.ACWP_Quantity, + x.ACWP_OutputValue, + x.ACWP_Percentage, + x.Date + }; } #endregion @@ -84,10 +83,10 @@ namespace BLL return Funs.DB.PHTGL_ContractTrackProgress.FirstOrDefault(x => x.ContractTrackProgressId == ContractTrackProgressId); } - public static PHTGL_ContractTrackProgress GetPHTGL_ContractTrackProgressByTrackIdAndDate(string ContractTrackId,string date) + public static PHTGL_ContractTrackProgress GetPHTGL_ContractTrackProgressByTrackIdAndDate(string ContractTrackId, string date) { return Funs.DB.PHTGL_ContractTrackProgress.FirstOrDefault(x => - x.ContractTrackId == ContractTrackId && x.Date==date); + x.ContractTrackId == ContractTrackId && x.Date == date); } /// /// 根据合同价格信息主键创建进度日期数据 @@ -97,7 +96,7 @@ namespace BLL { var model = PhtglContractTrackService.GetPHTGL_ContractTrackById(ContractTrackId); if (model == null) return; - var contractNum=model.ContractNum; + var contractNum = model.ContractNum; var contractmode = ContractService.GetContractByContractNum(contractNum); if (contractmode.ContractStartDate != null && contractmode.ContractEndDate != null) { @@ -110,7 +109,7 @@ namespace BLL var querymodel = new Model.PHTGL_ContractTrackProgress { ContractTrackId = ContractTrackId, - Date= month.ToString("yyyy-MM") + Date = month.ToString("yyyy-MM") }; if (!GetPHTGL_ContractTrackProgressByModle(querymodel).Any()) @@ -130,22 +129,23 @@ namespace BLL /// /// /// - public static void CreateTemplateByContractList(List contractTrackList,string projectid) + public static void CreateTemplateByContractList(List contractTrackList, string projectid) { - var dbcontractTrack=(from x in Funs.DB.PHTGL_ContractTrack where x.ProjectId==projectid select x).ToList(); - var dbContractTrackProgress=(from x in Funs.DB.PHTGL_ContractTrackProgress - join y in Funs.DB.PHTGL_ContractTrack on x.ContractTrackId equals y.Id - where y.ProjectId==projectid select x).ToList(); + var dbcontractTrack = (from x in Funs.DB.PHTGL_ContractTrack where x.ProjectId == projectid select x).ToList(); + var dbContractTrackProgress = (from x in Funs.DB.PHTGL_ContractTrackProgress + join y in Funs.DB.PHTGL_ContractTrack on x.ContractTrackId equals y.Id + where y.ProjectId == projectid + select x).ToList(); - List> splitLists = new List>(); - if (contractTrackList.Count>10) + List> splitLists = new List>(); + if (contractTrackList.Count > 10) { splitLists = Funs.SplitList(contractTrackList, 10); } else { splitLists = Funs.SplitList(contractTrackList, 1); - } + } ConcurrentBag contractTrackProgressList = new ConcurrentBag();//用于批量新增的数据(无序集合) ParallelOptions parallelOptions = new ParallelOptions(); @@ -154,10 +154,10 @@ namespace BLL ///使用多线程开启并行任务,操作拆分后的list 同时进行数据处理 Parallel.ForEach(splitLists, parallelOptions, sublist => { - - foreach (var item in sublist) + + foreach (var item in sublist) { - var model =( from x in dbcontractTrack where x.Id==item.Id select x).FirstOrDefault() ; + var model = (from x in dbcontractTrack where x.Id == item.Id select x).FirstOrDefault(); if (model == null) return; var contractNum = model.ContractNum; var contractmode = ContractService.GetContractByContractNum(contractNum); @@ -175,13 +175,13 @@ namespace BLL Date = month.ToString("yyyy-MM") }; var q = (from x in dbContractTrackProgress - where - (string.IsNullOrEmpty(querymodel.ContractTrackId) || - x.ContractTrackId.Contains(querymodel.ContractTrackId)) && - (string.IsNullOrEmpty(querymodel.Date) || - x.Date.Contains(querymodel.Date)) - orderby x.Date - select x).ToList() + where + (string.IsNullOrEmpty(querymodel.ContractTrackId) || + x.ContractTrackId.Contains(querymodel.ContractTrackId)) && + (string.IsNullOrEmpty(querymodel.Date) || + x.Date.Contains(querymodel.Date)) + orderby x.Date + select x).ToList() ; if (!q.Any()) { @@ -190,14 +190,14 @@ namespace BLL newmodel.ContractTrackId = item.Id; newmodel.Date = month.ToString("yyyy-MM"); contractTrackProgressList.Add(newmodel); - // AddPHTGL_ContractTrackProgress(newmodel); + // AddPHTGL_ContractTrackProgress(newmodel); } } } } // 处理完成后,可以将结果保存到集合或其他地方 }); - + AddBulkPHTGL_ContractTrackProgress(contractTrackProgressList.ToList()); } @@ -242,7 +242,7 @@ namespace BLL } public static void UpdatePHTGL_ContractTrackProgress(PHTGL_ContractTrackProgress newtable) - { + { var table = Funs.DB.PHTGL_ContractTrackProgress.FirstOrDefault(x => x.ContractTrackProgressId == newtable.ContractTrackProgressId); if (table != null) @@ -255,7 +255,7 @@ namespace BLL table.ACWP_Quantity = newtable.ACWP_Quantity; table.ACWP_OutputValue = newtable.ACWP_OutputValue; table.ACWP_Percentage = newtable.ACWP_Percentage; - table.Date =newtable.Date; + table.Date = newtable.Date; Funs.DB.SubmitChanges(); } } @@ -266,19 +266,19 @@ namespace BLL public static void CheckProgressByContractTrackId(string contractTrackId) { var modeContractTrack = PhtglContractTrackService.GetPHTGL_ContractTrackById(contractTrackId); - if (modeContractTrack!=null) + if (modeContractTrack != null) { var totalCostFixedComprehensiveUnitPrice = modeContractTrack.TotalCostFixedComprehensiveUnitPrice; //全费用综合单价 - var settledAmount = modeContractTrack.SettledAmount??0;//预算金额 - var contractWeight= Funs.GetNewDecimalOrZero(modeContractTrack.ContractWeight)==0?0: Funs.GetNewDecimalOrZero(modeContractTrack.ContractWeight)/100;//合同权重 + var settledAmount = modeContractTrack.SettledAmount ?? 0;//预算金额 + var contractWeight = Funs.GetNewDecimalOrZero(modeContractTrack.ContractWeight) == 0 ? 0 : Funs.GetNewDecimalOrZero(modeContractTrack.ContractWeight) / 100;//合同权重 var quserytable = new Model.PHTGL_ContractTrackProgress(); quserytable.ContractTrackId = contractTrackId; - var list= GetPHTGL_ContractTrackProgressByModle(quserytable); + var list = GetPHTGL_ContractTrackProgressByModle(quserytable); foreach (var item in list) { //产值=计划工程量*全费用综合单价(来源于“费用对比统计”), // 百分比 =(产值 / 预算金额)*合同权重 - item.ACWP_OutputValue = (item.ACWP_Quantity??0)* totalCostFixedComprehensiveUnitPrice; + item.ACWP_OutputValue = (item.ACWP_Quantity ?? 0) * totalCostFixedComprehensiveUnitPrice; if (settledAmount == 0) { item.ACWP_Percentage = 0; @@ -295,7 +295,7 @@ namespace BLL } else { - item.BCWS_Percentage = Math.Round(((item.BCWS_OutputValue ?? 0) / settledAmount) * contractWeight * 100, 2) ; + item.BCWS_Percentage = Math.Round(((item.BCWS_OutputValue ?? 0) / settledAmount) * contractWeight * 100, 2); } UpdatePHTGL_ContractTrackProgress(item); } @@ -307,13 +307,13 @@ namespace BLL /// /// public static PHTGL_ContractTrackProgress GetSumProgress(string contractTrackProgressId) - { - var result=new PHTGL_ContractTrackProgress(); + { + var result = new PHTGL_ContractTrackProgress(); var model = GetPHTGL_ContractTrackProgressById(contractTrackProgressId); var q = (from x in Funs.DB.PHTGL_ContractTrackProgress - where x.ContractTrackId == model.ContractTrackId && string.Compare(x.Date,model.Date)<=0 - select x).ToList(); - result.ACWP_Quantity = q.Sum(x => x.ACWP_Quantity ??0); + where x.ContractTrackId == model.ContractTrackId && string.Compare(x.Date, model.Date) <= 0 + select x).ToList(); + result.ACWP_Quantity = q.Sum(x => x.ACWP_Quantity ?? 0); result.ACWP_OutputValue = q.Sum(x => x.ACWP_OutputValue ?? 0); result.ACWP_Percentage = q.Sum(x => x.ACWP_Percentage ?? 0); diff --git a/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs index 4a49c8f7..d37f01cb 100644 --- a/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs +++ b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs @@ -1,20 +1,11 @@ using EmitMapper; using FineUIPro; using MiniExcelLibs; -using MiniExcelLibs.Attributes; using Model; -using NPOI.SS.Formula.Eval; -using NPOI.SS.Formula.Functions; -using Org.BouncyCastle.Security; using System; using System.Collections; using System.Collections.Generic; -using System.Diagnostics.Contracts; using System.Linq; -using System.Runtime.CompilerServices; -using System.Security.Cryptography; -using System.Text; -using WIA; namespace BLL @@ -58,9 +49,9 @@ namespace BLL public static string GetState(object invoiceId) { string result = ""; - if (invoiceId!=null && !string.IsNullOrEmpty(invoiceId.ToString()) ) + if (invoiceId != null && !string.IsNullOrEmpty(invoiceId.ToString())) { - var InvoiceId=invoiceId.ToString(); + var InvoiceId = invoiceId.ToString(); var model = GetPHTGL_InvoiceById(InvoiceId); var approveModel = PHTGL_ApproveService.GetPHTGL_ApproveByContractId(InvoiceId); @@ -74,7 +65,7 @@ namespace BLL result = "已创建入库订单"; break; case 1: - result = "入库审核中"+",当前节点-"+BLL.Person_PersonsService.getPersonsNamesPersonIds(string.Join(",",approveModel.Select(x => x.ApproveMan))); + result = "入库审核中" + ",当前节点-" + BLL.Person_PersonsService.getPersonsNamesPersonIds(string.Join(",", approveModel.Select(x => x.ApproveMan))); break; case 2: result = "入库审核拒绝"; @@ -121,13 +112,13 @@ namespace BLL (string.IsNullOrEmpty(table.SellerTaxNumber) || x.SellerTaxNumber.Contains(table.SellerTaxNumber)) && (string.IsNullOrEmpty(table.ApproveManJson) || x.ApproveManJson.Contains(table.ApproveManJson)) && (string.IsNullOrEmpty(table.CreateUser) || x.CreateUser.Contains(table.CreateUser)) && - (table.State==null ||x.State==table.State) + (table.State == null || x.State == table.State) select x ; return q.ToList(); } - + /// /// 获取分页列表 /// @@ -144,60 +135,61 @@ namespace BLL } q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); - return (from x in q - join y in Funs.DB.PHTGL_Contract on x.ContractId equals y.ContractId into g - from c in g.DefaultIfEmpty() - select new - { - c?.ContractName, - c?.ContractNum, - c?.Parties, - c?.ContractAmount, - x.InvoiceId, - x.ProjectId, - x.ContractId, - x.State, - x.InvoiceCode, - x.InvoiceNumber, - x.SellerName, - x.InvoiceDate, - x.AmountExcludingTax, - x.TotalTax, - x.Remark, - x.ImagePath, - x.SellerTaxNumber, - x.InvoiceAmount, - x.ApproveManJson, - x.CreateDate, - x.CreateUser, - x.OrderInDate, - x.OrderOutDate, - x.OrderCode, - x.MaterialRequisitionUnit - }); + return (from x in q + join y in Funs.DB.PHTGL_Contract on x.ContractId equals y.ContractId into g + from c in g.DefaultIfEmpty() + select new + { + c?.ContractName, + c?.ContractNum, + c?.Parties, + c?.ContractAmount, + x.InvoiceId, + x.ProjectId, + x.ContractId, + x.State, + x.InvoiceCode, + x.InvoiceNumber, + x.SellerName, + x.InvoiceDate, + x.AmountExcludingTax, + x.TotalTax, + x.Remark, + x.ImagePath, + x.SellerTaxNumber, + x.InvoiceAmount, + x.ApproveManJson, + x.CreateDate, + x.CreateUser, + x.OrderInDate, + x.OrderOutDate, + x.OrderCode, + x.MaterialRequisitionUnit + }); } - - public static IEnumerable GetOrderInListData(Model.PHTGL_Invoice table, Grid grid1,string state) + + public static IEnumerable GetOrderInListData(Model.PHTGL_Invoice table, Grid grid1, string state) { var q = GetPHTGL_InvoiceByModle(table); - + switch (state) { - case "0": q = q.Where(x => x.State > StateDataIn); //全部 + case "0": + q = q.Where(x => x.State > StateDataIn); //全部 break; - case "1": - q = q.Where(x => x.State > StateDataIn &&x.State< StateInPutApproveSuccess); //未入库 - break; - case "2": - q = q.Where(x => x.State >= StateInPutApproveSuccess ); //已入库 - break; - case "3": - q = q.Where(x => x.State >=StateInPutApproveSuccess && x.State < StateOutPutApproveSuccess);//未出库 - break; - case "4": + case "1": + q = q.Where(x => x.State > StateDataIn && x.State < StateInPutApproveSuccess); //未入库 + break; + case "2": + q = q.Where(x => x.State >= StateInPutApproveSuccess); //已入库 + break; + case "3": + q = q.Where(x => x.State >= StateInPutApproveSuccess && x.State < StateOutPutApproveSuccess);//未出库 + break; + case "4": q = q.Where(x => x.State == StateOutPutApproveSuccess);//已出库 - break; + break; } Count = q.Count(); @@ -208,37 +200,37 @@ namespace BLL q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return (from x in q - join y in Funs.DB.PHTGL_Contract on x.ContractId equals y.ContractId into g - from c in g.DefaultIfEmpty() - where x.State>StateDataIn - select new - { - c?.ContractName, - c?.ContractNum, - c?.Parties, - c?.ContractAmount, - x.InvoiceId, - x.ProjectId, - x.ContractId, - x.State, - x.InvoiceCode, - x.InvoiceNumber, - x.SellerName, - x.InvoiceDate, - x.AmountExcludingTax, - x.TotalTax, - x.Remark, - x.ImagePath, - x.SellerTaxNumber, - x.InvoiceAmount, - x.ApproveManJson, - x.CreateDate, - x.CreateUser, - x.OrderInDate, - x.OrderOutDate, - x.OrderCode, - x.MaterialRequisitionUnit - }).ToList(); + join y in Funs.DB.PHTGL_Contract on x.ContractId equals y.ContractId into g + from c in g.DefaultIfEmpty() + where x.State > StateDataIn + select new + { + c?.ContractName, + c?.ContractNum, + c?.Parties, + c?.ContractAmount, + x.InvoiceId, + x.ProjectId, + x.ContractId, + x.State, + x.InvoiceCode, + x.InvoiceNumber, + x.SellerName, + x.InvoiceDate, + x.AmountExcludingTax, + x.TotalTax, + x.Remark, + x.ImagePath, + x.SellerTaxNumber, + x.InvoiceAmount, + x.ApproveManJson, + x.CreateDate, + x.CreateUser, + x.OrderInDate, + x.OrderOutDate, + x.OrderCode, + x.MaterialRequisitionUnit + }).ToList(); } #endregion @@ -256,17 +248,17 @@ namespace BLL OrderApproveOut orderApproveOut = new OrderApproveOut(); var invoiceModel = GetPHTGL_InvoiceById(InvoiceId); - var invoiceDetail = PhtglInvoicedetailService.GetPHTGL_InvoiceDetailByInvoiceId(InvoiceId); + var invoiceDetail = PhtglInvoicedetailService.GetPHTGL_InvoiceDetailByInvoiceId(InvoiceId); var approveManModels = GetInvoiceApproveManEntity(InvoiceId); //将invoiceModel 映射到order var mapper = EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper(); - order=mapper.Map(invoiceModel); - order.ProjectName=ProjectService.GetProjectNameByProjectId(invoiceModel.ProjectId); - order.ContractCode=ContractService.GetContractById(invoiceModel.ContractId)?.ContractNum; + order = mapper.Map(invoiceModel); + order.ProjectName = ProjectService.GetProjectNameByProjectId(invoiceModel.ProjectId); + order.ContractCode = ContractService.GetContractById(invoiceModel.ContractId)?.ContractNum; //invoiceDetail 映射到orderDetails var mapper2 = EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper, List>(); orderDetails = mapper2.Map(invoiceDetail); - orderDetails= orderDetails.Select(x => new OrderDetail + orderDetails = orderDetails.Select(x => new OrderDetail { GoodsOrServicesName = x.GoodsOrServicesName, SpecificationModel = x.SpecificationModel, @@ -274,11 +266,11 @@ namespace BLL Quantity = x.Quantity, UnitPrice = x.UnitPrice, NoTaxPrice = x.Amount - x.Tax, - TaxRate = string.Format("{0:P0}", Convert.ToDecimal(x.TaxRate) ), - Tax =x.Tax , + TaxRate = string.Format("{0:P0}", Convert.ToDecimal(x.TaxRate)), + Tax = x.Tax, Amount = x.Amount, }).ToList(); - if (approveManModels!=null) + if (approveManModels != null) { orderApproveIn.ProjectManager = !string.IsNullOrEmpty(approveManModels.InputApproveMan.ProjectManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.InputApproveMan.ProjectManager) : ""; orderApproveIn.ControlManager = !string.IsNullOrEmpty(approveManModels.InputApproveMan.ControlManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.InputApproveMan.ControlManager) : ""; @@ -395,10 +387,10 @@ namespace BLL { Model.PHTGL_InvoiceApproveManEntity list = new Model.PHTGL_InvoiceApproveManEntity(); Model.PHTGL_Invoice data = Funs.DB.PHTGL_Invoice.FirstOrDefault(e => e.InvoiceId == InvoiceId); - if (data != null && !string .IsNullOrEmpty(data.ApproveManJson)) + if (data != null && !string.IsNullOrEmpty(data.ApproveManJson)) { list = Newtonsoft.Json.JsonConvert.DeserializeObject(data.ApproveManJson); - } + } return list; } /// @@ -527,33 +519,35 @@ namespace BLL return responeData; } - + /// /// 获取审批人员 /// /// 主键id /// 0 入库 1出库 /// - public static List GetApproveManModels(string invoiceId ,int type) + public static List GetApproveManModels(string invoiceId, int type) { List approveManModels = new List(); var table = GetInvoiceApproveManEntity(invoiceId); - if (type==0) //入库 + if (type == 0) //入库 { approveManModels.Add(new ApproveManModel { Number = 1, userid = table.InputApproveMan.ProfessionalEngineer, Rolename = "专业工程师" }); approveManModels.Add(new ApproveManModel { Number = 2, userid = table.InputApproveMan.ConstructionManager, Rolename = "施工经理" }); approveManModels.Add(new ApproveManModel { Number = 3, userid = table.InputApproveMan.ControlManager, Rolename = "控制经理" }); - approveManModels.Add(new ApproveManModel { Number = 4, userid = table.InputApproveMan.ProjectManager, Rolename = "项目经理" }); } - else { - approveManModels.Add(new ApproveManModel { Number = 5, userid = table.OutputApproveMan.PurchasingMan, Rolename = "采购员" }); - approveManModels.Add(new ApproveManModel { Number = 6, userid = table.OutputApproveMan.ControlManager, Rolename = "控制经理" }); - approveManModels.Add(new ApproveManModel { Number = 7, userid = table.OutputApproveMan.ProjectManager, Rolename = "项目经理" }); - approveManModels.Add(new ApproveManModel { Number = 8, userid = table.OutputApproveMan.ConUnitMaterialOfficer, Rolename = "施工单位材料经理" }); - approveManModels.Add(new ApproveManModel { Number = 9, userid = table.OutputApproveMan.ConUnitProjectManager, Rolename = "施工单位项目经理" }); + approveManModels.Add(new ApproveManModel { Number = 4, userid = table.InputApproveMan.ProjectManager, Rolename = "项目经理" }); } - - + else + { + approveManModels.Add(new ApproveManModel { Number = 5, userid = table.OutputApproveMan.PurchasingMan, Rolename = "采购员" }); + approveManModels.Add(new ApproveManModel { Number = 6, userid = table.OutputApproveMan.ControlManager, Rolename = "控制经理" }); + approveManModels.Add(new ApproveManModel { Number = 7, userid = table.OutputApproveMan.ProjectManager, Rolename = "项目经理" }); + approveManModels.Add(new ApproveManModel { Number = 8, userid = table.OutputApproveMan.ConUnitMaterialOfficer, Rolename = "施工单位材料经理" }); + approveManModels.Add(new ApproveManModel { Number = 9, userid = table.OutputApproveMan.ConUnitProjectManager, Rolename = "施工单位项目经理" }); + } + + return approveManModels; } @@ -561,22 +555,22 @@ namespace BLL /// 开启审批流程 /// /// - public static void StartApprovalProcess(string invoiceId ) + public static void StartApprovalProcess(string invoiceId) { - + var model = GetPHTGL_InvoiceById(invoiceId); - if (model.State ==StateCreate || model.State == StateInPutApproveRefuse) - { + if (model.State == StateCreate || model.State == StateInPutApproveRefuse) + { CreateFirstApprove(invoiceId, 0); model.State = StateInPutApprove; UpdatePHTGL_Invoice(model); - } + } else if (model.State == StateInPutApproveSuccess || model.State == StateOutPutApproveRefuse) { CreateFirstApprove(invoiceId, 1); model.State = StateOutPutApprove; UpdatePHTGL_Invoice(model); - } + } } /// @@ -585,8 +579,8 @@ namespace BLL /// 主键 /// 0 入库 1出库 public static void CreateFirstApprove(string invoiceId, int type) - { - var approveManModels = GetApproveManModels(invoiceId, type).OrderBy(x=>x.Number).FirstOrDefault(); + { + var approveManModels = GetApproveManModels(invoiceId, type).OrderBy(x => x.Number).FirstOrDefault(); Model.PHTGL_Approve _Approve = new Model.PHTGL_Approve(); _Approve.ApproveId = SQLHelper.GetNewID(typeof(Model.PHTGL_Approve)); _Approve.ContractId = invoiceId; @@ -597,7 +591,7 @@ namespace BLL _Approve.ApproveIdea = ""; _Approve.IsPushOa = 0; _Approve.ApproveType = approveManModels.Rolename; - _Approve.ApproveForm =(type==0? "Invoice_Input": "Invoice_Output"); + _Approve.ApproveForm = (type == 0 ? "Invoice_Input" : "Invoice_Output"); BLL.PHTGL_ApproveService.AddPHTGL_Approve(_Approve); } @@ -617,7 +611,7 @@ namespace BLL var thisApproveTypeNumber = approveManModels.Find(x => x.userid == userid && x.Rolename == thisApprovemodel.ApproveType).Number; //当前审批人员序号 int nextApproveTypeNumber = thisApproveTypeNumber + 1; //下一个审批人员序号 int maxApproveTypeNumber = approveManModels.Max(x => x.Number); //最大审批人员序号 - + thisApprovemodel.ApproveDate = Funs.GetNewDateTimeOrNow("").ToString(); thisApprovemodel.IsAgree = isAgree ? 2 : 1; @@ -626,7 +620,7 @@ namespace BLL PHTGL_ApproveService.UpdatePHTGL_Approve(thisApprovemodel); if (isAgree) { - if (PHTGL_ApproveService.GetPHTGL_ApproveByContractId(invoiceId).Count==0) //当前节点是否全部审批结束 + if (PHTGL_ApproveService.GetPHTGL_ApproveByContractId(invoiceId).Count == 0) //当前节点是否全部审批结束 { if (thisApproveTypeNumber < maxApproveTypeNumber) //是否最末节点 { @@ -647,8 +641,8 @@ namespace BLL { //流程走完结束 var model = GetPHTGL_InvoiceById(invoiceId); - model.State = (type == 0 ? StateInPutApproveSuccess:StateOutPutApproveSuccess); - UpdatePHTGL_Invoice(model); + model.State = (type == 0 ? StateInPutApproveSuccess : StateOutPutApproveSuccess); + UpdatePHTGL_Invoice(model); } } } @@ -656,7 +650,7 @@ namespace BLL { //审批拒绝-流程结束 var model = GetPHTGL_InvoiceById(invoiceId); model.State = (type == 0 ? StateInPutApproveRefuse : StateOutPutApproveRefuse); - UpdatePHTGL_Invoice(model); + UpdatePHTGL_Invoice(model); } OAWebSevice.Pushoa(); OAWebSevice.DoneRequest(thisApprovemodel.ApproveId); diff --git a/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs index 7c34c5a1..82d9ce05 100644 --- a/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs +++ b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs @@ -1,9 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -32,7 +30,7 @@ namespace BLL (string.IsNullOrEmpty(table.GoodsOrServicesName) || x.GoodsOrServicesName.Contains(table.GoodsOrServicesName)) && (string.IsNullOrEmpty(table.SpecificationModel) || x.SpecificationModel.Contains(table.SpecificationModel)) && (string.IsNullOrEmpty(table.Unit) || x.Unit.Contains(table.Unit)) && - (string.IsNullOrEmpty(table.TaxRate) || x.TaxRate.Contains(table.TaxRate)) + (string.IsNullOrEmpty(table.TaxRate) || x.TaxRate.Contains(table.TaxRate)) select x ; @@ -146,18 +144,18 @@ namespace BLL } } - public static void BatchAddPHTGL_InvoiveDetail(IEnumerable list, string invoiceId ) + public static void BatchAddPHTGL_InvoiveDetail(IEnumerable list, string invoiceId) { foreach (var item in list) { - item.InvoiceId= invoiceId; + item.InvoiceId = invoiceId; AddPHTGL_InvoiceDetail(item); } } public static void BatchAddPHTGL_InvoiveDetail(IEnumerable list) { foreach (var item in list) - { + { AddPHTGL_InvoiceDetail(item); } } diff --git a/SGGL/BLL/PHTGL/OAWebSevice.cs b/SGGL/BLL/PHTGL/OAWebSevice.cs index cf30dac1..3b147008 100644 --- a/SGGL/BLL/PHTGL/OAWebSevice.cs +++ b/SGGL/BLL/PHTGL/OAWebSevice.cs @@ -259,7 +259,7 @@ namespace BLL } break; - case PHTGL_ApproveService.Invoice_Input: + case PHTGL_ApproveService.Invoice_Input: var invoice = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users.ContractId); if (invoice != null) { @@ -275,7 +275,7 @@ namespace BLL webJson.appurl = getAppurl(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, invoice.InvoiceId, gereceiver.PersonId); } break; - case PHTGL_ApproveService.Invoice_Output: + case PHTGL_ApproveService.Invoice_Output: var invoice_output = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users.ContractId); if (invoice_output != null) { @@ -449,7 +449,7 @@ namespace BLL webJson.appurl = getAppurl(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, invoice.InvoiceId, users[i].ApproveMan); } break; - case PHTGL_ApproveService.Invoice_Output: + case PHTGL_ApproveService.Invoice_Output: var invoice_output = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users[i].ContractId); if (invoice_output != null) { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogHJGLService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogHJGLService.cs index 59b5ecff..a8cc4fe8 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogHJGLService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogHJGLService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogMachineService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogMachineService.cs index a634c776..63a61853 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogMachineService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogMachineService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogManagementService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogManagementService.cs index c35d0300..88c72976 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogManagementService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogManagementService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogPersonService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogPersonService.cs index 5e65c6da..8d74acd1 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogPersonService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogPersonService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogProblemService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogProblemService.cs index 0b240491..1ef42981 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogProblemService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogProblemService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogRecordService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogRecordService.cs index e04da4ea..308d5181 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogRecordService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogRecordService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogService.cs index 6f7c8bb8..952b7a69 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class ConstructionLogService { - + /// /// 根据主键获取项目级施工日志 diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyCompanyService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyCompanyService.cs index b8070e0f..87efa19e 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyCompanyService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyCompanyService.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyMonthService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyMonthService.cs index 561312b9..9eab79f4 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyMonthService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyMonthService.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyProjectService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyProjectService.cs index 858a8d42..67134469 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyProjectService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyProjectService.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyService.cs index 50ab2c5c..c808c876 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyService.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanApproveService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanApproveService.cs index aa10f957..447745d0 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanApproveService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanApproveService.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanService.cs index 8c268639..dbeb294a 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionPlanService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class ConstructionPlanService { - + /// /// 根据主键获取总承包商施工计划 diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionReportApproveService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionReportApproveService.cs index 603102ef..57f0123b 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionReportApproveService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionReportApproveService.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionReportService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionReportService.cs index 61d3577d..a67bf460 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ConstructionReportService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionReportService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class ConstructionReportService { - + /// /// 根据主键获取总承包商施工报告 diff --git a/SGGL/BLL/PZHGL/InformationProject/PictureService.cs b/SGGL/BLL/PZHGL/InformationProject/PictureService.cs index 8870efa7..faed0ce6 100644 --- a/SGGL/BLL/PZHGL/InformationProject/PictureService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/PictureService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class PictureService { - + /// /// 根据主键获取项目图片 diff --git a/SGGL/BLL/PZHGL/InformationProject/ProjectConstructionLogService.cs b/SGGL/BLL/PZHGL/InformationProject/ProjectConstructionLogService.cs index 4a98e2dd..6d4dc338 100644 --- a/SGGL/BLL/PZHGL/InformationProject/ProjectConstructionLogService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/ProjectConstructionLogService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class ProjectConstructionLogService { - + /// /// 根据主键获取项目级施工日志 diff --git a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverApproveService.cs b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverApproveService.cs index c76923e7..348195ec 100644 --- a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverApproveService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverApproveService.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverDetailService.cs b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverDetailService.cs index 04a1c7d8..7f2d293c 100644 --- a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverDetailService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverDetailService.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverService.cs b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverService.cs index 65a203b0..4842035d 100644 --- a/SGGL/BLL/PZHGL/InformationProject/WorkHandoverService.cs +++ b/SGGL/BLL/PZHGL/InformationProject/WorkHandoverService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class WorkHandoverService { - + /// /// 根据主键获取工作交接 diff --git a/SGGL/BLL/PZHGL/ProjectData/ProjectMapService.cs b/SGGL/BLL/PZHGL/ProjectData/ProjectMapService.cs index 1350fb2b..dced6350 100644 --- a/SGGL/BLL/PZHGL/ProjectData/ProjectMapService.cs +++ b/SGGL/BLL/PZHGL/ProjectData/ProjectMapService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ProjectMapService { - + /// /// 根据主键获取项目地图 diff --git a/SGGL/BLL/Person/PersonTotalService.cs b/SGGL/BLL/Person/PersonTotalService.cs index 1bbecedc..934543ae 100644 --- a/SGGL/BLL/Person/PersonTotalService.cs +++ b/SGGL/BLL/Person/PersonTotalService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class PersonTotalService { - + /// /// 获取人员信息 diff --git a/SGGL/BLL/Person/Person_DutyService.cs b/SGGL/BLL/Person/Person_DutyService.cs index 29963576..63850fb3 100644 --- a/SGGL/BLL/Person/Person_DutyService.cs +++ b/SGGL/BLL/Person/Person_DutyService.cs @@ -1,8 +1,6 @@ using FineUIPro; -using System; using System.Collections; using System.Linq; -using Model; namespace BLL { @@ -48,7 +46,7 @@ namespace BLL x.CompilePersonId, x.CompileTime, x.WorkPostId, - WorkPostName=Funs.DB.Base_WorkPost.First(U=>U.WorkPostId == x.WorkPostId).WorkPostName, + WorkPostName = Funs.DB.Base_WorkPost.First(U => U.WorkPostId == x.WorkPostId).WorkPostName, x.ApprovePersonId, x.ApproveTime, x.State, diff --git a/SGGL/BLL/Person/Person_DutyTemplateService.cs b/SGGL/BLL/Person/Person_DutyTemplateService.cs index f0eb52d1..36f2c40a 100644 --- a/SGGL/BLL/Person/Person_DutyTemplateService.cs +++ b/SGGL/BLL/Person/Person_DutyTemplateService.cs @@ -4,7 +4,7 @@ namespace BLL { public static class Person_DutyTemplateService { - + /// /// 获取员工责任书模板信息 /// diff --git a/SGGL/BLL/Person/Person_PersonContractService.cs b/SGGL/BLL/Person/Person_PersonContractService.cs index 7fae1013..814629a3 100644 --- a/SGGL/BLL/Person/Person_PersonContractService.cs +++ b/SGGL/BLL/Person/Person_PersonContractService.cs @@ -1,9 +1,6 @@ using FineUIPro; -using System; using System.Collections; using System.Linq; -using System.Runtime.InteropServices.ComTypes; -using Model; namespace BLL { @@ -23,7 +20,7 @@ namespace BLL /// 定义变量 /// private static IQueryable getDataLists = from x in Funs.DB.Person_PersonContract - select x; + select x; /// /// 获取分页列表 @@ -34,8 +31,8 @@ namespace BLL public static IEnumerable getListData(string personId, Grid Grid1) { var db1 = Funs.DB; - var q= from x in db1.Person_PersonContract - select x; + var q = from x in db1.Person_PersonContract + select x; IQueryable getDataList = q.Where(x => x.PersonId == personId); count = getDataList.Count(); if (count == 0) @@ -43,7 +40,7 @@ namespace BLL return null; } getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); - + return from x in getDataList select new { @@ -55,7 +52,7 @@ namespace BLL db1.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName, x.LeadManId, x.Telephone, - x.ContractType, + x.ContractType, x.StartDate, x.EndDate, }; diff --git a/SGGL/BLL/Person/Person_PersonTrainService.cs b/SGGL/BLL/Person/Person_PersonTrainService.cs index f7da6fab..36ee2a1c 100644 --- a/SGGL/BLL/Person/Person_PersonTrainService.cs +++ b/SGGL/BLL/Person/Person_PersonTrainService.cs @@ -1,8 +1,6 @@ using FineUIPro; -using System; using System.Collections; using System.Linq; -using Model; namespace BLL { @@ -34,7 +32,7 @@ namespace BLL { Model.SGGLDB db = Funs.DB; IQueryable getDataLists = from x in Funs.DB.Person_PersonTrain - select x; + select x; IQueryable getDataList = getDataLists.Where(x => x.PersonId == personId); count = getDataList.Count(); if (count == 0) diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs index 29a2e971..ac4848fe 100644 --- a/SGGL/BLL/Person/Person_PersonsService.cs +++ b/SGGL/BLL/Person/Person_PersonsService.cs @@ -1,7 +1,4 @@ using FineUIPro; -using Microsoft.Office.Interop.Excel; -using Microsoft.Office.Interop.Word; -using Model; using System; using System.Collections; using System.Collections.Generic; diff --git a/SGGL/BLL/Person/Person_QuarterCheckApproveService.cs b/SGGL/BLL/Person/Person_QuarterCheckApproveService.cs index 545d32e1..52f9f8d3 100644 --- a/SGGL/BLL/Person/Person_QuarterCheckApproveService.cs +++ b/SGGL/BLL/Person/Person_QuarterCheckApproveService.cs @@ -6,7 +6,7 @@ namespace BLL { public static class Person_QuarterCheckApproveService { - + /// /// 获取人员信息 diff --git a/SGGL/BLL/Person/Person_QuarterCheckItemService.cs b/SGGL/BLL/Person/Person_QuarterCheckItemService.cs index 287a3ba3..531bd494 100644 --- a/SGGL/BLL/Person/Person_QuarterCheckItemService.cs +++ b/SGGL/BLL/Person/Person_QuarterCheckItemService.cs @@ -6,7 +6,7 @@ namespace BLL { public static class Person_QuarterCheckItemService { - + /// /// 获取人员信息 diff --git a/SGGL/BLL/Person/Person_QuarterCheckService.cs b/SGGL/BLL/Person/Person_QuarterCheckService.cs index bc4c8121..c95f9d87 100644 --- a/SGGL/BLL/Person/Person_QuarterCheckService.cs +++ b/SGGL/BLL/Person/Person_QuarterCheckService.cs @@ -7,7 +7,7 @@ namespace BLL { public static class Person_QuarterCheckService { - + /// /// 获取人员信息 diff --git a/SGGL/BLL/Person/Person_ShuntApproveService.cs b/SGGL/BLL/Person/Person_ShuntApproveService.cs index 883be408..16b17350 100644 --- a/SGGL/BLL/Person/Person_ShuntApproveService.cs +++ b/SGGL/BLL/Person/Person_ShuntApproveService.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/Person/Person_ShuntService.cs b/SGGL/BLL/Person/Person_ShuntService.cs index 4dd4bf30..4085b9b4 100644 --- a/SGGL/BLL/Person/Person_ShuntService.cs +++ b/SGGL/BLL/Person/Person_ShuntService.cs @@ -1,8 +1,6 @@ using FineUIPro; -using NPOI.SS.Formula.Functions; using System.Collections; using System.Linq; -using Model; namespace BLL { @@ -23,7 +21,7 @@ namespace BLL /// private static IQueryable getDataLists = from x in Funs.DB.Person_Persons where x.PersonId != Const.sysglyId && x.PersonId != Const.hfnbdId && x.UnitId == Const.UnitId_SEDIN - && x.DepartId == Const.Depart_constructionId + && x.DepartId == Const.Depart_constructionId && x.CurrentProjectId == null && (!x.IsOffice.HasValue || x.IsOffice == false) select x; @@ -38,9 +36,9 @@ namespace BLL /// /// /// - public static IEnumerable getListData(string workPostId, string postTitleId, string name, string certificateId, Grid Grid1) + public static IEnumerable getListData(string workPostId, string postTitleId, string name, string certificateId, Grid Grid1) { - IQueryable getDataList = getDataLists; + IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(workPostId) && workPostId != Const._Null) { getDataList = getDataList.Where(e => e.WorkPostId == workPostId); @@ -49,7 +47,7 @@ namespace BLL { getDataList = getDataList.Where(e => e.PostTitleId == postTitleId); } - + if (!string.IsNullOrEmpty(name)) { getDataList = getDataList.Where(e => e.PersonName.Contains(name)); @@ -58,7 +56,7 @@ namespace BLL { getDataList = getDataList.Where(e => e.CertificateId.Contains(certificateId)); } - + count = getDataList.Count(); if (count == 0) { @@ -75,7 +73,7 @@ namespace BLL x.IdentityCard, Sex = x.Sex ?? "1", x.Birthday, - x.UnitId, + x.UnitId, x.DepartId, x.WorkPostId, WorkPostName = WorkPostService.getWorkPostNamesWorkPostIds(x.WorkPostId), @@ -88,7 +86,7 @@ namespace BLL x.CurrentProjectId, LastProjectName = getCurrentProjectName(x.PersonId), x.CurrentProjectWorkPostId, - LastWorkPostName = getCurrentProjectWorkPostName(x.PersonId), + LastWorkPostName = getCurrentProjectWorkPostName(x.PersonId), IsPost = x.IsPost ?? true, IsPostName = x.IsPost == false ? "否" : "是", x.SignatureUrl, @@ -106,9 +104,10 @@ namespace BLL /// public static string getCurrentProjectName(string PersonId) { - var getItem = (from x in Funs.DB.SitePerson_PersonItem where x.PersonId == PersonId - orderby x.InTime descending - select x).FirstOrDefault(); + var getItem = (from x in Funs.DB.SitePerson_PersonItem + where x.PersonId == PersonId + orderby x.InTime descending + select x).FirstOrDefault(); if (getItem != null) { return ProjectService.GetShortNameByProjectId(getItem.ProjectId); diff --git a/SGGL/BLL/Person/Person_TrainingPlanService.cs b/SGGL/BLL/Person/Person_TrainingPlanService.cs index 1ec02e41..9b2b5a07 100644 --- a/SGGL/BLL/Person/Person_TrainingPlanService.cs +++ b/SGGL/BLL/Person/Person_TrainingPlanService.cs @@ -4,7 +4,7 @@ namespace BLL { public static class Person_TrainingPlanService { - + /// /// 获取人员信息 /// diff --git a/SGGL/BLL/PersonManage/Test/ServerTestPlanService.cs b/SGGL/BLL/PersonManage/Test/ServerTestPlanService.cs index c62ac7fa..c30ef06b 100644 --- a/SGGL/BLL/PersonManage/Test/ServerTestPlanService.cs +++ b/SGGL/BLL/PersonManage/Test/ServerTestPlanService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class ServerTestPlanService { - + /// /// 根据主键获取知识竞赛计划 diff --git a/SGGL/BLL/PersonManage/Test/ServerTestPlanTrainingService.cs b/SGGL/BLL/PersonManage/Test/ServerTestPlanTrainingService.cs index 92bbc507..b078e110 100644 --- a/SGGL/BLL/PersonManage/Test/ServerTestPlanTrainingService.cs +++ b/SGGL/BLL/PersonManage/Test/ServerTestPlanTrainingService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ServerTestPlanTrainingService { - + /// /// 根据主键获取知识竞赛计划 diff --git a/SGGL/BLL/PersonManage/Test/ServerTestRecordService.cs b/SGGL/BLL/PersonManage/Test/ServerTestRecordService.cs index 70c8c893..9b59f0fa 100644 --- a/SGGL/BLL/PersonManage/Test/ServerTestRecordService.cs +++ b/SGGL/BLL/PersonManage/Test/ServerTestRecordService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class ServerTestRecordService { - + /// /// 根据主键获取考试记录 diff --git a/SGGL/BLL/ProjectData/MainItemService.cs b/SGGL/BLL/ProjectData/MainItemService.cs index 311bfeba..1357bd47 100644 --- a/SGGL/BLL/ProjectData/MainItemService.cs +++ b/SGGL/BLL/ProjectData/MainItemService.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Linq; using System.Web.UI.WebControls; -using Model; namespace BLL { diff --git a/SGGL/BLL/ProjectData/ProjectSateService.cs b/SGGL/BLL/ProjectData/ProjectSateService.cs index 7ebd9ead..fc5acc2b 100644 --- a/SGGL/BLL/ProjectData/ProjectSateService.cs +++ b/SGGL/BLL/ProjectData/ProjectSateService.cs @@ -7,7 +7,7 @@ namespace BLL /// public static class ProjectSateService { - + /// /// 根据主键获取项目状态及软件关闭信息 diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index cc1f3006..604285d7 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -2,11 +2,9 @@ { using Model; using Newtonsoft.Json; - using NPOI.Util; using System; using System.Collections.Generic; using System.Linq; - using System.Security.Cryptography; public static class ProjectService { diff --git a/SGGL/BLL/ProjectData/ProjectUnitService.cs b/SGGL/BLL/ProjectData/ProjectUnitService.cs index 4d93ab2d..d1d9cbd6 100644 --- a/SGGL/BLL/ProjectData/ProjectUnitService.cs +++ b/SGGL/BLL/ProjectData/ProjectUnitService.cs @@ -261,7 +261,7 @@ CompileManId = projectUnit.CompileManId, CompileDate = projectUnit.CompileDate, }; - + db.Project_ProjectUnitItem.InsertOnSubmit(newProjectUnit); db.SubmitChanges(); } diff --git a/SGGL/BLL/ProjectData/Project_SysSetService.cs b/SGGL/BLL/ProjectData/Project_SysSetService.cs index d814cc50..3cf2ba78 100644 --- a/SGGL/BLL/ProjectData/Project_SysSetService.cs +++ b/SGGL/BLL/ProjectData/Project_SysSetService.cs @@ -16,12 +16,12 @@ namespace BLL if (q.Count() == 0) { return ""; - } + } return q.First().SetValue; } public static string GetAvevaNetUrl_Item(string projectId) { - string url=""; + string url = ""; var q = from x in Funs.DB.Project_Sys_Set where x.SetId == "9" && x.ProjectId == projectId select x; if (q.Count() == 0) { @@ -34,12 +34,12 @@ namespace BLL string value = collection["portalid"]; url = q.First().SetValue + "item/" + value + "%7C"; } - catch (Exception ex ) + catch (Exception ex) { url = ""; } - + return url; } public static Model.ColorModel GetColorModel(string projectId) diff --git a/SGGL/BLL/ProjectData/TeamGroupService.cs b/SGGL/BLL/ProjectData/TeamGroupService.cs index 7f0d711d..d7bcb4f3 100644 --- a/SGGL/BLL/ProjectData/TeamGroupService.cs +++ b/SGGL/BLL/ProjectData/TeamGroupService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class TeamGroupService { - + /// /// 根据主键获取班组信息 diff --git a/SGGL/BLL/ProjectData/UnitWorkService.cs b/SGGL/BLL/ProjectData/UnitWorkService.cs index a025f94b..87436b3f 100644 --- a/SGGL/BLL/ProjectData/UnitWorkService.cs +++ b/SGGL/BLL/ProjectData/UnitWorkService.cs @@ -8,7 +8,7 @@ namespace BLL { public class UnitWorkService { - + /// /// 添加单位工程信息 @@ -548,7 +548,7 @@ namespace BLL public static string GetUnitWorkName(object unitWorkIds) { string unitWorkName = string.Empty; - if (unitWorkIds!=null&&!string.IsNullOrEmpty(unitWorkIds.ToString())) + if (unitWorkIds != null && !string.IsNullOrEmpty(unitWorkIds.ToString())) { string[] strs = unitWorkIds.ToString().Split(','); foreach (var item in strs) @@ -670,7 +670,7 @@ namespace BLL } return name; } - + /// /// 获取主项及设计专业名称 /// diff --git a/SGGL/BLL/SHIYE/InformationProject_SafetyBriefingService.cs b/SGGL/BLL/SHIYE/InformationProject_SafetyBriefingService.cs index 931e9d00..ef03691e 100644 --- a/SGGL/BLL/SHIYE/InformationProject_SafetyBriefingService.cs +++ b/SGGL/BLL/SHIYE/InformationProject_SafetyBriefingService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/SmartSite/EquipmentService.cs b/SGGL/BLL/SmartSite/EquipmentService.cs index a1951ad7..d7dab1c6 100644 --- a/SGGL/BLL/SmartSite/EquipmentService.cs +++ b/SGGL/BLL/SmartSite/EquipmentService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class EquipmentService { - + /// /// 根据主键获取设备管理 diff --git a/SGGL/BLL/SmartSite/EquipmentSoftService.cs b/SGGL/BLL/SmartSite/EquipmentSoftService.cs index a5f160fe..3ea2dab1 100644 --- a/SGGL/BLL/SmartSite/EquipmentSoftService.cs +++ b/SGGL/BLL/SmartSite/EquipmentSoftService.cs @@ -8,7 +8,7 @@ namespace BLL /// public static class EquipmentSoftService { - + /// /// 根据主键获取软件管理 @@ -69,7 +69,7 @@ namespace BLL { Model.SmartSite_EquipmentSoft newEquipmentSoft = Funs.DB.SmartSite_EquipmentSoft.FirstOrDefault(e => e.EquipmentSoftId == EquipmentSoft.EquipmentSoftId); if (newEquipmentSoft != null) - { + { newEquipmentSoft.EquipmentId = EquipmentSoft.EquipmentId; newEquipmentSoft.EquipmentSoftName = EquipmentSoft.EquipmentSoftName; newEquipmentSoft.EquipmentSoftModel = EquipmentSoft.EquipmentSoftModel; diff --git a/SGGL/BLL/SysManage/DepartService.cs b/SGGL/BLL/SysManage/DepartService.cs index c5e3373b..9a640b5c 100644 --- a/SGGL/BLL/SysManage/DepartService.cs +++ b/SGGL/BLL/SysManage/DepartService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class DepartService { - + /// /// 根据主键获取信息 @@ -95,7 +95,7 @@ namespace BLL public static string getDepartNameById(object departId) { string name = string.Empty; - if (departId!=null&& !string.IsNullOrEmpty(departId.ToString())) + if (departId != null && !string.IsNullOrEmpty(departId.ToString())) { var dep = Funs.DB.Base_Depart.FirstOrDefault(e => e.DepartId == departId.ToString()); if (dep != null) @@ -103,7 +103,7 @@ namespace BLL name = dep.DepartName; } } - + return name; } #region 表下拉框 diff --git a/SGGL/BLL/SysManage/LogService.cs b/SGGL/BLL/SysManage/LogService.cs index c6cbe637..c72ac0bc 100644 --- a/SGGL/BLL/SysManage/LogService.cs +++ b/SGGL/BLL/SysManage/LogService.cs @@ -1,13 +1,12 @@ namespace BLL { - using NPOI.SS.Formula.PTG; using System; using System.Linq; using System.Net; public static class LogService { - + /// /// Ӳ־ diff --git a/SGGL/BLL/SysManage/RoleItemService.cs b/SGGL/BLL/SysManage/RoleItemService.cs index a8844359..4ebd6eb6 100644 --- a/SGGL/BLL/SysManage/RoleItemService.cs +++ b/SGGL/BLL/SysManage/RoleItemService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class RoleItemService { - + /// /// 获取角色明细信息 diff --git a/SGGL/BLL/SysManage/RoleService.cs b/SGGL/BLL/SysManage/RoleService.cs index 64c01bc0..53050916 100644 --- a/SGGL/BLL/SysManage/RoleService.cs +++ b/SGGL/BLL/SysManage/RoleService.cs @@ -5,7 +5,7 @@ public static class RoleService { - + /// /// 获取角色信息 diff --git a/SGGL/BLL/SysManage/SysHttplogService.cs b/SGGL/BLL/SysManage/SysHttplogService.cs index b0e8cd51..1b5f7e86 100644 --- a/SGGL/BLL/SysManage/SysHttplogService.cs +++ b/SGGL/BLL/SysManage/SysHttplogService.cs @@ -1,10 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL diff --git a/SGGL/BLL/SysManage/SysMenuService.cs b/SGGL/BLL/SysManage/SysMenuService.cs index 1718031c..b497e973 100644 --- a/SGGL/BLL/SysManage/SysMenuService.cs +++ b/SGGL/BLL/SysManage/SysMenuService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class SysMenuService { - + /// /// 根据MenuId获取菜单名称项 diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index c83e0b59..b40fcef1 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -1,8 +1,8 @@ -using System; +using Model; +using System; using System.Collections.Generic; using System.Linq; using System.Web.UI.WebControls; -using Model; namespace BLL { diff --git a/SGGL/BLL/TaskScheduling/InterFaceService/DataForJTApiService.cs b/SGGL/BLL/TaskScheduling/InterFaceService/DataForJTApiService.cs index dbb986a9..85ef122d 100644 --- a/SGGL/BLL/TaskScheduling/InterFaceService/DataForJTApiService.cs +++ b/SGGL/BLL/TaskScheduling/InterFaceService/DataForJTApiService.cs @@ -1,12 +1,10 @@ namespace BLL { - using System; - using System.Collections.Generic; using System.Linq; public static class DataForJTApiService { - + /// /// ȡӿϢ @@ -65,7 +63,7 @@ namespace BLL } } - + /// /// IdɾϢ /// diff --git a/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceLogService .cs b/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceLogService .cs index cfa8ad4f..78d6769f 100644 --- a/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceLogService .cs +++ b/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceLogService .cs @@ -1,25 +1,20 @@ using FineUIPro; -using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; -using System.Drawing.Printing; using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using Model; namespace BLL { - - public static class InterFaceLogService + + public static class InterFaceLogService { public const string Type1 = "上报"; - public const string Type2= "下发"; + public const string Type2 = "下发"; public const string Type3 = "回调"; - - #region 获取列表 + + #region 获取列表 /// /// 记录数 /// @@ -56,62 +51,63 @@ namespace BLL /// public static IEnumerable getListData(Model.InterFaceLog table, Grid Grid1) { - var q= GetInterFaceLogByModle(table); + var q = GetInterFaceLogByModle(table); count = q.Count(); if (count == 0) { return null; } - q = q.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList(); - // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + q = q.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList(); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return (from x in q - select new - { - x.InterFaceLogId, - x.UserId, - x.UnitId, - x.InterFaceName, - x.InterFaceUrl, - x.InterFaceMehtod, - x.InterFaceBody, - x.InterFaceReturnData, - x.InterFaceLogDate, - x.InterFaceType, - x.LogSate, - x.IP, - - }); + select new + { + x.InterFaceLogId, + x.UserId, + x.UnitId, + x.InterFaceName, + x.InterFaceUrl, + x.InterFaceMehtod, + x.InterFaceBody, + x.InterFaceReturnData, + x.InterFaceLogDate, + x.InterFaceType, + x.LogSate, + x.IP, + + }); } #endregion - public static Model.InterFaceLog GetInterFaceLogById(string InterFaceLogId) - { - return Funs.DB.InterFaceLog.FirstOrDefault(x=>x.InterFaceLogId==InterFaceLogId); + public static Model.InterFaceLog GetInterFaceLogById(string InterFaceLogId) + { + return Funs.DB.InterFaceLog.FirstOrDefault(x => x.InterFaceLogId == InterFaceLogId); } - + public static void AddInterFaceLog(Model.InterFaceLog newtable) { - - Model.InterFaceLog table = new Model.InterFaceLog{ - InterFaceLogId=newtable.InterFaceLogId, - UserId=newtable.UserId, - UnitId=newtable.UnitId, - InterFaceName=newtable.InterFaceName, - InterFaceUrl=newtable.InterFaceUrl, - InterFaceMehtod=newtable.InterFaceMehtod, - InterFaceBody=newtable.InterFaceBody, - InterFaceReturnData=newtable.InterFaceReturnData, - InterFaceLogDate=newtable.InterFaceLogDate, - InterFaceType=newtable.InterFaceType, - LogSate=newtable.LogSate, - IP=newtable.IP, + + Model.InterFaceLog table = new Model.InterFaceLog + { + InterFaceLogId = newtable.InterFaceLogId, + UserId = newtable.UserId, + UnitId = newtable.UnitId, + InterFaceName = newtable.InterFaceName, + InterFaceUrl = newtable.InterFaceUrl, + InterFaceMehtod = newtable.InterFaceMehtod, + InterFaceBody = newtable.InterFaceBody, + InterFaceReturnData = newtable.InterFaceReturnData, + InterFaceLogDate = newtable.InterFaceLogDate, + InterFaceType = newtable.InterFaceType, + LogSate = newtable.LogSate, + IP = newtable.IP, }; Funs.DB.InterFaceLog.InsertOnSubmit(table); Funs.DB.SubmitChanges(); } - public static void WriteInterFaceLog(string InterFaceSetlId, string InterFaceBody, string ReturnData, string InterFaceType,bool isSuccess) + public static void WriteInterFaceLog(string InterFaceSetlId, string InterFaceBody, string ReturnData, string InterFaceType, bool isSuccess) { var InterfaceSetModel = InterFaceSetService.GetInterFaceSetById(InterFaceSetlId); Model.InterFaceLog table = new Model.InterFaceLog(); @@ -130,7 +126,7 @@ namespace BLL table.UnitId = InterfaceSetModel.UnitId; table.InterFaceUrl = InterfaceSetModel.InterFaceUrl; table.InterFaceMehtod = InterfaceSetModel.UrlReqMethod; - + break; case Type2: table.UnitId = InterfaceSetModel.AuthUnitIds; @@ -149,36 +145,36 @@ namespace BLL public static void UpdateInterFaceLog(Model.InterFaceLog newtable) { - - Model.InterFaceLog table = Funs.DB.InterFaceLog.FirstOrDefault(x=>x.InterFaceLogId==newtable.InterFaceLogId); - if (table != null) + + Model.InterFaceLog table = Funs.DB.InterFaceLog.FirstOrDefault(x => x.InterFaceLogId == newtable.InterFaceLogId); + if (table != null) { - table.InterFaceLogId=newtable.InterFaceLogId; - table.UserId=newtable.UserId; - table.UnitId=newtable.UnitId; - table.InterFaceName=newtable.InterFaceName; - table.InterFaceUrl=newtable.InterFaceUrl; - table.InterFaceMehtod=newtable.InterFaceMehtod; - table.InterFaceBody=newtable.InterFaceBody; - table.InterFaceReturnData=newtable.InterFaceReturnData; - table.InterFaceLogDate=newtable.InterFaceLogDate; - table.InterFaceType=newtable.InterFaceType; - table.LogSate=newtable.LogSate; - table.IP=newtable.IP; + table.InterFaceLogId = newtable.InterFaceLogId; + table.UserId = newtable.UserId; + table.UnitId = newtable.UnitId; + table.InterFaceName = newtable.InterFaceName; + table.InterFaceUrl = newtable.InterFaceUrl; + table.InterFaceMehtod = newtable.InterFaceMehtod; + table.InterFaceBody = newtable.InterFaceBody; + table.InterFaceReturnData = newtable.InterFaceReturnData; + table.InterFaceLogDate = newtable.InterFaceLogDate; + table.InterFaceType = newtable.InterFaceType; + table.LogSate = newtable.LogSate; + table.IP = newtable.IP; Funs.DB.SubmitChanges(); } - + } - public static void DeleteInterFaceLogById (string InterFaceLogId) - { - - Model.InterFaceLog table =Funs.DB.InterFaceLog.FirstOrDefault(x=>x.InterFaceLogId==InterFaceLogId); - if (table != null) - { + public static void DeleteInterFaceLogById(string InterFaceLogId) + { + + Model.InterFaceLog table = Funs.DB.InterFaceLog.FirstOrDefault(x => x.InterFaceLogId == InterFaceLogId); + if (table != null) + { Funs.DB.InterFaceLog.DeleteOnSubmit(table); Funs.DB.SubmitChanges(); - } - + } + } } diff --git a/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceSetService .cs b/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceSetService .cs index 15f62596..b5dae641 100644 --- a/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceSetService .cs +++ b/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceSetService .cs @@ -1,19 +1,17 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { - - public static class InterFaceSetService + + public static class InterFaceSetService { - - - #region 获取列表 + + + #region 获取列表 /// /// 记录数 /// @@ -22,24 +20,24 @@ namespace BLL get; set; } - public static List GetInterFaceSetByModle(Model.InterFaceSet table) - { - var q= from x in Funs.DB.InterFaceSet - where - ( string.IsNullOrEmpty(table.InterFaceSetId)||x.InterFaceSetId.Contains(table.InterFaceSetId)) && - ( string.IsNullOrEmpty(table.InterFaceName)||x.InterFaceName.Contains(table.InterFaceName)) && - ( string.IsNullOrEmpty(table.InterFaceUrl)||x.InterFaceUrl.Contains(table.InterFaceUrl)) && - ( string.IsNullOrEmpty(table.UnitId)||x.UnitId.Contains(table.UnitId)) && - ( string.IsNullOrEmpty(table.AuthUnitIds)||x.AuthUnitIds.Contains(table.AuthUnitIds)) && - ( string.IsNullOrEmpty(table.AuthUnitName)||x.AuthUnitName.Contains(table.AuthUnitName)) && - ( string.IsNullOrEmpty(table.ValidPeriod)||x.ValidPeriod.Contains(table.ValidPeriod)) && - ( string.IsNullOrEmpty(table.TxtRemarks)||x.TxtRemarks.Contains(table.TxtRemarks)) && - ( string.IsNullOrEmpty(table.InterFaceForUrl)||x.InterFaceForUrl.Contains(table.InterFaceForUrl)) && - ( string.IsNullOrEmpty(table.InterFaceCallBackUrl)||x.InterFaceCallBackUrl.Contains(table.InterFaceCallBackUrl)) - select x - ; - - return q.ToList(); + public static List GetInterFaceSetByModle(Model.InterFaceSet table) + { + var q = from x in Funs.DB.InterFaceSet + where + (string.IsNullOrEmpty(table.InterFaceSetId) || x.InterFaceSetId.Contains(table.InterFaceSetId)) && + (string.IsNullOrEmpty(table.InterFaceName) || x.InterFaceName.Contains(table.InterFaceName)) && + (string.IsNullOrEmpty(table.InterFaceUrl) || x.InterFaceUrl.Contains(table.InterFaceUrl)) && + (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && + (string.IsNullOrEmpty(table.AuthUnitIds) || x.AuthUnitIds.Contains(table.AuthUnitIds)) && + (string.IsNullOrEmpty(table.AuthUnitName) || x.AuthUnitName.Contains(table.AuthUnitName)) && + (string.IsNullOrEmpty(table.ValidPeriod) || x.ValidPeriod.Contains(table.ValidPeriod)) && + (string.IsNullOrEmpty(table.TxtRemarks) || x.TxtRemarks.Contains(table.TxtRemarks)) && + (string.IsNullOrEmpty(table.InterFaceForUrl) || x.InterFaceForUrl.Contains(table.InterFaceForUrl)) && + (string.IsNullOrEmpty(table.InterFaceCallBackUrl) || x.InterFaceCallBackUrl.Contains(table.InterFaceCallBackUrl)) + select x + ; + + return q.ToList(); } /// 获取分页列表 @@ -49,107 +47,108 @@ namespace BLL /// public static IEnumerable getListData(Model.InterFaceSet table, Grid Grid1) { - var q= GetInterFaceSetByModle(table); + var q = GetInterFaceSetByModle(table); count = q.Count(); if (count == 0) { return null; } // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); - // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q select new { - x.InterFaceSetId, - x.InterFaceName, - x.InterFaceUrl, - x.UnitId, - x.AuthUnitIds, - x.AuthUnitName, - x.IsOpen, - x.ValidPeriod, - x.TxtRemarks, - x.InterFaceForUrl, - x.IsCallBack, - x.InterFaceCallBackUrl, - x.UrlReqMethod, - x.CallBackUrlReqMethod, - x.ForUrlReqMethod - + x.InterFaceSetId, + x.InterFaceName, + x.InterFaceUrl, + x.UnitId, + x.AuthUnitIds, + x.AuthUnitName, + x.IsOpen, + x.ValidPeriod, + x.TxtRemarks, + x.InterFaceForUrl, + x.IsCallBack, + x.InterFaceCallBackUrl, + x.UrlReqMethod, + x.CallBackUrlReqMethod, + x.ForUrlReqMethod + }; } #endregion - public static Model.InterFaceSet GetInterFaceSetById(string InterFaceSetId) - { - return Funs.DB.InterFaceSet.FirstOrDefault(x=>x.InterFaceSetId==InterFaceSetId); - } - public static List GetInterFaceSets() + public static Model.InterFaceSet GetInterFaceSetById(string InterFaceSetId) { - var q = (from x in Funs.DB.InterFaceSet select x).ToList(); + return Funs.DB.InterFaceSet.FirstOrDefault(x => x.InterFaceSetId == InterFaceSetId); + } + public static List GetInterFaceSets() + { + var q = (from x in Funs.DB.InterFaceSet select x).ToList(); return q; } public static void AddInterFaceSet(Model.InterFaceSet newtable) { - - Model.InterFaceSet table = new Model.InterFaceSet{ - InterFaceSetId=newtable.InterFaceSetId, - InterFaceName=newtable.InterFaceName, - InterFaceUrl=newtable.InterFaceUrl, - UnitId=newtable.UnitId, - AuthUnitIds=newtable.AuthUnitIds, - AuthUnitName=newtable.AuthUnitName, - IsOpen=newtable.IsOpen, - ValidPeriod=newtable.ValidPeriod, - TxtRemarks=newtable.TxtRemarks, - InterFaceForUrl=newtable.InterFaceForUrl, - IsCallBack=newtable.IsCallBack, - InterFaceCallBackUrl=newtable.InterFaceCallBackUrl, - UrlReqMethod=newtable.UrlReqMethod, - ForUrlReqMethod=newtable.ForUrlReqMethod, - CallBackUrlReqMethod= newtable.CallBackUrlReqMethod, + + Model.InterFaceSet table = new Model.InterFaceSet + { + InterFaceSetId = newtable.InterFaceSetId, + InterFaceName = newtable.InterFaceName, + InterFaceUrl = newtable.InterFaceUrl, + UnitId = newtable.UnitId, + AuthUnitIds = newtable.AuthUnitIds, + AuthUnitName = newtable.AuthUnitName, + IsOpen = newtable.IsOpen, + ValidPeriod = newtable.ValidPeriod, + TxtRemarks = newtable.TxtRemarks, + InterFaceForUrl = newtable.InterFaceForUrl, + IsCallBack = newtable.IsCallBack, + InterFaceCallBackUrl = newtable.InterFaceCallBackUrl, + UrlReqMethod = newtable.UrlReqMethod, + ForUrlReqMethod = newtable.ForUrlReqMethod, + CallBackUrlReqMethod = newtable.CallBackUrlReqMethod, }; Funs.DB.InterFaceSet.InsertOnSubmit(table); Funs.DB.SubmitChanges(); } - + public static void UpdateInterFaceSet(Model.InterFaceSet newtable) { - - Model.InterFaceSet table = Funs.DB.InterFaceSet.FirstOrDefault(x=>x.InterFaceSetId==newtable.InterFaceSetId); - if (table != null) + + Model.InterFaceSet table = Funs.DB.InterFaceSet.FirstOrDefault(x => x.InterFaceSetId == newtable.InterFaceSetId); + if (table != null) { - table.InterFaceSetId=newtable.InterFaceSetId; - table.InterFaceName=newtable.InterFaceName; - table.InterFaceUrl=newtable.InterFaceUrl; - table.UnitId=newtable.UnitId; - table.AuthUnitIds=newtable.AuthUnitIds; - table.AuthUnitName=newtable.AuthUnitName; - table.IsOpen=newtable.IsOpen; - table.ValidPeriod=newtable.ValidPeriod; - table.TxtRemarks=newtable.TxtRemarks; - table.InterFaceForUrl=newtable.InterFaceForUrl; - table.IsCallBack=newtable.IsCallBack; - table.InterFaceCallBackUrl=newtable.InterFaceCallBackUrl; - table.UrlReqMethod=newtable.UrlReqMethod; - table.ForUrlReqMethod=newtable.ForUrlReqMethod; - table.CallBackUrlReqMethod=newtable.CallBackUrlReqMethod; + table.InterFaceSetId = newtable.InterFaceSetId; + table.InterFaceName = newtable.InterFaceName; + table.InterFaceUrl = newtable.InterFaceUrl; + table.UnitId = newtable.UnitId; + table.AuthUnitIds = newtable.AuthUnitIds; + table.AuthUnitName = newtable.AuthUnitName; + table.IsOpen = newtable.IsOpen; + table.ValidPeriod = newtable.ValidPeriod; + table.TxtRemarks = newtable.TxtRemarks; + table.InterFaceForUrl = newtable.InterFaceForUrl; + table.IsCallBack = newtable.IsCallBack; + table.InterFaceCallBackUrl = newtable.InterFaceCallBackUrl; + table.UrlReqMethod = newtable.UrlReqMethod; + table.ForUrlReqMethod = newtable.ForUrlReqMethod; + table.CallBackUrlReqMethod = newtable.CallBackUrlReqMethod; Funs.DB.SubmitChanges(); } - + } - public static void DeleteInterFaceSetById (string InterFaceSetId) - { - - Model.InterFaceSet table =Funs.DB.InterFaceSet.FirstOrDefault(x=>x.InterFaceSetId==InterFaceSetId); - if (table != null) - { + public static void DeleteInterFaceSetById(string InterFaceSetId) + { + + Model.InterFaceSet table = Funs.DB.InterFaceSet.FirstOrDefault(x => x.InterFaceSetId == InterFaceSetId); + if (table != null) + { Funs.DB.InterFaceSet.DeleteOnSubmit(table); Funs.DB.SubmitChanges(); - } - + } + } public static void InitInterFaceDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { diff --git a/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceTaskService .cs b/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceTaskService .cs index 27ea69ea..2895d555 100644 --- a/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceTaskService .cs +++ b/SGGL/BLL/TaskScheduling/InterFaceService/InterFaceTaskService .cs @@ -1,19 +1,16 @@ using FineUIPro; using Model; using Newtonsoft.Json; -using Quartz; -using RestSharp; using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { - - public static class InterFaceTaskService + + public static class InterFaceTaskService { #region 获取列表 /// @@ -24,19 +21,19 @@ namespace BLL get; set; } - public static List GetInterFaceTaskByModle(Model.InterFaceTask table) - { - var q= from x in Funs.DB.InterFaceTask - where - ( string.IsNullOrEmpty(table.InterFaceTaskId)||x.InterFaceTaskId.Contains(table.InterFaceTaskId)) && - ( string.IsNullOrEmpty(table.InterFaceName)||x.InterFaceName.Contains(table.InterFaceName)) && - ( string.IsNullOrEmpty(table.InterFaceSetLists)||x.InterFaceSetLists.Contains(table.InterFaceSetLists)) && - ( string.IsNullOrEmpty(table.Frequency)||x.Frequency.Contains(table.Frequency)) && - (table.Enable ==null|| x.Enable==table.Enable) - select x - ; - - return q.ToList(); + public static List GetInterFaceTaskByModle(Model.InterFaceTask table) + { + var q = from x in Funs.DB.InterFaceTask + where + (string.IsNullOrEmpty(table.InterFaceTaskId) || x.InterFaceTaskId.Contains(table.InterFaceTaskId)) && + (string.IsNullOrEmpty(table.InterFaceName) || x.InterFaceName.Contains(table.InterFaceName)) && + (string.IsNullOrEmpty(table.InterFaceSetLists) || x.InterFaceSetLists.Contains(table.InterFaceSetLists)) && + (string.IsNullOrEmpty(table.Frequency) || x.Frequency.Contains(table.Frequency)) && + (table.Enable == null || x.Enable == table.Enable) + select x + ; + + return q.ToList(); } /// 获取分页列表 @@ -46,80 +43,81 @@ namespace BLL /// public static IEnumerable getListData(Model.InterFaceTask table, Grid Grid1) { - var q= GetInterFaceTaskByModle(table); + var q = GetInterFaceTaskByModle(table); count = q.Count(); if (count == 0) { return null; } // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); - // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q select new { - x.InterFaceTaskId, - x.InterFaceName, - x.InterFaceSetLists, - x.Frequency, - x.CreateTime, - x.Enable, - + x.InterFaceTaskId, + x.InterFaceName, + x.InterFaceSetLists, + x.Frequency, + x.CreateTime, + x.Enable, + }; } #endregion - public static Model.InterFaceTask GetInterFaceTaskById(string InterFaceTaskId) - { - return Funs.DB.InterFaceTask.FirstOrDefault(x=>x.InterFaceTaskId==InterFaceTaskId); + public static Model.InterFaceTask GetInterFaceTaskById(string InterFaceTaskId) + { + return Funs.DB.InterFaceTask.FirstOrDefault(x => x.InterFaceTaskId == InterFaceTaskId); } public static void AddInterFaceTask(Model.InterFaceTask newtable) { - - Model.InterFaceTask table = new Model.InterFaceTask{ - InterFaceTaskId=newtable.InterFaceTaskId, - InterFaceName=newtable.InterFaceName, - InterFaceSetLists=newtable.InterFaceSetLists, - Frequency=newtable.Frequency, - CreateTime=newtable.CreateTime, - Enable=newtable.Enable, + + Model.InterFaceTask table = new Model.InterFaceTask + { + InterFaceTaskId = newtable.InterFaceTaskId, + InterFaceName = newtable.InterFaceName, + InterFaceSetLists = newtable.InterFaceSetLists, + Frequency = newtable.Frequency, + CreateTime = newtable.CreateTime, + Enable = newtable.Enable, }; var db1 = Funs.DB; db1.InterFaceTask.InsertOnSubmit(table); db1.SubmitChanges(); } - + public static void UpdateInterFaceTask(Model.InterFaceTask newtable) { var db1 = Funs.DB; - Model.InterFaceTask table = db1.InterFaceTask.FirstOrDefault(x=>x.InterFaceTaskId==newtable.InterFaceTaskId); - if (table != null) + Model.InterFaceTask table = db1.InterFaceTask.FirstOrDefault(x => x.InterFaceTaskId == newtable.InterFaceTaskId); + if (table != null) { - table.InterFaceTaskId=newtable.InterFaceTaskId; - table.InterFaceName=newtable.InterFaceName; - table.InterFaceSetLists=newtable.InterFaceSetLists; - table.Frequency=newtable.Frequency; - table.CreateTime=newtable.CreateTime; - table.Enable=newtable.Enable; + table.InterFaceTaskId = newtable.InterFaceTaskId; + table.InterFaceName = newtable.InterFaceName; + table.InterFaceSetLists = newtable.InterFaceSetLists; + table.Frequency = newtable.Frequency; + table.CreateTime = newtable.CreateTime; + table.Enable = newtable.Enable; db1.SubmitChanges(); } - + } - public static void DeleteInterFaceTaskById (string InterFaceTaskId) + public static void DeleteInterFaceTaskById(string InterFaceTaskId) { var db1 = Funs.DB; - Model.InterFaceTask table =db1.InterFaceTask.FirstOrDefault(x=>x.InterFaceTaskId==InterFaceTaskId); - if (table != null) - { + Model.InterFaceTask table = db1.InterFaceTask.FirstOrDefault(x => x.InterFaceTaskId == InterFaceTaskId); + if (table != null) + { db1.InterFaceTask.DeleteOnSubmit(table); db1.SubmitChanges(); - } - + } + } #region 执行任务 public static void ExecuteTasks(string InterFaceTaskId) { - + var model = GetInterFaceTaskById(InterFaceTaskId); var InterFaceSetlIds = model.InterFaceSetLists.Split(','); foreach (var item in InterFaceSetlIds) @@ -176,27 +174,27 @@ namespace BLL InterFaceLogService.WriteInterFaceLog(InterFaceSetlId, JsonConvert.SerializeObject(sourseData.data), JsonConvert.SerializeObject(callbackData), InterFaceLogService.Type3, CallBackisSuccess); } - catch (Exception ex ) + catch (Exception ex) { - Model.InterFaceLog interFaceLog=new InterFaceLog(); - interFaceLog.InterFaceLogId=Guid.NewGuid().ToString(); + Model.InterFaceLog interFaceLog = new InterFaceLog(); + interFaceLog.InterFaceLogId = Guid.NewGuid().ToString(); interFaceLog.InterFaceType = "异常"; interFaceLog.LogSate = false; - interFaceLog.InterFaceLogDate= DateTime.Now; + interFaceLog.InterFaceLogDate = DateTime.Now; interFaceLog.InterFaceName = InterfaceSetModel.InterFaceName; interFaceLog.InterFaceReturnData = ex.ToString(); InterFaceLogService.AddInterFaceLog(interFaceLog); } - + } - public static Model.ReturnData GetSourseData(string baseurl,string ReqMethod) + public static Model.ReturnData GetSourseData(string baseurl, string ReqMethod) { Model.ReturnData returnData = new ReturnData(); string token = "C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0"; string Content = ""; switch (ReqMethod) { - case "Get": + case "Get": Content = Funs.RequestGet(baseurl, token); break; case "Post": @@ -276,7 +274,7 @@ namespace BLL } return responeData; } - public static ReturnData ExecuteCallBack(string baseurl, ReturnData DataInput,string ReqMethod) + public static ReturnData ExecuteCallBack(string baseurl, ReturnData DataInput, string ReqMethod) { Model.ReturnData returnData = new ReturnData(); if (DataInput.code == 1) diff --git a/SGGL/BLL/TaskScheduling/TimerTask/CustomJobListener.cs b/SGGL/BLL/TaskScheduling/TimerTask/CustomJobListener.cs index a7e571d5..5337151b 100644 --- a/SGGL/BLL/TaskScheduling/TimerTask/CustomJobListener.cs +++ b/SGGL/BLL/TaskScheduling/TimerTask/CustomJobListener.cs @@ -1,15 +1,7 @@ -using Quartz; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace BLL +namespace BLL { - public class CustomJobListener + public class CustomJobListener { - + } } diff --git a/SGGL/BLL/TaskScheduling/TimerTask/TaskJob.cs b/SGGL/BLL/TaskScheduling/TimerTask/TaskJob.cs index 2b519454..545b607f 100644 --- a/SGGL/BLL/TaskScheduling/TimerTask/TaskJob.cs +++ b/SGGL/BLL/TaskScheduling/TimerTask/TaskJob.cs @@ -1,6 +1,4 @@ using Quartz; -using System.Threading; -using System; using System.Threading.Tasks; namespace BLL @@ -14,13 +12,13 @@ namespace BLL // note: use context.MergedJobDataMap in production code JobDataMap dataMap = context.JobDetail.JobDataMap; string InterFaceTaskId = dataMap.GetString("InterFaceTaskId"); - + //使用异步任务来实现 await Task.Run(() => { - - InterFaceTaskService.ExecuteTasks(InterFaceTaskId); - + + InterFaceTaskService.ExecuteTasks(InterFaceTaskId); + //Console.WriteLine($"{DateTime.Now}【{Thread.CurrentThread.ManagedThreadId}】:自定义的工作正在执行... ..."); }); diff --git a/SGGL/BLL/TaskScheduling/TimerTask/TimerTaskBase.cs b/SGGL/BLL/TaskScheduling/TimerTask/TimerTaskBase.cs index b15c4519..c45e51b9 100644 --- a/SGGL/BLL/TaskScheduling/TimerTask/TimerTaskBase.cs +++ b/SGGL/BLL/TaskScheduling/TimerTask/TimerTaskBase.cs @@ -1,30 +1,24 @@  - using System; - using System.Collections.Generic; +using Quartz; +using Quartz.Impl; +using System; +using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Collections.Specialized; -using System.Drawing.Printing; -using System.Linq; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Threading; using System.Threading.Tasks; - using Quartz; - using Quartz.Impl; - namespace BLL - { +namespace BLL +{ public class QuartzServices { public static async Task Init() { - + //初始化计划者 StdSchedulerFactory factory = new StdSchedulerFactory(); IScheduler scheduler = await factory.GetScheduler(); - var jobAndTriggerMapping = new Dictionary>(); + var jobAndTriggerMapping = new Dictionary>(); // 将映射关系包装成制度字典集合 var model = new Model.InterFaceTask(); model.Enable = true; @@ -45,7 +39,7 @@ using System.Threading.Tasks; Funs.ScheduledTasks = scheduler; } - + public static void ISchedulerShupDown(IScheduler scheduler) { scheduler.Shutdown(); @@ -73,15 +67,15 @@ using System.Threading.Tasks; { var jobDetail1 = GetJobDetailByInterFaceTaskId(model.InterFaceTaskId); var trigger1 = GetTriggerByTime(model.InterFaceTaskId, model.Frequency); - await scheduler.ScheduleJob(jobDetail1, trigger1,true); + await scheduler.ScheduleJob(jobDetail1, trigger1, true); } else { - + var jobDetail1 = GetJobDetailByInterFaceTaskId(model.InterFaceTaskId); var trigger1 = GetTriggerByTime(model.InterFaceTaskId, model.Frequency); - await scheduler.ScheduleJob(jobDetail1, trigger1,true); + await scheduler.ScheduleJob(jobDetail1, trigger1, true); } } @@ -90,9 +84,9 @@ using System.Threading.Tasks; if (scheduler.GetJobDetail(jk, default) != null) { await scheduler.DeleteJob(jk, default); - - // SyncScheduledTasks(model.InterFaceTaskId, scheduler, 2); + + // SyncScheduledTasks(model.InterFaceTaskId, scheduler, 2); } } @@ -118,16 +112,16 @@ using System.Threading.Tasks; { if (type == 0) { - // Funs.ScheduledTasks.Add(InterFaceTaskId, scheduler); + // Funs.ScheduledTasks.Add(InterFaceTaskId, scheduler); } else if (type == 1) { - // Funs.ScheduledTasks.Remove(InterFaceTaskId); - // Funs.ScheduledTasks.Add(InterFaceTaskId, scheduler); + // Funs.ScheduledTasks.Remove(InterFaceTaskId); + // Funs.ScheduledTasks.Add(InterFaceTaskId, scheduler); } else if (type == 2) { - // Funs.ScheduledTasks.Remove(InterFaceTaskId); + // Funs.ScheduledTasks.Remove(InterFaceTaskId); } } public static IJobDetail GetJobDetailByInterFaceTaskId(string InterFaceTaskId) @@ -143,7 +137,7 @@ using System.Threading.Tasks; { string cron = "0 0 0/& * * ? "; cron = cron.Replace("&", time); - // cron = "0 0/1 * * * ? "; + // cron = "0 0/1 * * * ? "; //创建触发器 var trigger1 = new ReadOnlyCollection( new List() @@ -159,6 +153,5 @@ using System.Threading.Tasks; } } - } +} - \ No newline at end of file diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs index 5078ac75..029645b7 100644 --- a/SGGL/BLL/WebService/CNCECHSSEWebService.cs +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -1,21 +1,16 @@ namespace BLL { - using Apache.NMS.ActiveMQ.Commands; using Newtonsoft.Json; - using NPOI.POIFS.Crypt.Dsig; + using Newtonsoft.Json.Linq; + //using System.Net.Http.Headers; + //using System.Net.Http; + using RestSharp; using System; + using System.Collections; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; - //using System.Net.Http.Headers; - //using System.Net.Http; - using System.Web; - using RestSharp; - using System.Net; - using Model; - using System.Collections; - using Newtonsoft.Json.Linq; public static class CNCECHSSEWebService { @@ -569,7 +564,8 @@ ////更新催报信息 UrgeReportService.SetComplete(report.UnitId, Const.ReportType_3, report.YearId.ToString(), report.Quarters.ToString()); } - }; + } + ; LogService.AddSys_Log(CurrUser, "【安全生产数据季报上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); } diff --git a/SGGL/BLL/WebService/FileStructService.cs b/SGGL/BLL/WebService/FileStructService.cs index 43f84382..aa796a74 100644 --- a/SGGL/BLL/WebService/FileStructService.cs +++ b/SGGL/BLL/WebService/FileStructService.cs @@ -1,10 +1,6 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections; using System.IO; -using System.Web; namespace BLL { @@ -22,8 +18,8 @@ namespace BLL { string filePath = string.Empty; string physicalpath = Funs.RootPath; - //HttpContext.Current.Request.PhysicalApplicationPath; - filePath = physicalpath + attachUrl; + //HttpContext.Current.Request.PhysicalApplicationPath; + filePath = physicalpath + attachUrl; if (File.Exists(filePath)) { FileInfo fileInfo = new FileInfo(filePath); diff --git a/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportMainCostService.cs b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportMainCostService.cs index 6d65ee80..9f1f1c83 100644 --- a/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportMainCostService.cs +++ b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportMainCostService.cs @@ -5,7 +5,7 @@ namespace BLL { public class ConstructionMonthReportMainCostService { - + /// /// 获取施工月报总包工程施工请款情况模板列表 diff --git a/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportService.cs b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportService.cs index 02b79688..df0725b7 100644 --- a/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportService.cs +++ b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportService.cs @@ -1,14 +1,11 @@ using System; -using System.Collections; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { public class ConstructionMonthReportService { - + /// /// 添加施工月报 diff --git a/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportSubCostService.cs b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportSubCostService.cs index ba4fe558..a9a5afdd 100644 --- a/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportSubCostService.cs +++ b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportSubCostService.cs @@ -5,7 +5,7 @@ namespace BLL { public class ConstructionMonthReportSubCostService { - + /// /// 获取施工月报分包工程施工付款情况模板列表 diff --git a/SGGL/BLL/ZHGL/DataSync/BaseDataService.cs b/SGGL/BLL/ZHGL/DataSync/BaseDataService.cs index 81f7efc6..bbdd7b8a 100644 --- a/SGGL/BLL/ZHGL/DataSync/BaseDataService.cs +++ b/SGGL/BLL/ZHGL/DataSync/BaseDataService.cs @@ -2,12 +2,11 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; namespace BLL { - public static class BaseDataService + public static class BaseDataService { public static List BeUnderConstructionList = GetBeUnderConstruction().Select(p => p.ProjectId).ToList(); diff --git a/SGGL/BLL/ZHGL/DataSync/CQMSDataService.cs b/SGGL/BLL/ZHGL/DataSync/CQMSDataService.cs index 971a3370..edef4a12 100644 --- a/SGGL/BLL/ZHGL/DataSync/CQMSDataService.cs +++ b/SGGL/BLL/ZHGL/DataSync/CQMSDataService.cs @@ -1,15 +1,11 @@ -using BLL; -using FineUIPro; -using Model; +using FineUIPro; using Model; using Newtonsoft.Json; -using NPOI.POIFS.Crypt.Dsig; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using System.Web.UI.WebControls; namespace BLL { diff --git a/SGGL/BLL/ZHGL/DataSync/HJGLData_DefectService.cs b/SGGL/BLL/ZHGL/DataSync/HJGLData_DefectService.cs index a4c0ba33..f804d268 100644 --- a/SGGL/BLL/ZHGL/DataSync/HJGLData_DefectService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HJGLData_DefectService.cs @@ -3,8 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -29,7 +27,7 @@ namespace BLL (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && (string.IsNullOrEmpty(table.CollCropCode) || x.CollCropCode.Contains(table.CollCropCode)) && (string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName)) && - (string.IsNullOrEmpty(table.DefectName) || x.DefectName.Contains(table.DefectName)) + (string.IsNullOrEmpty(table.DefectName) || x.DefectName.Contains(table.DefectName)) select x ; @@ -49,7 +47,7 @@ namespace BLL { return null; } - // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q select new { @@ -73,7 +71,7 @@ namespace BLL { var q = from x in Funs.DB.HJGLData_Defect where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 - select x; + select x; return q.ToList(); } @@ -137,7 +135,7 @@ namespace BLL db.HJGLData_Defect.DeleteAllOnSubmit(table); db.SubmitChanges(); } - } + } } } diff --git a/SGGL/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs b/SGGL/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs index fa18ff60..dbaa0afd 100644 --- a/SGGL/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs @@ -1,13 +1,11 @@ using FineUIPro; using Model; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using Newtonsoft.Json.Linq; -using Model; -using System.Net.PeerToPeer; using System.Threading.Tasks; namespace BLL @@ -170,11 +168,11 @@ namespace BLL return GetCNCEC_16TodayHJGLData_HJGL(); } - /* var q = GetTodayData(); - if (q != null && q.State == Const.CNCEC_State_S) - data = StatisticalData(); - else - data = StatisticalData();*/ + /* var q = GetTodayData(); + if (q != null && q.State == Const.CNCEC_State_S) + data = StatisticalData(); + else + data = StatisticalData();*/ var modelTask = StatisticalDataAsync(); var model = await modelTask; @@ -335,8 +333,8 @@ namespace BLL var welderNum = await welderNumTask; var dineInfoList = await dineInfoListTask; var chCheckItemList = await chCheckItemListTask; - - + + var table = new HJGLData_HJGL { UnitId = thisUnitId, @@ -380,7 +378,7 @@ namespace BLL // 获取达因信息 var dineInfo = dineInfoDict.TryGetValue(projectid, out var dineData) ? dineData - : new { TotalDineNum = (decimal ?)0, CompleteDineNum = (decimal?)0 }; + : new { TotalDineNum = (decimal?)0, CompleteDineNum = (decimal?)0 }; // 获取拍片信息 var chCheckItem = chCheckItemDict.TryGetValue(projectid, out var checkData) @@ -396,7 +394,7 @@ namespace BLL UnitName = baseUnit.UnitName, ReportDate = DateTime.Now.Date, WelderNum = welderCount, - TotalDineNum = Convert.ToInt32 (dineInfo.TotalDineNum), + TotalDineNum = Convert.ToInt32(dineInfo.TotalDineNum), CompleteDineNum = Convert.ToInt32(dineInfo.CompleteDineNum), TotalFilmNum = chCheckItem.TotalFilmNum, OKFilmNum = chCheckItem.OKFilmNum, @@ -464,7 +462,7 @@ namespace BLL } - + /// /// 获取焊工总数 /// @@ -508,7 +506,7 @@ namespace BLL DoneDin = g.Sum(x => x.Dia) }); return result; - } + } public static async Task> GetDineInfoAsync() { return await Task.Run(GetDineInfo); diff --git a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs index e3785929..0b97b843 100644 --- a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs @@ -1,15 +1,11 @@ -using System; +using FineUIPro; +using Model; +using Newtonsoft.Json; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Runtime.InteropServices.ComTypes; -using System.Runtime.Remoting.Contexts; using System.Threading.Tasks; -using System.Web.UI.WebControls; -using Aspose.Words.Lists; -using FineUIPro; -using Model; -using Newtonsoft.Json; namespace BLL { diff --git a/SGGL/BLL/ZHGL/DataSync/HSSEData_HiddenDangerDetailService.cs b/SGGL/BLL/ZHGL/DataSync/HSSEData_HiddenDangerDetailService.cs index 6fbe9796..0e9aab51 100644 --- a/SGGL/BLL/ZHGL/DataSync/HSSEData_HiddenDangerDetailService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HSSEData_HiddenDangerDetailService.cs @@ -3,8 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -29,7 +27,7 @@ namespace BLL (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && (string.IsNullOrEmpty(table.CollCropCode) || x.CollCropCode.Contains(table.CollCropCode)) && (string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName)) && - (string.IsNullOrEmpty(table.TypeName) || x.TypeName.Contains(table.TypeName)) + (string.IsNullOrEmpty(table.TypeName) || x.TypeName.Contains(table.TypeName)) select x ; @@ -49,7 +47,7 @@ namespace BLL { return null; } - // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q select new { diff --git a/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs b/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs index d397e718..489ae494 100644 --- a/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs +++ b/SGGL/BLL/ZHGL/DataSync/Hazard_RealTimeDeviceService.cs @@ -3,8 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -59,7 +57,7 @@ namespace BLL (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && (string.IsNullOrEmpty(table.Value) || x.Value.Contains(table.Value)) && (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) && - (string.IsNullOrEmpty(table.ReceiveDate) || x.ReceiveDate.Contains(table.ReceiveDate)) + (string.IsNullOrEmpty(table.ReceiveDate) || x.ReceiveDate.Contains(table.ReceiveDate)) select x ; diff --git a/SGGL/BLL/ZHGL/DataSync/LotAPIService.cs b/SGGL/BLL/ZHGL/DataSync/LotAPIService.cs index d5ab1821..5fc56299 100644 --- a/SGGL/BLL/ZHGL/DataSync/LotAPIService.cs +++ b/SGGL/BLL/ZHGL/DataSync/LotAPIService.cs @@ -1,13 +1,9 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { public class LotAPIService - { + { /// /// 保存环境监测 /// diff --git a/SGGL/BLL/ZHGL/DataSync/MainSevice.cs b/SGGL/BLL/ZHGL/DataSync/MainSevice.cs index 220e857b..1cc69144 100644 --- a/SGGL/BLL/ZHGL/DataSync/MainSevice.cs +++ b/SGGL/BLL/ZHGL/DataSync/MainSevice.cs @@ -4,320 +4,321 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -namespace BLL { - -public class MainSevice +namespace BLL { - /// - /// 在建项目集合 - /// - private List _beUnderConstructionList; - private HSSEData_HSSE _hsseData; - private string _unitId; - private int _unitType; - - public MainSevice(string userid) + public class MainSevice { - var userModel = Person_PersonsService.GetPerson_PersonsById(userid); - int unitType = CommonService.GetUnitTypeByUserId(userid); - var projectList = ProjectService.GetProjectWorkList().Select(x => new { x.ProjectId, x.UnitId }).ToList(); - _unitId = userModel.UnitId; - _unitType = unitType; - if (unitType == 0) - { - _beUnderConstructionList = projectList.Select(x => x.ProjectId).ToList(); - _unitId = BLL.Const.UnitId_SEDIN; - } - else if (unitType == 1) - { - _beUnderConstructionList = projectList.Where(x => x.UnitId == userModel.UnitId).Select(x => x.ProjectId).ToList(); - } - else if (unitType == 2) - { - _beUnderConstructionList = new List() { "0" }; - } - } - public async Task GetHsseDataAsync() - { + /// + /// 在建项目集合 + /// + private List _beUnderConstructionList; + private HSSEData_HSSE _hsseData; + private string _unitId; + private int _unitType; + + public MainSevice(string userid) + { + var userModel = Person_PersonsService.GetPerson_PersonsById(userid); + int unitType = CommonService.GetUnitTypeByUserId(userid); + var projectList = ProjectService.GetProjectWorkList().Select(x => new { x.ProjectId, x.UnitId }).ToList(); + _unitId = userModel.UnitId; + _unitType = unitType; + if (unitType == 0) + { + _beUnderConstructionList = projectList.Select(x => x.ProjectId).ToList(); + _unitId = BLL.Const.UnitId_SEDIN; + } + else if (unitType == 1) + { + _beUnderConstructionList = projectList.Where(x => x.UnitId == userModel.UnitId).Select(x => x.ProjectId).ToList(); + } + else if (unitType == 2) + { + _beUnderConstructionList = new List() { "0" }; + } + + } + public async Task GetHsseDataAsync() + { try { - - // 并行执行异步方法 - var totalEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption(); - var incomeComprehensiveEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption(); - var newWaterConsumptionTask = ChemicalReportItemService.GetLatstTimeNewWaterConsumption(); - var securityRiskOutputListTask = HSSEData_HSSEService.GetSecurityRiskOutputsAsync() - .ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId))); - var largeEngineeringOutputsTask = HSSEData_HSSEService.GetLargeEngineeringOutputsAsync() - .ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId))); - var safetyInjectionEngineerTask = HSSEData_HSSEService.GetSafetyInjectionEngineerAsync(); - var certificateATask = HSSEData_HSSEService.GetCertificateAAsync(); - var certificateBTask = HSSEData_HSSEService.GetCertificateBAsync(); - var certificateCTask = HSSEData_HSSEService.GetCertificateCAsync(); - var beUnderConstructionTask = HSSEData_HSSEService.GetBeUnderConstructionAsync(); - var shutdownTask = HSSEData_HSSEService.GetShutdownAsync(); - var joinConstructionPersonTask = HSSEData_HSSEService.GetJoinConstructionPersonAsync(); - var majorProjectsUnderConstructionTask = HSSEData_HSSEService.GetMajorProjectsUnderConstructionAsync(); - var totalWorkingHourTask = HSSEData_HSSEService.GetTotalWorkingHourAsync(); - var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync(); - var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync(); - var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync(); - var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync(); - var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync(); - var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync(); - var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync(); - var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync(); - var branchFullTimeTask = HSSEData_HSSEService.GetBranchFullTimeAsync(); - var projectInspectorGeneralTask = HSSEData_HSSEService.GetProjectInspectorGeneralAsync(); - var projectFullTimeTask = HSSEData_HSSEService.GetProjectFullTimeAsync(); - var projectSafetyMonitorTask = HSSEData_HSSEService.GetProjectSafetyMonitorAsync(); - var safetyCommitteeMeetingTask = HSSEData_HSSEService.GetSafetyCommitteeMeetingAsync(); - var enterpriseTopicsMeetingTask = HSSEData_HSSEService.GetEnterpriseTopicsMeetingAsync(); - var projectSafetyLeadingGroupMeetingTask = HSSEData_HSSEService.GetProjectSafetyLeadingGroupMeetingAsync(); - var projectSafetyMeetingTask = HSSEData_HSSEService.GetProjectSafetyMeetingAsync(); - var companyLeadShiftCheckTask = HSSEData_HSSEService.GetCompanyLeadShiftCheckAsync(); - var companyComprehensiveCheckTask = HSSEData_HSSEService.GetCompanyComprehensiveCheckAsync(); - var companySpecialCheckTask = HSSEData_HSSEService.GetCompanySpecialCheckAsync(); - var projectLeadShiftCheckTask = HSSEData_HSSEService.GetProjectLeadShiftCheckAsync(); - var projectSpecialCheckTask = HSSEData_HSSEService.GetProjectSpecialCheckAsync(); - var projectMajorCheckTask = HSSEData_HSSEService.GetProjectMajorCheckAsync(); - var nearMissTask = HSSEData_HSSEService.GetNearMissAsync(); - var recordableEventTask = HSSEData_HSSEService.GetRecordableEventAsync(); - var generalAccidentTask = HSSEData_HSSEService.GetGeneralAccidentAsync(); - var majorAccidentTask = HSSEData_HSSEService.GetMajorAccidentAsync(); - var seriousAccidentTask = HSSEData_HSSEService.GetSeriousAccidentAsync(); - var specialSeriousAccidentTask = HSSEData_HSSEService.GetSpecialSeriousAccidentAsync(); - var companyComprehensivePlanTask = HSSEData_HSSEService.GetCompanyComprehensivePlanAsync(); - var companySpecialPlanTask = HSSEData_HSSEService.GetCompanySpecialPlanAsync(); - var companyOnSiteDisposalPlanTask = HSSEData_HSSEService.GetCompanyOnSiteDisposalPlanAsync(); - var companyDrillTask = HSSEData_HSSEService.GetCompanyDrillAsync(); - var projectComprehensivePlanTask = HSSEData_HSSEService.GetProjectComprehensivePlanAsync(); - var projectSpecialPlanTask = HSSEData_HSSEService.GetProjectSpecialPlanAsync(); - var projectOnSiteDisposalPlanTask = HSSEData_HSSEService.GetProjectOnSiteDisposalPlanAsync(); - var projectDrillTask = HSSEData_HSSEService.GetProjectDrillAsync(); - var costExtractTask = HSSEData_HSSEService.GetCostExtractAsync(); - var costUseTask = HSSEData_HSSEService.GetCostUseAsync(); - var useEquipmentTask = HSSEData_HSSEService.GetUseEquipmentAsync(); - var specialEquipmentTask = HSSEData_HSSEService.GetSpecialEquipmentAsync(); - var licensesTask = HSSEData_HSSEService.GetLicensesAsync(); - var licensesCloseTask = HSSEData_HSSEService.GetLicensesCloseAsync(); - var generalHiddenRectificationOutputsTask = HSSEData_HSSEService.GetGeneralHiddenRectificationOutputsAsync(); - var majorHiddenRectificationOutputsTask = HSSEData_HSSEService.GetMajorHiddenRectificationOutputsAsync(); - // 等待所有异步方法执行完成 - await Task.WhenAll( - securityRiskOutputListTask, - largeEngineeringOutputsTask, - safetyInjectionEngineerTask, - certificateATask, - certificateBTask, - certificateCTask, - beUnderConstructionTask, - shutdownTask, - joinConstructionPersonTask, - majorProjectsUnderConstructionTask, - totalWorkingHourTask, - lostWorkingHourTask, - safeWorkingHourTask, - safeTrainTask, - specialTrainTask, - specialOperationTrainTask, - headOfficeInspectorGeneralTask, - headOfficeFullTimeTask, - branchInspectorGeneralTask, - branchFullTimeTask, - projectInspectorGeneralTask, - projectFullTimeTask, - projectSafetyMonitorTask, - safetyCommitteeMeetingTask, - enterpriseTopicsMeetingTask, - projectSafetyLeadingGroupMeetingTask, - projectSafetyMeetingTask, - companyLeadShiftCheckTask, - companyComprehensiveCheckTask, - companySpecialCheckTask, - projectLeadShiftCheckTask, - projectSpecialCheckTask, - projectMajorCheckTask, - nearMissTask, - recordableEventTask, - generalAccidentTask, - majorAccidentTask, - seriousAccidentTask, - specialSeriousAccidentTask, - companyComprehensivePlanTask, - companySpecialPlanTask, - companyOnSiteDisposalPlanTask, - companyDrillTask, - projectComprehensivePlanTask, - projectSpecialPlanTask, - projectOnSiteDisposalPlanTask, - projectDrillTask, - costExtractTask, - costUseTask, - useEquipmentTask, - specialEquipmentTask, - licensesTask, - licensesCloseTask, - generalHiddenRectificationOutputsTask, - majorHiddenRectificationOutputsTask - ); + // 并行执行异步方法 + var totalEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption(); + var incomeComprehensiveEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption(); + var newWaterConsumptionTask = ChemicalReportItemService.GetLatstTimeNewWaterConsumption(); + var securityRiskOutputListTask = HSSEData_HSSEService.GetSecurityRiskOutputsAsync() + .ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId))); + var largeEngineeringOutputsTask = HSSEData_HSSEService.GetLargeEngineeringOutputsAsync() + .ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId))); + var safetyInjectionEngineerTask = HSSEData_HSSEService.GetSafetyInjectionEngineerAsync(); + var certificateATask = HSSEData_HSSEService.GetCertificateAAsync(); + var certificateBTask = HSSEData_HSSEService.GetCertificateBAsync(); + var certificateCTask = HSSEData_HSSEService.GetCertificateCAsync(); + var beUnderConstructionTask = HSSEData_HSSEService.GetBeUnderConstructionAsync(); + var shutdownTask = HSSEData_HSSEService.GetShutdownAsync(); + var joinConstructionPersonTask = HSSEData_HSSEService.GetJoinConstructionPersonAsync(); + var majorProjectsUnderConstructionTask = HSSEData_HSSEService.GetMajorProjectsUnderConstructionAsync(); + var totalWorkingHourTask = HSSEData_HSSEService.GetTotalWorkingHourAsync(); + var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync(); + var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync(); + var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync(); + var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync(); + var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync(); + var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync(); + var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync(); + var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync(); + var branchFullTimeTask = HSSEData_HSSEService.GetBranchFullTimeAsync(); + var projectInspectorGeneralTask = HSSEData_HSSEService.GetProjectInspectorGeneralAsync(); + var projectFullTimeTask = HSSEData_HSSEService.GetProjectFullTimeAsync(); + var projectSafetyMonitorTask = HSSEData_HSSEService.GetProjectSafetyMonitorAsync(); + var safetyCommitteeMeetingTask = HSSEData_HSSEService.GetSafetyCommitteeMeetingAsync(); + var enterpriseTopicsMeetingTask = HSSEData_HSSEService.GetEnterpriseTopicsMeetingAsync(); + var projectSafetyLeadingGroupMeetingTask = HSSEData_HSSEService.GetProjectSafetyLeadingGroupMeetingAsync(); + var projectSafetyMeetingTask = HSSEData_HSSEService.GetProjectSafetyMeetingAsync(); + var companyLeadShiftCheckTask = HSSEData_HSSEService.GetCompanyLeadShiftCheckAsync(); + var companyComprehensiveCheckTask = HSSEData_HSSEService.GetCompanyComprehensiveCheckAsync(); + var companySpecialCheckTask = HSSEData_HSSEService.GetCompanySpecialCheckAsync(); + var projectLeadShiftCheckTask = HSSEData_HSSEService.GetProjectLeadShiftCheckAsync(); + var projectSpecialCheckTask = HSSEData_HSSEService.GetProjectSpecialCheckAsync(); + var projectMajorCheckTask = HSSEData_HSSEService.GetProjectMajorCheckAsync(); + var nearMissTask = HSSEData_HSSEService.GetNearMissAsync(); + var recordableEventTask = HSSEData_HSSEService.GetRecordableEventAsync(); + var generalAccidentTask = HSSEData_HSSEService.GetGeneralAccidentAsync(); + var majorAccidentTask = HSSEData_HSSEService.GetMajorAccidentAsync(); + var seriousAccidentTask = HSSEData_HSSEService.GetSeriousAccidentAsync(); + var specialSeriousAccidentTask = HSSEData_HSSEService.GetSpecialSeriousAccidentAsync(); + var companyComprehensivePlanTask = HSSEData_HSSEService.GetCompanyComprehensivePlanAsync(); + var companySpecialPlanTask = HSSEData_HSSEService.GetCompanySpecialPlanAsync(); + var companyOnSiteDisposalPlanTask = HSSEData_HSSEService.GetCompanyOnSiteDisposalPlanAsync(); + var companyDrillTask = HSSEData_HSSEService.GetCompanyDrillAsync(); + var projectComprehensivePlanTask = HSSEData_HSSEService.GetProjectComprehensivePlanAsync(); + var projectSpecialPlanTask = HSSEData_HSSEService.GetProjectSpecialPlanAsync(); + var projectOnSiteDisposalPlanTask = HSSEData_HSSEService.GetProjectOnSiteDisposalPlanAsync(); + var projectDrillTask = HSSEData_HSSEService.GetProjectDrillAsync(); + var costExtractTask = HSSEData_HSSEService.GetCostExtractAsync(); + var costUseTask = HSSEData_HSSEService.GetCostUseAsync(); + var useEquipmentTask = HSSEData_HSSEService.GetUseEquipmentAsync(); + var specialEquipmentTask = HSSEData_HSSEService.GetSpecialEquipmentAsync(); + var licensesTask = HSSEData_HSSEService.GetLicensesAsync(); + var licensesCloseTask = HSSEData_HSSEService.GetLicensesCloseAsync(); + var generalHiddenRectificationOutputsTask = HSSEData_HSSEService.GetGeneralHiddenRectificationOutputsAsync(); + var majorHiddenRectificationOutputsTask = HSSEData_HSSEService.GetMajorHiddenRectificationOutputsAsync(); + + // 等待所有异步方法执行完成 + await Task.WhenAll( + securityRiskOutputListTask, + largeEngineeringOutputsTask, + safetyInjectionEngineerTask, + certificateATask, + certificateBTask, + certificateCTask, + beUnderConstructionTask, + shutdownTask, + joinConstructionPersonTask, + majorProjectsUnderConstructionTask, + totalWorkingHourTask, + lostWorkingHourTask, + safeWorkingHourTask, + safeTrainTask, + specialTrainTask, + specialOperationTrainTask, + headOfficeInspectorGeneralTask, + headOfficeFullTimeTask, + branchInspectorGeneralTask, + branchFullTimeTask, + projectInspectorGeneralTask, + projectFullTimeTask, + projectSafetyMonitorTask, + safetyCommitteeMeetingTask, + enterpriseTopicsMeetingTask, + projectSafetyLeadingGroupMeetingTask, + projectSafetyMeetingTask, + companyLeadShiftCheckTask, + companyComprehensiveCheckTask, + companySpecialCheckTask, + projectLeadShiftCheckTask, + projectSpecialCheckTask, + projectMajorCheckTask, + nearMissTask, + recordableEventTask, + generalAccidentTask, + majorAccidentTask, + seriousAccidentTask, + specialSeriousAccidentTask, + companyComprehensivePlanTask, + companySpecialPlanTask, + companyOnSiteDisposalPlanTask, + companyDrillTask, + projectComprehensivePlanTask, + projectSpecialPlanTask, + projectOnSiteDisposalPlanTask, + projectDrillTask, + costExtractTask, + costUseTask, + useEquipmentTask, + specialEquipmentTask, + licensesTask, + licensesCloseTask, + generalHiddenRectificationOutputsTask, + majorHiddenRectificationOutputsTask + ); - // 统一获取异步方法的返回值 - var totalEnergyConsumption = totalEnergyConsumptionTask; - var incomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumptionTask; - var newWaterConsumption = newWaterConsumptionTask; - var safetyInjectionEngineerList = await safetyInjectionEngineerTask; - var certificateAList = await certificateATask; - var certificateBList = await certificateBTask; - var certificateCList = await certificateCTask; - var beUnderConstructionList = await beUnderConstructionTask; - var shutdownList = await shutdownTask; - var joinConstructionPersonList = await joinConstructionPersonTask; - var majorProjectsUnderConstructionList = await majorProjectsUnderConstructionTask; - var totalWorkingHour = await totalWorkingHourTask; - var lostWorkingHour = await lostWorkingHourTask; - var safeWorkingHour = await safeWorkingHourTask; - var safeTrainList = await safeTrainTask; - var specialTrainList = await specialTrainTask; - var specialOperationTrainList = await specialOperationTrainTask; - var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask; - var headOfficeFullTimeList = await headOfficeFullTimeTask; - var branchInspectorGeneralList = await branchInspectorGeneralTask; - var branchFullTimeList = await branchFullTimeTask; - var projectInspectorGeneralList = await projectInspectorGeneralTask; - var projectFullTimeList = await projectFullTimeTask; - var projectSafetyMonitorList = await projectSafetyMonitorTask; - var safetyCommitteeMeetingList = await safetyCommitteeMeetingTask; - var enterpriseTopicsMeetingList = await enterpriseTopicsMeetingTask; - var projectSafetyLeadingGroupMeetingList = await projectSafetyLeadingGroupMeetingTask; - var projectSafetyMeetingList = await projectSafetyMeetingTask; - var companyLeadShiftCheckList = await companyLeadShiftCheckTask; - var companyComprehensiveCheckList = await companyComprehensiveCheckTask; - var companySpecialCheckList = await companySpecialCheckTask; - var projectLeadShiftCheckList = await projectLeadShiftCheckTask; - var projectSpecialCheckList = await projectSpecialCheckTask; - var projectMajorCheckList = await projectMajorCheckTask; - var nearMissList = await nearMissTask; - var recordableEventList = await recordableEventTask; - var generalAccidentList = await generalAccidentTask; - var majorAccidentList = await majorAccidentTask; - var seriousAccidentList = await seriousAccidentTask; - var specialSeriousAccidentList = await specialSeriousAccidentTask; - var companyComprehensivePlanList = await companyComprehensivePlanTask; - var companySpecialPlanList = await companySpecialPlanTask; - var companyOnSiteDisposalPlanList = await companyOnSiteDisposalPlanTask; - var companyDrillList = await companyDrillTask; - var projectComprehensivePlanList = await projectComprehensivePlanTask; - var projectSpecialPlanList = await projectSpecialPlanTask; - var projectOnSiteDisposalPlanList = await projectOnSiteDisposalPlanTask; - var projectDrillList = await projectDrillTask; - var costExtractList = await costExtractTask; - var costUseList = await costUseTask; - var useEquipmentList = await useEquipmentTask; - var specialEquipmentList = await specialEquipmentTask; - var licensesList = await licensesTask; - var licensesCloseList = await licensesCloseTask; - var generalHiddenRectificationOutputsList = await generalHiddenRectificationOutputsTask; - var majorHiddenRectificationOutputsList = await majorHiddenRectificationOutputsTask; + // 统一获取异步方法的返回值 + var totalEnergyConsumption = totalEnergyConsumptionTask; + var incomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumptionTask; + var newWaterConsumption = newWaterConsumptionTask; + var safetyInjectionEngineerList = await safetyInjectionEngineerTask; + var certificateAList = await certificateATask; + var certificateBList = await certificateBTask; + var certificateCList = await certificateCTask; + var beUnderConstructionList = await beUnderConstructionTask; + var shutdownList = await shutdownTask; + var joinConstructionPersonList = await joinConstructionPersonTask; + var majorProjectsUnderConstructionList = await majorProjectsUnderConstructionTask; + var totalWorkingHour = await totalWorkingHourTask; + var lostWorkingHour = await lostWorkingHourTask; + var safeWorkingHour = await safeWorkingHourTask; + var safeTrainList = await safeTrainTask; + var specialTrainList = await specialTrainTask; + var specialOperationTrainList = await specialOperationTrainTask; + var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask; + var headOfficeFullTimeList = await headOfficeFullTimeTask; + var branchInspectorGeneralList = await branchInspectorGeneralTask; + var branchFullTimeList = await branchFullTimeTask; + var projectInspectorGeneralList = await projectInspectorGeneralTask; + var projectFullTimeList = await projectFullTimeTask; + var projectSafetyMonitorList = await projectSafetyMonitorTask; + var safetyCommitteeMeetingList = await safetyCommitteeMeetingTask; + var enterpriseTopicsMeetingList = await enterpriseTopicsMeetingTask; + var projectSafetyLeadingGroupMeetingList = await projectSafetyLeadingGroupMeetingTask; + var projectSafetyMeetingList = await projectSafetyMeetingTask; + var companyLeadShiftCheckList = await companyLeadShiftCheckTask; + var companyComprehensiveCheckList = await companyComprehensiveCheckTask; + var companySpecialCheckList = await companySpecialCheckTask; + var projectLeadShiftCheckList = await projectLeadShiftCheckTask; + var projectSpecialCheckList = await projectSpecialCheckTask; + var projectMajorCheckList = await projectMajorCheckTask; + var nearMissList = await nearMissTask; + var recordableEventList = await recordableEventTask; + var generalAccidentList = await generalAccidentTask; + var majorAccidentList = await majorAccidentTask; + var seriousAccidentList = await seriousAccidentTask; + var specialSeriousAccidentList = await specialSeriousAccidentTask; + var companyComprehensivePlanList = await companyComprehensivePlanTask; + var companySpecialPlanList = await companySpecialPlanTask; + var companyOnSiteDisposalPlanList = await companyOnSiteDisposalPlanTask; + var companyDrillList = await companyDrillTask; + var projectComprehensivePlanList = await projectComprehensivePlanTask; + var projectSpecialPlanList = await projectSpecialPlanTask; + var projectOnSiteDisposalPlanList = await projectOnSiteDisposalPlanTask; + var projectDrillList = await projectDrillTask; + var costExtractList = await costExtractTask; + var costUseList = await costUseTask; + var useEquipmentList = await useEquipmentTask; + var specialEquipmentList = await specialEquipmentTask; + var licensesList = await licensesTask; + var licensesCloseList = await licensesCloseTask; + var generalHiddenRectificationOutputsList = await generalHiddenRectificationOutputsTask; + var majorHiddenRectificationOutputsList = await majorHiddenRectificationOutputsTask; - // 构造结果对象 - var table = new HSSEData_HSSE - { - JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - TotalWorkingHour = totalWorkingHour, - LostWorkingHour = lostWorkingHour, - SafeWorkingHour = safeWorkingHour, - SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum), - SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum), - SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum), - EnvironmentalTrainNum = 0, - TotalEnergyConsumption = totalEnergyConsumption, - IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption, - NewWaterConsumption = newWaterConsumption, - HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count(), - HeadOfficeFullTimeNum = headOfficeFullTimeList.Count, - BranchInspectorGeneralNum = branchInspectorGeneralList.Count, - BranchFullTimeNum = branchFullTimeList.Count, - ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId), - CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId), - CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId), - CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId)), - ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)), - CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)), - UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), - GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum), - GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum), - MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum), - MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum), - LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum), - GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum), - MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum), - HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum), - CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum), - TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum), - ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum), - FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum), - SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum), - SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum), - SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum) - }; + // 构造结果对象 + var table = new HSSEData_HSSE + { + JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + TotalWorkingHour = totalWorkingHour, + LostWorkingHour = lostWorkingHour, + SafeWorkingHour = safeWorkingHour, + SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum), + SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum), + SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum), + EnvironmentalTrainNum = 0, + TotalEnergyConsumption = totalEnergyConsumption, + IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption, + NewWaterConsumption = newWaterConsumption, + HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count(), + HeadOfficeFullTimeNum = headOfficeFullTimeList.Count, + BranchInspectorGeneralNum = branchInspectorGeneralList.Count, + BranchFullTimeNum = branchFullTimeList.Count, + ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId), + CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId), + CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId), + CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId)), + ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)), + CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)), + UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)), + GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum), + GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum), + MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum), + MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum), + LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum), + GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum), + MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum), + HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum), + CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum), + TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum), + ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum), + FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum), + SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum), + SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum), + SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum) + }; - if (_unitType == 0) - { - table.BeUnderConstructionNum = beUnderConstructionList.Count(); - table.ShutdownNum = shutdownList.Count(); - table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(); - table.EnterpriseTopicsMeetingNum = enterpriseTopicsMeetingList.Count(); - table.CertificateANum = certificateAList.Count(); - table.CertificateBNum = certificateBList.Count(); - table.CertificateCNum = certificateCList.Count(); - table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(); + if (_unitType == 0) + { + table.BeUnderConstructionNum = beUnderConstructionList.Count(); + table.ShutdownNum = shutdownList.Count(); + table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(); + table.EnterpriseTopicsMeetingNum = enterpriseTopicsMeetingList.Count(); + table.CertificateANum = certificateAList.Count(); + table.CertificateBNum = certificateBList.Count(); + table.CertificateCNum = certificateCList.Count(); + table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(); - } - else if (_unitType == 1) - { - table.BeUnderConstructionNum = beUnderConstructionList.Count(x => x.UnitId == _unitId); - table.ShutdownNum = shutdownList.Count(x => x.UnitId == _unitId); - table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(x => x.UnitId == _unitId); - table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); - table.EnterpriseTopicsMeetingNum = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); - table.CertificateANum = certificateAList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); - table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); - table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); - } + } + else if (_unitType == 1) + { + table.BeUnderConstructionNum = beUnderConstructionList.Count(x => x.UnitId == _unitId); + table.ShutdownNum = shutdownList.Count(x => x.UnitId == _unitId); + table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(x => x.UnitId == _unitId); + table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); + table.EnterpriseTopicsMeetingNum = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); + table.CertificateANum = certificateAList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); + table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); + table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId); + } - _hsseData = table; - return _hsseData; + _hsseData = table; + return _hsseData; } catch (Exception ex) { @@ -326,35 +327,36 @@ public class MainSevice } } - public List GetDataHiddenDangerDetailItems() - { - var db = Funs.DB; - var list = from x in db.HSSE_Hazard_HazardRegister - where _beUnderConstructionList.Contains(x.ProjectId) - select x; - var data = (from x in list - join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId - group x by new - { x.ProjectId, x.RegisterTypesId, y.RegisterTypesName } - into g - select new - { - UnitId = _unitId, - ProjectId = g.Key.ProjectId, - TypeName = g.Key.RegisterTypesName, - TotalNum = g.Count(), - NeedRectifyNum = g.Count(x => x.States == "1"), - }).ToList(); + public List GetDataHiddenDangerDetailItems() + { + var db = Funs.DB; + var list = from x in db.HSSE_Hazard_HazardRegister + where _beUnderConstructionList.Contains(x.ProjectId) + select x; + var data = (from x in list + join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId + group x by new + { x.ProjectId, x.RegisterTypesId, y.RegisterTypesName } + into g + select new + { + UnitId = _unitId, + ProjectId = g.Key.ProjectId, + TypeName = g.Key.RegisterTypesName, + TotalNum = g.Count(), + NeedRectifyNum = g.Count(x => x.States == "1"), + }).ToList(); - var result = (from x in data - group x by x.TypeName into g - select new Model.HSSEDataHiddenDangerDetailItem - { - Id = SQLHelper.GetNewID(), - TypeName = g.Key, - NeedRectifyNum = g.Sum(p => p.NeedRectifyNum), - TotalNum = g.Sum(p => p.TotalNum) - }).ToList(); - return result; + var result = (from x in data + group x by x.TypeName into g + select new Model.HSSEDataHiddenDangerDetailItem + { + Id = SQLHelper.GetNewID(), + TypeName = g.Key, + NeedRectifyNum = g.Sum(p => p.NeedRectifyNum), + TotalNum = g.Sum(p => p.TotalNum) + }).ToList(); + return result; + } } -} } \ No newline at end of file +} \ No newline at end of file diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs index 52844020..fa35ce2d 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs @@ -1,11 +1,9 @@ using FineUIPro; -using NPOI.SS.Formula.Functions; +using Model; using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL { @@ -49,17 +47,17 @@ namespace BLL if (count == 0) return null; // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q - select new - { - x.Id, - x.ProjectId, - x.UnitId, - x.CollCropCode, - x.UnitName, - x.ReportDate, - x.DefectName, - x.DefectNum - }; + select new + { + x.Id, + x.ProjectId, + x.UnitId, + x.CollCropCode, + x.UnitName, + x.ReportDate, + x.DefectName, + x.DefectNum + }; } #endregion @@ -79,8 +77,8 @@ namespace BLL string projectid) { var q = from x in db.Project_HJGLData_Defect - where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid - select x; + where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid + select x; return q.ToList(); } @@ -183,9 +181,9 @@ namespace BLL { var result = false; var q = (from x in Funs.DB.Project_HJGLData_Defect - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date && - x.ProjectId == projectid && x.DefectName == type - select x).ToList(); + where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date && + x.ProjectId == projectid && x.DefectName == type + select x).ToList(); if (q != null && q.Count > 0) result = true; return result; } @@ -198,24 +196,24 @@ namespace BLL public static Project_HJGLData_Defect getTodayProject_HJGLData_Defect(string projectid, string type) { var q = (from x in Funs.DB.Project_HJGLData_Defect - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date && - x.ProjectId == projectid && x.DefectName == type - select x).FirstOrDefault(); + where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date && + x.ProjectId == projectid && x.DefectName == type + select x).FirstOrDefault(); return q; } public static List getTodayProject_HJGLData_Defect() { var q = (from x in Funs.DB.Project_HJGLData_Defect - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date - group x by x.DefectName + where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date + group x by x.DefectName into g - select new HJGLDataDefectItems - { - Id = SQLHelper.GetNewID(), - DefectName = g.Key, - DefectNum = g.Sum(p => p.DefectNum) - }).ToList(); + select new HJGLDataDefectItems + { + Id = SQLHelper.GetNewID(), + DefectName = g.Key, + DefectNum = g.Sum(p => p.DefectNum) + }).ToList(); return q; } public static List GetModelByUnitIdAndReportDate(string Unitid, DateTime? reportdate) @@ -226,33 +224,33 @@ namespace BLL } var projectlist = BLL.ProjectService.GetProjectWorkList(); var q = (from x in Funs.DB.Project_HJGLData_Defect - where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId) + where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId) group x by x.DefectName into g - select new HJGLDataDefectItems - { - Id = SQLHelper.GetNewID(), - DefectName = g.Key, - DefectNum = g.Sum(p => p.DefectNum) - }).ToList(); + select new HJGLDataDefectItems + { + Id = SQLHelper.GetNewID(), + DefectName = g.Key, + DefectNum = g.Sum(p => p.DefectNum) + }).ToList(); return q; } - public static List GetModelByReportDate( DateTime? reportdate) + public static List GetModelByReportDate(DateTime? reportdate) { if (!reportdate.HasValue) { return new List(); } var q = (from x in Funs.DB.Project_HJGLData_Defect - where x.ReportDate == reportdate - group x by x.DefectName + where x.ReportDate == reportdate + group x by x.DefectName into g - select new HJGLDataDefectItems - { - Id = SQLHelper.GetNewID(), - DefectName = g.Key, - DefectNum = g.Sum(p => p.DefectNum) - }).ToList(); + select new HJGLDataDefectItems + { + Id = SQLHelper.GetNewID(), + DefectName = g.Key, + DefectNum = g.Sum(p => p.DefectNum) + }).ToList(); return q; } /// diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs index f31d647f..2a9e2f39 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs @@ -1,13 +1,10 @@ using FineUIPro; +using Model; +using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; -using RestSharp; -using Newtonsoft.Json; -using static BLL.Project_CQMSDataService; namespace BLL { diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs index e8c23fbb..e5b69beb 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs @@ -1,10 +1,10 @@ -using System; +using FineUIPro; +using Model; +using Newtonsoft.Json; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using FineUIPro; -using Model; -using Newtonsoft.Json; namespace BLL { @@ -1334,12 +1334,12 @@ namespace BLL { var result = (from x in Funs.DB.InApproveManager_EquipmentInItem join y in Funs.DB.InApproveManager_EquipmentIn on x.EquipmentInId equals y.EquipmentInId - where y.ProjectId == projectid + where y.ProjectId == projectid select x).Count() + (from x in Funs.DB.InApproveManager_GeneralEquipmentInItem join y in Funs.DB.InApproveManager_GeneralEquipmentIn on x.GeneralEquipmentInId equals y .GeneralEquipmentInId - where y.ProjectId == projectid + where y.ProjectId == projectid select x).Count(); return result; } @@ -1352,7 +1352,7 @@ namespace BLL { var result = (from x in Funs.DB.InApproveManager_EquipmentInItem join y in Funs.DB.InApproveManager_EquipmentIn on x.EquipmentInId equals y.EquipmentInId - where y.ProjectId == projectid + where y.ProjectId == projectid select x).Count(); return result; } @@ -1442,7 +1442,7 @@ namespace BLL { var result = (from x in Funs.DB.Hazard_HazardSelectedItem join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId - where x.ProjectId == projectid && (y.RiskLevel == 2 || x.HazardLevel == "2") && x.IsStart == true + where x.ProjectId == projectid && (y.RiskLevel == 2 || x.HazardLevel == "2") && x.IsStart == true select x).Count(); return result; } @@ -1455,7 +1455,7 @@ namespace BLL { var result = (from x in Funs.DB.Hazard_HazardSelectedItem join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId - where x.ProjectId == projectid && (y.RiskLevel == 1 || x.HazardLevel == "1") && x.IsStart == true + where x.ProjectId == projectid && (y.RiskLevel == 1 || x.HazardLevel == "1") && x.IsStart == true select x).Count(); return result; } @@ -1468,7 +1468,7 @@ namespace BLL { var result = (from x in Funs.DB.Hazard_HazardSelectedItem join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId - where x.ProjectId == projectid && (y.RiskLevel == 3 || x.HazardLevel == "3") && x.IsStart == true + where x.ProjectId == projectid && (y.RiskLevel == 3 || x.HazardLevel == "3") && x.IsStart == true select x).Count(); return result; } @@ -1481,7 +1481,7 @@ namespace BLL { var result = (from x in Funs.DB.Hazard_HazardSelectedItem join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId - where x.ProjectId == projectid && y.RiskLevel == 4 && x.IsStart == true + where x.ProjectId == projectid && y.RiskLevel == 4 && x.IsStart == true select x).Count(); return result; } @@ -1752,7 +1752,7 @@ namespace BLL where (x.IsUpdate == null || x.IsUpdate == false) && x.CheckTime > BLL.Const.DtmarkTime && x.ProblemTypes == "1" && x.ProjectState == "1" - // && x.IsBranch.Value == true + // && x.IsBranch.Value == true select new Model.Hazard_HazardRegisterItem { HazardRegisterId = x.HazardRegisterId, diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs index d76ea2fc..ad5a777a 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -112,10 +111,10 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - + db.Project_HSSEData_HiddenDangerDetail.InsertAllOnSubmit(newtables); db.SubmitChanges(); - } + } } public static void UpdateProject_HSSEData_HiddenDangerDetail(Model.Project_HSSEData_HiddenDangerDetail newtable) { @@ -172,7 +171,7 @@ namespace BLL using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var table = db.Project_HSSEData_HiddenDangerDetail.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 ); + var table = db.Project_HSSEData_HiddenDangerDetail.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); db.Project_HSSEData_HiddenDangerDetail.DeleteAllOnSubmit(table); db.SubmitChanges(); } @@ -213,14 +212,14 @@ namespace BLL public static List GetTodayModel() { var q = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date + where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date group x by x.TypeName into g select new Model.HSSEDataHiddenDangerDetailItem { Id = SQLHelper.GetNewID(), - TypeName= g.Key, - NeedRectifyNum= g.Sum(p => p.NeedRectifyNum), - TotalNum= g.Sum(p => p.TotalNum) + TypeName = g.Key, + NeedRectifyNum = g.Sum(p => p.NeedRectifyNum), + TotalNum = g.Sum(p => p.TotalNum) }).ToList(); return q; } @@ -234,15 +233,15 @@ namespace BLL { var projectlist = BLL.ProjectService.GetProjectWorkList(); var q = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail - where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId) + where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId) group x by x.TypeName into g - select new Model.HSSEDataHiddenDangerDetailItem - { - Id = SQLHelper.GetNewID(), - TypeName = g.Key, - NeedRectifyNum = g.Sum(p => p.NeedRectifyNum), - TotalNum = g.Sum(p => p.TotalNum) - }).ToList(); + select new Model.HSSEDataHiddenDangerDetailItem + { + Id = SQLHelper.GetNewID(), + TypeName = g.Key, + NeedRectifyNum = g.Sum(p => p.NeedRectifyNum), + TotalNum = g.Sum(p => p.TotalNum) + }).ToList(); return q; } /// @@ -250,24 +249,24 @@ namespace BLL /// /// /// - public static List GetModelByReportDate( DateTime? reportdate) + public static List GetModelByReportDate(DateTime? reportdate) { var q = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail - where x.ReportDate == reportdate - group x by x.TypeName into g - select new Model.HSSEDataHiddenDangerDetailItem - { - Id = SQLHelper.GetNewID(), - TypeName = g.Key, - NeedRectifyNum = g.Sum(p => p.NeedRectifyNum), - TotalNum = g.Sum(p => p.TotalNum) - }).ToList(); + where x.ReportDate == reportdate + group x by x.TypeName into g + select new Model.HSSEDataHiddenDangerDetailItem + { + Id = SQLHelper.GetNewID(), + TypeName = g.Key, + NeedRectifyNum = g.Sum(p => p.NeedRectifyNum), + TotalNum = g.Sum(p => p.TotalNum) + }).ToList(); return q; } - public static List GetModelByReportDate(DateTime? reportdate,string projectid) + public static List GetModelByReportDate(DateTime? reportdate, string projectid) { var q = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail - where x.ReportDate == reportdate && x.ProjectId==projectid + where x.ReportDate == reportdate && x.ProjectId == projectid group x by x.TypeName into g select new Model.HSSEDataHiddenDangerDetailItem { @@ -290,24 +289,25 @@ namespace BLL thisUnitId = thisUnit.UnitId; } var baseUnit = BLL.UnitService.GetUnitByUnitId(thisUnitId); - var list = from x in db.HSSE_Hazard_HazardRegister where projectids.Contains(x.ProjectId) - select x; + var list = from x in db.HSSE_Hazard_HazardRegister + where projectids.Contains(x.ProjectId) + select x; var data = (from x in list - join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId - group x by new - { x.ProjectId, x.RegisterTypesId ,y.RegisterTypesName} + join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId + group x by new + { x.ProjectId, x.RegisterTypesId, y.RegisterTypesName } into g - select new - { - UnitId = thisUnitId, - CollCropCode = baseUnit.CollCropCode, - UnitName = baseUnit.UnitName, - ProjectId= g.Key.ProjectId, - ReportDate = DateTime.Now.Date, - TypeName=g.Key.RegisterTypesName, - TotalNum = g.Count(), - NeedRectifyNum = g.Count(x => x.States == "1"), - }).ToList(); + select new + { + UnitId = thisUnitId, + CollCropCode = baseUnit.CollCropCode, + UnitName = baseUnit.UnitName, + ProjectId = g.Key.ProjectId, + ReportDate = DateTime.Now.Date, + TypeName = g.Key.RegisterTypesName, + TotalNum = g.Count(), + NeedRectifyNum = g.Count(x => x.States == "1"), + }).ToList(); DeleteProject_HSSEData_HiddenDangerDetailByDate(DateTime.Now.Date); var projectHsseDataHiddenDangerDetails = new List(); foreach (var item in data) diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEService.cs index 83402270..9eb3d552 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEService.cs @@ -3,10 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; -using Newtonsoft.Json; -using static BLL.Project_HJGLData_HJGLService; namespace BLL { @@ -56,7 +52,7 @@ namespace BLL public static int count { get; - set; + set; } public static List GetProject_SYHSEData_SYHSEByModle(Model.Project_SYHSEData_SYHSE table) { @@ -66,7 +62,7 @@ namespace BLL (string.IsNullOrEmpty(table.ProjectId) || x.Id.Contains(table.ProjectId)) && (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && (string.IsNullOrEmpty(table.CollCropCode) || x.CollCropCode.Contains(table.CollCropCode)) && - (string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName)) + (string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName)) select x ; @@ -80,13 +76,13 @@ namespace BLL /// public static IEnumerable getListData(Model.Project_SYHSEData_SYHSE table, Grid Grid1) { - var q = GetProject_SYHSEData_SYHSEByModle(table); + var q = GetProject_SYHSEData_SYHSEByModle(table); count = q.Count(); if (count == 0) { return null; } - //q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + //q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q select new { @@ -301,7 +297,7 @@ namespace BLL /// /// /// - public static void StatisticalData(string projectid,SYHSESDateType sYHSESDateType) + public static void StatisticalData(string projectid, SYHSESDateType sYHSESDateType) { string thisUnitId = string.Empty; var thisUnit = CommonService.GetIsThisUnit(); @@ -325,7 +321,7 @@ namespace BLL table.ProjectId = projectid; table.ReportDate = DateTime.Now.Date; - if (sYHSESDateType== SYHSESDateType.RiskControl || sYHSESDateType == SYHSESDateType.All) + if (sYHSESDateType == SYHSESDateType.RiskControl || sYHSESDateType == SYHSESDateType.All) { table.GeneralRiskNum = GetGeneralRiskNum(projectid); table.LowRiskNum = GetLowRiskNum(projectid); diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs index e90facda..3174d431 100644 --- a/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_DataService.cs @@ -5,7 +5,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL @@ -27,7 +26,7 @@ namespace BLL var q = from x in Funs.DB.SYHSEData_Data where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && - (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) + (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) select x ; @@ -86,31 +85,31 @@ namespace BLL } public static Model.NewSYHSEData GetItemById(string Id) { - var data=GetSYHSEData_DataById(Id); + var data = GetSYHSEData_DataById(Id); var data_realtime = HazardRealtimedeviceService.GetHazard_RealTimeDeviceByDate(data.ReportDate); - var data_hidden= SyhsedataHiddendangercheckService.GetSYHSEData_HiddenDangerCheckByDate(data.ReportDate); - var data_risk= SyhsedataRiskcontrolService.GetSYHSEData_RiskControlByDate(data.ReportDate); + var data_hidden = SyhsedataHiddendangercheckService.GetSYHSEData_HiddenDangerCheckByDate(data.ReportDate); + var data_risk = SyhsedataRiskcontrolService.GetSYHSEData_RiskControlByDate(data.ReportDate); NewSYHSEData APIData = new NewSYHSEData(); - var APIDataList_Item= new List(); - var APIDataList_Relatime= new List(); - var APIDataList_Hidden= new List(); - var APIDataList_Risk= new List(); + var APIDataList_Item = new List(); + var APIDataList_Relatime = new List(); + var APIDataList_Hidden = new List(); + var APIDataList_Risk = new List(); foreach (var tb in data_realtime) { var q = new NewSYHSEDataRealTimeDeviceItem() { - Id=tb.ID, - HazardName=tb.HazardName, - HazardLevel=tb.HazardLevel, - DeviceName=tb.DeviceName, - Medium=tb.Medium, - MeasurementUnit=tb.MeasurementUnit, - DateTime=tb.DateTime.ToString(), - Value=tb.Value, - + Id = tb.ID, + HazardName = tb.HazardName, + HazardLevel = tb.HazardLevel, + DeviceName = tb.DeviceName, + Medium = tb.Medium, + MeasurementUnit = tb.MeasurementUnit, + DateTime = tb.DateTime.ToString(), + Value = tb.Value, + }; APIDataList_Relatime.Add(q); @@ -120,10 +119,10 @@ namespace BLL { var q = new NewSYHSEDataHiddenDangerCheckItem() { - Id=tb.Id, - HiddenDangerName=tb.HiddenDangerName, - TotalNum=tb.TotalNum.HasValue ? tb.TotalNum.Value:0, - OKNum=tb.OKNum.HasValue ? tb.OKNum.Value : 0, + Id = tb.Id, + HiddenDangerName = tb.HiddenDangerName, + TotalNum = tb.TotalNum.HasValue ? tb.TotalNum.Value : 0, + OKNum = tb.OKNum.HasValue ? tb.OKNum.Value : 0, }; APIDataList_Hidden.Add(q); @@ -133,31 +132,31 @@ namespace BLL { var q = new NewSYHSEDataRiskControlItem() - { - Id=tb.Id, - RiskControlName=tb.RiskControlName, - - }; + { + Id = tb.Id, + RiskControlName = tb.RiskControlName, + + }; APIDataList_Risk.Add(q); } var thisUnit = CommonService.GetIsThisUnit(); NewSYHSEDataItem Item = new NewSYHSEDataItem(); Item.Id = data.Id; - Item.ReportDate=data.ReportDate.ToString(); + Item.ReportDate = data.ReportDate.ToString(); Item.UnitId = thisUnit.UnitId; Item.CollCropCode = thisUnit.CollCropCode; - Item.UnitName= thisUnit.UnitName; + Item.UnitName = thisUnit.UnitName; Item.FactoryId = data.FactoryId; - Item.FactoryCode = ProjectService.GetProjectByProjectId(data.FactoryId).ProjectCode; + Item.FactoryCode = ProjectService.GetProjectByProjectId(data.FactoryId).ProjectCode; Item.FactoryName = ProjectService.GetProjectByProjectId(data.FactoryId).ProjectName; Item.Address = ProjectService.GetProjectByProjectId(data.FactoryId).ProjectAddress; - Item.MapCoordinates= ProjectService.GetProjectByProjectId(data.FactoryId).MapCoordinates; - Item.SafetyMnaHours = data.SafetyMnaHours.HasValue ? data.SafetyMnaHours.Value : 0; - Item.GeneralRiskNum = data.GeneralRiskNum.HasValue ? data.GeneralRiskNum.Value : 0; - Item.LowRiskNum = data.LowRiskNum.HasValue ? data.LowRiskNum.Value : 0; - Item.MoreRiskNum = data.MoreRiskNum.HasValue ? data.MoreRiskNum.Value : 0; - Item.GreatRiskNum = data.GreatRiskNum.HasValue ? data.GreatRiskNum.Value : 0; + Item.MapCoordinates = ProjectService.GetProjectByProjectId(data.FactoryId).MapCoordinates; + Item.SafetyMnaHours = data.SafetyMnaHours.HasValue ? data.SafetyMnaHours.Value : 0; + Item.GeneralRiskNum = data.GeneralRiskNum.HasValue ? data.GeneralRiskNum.Value : 0; + Item.LowRiskNum = data.LowRiskNum.HasValue ? data.LowRiskNum.Value : 0; + Item.MoreRiskNum = data.MoreRiskNum.HasValue ? data.MoreRiskNum.Value : 0; + Item.GreatRiskNum = data.GreatRiskNum.HasValue ? data.GreatRiskNum.Value : 0; Item.NewSYHSEDataRiskControlItems = APIDataList_Risk; Item.NewSYHSEDataRealTimeDeviceItems = APIDataList_Relatime; Item.NewSYHSEDataHiddenDangerCheckItems = APIDataList_Hidden; @@ -165,7 +164,7 @@ namespace BLL APIDataList_Item.Add(Item); APIData.NewSYHSEDataItems = APIDataList_Item; - + return APIData; } diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs index c25d8c2d..7519ed98 100644 --- a/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_HiddenDangerCheckService.cs @@ -3,8 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -27,7 +25,7 @@ namespace BLL where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) && - (string.IsNullOrEmpty(table.HiddenDangerName) || x.HiddenDangerName.Contains(table.HiddenDangerName)) + (string.IsNullOrEmpty(table.HiddenDangerName) || x.HiddenDangerName.Contains(table.HiddenDangerName)) select x ; diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs index d13aab2c..356a4d38 100644 --- a/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_RiskControlService.cs @@ -3,8 +3,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -27,7 +25,7 @@ namespace BLL where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) && - (string.IsNullOrEmpty(table.RiskControlName) || x.RiskControlName.Contains(table.RiskControlName)) + (string.IsNullOrEmpty(table.RiskControlName) || x.RiskControlName.Contains(table.RiskControlName)) select x ; diff --git a/SGGL/BLL/ZHGL/DataSync/SYHSEData_SYHSEService.cs b/SGGL/BLL/ZHGL/DataSync/SYHSEData_SYHSEService.cs index 19b0cc25..6a6eccba 100644 --- a/SGGL/BLL/ZHGL/DataSync/SYHSEData_SYHSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/SYHSEData_SYHSEService.cs @@ -10,7 +10,7 @@ namespace BLL { public static class SYHSEData_SYHSEService { - + #region 获取列表 @@ -307,7 +307,7 @@ namespace BLL q.State = Const.CNCEC_State_1; UpdateSYHSEData_SYHSE(q); } - + } public static bool IsReportByDate(DateTime dateTime) { diff --git a/SGGL/BLL/ZHGL/DataSync/ServerService.cs b/SGGL/BLL/ZHGL/DataSync/ServerService.cs index 029ab842..ab3a943b 100644 --- a/SGGL/BLL/ZHGL/DataSync/ServerService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ServerService.cs @@ -4,13 +4,8 @@ using Newtonsoft.Json.Linq; using RestSharp; using System; using System.Collections.Generic; -using System.Linq; using System.Net; -using System.Net.Configuration; -using System.Security.Policy; -using System.Text; using System.Threading.Tasks; -using ResponeData = Model.ResponeData; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs b/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs index 98387ba3..0c8152b4 100644 --- a/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs +++ b/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { @@ -10,7 +9,7 @@ namespace BLL /// public static class UnitDrillRecordListService { - + /// /// 根据主键获取应急演练 diff --git a/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs b/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs index a18fe6a7..95c8578d 100644 --- a/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs +++ b/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; namespace BLL { @@ -10,7 +9,7 @@ namespace BLL /// public static class UnitEmergencyListService { - + /// /// 根据主键获取应急预案管理 diff --git a/SGGL/BLL/ZHGL/Environmental/ArchitectureReportItemService.cs b/SGGL/BLL/ZHGL/Environmental/ArchitectureReportItemService.cs index 1055883f..02ce98e9 100644 --- a/SGGL/BLL/ZHGL/Environmental/ArchitectureReportItemService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ArchitectureReportItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Web.UI.WebControls; namespace BLL diff --git a/SGGL/BLL/ZHGL/Environmental/ArchitectureReportService.cs b/SGGL/BLL/ZHGL/Environmental/ArchitectureReportService.cs index 9c66875b..ea454cb3 100644 --- a/SGGL/BLL/ZHGL/Environmental/ArchitectureReportService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ArchitectureReportService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Environmental/ChemicalReportItemService.cs b/SGGL/BLL/ZHGL/Environmental/ChemicalReportItemService.cs index 74db3a56..cf651a4d 100644 --- a/SGGL/BLL/ZHGL/Environmental/ChemicalReportItemService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ChemicalReportItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Web.UI.WebControls; namespace BLL diff --git a/SGGL/BLL/ZHGL/Environmental/ChemicalReportService.cs b/SGGL/BLL/ZHGL/Environmental/ChemicalReportService.cs index 595bbba2..b7a61d0e 100644 --- a/SGGL/BLL/ZHGL/Environmental/ChemicalReportService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ChemicalReportService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs b/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs index 84ed5c08..28e0052e 100644 --- a/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs +++ b/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs @@ -1,10 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -29,7 +26,7 @@ namespace BLL (string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) && (string.IsNullOrEmpty(table.FillingMan) || x.FillingMan.Contains(table.FillingMan)) && (string.IsNullOrEmpty(table.DutyPerson) || x.DutyPerson.Contains(table.DutyPerson)) && - (string.IsNullOrEmpty(table.UpState) || x.UpState.Contains(table.UpState)) + (string.IsNullOrEmpty(table.UpState) || x.UpState.Contains(table.UpState)) select x ; diff --git a/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs b/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs index 3db7ab0d..497f34c8 100644 --- a/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs +++ b/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs @@ -1,10 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -31,7 +28,7 @@ namespace BLL (string.IsNullOrEmpty(table.BusinessCategory) || x.BusinessCategory.Contains(table.BusinessCategory)) && (string.IsNullOrEmpty(table.Throughput_UnitOfMeasurement) || x.Throughput_UnitOfMeasurement.Contains(table.Throughput_UnitOfMeasurement)) && (string.IsNullOrEmpty(table.Yield_UnitOfMeasurement) || x.Yield_UnitOfMeasurement.Contains(table.Yield_UnitOfMeasurement)) && - (string.IsNullOrEmpty(table.OperationScale_UnitOfMeasurement) || x.OperationScale_UnitOfMeasurement.Contains(table.OperationScale_UnitOfMeasurement)) + (string.IsNullOrEmpty(table.OperationScale_UnitOfMeasurement) || x.OperationScale_UnitOfMeasurement.Contains(table.OperationScale_UnitOfMeasurement)) select x ; @@ -97,7 +94,7 @@ namespace BLL { return (from x in Funs.DB.Environmental_EnergyReportItem where x.EnergyReportId == EnergyReportId - orderby x.SortIndex,x.SortUnit + orderby x.SortIndex, x.SortUnit select x).ToList(); } @@ -139,7 +136,7 @@ namespace BLL { var q = (from x in Funs.DB.Environmental_EnergyReportItem where x.EnergyReportId == EnergyReportId - orderby x.SortIndex,x.SortUnit + orderby x.SortIndex, x.SortUnit select x).ToList(); //List newItems = new List(); //foreach (var item in q) @@ -168,7 +165,7 @@ namespace BLL // newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod; // newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear; // newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear; - + // newItems.Add(newItem); //} return q; @@ -213,7 +210,7 @@ namespace BLL db1.SubmitChanges(); } - + public static void UpdateEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable) { var db1 = Funs.DB; @@ -277,7 +274,7 @@ namespace BLL db.SubmitChanges(); } } - + } } \ No newline at end of file diff --git a/SGGL/BLL/ZHGL/Environmental/ProjectArchitectureReportItemService.cs b/SGGL/BLL/ZHGL/Environmental/ProjectArchitectureReportItemService.cs index 8d464322..a1af0d79 100644 --- a/SGGL/BLL/ZHGL/Environmental/ProjectArchitectureReportItemService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ProjectArchitectureReportItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Web.UI.WebControls; namespace BLL diff --git a/SGGL/BLL/ZHGL/Environmental/ProjectArchitectureReportService.cs b/SGGL/BLL/ZHGL/Environmental/ProjectArchitectureReportService.cs index 4df36456..9fbbe69f 100644 --- a/SGGL/BLL/ZHGL/Environmental/ProjectArchitectureReportService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ProjectArchitectureReportService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Environmental/ProjectChemicalReportItemService.cs b/SGGL/BLL/ZHGL/Environmental/ProjectChemicalReportItemService.cs index de3598ec..a84a5a4d 100644 --- a/SGGL/BLL/ZHGL/Environmental/ProjectChemicalReportItemService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ProjectChemicalReportItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Web.UI.WebControls; namespace BLL diff --git a/SGGL/BLL/ZHGL/Environmental/ProjectChemicalReportService.cs b/SGGL/BLL/ZHGL/Environmental/ProjectChemicalReportService.cs index b70d6a7a..4530b8ac 100644 --- a/SGGL/BLL/ZHGL/Environmental/ProjectChemicalReportService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ProjectChemicalReportService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Environmental/ProjectEnergyReportService.cs b/SGGL/BLL/ZHGL/Environmental/ProjectEnergyReportService.cs index 264507da..6160f844 100644 --- a/SGGL/BLL/ZHGL/Environmental/ProjectEnergyReportService.cs +++ b/SGGL/BLL/ZHGL/Environmental/ProjectEnergyReportService.cs @@ -1,11 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Security.Cryptography; -using System.Text; -using Model; namespace BLL @@ -91,7 +87,7 @@ namespace BLL FillingDate = newtable.FillingDate, DutyPerson = newtable.DutyPerson, UpState = newtable.UpState, - ProjectId=newtable.ProjectId, + ProjectId = newtable.ProjectId, }; var db1 = Funs.DB; db1.Environmental_ProjectEnergyReport.InsertOnSubmit(table); @@ -142,7 +138,7 @@ namespace BLL table.FillingDate = newtable.FillingDate; table.DutyPerson = newtable.DutyPerson; table.UpState = newtable.UpState; - table.ProjectId=newtable.ProjectId; + table.ProjectId = newtable.ProjectId; db1.SubmitChanges(); } diff --git a/SGGL/BLL/ZHGL/Environmental/ProjectEnergyreportItemService .cs b/SGGL/BLL/ZHGL/Environmental/ProjectEnergyreportItemService .cs index 67676f15..64dd79f3 100644 --- a/SGGL/BLL/ZHGL/Environmental/ProjectEnergyreportItemService .cs +++ b/SGGL/BLL/ZHGL/Environmental/ProjectEnergyreportItemService .cs @@ -1,10 +1,7 @@ using FineUIPro; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -using Model; namespace BLL @@ -126,7 +123,7 @@ namespace BLL return (from x in Funs.DB.Environmental_ProjectEnergyReportItem join y in Funs.DB.Environmental_ProjectEnergyReport on x.EnergyReportId equals y.EnergyReportId - where y.Year == year && y.Quarters== Quarters + where y.Year == year && y.Quarters == Quarters select x).Distinct().ToList(); } public static List GetLastYearItems(int year) @@ -134,7 +131,7 @@ namespace BLL return (from x in Funs.DB.Environmental_ProjectEnergyReportItem join y in Funs.DB.Environmental_ProjectEnergyReport on x.EnergyReportId equals y.EnergyReportId - where y.Year == year + where y.Year == year select x).Distinct().ToList(); } /// diff --git a/SGGL/BLL/ZHGL/Information/AccidentCauseReportService.cs b/SGGL/BLL/ZHGL/Information/AccidentCauseReportService.cs index 98c58cbe..54c91720 100644 --- a/SGGL/BLL/ZHGL/Information/AccidentCauseReportService.cs +++ b/SGGL/BLL/ZHGL/Information/AccidentCauseReportService.cs @@ -1,12 +1,9 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { - public static class AccidentCauseReportService + public static class AccidentCauseReportService { /// /// 职工伤亡事故原因分析报表 diff --git a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs index b388fd5d..4102a9db 100644 --- a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs +++ b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs index ed3eb2c9..26fe6245 100644 --- a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs +++ b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportItemService.cs b/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportItemService.cs index 5905c642..efea4200 100644 --- a/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportItemService.cs +++ b/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportService.cs b/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportService.cs index 632d321a..7111ba36 100644 --- a/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportService.cs +++ b/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportItemService.cs b/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportItemService.cs index abeefef0..80e25f29 100644 --- a/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportItemService.cs +++ b/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportService.cs b/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportService.cs index 33a9a966..2e425f1c 100644 --- a/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportService.cs +++ b/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/EPSummaryReportService.cs b/SGGL/BLL/ZHGL/Information/EPSummaryReportService.cs index 690e8fc2..260b0b62 100644 --- a/SGGL/BLL/ZHGL/Information/EPSummaryReportService.cs +++ b/SGGL/BLL/ZHGL/Information/EPSummaryReportService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/QualityWorkSummaryReportService.cs b/SGGL/BLL/ZHGL/Information/QualityWorkSummaryReportService.cs index 25e1059c..e73b2eaf 100644 --- a/SGGL/BLL/ZHGL/Information/QualityWorkSummaryReportService.cs +++ b/SGGL/BLL/ZHGL/Information/QualityWorkSummaryReportService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/QuarterlyProjectQualityService.cs b/SGGL/BLL/ZHGL/Information/QuarterlyProjectQualityService.cs index b0b6a6af..627816f4 100644 --- a/SGGL/BLL/ZHGL/Information/QuarterlyProjectQualityService.cs +++ b/SGGL/BLL/ZHGL/Information/QuarterlyProjectQualityService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { @@ -28,7 +24,7 @@ namespace BLL /// 年度 /// 季度 /// 季度工程项目质量信息表 - public static Model.Information_QuarterlyProjectQuality GetQuarterlyProjectQualityByUnitIdAndYearAndQuarter(string unitId, int year,int quarter) + public static Model.Information_QuarterlyProjectQuality GetQuarterlyProjectQualityByUnitIdAndYearAndQuarter(string unitId, int year, int quarter) { return Funs.DB.Information_QuarterlyProjectQuality.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Quarter == quarter); } diff --git a/SGGL/BLL/ZHGL/Information/SafetyBriefingService.cs b/SGGL/BLL/ZHGL/Information/SafetyBriefingService.cs index 78e56ee2..7cff35bb 100644 --- a/SGGL/BLL/ZHGL/Information/SafetyBriefingService.cs +++ b/SGGL/BLL/ZHGL/Information/SafetyBriefingService.cs @@ -1,15 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { /// /// 实业安全简报 /// - public static class SafetyBriefingService + public static class SafetyBriefingService { /// /// 根据主键获取实业安全简报 @@ -28,7 +24,7 @@ namespace BLL /// 年度 /// 月份 /// 实业安全简报 - public static Model.Information_SafetyBriefing GetSafetyBriefingByUnitIdAndYearAndMonth(string unitId, int year,int month) + public static Model.Information_SafetyBriefing GetSafetyBriefingByUnitIdAndYearAndMonth(string unitId, int year, int month) { return Funs.DB.Information_SafetyBriefing.FirstOrDefault(e => e.UnitId == unitId && e.YearId == year && e.Month == month); } @@ -49,19 +45,19 @@ namespace BLL CompileDate = safetyBriefing.CompileDate, Auditor = safetyBriefing.Auditor, Approver = safetyBriefing.Approver, - MainWork=safetyBriefing.MainWork, - HazardRecording=safetyBriefing.HazardRecording, - SafetyAccident=safetyBriefing.SafetyAccident, - EPAccident=safetyBriefing.EPAccident, - OHAccident=safetyBriefing.OHAccident, - WorkPermitNum=safetyBriefing.WorkPermitNum, - HiddenDangerDetection=safetyBriefing.HiddenDangerDetection, - RectificationSituation=safetyBriefing.RectificationSituation, - CheckProblemsRectification=safetyBriefing.CheckProblemsRectification, - PendingProject=safetyBriefing.PendingProject, - ContractorManagement=safetyBriefing.ContractorManagement, - EnvironmentalEmissions=safetyBriefing.EnvironmentalEmissions, - NextMonthWorkPlan=safetyBriefing.NextMonthWorkPlan, + MainWork = safetyBriefing.MainWork, + HazardRecording = safetyBriefing.HazardRecording, + SafetyAccident = safetyBriefing.SafetyAccident, + EPAccident = safetyBriefing.EPAccident, + OHAccident = safetyBriefing.OHAccident, + WorkPermitNum = safetyBriefing.WorkPermitNum, + HiddenDangerDetection = safetyBriefing.HiddenDangerDetection, + RectificationSituation = safetyBriefing.RectificationSituation, + CheckProblemsRectification = safetyBriefing.CheckProblemsRectification, + PendingProject = safetyBriefing.PendingProject, + ContractorManagement = safetyBriefing.ContractorManagement, + EnvironmentalEmissions = safetyBriefing.EnvironmentalEmissions, + NextMonthWorkPlan = safetyBriefing.NextMonthWorkPlan, UpState = safetyBriefing.UpState }; Funs.DB.Information_SafetyBriefing.InsertOnSubmit(newSafetyBriefing); diff --git a/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs index 0a0e72bb..f95f6f27 100644 --- a/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs +++ b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs index ba36d562..284587ba 100644 --- a/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs +++ b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/SafetyQuarterlyReportService.cs b/SGGL/BLL/ZHGL/Information/SafetyQuarterlyReportService.cs index 11136073..b3eef020 100644 --- a/SGGL/BLL/ZHGL/Information/SafetyQuarterlyReportService.cs +++ b/SGGL/BLL/ZHGL/Information/SafetyQuarterlyReportService.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Information/UrgeReportService.cs b/SGGL/BLL/ZHGL/Information/UrgeReportService.cs index b33408f2..2e847b20 100644 --- a/SGGL/BLL/ZHGL/Information/UrgeReportService.cs +++ b/SGGL/BLL/ZHGL/Information/UrgeReportService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs b/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs index 503e46d4..eecceb13 100644 --- a/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs +++ b/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class CompanySafetyMeetingService { - + /// /// 根据主键获取企业安委会 diff --git a/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs b/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs index 00d4515e..8b05a68d 100644 --- a/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs +++ b/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs @@ -9,7 +9,7 @@ namespace BLL /// public static class CompanySpecialMeetingService { - + /// /// 根据主键获取企业专题会 diff --git a/SGGL/BLL/ZHGL/Plan/MainContractOpinionService.cs b/SGGL/BLL/ZHGL/Plan/MainContractOpinionService.cs index be983c72..8115d843 100644 --- a/SGGL/BLL/ZHGL/Plan/MainContractOpinionService.cs +++ b/SGGL/BLL/ZHGL/Plan/MainContractOpinionService.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; namespace BLL diff --git a/SGGL/BLL/ZHGL/Plan/ProjectPlanOpinionService.cs b/SGGL/BLL/ZHGL/Plan/ProjectPlanOpinionService.cs index b972b82e..8a55dcb6 100644 --- a/SGGL/BLL/ZHGL/Plan/ProjectPlanOpinionService.cs +++ b/SGGL/BLL/ZHGL/Plan/ProjectPlanOpinionService.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; namespace BLL @@ -12,7 +11,7 @@ namespace BLL /// /// /// - public static IList getListData(string ProjectPlanId,string personId) + public static IList getListData(string ProjectPlanId, string personId) { Model.SGGLDB db = Funs.DB; if (!string.IsNullOrEmpty(personId)) diff --git a/SGGL/BLL/ZHGL/RealName/BasicDataService.cs b/SGGL/BLL/ZHGL/RealName/BasicDataService.cs index db320a11..43013ef9 100644 --- a/SGGL/BLL/ZHGL/RealName/BasicDataService.cs +++ b/SGGL/BLL/ZHGL/RealName/BasicDataService.cs @@ -6,7 +6,7 @@ namespace BLL { public static class BasicDataService { - + /// /// 根据主键获取字典信息 diff --git a/SGGL/BLL/ZHGL/RealName/CityService.cs b/SGGL/BLL/ZHGL/RealName/CityService.cs index 6fb87689..fb4c66cf 100644 --- a/SGGL/BLL/ZHGL/RealName/CityService.cs +++ b/SGGL/BLL/ZHGL/RealName/CityService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class CityService { - + /// /// 根据主键获取国家信息 diff --git a/SGGL/BLL/ZHGL/RealName/CountryService.cs b/SGGL/BLL/ZHGL/RealName/CountryService.cs index d0c7877d..97f18333 100644 --- a/SGGL/BLL/ZHGL/RealName/CountryService.cs +++ b/SGGL/BLL/ZHGL/RealName/CountryService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class CountryService { - + /// /// 根据主键获取国家信息 diff --git a/SGGL/BLL/ZHGL/RealName/OnPostService.cs b/SGGL/BLL/ZHGL/RealName/OnPostService.cs index 0cd1cdfb..82546f4f 100644 --- a/SGGL/BLL/ZHGL/RealName/OnPostService.cs +++ b/SGGL/BLL/ZHGL/RealName/OnPostService.cs @@ -1,7 +1,6 @@ using FineUIPro; using System.Collections; using System.Linq; -using Model; namespace BLL { diff --git a/SGGL/BLL/ZHGL/RealName/RealName_ProjectService.cs b/SGGL/BLL/ZHGL/RealName/RealName_ProjectService.cs index 3808a1c0..04a39174 100644 --- a/SGGL/BLL/ZHGL/RealName/RealName_ProjectService.cs +++ b/SGGL/BLL/ZHGL/RealName/RealName_ProjectService.cs @@ -5,7 +5,7 @@ namespace BLL { public static class RealName_ProjectService { - + /// /// diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs index 5ae369f5..75cb1d88 100644 --- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs +++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs @@ -256,7 +256,7 @@ namespace BLL Success = Success, Code = Code, Message = Message, - PushTime = DateTime.Now, + PushTime = DateTime.Now, }; if (Code != "200") { @@ -762,7 +762,7 @@ namespace BLL && x.UnitType != null && (proCode == null || y.ContractNo == proCode) && u.CollCropCode != null && u.CollCropCode != "" - && z.JTproCode != null && x.IsSynchro == true + && z.JTproCode != null && x.IsSynchro == true select new { unitId = x.UnitId, @@ -1289,16 +1289,16 @@ namespace BLL join z in Funs.DB.RealName_Project on y.ContractNo equals z.ProCode join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId - where x.IdentityCard == identityCard && y.ContractNo == proCode + where x.IdentityCard == identityCard && y.ContractNo == proCode && v.TeamId.HasValue && z.JTproCode != null select new { name = x.PersonName, idcardType = "SHENFEN_ZHENGJIAN", - idcardNumber = x.IdentityCard, + idcardNumber = x.IdentityCard, proCode = z.JTproCode, - teamId = v.TeamId, + teamId = v.TeamId, userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"), workType = w.WorkPostCode, isLeave = x.OutTime.HasValue ? "Y" : "N", @@ -1318,7 +1318,7 @@ namespace BLL }; var updatelistObject = new { - list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.proCode, x.teamId, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) + list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.proCode, x.teamId, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) }; pushContent = JsonConvert.SerializeObject(updatelistObject); returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, JsonConvert.SerializeObject(updatelistObject)); @@ -1523,7 +1523,7 @@ namespace BLL && v.TeamId.HasValue && r.TeamId.HasValue && p.States == Const.State_1 && !x.RealNamePushTime.HasValue - && z.JTproCode.Length> 0 + && z.JTproCode.Length > 0 && pu.IsSynchro == true orderby x.ChangeTime descending select new diff --git a/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs index 11bde67b..f718cdac 100644 --- a/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs +++ b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs index b0ba9ed7..3c45c176 100644 --- a/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs +++ b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs index 9b3ba215..a6dc2c6c 100644 --- a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs +++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { @@ -48,8 +45,8 @@ namespace BLL OrderEndPerson = superviseCheckRectifyItem.OrderEndPerson, RealEndDate = superviseCheckRectifyItem.RealEndDate, AttachUrl = superviseCheckRectifyItem.AttachUrl, - VerifierName=superviseCheckRectifyItem.VerifierName, - VerifierDate=superviseCheckRectifyItem.VerifierDate, + VerifierName = superviseCheckRectifyItem.VerifierName, + VerifierDate = superviseCheckRectifyItem.VerifierDate, }; Funs.DB.Supervise_SuperviseCheckRectifyItem.InsertOnSubmit(newSuperviseCheckRectifyItem); Funs.DB.SubmitChanges(); diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs index 75f09e57..b7f06b5b 100644 --- a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs +++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BLL { diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs index 8cf74d02..e5d5dc91 100644 --- a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs +++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace BLL { diff --git a/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx b/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx index 92b04e2f..bc231e62 100644 --- a/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx +++ b/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx @@ -10,10 +10,20 @@
- - - - - + + + + + + diff --git a/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx.cs b/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx.cs index aa893b03..ae5a9422 100644 --- a/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx.cs +++ b/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx.cs @@ -1,5 +1,6 @@ using BLL; using System; +using System.IO; namespace FineUIPro.Mobile.AttachFile { @@ -12,19 +13,42 @@ namespace FineUIPro.Mobile.AttachFile this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); var url = Request.Params["fileUrl"]; - var newurl = Funs.SGGLUrl + url.Replace(Funs.RootPath, ""); - this.LookHtml.Src = newurl; + var Baseurl = "https://view.officeapps.live.com/op/embed.aspx?src="; + // var Baseurl = "https://view.xdocin.com/view?src="; + var Fileurl = Funs.SGGLUrl + url.Replace(Funs.RootPath, ""); + var newurl = ""; + var FiletExtension = Path.GetExtension(url); + if (FiletExtension == ".docx" || FiletExtension == ".doc" || FiletExtension == ".xls" || FiletExtension == ".xlsx") + { + newurl = Baseurl + Fileurl; + } + else if (FiletExtension == ".txt" || FiletExtension == "pdf") + { + newurl = Fileurl; + } + else + { + newurl = Fileurl; + } + if (AttachFileService.IsImage(FiletExtension) && 1 > 2) + { + this.TabStrip1.Hidden = true; + this.Image1.Hidden = false; + this.Image1.ImageUrl = newurl; + } + else + { + this.TabStrip1.Hidden = false; + this.Image1.Hidden = true; + this.LookHtml.Src = newurl; + this.Tab1.IFrameUrl = newurl; + } //StreamReader fread = new StreamReader(url, System.Text.Encoding.GetEncoding("gb2312")); //string ss = fread.ReadToEnd(); //Response.Write(ss); //fread.Close(); //fread.Dispose(); - // Response.Redirect(url); - //Process process = new Process(); - //process.StartInfo.UseShellExecute = true; - //process.StartInfo.FileName = url; - //process.Start(); } diff --git a/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx.designer.cs b/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx.designer.cs index 2e78a540..1f115849 100644 --- a/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx.designer.cs +++ b/SGGL/FineUIPro.Mobile/AttachFile/Look.aspx.designer.cs @@ -32,6 +32,24 @@ namespace FineUIPro.Mobile.AttachFile /// protected global::FineUIPro.PageManager PageManager1; + /// + /// TabStrip1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TabStrip TabStrip1; + + /// + /// Tab1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tab Tab1; + /// /// btnClose 控件。 /// @@ -49,5 +67,14 @@ namespace FineUIPro.Mobile.AttachFile /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlIframe LookHtml; + + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; } } diff --git a/SGGL/FineUIPro.Mobile/AttachFile/webuploader.aspx.cs b/SGGL/FineUIPro.Mobile/AttachFile/webuploader.aspx.cs index 1cee5e01..b9d48cfa 100644 --- a/SGGL/FineUIPro.Mobile/AttachFile/webuploader.aspx.cs +++ b/SGGL/FineUIPro.Mobile/AttachFile/webuploader.aspx.cs @@ -364,25 +364,15 @@ namespace FineUIPro.Mobile.AttachFile info = new FileInfo(url); } var FiletExtension = Path.GetExtension(savedName); - if (FiletExtension == ".docx" || FiletExtension == ".pdf") + bool isSupportType = AttachFileService.IsSupportFileType(FiletExtension); + if (isSupportType) { - string httpUrl = BLL.AsposeWordHelper.WordToHtml(url); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -"))); - } - else if (FiletExtension == ".txt") - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", url, "查看 -"))); } - else if (FiletExtension == ".xls") - { - string httpUrl = BLL.AsposeWordHelper.PriviewExcel(url); - - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -"))); - } else { ShowNotify("不支持预览", MessageBoxIcon.Warning); + } } catch (Exception ex) diff --git a/SGGL/FineUIPro.Web/AttachFile/EditOffice.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/EditOffice.aspx.cs index 6f66a015..994fae18 100644 --- a/SGGL/FineUIPro.Web/AttachFile/EditOffice.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/EditOffice.aspx.cs @@ -1,26 +1,19 @@ using BLL; -using FineUIPro; using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Policy; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace WordEdit { public partial class EditOffice : System.Web.UI.Page { public string url; - - protected void Page_Load(object sender, EventArgs e) + + protected void Page_Load(object sender, EventArgs e) { - if (!IsPostBack) + if (!IsPostBack) { - - string cmd= Request.QueryString["cmd"]; + + string cmd = Request.QueryString["cmd"]; var a = cmd.Split('|'); if (a[1] == "CQMSMainPlan") { @@ -28,19 +21,19 @@ namespace WordEdit string filepath = model.FilePath; url = Funs.SGGLUrl + filepath; } - else if (a[1]== "CQMSSubPlan") + else if (a[1] == "CQMSSubPlan") { var model = BLL.CQMS_SubPlanService.GetSubPlanBySubPlanId(a[0]); string filepath = model.FilePath; url = Funs.SGGLUrl + filepath; } - else if (a[1]== "Companytemplate") + else if (a[1] == "Companytemplate") { var model = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(a[0]); string filepath = model.FilePath; url = Funs.SGGLUrl + filepath; } - else if (a[1]== "CQMS_Check_MaterialAcceptance") + else if (a[1] == "CQMS_Check_MaterialAcceptance") { var model = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(a[0]); string filepath = model.FilePath; @@ -52,6 +45,6 @@ namespace WordEdit } - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/AttachFile/IndexOffice.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/IndexOffice.aspx.cs index 030f4343..9d3c6e4f 100644 --- a/SGGL/FineUIPro.Web/AttachFile/IndexOffice.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/IndexOffice.aspx.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace WordEdit { diff --git a/SGGL/FineUIPro.Web/AttachFile/Look.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/Look.aspx.cs index e2d5c284..09cdf468 100644 --- a/SGGL/FineUIPro.Web/AttachFile/Look.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/Look.aspx.cs @@ -14,21 +14,21 @@ namespace FineUIPro.Web.AttachFile var url = Request.Params["fileUrl"]; var Baseurl = "https://view.officeapps.live.com/op/embed.aspx?src="; - // var Baseurl = "https://view.xdocin.com/view?src="; + // var Baseurl = "https://view.xdocin.com/view?src="; var Fileurl = Funs.SGGLUrl + url.Replace(Funs.RootPath, ""); var newurl = ""; var FiletExtension = Path.GetExtension(url); - if (FiletExtension == ".docx" || FiletExtension == ".doc"|| FiletExtension == ".xls" || FiletExtension == ".xlsx") + if (FiletExtension == ".docx" || FiletExtension == ".doc" || FiletExtension == ".xls" || FiletExtension == ".xlsx") { newurl = Baseurl + Fileurl; } - else if (FiletExtension == ".txt"|| FiletExtension== "pdf") + else if (FiletExtension == ".txt" || FiletExtension == "pdf") { newurl = Fileurl; } - else - { - newurl = Fileurl; + else + { + newurl = Fileurl; } this.LookHtml.Src = newurl; diff --git a/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs index 27798d12..ef788b07 100644 --- a/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs @@ -1,6 +1,5 @@ using BLL; using System; -using System.IO; namespace FineUIPro.Web.AttachFile { diff --git a/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx.cs index b6b79ab3..acd71346 100644 --- a/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.AttachFile { diff --git a/SGGL/FineUIPro.Web/AttachFile/fileupload.ashx.cs b/SGGL/FineUIPro.Web/AttachFile/fileupload.ashx.cs index 0edfb729..3208ade4 100644 --- a/SGGL/FineUIPro.Web/AttachFile/fileupload.ashx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/fileupload.ashx.cs @@ -49,7 +49,7 @@ namespace FineUIPro.Web.AttachFile // 文件名完整路径 string fileName = postedFile.FileName; // 文件名保存的服务器路径 - string savedFileName = GetSavedFileName(fileName,owner).Replace('#', '-'); ; + string savedFileName = GetSavedFileName(fileName, owner).Replace('#', '-'); ; postedFile.SaveAs(context.Server.MapPath("~/" + attachPath + "/" + savedFileName)); string shortFileName = GetFileName(fileName); @@ -123,7 +123,7 @@ namespace FineUIPro.Web.AttachFile return shortFileName; } - private string GetSavedFileName(string fileName,string owner) + private string GetSavedFileName(string fileName, string owner) { fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_"); if (!owner.Contains("DocAttachUrl")) diff --git a/SGGL/FineUIPro.Web/AttachFile/save.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/save.aspx.cs index 9be0f1bd..5822aadb 100644 --- a/SGGL/FineUIPro.Web/AttachFile/save.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/save.aspx.cs @@ -1,17 +1,11 @@ using BLL; using System; -using System.Collections.Generic; -using System.Data.SqlClient; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace WordEdit { public partial class save : System.Web.UI.Page { - + //参数savetype定义要另存的文档格式office,html,pdf //参数filetype定义要保存的文档的文件内型 public string savetype, filetype, fid, title, fother, fname, fname1; @@ -43,7 +37,7 @@ namespace WordEdit case "1": saveoffice(); break; - + default: saveoffice(); break; @@ -54,7 +48,7 @@ namespace WordEdit public void saveoffice() { string uploadoffiepath = Server.MapPath("~/");//上传文件的路径 - // string uploadoffiepath = filepath;//上传文件的路径 + // string uploadoffiepath = filepath;//上传文件的路径 string attpath = Server.MapPath(attachpath);//上传附件文件路径 System.Web.HttpFileCollection uploadFiles = Request.Files; @@ -72,11 +66,11 @@ namespace WordEdit // theFile.SaveAs(uploadoffiepath + @"\" + fname); var path = theFile.FileName.Replace(Funs.SGGLUrl, ""); theFile.SaveAs(uploadoffiepath + path); - + } } - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs index ff9d5542..d66456ce 100644 --- a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs @@ -538,7 +538,7 @@ namespace FineUIPro.Web.AttachFile List lists = Funs.GetStrListByStr(ToKeyId, ','); sours = (from x in Funs.DB.AttachFile where lists.Contains(x.ToKeyId) select x).ToList(); string attachSource = string.Empty; - if (sours.Count>0) + if (sours.Count > 0) { foreach (var sour in sours) { @@ -562,7 +562,7 @@ namespace FineUIPro.Web.AttachFile } } } - + } if (!string.IsNullOrEmpty(attachSource)) { diff --git a/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.cs index 2e7fe1f1..1330ef32 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/BaseFactory.aspx.cs @@ -1,11 +1,6 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.BaseInfo diff --git a/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.cs index d70decc7..48b4bb48 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/BaseFactoryEdit.aspx.cs @@ -1,15 +1,10 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.BaseInfo { - public partial class BaseFactoryEdit: PageBase + public partial class BaseFactoryEdit : PageBase { #region /// @@ -32,7 +27,7 @@ namespace FineUIPro.Web.BaseInfo { if (!IsPostBack) { - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); ////权限按钮方法 this.GetButtonPower(); this.FactoryId = Request.Params["FactoryId"]; @@ -68,7 +63,7 @@ namespace FineUIPro.Web.BaseInfo table.FactoryCode = this.txtFactoryCode.Text; table.FactoryName = this.txtFactoryName.Text; table.Address = this.txtAddress.Text; - table.MapCoordinates=this.txtMapCoordinates.Text; + table.MapCoordinates = this.txtMapCoordinates.Text; if (string.IsNullOrEmpty(this.FactoryId)) { table.FactoryId = SQLHelper.GetNewID(typeof(Model.Base_Factory)); @@ -86,9 +81,9 @@ namespace FineUIPro.Web.BaseInfo { bool result = true; var model = BLL.Base_FactoryService.GetBase_FactoryByCode(this.txtFactoryCode.Text); - if(model != null && model.FactoryId !=this.FactoryId) + if (model != null && model.FactoryId != this.FactoryId) { - result=false; + result = false; } return result; } diff --git a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs index 961dc17b..db11c941 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs @@ -1,10 +1,8 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.BaseInfo { @@ -153,7 +151,7 @@ namespace FineUIPro.Web.BaseInfo BindGrid(); PageContext.RegisterStartupScript("onNewButtonClick();"); } - } + } #endregion #region 编辑 @@ -266,7 +264,7 @@ namespace FineUIPro.Web.BaseInfo var q = Funs.DB.Base_Certificate.FirstOrDefault(x => x.CertificateCode == this.txtCertificateCode.Text.Trim() && (x.CertificateId != hfFormID.Text || (hfFormID.Text == null && x.CertificateId != null))); if (q != null) { - isok = false; + isok = false; ShowNotify("输入的证书编号已存在!", MessageBoxIcon.Warning); } @@ -327,7 +325,7 @@ namespace FineUIPro.Web.BaseInfo if (doplist != null) { name = doplist.Text; - } + } } return name; } diff --git a/SGGL/FineUIPro.Web/BaseInfo/CheckTemplate.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CheckTemplate.aspx.cs index fd4e23a9..48125ece 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CheckTemplate.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CheckTemplate.aspx.cs @@ -1,7 +1,5 @@ using BLL; using System; -using System.Text; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.BaseInfo { @@ -25,8 +23,8 @@ namespace FineUIPro.Web.BaseInfo /// 绑定数据 /// private void BindGrid() - { - var tb = BLL.CheckTemplateService.getListData( Grid1); + { + var tb = BLL.CheckTemplateService.getListData(Grid1); Grid1.RecordCount = CheckTemplateService.count; //tb = GetFilteredTable(Grid1.FilteredData, tb); Grid1.DataSource = tb; diff --git a/SGGL/FineUIPro.Web/BaseInfo/CheckTemplateEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CheckTemplateEdit.aspx.cs index 1fc1fbcf..fa4ecaf0 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CheckTemplateEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CheckTemplateEdit.aspx.cs @@ -27,7 +27,7 @@ namespace FineUIPro.Web.BaseInfo { if (!IsPostBack) { - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); ////权限按钮方法 this.GetButtonPower(); this.CheckTemplateID = Request.Params["CheckTemplateID"]; @@ -46,7 +46,7 @@ namespace FineUIPro.Web.BaseInfo } else { - this.txtIndexs.Text= ((Funs.DB.ProjectSupervision_CheckTemplate.Max(x => x.Indexs) ?? 0) + 1).ToString(); + this.txtIndexs.Text = ((Funs.DB.ProjectSupervision_CheckTemplate.Max(x => x.Indexs) ?? 0) + 1).ToString(); } } } @@ -61,7 +61,7 @@ namespace FineUIPro.Web.BaseInfo Model.ProjectSupervision_CheckTemplate newCheckTemplate = new Model.ProjectSupervision_CheckTemplate { ID = this.CheckTemplateID, - SortIndex = Funs.GetNewInt( this.txtSortIndex.Text), + SortIndex = Funs.GetNewInt(this.txtSortIndex.Text), CheckItem = this.txtCheckItem.Text.Trim(), CheckStandard = this.txtCheckStandard.Text.Trim(), CheckMethod = this.txtCheckMethod.Text.Trim(), @@ -83,7 +83,7 @@ namespace FineUIPro.Web.BaseInfo PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } - + #region 获取按钮权限 /// /// 获取按钮权限 diff --git a/SGGL/FineUIPro.Web/BaseInfo/CompanyModel.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CompanyModel.aspx.cs index d485b26e..13060ec9 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CompanyModel.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CompanyModel.aspx.cs @@ -1,8 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; using System.Web; diff --git a/SGGL/FineUIPro.Web/BaseInfo/CompanyModelEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CompanyModelEdit.aspx.cs index d94731a1..3a1b1a0e 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CompanyModelEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CompanyModelEdit.aspx.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Data; using System.Linq; using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.BaseInfo { diff --git a/SGGL/FineUIPro.Web/BaseInfo/CompanyModelKind.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CompanyModelKind.aspx.cs index b0b42e7b..a3f0160b 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CompanyModelKind.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CompanyModelKind.aspx.cs @@ -1,8 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; using System.Web; diff --git a/SGGL/FineUIPro.Web/BaseInfo/CompanyModelKindEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CompanyModelKindEdit.aspx.cs index 57d04198..6784087b 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CompanyModelKindEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CompanyModelKindEdit.aspx.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; +using BLL; +using System; namespace FineUIPro.Web.BaseInfo { diff --git a/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.cs index c94aa6f9..d188a9c0 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/Companytemplate.aspx.cs @@ -1,11 +1,7 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using AspNet=System.Web.UI.WebControls; +using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.BaseInfo { diff --git a/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.cs index 8c3fcef2..43ae1eec 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CompanytemplateEdit.aspx.cs @@ -1,11 +1,7 @@ using BLL; using System; -using System.Collections.Generic; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.BaseInfo { @@ -66,7 +62,7 @@ namespace FineUIPro.Web.BaseInfo private bool Save() { - bool result=true; + bool result = true; var q = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateByCode(this.txtCode.Text); if (q != null && q.TemplateId != this.TemplateId) { @@ -110,7 +106,7 @@ namespace FineUIPro.Web.BaseInfo return result; } - + #region 获取按钮权限 /// /// 获取按钮权限 diff --git a/SGGL/FineUIPro.Web/BaseInfo/CostType.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CostType.aspx.cs index 8cc2b416..085e2d5c 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CostType.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CostType.aspx.cs @@ -59,12 +59,12 @@ namespace FineUIPro.Web.BaseInfo { DataRow row = table.NewRow(); row[0] = item.CostTypeId; - row[1] ="-1"; + row[1] = "-1"; row[2] = item.CostTypeCode; - row[3] = item.CostTypeCode+ item.CostTypeName; + row[3] = item.CostTypeCode + item.CostTypeName; row[4] = item.Remark; table.Rows.Add(row); - var getU = Funs.DB.Base_CostTypeItem.Where(x => x.CostTypeId == item.CostTypeId).OrderBy(x=>x.SortIndex); + var getU = Funs.DB.Base_CostTypeItem.Where(x => x.CostTypeId == item.CostTypeId).OrderBy(x => x.SortIndex); foreach (var itemU in getU) { DataRow rowC = table.NewRow(); diff --git a/SGGL/FineUIPro.Web/BaseInfo/CostTypeEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CostTypeEdit.aspx.cs index ae950d83..18e7a132 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CostTypeEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CostTypeEdit.aspx.cs @@ -73,7 +73,7 @@ namespace FineUIPro.Web.BaseInfo Model.Base_CostType title = new Model.Base_CostType(); title.CostTypeCode = Funs.GetNewIntOrZero(this.txtCostTypeCode.Text.Trim()); title.CostTypeName = this.txtCostTypeName.Text.Trim(); - title.Remark = this.txtRemark.Text.Trim(); + title.Remark = this.txtRemark.Text.Trim(); if (string.IsNullOrEmpty(this.CostTypeId)) { this.CostTypeId = SQLHelper.GetNewID(typeof(Model.Base_CostType)); diff --git a/SGGL/FineUIPro.Web/BaseInfo/CostTypeItemEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CostTypeItemEdit.aspx.cs index 708d67be..02634fc0 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CostTypeItemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CostTypeItemEdit.aspx.cs @@ -1,6 +1,5 @@ using BLL; using System; -using System.Linq; namespace FineUIPro.Web.BaseInfo { @@ -49,7 +48,7 @@ namespace FineUIPro.Web.BaseInfo } else { - + } } } diff --git a/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs b/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs index 6acf52fe..72a06a07 100644 --- a/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs @@ -1,11 +1,8 @@ using BLL; using Model; using System; -using System.Collections.Generic; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.CLGL diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs index 01bbcadb..c05eeae2 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.HSSE.EduTrain; using Model; using System; using System.Collections.Generic; @@ -7,8 +6,6 @@ using System.Data; using System.IO; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.CLGL diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMasterDataIn.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InPlanMasterDataIn.aspx.cs index 99a68ef1..00e940f2 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMasterDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMasterDataIn.aspx.cs @@ -1,13 +1,9 @@ using BLL; using Model; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CLGL { @@ -68,7 +64,7 @@ namespace FineUIPro.Web.CLGL var fileName = rootPath + initPath + hdFileName.Text; ResponeData responeData; - responeData = TwInOutplanmasterService.ImportData(fuAttachUrl.FileName,fileName, this.CurrUser.LoginProjectId, this.CurrUser.PersonId); + responeData = TwInOutplanmasterService.ImportData(fuAttachUrl.FileName, fileName, this.CurrUser.LoginProjectId, this.CurrUser.PersonId); if (responeData.code == 1) @@ -81,8 +77,8 @@ namespace FineUIPro.Web.CLGL Alert alert = new Alert(); alert.Message = responeData.message; alert.MessageBoxIcon = MessageBoxIcon.Error; - alert.Show(); - } + alert.Show(); + } } #endregion diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.cs index 49375642..3dc65322 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.cs @@ -3,8 +3,6 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.CLGL @@ -93,7 +91,7 @@ namespace FineUIPro.Web.CLGL model.WarehouseMan = this.CurrUser.PersonId; model.WarehouseDate = DateTime.Now; TwInOutplanmasterService.Update(model); - TwInputmasterService.GenInMasterByPlanId(Id, SaveDetail(Id),txtRemark.Text); + TwInputmasterService.GenInMasterByPlanId(Id, SaveDetail(Id), txtRemark.Text); ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } diff --git a/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx.cs index c4849863..db704057 100644 --- a/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx.cs @@ -1,16 +1,14 @@ using BLL; using MiniExcelLibs; using Model; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using Newtonsoft.Json.Linq; namespace FineUIPro.Web.CLGL { @@ -54,7 +52,7 @@ namespace FineUIPro.Web.CLGL if (drpTypeInt.SelectedValue != Const._Null) { table.TypeInt = Convert.ToInt32(drpTypeInt.SelectedValue); - } + } if (drpWarehouse.SelectedValue != Const._Null) { table.WarehouseCode = drpWarehouse.SelectedValue; @@ -79,12 +77,12 @@ namespace FineUIPro.Web.CLGL for (int i = 0; i < Grid2.Rows.Count; i++) { var model = Grid2.Rows[i].DataItem as Model.Tw_InOutDetailOutput; - planNumTotal += (model.PlanNum ??0m ); - actNumTotal += (model.ActNum ??0m ); + planNumTotal += (model.PlanNum ?? 0m); + actNumTotal += (model.ActNum ?? 0m); if (model.ActNum != model.PlanNum) { Grid2.Rows[i].RowCssClass = "red"; - } + } } JObject summary = new JObject(); @@ -94,7 +92,7 @@ namespace FineUIPro.Web.CLGL Grid2.SummaryData = summary; - } + } #endregion #region GV 数据操作 @@ -208,7 +206,7 @@ namespace FineUIPro.Web.CLGL BindGrid(); ShowNotify("删除数据成功!", MessageBoxIcon.Success); } - } + } #endregion #region 关闭弹出窗 @@ -256,9 +254,9 @@ namespace FineUIPro.Web.CLGL /// protected void btnOut_Click(object sender, EventArgs e) { - if (Grid1.SelectedRowIDArray.Length>0) + if (Grid1.SelectedRowIDArray.Length > 0) { - var printModel= TwInputdetailService.GePrintListByInputMasterIds(Grid1.SelectedRowIDArray.ToList()); + var printModel = TwInputdetailService.GePrintListByInputMasterIds(Grid1.SelectedRowIDArray.ToList()); string path = Funs.RootPath + @"File\Excel\Temp\InputDetail.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); @@ -275,7 +273,7 @@ namespace FineUIPro.Web.CLGL System.Web.HttpContext.Current.Response.Flush(); System.Web.HttpContext.Current.Response.Close(); File.Delete(path); - } + } } /// @@ -342,7 +340,7 @@ namespace FineUIPro.Web.CLGL List tw_PrintMasters = new List(); List tw_PrintDetails = new List(); Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster - { + { ReqUnitName = UnitService.GetUnitNameByUnitId(Person_PersonsService.GetPerson_PersonsById(result.CreateMan).UnitId), CusBillCode = result.CusBillCode, diff --git a/SGGL/FineUIPro.Web/CLGL/InputMasterEdit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InputMasterEdit.aspx.cs index bdc64846..ff6d7ccc 100644 --- a/SGGL/FineUIPro.Web/CLGL/InputMasterEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InputMasterEdit.aspx.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CLGL { diff --git a/SGGL/FineUIPro.Web/CLGL/MaterialStock.aspx.cs b/SGGL/FineUIPro.Web/CLGL/MaterialStock.aspx.cs index 4f6aefe7..0b33b7e8 100644 --- a/SGGL/FineUIPro.Web/CLGL/MaterialStock.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/MaterialStock.aspx.cs @@ -1,11 +1,6 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CLGL { @@ -35,10 +30,10 @@ namespace FineUIPro.Web.CLGL { Model.Tw_MaterialStockOutput table = new Model.Tw_MaterialStockOutput(); table.PipeLineMatCode = txtMatCode.Text.Trim(); - if (drpWarehouse.SelectedValue!= Const._Null) + if (drpWarehouse.SelectedValue != Const._Null) { table.WarehouseCode = drpWarehouse.SelectedValue; - } + } table.ProjectId = this.CurrUser.LoginProjectId; var tb = BLL.TwMaterialstockService.GetListData(table, Grid1); Grid1.RecordCount = TwMaterialstockService.Count; @@ -172,7 +167,7 @@ namespace FineUIPro.Web.CLGL } #endregion - + #region 导出按钮 /// 导出按钮 diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs index 786741f1..1ceb6917 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs @@ -1,21 +1,11 @@ -using Apache.NMS.ActiveMQ.Threads; -using BLL; -using FineUIPro.Web.HSSE.EduTrain; -using FineUIPro.Web.ProjectData; +using BLL; using Model; -using Newtonsoft.Json.Linq; -using NPOI.SS.Formula.Functions; using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; -using System.Diagnostics; using System.IO; using System.Linq; using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using System.Web; namespace FineUIPro.Web.CLGL { @@ -37,7 +27,7 @@ namespace FineUIPro.Web.CLGL private void InitDrpList() - { + { drpWarehouse.DataTextField = "Text"; drpWarehouse.DataValueField = "Value"; drpWarehouse.DataSource = BLL.DropListService.HJGL_WarehouseCode(); @@ -116,7 +106,7 @@ namespace FineUIPro.Web.CLGL if (inOutPlanMasterModel != null) { - if (inOutPlanMasterModel.State== (int)TwConst.State.已完成|| inOutPlanMasterModel.State == (int)TwConst.State.已审核) + if (inOutPlanMasterModel.State == (int)TwConst.State.已完成 || inOutPlanMasterModel.State == (int)TwConst.State.已审核) { TabStrip2.Hidden = true; TabStrip3.Hidden = false; @@ -143,9 +133,9 @@ namespace FineUIPro.Web.CLGL } } - - + + } #endregion @@ -213,11 +203,11 @@ namespace FineUIPro.Web.CLGL { foreach (var q in unitWork1) { - + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn1 = new TreeNode(); tn1.NodeID = q.UnitWorkId; - tn1.Text = q.UnitWorkName ; + tn1.Text = q.UnitWorkName; tn1.ToolTip = "施工单位:" + unitNamesUnitIds; tn1.EnableClickEvent = true; rootNode1.Nodes.Add(tn1); @@ -227,11 +217,11 @@ namespace FineUIPro.Web.CLGL { foreach (var q in unitWork2) { - + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn2 = new TreeNode(); tn2.NodeID = q.UnitWorkId; - tn2.Text = q.UnitWorkName ; + tn2.Text = q.UnitWorkName; tn2.ToolTip = "施工单位:" + unitNamesUnitIds; tn2.EnableClickEvent = true; rootNode2.Nodes.Add(tn2); @@ -330,7 +320,7 @@ namespace FineUIPro.Web.CLGL MaterialDef = y.MaterialDef, MaterialSpec = y.MaterialSpec, MaterialUnit = y.MaterialUnit, - PlanNum = (x.Number ??0).ToString(), + PlanNum = (x.Number ?? 0).ToString(), UnitWorkName = m.UnitWorkName, }).ToList(); var UnitWorkName = tw_PrintDetailRelation.FirstOrDefault()?.UnitWorkName; @@ -441,7 +431,7 @@ namespace FineUIPro.Web.CLGL else { BLL.TwInOutplanmasterService.DeleteById(rowID); - + ShowNotify("删除数据成功!", MessageBoxIcon.Success); } } @@ -455,7 +445,7 @@ namespace FineUIPro.Web.CLGL } protected void btnGenInOutMaster_Click(object sender, EventArgs e) - { + { if (Grid1.SelectedRowIndexArray.Length == 0) { @@ -485,7 +475,7 @@ namespace FineUIPro.Web.CLGL } string planId = Grid1.SelectedRowID; string message = TwOutputmasterService.RevokeGenOutMasterByPlanId(planId); - if (string .IsNullOrEmpty(message)) + if (string.IsNullOrEmpty(message)) { ShowNotify("撤销出库成功!", MessageBoxIcon.Success); BindGrid(); @@ -495,7 +485,7 @@ namespace FineUIPro.Web.CLGL Alert.ShowInTop(message, MessageBoxIcon.Warning); return; - } + } } @@ -506,9 +496,9 @@ namespace FineUIPro.Web.CLGL Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } - string planId = Grid1.SelectedRowID; + string planId = Grid1.SelectedRowID; var planMaster = BLL.TwInOutplanmasterService.GetById(planId); - if (planMaster.State == (int)TwConst.State.待提交 &&( planMaster.TypeInt == (int)TwConst.TypeInt.散件出库 || planMaster.TypeInt == (int)TwConst.TypeInt.其他出库)) + if (planMaster.State == (int)TwConst.State.待提交 && (planMaster.TypeInt == (int)TwConst.TypeInt.散件出库 || planMaster.TypeInt == (int)TwConst.TypeInt.其他出库)) { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterEdit.aspx?UnitWorkId={0}&Id={1} ", tvControlItem.SelectedNodeID, planId, "新增 - "))); @@ -517,7 +507,7 @@ namespace FineUIPro.Web.CLGL { Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning); - return; + return; } } @@ -559,7 +549,7 @@ namespace FineUIPro.Web.CLGL { Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning); return; - } + } else { if (string.IsNullOrEmpty(planMaster.AuditMan)) @@ -609,12 +599,12 @@ namespace FineUIPro.Web.CLGL { if (this.TabStrip1.ActiveTabIndex == 0) { - + } else if (this.TabStrip1.ActiveTabIndex == 1) { - + } } @@ -700,6 +690,6 @@ namespace FineUIPro.Web.CLGL #endregion - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs index 58031376..2b3543c6 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs @@ -7,7 +7,7 @@ using System.Linq; namespace FineUIPro.Web.CLGL { - public partial class OutPlanMasterEdit :PageBase + public partial class OutPlanMasterEdit : PageBase { /// /// 单位工程主键 @@ -44,12 +44,12 @@ namespace FineUIPro.Web.CLGL if (!string.IsNullOrEmpty(Id)) { var queryModel = new Model.Tw_InOutMasterOutput() - { - Id=Id, - }; - + { + Id = Id, + }; + var result = BLL.TwInOutplanmasterService.GetListData(queryModel).FirstOrDefault(); - if (!string .IsNullOrEmpty(result.WeldTaskId) && result.WeldTaskId.Contains("|")) + if (!string.IsNullOrEmpty(result.WeldTaskId) && result.WeldTaskId.Contains("|")) { UnitWorkId = result.WeldTaskId.Split('|')[0]; @@ -59,9 +59,9 @@ namespace FineUIPro.Web.CLGL UnitWorkId = result.WeldTaskId; } txtCreateMan.Text = result.CreateManName; - txtCreateDate.Text =result.CreateDate.Value.ToString("yyyy-MM-dd"); - drpReqUnit.SelectedValue = result.ReqUnitId; - drpTypeInt.SelectedValue = result.TypeInt.ToString(); + txtCreateDate.Text = result.CreateDate.Value.ToString("yyyy-MM-dd"); + drpReqUnit.SelectedValue = result.ReqUnitId; + drpTypeInt.SelectedValue = result.TypeInt.ToString(); drpWarehouse.SelectedValue = result.WarehouseCode; drpCategory.SelectedValue = result.Category.ToString(); txtRemark.Text = result.Remark; @@ -75,7 +75,7 @@ namespace FineUIPro.Web.CLGL txtCreateMan.Text = this.CurrUser.PersonName; txtCreateDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); drpReqUnit.SelectedValue = this.CurrUser.UnitId; - txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode,drpTypeInt.SelectedText, drpCategory.SelectedText); + txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode, drpTypeInt.SelectedText, drpCategory.SelectedText); } drpTypeInt_SelectedIndexChanged(null, null); @@ -88,13 +88,13 @@ namespace FineUIPro.Web.CLGL drpWarehouse.DataTextField = "Text"; drpWarehouse.DataValueField = "Value"; drpWarehouse.DataSource = BLL.DropListService.HJGL_WarehouseCode(); - drpWarehouse.DataBind(); + drpWarehouse.DataBind(); string[] typeIntArr = { TwConst.TypeInt.散件出库.ToString(), TwConst.TypeInt.其他出库.ToString() }; drpTypeInt.DataTextField = "Key"; drpTypeInt.DataValueField = "Value"; - drpTypeInt.DataSource = BLL.TwConst.TypeIntMap.Where(x => typeIntArr.Contains(x.Key)); - drpTypeInt.DataBind(); + drpTypeInt.DataSource = BLL.TwConst.TypeIntMap.Where(x => typeIntArr.Contains(x.Key)); + drpTypeInt.DataBind(); UnitService.InitUnitDropDownList(drpReqUnit, this.CurrUser.LoginProjectId, true); drpCategory.DataTextField = "Key"; @@ -111,7 +111,7 @@ namespace FineUIPro.Web.CLGL queryRelationModel.InOutPlanMasterId = Id; var tb = TwInoutplandetailRelationService.GetListData(queryRelationModel, Grid1); Grid1.DataSource = tb; - Grid1.DataBind(); + Grid1.DataBind(); } else { @@ -119,9 +119,9 @@ namespace FineUIPro.Web.CLGL queryRelationModel.InOutPlanMasterId = Id; var tb = TwInOutplandetailService.GetListData(queryRelationModel, Grid1); Grid2.DataSource = tb; - Grid2.DataBind(); + Grid2.DataBind(); } - + } #region 选择按钮 @@ -133,7 +133,7 @@ namespace FineUIPro.Web.CLGL protected void btnSelect_Click(object sender, EventArgs e) { Save(Const.BtnSave); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterSelect.aspx?UnitWorkId={0}&Id={1}",UnitWorkId,Id, "选择- "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterSelect.aspx?UnitWorkId={0}&Id={1}", UnitWorkId, Id, "选择- "))); } protected void btnSelectStock_Click(object sender, EventArgs e) @@ -152,7 +152,7 @@ namespace FineUIPro.Web.CLGL protected void btnSubmit_Click(object sender, EventArgs e) { - Save(Const.BtnSubmit); + Save(Const.BtnSubmit); ShowNotify("提交成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } @@ -163,7 +163,7 @@ namespace FineUIPro.Web.CLGL switch (type) { case Const.BtnSave: - state=(int)TwConst.State.待提交; + state = (int)TwConst.State.待提交; break; case Const.BtnSubmit: state = (int)TwConst.State.待审核; @@ -176,32 +176,32 @@ namespace FineUIPro.Web.CLGL var model = new Tw_InOutPlanMaster() { Id = Id, - ProjectId=this.CurrUser.LoginProjectId, - CusBillCode=txtCusBillCode.Text, - WarehouseCode = drpWarehouse.SelectedValue, - WeldTaskId=UnitWorkId, - Source=1, + ProjectId = this.CurrUser.LoginProjectId, + CusBillCode = txtCusBillCode.Text, + WarehouseCode = drpWarehouse.SelectedValue, + WeldTaskId = UnitWorkId, + Source = 1, CreateDate = DateTime.Now, CreateMan = this.CurrUser.PersonId, - ReqUnitId = drpReqUnit.SelectedValue, - TypeInt = int.Parse( drpTypeInt.SelectedValue), - Remark = txtRemark.Text, - InOutType=(int)TwConst.InOutType.出库, - Category= int.Parse(drpCategory.SelectedValue), - State=state + ReqUnitId = drpReqUnit.SelectedValue, + TypeInt = int.Parse(drpTypeInt.SelectedValue), + Remark = txtRemark.Text, + InOutType = (int)TwConst.InOutType.出库, + Category = int.Parse(drpCategory.SelectedValue), + State = state }; TwInOutplanmasterService.Add(model); } else { - var model = TwInOutplanmasterService.GetById(Id); + var model = TwInOutplanmasterService.GetById(Id); model.CusBillCode = txtCusBillCode.Text; model.WarehouseCode = drpWarehouse.SelectedValue; - // model.WeldTaskId = UnitWorkId; + // model.WeldTaskId = UnitWorkId; model.Source = 1; model.CreateDate = DateTime.Now; - model.CreateMan = this.CurrUser.PersonId; - model.ReqUnitId = drpReqUnit.SelectedValue; + model.CreateMan = this.CurrUser.PersonId; + model.ReqUnitId = drpReqUnit.SelectedValue; model.TypeInt = int.Parse(drpTypeInt.SelectedValue); model.Remark = txtRemark.Text; model.InOutType = (int)TwConst.InOutType.出库; @@ -225,7 +225,7 @@ namespace FineUIPro.Web.CLGL /// private void SaveDetail_Relation() { - + //根据列表中的明细项添加 List detailLists = new List(); JArray teamGroupData = Grid1.GetMergedData(); @@ -233,14 +233,14 @@ namespace FineUIPro.Web.CLGL { JObject values = teamGroupRow.Value("values"); int rowIndex = teamGroupRow.Value("index"); - string id = teamGroupRow.Value("id"); + string id = teamGroupRow.Value("id"); - var mdoel=TwInoutplandetailRelationService.GetById(id); + var mdoel = TwInoutplandetailRelationService.GetById(id); if (mdoel != null) { - mdoel.Number= values.Value("Number"); + mdoel.Number = values.Value("Number"); } - TwInoutplandetailRelationService.Update(mdoel); + TwInoutplandetailRelationService.Update(mdoel); } TwInOutplandetailService.GenInOutPlanDetailByInoutPlanMasterId(Id); @@ -263,12 +263,12 @@ namespace FineUIPro.Web.CLGL mdoel.PlanNum = values.Value("PlanNum"); } TwInOutplandetailService.Update(mdoel); - } + } } protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) { - if (e.CommandName == "delete" ) + if (e.CommandName == "delete") { string id = e.RowID; TwInoutplandetailRelationService.DeleteById(id); @@ -296,10 +296,10 @@ namespace FineUIPro.Web.CLGL { txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, drpTypeInt.SelectedText, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode, drpCategory.SelectedText); } - if (drpTypeInt.SelectedValue ==((int)TwConst.TypeInt.散件出库).ToString()) + if (drpTypeInt.SelectedValue == ((int)TwConst.TypeInt.散件出库).ToString()) { - Grid1.Hidden=false; - Grid2.Hidden=true; + Grid1.Hidden = false; + Grid2.Hidden = true; } else diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterOut.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterOut.aspx.cs index 205c3f35..531e8d36 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterOut.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterOut.aspx.cs @@ -1,13 +1,9 @@ -using System; +using BLL; +using Newtonsoft.Json.Linq; +using System; using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using BLL; -using FineUIPro.Web.HSSE.EduTrain; -using Model; -using Newtonsoft.Json.Linq; namespace FineUIPro.Web.CLGL { @@ -43,18 +39,18 @@ namespace FineUIPro.Web.CLGL txtWeldTaskCode.Text = model.WeldTaskCode; var queryModel = new Model.Tw_InOutDetailOutput() - { - InOutPlanMasterId = Id + { + InOutPlanMasterId = Id - }; - var detailList= TwInOutplandetailService.GetByModle(queryModel).ToList(); - foreach (var item in detailList) - { - item.ActNum=item.PlanNum; - - } - Grid1.DataSource=detailList; - Grid1.DataBind(); + }; + var detailList = TwInOutplandetailService.GetByModle(queryModel).ToList(); + foreach (var item in detailList) + { + item.ActNum = item.PlanNum; + + } + Grid1.DataSource = detailList; + Grid1.DataBind(); } } @@ -62,9 +58,9 @@ namespace FineUIPro.Web.CLGL /// /// 保存明细项 /// - private List SaveDetail(string InOutPlanMasterId) + private List SaveDetail(string InOutPlanMasterId) { - + //根据列表中的明细项添加 List detailLists = new List(); JArray teamGroupData = Grid1.GetMergedData(); @@ -79,11 +75,11 @@ namespace FineUIPro.Web.CLGL //ProNoticeCId= values.Value("ProNoticeCId"), MaterialCode = values.Value("MaterialCode"), PlanNum = values.Value("PlanNum"), - ActNum = values.Value("ActNum"), + ActNum = values.Value("ActNum"), }; - + detailLists.Add(newDetail); - } + } return detailLists; } protected void btnEditProcess_Click(object sender, EventArgs e) diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelect.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelect.aspx.cs index 9aa62bfa..af52b468 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelect.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelect.aspx.cs @@ -1,9 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.CLGL @@ -52,7 +49,7 @@ namespace FineUIPro.Web.CLGL { if (!IsPostBack) { - UnitWorkId=Request.QueryString["UnitWorkId"]; + UnitWorkId = Request.QueryString["UnitWorkId"]; Id = Request.QueryString["Id"]; this.InitTreeMenu();//加载树 InitDropList(); @@ -124,7 +121,7 @@ namespace FineUIPro.Web.CLGL foreach (var item in pipeline) { TreeNode newNode = new TreeNode(); - + //bool istrue = BLL.HJGL_MaterialService.isInStockByPipeline(item.PipelineId, this.CurrUser.LoginProjectId); //if (istrue) //{ @@ -214,10 +211,10 @@ namespace FineUIPro.Web.CLGL // 确保 SelectedNodeID 不为空 if (this.tvControlItem.SelectedNodeID == null) { - + return; // 或者显示一个提示 } - int Category=(int)TwInOutplanmasterService.GetById(Id).Category; + int Category = (int)TwInOutplanmasterService.GetById(Id).Category; var tb = (from x in Funs.DB.HJGL_PipeLineMat join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId join z in Funs.DB.Tw_MaterialStock on x.MaterialCode equals z.PipeLineMatCode into zz @@ -227,9 +224,9 @@ namespace FineUIPro.Web.CLGL && z.ProjectId == this.CurrUser.LoginProjectId && y.UnitWorkId == this.UnitWorkId && y.PipelineId == this.tvControlItem.SelectedNodeID - && (x.PrefabricatedComponents==null||x.PrefabricatedComponents=="") + && (x.PrefabricatedComponents == null || x.PrefabricatedComponents == "") + - select new { @@ -240,12 +237,12 @@ namespace FineUIPro.Web.CLGL lib.MaterialSpec, lib.MaterialUnit, PlanNum = x.Number, - StockNum=z.StockNum??0, + StockNum = z.StockNum ?? 0, x.IsLooseParts, }).ToList(); if (Category == (int)TwConst.Category.管段) { - tb=tb.Where(x=>x.MaterialUnit.Contains("米")).ToList(); + tb = tb.Where(x => x.MaterialUnit.Contains("米")).ToList(); } else { @@ -253,8 +250,8 @@ namespace FineUIPro.Web.CLGL } var inoutplandetail = (from x in Funs.DB.Tw_InOutPlanDetail_Relation - //where x.InOutPlanMasterId == Id && x.PipelineId == this.tvControlItem.SelectedNodeID - where x.PipelineId == this.tvControlItem.SelectedNodeID + //where x.InOutPlanMasterId == Id && x.PipelineId == this.tvControlItem.SelectedNodeID + where x.PipelineId == this.tvControlItem.SelectedNodeID && (x.PrefabricatedComponents == null || x.PrefabricatedComponents == "") select x).ToList(); @@ -262,7 +259,7 @@ namespace FineUIPro.Web.CLGL tb = (from x in tb join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy from y in yy.DefaultIfEmpty() - where y == null + where y == null select x).ToList(); @@ -353,7 +350,7 @@ namespace FineUIPro.Web.CLGL } } - } + } TwInOutplandetailService.GenInOutPlanDetailByInoutPlanMasterId(Id); } diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelectStock.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelectStock.aspx.cs index 70180fb3..41734104 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelectStock.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelectStock.aspx.cs @@ -1,17 +1,11 @@ using BLL; -using Model; -using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CLGL { public partial class OutPlanMasterSelectStock : PageBase - { + { public string Id { get @@ -26,7 +20,7 @@ namespace FineUIPro.Web.CLGL protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { Id = Request.QueryString["Id"]; // 绑定表格 this.BindGrid(); @@ -39,7 +33,7 @@ namespace FineUIPro.Web.CLGL /// private void BindGrid() { - + var inoutplanmaster = TwInOutplanmasterService.GetById(Id); if (inoutplanmaster == null) { @@ -58,9 +52,9 @@ namespace FineUIPro.Web.CLGL else if (inoutplanmaster.Category == (int)TwConst.Category.管件) { table.MaterialUnit = "个"; - + } - + var tb = BLL.TwMaterialstockService.GetListData(table, Grid1); Grid1.RecordCount = TwMaterialstockService.Count; //tb = GetFilteredTable(Grid1.FilteredData, tb); @@ -109,7 +103,7 @@ namespace FineUIPro.Web.CLGL PlanNum = 0, }; TwInOutplandetailService.Add(tw_InOutPlanDetail); - } + } } } diff --git a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.cs index f0ac4402..e85d6dfa 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using MiniExcelLibs; using Model; using System; using System.Collections.Generic; @@ -8,10 +9,7 @@ using System.IO; using System.Linq; using System.Text; using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using MiniExcelLibs; -using NPOI.SS.Formula.Functions; namespace FineUIPro.Web.CLGL { @@ -82,9 +80,9 @@ namespace FineUIPro.Web.CLGL table.WarehouseCode = drpWarehouse.SelectedValue; } - if (!string .IsNullOrEmpty(tvControlItem.SelectedNodeID)) + if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { - table.UnitWorkId=tvControlItem.SelectedNodeID; + table.UnitWorkId = tvControlItem.SelectedNodeID; } var tb = BLL.TwOutputmasterService.GetListData(table, Grid1); Grid1.RecordCount = TwOutputmasterService.Count; @@ -105,14 +103,14 @@ namespace FineUIPro.Web.CLGL for (int i = 0; i < Grid2.Rows.Count; i++) { var model = Grid2.Rows[i].DataItem as Model.Tw_InOutDetailOutput; - if (model.ActNum> model.PlanNum) + if (model.ActNum > model.PlanNum) { Grid2.Rows[i].RowCssClass = "yellow"; } else if (model.ActNum < model.PlanNum) { Grid2.Rows[i].RowCssClass = "red"; - } + } } @@ -183,11 +181,11 @@ namespace FineUIPro.Web.CLGL { foreach (var q in unitWork1) { - + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn1 = new TreeNode(); tn1.NodeID = q.UnitWorkId; - tn1.Text = q.UnitWorkName ; + tn1.Text = q.UnitWorkName; tn1.ToolTip = "施工单位:" + unitNamesUnitIds; tn1.EnableClickEvent = true; rootNode1.Nodes.Add(tn1); @@ -197,11 +195,11 @@ namespace FineUIPro.Web.CLGL { foreach (var q in unitWork2) { - + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn2 = new TreeNode(); tn2.NodeID = q.UnitWorkId; - tn2.Text = q.UnitWorkName ; + tn2.Text = q.UnitWorkName; tn2.ToolTip = "施工单位:" + unitNamesUnitIds; tn2.EnableClickEvent = true; rootNode2.Nodes.Add(tn2); @@ -226,7 +224,7 @@ namespace FineUIPro.Web.CLGL /// protected void btnTreeFind_Click(object sender, EventArgs e) { - this.InitTreeMenu(); + this.InitTreeMenu(); } #endregion @@ -237,7 +235,7 @@ namespace FineUIPro.Web.CLGL if (e.RowIndex >= 0) { string ID = Grid1.DataKeys[e.RowIndex][0].ToString(); - BindDetailGrid(ID); + BindDetailGrid(ID); } } @@ -319,8 +317,8 @@ namespace FineUIPro.Web.CLGL return; } - string message= TwInOutplanmasterService.GenPlanMasterByOutputMasterId(Grid1.SelectedRowID, TwConst.TypeInt.退料入库); - if (string .IsNullOrEmpty(message)) + string message = TwInOutplanmasterService.GenPlanMasterByOutputMasterId(Grid1.SelectedRowID, TwConst.TypeInt.退料入库); + if (string.IsNullOrEmpty(message)) { ShowNotify("生成通知单成功!", MessageBoxIcon.Success); } @@ -537,11 +535,11 @@ namespace FineUIPro.Web.CLGL if (buttonList.Count > 0) { if (buttonList.Contains(BLL.Const.BtnAdd)) - { + { } if (buttonList.Contains(BLL.Const.BtnModify)) - { - // this.btnPrint.Hidden = false; + { + // this.btnPrint.Hidden = false; //this.btnMenuInOutPlanMasterEdit.Hidden = false; this.btnGenInPlanMaster.Hidden = false; this.btnGenOutPlanMaster.Hidden = false; @@ -578,7 +576,7 @@ namespace FineUIPro.Web.CLGL List tw_PrintDetails = new List(); Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster { - + ReqUnitName = result.ReqUnitName, CusBillCode = result.CusBillCode, CreateDate = result.CreateDate.Value.ToString("yyyy-MM-dd"), @@ -679,7 +677,7 @@ namespace FineUIPro.Web.CLGL { ["出库明细"] = TwOutputdetailService.GetPrintListByOutputMasterIds(Grid1.SelectedRowIDArray.ToList()), ["管线材料明细"] = TwInoutplandetailRelationService.GetPrintListByOutputMasterIds(Grid1.SelectedRowIDArray.ToList()) - }; + }; string path = Funs.RootPath + @"File\Excel\Temp\OutputDetail.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); diff --git a/SGGL/FineUIPro.Web/CLGL/OutputMasterEdit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutputMasterEdit.aspx.cs index 8cc24785..4806f26e 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutputMasterEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutputMasterEdit.aspx.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CLGL { diff --git a/SGGL/FineUIPro.Web/CQMS/Check/MaterialAcceptance.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/MaterialAcceptance.aspx.cs index d6093ea3..319dc47a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/MaterialAcceptance.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/MaterialAcceptance.aspx.cs @@ -5,9 +5,6 @@ using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Check { diff --git a/SGGL/FineUIPro.Web/CQMS/Check/MaterialAcceptanceEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/MaterialAcceptanceEdit.aspx.cs index 28798414..6a014a83 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/MaterialAcceptanceEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/MaterialAcceptanceEdit.aspx.cs @@ -1,11 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Check { @@ -126,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Check { MaterialAcceptance.MaterialAcceptanceId = MaterialAcceptanceId; CheckMaterialacceptanceService.UpdateCheck_MaterialAcceptance(MaterialAcceptance); - + } else { @@ -144,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Check MaterialAcceptance.CompileMan = this.CurrUser.PersonId; MaterialAcceptance.CompileDate = DateTime.Now; CheckMaterialacceptanceService.AddCheck_MaterialAcceptance(MaterialAcceptance); - + } LogService.AddSys_Log(CurrUser, MaterialAcceptance.PlanCode, MaterialAcceptance.MaterialAcceptanceId, Const.CheckMaterialacceptanceMenuId, "修改总包施工质量计划"); if (saveType == "submit") @@ -179,7 +174,7 @@ namespace FineUIPro.Web.CQMS.Check { if (validate()) { - + SaveMainPlan("submit"); } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs index ee611219..4f2bed65 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs @@ -5,9 +5,6 @@ using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Comprehensive { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs index 92a173b0..a119ae72 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs @@ -5,8 +5,6 @@ using System.Data; using System.Data.OleDb; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Comprehensive @@ -213,7 +211,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive result += (i + 2).ToString() + "," + "交底负责单位" + "," + "[" + row3 + "]不存在!" + "|"; } } - + string row5 = pds.Rows[i][5].ToString(); if (!string.IsNullOrEmpty(row5)) { @@ -240,7 +238,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } } } - + string row8 = pds.Rows[i][8].ToString(); if (string.IsNullOrEmpty(row8)) { @@ -412,7 +410,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive string row0 = pds.Rows[i][0].ToString().Trim(); string row3 = pds.Rows[i][3].ToString().Trim(); var cn = cns.Where(y => y.ProfessionalName == row0).FirstOrDefault(); - oldViewInfo = oldViewInfos.Where(x => x.RemarkCode ==Funs.GetNewInt( pds.Rows[i][8].ToString().Trim()) + oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][8].ToString().Trim()) ).FirstOrDefault(); if (oldViewInfo == null) { @@ -421,7 +419,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive des.ProjectId = this.CurrUser.LoginProjectId; des.CNProfessionalId = cn.CNProfessionalId; des.DisclosureCode = pds.Rows[i][1].ToString().Trim(); - des.DisclosureName= pds.Rows[i][2].ToString().Trim(); + des.DisclosureName = pds.Rows[i][2].ToString().Trim(); des.UnitId = units.Where(x => x.UnitName == row3.Trim()).FirstOrDefault().UnitId; des.DisclosureMan = pds.Rows[i][4].ToString().Trim(); des.DisclosureDate = Funs.GetNewDateTime(pds.Rows[i][5].ToString().Trim()); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataInNew.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataInNew.aspx.cs index 3ae59bd1..73d4c300 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataInNew.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataInNew.aspx.cs @@ -421,7 +421,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } Ins.UnitWorkId = unitIds; } - + if (!string.IsNullOrEmpty(tempData.Value8.Trim())) { Ins.AttendMan = tempData.Value8.Trim(); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataInNewEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataInNewEdit.aspx.cs index f2e70041..c0a15143 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataInNewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataInNewEdit.aspx.cs @@ -1,10 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Comprehensive { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs index dc5a2373..2d57fd29 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs @@ -1,10 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Comprehensive { @@ -124,7 +120,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive newCon.AttendMan = this.txtAttendMan.Text.Trim(); newCon.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); newCon.DisclosurePersonNum = Funs.GetNewInt(this.txtDisclosurePersonNum.Text.Trim()); - + if (string.IsNullOrEmpty(this.ConTechnologyDisclosureId)) { newCon.ConTechnologyDisclosureId = SQLHelper.GetNewID(typeof(Model.Comprehensive_ConTechnologyDisclosure)); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAssurance.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAssurance.aspx.cs index 4ad54666..bc18c336 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAssurance.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAssurance.aspx.cs @@ -4,9 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Comprehensive { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAssuranceEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAssuranceEdit.aspx.cs index b57a072b..3602bccc 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAssuranceEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAssuranceEdit.aspx.cs @@ -1,10 +1,6 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Comprehensive { @@ -118,12 +114,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive { //类别 this.drpType.DataValueField = "Value"; - this.drpType.DataTextField= "Text"; - this.drpType.DataSource= BLL.DropListService.drpQualityAssuranceTypeList(); + this.drpType.DataTextField = "Text"; + this.drpType.DataSource = BLL.DropListService.drpQualityAssuranceTypeList(); this.drpType.DataBind(); Funs.FineUIPleaseSelect(this.drpType); - Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.ProjectId,string.Empty, true); + Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.ProjectId, string.Empty, true); this.drpCompileMan.SelectedValue = this.CurrUser.PersonId; } @@ -135,7 +131,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// protected void btnSave_Click(object sender, EventArgs e) { - if (this.drpType.SelectedValue==BLL.Const._Null) + if (this.drpType.SelectedValue == BLL.Const._Null) { Alert.ShowInTop("请选择类别", MessageBoxIcon.Warning); return; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs index 1e51df76..540b0b21 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs @@ -97,7 +97,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive strSql += " AND C.DraCode='" + txtDraCode.Text.Trim() + "'"; } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs index 5fbc1feb..03fd7c48 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs @@ -5,8 +5,6 @@ using System.Data; using System.Data.OleDb; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Comprehensive diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataInNew.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataInNew.aspx.cs index 694f5632..cb26b1af 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataInNew.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataInNew.aspx.cs @@ -1,7 +1,5 @@ using BLL; -using FineUIPro.Web.ProjectData; using Model; -using NPOI.SS.Formula.Functions; using System; using System.Collections.Generic; using System.Data; @@ -9,9 +7,6 @@ using System.Data.SqlClient; using System.IO; using System.Linq; using System.Threading; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Comprehensive { @@ -421,7 +416,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); } Ins.ReceiveUnits = unitIds; - } + } if (!string.IsNullOrEmpty(tempData.Value6.Trim())) { Ins.Remarks = tempData.Value6.Trim(); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataInNewEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataInNewEdit.aspx.cs index b1107ef1..00cc8a5f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataInNewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataInNewEdit.aspx.cs @@ -1,10 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Comprehensive { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs index abf041db..4b8894d4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs @@ -58,9 +58,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.drpUnitWorkIds.SelectedValueArray = model.UnitWorkId.Split(','); } this.txtDraCode.Text = model.DraCode; - + this.txtReviewDate.Text = model.ReviewDate.HasValue ? string.Format("{0:yyyy-MM-dd}", model.ReviewDate) : ""; - + if (!string.IsNullOrEmpty(model.ReceiveUnits)) { this.drpUnitIds.SelectedValueArray = model.ReceiveUnits.Split(','); @@ -99,8 +99,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive } //else //{ - //this.btnSave.Hidden = false; - //this.btnSubmit.Hidden = false; + //this.btnSave.Hidden = false; + //this.btnSubmit.Hidden = false; //} } } @@ -192,7 +192,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive //} //else //{ - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.ReviewDrawingsMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.ReviewDrawingsMenuId))); //} } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/QualityWorkSummaryReport.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/QualityWorkSummaryReport.aspx.cs index 863e946e..5baca09c 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/QualityWorkSummaryReport.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/QualityWorkSummaryReport.aspx.cs @@ -4,9 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.ManageReport { diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/QualityWorkSummaryReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/QualityWorkSummaryReportEdit.aspx.cs index 1d713401..f103f787 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/QualityWorkSummaryReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/QualityWorkSummaryReportEdit.aspx.cs @@ -181,8 +181,8 @@ namespace FineUIPro.Web.CQMS.ManageReport else { Model.InformationProject_QualityWorkSummaryReport oldReport = (from x in Funs.DB.InformationProject_QualityWorkSummaryReport - where x.ProjectId == report.ProjectId && x.YearId == report.YearId - select x).FirstOrDefault(); + where x.ProjectId == report.ProjectId && x.YearId == report.YearId + select x).FirstOrDefault(); if (oldReport == null) { this.QualityWorkSummaryReportId = SQLHelper.GetNewID(typeof(Model.InformationProject_QualityWorkSummaryReport)); diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/QuarterlyProjectQualityEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/QuarterlyProjectQualityEdit.aspx.cs index 21219bec..fadf3676 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/QuarterlyProjectQualityEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/QuarterlyProjectQualityEdit.aspx.cs @@ -1,7 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; using System.Linq; namespace FineUIPro.Web.CQMS.ManageReport @@ -263,7 +261,7 @@ namespace FineUIPro.Web.CQMS.ManageReport { if (!string.IsNullOrEmpty(this.txtQuarterTotal.Text.Trim()) && !string.IsNullOrEmpty(txtQuarterFirstPassNum.Text.Trim())) { - txtQuarterFirstPassRate.Text = (Funs.GetNewDecimalOrZero(txtQuarterFirstPassNum.Text.Trim()) / Funs.GetNewDecimalOrZero(this.txtQuarterTotal.Text.Trim())*100).ToString(); + txtQuarterFirstPassRate.Text = (Funs.GetNewDecimalOrZero(txtQuarterFirstPassNum.Text.Trim()) / Funs.GetNewDecimalOrZero(this.txtQuarterTotal.Text.Trim()) * 100).ToString(); } else { @@ -280,7 +278,7 @@ namespace FineUIPro.Web.CQMS.ManageReport { if (!string.IsNullOrEmpty(this.txtYearTotal.Text.Trim()) && !string.IsNullOrEmpty(this.txtYearFirstPassNum.Text.Trim())) { - this.txtYearFirstPassRate.Text = (Funs.GetNewDecimalOrZero(this.txtYearFirstPassNum.Text.Trim()) / Funs.GetNewDecimalOrZero(this.txtYearTotal.Text.Trim())*100).ToString(); + this.txtYearFirstPassRate.Text = (Funs.GetNewDecimalOrZero(this.txtYearFirstPassNum.Text.Trim()) / Funs.GetNewDecimalOrZero(this.txtYearTotal.Text.Trim()) * 100).ToString(); } } diff --git a/SGGL/FineUIPro.Web/CQMS/Material/ConstructionTestEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/ConstructionTestEdit.aspx.cs index d4a68c88..77d75125 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/ConstructionTestEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/ConstructionTestEdit.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/ConstructionTestView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/ConstructionTestView.aspx.cs index 3e0b661e..f467ba96 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/ConstructionTestView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/ConstructionTestView.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentIn.aspx.cs index cb0d0ca4..89febe68 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentIn.aspx.cs @@ -5,8 +5,6 @@ using System.Data; using System.Data.OleDb; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material @@ -199,7 +197,7 @@ namespace FineUIPro.Web.CQMS.Material //else //{ if (!string.IsNullOrEmpty(row2)) - { + { var mainItem = mainItems.FirstOrDefault(x => x.MainItemName == row2); if (mainItem == null) { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.cs index d4840f86..8f96d4d2 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentStatistics.aspx.cs index a87565df..ab57d885 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentStatistics.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentView.aspx.cs index 87597997..f70f3b67 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentView.aspx.cs @@ -1,6 +1,4 @@ -using BLL; -using System; -using System.Linq; +using System; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/Inspection.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/Inspection.aspx.cs index 3765d7d2..d51cfe62 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/Inspection.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/Inspection.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Threading.Tasks; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx.cs index e7701c1b..b6dee171 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx.cs @@ -1,12 +1,9 @@ using BLL; -using Newtonsoft.Json.Linq; using System; +using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Collections.Generic; using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/InspectionView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/InspectionView.aspx.cs index 46806684..62eab45b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/InspectionView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/InspectionView.aspx.cs @@ -1,12 +1,8 @@ using BLL; -using Newtonsoft.Json.Linq; using System; +using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialEdit.aspx.cs index 63dc5523..ecd708b8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialEdit.aspx.cs @@ -116,7 +116,7 @@ namespace FineUIPro.Web.CQMS.Material } else { - var oldView = Funs.DB.Material_Material.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId== Material.UnitId && x.ArrivalDate == Material.ArrivalDate + var oldView = Funs.DB.Material_Material.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == Material.UnitId && x.ArrivalDate == Material.ArrivalDate && x.MaterialName == Material.MaterialName && x.SpecificationAndModel == Material.SpecificationAndModel); if (oldView == null) { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialIn.aspx.cs index 41af5240..496edab2 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialIn.aspx.cs @@ -5,8 +5,6 @@ using System.Data; using System.Data.OleDb; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material @@ -161,13 +159,13 @@ namespace FineUIPro.Web.CQMS.Material var oldViewInfos = from x in Funs.DB.Material_Material join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId where x.ProjectId == this.CurrUser.LoginProjectId - select new { x.ProjectId,y.UnitName,x.MaterialName,x.SpecificationAndModel,x.ArrivalDate}; + select new { x.ProjectId, y.UnitName, x.MaterialName, x.SpecificationAndModel, x.ArrivalDate }; var units = from x in Funs.DB.Base_Unit select x; var mainItems = from x in Funs.DB.ProjectData_MainItem where x.ProjectId == this.CurrUser.LoginProjectId select x; for (int i = 0; i < ir; i++) { - var oldViewInfo = oldViewInfos.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitName== pds.Rows[i][1].ToString() + var oldViewInfo = oldViewInfos.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitName == pds.Rows[i][1].ToString() && x.MaterialName == pds.Rows[i][3].ToString() && x.SpecificationAndModel == pds.Rows[i][4].ToString() && x.ArrivalDate == Funs.GetNewDateTime(pds.Rows[i][10].ToString())); if (oldViewInfo == null) { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.cs index 33a61df3..5cac0a91 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialStatistics.aspx.cs index 821e1b4d..5934b410 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialStatistics.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.CQMS.Material { @@ -86,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Material { BindGrid(); } - + /// /// 搜索 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialTest.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialTest.aspx.cs index 29955203..c7eff315 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialTest.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialTest.aspx.cs @@ -190,7 +190,7 @@ namespace FineUIPro.Web.CQMS.Material } if (buttonList.Contains(BLL.Const.BtnDelete)) { - //this.btnMenuDel.Hidden = false; + //this.btnMenuDel.Hidden = false; } } } diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialTestEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialTestEdit.aspx.cs index 907f00d1..683d6cf1 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialTestEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialTestEdit.aspx.cs @@ -1,12 +1,8 @@ using BLL; -using Newtonsoft.Json.Linq; using System; +using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material { @@ -214,7 +210,7 @@ namespace FineUIPro.Web.CQMS.Material materialTest.CompileDate = DateTime.Now; CQMS_MaterialTestService.UpdateMaterialTest(materialTest); Model.Material_Inspection inspection = BLL.CQMS_InspectionService.GetInspectionByInspectionId(materialTest.InspectionId); - if (inspection != null) + if (inspection != null) { if (inspection.State == BLL.Const.Inspection_SpotCheck) //若状态为正在抽检,则更新报验单状态为总包工程师审核 { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialTestView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialTestView.aspx.cs index dca1e1fe..16728bcb 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialTestView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialTestView.aspx.cs @@ -1,12 +1,8 @@ using BLL; -using Newtonsoft.Json.Linq; using System; +using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialView.aspx.cs index 1596139f..8e9f6435 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialView.aspx.cs @@ -1,5 +1,4 @@ -using BLL; -using System; +using System; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/NoticeAndSupervisionEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/NoticeAndSupervisionEdit.aspx.cs index 37d5425f..8b21501c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/NoticeAndSupervisionEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/NoticeAndSupervisionEdit.aspx.cs @@ -1,12 +1,8 @@ using BLL; -using Newtonsoft.Json.Linq; using System; +using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Material/NoticeAndSupervisionView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/NoticeAndSupervisionView.aspx.cs index ccff6879..50ec0a08 100644 --- a/SGGL/FineUIPro.Web/CQMS/Material/NoticeAndSupervisionView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Material/NoticeAndSupervisionView.aspx.cs @@ -1,12 +1,8 @@ using BLL; -using Newtonsoft.Json.Linq; using System; +using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Material { diff --git a/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeeting.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeeting.aspx.cs index d7fbdc54..b8335c64 100644 --- a/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeeting.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeeting.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Threading.Tasks; namespace FineUIPro.Web.CQMS.Meeting { diff --git a/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingEdit.aspx.cs index 084942b0..586d26a4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingEdit.aspx.cs @@ -1,12 +1,7 @@ using BLL; -using Newtonsoft.Json.Linq; using System; using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Meeting { @@ -391,14 +386,14 @@ namespace FineUIPro.Web.CQMS.Meeting if (this.drpHandleType.SelectedValue == Const.CQMSMeeting_Complete) //审批完成 { var getSitePerson = (from x in Funs.DB.SitePerson_Person - join z in Funs.DB.Project_ProjectUnit on x.UnitId equals z.UnitId - where x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.ProjectPersonStates_1 && x.RoleIds != null - && z.UnitType == Const.ProjectUnitType_2 - select new - { - x.PersonId, - RoleNames = BLL.RoleService.getRoleNamesRoleIds(x.RoleIds) - }).AsEnumerable(); + join z in Funs.DB.Project_ProjectUnit on x.UnitId equals z.UnitId + where x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.ProjectPersonStates_1 && x.RoleIds != null + && z.UnitType == Const.ProjectUnitType_2 + select new + { + x.PersonId, + RoleNames = BLL.RoleService.getRoleNamesRoleIds(x.RoleIds) + }).AsEnumerable(); var list = getSitePerson.Where(x => !x.RoleNames.Contains("安全")); foreach (var item in list) { diff --git a/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingFile.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingFile.aspx.cs index 2865fd3d..fb91e21d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingFile.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingFile.aspx.cs @@ -1,12 +1,11 @@ -using BLL; +using Aspose.Words; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; -using System.Threading.Tasks; -using Aspose.Words; using System.IO; +using System.Linq; namespace FineUIPro.Web.CQMS.Meeting { diff --git a/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingView.aspx.cs index ac93262d..fc8aa4a6 100644 --- a/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Meeting/MonthMeetingView.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Meeting { diff --git a/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeeting.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeeting.aspx.cs index 7de2d369..916992e3 100644 --- a/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeeting.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeeting.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Threading.Tasks; namespace FineUIPro.Web.CQMS.Meeting { diff --git a/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingEdit.aspx.cs index f04dc421..44e27178 100644 --- a/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingEdit.aspx.cs @@ -1,12 +1,7 @@ using BLL; -using Newtonsoft.Json.Linq; using System; using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Meeting { diff --git a/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingFile.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingFile.aspx.cs index 2a20bcb7..201f67fd 100644 --- a/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingFile.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingFile.aspx.cs @@ -1,12 +1,11 @@ -using BLL; +using Aspose.Words; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; -using System.Threading.Tasks; -using Aspose.Words; using System.IO; +using System.Linq; namespace FineUIPro.Web.CQMS.Meeting { diff --git a/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingView.aspx.cs index b130b235..78d63de9 100644 --- a/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Meeting/SpecialMeetingView.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Meeting { diff --git a/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx.cs index 61acb001..17c91ee3 100644 --- a/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx.cs @@ -1,11 +1,7 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Data; -using System.Linq; using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.CQMS.Models { diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/CheckerItemView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/CheckerItemView.aspx.cs index a5730462..6a9ec052 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/CheckerItemView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/CheckerItemView.aspx.cs @@ -1,5 +1,4 @@ -using BLL; -using System; +using System; namespace FineUIPro.Web.CQMS.PersonManage { diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanEdit.aspx.cs index b1e2bf8e..70ef1ea9 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanEdit.aspx.cs @@ -1,12 +1,10 @@ using BLL; using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.PersonManage { diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanView.aspx.cs index 66898822..aa75b0ce 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanView.aspx.cs @@ -1,12 +1,9 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.PersonManage { diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordEdit.aspx.cs index 410a16cd..0f0df062 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordEdit.aspx.cs @@ -1,13 +1,10 @@ using BLL; using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; -using Model; namespace FineUIPro.Web.CQMS.PersonManage { diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordView.aspx.cs index b6d463be..e5a3d686 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordView.aspx.cs @@ -1,12 +1,9 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.PersonManage { diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderItemView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderItemView.aspx.cs index a86e7c28..d6434519 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderItemView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderItemView.aspx.cs @@ -1,5 +1,4 @@ -using BLL; -using System; +using System; using System.Linq; namespace FineUIPro.Web.CQMS.PersonManage diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlan.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlan.aspx.cs index d6e32412..cdc30066 100644 --- a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlan.aspx.cs @@ -1,12 +1,10 @@ using BLL; -using FineUIPro.Web.ZHGL.Plan; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using System.Threading.Tasks; namespace FineUIPro.Web.CQMS.Plan { @@ -242,7 +240,7 @@ namespace FineUIPro.Web.CQMS.Plan } string id = Grid1.SelectedRowID; var ins = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanId(id); - if (File.Exists(Funs.RootPath+ins.FilePath)) + if (File.Exists(Funs.RootPath + ins.FilePath)) { File.Delete(Funs.RootPath + ins.FilePath); @@ -397,9 +395,9 @@ namespace FineUIPro.Web.CQMS.Plan { var ins = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanId(Grid1.SelectedRowID); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/OnlineEditing.aspx?UserId={0}&PCUrl={1}", this.CurrUser.PersonId, ins.FilePath,"查看 -"))); - // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMSMainPlan", Grid1.SelectedRowID, "查看 -"))); - // PageContext.RegisterStartupScript(Window1.GetHideReference()); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/OnlineEditing.aspx?UserId={0}&PCUrl={1}", this.CurrUser.PersonId, ins.FilePath, "查看 -"))); + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMSMainPlan", Grid1.SelectedRowID, "查看 -"))); + // PageContext.RegisterStartupScript(Window1.GetHideReference()); } else diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.cs index 51593397..82917878 100644 --- a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanEdit.aspx.cs @@ -1,13 +1,10 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; using System.Collections.Generic; +using System.Data; +using System.IO; using System.Linq; using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; -using System.IO; namespace FineUIPro.Web.CQMS.Plan { @@ -66,7 +63,7 @@ namespace FineUIPro.Web.CQMS.Plan hdId.Text = this.MainPlanId; txtPlanCode.Text = MainPlan.PlanCode; txtFileName.Text = MainPlan.FileName; - + List list = BLL.CQMS_MainPlanApproveService.GetAudit3PersonIds(MainPlanId); if (list.Count > 0) { @@ -112,7 +109,7 @@ namespace FineUIPro.Web.CQMS.Plan this.btnSubmit.Visible = false; this.next.Hidden = true; } - + drpHandleType_SelectedIndexChanged(null, null); } else @@ -120,7 +117,7 @@ namespace FineUIPro.Web.CQMS.Plan string prefix = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId) + "-ZBJH-"; txtPlanCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "Plan_MainPlan", "PlanCode", this.CurrUser.LoginProjectId, prefix); txtFileName.Text = "总包施工质量计划"; - drpHandleType.DataSource = BLL.CQMS_MainPlanService.GetDHandleTypeByState(BLL.Const.MainPlan_Compile,string.Empty); + drpHandleType.DataSource = BLL.CQMS_MainPlanService.GetDHandleTypeByState(BLL.Const.MainPlan_Compile, string.Empty); drpHandleType.DataBind(); drpHandleType_SelectedIndexChanged(null, null); } @@ -416,7 +413,7 @@ namespace FineUIPro.Web.CQMS.Plan } } LogService.AddSys_Log(CurrUser, MainPlan.PlanCode, MainPlan.MainPlanId, Const.MainPlanMenuId, "修改总包施工质量计划"); - if (saveType== "submit") + if (saveType == "submit") { PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); @@ -487,13 +484,13 @@ namespace FineUIPro.Web.CQMS.Plan { Directory.CreateDirectory(newPath); } - if (drpCompanyTemplate.SelectedValue!=Const._Null) + if (drpCompanyTemplate.SelectedValue != Const._Null) { var template = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(drpCompanyTemplate.SelectedValue); File.Copy(rootPath + template.FilePath, path); - } + } PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMSMainPlan", MainPlanId, "查看 -"))); PageContext.RegisterStartupScript(WindowAtt.GetHideReference()); } @@ -531,9 +528,9 @@ namespace FineUIPro.Web.CQMS.Plan if (!File.Exists(Funs.RootPath + MainPlan.FilePath)) { - drpCompanyTemplate.Hidden= false; + drpCompanyTemplate.Hidden = false; } - + } else { @@ -544,18 +541,18 @@ namespace FineUIPro.Web.CQMS.Plan } protected void btnEditWord_Click(object sender, EventArgs e) { - + if (!string.IsNullOrEmpty(MainPlanId)) { Model.Plan_MainPlan MainPlan = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanId(MainPlanId); if (!File.Exists(Funs.RootPath + MainPlan.FilePath)) { GetCompanyTemplate(); - //PageContext.RegisterStartupScript(Confirm.GetShowReference("是否使用公司模板?", - // String.Empty, - // MessageBoxIcon.Question, - // PageManager1.GetCustomEventReference("Yes"), // 第一个参数 false 用来指定当前不是AJAX请求 - // PageManager1.GetCustomEventReference("No"))); + //PageContext.RegisterStartupScript(Confirm.GetShowReference("是否使用公司模板?", + // String.Empty, + // MessageBoxIcon.Question, + // PageManager1.GetCustomEventReference("Yes"), // 第一个参数 false 用来指定当前不是AJAX请求 + // PageManager1.GetCustomEventReference("No"))); } else { diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanView.aspx.cs index aee51372..fb79fa2b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Plan/MainPlanView.aspx.cs @@ -1,12 +1,9 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Plan { diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx.cs index b72821f8..8ec85103 100644 --- a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx.cs @@ -5,7 +5,6 @@ using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using System.Net; namespace FineUIPro.Web.CQMS.Plan { diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.cs index f3bb3fe8..0ff64294 100644 --- a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.ZHGL.Plan; using System; using System.Collections.Generic; using System.IO; @@ -78,7 +77,7 @@ namespace FineUIPro.Web.CQMS.Plan HFSubPlanId.Text = SubPlanId; Model.Plan_SubPlan SubPlan = CQMS_SubPlanService.GetSubPlanBySubPlanId(SubPlanId); txtCode.Text = SubPlan.Code; - + if (!string.IsNullOrEmpty(SubPlan.UnitId)) { drpUnit.SelectedValue = SubPlan.UnitId; @@ -535,7 +534,7 @@ namespace FineUIPro.Web.CQMS.Plan CQMS_SubPlanService.AddSubPlan(SubPlan); } - + if (saveType == "submit") { Model.Plan_SubPlanApprove approve1 = new Model.Plan_SubPlanApprove(); diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/TechnicalProposalReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Plan/TechnicalProposalReviewEdit.aspx.cs index be04714c..e97a9a6e 100644 --- a/SGGL/FineUIPro.Web/CQMS/Plan/TechnicalProposalReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Plan/TechnicalProposalReviewEdit.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Plan { diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/TechnicalProposalReviewView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Plan/TechnicalProposalReviewView.aspx.cs index 476ea58c..6c531b84 100644 --- a/SGGL/FineUIPro.Web/CQMS/Plan/TechnicalProposalReviewView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Plan/TechnicalProposalReviewView.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Plan { diff --git a/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs index caea247c..3c4fd2f6 100644 --- a/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs @@ -37,9 +37,9 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage this.ucTree.ProjectId = this.ProjectId; // if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) ) // { - this.panelLeftRegion.Hidden = true; - ////权限按钮方法 - this.GetButtonPower(); + this.panelLeftRegion.Hidden = true; + ////权限按钮方法 + this.GetButtonPower(); // } btnNew.OnClientClick = Window1.GetShowReference("QCGroupRegistrationEdit.aspx") + "return false;"; BindGrid(); @@ -166,8 +166,8 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage foreach (int rowIndex in Grid1.SelectedRowIndexArray) { string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - var QCGroupRegistration = BLL.QCManage_QCGroupRegistrationService.GetQCGroupRegistrationByQCGroupRegistrationId(rowID); - + var QCGroupRegistration = BLL.QCManage_QCGroupRegistrationService.GetQCGroupRegistrationByQCGroupRegistrationId(rowID); + if (QCGroupRegistration != null) { if (QCGroupRegistration.IsUpdate == true) @@ -192,7 +192,7 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage BLL.QCManage_QCGroupRegistrationService.DeleteQCGroupRegistrationById(rowID); } } - + } BindGrid(); diff --git a/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs index 613dec68..295d439a 100644 --- a/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.QualityActivity.QCManage { @@ -59,13 +52,15 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage if (!string.IsNullOrEmpty(QCGroupRegistration.AwardType)) { drpAwardType.SelectedValue = QCGroupRegistration.AwardType; - if (QCGroupRegistration.AwardType == "1") { + if (QCGroupRegistration.AwardType == "1") + { drpAwardLevel.Items.Add(new ListItem("鲁班奖", "1")); drpAwardLevel.Items.Add(new ListItem("国优奖", "2")); drpAwardLevel.Items.Add(new ListItem("省部级", "3")); drpAwardLevel.Items.Add(new ListItem("市级", "4")); } - else if (QCGroupRegistration.AwardType == "2") { + else if (QCGroupRegistration.AwardType == "2") + { drpAwardLevel.Items.Add(new ListItem("省部级", "5")); drpAwardLevel.Items.Add(new ListItem("集团级", "6")); drpAwardLevel.Items.Add(new ListItem("企业级", "7")); @@ -159,20 +154,22 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage } PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } - + protected void Change_AwardType(object sender, EventArgs eventArgs) { - + drpAwardLevel.Items.Clear(); drpAwardLevel.Items.Add(new ListItem("-请选择-", "")); - - if (drpAwardType.SelectedValue == "1") { + + if (drpAwardType.SelectedValue == "1") + { drpAwardLevel.Items.Add(new ListItem("鲁班奖", "1")); drpAwardLevel.Items.Add(new ListItem("国优奖", "2")); drpAwardLevel.Items.Add(new ListItem("省部级", "3")); drpAwardLevel.Items.Add(new ListItem("市级", "4")); } - else if (drpAwardType.SelectedValue == "2") { + else if (drpAwardType.SelectedValue == "2") + { drpAwardLevel.Items.Add(new ListItem("省部级", "5")); drpAwardLevel.Items.Add(new ListItem("集团级", "6")); drpAwardLevel.Items.Add(new ListItem("企业级", "7")); @@ -182,8 +179,8 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage { drpAwardLevel.SelectedIndex = 0; } - + } - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs index 28bece20..b018d952 100644 --- a/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.QualityActivity.QCManage { @@ -58,13 +51,15 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage if (!string.IsNullOrEmpty(QCGroupRegistration.AwardType)) { drpAwardType.SelectedValue = QCGroupRegistration.AwardType; - if (QCGroupRegistration.AwardType == "1") { + if (QCGroupRegistration.AwardType == "1") + { drpAwardLevel.Items.Add(new ListItem("鲁班奖", "1")); drpAwardLevel.Items.Add(new ListItem("国优奖", "2")); drpAwardLevel.Items.Add(new ListItem("省部级", "3")); drpAwardLevel.Items.Add(new ListItem("市级", "4")); } - else if (QCGroupRegistration.AwardType == "2") { + else if (QCGroupRegistration.AwardType == "2") + { drpAwardLevel.Items.Add(new ListItem("省部级", "5")); drpAwardLevel.Items.Add(new ListItem("集团级", "6")); drpAwardLevel.Items.Add(new ListItem("企业级", "7")); @@ -102,19 +97,21 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage } PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/QCGroupRegistration&menuId={1}", hdId.Text, BLL.Const.ProjectQCGroupRegistrationListMenuId))); } - + protected void Change_AwardType(object sender, EventArgs eventArgs) { - + drpAwardLevel.Items.Clear(); drpAwardLevel.Items.Add(new ListItem("-请选择-", "")); - - if (drpAwardType.SelectedValue == "1") { + + if (drpAwardType.SelectedValue == "1") + { drpAwardLevel.Items.Add(new ListItem("国家级", "1")); drpAwardLevel.Items.Add(new ListItem("省部级", "2")); drpAwardLevel.Items.Add(new ListItem("市级", "3")); } - else if (drpAwardType.SelectedValue == "2") { + else if (drpAwardType.SelectedValue == "2") + { drpAwardLevel.Items.Add(new ListItem("省部级", "4")); drpAwardLevel.Items.Add(new ListItem("集团级", "5")); drpAwardLevel.Items.Add(new ListItem("企业级", "6")); @@ -124,7 +121,7 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage { drpAwardLevel.SelectedIndex = 0; } - + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs index 1a0345df..f9cfbad0 100644 --- a/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs @@ -3,10 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.QualityActivity.QCManage { @@ -67,11 +63,11 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage /// //protected void changeTree(object sender, EventArgs e) //{ - //this.ProjectId = this.ucTree.ProjectId; - //this.GetButtonPower(); - //if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) - //{ - //} + //this.ProjectId = this.ucTree.ProjectId; + //this.GetButtonPower(); + //if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + //{ + //} // this.BindGrid(); //} /// @@ -156,8 +152,8 @@ namespace FineUIPro.Web.CQMS.QualityActivity.QCManage protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) { BindGrid(); - } - + } + /// /// 统计按钮 /// diff --git a/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunish.aspx.cs b/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunish.aspx.cs index 024bbf27..03c5d50b 100644 --- a/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunish.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunish.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Threading.Tasks; namespace FineUIPro.Web.CQMS.RewardAndPunish { @@ -66,7 +65,7 @@ namespace FineUIPro.Web.CQMS.RewardAndPunish strSql += " AND ins.UnitId=@UnitId"; listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue)); } - if (this.rblType.SelectedValue != "0") + if (this.rblType.SelectedValue != "0") { strSql += " AND ins.Type=@Type"; listStr.Add(new SqlParameter("@Type", rblType.SelectedValue)); diff --git a/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunishEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunishEdit.aspx.cs index c443c07f..425711f1 100644 --- a/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunishEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunishEdit.aspx.cs @@ -1,12 +1,7 @@ using BLL; -using Newtonsoft.Json.Linq; using System; using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.RewardAndPunish { diff --git a/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunishView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunishView.aspx.cs index b58d3e07..82c83572 100644 --- a/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunishView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunishView.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.RewardAndPunish { diff --git a/SGGL/FineUIPro.Web/CQMS/Technical/Rectify.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Technical/Rectify.aspx.cs index 780884ef..fd6a1272 100644 --- a/SGGL/FineUIPro.Web/CQMS/Technical/Rectify.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Technical/Rectify.aspx.cs @@ -98,7 +98,7 @@ namespace FineUIPro.Web.CQMS.Technique /// private void BoundTree(TreeNodeCollection nodes, string menuId) { - var dt = BLL.RectifyService.GetRectifyBySupRectifyId(menuId,"1"); + var dt = BLL.RectifyService.GetRectifyBySupRectifyId(menuId, "1"); if (dt.Count() > 0) { TreeNode tn = null; @@ -388,7 +388,7 @@ namespace FineUIPro.Web.CQMS.Technique BindGrid(); } #endregion - + #region 导出 /// /// 关闭导出窗口 @@ -549,7 +549,7 @@ namespace FineUIPro.Web.CQMS.Technique { this.btnDelete.Hidden = false; this.btnMenuDelete.Hidden = false; - } + } if (buttonList.Contains(BLL.Const.BtnOut)) { this.btnSelectColumns.Hidden = false; diff --git a/SGGL/FineUIPro.Web/CQMS/Technical/RectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Technical/RectifyEdit.aspx.cs index 6f0ff89e..ec859e8c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Technical/RectifyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Technical/RectifyEdit.aspx.cs @@ -106,7 +106,7 @@ namespace FineUIPro.Web.CQMS.Technique rectify.SupRectifyId = this.SupRectifyId; rectify.RectifyId = SQLHelper.GetNewID(typeof(Model.Technique_Rectify)); BLL.RectifyService.AddRectify(rectify); - + BLL.LogService.AddSys_Log(this.CurrUser, rectify.RectifyName, rectify.RectifyId, BLL.Const.CQMSRectifyMenuId, Const.BtnAdd); } else @@ -118,7 +118,7 @@ namespace FineUIPro.Web.CQMS.Technique } rectify.RectifyId = this.RectifyId; BLL.RectifyService.UpdateRectify(rectify); - + BLL.LogService.AddSys_Log(this.CurrUser, rectify.RectifyName, rectify.RectifyId, BLL.Const.CQMSRectifyMenuId, Const.BtnModify); } PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); diff --git a/SGGL/FineUIPro.Web/CQMS/Technical/RectifyItemEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Technical/RectifyItemEdit.aspx.cs index 240f255a..4d7a374d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Technical/RectifyItemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Technical/RectifyItemEdit.aspx.cs @@ -135,7 +135,7 @@ namespace FineUIPro.Web.CQMS.Technique SaveData(); } #endregion - + #region 获取按钮权限 /// /// 获取按钮权限 diff --git a/SGGL/FineUIPro.Web/CQMS/Technical/RectifySelectCloumn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Technical/RectifySelectCloumn.aspx.cs index 7ba5d3b9..6ddfd3a7 100644 --- a/SGGL/FineUIPro.Web/CQMS/Technical/RectifySelectCloumn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Technical/RectifySelectCloumn.aspx.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Technique { diff --git a/SGGL/FineUIPro.Web/CQMS/Technical/TechnicalDiscloseEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Technical/TechnicalDiscloseEdit.aspx.cs index 9eb1cee1..06c38562 100644 --- a/SGGL/FineUIPro.Web/CQMS/Technical/TechnicalDiscloseEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Technical/TechnicalDiscloseEdit.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Technical { diff --git a/SGGL/FineUIPro.Web/CQMS/Technical/TechnicalDiscloseView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Technical/TechnicalDiscloseView.aspx.cs index bf890113..c08891f8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Technical/TechnicalDiscloseView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Technical/TechnicalDiscloseView.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Technical { diff --git a/SGGL/FineUIPro.Web/CQMS/Train/TrainPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Train/TrainPlanEdit.aspx.cs index 8fd99a31..e661b40c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Train/TrainPlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Train/TrainPlanEdit.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Train { diff --git a/SGGL/FineUIPro.Web/CQMS/Train/TrainPlanView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Train/TrainPlanView.aspx.cs index 97528bdc..c10312a4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Train/TrainPlanView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Train/TrainPlanView.aspx.cs @@ -1,12 +1,4 @@ -using BLL; -using Newtonsoft.Json.Linq; -using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; +using System; namespace FineUIPro.Web.CQMS.Train { diff --git a/SGGL/FineUIPro.Web/CQMS/Train/TrainRecordEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Train/TrainRecordEdit.aspx.cs index 06330d39..f4189716 100644 --- a/SGGL/FineUIPro.Web/CQMS/Train/TrainRecordEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Train/TrainRecordEdit.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Train { @@ -49,7 +42,7 @@ namespace FineUIPro.Web.CQMS.Train TrainPlanId = Request.Params["TrainPlanId"]; BLL.CQMSTrainObjectService.InitTrainObjectDropDownList(this.drpPlanTrainPersons, true); BLL.SitePerson_PersonService.InitProjectUserListByProjectUnitTypeDropDownList(this.drpRealTrainPersons, this.CurrUser.LoginProjectId, Const.ProjectUnitType_1 + "," + Const.ProjectUnitType_2, true); - BLL.SitePerson_PersonService.InitSitePersonByUnitTypeRoletIdsDropDownList(this.drpHostMan,this.CurrUser.LoginProjectId, Const.ProjectUnitType_1, Const.QAManager + "," + Const.CQEngineer, true); + BLL.SitePerson_PersonService.InitSitePersonByUnitTypeRoletIdsDropDownList(this.drpHostMan, this.CurrUser.LoginProjectId, Const.ProjectUnitType_1, Const.QAManager + "," + Const.CQEngineer, true); BLL.CQMSTrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true); if (!string.IsNullOrEmpty(TrainPlanId)) { diff --git a/SGGL/FineUIPro.Web/CQMS/Train/TrainRecordView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Train/TrainRecordView.aspx.cs index c67a75b7..28c0eeb5 100644 --- a/SGGL/FineUIPro.Web/CQMS/Train/TrainRecordView.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Train/TrainRecordView.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Train { diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/SelectUnit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/SelectUnit.aspx.cs index 94b05c28..de4d09a5 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/SelectUnit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/SelectUnit.aspx.cs @@ -1,8 +1,5 @@ using BLL; using System; -using System.Linq; -using System.Web.UI.WebControls; -using Model; namespace FineUIPro.Web.CQMS.WBS { @@ -52,7 +49,7 @@ namespace FineUIPro.Web.CQMS.WBS var controlItemAndCycle = BLL.ControlItemAndCycleService.GetControlItemAndCycleById(dataId); if (controlItemAndCycle != null) { - discloseName= controlItemAndCycle.ControlItemContent; + discloseName = controlItemAndCycle.ControlItemContent; } } technicalDisclose.DiscloseName = discloseName; diff --git a/SGGL/FineUIPro.Web/Controls/ChartControl.ascx.cs b/SGGL/FineUIPro.Web/Controls/ChartControl.ascx.cs index d80bdfd3..312cde56 100644 --- a/SGGL/FineUIPro.Web/Controls/ChartControl.ascx.cs +++ b/SGGL/FineUIPro.Web/Controls/ChartControl.ascx.cs @@ -1,12 +1,6 @@ -using NPOI.SS.Formula.Functions; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; +using System; using System.Data; using System.Drawing; -using System.Linq; -using System.Reflection; using System.Web.UI.DataVisualization.Charting; namespace Web.Controls @@ -457,7 +451,7 @@ namespace Web.Controls chart1.Series["BCWS百分比"].Points.DataBindXY(dv, "月份", dv, "BCWS百分比"); chart1.Series["BCWS百分比"].Color = Color.MediumSeaGreen; chart1.Series["BCWS百分比"].BorderWidth = 2; - chart1.Series["BCWS百分比"].ChartType =SeriesChartType.Spline; + chart1.Series["BCWS百分比"].ChartType = SeriesChartType.Spline; for (int i = 0; i < chart1.Series["BCWS百分比"].Points.Count; i++) { diff --git a/SGGL/FineUIPro.Web/Controls/Fastreport.aspx.cs b/SGGL/FineUIPro.Web/Controls/Fastreport.aspx.cs index 2eb4e7ac..83dc2319 100644 --- a/SGGL/FineUIPro.Web/Controls/Fastreport.aspx.cs +++ b/SGGL/FineUIPro.Web/Controls/Fastreport.aspx.cs @@ -1,12 +1,7 @@ using BLL; -using FastReport; using System; using System.Collections.Generic; using System.Data; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.Controls { @@ -43,7 +38,7 @@ namespace FineUIPro.Web.Controls { ReportPath = Request.Params["ReportPath"]; WebReport1.StartReport += WebReport1_StartReport; - if (dataTables!=null&&dataTables.Count > 0) + if (dataTables != null && dataTables.Count > 0) { for (int i = 0; i < dataTables.Count; i++) { @@ -59,11 +54,11 @@ namespace FineUIPro.Web.Controls } WebReport1.ReportFile = ReportPath; WebReport1.Prepare(); - // WebReport1.ExportPdf(); + // WebReport1.ExportPdf(); } private void WebReport1_StartReport(object sender, EventArgs e) { - if (ParameterValues!=null&&ParameterValues.Count > 0) + if (ParameterValues != null && ParameterValues.Count > 0) { foreach (KeyValuePair kvp in ParameterValues) { diff --git a/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.cs b/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.cs index fe3b7f15..7f8d77e3 100644 --- a/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.cs +++ b/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.cs @@ -1,9 +1,6 @@ using BLL; -using Org.BouncyCastle.Asn1.Cms; using System; -using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; namespace FineUIPro.Web.Controls @@ -51,7 +48,7 @@ namespace FineUIPro.Web.Controls if (!IsPostBack) { this.UnitId = this.UnitId ?? BLL.Const.UnitId_SEDIN; - this.ProjectId=this.ProjectId; + this.ProjectId = this.ProjectId; ////加载树 SetSubUnitProjectTree(this.tvProject); } @@ -75,7 +72,7 @@ namespace FineUIPro.Web.Controls } else { - this.UnitId=this.tvProject.SelectedNode.ParentNode.NodeID; + this.UnitId = this.tvProject.SelectedNode.ParentNode.NodeID; this.ProjectId = this.tvProject.SelectedNodeID; } if (this.change != null) @@ -117,7 +114,7 @@ namespace FineUIPro.Web.Controls FineUIPro.TreeNode crootNode = new FineUIPro.TreeNode { - // Text =item.UnitCode+":"+ item.UnitName, + // Text =item.UnitCode+":"+ item.UnitName, NodeID = item.UnitId, EnableClickEvent = true }; diff --git a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs index 425edc6b..9e9e1771 100644 --- a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs +++ b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs @@ -39,7 +39,7 @@ namespace FineUIPro.Web.Controls this.Toolbar1.Hidden = !IsShowLevel; ////加载树 SetSubUnitProjectTree(this.trWBS); - + } } #endregion @@ -72,7 +72,7 @@ namespace FineUIPro.Web.Controls ////加载树 SetSubUnitProjectTree(this.trWBS); } - + #region 绑定分公司 单位-项目树 /// diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.cs index e6083ee3..1aaa265b 100644 --- a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.cs +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Windows.Forms; -using System.Xml.Linq; namespace FineUIPro.Web.DCGL.ServerCheck { diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs index c56c2986..1693560a 100644 --- a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs @@ -1,8 +1,8 @@ -using System; +using BLL; +using Newtonsoft.Json.Linq; +using System; using System.Collections.Generic; using System.Linq; -using BLL; -using Newtonsoft.Json.Linq; namespace FineUIPro.Web.DCGL.ServerCheck { diff --git a/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs index 5ceea304..c4548ce4 100644 --- a/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs @@ -1,12 +1,8 @@ -using Aspose.Words; -using BLL; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; -using System.Linq; -using System.Text; namespace FineUIPro.Web.DataShow { @@ -255,10 +251,10 @@ namespace FineUIPro.Web.DataShow Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } - if (this.rbCom.SelectedValue == "1"|| this.rbCom.SelectedValue == "2" || this.rbCom.SelectedValue == "3") + if (this.rbCom.SelectedValue == "1" || this.rbCom.SelectedValue == "2" || this.rbCom.SelectedValue == "3") { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ZHGL/Supervise/SuperviseCheckReportEdit.aspx?SuperviseCheckReportId={0}&type=-1", Grid1.SelectedRowID, "查看 - "))); - } + } else if (this.rbCom.SelectedValue == "4") { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Check/ProjectLeaderCheckView.aspx?ProjectLeaderCheckId={0}", Grid1.SelectedRowID, "查看 - "))); @@ -273,7 +269,7 @@ namespace FineUIPro.Web.DataShow } } #endregion - + /// /// /// diff --git a/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs index 5eecf62d..a2d23d2b 100644 --- a/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -31,7 +30,7 @@ namespace FineUIPro.Web.DataShow /// private void BindGrid() { - + string strSql = @"SELECT Person.PersonId,Unit.UnitName, Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone FROM Person_Persons AS Person LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId diff --git a/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs index ed91421c..4442fd90 100644 --- a/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using Model; using System; using System.Collections.Generic; using System.Data; @@ -174,9 +173,9 @@ namespace FineUIPro.Web.DataShow { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/InApproveManager/GeneralEquipmentInView.aspx?EquipmentInId={0}", getGEQ.GeneralEquipmentInId, "查看 - "))); } - } + } + - } #endregion diff --git a/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs index 810102d3..3686135b 100644 --- a/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -124,8 +123,8 @@ namespace FineUIPro.Web.DataShow this.Grid1.Columns[1].Hidden = true; } } - - #endregion + + #endregion #region 表排序、分页、关闭窗口 /// @@ -189,7 +188,7 @@ namespace FineUIPro.Web.DataShow { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../HSSE/Emergency/EmergencyListView.aspx?EmergencyListId={0}", Grid1.SelectedRowID, "查看 - "))); } - + } #endregion diff --git a/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs index 9b3ab253..f8c76f08 100644 --- a/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs @@ -169,7 +169,7 @@ namespace FineUIPro.Web.DataShow { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../ZHGL/Environmental/ArchitectureReportSave.aspx?ArchitectureReportId={0}&type=-1", Grid1.SelectedRowID, "查看 - "))); } - + } #endregion diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs index aa77eadd..75d77c62 100644 --- a/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs @@ -37,7 +37,7 @@ namespace FineUIPro.Web.DataShow FROM HJGL_Batch_NDEItem AS Item LEFT JOIN HJGL_Batch_NDE AS Checks ON Item.NDEID =Checks.NDEID LEFT JOIN Base_Project AS Project ON Checks.ProjectId =Project.ProjectId - WHERE IsCNCECShow=1 "; + WHERE IsCNCECShow=1 "; List listStr = new List(); if (this.drpProject.SelectedValue != Const._Null) diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs index 1c4cae2c..aec9edfd 100644 --- a/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -31,7 +30,7 @@ namespace FineUIPro.Web.DataShow /// 绑定数据 /// private void BindGrid() - { + { string strSql = @"SELECT Welder.SitePersonId as WED_ID,Welder.ProjectId,Project.ProjectCode,Project.ProjectName,Welder.UnitId AS WED_Unit,Unit.UnitName ,Welder.WelderCode as WED_WorkCode,Welder.PersonName FROM SitePerson_Person AS Welder @@ -39,9 +38,9 @@ namespace FineUIPro.Web.DataShow LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Welder.UnitId LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId = Welder.TeamGroupId WHERE IsCNCECShow=1 AND Welder.WorkPostId=@WorkPostId AND Welder.ProjectId IS NOT NULL"; - List listStr = new List(); + List listStr = new List(); listStr.Add(new SqlParameter("@WorkPostId", Const.WorkPost_Welder)); - if (this.drpProject.SelectedValue !=Const._Null) + if (this.drpProject.SelectedValue != Const._Null) { strSql += " AND Welder.ProjectId = @ProjectId"; listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs index 746beaff..29a71199 100644 --- a/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs @@ -28,7 +28,7 @@ namespace FineUIPro.Web.DataShow } } - + /// /// 绑定数据 /// @@ -57,7 +57,7 @@ namespace FineUIPro.Web.DataShow // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; //} - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -167,7 +167,7 @@ namespace FineUIPro.Web.DataShow { var getD1 = from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == projectId.ToString() - select x; + select x; if (getD1.Count() > 0) { cout1 = getD1.Sum(x => x.Size ?? 0); @@ -190,7 +190,7 @@ namespace FineUIPro.Web.DataShow var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); var getD1 = from x in Funs.DB.HJGL_WeldJoint join y in Funs.DB.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId - where x.ProjectId == projectId.ToString() + where x.ProjectId == projectId.ToString() select new { x.Size, y.WeldingDate }; if (datetime1.HasValue) { @@ -203,7 +203,7 @@ namespace FineUIPro.Web.DataShow if (getD1.Count() > 0) { cout1 += getD1.Sum(x => x.Size ?? 0); - } + } } return cout1; } diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.cs index 60ef1f35..9e6ee118 100644 --- a/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWeldingItem.aspx.cs @@ -19,7 +19,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { string projectId = Request.Params["projectId"]; - this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + this.txtProject.Text = ProjectService.GetProjectNameByProjectId(projectId); Funs.DropDownPageSize(this.ddlPageSize); btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); @@ -35,7 +35,7 @@ namespace FineUIPro.Web.DataShow { var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); - var View_HJGL_WeldJoint =from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == Request.Params["projectId"] select x; + var View_HJGL_WeldJoint = from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == Request.Params["projectId"] select x; if (datetime1.HasValue) { View_HJGL_WeldJoint = View_HJGL_WeldJoint.Where(x => x.WeldingDateD >= datetime1.Value); diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs index a40f7d68..73a9cc5e 100644 --- a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs @@ -74,7 +74,7 @@ namespace FineUIPro.Web.DataShow /// private void OutputSummaryData() { - + string rate = "0%"; unCount = allCount - okCount; if (allCount > 0) @@ -86,7 +86,7 @@ namespace FineUIPro.Web.DataShow { "ProjectName", "合计" }, { "Count1", allCount.ToString() }, { "Count2", okCount.ToString() }, - { "Count3", unCount.ToString() }, + { "Count3", unCount.ToString() }, { "Count4", rate} }; Grid1.SummaryData = summary; @@ -174,7 +174,7 @@ namespace FineUIPro.Web.DataShow PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); } #endregion - + protected void btnView_Click(object sender, EventArgs e) { @@ -193,7 +193,7 @@ namespace FineUIPro.Web.DataShow { var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); - var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.States != "4"); + var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.States != "4"); if (datetime1.HasValue) { getT = getT.Where(x => x.RegisterDate >= datetime1); @@ -245,7 +245,7 @@ namespace FineUIPro.Web.DataShow { getT = getT.Where(x => x.HazardValue != "3"); } - + okCount = getT.Count(); if (okCount > 0) @@ -264,7 +264,7 @@ namespace FineUIPro.Web.DataShow { var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); - var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "3" && x.States != "4"); + var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "3" && x.States != "4"); if (datetime1.HasValue) { getT = getT.Where(x => x.RegisterDate >= datetime1); @@ -288,12 +288,12 @@ namespace FineUIPro.Web.DataShow protected string Count4(object projectId) { - string rate=string.Empty; + string rate = string.Empty; if (projectId != null) { var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); - var getALL= Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4"); + var getALL = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4"); if (this.rbType.SelectedValue == "0") { getALL = getALL.Where(x => x.HazardValue == "3"); diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs index 9a1541b5..f3ec29ba 100644 --- a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -21,7 +20,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { string projectId = Request.Params["projectId"]; - this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + this.txtProject.Text = ProjectService.GetProjectNameByProjectId(projectId); Funs.DropDownPageSize(this.ddlPageSize); btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); @@ -81,7 +80,7 @@ namespace FineUIPro.Web.DataShow } if (this.rbType.SelectedValue == "0") { - strSql += " AND HazardValue =@HazardValue"; + strSql += " AND HazardValue =@HazardValue"; } else { diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs index f4c7ad48..53f0d318 100644 --- a/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs @@ -33,7 +33,7 @@ namespace FineUIPro.Web.DataShow } } - public static List LargerHazard = new List(); + public static List LargerHazard = new List(); /// /// 绑定数据 @@ -161,7 +161,7 @@ namespace FineUIPro.Web.DataShow PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LargeEngineeringItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); } #endregion - + /// /// /// @@ -180,8 +180,8 @@ namespace FineUIPro.Web.DataShow /// protected int Count1(object projectId) { - int cout1 = 0; - allCount1= LargerHazard.Where(x => x.IsSuperLargerHazard == false || !x.IsSuperLargerHazard.HasValue ).Count(); + int cout1 = 0; + allCount1 = LargerHazard.Where(x => x.IsSuperLargerHazard == false || !x.IsSuperLargerHazard.HasValue).Count(); if (projectId != null) { cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString() && (x.IsSuperLargerHazard == false || !x.IsSuperLargerHazard.HasValue)).Count(); @@ -228,7 +228,7 @@ namespace FineUIPro.Web.DataShow protected int Count4(object projectId) { int cout1 = 0; - allCount4 = LargerHazard.Where(x => x.States == Const.State_1).Count(); + allCount4 = LargerHazard.Where(x => x.States == Const.State_1).Count(); if (projectId != null) { cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString() && x.States == Const.State_1).Count(); @@ -248,7 +248,7 @@ namespace FineUIPro.Web.DataShow allCount5 = LargerHazard.Sum(x => x.TrainPersonNum ?? 0); if (projectId != null) { - cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString()).Sum(x=>x.TrainPersonNum ?? 0); + cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString()).Sum(x => x.TrainPersonNum ?? 0); } return cout1; } diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs index 82cb08ac..6decf913 100644 --- a/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs @@ -21,8 +21,8 @@ namespace FineUIPro.Web.DataShow { btnClose.OnClientClick = ActiveWindow.GetHideReference(); string projectId = Request.Params["projectId"]; - this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); - Funs.DropDownPageSize(this.ddlPageSize); + this.txtProject.Text = ProjectService.GetProjectNameByProjectId(projectId); + Funs.DropDownPageSize(this.ddlPageSize); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格t BindGrid(); diff --git a/SGGL/FineUIPro.Web/DataShow/License.aspx.cs b/SGGL/FineUIPro.Web/DataShow/License.aspx.cs index 8cdf0197..595b6ffc 100644 --- a/SGGL/FineUIPro.Web/DataShow/License.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/License.aspx.cs @@ -1,10 +1,8 @@ using BLL; -using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -41,7 +39,7 @@ namespace FineUIPro.Web.DataShow ,V.CompileMan,V.CompileDate,V.States FROM View_License_LicenseManager AS V WHERE IsCNCECShow=1 "; - if (this.rbType.SelectedValue=="2") + if (this.rbType.SelectedValue == "2") { strSql += " AND V.States = @WorkStates"; listStr.Add(new SqlParameter("@WorkStates", Const.State_2)); diff --git a/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs index 2e31f26c..2bafb8fd 100644 --- a/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs @@ -1,12 +1,8 @@ -using Aspose.Words; -using BLL; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; -using System.Linq; -using System.Text; namespace FineUIPro.Web.DataShow { @@ -43,7 +39,7 @@ namespace FineUIPro.Web.DataShow ,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson FROM Meeting_CompanySafetyMeeting AS Meeting where 1=1 "; - List listStr = new List(); + List listStr = new List(); if (!string.IsNullOrEmpty(this.txtStartTime.Text)) { strSql += " AND Meeting.CompanySafetyMeetingDate >=@StartTime"; @@ -54,7 +50,7 @@ namespace FineUIPro.Web.DataShow strSql += " AND Meeting.CompanySafetyMeetingDate <=@EndTime"; listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -275,7 +271,7 @@ namespace FineUIPro.Web.DataShow } } #endregion - + /// /// /// diff --git a/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs index ffbd7402..d0d3d1ca 100644 --- a/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs @@ -1,13 +1,8 @@ using BLL; -using Model; -using Newtonsoft.Json.Linq; -using NPOI.SS.Formula.Functions; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; -using System.Windows.Forms; namespace FineUIPro.Web.DataShow { @@ -40,8 +35,8 @@ namespace FineUIPro.Web.DataShow FROM Base_Project AS Project LEFT JOIN Base_Unit as unit on unit.UnitId = Project.UnitId LEFT JOIN Base_ProjectType AS ProjectType ON Project.ProjectType = ProjectType.ProjectTypeId WHERE IsCNCECShow=1 "; - List listStr = new List(); - + List listStr = new List(); + if (this.ckState.SelectedValue != "0") { if (this.ckState.SelectedValue == "1") @@ -54,12 +49,12 @@ namespace FineUIPro.Web.DataShow listStr.Add(new SqlParameter("@states", this.ckState.SelectedValue)); } } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; Grid1.DataSource = this.GetPagedDataTable(Grid1, tb); - Grid1.DataBind(); + Grid1.DataBind(); } #endregion @@ -119,7 +114,7 @@ namespace FineUIPro.Web.DataShow #endregion #region 项目经理 - + /// /// 施工经理 /// diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs index a4ec9eba..ddf9e2fc 100644 --- a/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs @@ -1,10 +1,8 @@ using BLL; -using FineUIPro.Web.BaseInfo; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -42,7 +40,7 @@ namespace FineUIPro.Web.DataShow ,(SELECT COUNT(*) FROM WBS_ControlItemProject AS D WHERE D.ProjectId =P.ProjectId ) AS count4 ,(SELECT COUNT(*) FROM WBS_ControlItemAndCycle AS E WHERE E.ProjectId =P.ProjectId ) AS count5 FROM Base_Project AS P - WHERE P.IsCNCECShow=1 "; + WHERE P.IsCNCECShow=1 "; List listStr = new List(); if (this.drpProject.SelectedValue != Const._Null) { diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs index 1c455e85..937abe3f 100644 --- a/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs @@ -31,7 +31,7 @@ namespace FineUIPro.Web.DataShow /// 绑定数据 /// private void BindGrid() - { + { string strSql = @"SELECT Person.SitePersonId,Person.ProjectId,Project.ProjectCode,Project.ProjectName,Unit.UnitId,Unit.UnitId,Unit.UnitName, Person.PersonName,Person.PersonId,Person.IdentityCard,Persons.Sex,Person.WorkPostId,WorkPost.WorkPostName,Persons.Telephone ,(CASE WHEN Persons.Sex=2 THEN '女' WHEN Sex=1 THEN '男' ELSE '' END) AS SexStr @@ -42,7 +42,7 @@ namespace FineUIPro.Web.DataShow LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId WHERE IsCNCECShow=1 AND States=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE()) "; List listStr = new List(); - if (this.drpProject.SelectedValue !=Const._Null) + if (this.drpProject.SelectedValue != Const._Null) { strSql += " AND Person.ProjectId = @ProjectId"; listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); diff --git a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs index d8252e85..a89658d0 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.BaseInfo; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -239,7 +238,7 @@ namespace FineUIPro.Web.DataShow summary.Add("ProjectName", "合计:"); summary.Add("Count1", Count1.ToString()); summary.Add("Count2", Count2.ToString()); - summary.Add("Count3", (Count1- Count2).ToString()); + summary.Add("Count3", (Count1 - Count2).ToString()); summary.Add("Count4", Math.Round(Count2 * 1.0 / Count1 * 100, 2).ToString()); Grid1.SummaryData = summary; } diff --git a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs index 394449af..de8c6466 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.BaseInfo; using System; using System.Collections.Generic; using System.Data; @@ -58,7 +57,7 @@ namespace FineUIPro.Web.DataShow // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; //} - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -163,7 +162,7 @@ namespace FineUIPro.Web.DataShow int cout1 = 0; if (projectId != null) { - cout1= getcount(projectId.ToString(), "B"); + cout1 = getcount(projectId.ToString(), "B"); } return cout1; } @@ -190,7 +189,7 @@ namespace FineUIPro.Web.DataShow /// private int getcount(string projectId, string level) { - int count = 0; + int count = 0; count = getDataLists.Where(x => x.ProjectId == projectId && x.ControlPoint.Contains(level)).Count(); return count; diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs index 346f7fb5..a7f5d7cd 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs @@ -28,7 +28,7 @@ namespace FineUIPro.Web.DataShow } } - + /// /// 绑定数据 /// @@ -57,7 +57,7 @@ namespace FineUIPro.Web.DataShow // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; //} - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -148,7 +148,7 @@ namespace FineUIPro.Web.DataShow PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityInstrumentsItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); } #endregion - + protected void btnView_Click(object sender, EventArgs e) { @@ -169,8 +169,8 @@ namespace FineUIPro.Web.DataShow var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); var getD1 = from x in Funs.DB.Comprehensive_InspectionMachine - where x.ProjectId == projectId.ToString() && x.IsOnSite == true && x.InspectionType.Contains("计量") - select x; + where x.ProjectId == projectId.ToString() && x.IsOnSite == true && x.InspectionType.Contains("计量") + select x; if (datetime1.HasValue) { getD1 = getD1.Where(x => x.CompileDate >= datetime1); @@ -199,7 +199,7 @@ namespace FineUIPro.Web.DataShow var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); var getD1 = from x in Funs.DB.Comprehensive_InspectionMachine where x.ProjectId == projectId.ToString() && x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true - select x; + select x; if (datetime1.HasValue) { getD1 = getD1.Where(x => x.CompileDate >= datetime1); @@ -208,7 +208,7 @@ namespace FineUIPro.Web.DataShow { getD1 = getD1.Where(x => x.CompileDate <= datetime2); } - + cout1 = getD1.Count(); } return cout1; diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.cs index 4a4bd54e..4ca192b5 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityInstrumentsItem.aspx.cs @@ -21,7 +21,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { string projectId = Request.Params["projectId"]; - this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + this.txtProject.Text = ProjectService.GetProjectNameByProjectId(projectId); Funs.DropDownPageSize(this.ddlPageSize); btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); @@ -56,7 +56,7 @@ namespace FineUIPro.Web.DataShow strSql += " AND C.InspectionDate <= @EndTime"; listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); diff --git a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs index 43b4d6e2..cea763f7 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs @@ -20,7 +20,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitCNCECShowProjectDropDownList(this.drpProject, true); // 绑定表格t @@ -28,7 +28,7 @@ namespace FineUIPro.Web.DataShow } } - + /// /// 绑定数据 /// @@ -42,7 +42,7 @@ namespace FineUIPro.Web.DataShow FROM Person_Persons AS Person LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE 1=1 "; - string UnitId =Const.UnitId_SEDIN; + string UnitId = Const.UnitId_SEDIN; if (this.rbCom.SelectedValue == "1") { strSql += " AND Person.UnitId = @UnitId"; @@ -62,7 +62,7 @@ namespace FineUIPro.Web.DataShow LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 AND IsCNCECShow=1 "; - if (this.drpProject.SelectedValue != Const._Null) + if (this.drpProject.SelectedValue != Const._Null) { strSql += " AND Person.ProjectId = @ProjectId"; listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue)); @@ -90,9 +90,9 @@ namespace FineUIPro.Web.DataShow { this.drpProject.Hidden = false; } - else - { - this.drpProject.Hidden = true; + else + { + this.drpProject.Hidden = true; } this.BindGrid(); } diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs index 0e896ab0..d272bfb8 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs @@ -174,7 +174,7 @@ namespace FineUIPro.Web.DataShow PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityProblemItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); } #endregion - + protected void btnView_Click(object sender, EventArgs e) { diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.cs index 8d648474..370e7d88 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -21,7 +20,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { string projectId = Request.Params["projectId"]; - this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + this.txtProject.Text = ProjectService.GetProjectNameByProjectId(projectId); Funs.DropDownPageSize(this.ddlPageSize); btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); @@ -147,7 +146,7 @@ namespace FineUIPro.Web.DataShow protected string ConvertImgUrlByImage(object registrationId) { string url = string.Empty; - + if (registrationId != null) { IList sourlist = AttachFileService.Getfilelist(registrationId.ToString() + "r", BLL.Const.CheckListMenuId); diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs index f824ce96..cb01edcb 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs @@ -1,12 +1,9 @@ -using Aspose.Words; -using BLL; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; using System.Linq; -using System.Text; namespace FineUIPro.Web.DataShow { @@ -31,7 +28,7 @@ namespace FineUIPro.Web.DataShow } } - + /// /// 绑定数据 /// @@ -60,7 +57,7 @@ namespace FineUIPro.Web.DataShow // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; //} - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -157,7 +154,7 @@ namespace FineUIPro.Web.DataShow } } #endregion - + protected void btnView_Click(object sender, EventArgs e) { diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.cs index c3a38788..7da34f9d 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem1.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -21,7 +20,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { string projectId = Request.Params["projectId"]; - this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + this.txtProject.Text = ProjectService.GetProjectNameByProjectId(projectId); Funs.DropDownPageSize(this.ddlPageSize); btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); @@ -58,7 +57,7 @@ namespace FineUIPro.Web.DataShow strSql += " AND C.CompileDate <= @EndTime"; listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.cs index c79981bc..845a9467 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityTrainingItem2.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -21,7 +20,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { string projectId = Request.Params["projectId"]; - this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + this.txtProject.Text = ProjectService.GetProjectNameByProjectId(projectId); Funs.DropDownPageSize(this.ddlPageSize); btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); @@ -54,7 +53,7 @@ namespace FineUIPro.Web.DataShow strSql += " AND C.DetailsDate <= @EndTime"; listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs index 6f06481e..2de8375d 100644 --- a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs @@ -1,6 +1,5 @@ using BLL; using Newtonsoft.Json.Linq; -using NPOI.SS.Formula.Functions; using System; using System.Collections.Generic; using System.Data; @@ -47,7 +46,7 @@ namespace FineUIPro.Web.DataShow strSql += " AND projectId = @projectId"; listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); } - + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) //{ // strSql += " AND h.RegisterDate >=@StartTime"; @@ -153,7 +152,7 @@ namespace FineUIPro.Web.DataShow PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SecurityRiskItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - "))); } #endregion - + /// /// /// @@ -190,7 +189,7 @@ namespace FineUIPro.Web.DataShow int cout4 = 0; if (projectId != null) { - cout4 = getcount(projectId.ToString(),2); + cout4 = getcount(projectId.ToString(), 2); } return cout4; } @@ -228,13 +227,13 @@ namespace FineUIPro.Web.DataShow /// private int getcount(string projectId, int level) { - int count = 0; + int count = 0; var getlevel = Funs.DB.Base_RiskLevel.FirstOrDefault(x => x.RiskLevel == level); if (getlevel != null) { count = (from x in Funs.DB.Hazard_HazardSelectedItem - join y in Funs.DB.Hazard_HazardList on x.HazardListId equals y.HazardListId - where y.ProjectId == projectId && (x.HazardLevel == getlevel.RiskLevelId || x.HazardLevel == level.ToString()) && y.States == Const.State_2 + join y in Funs.DB.Hazard_HazardList on x.HazardListId equals y.HazardListId + where y.ProjectId == projectId && (x.HazardLevel == getlevel.RiskLevelId || x.HazardLevel == level.ToString()) && y.States == Const.State_2 && y.CompileDate.Value.Year >= 2023 select x).Count(); } @@ -242,7 +241,7 @@ namespace FineUIPro.Web.DataShow { count = (from x in Funs.DB.Hazard_HazardSelectedItem join y in Funs.DB.Hazard_HazardList on x.HazardListId equals y.HazardListId - where y.ProjectId == projectId && x.HazardLevel == level.ToString() && y.States == Const.State_2 + where y.ProjectId == projectId && x.HazardLevel == level.ToString() && y.States == Const.State_2 && y.CompileDate.Value.Year >= 2023 select x).Count(); } diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs index cd8d2dfc..da798100 100644 --- a/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs @@ -20,7 +20,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { string projectId = Request.Params["projectId"]; - this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + this.txtProject.Text = ProjectService.GetProjectNameByProjectId(projectId); Funs.DropDownPageSize(this.ddlPageSize); btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); diff --git a/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.cs index 22fdd1bb..beefeba2 100644 --- a/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/WorkingHoursItem.aspx.cs @@ -21,7 +21,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { string projectId = Request.Params["projectId"]; - this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId); + this.txtProject.Text = ProjectService.GetProjectNameByProjectId(projectId); Funs.DropDownPageSize(this.ddlPageSize); btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); @@ -50,7 +50,7 @@ namespace FineUIPro.Web.DataShow strSql += " AND CompileDate <= @EndTime"; listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim())); } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); diff --git a/SGGL/FineUIPro.Web/DigData/CQMSDataCollect.aspx.cs b/SGGL/FineUIPro.Web/DigData/CQMSDataCollect.aspx.cs index 1d7bc157..a52b861d 100644 --- a/SGGL/FineUIPro.Web/DigData/CQMSDataCollect.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/CQMSDataCollect.aspx.cs @@ -115,7 +115,7 @@ namespace FineUIPro.Web.DigData row[16] = item.Month12; if (item.SortIndex == 8) { - if (sum5 > 0 && (sum5- sum6) > 0) + if (sum5 > 0 && (sum5 - sum6) > 0) { row[17] = ((sum5 - sum6) / sum5 * 100).ToString("0.##") + "%"; } @@ -359,8 +359,8 @@ namespace FineUIPro.Web.DigData { int year = Funs.GetNewInt(this.drpYear.SelectedValue) ?? DateTime.Now.Year; var getCheck_CheckMonths = from x in Funs.DB.Check_CheckMonth - where x.Months.Value.Year == year - orderby x.Months + where x.Months.Value.Year == year + orderby x.Months select x; if (getCheck_CheckMonths.Count() > 0) { diff --git a/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.cs index b0661adb..ac3a1fd4 100644 --- a/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.cs @@ -1,7 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Linq; using System.Text; namespace FineUIPro.Web.DigData @@ -33,11 +31,11 @@ namespace FineUIPro.Web.DigData /// private void BindGrid() { - var getData =CQMSDataDWService.getDataDWList( this.drpProject.SelectedValue, - Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text),this.Grid1); + var getData = CQMSDataDWService.getDataDWList(this.drpProject.SelectedValue, + Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text), this.Grid1); Grid1.RecordCount = CQMSDataDWService.count; Grid1.DataSource = getData; - Grid1.DataBind(); + Grid1.DataBind(); } /// diff --git a/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.cs index 4acf6af5..9708e8ea 100644 --- a/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.cs @@ -33,8 +33,8 @@ namespace FineUIPro.Web.DigData /// private void BindGrid() { - var getData = HSEDataDWService.getDataDWList( this.drpProject.SelectedValue, - Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text),this.Grid1); + var getData = HSEDataDWService.getDataDWList(this.drpProject.SelectedValue, + Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text), this.Grid1); Grid1.RecordCount = HSEDataDWService.count; Grid1.DataSource = getData; Grid1.DataBind(); @@ -44,7 +44,7 @@ namespace FineUIPro.Web.DigData /// /// 计算合计 /// - private void OutputSummaryData( ) + private void OutputSummaryData() { int aCount1 = 0, aCount2 = 0, aCount3 = 0; for (int i = 0; i < Grid1.Rows.Count(); i++) @@ -53,7 +53,7 @@ namespace FineUIPro.Web.DigData aCount2 += Funs.GetNewIntOrZero(Grid1.Rows[i].Values[4].ToString()); aCount3 += Funs.GetNewIntOrZero(Grid1.Rows[i].Values[5].ToString()); } - + JObject summary = new JObject { { "ProjectName", "合计" }, diff --git a/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.cs index 4120f1f9..e54cd622 100644 --- a/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.cs @@ -1,7 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Linq; using System.Text; namespace FineUIPro.Web.DigData @@ -33,7 +31,7 @@ namespace FineUIPro.Web.DigData /// private void BindGrid() { - var getData = HTGLDataDWService.getDataDWList( this.drpProject.SelectedValue,this.Grid1); + var getData = HTGLDataDWService.getDataDWList(this.drpProject.SelectedValue, this.Grid1); Grid1.RecordCount = HTGLDataDWService.count; Grid1.DataSource = getData; Grid1.DataBind(); @@ -50,7 +48,7 @@ namespace FineUIPro.Web.DigData // { // aCount1 += Funs.GetNewIntOrZero(Grid1.Rows[i].Values[3].ToString()); // } - + // JObject summary = new JObject // { // { "ProjectName", "合计" }, diff --git a/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.cs index 65f5c7a7..df2b068c 100644 --- a/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.cs @@ -1,7 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Linq; using System.Text; namespace FineUIPro.Web.DigData @@ -33,8 +31,8 @@ namespace FineUIPro.Web.DigData /// private void BindGrid() { - var getData = JDGLDataDWService.getDataDWList( this.drpProject.SelectedValue, - Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text),this.Grid1); + var getData = JDGLDataDWService.getDataDWList(this.drpProject.SelectedValue, + Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text), this.Grid1); Grid1.RecordCount = JDGLDataDWService.count; Grid1.DataSource = getData; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs index 762f7fde..109f64f9 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs @@ -1,9 +1,6 @@ using BLL; -using FineUIPro.Web.HJGL.WeldingReport; -using Model; using System; using System.Data; -using System.Data.SqlTypes; using System.Linq; namespace FineUIPro.Web.DigData @@ -129,11 +126,11 @@ namespace FineUIPro.Web.DigData if (getContractTrack.Count() > 0) { estimatedAmount = getContractTrack.Sum(x => x.EstimatedAmount ?? 0); - - } - this.lbEstimatedAmount.Text= estimatedAmount.ToString(); - this.lbTotalProfit.Text = estimatedAmount > 0 ? Math.Round(contractAmount / estimatedAmount ).ToString() + "%" : "0%"; + } + this.lbEstimatedAmount.Text = estimatedAmount.ToString(); + + this.lbTotalProfit.Text = estimatedAmount > 0 ? Math.Round(contractAmount / estimatedAmount).ToString() + "%" : "0%"; } diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs index a728c737..e5e8e440 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs @@ -1,17 +1,13 @@ using BLL; -using FineUIPro.Web.CQMS.WBS; using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; namespace FineUIPro.Web.DigData { public partial class ProjectWBSAnalysis : PageBase - { + { /// - /// 项目ID - /// + /// 项目ID + /// public string ProjectId { get @@ -51,7 +47,7 @@ namespace FineUIPro.Web.DigData /// 绑定数据Grid1 ///
private void BindGrid() - { + { var getData = ProjectWBSAnalysisService.getDataDWList(this.ProjectId, this.hdWorkPackageCode.Text, this.Grid1); Grid1.RecordCount = ProjectWBSAnalysisService.count; Grid1.DataSource = getData; diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs index 3eebeaa3..f43c66a1 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs @@ -33,7 +33,7 @@ namespace FineUIPro.Web.DigData { this.ProjectId = this.CurrUser.LoginProjectId; ////权限按钮方法 - // this.ucTree.WorkPackageCode = this.WorkPackageCode; + // this.ucTree.WorkPackageCode = this.WorkPackageCode; this.ucTree.ProjectId = this.ProjectId; //this.btnNew.OnClientClick = Window1.GetShowReference("ShowProjectWBSPackage.aspx") + "return false;"; } @@ -41,7 +41,7 @@ namespace FineUIPro.Web.DigData protected void changeTree(object sender, EventArgs e) { - this.hdWorkPackageId.Text = this.ucTree.WorkPackageId; + this.hdWorkPackageId.Text = this.ucTree.WorkPackageId; initControlItem(); } @@ -65,13 +65,13 @@ namespace FineUIPro.Web.DigData ///
protected void initControlItem() { - var getControlItem = from x in Funs.DB.WBS_ControlItemAndCycle - where x.WorkPackageId == this.hdWorkPackageId.Text + var getControlItem = from x in Funs.DB.WBS_ControlItemAndCycle + where x.WorkPackageId == this.hdWorkPackageId.Text select x; cblControlItem.DataValueField = "ControlItemAndCycleId"; cblControlItem.DataTextField = "ControlItemContent"; cblControlItem.DataSource = getControlItem; - cblControlItem.DataBind(); + cblControlItem.DataBind(); SetData(); } @@ -103,11 +103,11 @@ namespace FineUIPro.Web.DigData if (item == "HSSE") { this.gpHSSE.Hidden = false; - var getLargerHazardListItem =from x in Funs.DB.Solution_LargerHazardListItem - join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId - where y.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId) - && y.States == Const.State_1 - select x; + var getLargerHazardListItem = from x in Funs.DB.Solution_LargerHazardListItem + join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId + where y.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId) + && y.States == Const.State_1 + select x; if (!string.IsNullOrEmpty(controlItemAndCycleId)) { getLargerHazardListItem = getLargerHazardListItem.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId)); @@ -133,7 +133,7 @@ namespace FineUIPro.Web.DigData { getHazardRegister = getHazardRegister.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId)); } - this.lbHSEProblemCount.Text= getHazardRegister.Count().ToString(); + this.lbHSEProblemCount.Text = getHazardRegister.Count().ToString(); } if (item == "CQMS") @@ -141,20 +141,20 @@ namespace FineUIPro.Web.DigData this.gpCQMS.Hidden = false; //// 实体验收 资料验收 var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail - join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode - where y.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId) - && y.State == "8" - select x; + join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode + where y.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId) + && y.State == "8" + select x; if (!string.IsNullOrEmpty(controlItemAndCycleId)) { getSpotCheckDetail = getSpotCheckDetail.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId)); } int all = getSpotCheckDetail.Count(); - // this.lbSpotCheck1.Text = all.ToString(); - int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格 - // this.lbSpotCheck2.Text= okCount.ToString(); + // this.lbSpotCheck1.Text = all.ToString(); + int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格 + // this.lbSpotCheck2.Text= okCount.ToString(); - this.lbSpotCheckRate.Text= all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString()+"%" : "0%"; + this.lbSpotCheckRate.Text = all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%"; /// 资料验收合格项目 var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true); @@ -163,7 +163,7 @@ namespace FineUIPro.Web.DigData this.lbSpotCheckDataRate.Text = okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%"; var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl - where x.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId) + where x.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId) select x; if (!string.IsNullOrEmpty(controlItemAndCycleId)) { diff --git a/SGGL/FineUIPro.Web/DigData/ShowProjectWBS.aspx.cs b/SGGL/FineUIPro.Web/DigData/ShowProjectWBS.aspx.cs index 3a9d573a..837d3d06 100644 --- a/SGGL/FineUIPro.Web/DigData/ShowProjectWBS.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ShowProjectWBS.aspx.cs @@ -2,7 +2,6 @@ using System; using System.Data; using System.Linq; -using System.Text; namespace FineUIPro.Web.DigData { @@ -41,7 +40,7 @@ namespace FineUIPro.Web.DigData ////加载树 SetSubUnitProjectTree(this.trWBS); - + } } @@ -90,7 +89,7 @@ namespace FineUIPro.Web.DigData /// /// protected void trWBS_NodeExpand(object sender, TreeNodeEventArgs e) - { + { e.Node.Nodes.Clear(); if (e.Node.CommandName == "ProjectType") //展开工程类型 { @@ -106,11 +105,11 @@ namespace FineUIPro.Web.DigData newNode.Text = trUnitWorkItem.UnitWorkCode + "-" + trUnitWorkItem.UnitWorkName; newNode.NodeID = trUnitWorkItem.UnitWorkId; newNode.CommandName = "UnitWork"; - + newNode.EnableExpandEvent = true; newNode.EnableClickEvent = true; e.Node.Nodes.Add(newNode); - + if (BLL.WorkPackageService.GetWorkPackages1ByUnitWorkId(trUnitWorkItem.UnitWorkId.ToString()) != null) { TreeNode temp = new TreeNode(); @@ -155,7 +154,7 @@ namespace FineUIPro.Web.DigData newNode.Text = workPackage.PackageContent; newNode.NodeID = workPackage.WorkPackageId; newNode.CommandName = "WorkPackage"; - newNode.ToolTip="["+ workPackage.InitWorkPackageCode+"]"; + newNode.ToolTip = "[" + workPackage.InitWorkPackageCode + "]"; newNode.EnableExpandEvent = true; newNode.EnableClickEvent = true; e.Node.Nodes.Add(newNode); @@ -185,7 +184,7 @@ namespace FineUIPro.Web.DigData { ///Type1|0a1e39d1-693d-4b5f-a2f5-870dda8b9ff2|c0f20302-88e6-4415-9a86-06be5730c420[67]|c76e251e-d690-4d0e-959b-3b618701f6ff[6701]&建筑工程|083-全场管廊|框架/管廊|地基与基础 ///返回 树 父节点ID+[初始WBS主键]+"|" +节点ID+[初始WBS主键]+"&"+树父节点名称+"|"+ 节点名称 - string selectValues = getSelectIds(this.trWBS.SelectedNode, this.trWBS.SelectedNodeID+this.trWBS.SelectedNode.ToolTip) + "&" + getSelectNames(this.trWBS.SelectedNode, this.trWBS.SelectedNode.Text); + string selectValues = getSelectIds(this.trWBS.SelectedNode, this.trWBS.SelectedNodeID + this.trWBS.SelectedNode.ToolTip) + "&" + getSelectNames(this.trWBS.SelectedNode, this.trWBS.SelectedNode.Text); if (!string.IsNullOrEmpty(selectValues)) { PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(selectValues) + ActiveWindow.GetHidePostBackReference()); @@ -203,7 +202,7 @@ namespace FineUIPro.Web.DigData /// /// /// - private string getSelectIds(TreeNode node,string id) + private string getSelectIds(TreeNode node, string id) { if (node.ParentNode != null) { @@ -232,7 +231,7 @@ namespace FineUIPro.Web.DigData { if (node.ParentNode.NodeID == "1" || node.ParentNode.NodeID == "2") { - name = node.ParentNode.Text + "|" + name; + name = node.ParentNode.Text + "|" + name; } else { diff --git a/SGGL/FineUIPro.Web/DigData/ShowProjectWBSPackage.aspx.cs b/SGGL/FineUIPro.Web/DigData/ShowProjectWBSPackage.aspx.cs index 6c1475ff..3144f55a 100644 --- a/SGGL/FineUIPro.Web/DigData/ShowProjectWBSPackage.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ShowProjectWBSPackage.aspx.cs @@ -1,17 +1,15 @@ using BLL; -using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.DigData { public partial class ShowProjectWBSPackage : PageBase { - + /// /// /// @@ -91,7 +89,7 @@ namespace FineUIPro.Web.DigData if (e.Node.CommandName == "ProjectType") //展开工程类型 { var trUnitWork = from x in Funs.DB.WBS_UnitWork - where x.ProjectId == this.ProjectId && x.SuperUnitWork == null && x.ProjectType == e.Node.NodeID + where x.ProjectId == this.ProjectId && x.SuperUnitWork == null && x.ProjectType == e.Node.NodeID select x; trUnitWork = trUnitWork.OrderBy(x => x.UnitWorkCode); if (trUnitWork.Count() > 0) @@ -181,7 +179,7 @@ namespace FineUIPro.Web.DigData } } #endregion - + #region Tree点击事件 /// /// Tree点击事件 @@ -235,7 +233,7 @@ namespace FineUIPro.Web.DigData SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - Grid1.RecordCount = tb.Rows.Count; + Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); @@ -259,7 +257,7 @@ namespace FineUIPro.Web.DigData var getC = Funs.DB.WBS_ControlItemAndCycle.FirstOrDefault(x => x.ControlItemAndCycleId == this.Grid1.SelectedRowID); if (getC != null) { - selectValues = getSelectIds(this.trWBS.SelectedNode, this.trWBS.SelectedNodeID + this.trWBS.SelectedNode.ToolTip) + "&" + getSelectNames(this.trWBS.SelectedNode, this.trWBS.SelectedNode.Text) + getC .ControlItemContent+ "$" + this.Grid1.SelectedRowID; + selectValues = getSelectIds(this.trWBS.SelectedNode, this.trWBS.SelectedNodeID + this.trWBS.SelectedNode.ToolTip) + "&" + getSelectNames(this.trWBS.SelectedNode, this.trWBS.SelectedNode.Text) + getC.ControlItemContent + "$" + this.Grid1.SelectedRowID; } PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(selectValues) + ActiveWindow.GetHidePostBackReference()); } diff --git a/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs index 48e9e431..3edce071 100644 --- a/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs @@ -1,14 +1,10 @@ using BLL; -using FineUIPro.Web.CQMS.WBS; using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; namespace FineUIPro.Web.DigData { public partial class WBSAnalysis : PageBase - { + { /// /// 加载页面 /// @@ -17,7 +13,7 @@ namespace FineUIPro.Web.DigData protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { this.ucTree.IsShowLevel = false; BindGrid(); } @@ -34,7 +30,7 @@ namespace FineUIPro.Web.DigData /// 绑定数据Grid1 /// private void BindGrid() - { + { var getData = WBSAnalysisService.getDataDWList(this.hdWorkPackageCode.Text, this.Grid1); Grid1.RecordCount = WBSAnalysisService.count; Grid1.DataSource = getData; diff --git a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs index 6bc5aed2..a5b9be55 100644 --- a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.CQMS.WBS; using System; using System.Data; using System.Linq; @@ -7,7 +6,7 @@ using System.Linq; namespace FineUIPro.Web.DigData { public partial class WBSDW : PageBase - { + { /// /// 加载页面 /// @@ -16,13 +15,13 @@ namespace FineUIPro.Web.DigData protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { } } protected void changeTree(object sender, EventArgs e) { - this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode; + this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode; initControlItem(); } @@ -42,8 +41,8 @@ namespace FineUIPro.Web.DigData ///
protected void initControlItem() { - var getControlItem = from x in Funs.DB.WBS_ControlItemInit - where x.WorkPackageCode == this.hdWorkPackageCode.Text + var getControlItem = from x in Funs.DB.WBS_ControlItemInit + where x.WorkPackageCode == this.hdWorkPackageCode.Text select x; cblControlItem.DataValueField = "ControlItemCode"; cblControlItem.DataTextField = "ControlItemContent"; @@ -75,7 +74,7 @@ namespace FineUIPro.Web.DigData } else { - workPackageId="["+ workPackageId + "]"; + workPackageId = "[" + workPackageId + "]"; } if (!string.IsNullOrEmpty(workPackageId)) { @@ -106,30 +105,30 @@ namespace FineUIPro.Web.DigData this.lbAccident.Text = getAccidentPersonRecord.Count().ToString(); var getHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister - where x.WorkPackageId.Contains(workPackageId) && x.States != null && x.States != "4" && x.States != "0" + where x.WorkPackageId.Contains(workPackageId) && x.States != null && x.States != "4" && x.States != "0" select x; if (!string.IsNullOrEmpty(controlItemAndCycleId)) { getHazardRegister = getHazardRegister.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId)); } - this.lbHazardRegisterCount.Text= getHazardRegister.Count().ToString(); + this.lbHazardRegisterCount.Text = getHazardRegister.Count().ToString(); } if (item == "CQMS") { this.gpCQMS.Hidden = false; //// 实体验收 资料验收 var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail - join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode - where x.WorkPackageId.Contains(workPackageId) && y.State == "8" - select x; + join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode + where x.WorkPackageId.Contains(workPackageId) && y.State == "8" + select x; if (!string.IsNullOrEmpty(controlItemAndCycleId)) { getSpotCheckDetail = getSpotCheckDetail.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId)); } int all = getSpotCheckDetail.Count(); - // this.lbSpotCheck1.Text = all.ToString(); + // this.lbSpotCheck1.Text = all.ToString(); int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); - /// this.lbSpotCheck2.Text = okCount.ToString(); + /// this.lbSpotCheck2.Text = okCount.ToString(); this.lbSpotCheckRate.Text = all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%"; /// 资料验收合格项目 @@ -140,7 +139,7 @@ namespace FineUIPro.Web.DigData //// 质量检查问题整改率 var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl - where x.WorkPackageId.Contains(workPackageId) + where x.WorkPackageId.Contains(workPackageId) select x; if (!string.IsNullOrEmpty(controlItemAndCycleId)) { diff --git a/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx b/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx index 83863b3a..ef8357f2 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + @@ -58,11 +58,12 @@ namespace FastReport + - + @@ -74,7 +75,7 @@ namespace FastReport - + diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibIn.aspx.cs index 02c6d388..d9d8796b 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibIn.aspx.cs @@ -87,7 +87,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo errorInfos = string.Empty; List codeLib = new List(); List codeLib_update = new List(); - var materialcodelist =MaterialCodeLibService.GetMaterialCodeLibList(); + var materialcodelist = MaterialCodeLibService.GetMaterialCodeLibList(); if (this.fuAttachUrl.HasFile == false) { ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning); @@ -131,49 +131,49 @@ namespace FineUIPro.Web.HJGL.BaseInfo //} var rows = MiniExcel.Query(fileName).ToList(); rows = rows.Where(x => x.MaterialCode != "" && x.MaterialName != "").ToList(); - if (rows.Count==0) + if (rows.Count == 0) { ShowNotify("没有数据!", MessageBoxIcon.Warning); - return; + return; } for (int i = 0; i < rows.Count; i++) { HJGL_MaterialCodeLib item = new HJGL_MaterialCodeLib(); - #region 数据验证和赋值 - if (rows[i].MaterialCode != null && !string.IsNullOrEmpty(rows[i].MaterialCode)) + #region 数据验证和赋值 + if (rows[i].MaterialCode != null && !string.IsNullOrEmpty(rows[i].MaterialCode)) + { + item.MaterialCode = rows[i].MaterialCode; + } + else + { + errorInfos += (i + 2) + "Line, [元件编码] 不能为空
"; + } + item.MaterialDef = rows[i].MaterialDef; + item.MaterialSpec = rows[i].MaterialSpec; + // item.MaterialMade = dv[i]["材质"].ToString(); + item.MaterialUnit = rows[i].MaterialUnit; + item.MaterialName = rows[i].MaterialName; + //item.PipeGrade = dv[i]["管道等级"].ToString(); + //item.ProjectId = CurrUser.LoginProjectId; + //= SQLHelper.GetNewID(typeof(Model.Editor_CostReport)); + if (!codeLib.Select(x => x.MaterialCode).Contains(item.MaterialCode)) + { + + if (materialcodelist.Select(x => x.MaterialCode).Contains(item.MaterialCode)) { - item.MaterialCode = rows[i].MaterialCode; + codeLib_update.Add(item); } else { - errorInfos += (i + 2) + "Line, [元件编码] 不能为空
"; - } - item.MaterialDef = rows[i].MaterialDef; - item.MaterialSpec = rows[i].MaterialSpec; - // item.MaterialMade = dv[i]["材质"].ToString(); - item.MaterialUnit = rows[i].MaterialUnit; - item.MaterialName = rows[i].MaterialName; - //item.PipeGrade = dv[i]["管道等级"].ToString(); - //item.ProjectId = CurrUser.LoginProjectId; - //= SQLHelper.GetNewID(typeof(Model.Editor_CostReport)); - if (!codeLib.Select(x => x.MaterialCode).Contains(item.MaterialCode)) - { - - if (materialcodelist.Select(x => x.MaterialCode).Contains(item.MaterialCode)) - { - codeLib_update.Add(item); - } - else - { - codeLib.Add(item); - - } + codeLib.Add(item); } - #endregion + } + + #endregion } - // DataRow[] dv = ds.Tables[0].Select("元件编码 <>'' and 类型 <>''"); + // DataRow[] dv = ds.Tables[0].Select("元件编码 <>'' and 类型 <>''"); //导入数据库 //if (dv.Length > 0) //{ @@ -200,7 +200,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo // //= SQLHelper.GetNewID(typeof(Model.Editor_CostReport)); // if (!codeLib.Select(x => x.MaterialCode).Contains(item.MaterialCode)) // { - + // if (materialcodelist.Select(x => x.MaterialCode).Contains(item.MaterialCode)) // { // codeLib_update.Add(item); @@ -228,25 +228,8 @@ namespace FineUIPro.Web.HJGL.BaseInfo Alert.ShowInTop(errorInfos, MessageBoxIcon.Warning); return; } - codeLib = (from x in codeLib - select new HJGL_MaterialCodeLib - { - MaterialCode=x.MaterialCode, - MaterialDef=x.MaterialDef, - MaterialSpec=x.MaterialSpec, - MaterialUnit=x.MaterialUnit, - MaterialName=x.MaterialName, - - }).DistinctBy(temp=> new - { - temp.MaterialCode, - temp.MaterialDef, - temp.MaterialSpec, - temp.MaterialUnit, - temp.MaterialName - }).ToList(); - codeLib_update = (from x in codeLib_update - select new HJGL_MaterialCodeLib + codeLib = (from x in codeLib + select new HJGL_MaterialCodeLib { MaterialCode = x.MaterialCode, MaterialDef = x.MaterialDef, @@ -262,6 +245,23 @@ namespace FineUIPro.Web.HJGL.BaseInfo temp.MaterialUnit, temp.MaterialName }).ToList(); + codeLib_update = (from x in codeLib_update + select new HJGL_MaterialCodeLib + { + MaterialCode = x.MaterialCode, + MaterialDef = x.MaterialDef, + MaterialSpec = x.MaterialSpec, + MaterialUnit = x.MaterialUnit, + MaterialName = x.MaterialName, + + }).DistinctBy(temp => new + { + temp.MaterialCode, + temp.MaterialDef, + temp.MaterialSpec, + temp.MaterialUnit, + temp.MaterialName + }).ToList(); foreach (var item in codeLib_update) { var mewCostReport = BLL.MaterialCodeLibService.GetMaterialCodeLib(item.MaterialCode); diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs index 6010c49f..e91bb6ea 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs @@ -1,11 +1,6 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.BaseInfo { @@ -30,7 +25,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo private void BindGrid() { Model.BaseMaterialcolorOutput table = new Model.BaseMaterialcolorOutput(); - table.ProjectId=this.CurrUser.LoginProjectId; + table.ProjectId = this.CurrUser.LoginProjectId; var tb = BLL.BaseMaterialcolorService.GetListByQueryModle(table, Grid1.PageIndex, Grid1.PageSize); Grid1.RecordCount = tb.Total; Grid1.DataSource = tb.Data; diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.cs index df0424e4..8cf196db 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.cs @@ -4,9 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.BaseInfo { @@ -54,7 +51,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo this.drpSteType.DataSource = BLL.DropListService.HJGL_GetSteTypeList(); this.drpSteType.DataBind(); Funs.FineUIPleaseSelect(this.drpSteType); - BindGrid(); + BindGrid(); this.MaterialColorId = Request.Params["MaterialColorId"]; if (!string.IsNullOrEmpty(this.MaterialColorId)) { diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.cs index cb7650a1..7a29323f 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.BaseInfo { diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MediumIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MediumIn.aspx.cs index a9e96b6c..e2793a22 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MediumIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MediumIn.aspx.cs @@ -216,7 +216,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo } else { - var code = q.FirstOrDefault(x =>x.MediumCode== col0&& x.MediumName == col1); + var code = q.FirstOrDefault(x => x.MediumCode == col0 && x.MediumName == col1); if (code != null) { result += "第" + (i + 2).ToString() + "行," + "此介质代号、名称已经存在" + "|"; @@ -418,7 +418,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo for (int i = 0; i < a; i++) { var isExistMediumCode = Funs.DB.Base_Medium.FirstOrDefault(x => (x.MediumId != MediumList[i].MediumId || (MediumList[i].MediumId == null && x.MediumId != null)) && x.MediumCode == MediumList[i].MediumCode && x.ProjectId == this.CurrUser.LoginProjectId); - // var isExistMediumName = Funs.DB.Base_Medium.FirstOrDefault(x => (x.MediumId != MediumList[i].MediumId || (MediumList[i].MediumId == null && x.MediumId != null)) && x.MediumName == MediumList[i].MediumName && x.ProjectId == this.CurrUser.LoginProjectId); + // var isExistMediumName = Funs.DB.Base_Medium.FirstOrDefault(x => (x.MediumId != MediumList[i].MediumId || (MediumList[i].MediumId == null && x.MediumId != null)) && x.MediumName == MediumList[i].MediumName && x.ProjectId == this.CurrUser.LoginProjectId); if (isExistMediumCode != null) { ShowNotify("存在相同批次的介质代号,请修正后重新提交!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocation.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocation.aspx.cs index 116895ff..dab83ac6 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocation.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocation.aspx.cs @@ -226,7 +226,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo private string judgementDelete(string id) { string content = string.Empty; - if (Funs.DB.HJGL_WeldJoint.Any(x=>x.WeldingLocationId==id)) + if (Funs.DB.HJGL_WeldJoint.Any(x => x.WeldingLocationId == id)) { content = "焊口已关联此焊接位置"; } diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/DrawingImportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/DrawingImportEdit.aspx.cs index ba9bd009..ecde2526 100644 --- a/SGGL/FineUIPro.Web/HJGL/DataImport/DrawingImportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/DataImport/DrawingImportEdit.aspx.cs @@ -54,7 +54,7 @@ namespace FineUIPro.Web.HJGL.DataImport } - public string Save() + public string Save() { string result = ""; if (Session["AttachFile.webuploader"] == null) @@ -85,9 +85,9 @@ namespace FineUIPro.Web.HJGL.DataImport if (!BLL.HJGL_DataImportService.UploadFileToOa(Funs.RootPath + dataImport.FilePath, dataImport.UnitWorkId, "2")) { - string str =" "+ dataImport.FileName+"推送失败|"; + string str = " " + dataImport.FileName + "推送失败|"; result += str; - } + } } @@ -96,8 +96,8 @@ namespace FineUIPro.Web.HJGL.DataImport } protected void btnSave_Click(object sender, EventArgs e) { - string result= Save(); - if (result =="") + string result = Save(); + if (result == "") { ShowNotify("保存成功!", MessageBoxIcon.Success); } diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs index f84e9497..a4f68d43 100644 --- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs @@ -1,7 +1,4 @@ using BLL; -using FastReport.Design; -using FineUIPro.Web.HJGL.WeldingManage; -using FineUIPro.Web.ProjectData; using System; using System.Collections.Generic; using System.Data; @@ -28,7 +25,7 @@ namespace FineUIPro.Web.HJGL.DataImport //{ // this.GetShowColumn(c.Columns); //} - + } } @@ -84,8 +81,8 @@ namespace FineUIPro.Web.HJGL.DataImport //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} //var dbpipeLineMat = from x in Funs.DB.HJGL_PipeLineMat select x; //var DBpipeline = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x; @@ -94,7 +91,7 @@ namespace FineUIPro.Web.HJGL.DataImport foreach (var q in unitWork1) { string strSql = " SELECT DISTINCT [t0].[PipelineId] FROM [dbo].[HJGL_Pipeline] AS [t0]\r\nleft JOIN [dbo].[HJGL_PipeLineMat] AS [t1] ON [t0].[PipelineId] = [t1].[PipelineId]"; - strSql += "where [t0].[UnitWorkId] =@UnitWorkId "; + strSql += "where [t0].[UnitWorkId] =@UnitWorkId "; List listStr = new List(); listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId)); @@ -162,7 +159,7 @@ namespace FineUIPro.Web.HJGL.DataImport SqlParameter[] parameter = listStr.ToArray(); DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter); - var a =dt.Rows.Count; + var a = dt.Rows.Count; //var b = (from x in Funs.DB.HJGL_Pipeline // join y in Funs.DB.HJGL_PipeLineMat on x.PipelineId equals y.PipelineId @@ -208,7 +205,7 @@ namespace FineUIPro.Web.HJGL.DataImport #region 暂不有 private void BindNodes(TreeNode node) { - BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(),txtMaterialCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize); + BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), txtMaterialCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize); } #endregion @@ -220,7 +217,7 @@ namespace FineUIPro.Web.HJGL.DataImport BindNodes(e.Node); } - + } @@ -244,7 +241,7 @@ namespace FineUIPro.Web.HJGL.DataImport { if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { - + Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); this.hdUnitWorkId.Text = string.Empty; if (pipeline != null) @@ -264,7 +261,7 @@ namespace FineUIPro.Web.HJGL.DataImport TabStrip1.ActiveTabIndex = 1; } - } + } } @@ -278,7 +275,7 @@ namespace FineUIPro.Web.HJGL.DataImport /// /// 管线数据 /// - private void BindGrid1(string pipelineId,string unitworkid) + private void BindGrid1(string pipelineId, string unitworkid) { string strSql = @" SELECT pipe.PipeLineMatId, lib.MaterialCode,lib.MaterialName,lib.MaterialUnit, lib.MaterialSpec,lib.MaterialMade,lib.MaterialDef,pipe.Number,pipe.PrefabricatedComponents @@ -301,7 +298,7 @@ namespace FineUIPro.Web.HJGL.DataImport if (!string.IsNullOrEmpty(txtMaterialCode2.Text.Trim())) { strSql += " and lib.MaterialCode like @MaterialCode "; - listStr.Add(new SqlParameter("@MaterialCode","%"+ txtMaterialCode2.Text.Trim()+"%")); + listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode2.Text.Trim() + "%")); } strSql += " order by PrefabricatedComponents "; @@ -389,7 +386,7 @@ namespace FineUIPro.Web.HJGL.DataImport protected void Grid2_Sort(object sender, GridSortEventArgs e) { - BindGrid2(this.tvControlItem.SelectedNodeID,this.hdUnitWorkId.Text); + BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text); } /// /// 排序 @@ -448,7 +445,7 @@ namespace FineUIPro.Web.HJGL.DataImport ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); } } - + /// /// 增加焊口信息 @@ -486,7 +483,7 @@ namespace FineUIPro.Web.HJGL.DataImport #region 右键菜单删除 - + protected void btnDelMatGrid2_Click(object sender, EventArgs e) { if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete)) @@ -674,7 +671,7 @@ namespace FineUIPro.Web.HJGL.DataImport protected void Window5_Close(object sender, WindowCloseEventArgs e) { - // this.BindGrid1(this.tvControlItem.SelectedNodeID); + // this.BindGrid1(this.tvControlItem.SelectedNodeID); } /// @@ -699,13 +696,13 @@ namespace FineUIPro.Web.HJGL.DataImport protected void TabStrip1_TabIndexChanged(object sender, EventArgs e) { string pipelineid = ""; - if (this.tvControlItem.SelectedNode != null&& this.tvControlItem.SelectedNode.CommandName != "单位工程") + if (this.tvControlItem.SelectedNode != null && this.tvControlItem.SelectedNode.CommandName != "单位工程") { pipelineid = this.tvControlItem.SelectedNodeID; } if (this.TabStrip1.ActiveTabIndex == 0) { - + BindGrid1(pipelineid, this.hdUnitWorkId.Text); } diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialStock.aspx.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialStock.aspx.cs index c4363f7d..141a8f5f 100644 --- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialStock.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialStock.aspx.cs @@ -1,9 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.HJGL.DataImport { @@ -43,7 +40,7 @@ namespace FineUIPro.Web.HJGL.DataImport var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); - + } /// diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/TDMImport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/TDMImport.aspx.cs index be93ea06..dca121c5 100644 --- a/SGGL/FineUIPro.Web/HJGL/DataImport/TDMImport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/DataImport/TDMImport.aspx.cs @@ -149,7 +149,7 @@ namespace FineUIPro.Web.HJGL.DataImport strSql += " AND Import.FileName LIKE @FileName"; listStr.Add(new SqlParameter("@FileName", "%" + this.txtfilename.Text.Trim() + "%")); } - if (DropImportType.SelectedValue !=Const._Null) + if (DropImportType.SelectedValue != Const._Null) { strSql += " AND Import.ImportType=@ImportType"; listStr.Add(new SqlParameter("@ImportType", DropImportType.SelectedValue)); diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/TDMImportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/TDMImportEdit.aspx.cs index 42f85793..d32272b1 100644 --- a/SGGL/FineUIPro.Web/HJGL/DataImport/TDMImportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/DataImport/TDMImportEdit.aspx.cs @@ -104,7 +104,7 @@ namespace FineUIPro.Web.HJGL.DataImport ShowNotify(result, MessageBoxIcon.Warning); } - // PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + // PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } diff --git a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HardReport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HardReport.aspx.cs index a432bf2c..f6dc197e 100644 --- a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HardReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HardReport.aspx.cs @@ -90,8 +90,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} var TrustItemList = (from x in Funs.DB.HJGL_Hard_TrustItem join y in Funs.DB.HJGL_Hard_Trust on x.HardTrustID equals y.HardTrustID diff --git a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HardTrust.aspx.cs b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HardTrust.aspx.cs index bc7b3c4b..19479994 100644 --- a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HardTrust.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HardTrust.aspx.cs @@ -123,8 +123,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} var ReportList = (from x in Funs.DB.HJGL_HotProess_Report join y in Funs.DB.HJGL_HotProess_TrustItem on x.HotProessTrustItemId equals y.HotProessTrustItemId diff --git a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessReport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessReport.aspx.cs index 0b17444c..ecb2081f 100644 --- a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessReport.aspx.cs @@ -92,8 +92,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} var TrustItemList = (from x in Funs.DB.HJGL_HotProess_TrustItem join y in Funs.DB.HJGL_HotProess_Trust on x.HotProessTrustId equals y.HotProessTrustId diff --git a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrust.aspx.cs b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrust.aspx.cs index 5e72e231..4122faad 100644 --- a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrust.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrust.aspx.cs @@ -125,8 +125,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} var WeldJointList = (from x in Funs.DB.HJGL_WeldJoint join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId @@ -608,8 +608,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard { string varValue = string.Empty; var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); - // var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(hotProessTrust.InstallationId); - var PworkArea = Funs.DB.WBS_UnitWork .FirstOrDefault(x => x.UnitWorkId == hotProessTrust.UnitWorkId); + // var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(hotProessTrust.InstallationId); + var PworkArea = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == hotProessTrust.UnitWorkId); if (PworkArea != null) { //var cel = recordSheet.GetRow(3).CreateCell(1); diff --git a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrustItemEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrustItemEdit.aspx.cs index 722346c7..6ac352a6 100644 --- a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrustItemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrustItemEdit.aspx.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Data; -using System.Drawing; using System.Linq; namespace FineUIPro.Web.HJGL.HotProcessHard @@ -85,7 +84,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard } public int pageSize = 20; - public List TreeNodes=new List(); + public List TreeNodes = new List(); #endregion #region 加载页面 @@ -139,8 +138,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard x.PipelineCode, jointcount = (from y in Funs.DB.HJGL_WeldJoint where y.PipelineId == x.PipelineId && y.IsHotProess == true select y).Count(), Trustcount = (from z in Funs.DB.HJGL_HotProess_TrustItem join m in Funs.DB.HJGL_WeldJoint on z.WeldJointId equals m.WeldJointId where m.PipelineId == x.PipelineId select z).Count(), - }).ToList().Where(x=>x.jointcount>x.Trustcount).OrderBy(x=>x.PipelineCode); - if (q.Count()>0) + }).ToList().Where(x => x.jointcount > x.Trustcount).OrderBy(x => x.PipelineCode); + if (q.Count() > 0) { foreach (var item in q) { @@ -185,7 +184,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard // newNode.Text = "加载管线..."; // newNode.NodeID = "加载管线..."; // rootNode.Nodes.Add(newNode); - + // } //} } diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs index 4bd2e3bb..8c80cae1 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs @@ -1,17 +1,12 @@ using BLL; -using FineUIPro.Web.HJGL.WeldingManage; using MiniExcelLibs; using Model; -using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; -using System.Drawing; using System.IO; using System.Linq; using System.Text; -using System.Web; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.InfoQuery @@ -295,7 +290,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery model.UnitWorkId = this.tvControlItem.SelectedNodeID; model.WeldJointCode = this.txtWeldJointCode.Text; var list = BLL.WeldJointService.GetDataBymodel(model, Grid1.PageIndex, Grid1.PageSize); - Grid1.RecordCount = list.Total; + Grid1.RecordCount = list.Total; Grid1.DataSource = list.Data; Grid1.DataBind(); } @@ -308,7 +303,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList(); Grid1.DataSource = table; Grid1.DataBind(); - } + } } private void get3DParmeter_weldjoint(List model) @@ -492,7 +487,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery else if (this.tvControlItem.SelectedNode.CommandName == "管线") { fileName = PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID)?.PipelineCode; - } + } string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); @@ -519,7 +514,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery 焊口属性 = x.JointAttribute, 焊接日期 = x.WeldingDate, 打底焊工号 = x.BackingWelderCode, - 打底焊工班组=x.BackingWelderTeamGroupName, + 打底焊工班组 = x.BackingWelderTeamGroupName, 盖面焊工号 = x.CoverWelderCode, 盖面焊工班组 = x.CoverWelderTeamGroupName, 热处理报告编号 = x.HotProessReportNo, @@ -528,13 +523,13 @@ namespace FineUIPro.Web.HJGL.InfoQuery 硬度检测结果 = x.HardResult, 委托单编号 = x.TrustBatchCode, 检测单编号 = x.NDECode, - 探伤类型=x.DetectionTypeCode, - 探伤比例=x.DetectionRateCode + 探伤类型 = x.DetectionTypeCode, + 探伤比例 = x.DetectionRateCode }).ToList(); MiniExcel.SaveAs(path, q); - fileName = fileName+ "-焊口信息总览.xlsx"; + fileName = fileName + "-焊口信息总览.xlsx"; FileInfo info = new FileInfo(path); long fileSize = info.Length; System.Web.HttpContext.Current.Response.Clear(); @@ -564,7 +559,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery ProjectId = this.CurrUser.LoginProjectId, UnitWorkId = unitWorkId }; - + // 生成唯一文件路径(带GUID哈希值) string path = $@"{Funs.RootPath}File\Excel\Temp\JointQuery_{Guid.NewGuid().GetHashCode():x}.xlsx"; var AllData = new List(); @@ -613,15 +608,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery 探伤比例 = x.DetectionRateCode }).ToList(); - + AllData.AddRange(currentChunk); // 内存清理 & 翻页操作 currentChunk = null; - pageIndex++; + pageIndex++; GC.Collect(GC.MaxGeneration, GCCollectionMode.Optimized, blocking: true); } - MiniExcel.SaveAs(path, AllData ); + MiniExcel.SaveAs(path, AllData); } string fileName = "焊口信息总览.xlsx"; @@ -633,7 +628,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize); System.Web.HttpContext.Current.Response.Flush(); - System.Web.HttpContext.Current.Response.Close(); + System.Web.HttpContext.Current.Response.Close(); File.Delete(path); // 多保险清理机制 } diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs index 353ca5bc..24e9bf43 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs @@ -4,7 +4,6 @@ using Model; using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.IO; using System.Linq; @@ -23,7 +22,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery ViewState["Completed_pipeline"] = value; } } - public static List View_HJGL_Pipeline=new List(); + public static List View_HJGL_Pipeline = new List(); //public string Incomplete_pipeline //{ // get @@ -93,8 +92,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -137,7 +136,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) { this.BindGrid(); - + } #endregion @@ -148,34 +147,34 @@ namespace FineUIPro.Web.HJGL.InfoQuery /// private void BindGrid() { - // string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName, - // TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize, - // JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure, - // LeakMediumName,PCMediumName,MaterialCode,FinishedDate, - //(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished - // FROM dbo.View_HJGL_Pipeline - // WHERE ProjectId= @ProjectId"; - // List listStr = new List(); - // listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + // string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName, + // TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize, + // JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure, + // LeakMediumName,PCMediumName,MaterialCode,FinishedDate, + //(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished + // FROM dbo.View_HJGL_Pipeline + // WHERE ProjectId= @ProjectId"; + // List listStr = new List(); + // listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); - // strSql += " AND UnitWorkId =@UnitWorkId"; - // listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID)); - // if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim())) - // { - // strSql += " AND PipelineCode LIKE @PipelineCode"; - // listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%")); - // } - // if (drpIsFinish.SelectedValue == "1") - // { - // strSql += " AND pipe.IsFinished = 1"; - // } - // if (drpIsFinish.SelectedValue == "0") - // { - // strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)"; - // } + // strSql += " AND UnitWorkId =@UnitWorkId"; + // listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID)); + // if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim())) + // { + // strSql += " AND PipelineCode LIKE @PipelineCode"; + // listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%")); + // } + // if (drpIsFinish.SelectedValue == "1") + // { + // strSql += " AND pipe.IsFinished = 1"; + // } + // if (drpIsFinish.SelectedValue == "0") + // { + // strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)"; + // } - // SqlParameter[] parameter = listStr.ToArray(); - // DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + // SqlParameter[] parameter = listStr.ToArray(); + // DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline(); view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId; view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID; @@ -184,7 +183,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery if (drpIsFinish.SelectedValue == "1") { view_HJGL_Pipeline.IsFinished = true; - } + } if (drpIsFinish.SelectedValue == "0") { view_HJGL_Pipeline.IsFinished = false; @@ -202,7 +201,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery } #endregion - private void get3DParmeter_pipeline(List view_HJGL_Pipelines ) + private void get3DParmeter_pipeline(List view_HJGL_Pipelines) { if (view_HJGL_Pipelines.Any()) { @@ -228,7 +227,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery // } // Incomplete_pipeline = string.Join(",", Incomplete_pipelineList); //} - + } } @@ -311,32 +310,32 @@ namespace FineUIPro.Web.HJGL.InfoQuery select new { 管线号 = x.PipelineCode, - 是否完成= x.IsFinished, - 完成日期=x.FinishedDate, - 完成达因=x.FinishSize, - 完成焊口=x.FinishJointCount, - 总达因数 =x.TotalDin, - 总焊口量=x.JointCount, - 预制口量=x.ShopJointCount, + 是否完成 = x.IsFinished, + 完成日期 = x.FinishedDate, + 完成达因 = x.FinishSize, + 完成焊口 = x.FinishJointCount, + 总达因数 = x.TotalDin, + 总焊口量 = x.JointCount, + 预制口量 = x.ShopJointCount, 管线划分 = x.PipeAreaStr, - 无损检测类型=x.DetectionTypeCode, - 探伤比例 =x.DetectionRateCode, - 介质名称=x.MediumName, - 管道等级=x.PipingClassCode, - 图纸名称=x.SingleName, - 单线图号=x.SingleNumber, - 设计压力=x.DesignPress, - 设计温度=x.DesignTemperature, - 压力试验介质=x.TestMediumCode, - 压力试验压力=x.TestPressure, - 压力管道级别=x.PressurePipingClassCode, - 管线长度= x.PipeLenth, - 泄露试验介质= x.LeakMediumName, - 泄露试验压力=x.LeakPressure, - 吹洗要求=x.PCMediumName, - 真空试验压力=x.VacuumPressure, - 材质=x.MaterialCode, - 备注=x.Remark + 无损检测类型 = x.DetectionTypeCode, + 探伤比例 = x.DetectionRateCode, + 介质名称 = x.MediumName, + 管道等级 = x.PipingClassCode, + 图纸名称 = x.SingleName, + 单线图号 = x.SingleNumber, + 设计压力 = x.DesignPress, + 设计温度 = x.DesignTemperature, + 压力试验介质 = x.TestMediumCode, + 压力试验压力 = x.TestPressure, + 压力管道级别 = x.PressurePipingClassCode, + 管线长度 = x.PipeLenth, + 泄露试验介质 = x.LeakMediumName, + 泄露试验压力 = x.LeakPressure, + 吹洗要求 = x.PCMediumName, + 真空试验压力 = x.VacuumPressure, + 材质 = x.MaterialCode, + 备注 = x.Remark }).ToList(); MiniExcel.SaveAs(path, q); @@ -438,18 +437,18 @@ namespace FineUIPro.Web.HJGL.InfoQuery string IsFinishedValue = "未完成"; if (IsFinished != null) { - if (IsFinished.ToString()=="True") + if (IsFinished.ToString() == "True") { IsFinishedValue = "已完成"; } - + } - return IsFinishedValue; + return IsFinishedValue; } protected void btnGetChart_Click(object sender, EventArgs e) { decimal PipelineComplete = 0; - decimal PipelineNoComplete=0; + decimal PipelineNoComplete = 0; if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { var allline = (from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == tvControlItem.SelectedNodeID select x).ToList().Count(); @@ -473,8 +472,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery return; } var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault(); - var filemodel= BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"0", this.CurrUser.LoginProjectId); - if (filemodel!=null) + var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "0", this.CurrUser.LoginProjectId); + if (filemodel != null) { string httpUrl = filemodel.FilePath; PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -"))); @@ -485,14 +484,14 @@ namespace FineUIPro.Web.HJGL.InfoQuery ShowNotify("请上传相关ISO轴测图", MessageBoxIcon.Warning); return; } - + } protected void Grid1_RowClick(object sender, GridRowClickEventArgs e) { var q = PipelineService.GetPipelineByPipelineId(Grid1.SelectedRowID); - var pipecode ="/"+ q.PipelineCode; + var pipecode = "/" + q.PipelineCode; Model.Parameter3D parameter3D = new Model.Parameter3D(); Model.ColorModel colorModel = new Model.ColorModel(); colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); diff --git a/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LV_ItemEndCheck.aspx.cs b/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LV_ItemEndCheck.aspx.cs index 5512509a..fd5e03cf 100644 --- a/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LV_ItemEndCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LV_ItemEndCheck.aspx.cs @@ -109,9 +109,9 @@ namespace FineUIPro.Web.HJGL.LeakVacuum //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); - // } + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + // } if (unitWork1.Count() > 0) { diff --git a/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumAudit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumAudit.aspx.cs index 6da2b522..c9f64df2 100644 --- a/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumAudit.aspx.cs @@ -107,8 +107,8 @@ namespace FineUIPro.Web.HJGL.LeakVacuum //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumComplete.aspx.cs b/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumComplete.aspx.cs index 2e47bb06..39f51642 100644 --- a/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumComplete.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumComplete.aspx.cs @@ -107,9 +107,9 @@ namespace FineUIPro.Web.HJGL.LeakVacuum //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); - // } + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + // } if (unitWork1.Count() > 0) { diff --git a/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumEdit.aspx.cs index f48481a4..5731c39b 100644 --- a/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/LeakVacuum/LeakVacuumEdit.aspx.cs @@ -91,8 +91,8 @@ namespace FineUIPro.Web.HJGL.LeakVacuum //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs index 3a322824..5bd7bd33 100644 --- a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs @@ -1,5 +1,4 @@ -using Aspose.Words.Lists; -using BLL; +using BLL; using MiniExcelLibs; using Model; using NPOI.SS.Util; @@ -45,7 +44,7 @@ namespace FineUIPro.Web.HJGL.NDT public static string DataClassification = "NDTBatch"; public static List ndes = new List(); - public static List ndeItems= new List(); + public static List ndeItems = new List(); public enum ButtonState { Check = 0, Import = 1, Save = 2 } @@ -102,7 +101,7 @@ namespace FineUIPro.Web.HJGL.NDT if (!string.IsNullOrEmpty(this.TrustBatchId)) { var trustBatch = BLL.Batch_BatchTrustService.GetBatchTrustById(this.TrustBatchId); - if (trustBatch!=null) + if (trustBatch != null) { if (!string.IsNullOrEmpty(trustBatch.UnitWorkId)) { @@ -153,7 +152,7 @@ namespace FineUIPro.Web.HJGL.NDT var batchTrustItemLists = (from x in Funs.DB.View_Batch_BatchTrustItem where x.TrustBatchId == TrustBatchId - select x); + select x); if (batchTrustItemLists != null) { newUrl = uploadfilepath.Replace("管道焊口检测结果通知单导入模板", "管道焊口检测结果通知单(" + DateTime.Now.ToString("yyyyMMdd") + ")"); @@ -204,7 +203,7 @@ namespace FineUIPro.Web.HJGL.NDT SetCellDropdownList(sheet, 6, 6, new List() { "合格", "不合格" }.ToArray());//是否合格 SetCellDropdownList(sheet, 7, 7, new List() { "Ⅰ", "Ⅱ", "Ⅲ", "Ⅳ", "Ⅴ" }.ToArray());//评定级别 var defects = from x in Funs.DB.Base_Defect select x.DefectName;//缺陷 - SetCellDropdownList(sheet, 8, 8, new List() { string.Join(",", defects.ToList())}.ToArray()); + SetCellDropdownList(sheet, 8, 8, new List() { string.Join(",", defects.ToList()) }.ToArray()); //添加数据 cell = row.CreateCell(7); @@ -252,7 +251,7 @@ namespace FineUIPro.Web.HJGL.NDT if (!string.IsNullOrEmpty(batchTrustItemLists.FirstOrDefault().GrooveTypeCode)) { cell.SetCellValue(batchTrustItemLists.FirstOrDefault().GrooveTypeCode);//坡口形式 - } + } cell = row5.CreateCell(7); cell.CellStyle = cellStyle; @@ -615,7 +614,7 @@ namespace FineUIPro.Web.HJGL.NDT Response.Flush(); Response.Close(); File.Delete(newUrl); - } + } } } @@ -667,7 +666,7 @@ namespace FineUIPro.Web.HJGL.NDT responeData.message = "导入Excel格式错误!Excel只有" + count.ToString().Trim() + "列"; return responeData; } - if (pds.Count-2 > 0 && pds != null) + if (pds.Count - 2 > 0 && pds != null) { string NDEId = string.Empty; //string unitworkId = string.Empty; @@ -1049,25 +1048,25 @@ namespace FineUIPro.Web.HJGL.NDT //} //else //补充导入 //{ - AddNDE(ndes); - AddNDEItem(ndeItems); + AddNDE(ndes); + AddNDEItem(ndeItems); - //Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport(); - //hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID(); - //hJGL_DesignBasisDataImport.ProjectId = this.CurrUser.LoginProjectId; - //hJGL_DesignBasisDataImport.UnitWorkId = unitworkId; - //hJGL_DesignBasisDataImport.ImportType = "0"; - //hJGL_DesignBasisDataImport.DataClassification = DataClassification; - //hJGL_DesignBasisDataImport.FileName = FileName; - //hJGL_DesignBasisDataImport.FilePath = filePath.Replace(rootPath, ""); ; - //hJGL_DesignBasisDataImport.FileType = BLL.HJGL_DesignBasisDataImportService.GetFileType(FileName); - //hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNowVersionByUnitWorkId(unitworkId, DataClassification); - //hJGL_DesignBasisDataImport.Remark = txtRemark.Text; - //hJGL_DesignBasisDataImport.CreateMan = this.CurrUser.PersonId; - //hJGL_DesignBasisDataImport.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss"); - //BLL.HJGL_DesignBasisDataImportService.AddHJGL_DesignBasisDataImport(hJGL_DesignBasisDataImport); + //Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport(); + //hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID(); + //hJGL_DesignBasisDataImport.ProjectId = this.CurrUser.LoginProjectId; + //hJGL_DesignBasisDataImport.UnitWorkId = unitworkId; + //hJGL_DesignBasisDataImport.ImportType = "0"; + //hJGL_DesignBasisDataImport.DataClassification = DataClassification; + //hJGL_DesignBasisDataImport.FileName = FileName; + //hJGL_DesignBasisDataImport.FilePath = filePath.Replace(rootPath, ""); ; + //hJGL_DesignBasisDataImport.FileType = BLL.HJGL_DesignBasisDataImportService.GetFileType(FileName); + //hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNowVersionByUnitWorkId(unitworkId, DataClassification); + //hJGL_DesignBasisDataImport.Remark = txtRemark.Text; + //hJGL_DesignBasisDataImport.CreateMan = this.CurrUser.PersonId; + //hJGL_DesignBasisDataImport.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss"); + //BLL.HJGL_DesignBasisDataImportService.AddHJGL_DesignBasisDataImport(hJGL_DesignBasisDataImport); - //BLL.HJGL_DesignBasisDataImportVerSionLogService.UpdateVersion(this.CurrUser.LoginProjectId, unitworkId, (decimal)hJGL_DesignBasisDataImport.Version, DataClassification); + //BLL.HJGL_DesignBasisDataImportVerSionLogService.UpdateVersion(this.CurrUser.LoginProjectId, unitworkId, (decimal)hJGL_DesignBasisDataImport.Version, DataClassification); //} ShowNotify("导入成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); @@ -1091,7 +1090,7 @@ namespace FineUIPro.Web.HJGL.NDT //更新委托中的检测状态 var trustBatch = BLL.Batch_BatchTrustService.GetBatchTrustById(item.TrustBatchId); - if (trustBatch!=null) + if (trustBatch != null) { trustBatch.IsCheck = true; BLL.Batch_BatchTrustService.UpdatTrustBatchtState(item.TrustBatchId, trustBatch.IsCheck); @@ -1112,8 +1111,8 @@ namespace FineUIPro.Web.HJGL.NDT //var ndeItem = from x in Funs.DB.HJGL_Batch_NDEItem where x.TrustBatchItemId==item.TrustBatchItemId select x; //if (ndeItem.Count() == 0 || ndeItem == null) //{ - //item.NDEItemID = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDEItem)); - BLL.Batch_NDEItemService.AddNDEItem(item); + //item.NDEItemID = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDEItem)); + BLL.Batch_NDEItemService.AddNDEItem(item); //} //else //{ @@ -1130,7 +1129,7 @@ namespace FineUIPro.Web.HJGL.NDT if (trustBatchItemId != null) { var trustBatchItem = (from x in Funs.DB.View_Batch_BatchTrustItem where x.TrustBatchItemId == trustBatchItemId.ToString() select x).FirstOrDefault(); - if (trustBatchItem!=null) + if (trustBatchItem != null) { pipelineCode = trustBatchItem.PipelineCode; } @@ -1170,7 +1169,7 @@ namespace FineUIPro.Web.HJGL.NDT string result = string.Empty; if (CheckResult != null) { - if (CheckResult.ToString()=="1") + if (CheckResult.ToString() == "1") { result = "合格"; } diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/CheckerManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PersonManage/CheckerManage.aspx.cs index 372f34f1..acd1a167 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/CheckerManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/CheckerManage.aspx.cs @@ -110,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PersonManage rootNode.Text = item.UnitName; rootNode.EnableClickEvent = true; this.tvControlItem.Nodes.Add(rootNode); - var getCheckers = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Checker && x.UnitId == item.UnitId && x.WelderCode.Contains(txtQueryWelderCode.Text.Trim()) select x).ToList(); + var getCheckers = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Checker && x.UnitId == item.UnitId && x.WelderCode.Contains(txtQueryWelderCode.Text.Trim()) select x).ToList(); foreach (var sitem in getCheckers) { TreeNode tn = new TreeNode(); diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs index ffcd1152..496b4900 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using Model; using System; using System.Collections.Generic; using System.Data; diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs index 087f0edc..0528e800 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs @@ -36,7 +36,7 @@ namespace FineUIPro.Web.HJGL.PointTrust needYZJointNum = needJointNum - needAZJointNum; } this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString() + "个。"; - this.lbNeedDef.Text = "预制口:" + (needYZJointNum - pointJoints.Count(x => x.JointAttribute == "预制口")).ToString() + "个,安装口:" + (needAZJointNum- pointJoints.Count(x => x.JointAttribute == "安装口")).ToString() + "个。"; + this.lbNeedDef.Text = "预制口:" + (needYZJointNum - pointJoints.Count(x => x.JointAttribute == "预制口")).ToString() + "个,安装口:" + (needAZJointNum - pointJoints.Count(x => x.JointAttribute == "安装口")).ToString() + "个。"; BindGrid(); } } diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs index 590a5b8e..3dec6a14 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.HJGL.HotProcessHard; using System; using System.Collections.Generic; using System.Data; @@ -1036,7 +1035,7 @@ namespace FineUIPro.Web.HJGL.PointTrust var lists = this.Grid1.SelectedRowIDArray; if (lists.Count() > 0) { - if (lbIsTrust.Text=="未委托") + if (lbIsTrust.Text == "未委托") { Alert.ShowInTop("未委托,无需退回!", MessageBoxIcon.Warning); return; @@ -1065,14 +1064,14 @@ namespace FineUIPro.Web.HJGL.PointTrust db.SubmitChanges(); } var pointBatch = BLL.PointBatchService.GetPointBatchById(pointBatchItem.PointBatchId); - if (pointBatch!=null) + if (pointBatch != null) { pointBatch.IsClosed = null; db.SubmitChanges(); } } } - + //var trustItemList = BLL.Batch_BatchTrustItemService.GetBatchTrustItemByTrustBatchId(trustBatchId); //if (trustItemList.Count == 0) //{ diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManage.aspx.cs index 71ce1dbc..3df2c66b 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManage.aspx.cs @@ -28,7 +28,7 @@ namespace FineUIPro.Web.HJGL.PreDesign if (!IsPostBack) { this.ProjectId = this.CurrUser.LoginProjectId; - BLL.UnitService.GetALLUnit(this.drpUnit, true); + BLL.UnitService.GetALLUnit(this.drpUnit, true); BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true); btnNew.OnClientClick = Window1.GetShowReference("MaterialManageEdit.aspx") + "return false;"; GetButtonPower(); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageEdit.aspx.cs index f806f826..7e08c5ce 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageEdit.aspx.cs @@ -111,7 +111,7 @@ namespace FineUIPro.Web.HJGL.PreDesign } else { - var oldView = Funs.DB.HJGL_MaterialManage.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId== Material.UnitId && x.ArrivalDate == Material.ArrivalDate + var oldView = Funs.DB.HJGL_MaterialManage.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == Material.UnitId && x.ArrivalDate == Material.ArrivalDate && x.MaterialName == Material.MaterialName && x.SpecificationAndModel == Material.SpecificationAndModel); if (oldView == null) { diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageIn.aspx.cs index dec1a23c..37af6d3d 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageIn.aspx.cs @@ -5,8 +5,6 @@ using System.Data; using System.Data.OleDb; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.PreDesign @@ -161,13 +159,13 @@ namespace FineUIPro.Web.HJGL.PreDesign var oldViewInfos = from x in Funs.DB.HJGL_MaterialManage join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId where x.ProjectId == this.CurrUser.LoginProjectId - select new { x.ProjectId,y.UnitName,x.MaterialName,x.SpecificationAndModel,x.ArrivalDate}; + select new { x.ProjectId, y.UnitName, x.MaterialName, x.SpecificationAndModel, x.ArrivalDate }; var units = from x in Funs.DB.Base_Unit select x; var mainItems = from x in Funs.DB.ProjectData_MainItem where x.ProjectId == this.CurrUser.LoginProjectId select x; for (int i = 0; i < ir; i++) { - var oldViewInfo = oldViewInfos.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitName== pds.Rows[i][1].ToString() + var oldViewInfo = oldViewInfos.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitName == pds.Rows[i][1].ToString() && x.MaterialName == pds.Rows[i][3].ToString() && x.SpecificationAndModel == pds.Rows[i][4].ToString() && x.ArrivalDate == Funs.GetNewDateTime(pds.Rows[i][10].ToString())); if (oldViewInfo == null) { diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageView.aspx.cs index fcc38030..81c276e0 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/MaterialManageView.aspx.cs @@ -1,5 +1,4 @@ -using BLL; -using System; +using System; namespace FineUIPro.Web.HJGL.PreDesign { diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs index 4ec47203..2c08a604 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.IO; using System.Linq; using System.Text; @@ -32,7 +31,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 绑定数据 /// private void BindGrid() - { + { var list = BLL.HJGLPackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim(), this.Grid1.PageIndex, this.Grid1.PageSize); Grid1.RecordCount = list.Total; Grid1.DataSource = list.Data; @@ -326,6 +325,7 @@ namespace FineUIPro.Web.HJGL.PreDesign Dictionary keyValuePairs = new Dictionary(); keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId)); keyValuePairs.Add("PackagingCode", model.PackagingCode); + keyValuePairs.Add("Remark", model.Remark); keyValuePairs.Add("PlanStartDate", PlanStartDate); keyValuePairs.Add("StackingPosition", model.StackingPosition); keyValuePairs.Add("ContactName", model.ContactName + "| " + model.ContactPhone); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs index 634155ed..678a2e53 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs @@ -1,12 +1,7 @@ using BLL; -using Model; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.PreDesign { @@ -14,11 +9,11 @@ namespace FineUIPro.Web.HJGL.PreDesign { public string PackagingManageId { - get - { + get + { return (string)ViewState["PackagingManageId"]; } - set + set { ViewState["PackagingManageId"] = value; } @@ -34,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PreDesign drpTypeInt.DataValueField = "Value"; drpTypeInt.DataSource = HJGLPackagingmanageService.TypeIntMap; drpTypeInt.DataBind(); - + btnClose.OnClientClick = ActiveWindow.GetHideReference(); if (!string.IsNullOrEmpty(PackagingManageId)) @@ -43,16 +38,16 @@ namespace FineUIPro.Web.HJGL.PreDesign drpTypeInt.Enabled = false; txtPackagingCode.Text = model.PackagingCode; dropPipelineComponentCode.Values = model.PipelineComponentId?.Split(','); - txtStackingPosition.Text = model.StackingPosition; + txtStackingPosition.Text = model.StackingPosition; drpTrainNumber.SelectedValue = model.TrainNumberId; drpTypeInt.SelectedValue = model.TypeInt.ToString(); - if (model.State== HJGLPackagingmanageService.state_0) + if (model.State == HJGLPackagingmanageService.state_0) { btnSave.Hidden = false; } } else - { + { drpTypeInt.Enabled = true; btnSave.Hidden = false; txtPackagingCode.Text = HJGLPackagingmanageService.GetNewPackagingCode(this.CurrUser.LoginProjectId); @@ -66,17 +61,17 @@ namespace FineUIPro.Web.HJGL.PreDesign { Grid1.DataSource = HJGL_PipelineComponentService.GetAcceptedPipelineComponent(CurrUser.LoginProjectId, txtpipelineCode.Text.Trim(), txtpipelineComponentCode.Text.Trim(), txtflowingSection.Text.Trim()); - Grid1 .DataBind(); + Grid1.DataBind(); } private void BindGrid2(string PackagingManageId) - { + { Grid2.DataSource = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId); Grid2.DataBind(); - } + } protected void btnSave_Click(object sender, EventArgs e) - { + { Save(); ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); @@ -105,7 +100,7 @@ namespace FineUIPro.Web.HJGL.PreDesign } BLL.HJGLPackagingmanageService.AddHJGL_PackagingManage(table); - PackagingManageId= table.PackagingManageId; + PackagingManageId = table.PackagingManageId; } else { @@ -120,11 +115,11 @@ namespace FineUIPro.Web.HJGL.PreDesign //table.ContactPhone =txtContactPhone.Text; table.TrainNumberId = drpTrainNumber.SelectedValue; table.TypeInt = int.Parse(drpTypeInt.SelectedValue); - if (drpTypeInt.SelectedValue ==((int)HJGLPackagingmanageService.TypeInt.预制组件).ToString()) + if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.预制组件).ToString()) { table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); - var newDetailList= new List(); + var newDetailList = new List(); foreach (var item in dropPipelineComponentCode.Values) { var ComponentModel = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(item); @@ -135,11 +130,11 @@ namespace FineUIPro.Web.HJGL.PreDesign Id = SQLHelper.GetNewID(), PackagingManageId = this.PackagingManageId, PipelineId = ComponentModel.PipelineId, - PipelineComponentId = item, + PipelineComponentId = item, CreateTime = DateTime.Now, CreateUser = this.CurrUser.PersonId, }; - newDetailList.Add(model); + newDetailList.Add(model); } } HJGLPackagingmanagedetailService.DeleteByPackagingManageId(this.PackagingManageId); @@ -203,20 +198,20 @@ namespace FineUIPro.Web.HJGL.PreDesign { if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.预制组件).ToString()) { - dropPipelineComponentCode.Hidden=false; - Grid2.Hidden=true; + dropPipelineComponentCode.Hidden = false; + Grid2.Hidden = true; BindGrid(); } - else + else { dropPipelineComponentCode.Hidden = true; Grid2.Hidden = false; btnSelect.Hidden = false; //btnSelectStock.Hidden = true; - BindGrid2(this.PackagingManageId); + BindGrid2(this.PackagingManageId); } - + } protected void Grid2_RowCommand(object sender, GridCommandEventArgs e) { diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs index 9383d294..e4e23047 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs @@ -104,7 +104,7 @@ namespace FineUIPro.Web.HJGL.PreDesign List unitWork2 = null; unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); - + if (unitWork2.Count() > 0) { @@ -164,8 +164,8 @@ namespace FineUIPro.Web.HJGL.PreDesign else { if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - + { + this.BindGrid(this.tvControlItem.SelectedNodeID); } @@ -184,16 +184,16 @@ namespace FineUIPro.Web.HJGL.PreDesign { DataRowView row = e.DataItem as DataRowView; string id = e.RowID; - if (Funs.DB.HJGL_PackagingManageDetail.Any(x=>x.TwOutputDetailId==id)) + if (Funs.DB.HJGL_PackagingManageDetail.Any(x => x.TwOutputDetailId == id)) { - e.RowSelectable = false; + e.RowSelectable = false; } ; } private void BindGrid(string outputMasterId) { ////var Prelist = HJGL_PipelineComponentService.GetPipelinePrefabricatedComponent(unitworkid, pipelineId); - + ////var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail //// where x.PipelineId == pipelineId //// && (x.PipelineComponentId == null || x.PipelineComponentId == "") diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.cs index 184d358f..f49c77f9 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.cs @@ -1,16 +1,11 @@ using BLL; -using Model; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel; namespace FineUIPro.Web.HJGL.PreDesign { - public partial class PackagingManageSelectStock : PageBase + public partial class PackagingManageSelectStock : PageBase { public string PackagingManageId { @@ -38,15 +33,15 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 绑定数据 /// private void BindGrid() - { + { Model.Tw_MaterialStockOutput table = new Model.Tw_MaterialStockOutput(); table.PipeLineMatCode = txtMatCode.Text.Trim(); table.WarehouseCode = "工厂预制"; - table.ProjectId = this.CurrUser.LoginProjectId; + table.ProjectId = this.CurrUser.LoginProjectId; var tb = BLL.TwMaterialstockService.GetTw_MaterialStockByModle(table); var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail - where x.PackagingManageId == PackagingManageId + where x.PackagingManageId == PackagingManageId select x).ToList(); var queryList = tb; // 优化 Linq 过滤条件,过滤已经进入包装的预制散件 @@ -55,7 +50,7 @@ namespace FineUIPro.Web.HJGL.PreDesign from y in yy.DefaultIfEmpty() where y == null select x).ToList(); - Grid1.RecordCount = result.Count; + Grid1.RecordCount = result.Count; Grid1.DataSource = result; Grid1.DataBind(); } @@ -84,11 +79,11 @@ namespace FineUIPro.Web.HJGL.PreDesign { foreach (var id in List_Id) { - var StockModel = TwMaterialstockService.GetTw_MaterialStockById(id); + var StockModel = TwMaterialstockService.GetTw_MaterialStockById(id); var model = new Model.HJGL_PackagingManageDetail() { Id = SQLHelper.GetNewID(), - PackagingManageId = this.PackagingManageId, + PackagingManageId = this.PackagingManageId, MaterialCode = StockModel.PipeLineMatCode, Number = 0, CreateTime = DateTime.Now, @@ -98,7 +93,7 @@ namespace FineUIPro.Web.HJGL.PreDesign } } } - + #endregion #region GV 数据操作 diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs index 0212dbad..53d9363c 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs @@ -1,13 +1,6 @@ using BLL; -using Model; using System; -using System.Collections.Generic; -using System.Data; -using System.Data.SqlClient; -using System.IO; using System.Linq; -using System.Text; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.PreDesign { public partial class PackagingManageView : PageBase @@ -47,39 +40,39 @@ namespace FineUIPro.Web.HJGL.PreDesign { var pack = HJGLPackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); if (pack == null) return; - var detailList= HJGLPackagingmanageService.GetPackagingDetailById(PackagingManageId); + var detailList = HJGLPackagingmanageService.GetPackagingDetailById(PackagingManageId); Grid1.RecordCount = detailList.Count(); Grid1.DataSource = detailList; Grid1.DataBind(); - /* if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.预制组件) - { - DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId); + /* if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.预制组件) + { + DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId); + + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + else + { + var result = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId).ToList(); + var detailList = from x in result + select new + { + PipelineComponentId = x.Id, + PipelineComponentCode = x.MaterialCode, + num = x.Number, + CU = x.MaterialUnit, + UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId), + x.FlowingSection, + }; + Grid1.RecordCount = detailList.Count(); + Grid1.DataSource = detailList; + Grid1.DataBind(); + }*/ - Grid1.RecordCount = tb.Rows.Count; - tb = GetFilteredTable(Grid1.FilteredData, tb); - var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = table; - Grid1.DataBind(); - } - else - { - var result = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId).ToList(); - var detailList = from x in result - select new - { - PipelineComponentId = x.Id, - PipelineComponentCode = x.MaterialCode, - num = x.Number, - CU = x.MaterialUnit, - UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId), - x.FlowingSection, - }; - Grid1.RecordCount = detailList.Count(); - Grid1.DataSource = detailList; - Grid1.DataBind(); - }*/ - } #endregion diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.cs index 23378aed..d73c73fe 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.cs @@ -1,18 +1,15 @@ using BLL; -using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; -using System.Web.UI.DataVisualization.Charting; namespace FineUIPro.Web.HJGL.PreDesign { - + public partial class PipelingDivide : PageBase { - public static List view_HJGL_Pipelines =new List(); + public static List view_HJGL_Pipelines = new List(); public decimal PipelineComplete { get @@ -35,11 +32,11 @@ namespace FineUIPro.Web.HJGL.PreDesign ViewState["PipelineNOComplete"] = value; } } - public string Line_No + public string Line_No { get { - return (string)ViewState["Line_No"]; + return (string)ViewState["Line_No"]; } set { @@ -48,11 +45,11 @@ namespace FineUIPro.Web.HJGL.PreDesign } protected void Page_Load(object sender, EventArgs e) { - // ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); + // ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); if (!IsPostBack) { - // this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + // this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.InitTreeMenu();//加载树 PipelineComplete = 0; PipelineNOComplete = 0; @@ -110,8 +107,8 @@ namespace FineUIPro.Web.HJGL.PreDesign //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -154,27 +151,27 @@ namespace FineUIPro.Web.HJGL.PreDesign protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) { this.BindGrid(); - // var q = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP); - // if (q.Any()) - // { - // List listpipecode = new List(); - // foreach (var item in q) - // { - // listpipecode.Add("/" + item.PipelineCode); - // } - // Line_No = string.Join(",", listpipecode); - // } - // Model.Parameter3D parameter3D = new Model.Parameter3D(); - // Model.ColorModel colorModel = new Model.ColorModel(); - // colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); - // parameter3D.ColorModel = colorModel; - // parameter3D.TagNum = Line_No; - // parameter3D.ButtonType = "1"; - // parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID); - //// parameter3D.Line_No = Line_No; - // ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName; - // ctlAuditFlow.data = parameter3D; - // ctlAuditFlow.BindData(); + // var q = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP); + // if (q.Any()) + // { + // List listpipecode = new List(); + // foreach (var item in q) + // { + // listpipecode.Add("/" + item.PipelineCode); + // } + // Line_No = string.Join(",", listpipecode); + // } + // Model.Parameter3D parameter3D = new Model.Parameter3D(); + // Model.ColorModel colorModel = new Model.ColorModel(); + // colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); + // parameter3D.ColorModel = colorModel; + // parameter3D.TagNum = Line_No; + // parameter3D.ButtonType = "1"; + // parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID); + //// parameter3D.Line_No = Line_No; + // ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName; + // ctlAuditFlow.data = parameter3D; + // ctlAuditFlow.BindData(); } #endregion @@ -193,23 +190,23 @@ namespace FineUIPro.Web.HJGL.PreDesign view_HJGL_Pipeline.SingleName = this.txtSingleName.Text.Trim(); // view_HJGL_Pipeline.MaterialCode=this.txtMaterialCode.Text.Trim(); var list = BLL.PipelineService.GetHJGL_PipelineList(view_HJGL_Pipeline); - if (!string .IsNullOrEmpty(this.txtMaterialCode.Text.Trim())) + if (!string.IsNullOrEmpty(this.txtMaterialCode.Text.Trim())) { list = (from x in list join y in Funs.DB.HJGL_PipeLineMat on x.PipelineId equals y.PipelineId where y.MaterialCode.Contains(txtMaterialCode.Text.Trim()) select x).Distinct().ToList(); } - view_HJGL_Pipelines = list; + view_HJGL_Pipelines = list; // 2.获取当前分页数据 Grid1.RecordCount = list.Count(); - + // 2.获取当前分页数据 - + // 3.绑定到Grid - - - var table = this.GetPagedDataTable(Grid1, list); + + + var table = this.GetPagedDataTable(Grid1, list); Grid1.DataSource = table; Grid1.DataBind(); //lbSinglePreRate.Text= GetSinglePreRateByUnitWork(this.tvControlItem.SelectedNodeID); @@ -252,7 +249,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) { - // Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + // Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); BindGrid(); } #endregion @@ -277,8 +274,8 @@ namespace FineUIPro.Web.HJGL.PreDesign } protected void Grid1_RowClick(object sender, GridRowClickEventArgs e) { - var Id =Grid1.SelectedRowIDArray; - List listpipecode=new List () ; + var Id = Grid1.SelectedRowIDArray; + List listpipecode = new List(); foreach (var item in Id) { var q = PipelineService.GetPipelineByPipelineId(item); @@ -292,7 +289,7 @@ namespace FineUIPro.Web.HJGL.PreDesign parameter3D.TagNum = pipecode; parameter3D.ButtonType = "1"; parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID); - // parameter3D.Line_No = Line_No; + // parameter3D.Line_No = Line_No; ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName; ctlAuditFlow.data = parameter3D; @@ -371,7 +368,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { txtPipelineCode.Text = String.Empty; txtSingleName.Text = String.Empty; - txtMaterialCode.Text = String.Empty; + txtMaterialCode.Text = String.Empty; BindGrid(); } @@ -382,13 +379,13 @@ namespace FineUIPro.Web.HJGL.PreDesign if (PipeArea != null) { var q = PipelineService.GetPipeArea().Where(x => x.Value == PipeArea.ToString()); - if (q!=null&&q.Count()>0) + if (q != null && q.Count() > 0) { PipeAreaValue = q.First().Text; } } - + else { return ""; @@ -403,11 +400,11 @@ namespace FineUIPro.Web.HJGL.PreDesign private string GetSinglePreRateByUnitWork(string unitworkid) { var db = Funs.DB; - var pipeline=from x in db.View_HJGL_Pipeline where x.UnitWorkId == unitworkid && x.PipeArea=="1" select x; + var pipeline = from x in db.View_HJGL_Pipeline where x.UnitWorkId == unitworkid && x.PipeArea == "1" select x; var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x; string rate = ""; - - if (q != null && q.Count() > 0&&pipeline.Count()>0) + + if (q != null && q.Count() > 0 && pipeline.Count() > 0) { var proSum = (from x in q join y in pipeline on x.PipelineId equals y.PipelineId into temp @@ -419,12 +416,12 @@ namespace FineUIPro.Web.HJGL.PreDesign SizeSum = g.Sum(x => x.Size) }).FirstOrDefault().SizeSum; var AllSum = (from x in pipeline - group x by x.UnitWorkId into g - select new - { - SizeSum = g.Sum(x => x.TotalDin) - }).FirstOrDefault().SizeSum; - + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.TotalDin) + }).FirstOrDefault().SizeSum; + proSum = (proSum != null) ? proSum : 0; if (AllSum > 0) { diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs index f401d8ea..30f98afb 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs @@ -1,14 +1,11 @@ using BLL; using MiniExcelLibs; -using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Drawing; using System.IO; using System.Linq; -using System.Runtime.InteropServices; using System.Web; namespace FineUIPro.Web.HJGL.PreDesign @@ -16,7 +13,7 @@ namespace FineUIPro.Web.HJGL.PreDesign public partial class PrePipeline : PageBase { public int pageSize = 20; - public static DataTable GridDataTable=new DataTable (); + public static DataTable GridDataTable = new DataTable(); protected void Page_Load(object sender, EventArgs e) { @@ -24,11 +21,11 @@ namespace FineUIPro.Web.HJGL.PreDesign { this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.InitTreeMenu();//加载树 - HJGL_PipelineComponentService.InitMainItemDownList(drpState,true); - HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState,true); + HJGL_PipelineComponentService.InitMainItemDownList(drpState, true); + HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState, true); var pipeline = (from x in Funs.DB.HJGL_Pipeline - where x.ProjectId == this.CurrUser.LoginProjectId + where x.ProjectId == this.CurrUser.LoginProjectId select x.FlowingSection).Distinct().ToList(); this.drpFlowingSection.DataTextField = "Value"; this.drpFlowingSection.DataValueField = "Value"; @@ -84,8 +81,8 @@ namespace FineUIPro.Web.HJGL.PreDesign //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -98,7 +95,7 @@ namespace FineUIPro.Web.HJGL.PreDesign tn1.NodeID = q.UnitWorkId; tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; tn1.ToolTip = "施工单位:" + unitNamesUnitIds; - tn1.CommandName = 1+"|"+Funs.GetEndPageNumber(a, pageSize); + tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); tn1.EnableClickEvent = true; tn1.EnableExpandEvent = true; rootNode1.Nodes.Add(tn1); @@ -149,18 +146,18 @@ namespace FineUIPro.Web.HJGL.PreDesign } } } - + private void BindNodes(TreeNode node) - { + { List pipeline = new List(); - var pipelines = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" select x; + var pipelines = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" select x; pipeline = (from x in pipelines where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) orderby x.PipelineCode select x).ToList(); - int pageindex =int.Parse(node.CommandName.Split('|')[0]); - int pageCount= int.Parse(node.CommandName.Split('|')[1]); + int pageindex = int.Parse(node.CommandName.Split('|')[0]); + int pageCount = int.Parse(node.CommandName.Split('|')[1]); if (pageindex <= pageCount) { pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList(); @@ -174,9 +171,9 @@ namespace FineUIPro.Web.HJGL.PreDesign newNode.NodeID = item.PipelineId; newNode.EnableClickEvent = true; node.Nodes.Add(newNode); - + } - if (pageindex private void BindGrid() - + { - if (tvControlItem.SelectedNode==null) return; + if (tvControlItem.SelectedNode == null) return; string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,com.Remark, com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,com.IsPrint, com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate, @@ -264,14 +261,14 @@ namespace FineUIPro.Web.HJGL.PreDesign listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID)); } - else if (tvControlItem.SelectedNode.CommandName=="管线") + else if (tvControlItem.SelectedNode.CommandName == "管线") { strSql += " and com.PipelineId = @PipelineId "; listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID)); } - - if (drpWeldingDailyCode.SelectedValue!=Const._Null &&!string.IsNullOrEmpty(drpWeldingDailyCode.SelectedValue)) + + if (drpWeldingDailyCode.SelectedValue != Const._Null && !string.IsNullOrEmpty(drpWeldingDailyCode.SelectedValue)) { strSql += " and joint.WeldingDailyId = @WeldingDailyId "; listStr.Add(new SqlParameter("@WeldingDailyId", drpWeldingDailyCode.SelectedValue)); @@ -283,7 +280,7 @@ namespace FineUIPro.Web.HJGL.PreDesign listStr.Add(new SqlParameter("@PipelineComponentCode", "%" + this.txtPipelineComponentCode.Text.Trim() + "%")); } - if (drpState.SelectedValue!=Const._Null) + if (drpState.SelectedValue != Const._Null) { strSql += " AND com.State =@State"; listStr.Add(new SqlParameter("@State", drpState.SelectedValue)); @@ -374,10 +371,10 @@ namespace FineUIPro.Web.HJGL.PreDesign { HJGL_PipelineComponentService.UpdateIsPrint(Grid1.SelectedRowIDArray); //打印后修改打印状态 - } + } } private bool Print(string[] PipelineComponentId) - { + { BLL.FastReportService.ResetData(); var result = HJGL_PipelineComponentService.GetPrintModelByPipelineComponentIds(PipelineComponentId, null, false); @@ -388,7 +385,7 @@ namespace FineUIPro.Web.HJGL.PreDesign } else { - ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question); + ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question); return false; } BLL.FastReportService.AddFastreportTable(tb); @@ -587,7 +584,7 @@ namespace FineUIPro.Web.HJGL.PreDesign return txt; } } - + return StateName; } protected void btnImportQRCode_Click(object sender, EventArgs e) @@ -606,7 +603,7 @@ namespace FineUIPro.Web.HJGL.PreDesign return; } var SingleName = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineComponentId == id select (x.DrawingName)).FirstOrDefault(); - var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"3", this.CurrUser.LoginProjectId); + var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "3", this.CurrUser.LoginProjectId); if (filemodel != null) { string httpUrl = filemodel.FilePath; @@ -624,19 +621,19 @@ namespace FineUIPro.Web.HJGL.PreDesign protected void btnAccept_Click(object sender, EventArgs e) { - if (Grid1.SelectedRowIDArray.Length>0) + if (Grid1.SelectedRowIDArray.Length > 0) { - + foreach (var item in Grid1.SelectedRowIDArray) { var model = HJGL_PipelineComponentService.GetPipelineComponentById(item); - if (model.ProductionState==2) + if (model.ProductionState == 2) { - BLL.APIPipelineComponentService.GetComponentConfirmArrival(PipelineComponentId: item, this.CurrUser.PersonId,""); ; + BLL.APIPipelineComponentService.GetComponentConfirmArrival(PipelineComponentId: item, this.CurrUser.PersonId, ""); ; } } - ShowNotify("操作成功",MessageBoxIcon.Success); + ShowNotify("操作成功", MessageBoxIcon.Success); BindGrid(); } else @@ -672,20 +669,20 @@ namespace FineUIPro.Web.HJGL.PreDesign protected void btnOut_Click(object sender, EventArgs e) { - if (GridDataTable!=null) + if (GridDataTable != null) { var q = (from x in GridDataTable.AsEnumerable() select new - { - 组件编号 = x.Field("PipelineComponentCode"), - 物流箱号 = x.Field("BoxNumber"), - 组件状态 = ConvertState(x.Field("State")), - 生产状态 = ConvertProductionState(x.Field("ProductionState")), - 管线计划安装日期 = x.Field("PlanStartDate"), - 预制图纸名称 = x.Field("DrawingName"), - 验收人 = x.Field("PersonName"), - 验收时间 = x.Field("ReceiveDate"), - }); + { + 组件编号 = x.Field("PipelineComponentCode"), + 物流箱号 = x.Field("BoxNumber"), + 组件状态 = ConvertState(x.Field("State")), + 生产状态 = ConvertProductionState(x.Field("ProductionState")), + 管线计划安装日期 = x.Field("PlanStartDate"), + 预制图纸名称 = x.Field("DrawingName"), + 验收人 = x.Field("PersonName"), + 验收时间 = x.Field("ReceiveDate"), + }); string path = Funs.RootPath + @"File\Excel\Temp\PrePipeline.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); @@ -704,7 +701,7 @@ namespace FineUIPro.Web.HJGL.PreDesign File.Delete(path); } - + } } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineBatchEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineBatchEdit.aspx.cs index a9da0fc6..7058fe8c 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineBatchEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineBatchEdit.aspx.cs @@ -73,7 +73,7 @@ namespace FineUIPro.Web.HJGL.PreDesign pipeline.AssembleUnit = this.drpAssembleUnit.SelectedValue; } pipeline.BoxNumber = this.txtBoxNumber.Text.Trim(); - pipeline.PipelineId = hdPipelineId.Text; + pipeline.PipelineId = hdPipelineId.Text; BLL.HJGL_PipelineComponentService.AddPipelineComponent(pipeline); } } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineQRCodeIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineQRCodeIn.aspx.cs index 7f8c9fce..b364cfaf 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineQRCodeIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineQRCodeIn.aspx.cs @@ -1,11 +1,8 @@ using BLL; using MiniExcelLibs; -using Model; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Data; -using System.Data.OleDb; using System.IO; using System.Linq; @@ -65,7 +62,7 @@ namespace FineUIPro.Web.HJGL.PreDesign Pipeline_ComponentList.Clear(); } errorInfos = string.Empty; - + } } #endregion @@ -130,11 +127,11 @@ namespace FineUIPro.Web.HJGL.PreDesign /// Excel文件路径名 private void ImportXlsToData(string fileName) { - // var rows =Funs.LINQToDataTable(MiniExcel.Query(fileName).ToList()) ; + // var rows =Funs.LINQToDataTable(MiniExcel.Query(fileName).ToList()) ; var rows = MiniExcel.QueryAsDataTable(fileName, useHeaderRow: true); Model.ResponeData responeData = new Model.ResponeData(); responeData = AddDatasetToSQL(rows, 3); - if (responeData.code==1) + if (responeData.code == 1) { ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); } @@ -164,7 +161,7 @@ namespace FineUIPro.Web.HJGL.PreDesign Model.ResponeData responeData = new Model.ResponeData(); //string result = string.Empty; - List result = new List () ; + List result = new List(); int ic, ir; ic = pds.Columns.Count; ir = pds.Rows.Count; @@ -198,7 +195,7 @@ namespace FineUIPro.Web.HJGL.PreDesign if (pipeline == null) { //result += "第" + (i + 2).ToString() + "行," + "不存在此管线号" + "|"; - result.Add("不存在此管线号-"+ pipelinecode); + result.Add("不存在此管线号-" + pipelinecode); continue; } } @@ -217,13 +214,13 @@ namespace FineUIPro.Web.HJGL.PreDesign continue; } } - - } - if (result.Count>0) + + } + if (result.Count > 0) { PipelineList.Clear(); - // result = result.Substring(0, result.LastIndexOf("|")); - errorInfos = string .Join("|", result.Distinct()) ; + // result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = string.Join("|", result.Distinct()); //Alert alert = new Alert(); //alert.Message = result; //alert.Target = Target.Self; @@ -235,23 +232,24 @@ namespace FineUIPro.Web.HJGL.PreDesign { var dt = pds.AsEnumerable() - .GroupBy(x => new { + .GroupBy(x => new + { pipelinecode = x.Field("管线号"), PipelineComponentCode = x.Field("预制组件"), - // DrawingName = x.Field("预制图纸名称"), + // DrawingName = x.Field("预制图纸名称"), }) .Select(x => new { pipelinecode = x.Key.pipelinecode, PipelineComponentCode = x.Key.PipelineComponentCode, - // DrawingName = x.Key.DrawingName, + // DrawingName = x.Key.DrawingName, QRCode = String.Join(";", x.Select(z => z.Field("二维码信息"))) }); foreach (var item in dt) { - var pipeline = PipelineService.GetPipelineByPipelineCode(this.CurrUser.LoginProjectId,item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "")); - var hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(item.PipelineComponentCode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""), pipeline.PipelineId); - if (hJGL_Pipeline_Component!=null) + var pipeline = PipelineService.GetPipelineByPipelineCode(this.CurrUser.LoginProjectId, item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "")); + var hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(item.PipelineComponentCode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""), pipeline.PipelineId); + if (hJGL_Pipeline_Component != null) { //model.Pipeline_ComponentQRCodeRootName rootName = new model.Pipeline_ComponentQRCodeRootName(); //rootName.QRCode = new List(); @@ -267,9 +265,9 @@ namespace FineUIPro.Web.HJGL.PreDesign hJGL_Pipeline_Component.QRCode = item.QRCode; Pipeline_ComponentList.Add(hJGL_Pipeline_Component); - + } - + } errorInfos = string.Empty; @@ -345,10 +343,10 @@ namespace FineUIPro.Web.HJGL.PreDesign var joint = BLL.WeldJointService.GetWeldJointsByWeldJointCode(item.PipelineId, QRCodeitem.Substring(1)); if (joint != null) { - var ComponetJoint = BLL.HJGL_PipelineComponentjointService.GetHJGL_Pipeline_ComponentJointByWeldJointId(joint.WeldJointId); - if (ComponetJoint!=null) + var ComponetJoint = BLL.HJGL_PipelineComponentjointService.GetHJGL_Pipeline_ComponentJointByWeldJointId(joint.WeldJointId); + if (ComponetJoint != null) { - ComponetJoint.PipelineComponentCode= item.PipelineComponentCode; + ComponetJoint.PipelineComponentCode = item.PipelineComponentCode; ComponetJoint.PipelineComponentId = item.PipelineComponentId; HJGL_PipelineComponentjointService.UpdateHJGL_Pipeline_ComponentJoint(ComponetJoint); } @@ -359,12 +357,12 @@ namespace FineUIPro.Web.HJGL.PreDesign hJGL_Pipeline_ComponentJoint.PipelineComponentCode = item.PipelineComponentCode; hJGL_Pipeline_ComponentJoint.PipelineComponentId = item.PipelineComponentId; hJGL_Pipeline_ComponentJoint.WeldJointCode = joint.WeldJointCode; - hJGL_Pipeline_ComponentJoint.WeldJointId=joint.WeldJointId; + hJGL_Pipeline_ComponentJoint.WeldJointId = joint.WeldJointId; hJGL_Pipeline_ComponentJoint.State = 0; HJGL_PipelineComponentjointService.AddHJGL_Pipeline_ComponentJoint(hJGL_Pipeline_ComponentJoint); } - + } } } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs index 78f1f32b..76ece3d7 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs @@ -1,22 +1,12 @@ using BLL; -using FineUIPro.Web.ProjectData; -using MiniExcelLibs; using Model; using Newtonsoft.Json.Linq; -using NPOI.SS.Formula.Functions; -using Org.BouncyCastle.Bcpg.OpenPgp; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Data.SqlTypes; -using System.Drawing; using System.IO; using System.Linq; -using System.Runtime.InteropServices; -using System.Security.Cryptography; -using System.Web; -using System.Web.WebSockets; namespace FineUIPro.Web.HJGL.PreDesign { diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs index 6414f189..490b8fb1 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs @@ -1,11 +1,6 @@ using BLL; -using Org.BouncyCastle.Asn1.Ocsp; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.PreDesign { @@ -43,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PreDesign Model.HJGL_TrainNumberManage model = BLL.TrainNumberManageService.GetModelById(this.Id); if (model != null) { - this.txtTrainNumber.Text = model.TrainNumber; + this.txtTrainNumber.Text = model.TrainNumber; this.txtDriverName.Text = model.DriverName; this.txtDriverPhone.Text = model.DriverPhone; this.txtLicensePlateNumber.Text = model.LicensePlateNumber; diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx index 9c378c2f..b2e48c44 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx @@ -76,7 +76,7 @@ FieldType="String" HeaderText="联系人电话" TextAlign="Left" HeaderTextAlign="Center"> + HeaderText="签收时间" HeaderTextAlign="Center" TextAlign="Center"> diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs index a2ec53e7..1f4b6d1d 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs @@ -6,15 +6,12 @@ using System.Data; using System.IO; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.PreDesign { - public partial class TrainNumberManager : PageBase - { - public static List hJGL_TrainNumberManages=new List(); + public partial class TrainNumberManager : PageBase + { + public static List hJGL_TrainNumberManages = new List(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) @@ -34,11 +31,11 @@ namespace FineUIPro.Web.HJGL.PreDesign { Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage(); table.ProjectId = this.CurrUser.LoginProjectId; - var tb = BLL.TrainNumberManageService.GetListByQueryModle(table, Grid1.PageIndex,Grid1.PageSize); - Grid1.RecordCount = tb.Total; + var tb = BLL.TrainNumberManageService.GetListByQueryModle(table, Grid1.PageIndex, Grid1.PageSize); + Grid1.RecordCount = tb.Total; Grid1.DataSource = tb.Data; Grid1.DataBind(); - hJGL_TrainNumberManages= tb.Data; + hJGL_TrainNumberManages = tb.Data; } #endregion @@ -220,7 +217,7 @@ namespace FineUIPro.Web.HJGL.PreDesign MiniExcel.SaveAs(path, q); - string fileName = $"车次管理-"+ string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx"; + string fileName = $"车次管理-" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx"; FileInfo info = new FileInfo(path); long fileSize = info.Length; System.Web.HttpContext.Current.Response.Clear(); @@ -299,12 +296,12 @@ namespace FineUIPro.Web.HJGL.PreDesign DataTable tb = LINQToDataTable(HJGLPackagingmanageService.GetPackagingManage(Id)); if (tb.Rows.Count > 0) { - var model = TrainNumberManageService.GetModelById(Id); + var model = TrainNumberManageService.GetModelById(Id); Dictionary keyValuePairs = new Dictionary(); keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId)); keyValuePairs.Add("TrainNumber", model.TrainNumber); keyValuePairs.Add("Remark", model.Remark); - keyValuePairs.Add("ContactName", model.ContactName ); + keyValuePairs.Add("ContactName", model.ContactName); keyValuePairs.Add("ContactPhone", model.ContactPhone); keyValuePairs.Add("ID", "TrainNumberManager$" + model.Id); DataRow dataRow = tb.NewRow(); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.cs index 80125356..a6e8fd3a 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.PreDesign { diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx.cs index 37503509..fc93bfc7 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx.cs @@ -1,10 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.PreDesign { @@ -44,7 +40,7 @@ namespace FineUIPro.Web.HJGL.PreDesign private void BindGrid() { - var result = HJGLPackagingmanageService.GetPackagingManage(TrainNumberId); + var result = HJGLPackagingmanageService.GetPackagingManage(TrainNumberId); Grid1.RecordCount = result.Count(); Grid1.DataSource = result; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanning.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanning.aspx.cs index 3849deae..15551203 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanning.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanning.aspx.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; using System.Configuration; using System.Data; -using System.Data.SqlClient; using System.Linq; -using System.Web.UI.DataVisualization.Charting; namespace FineUIPro.Web.HJGL.PreDesign { @@ -51,19 +49,19 @@ namespace FineUIPro.Web.HJGL.PreDesign } private void Bind() { - - if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) - { - var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID); - this.imgPhoto.ImageUrl = null; - if (unit != null) - { - this.imgPhoto.ImageUrl = "~/" + unit.FlowChartPic; - } + if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) + { + var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById(tvControlItem.SelectedNodeID); + this.imgPhoto.ImageUrl = null; + if (unit != null) + { + this.imgPhoto.ImageUrl = "~/" + unit.FlowChartPic; + } - - + } + + } #region 加载树装置-单位-工作区 /// @@ -111,8 +109,8 @@ namespace FineUIPro.Web.HJGL.PreDesign //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -138,17 +136,17 @@ namespace FineUIPro.Web.HJGL.PreDesign { foreach (var q in unitWork2) { - int a = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId==q.UnitWorkId select x).Count(); + int a = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId == q.UnitWorkId select x).Count(); var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn2 = new TreeNode(); tn2.NodeID = q.UnitWorkId; - // tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; - tn2.Text = q.UnitWorkName ; + // tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; + tn2.Text = q.UnitWorkName; tn2.CommandName = "主项"; tn2.ToolTip = "施工单位:" + unitNamesUnitIds; tn2.EnableClickEvent = true; rootNode2.Nodes.Add(tn2); - if (a>0) + if (a > 0) { BoundTree(tn2.Nodes, tn2.NodeID); } @@ -159,7 +157,7 @@ namespace FineUIPro.Web.HJGL.PreDesign private void BoundTree(TreeNodeCollection nodes, string superId) { var mdoel = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningBySurperId(superId); - foreach (var m in mdoel) + foreach (var m in mdoel) { TreeNode chidNode = new TreeNode { @@ -167,12 +165,12 @@ namespace FineUIPro.Web.HJGL.PreDesign NodeID = m.YardPlanningId, Expanded = true, Selectable = true, - EnableClickEvent= true, - }; + EnableClickEvent = true, + }; nodes.Add(chidNode); this.BoundTree(chidNode.Nodes, m.YardPlanningId); } - + } #endregion @@ -226,11 +224,11 @@ namespace FineUIPro.Web.HJGL.PreDesign if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { var model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID); - if (model != null) - { - HJGL_YardPlanningService.DeleteHJGL_YardPlanningById(model.YardPlanningId); - } - this.imgPhoto.ImageUrl = null; + if (model != null) + { + HJGL_YardPlanningService.DeleteHJGL_YardPlanningById(model.YardPlanningId); + } + this.imgPhoto.ImageUrl = null; } else { @@ -245,37 +243,37 @@ namespace FineUIPro.Web.HJGL.PreDesign { if (filePhoto.HasFile) { - string rootUrl = ConfigurationManager.AppSettings["localRoot"]; - if (string.IsNullOrEmpty(rootUrl)) - { - rootUrl = Funs.RootPath; - } + string rootUrl = ConfigurationManager.AppSettings["localRoot"]; + if (string.IsNullOrEmpty(rootUrl)) + { + rootUrl = Funs.RootPath; + } - string fileName = filePhoto.ShortFileName; + string fileName = filePhoto.ShortFileName; - if (!ValidateFileType(fileName)) - { - // 清空文件上传控件 + if (!ValidateFileType(fileName)) + { + // 清空文件上传控件 + filePhoto.Reset(); + + ShowNotify("无效的文件类型!"); + return; + } + + + fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_"); + fileName = DateTime.Now.Ticks.ToString() + "_" + fileName; + + + filePhoto.SaveAs(rootUrl + "/FileUpload/HJGL_YardPlanning/" + fileName); + + imgPhoto.ImageUrl = "~/FileUpload/HJGL_YardPlanning/" + fileName; + + + HJGL_YardPlanningService.SavePic(tvControlItem.SelectedNodeID, "FileUpload/HJGL_YardPlanning/" + fileName); + // 清空文件上传组件(上传后要记着清空,否则点击提交表单时会再次上传!!) filePhoto.Reset(); - - ShowNotify("无效的文件类型!"); - return; } - - - fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_"); - fileName = DateTime.Now.Ticks.ToString() + "_" + fileName; - - - filePhoto.SaveAs(rootUrl + "/FileUpload/HJGL_YardPlanning/" + fileName); - - imgPhoto.ImageUrl = "~/FileUpload/HJGL_YardPlanning/" + fileName; - - - HJGL_YardPlanningService.SavePic( tvControlItem.SelectedNodeID, "FileUpload/HJGL_YardPlanning/" + fileName); - // 清空文件上传组件(上传后要记着清空,否则点击提交表单时会再次上传!!) - filePhoto.Reset(); - } } else { @@ -323,7 +321,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { - var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID); + var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById(tvControlItem.SelectedNodeID); this.imgPhoto.ImageUrl = null; if (unit != null) { @@ -339,13 +337,13 @@ namespace FineUIPro.Web.HJGL.PreDesign #endregion protected void btnAttachUrl_Click(object sender, EventArgs e) { - if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)&& tvControlItem.SelectedNode.CommandName!="主项") + if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID) && tvControlItem.SelectedNode.CommandName != "主项") { - var model = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID); + var model = HJGL_YardPlanningService.GetHJGL_YardPlanningById(tvControlItem.SelectedNodeID); if (model == null) { - HJGL_YardPlanningService.SavePic( tvControlItem.SelectedNodeID, ""); - // model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID); + HJGL_YardPlanningService.SavePic(tvControlItem.SelectedNodeID, ""); + // model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID); } PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL_YardPlanning&menuId={1}", model.YardPlanningId, BLL.Const.HJGL_YardPlanningMenuId))); } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanningEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanningEdit.aspx.cs index bf1a34cd..dbce8405 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanningEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanningEdit.aspx.cs @@ -1,10 +1,5 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.PreDesign { @@ -23,14 +18,14 @@ namespace FineUIPro.Web.HJGL.PreDesign } protected void Page_Load(object sender, EventArgs e) { - if (!IsPostBack) + if (!IsPostBack) { - YardPlanningId=Request.Params["YardPlanningId"]; - string Type= Request.Params["Type"]; + YardPlanningId = Request.Params["YardPlanningId"]; + string Type = Request.Params["Type"]; if (!string.IsNullOrEmpty(Type)) { - - if (Type=="Edit") + + if (Type == "Edit") { var q = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningById(YardPlanningId); txtYardPlanName.Text = q.YardPlanName; @@ -64,7 +59,7 @@ namespace FineUIPro.Web.HJGL.PreDesign else if (Type == "Edit") { var q = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningById(YardPlanningId); - q.YardPlanName=txtYardPlanName.Text ; + q.YardPlanName = txtYardPlanName.Text; HJGL_YardPlanningService.UpdateHJGL_YardPlanning(q); } PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); diff --git a/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PC_ItemEndCheck.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PC_ItemEndCheck.aspx.cs index dea619c3..ea78ef20 100644 --- a/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PC_ItemEndCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PC_ItemEndCheck.aspx.cs @@ -109,8 +109,8 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningAudit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningAudit.aspx.cs index 7b7829c2..20aaa8f0 100644 --- a/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningAudit.aspx.cs @@ -107,8 +107,8 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningComplete.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningComplete.aspx.cs index 2ce59dfb..fa05e927 100644 --- a/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningComplete.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningComplete.aspx.cs @@ -107,8 +107,8 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningEdit.aspx.cs index 47480e27..6b448441 100644 --- a/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PurgingCleaning/PurgingCleaningEdit.aspx.cs @@ -92,8 +92,8 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.cs b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.cs index d28bed69..e1fe3fb5 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.cs @@ -193,8 +193,8 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx.cs b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx.cs index 4e5477cb..579705ba 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx.cs @@ -5,7 +5,6 @@ using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using System.Web; namespace FineUIPro.Web.HJGL.RepairAndExpand { @@ -69,8 +68,8 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -478,7 +477,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand // Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID); // Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID); - // var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId); + // var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId); var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID); if (trust != null) { diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/BItemEndCheck.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/BItemEndCheck.aspx.cs index 0881b956..1a95845e 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/BItemEndCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/BItemEndCheck.aspx.cs @@ -110,8 +110,8 @@ namespace FineUIPro.Web.HJGL.TestPackage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx.cs index decade04..d6dfedad 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx.cs @@ -122,8 +122,8 @@ namespace FineUIPro.Web.HJGL.TestPackage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheckEdit2.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheckEdit2.aspx.cs index b81fe5d1..0c2374b1 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheckEdit2.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheckEdit2.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.DataShow; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -215,7 +214,7 @@ namespace FineUIPro.Web.HJGL.TestPackage bool flag_B = true; Model.Project_Sys_Set PressMustCheckBItem = BLL.Project_SysSetService.GetSysSetBySetId("10", this.CurrUser.LoginProjectId); bool isMustCheckBItem = false; - isMustCheckBItem= (bool)PressMustCheckBItem?.IsAuto;//是否必须检查B项 + isMustCheckBItem = (bool)PressMustCheckBItem?.IsAuto;//是否必须检查B项 ///保存明细 if (saveType == Const.BtnSubmit) { @@ -230,7 +229,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { flag_A = false; } - + if (isMustCheckBItem && item.ItemType == "B" && item.Result != "合格") { flag_B = false; diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs index e93bcea7..28337d2a 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs @@ -115,8 +115,8 @@ namespace FineUIPro.Web.HJGL.TestPackage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -360,7 +360,7 @@ namespace FineUIPro.Web.HJGL.TestPackage int totalWeldingJointNum = totalJoint.Count(x => x.WeldingDailyId != null); //已焊总焊口 int notCloseBatch = (from x in db.HJGL_Batch_PointBatch join y in db.PTP_PipelineList on x.PipelineId equals y.PipelineId - where y.PTP_ID==this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId + where y.PTP_ID == this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId && x.DetectionRateId == pipeline.DetectionRateId && x.DetectionTypeId == pipeline.DetectionType && x.EndDate == null select x).Count(); //未关闭批 @@ -562,24 +562,24 @@ namespace FineUIPro.Web.HJGL.TestPackage //string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID); //if (string.IsNullOrEmpty(inspectionIsoRate)) //{ - updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue; - updateTestPackage.Check2 = drpPressureTest.SelectedValue; - updateTestPackage.Check3 = drpWorkRecord.SelectedValue; - updateTestPackage.Check4 = drpNDTConform.SelectedValue; - updateTestPackage.Check5 = drpHotConform.SelectedValue; - updateTestPackage.Check6 = drpInstallationCorrectness.SelectedValue; - updateTestPackage.Check7 = drpMarkClearly.SelectedValue; - updateTestPackage.Check8 = drpIsolationOpening.SelectedValue; - updateTestPackage.Check9 = drpConstructionPlanAsk.SelectedValue; - updateTestPackage.Check10 = drpCover.SelectedValue; - updateTestPackage.Check11 = drpMeetRequirements.SelectedValue; - updateTestPackage.Check12 = drpStainlessTestWater.SelectedValue; - updateTestPackage.AduditDate = DateTime.Now; - updateTestPackage.Auditer = this.CurrUser.PersonId; - BLL.TestPackageEditService.UpdateTestPackage(updateTestPackage); - this.InitTreeMenu(); - this.BindGrid(); - ShowNotify("保存成功!", MessageBoxIcon.Success); + updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue; + updateTestPackage.Check2 = drpPressureTest.SelectedValue; + updateTestPackage.Check3 = drpWorkRecord.SelectedValue; + updateTestPackage.Check4 = drpNDTConform.SelectedValue; + updateTestPackage.Check5 = drpHotConform.SelectedValue; + updateTestPackage.Check6 = drpInstallationCorrectness.SelectedValue; + updateTestPackage.Check7 = drpMarkClearly.SelectedValue; + updateTestPackage.Check8 = drpIsolationOpening.SelectedValue; + updateTestPackage.Check9 = drpConstructionPlanAsk.SelectedValue; + updateTestPackage.Check10 = drpCover.SelectedValue; + updateTestPackage.Check11 = drpMeetRequirements.SelectedValue; + updateTestPackage.Check12 = drpStainlessTestWater.SelectedValue; + updateTestPackage.AduditDate = DateTime.Now; + updateTestPackage.Auditer = this.CurrUser.PersonId; + BLL.TestPackageEditService.UpdateTestPackage(updateTestPackage); + this.InitTreeMenu(); + this.BindGrid(); + ShowNotify("保存成功!", MessageBoxIcon.Success); //} //else //{ diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx index d555ad0a..3424b113 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx @@ -21,6 +21,10 @@ background-color: Purple; } + .f-grid-row.Red { + background-color: red; + } + .f-grid-row.Cyan { background-color: Cyan; } @@ -71,6 +75,27 @@ + + + + + + + + + + + + + + + + + + FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px" HeaderToolTip="检测完成百分比=当前试压包下已检测的焊口数/当前试压包下的焊口总数"> + FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px" HeaderToolTip="焊口完成百分比=当前试压包下已焊接的焊口数/当前试压包下的焊口总数"> + + + + - - - - - + diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs index 988d7bff..43881072 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs @@ -11,6 +11,7 @@ namespace FineUIPro.Web.HJGL.TestPackage public partial class TestPackageComplete : PageBase { #region 定义项 + /// /// 试压包主键 /// @@ -25,93 +26,10 @@ namespace FineUIPro.Web.HJGL.TestPackage ViewState["PTP_ID"] = value; } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #endregion + #endregion 定义项 #region 加载页面 + /// /// 加载页面 /// @@ -122,6 +40,11 @@ namespace FineUIPro.Web.HJGL.TestPackage if (!IsPostBack) { this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + + drpStateStr.DataTextField = "Value"; + drpStateStr.DataValueField = "Value"; + drpStateStr.DataSource= BLL.TestPackageEditService.StateMap; + drpStateStr.DataBind(); this.PTP_ID = string.Empty; Model.Project_Sys_Set pressUnit = BLL.Project_SysSetService.GetSysSetBySetId("8", this.CurrUser.LoginProjectId); if (pressUnit != null && pressUnit.SetValue == "2") @@ -133,9 +56,11 @@ namespace FineUIPro.Web.HJGL.TestPackage BindGrid2(); } } - #endregion + + #endregion 加载页面 #region 加载树装置-单位-工作区 + /// /// 加载树 /// @@ -177,7 +102,7 @@ namespace FineUIPro.Web.HJGL.TestPackage testPackageLists = (from x in Funs.DB.PTP_TestPackage where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList(); - } + } List unitWork1 = null; List unitWork2 = null; @@ -193,20 +118,20 @@ namespace FineUIPro.Web.HJGL.TestPackage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} - var dicUnitWorkTestPackagePassPercent= BLL.TestPackageEditService.GetTestPackagePassPercentByProjectId(this.CurrUser.LoginProjectId); + var dicUnitWorkTestPackagePassPercent = BLL.TestPackageEditService.GetTestPackagePassPercentByProjectId(this.CurrUser.LoginProjectId); if (unitWork1.Count() > 0) { foreach (var q in unitWork1) { var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); var unitWorkTestPackagePassPercent = dicUnitWorkTestPackagePassPercent.TryGetValue(q.UnitWorkId, out var value) ? value : 0; - TreeNode tn1 = new TreeNode(); + TreeNode tn1 = new TreeNode(); tn1.NodeID = q.UnitWorkId; - tn1.Text = q.UnitWorkName+"(已完成"+ unitWorkTestPackagePassPercent+"%)"; + tn1.Text = q.UnitWorkName + "(已完成" + unitWorkTestPackagePassPercent + "%)"; tn1.ToolTip = "施工单位:" + unitNamesUnitIds; tn1.CommandName = "单位工程"; rootNode1.Nodes.Add(tn1); @@ -232,9 +157,11 @@ namespace FineUIPro.Web.HJGL.TestPackage } } } - #endregion + + #endregion 加载树装置-单位-工作区 #region 绑定树节点 + /// /// 绑定树节点 /// @@ -280,9 +207,10 @@ namespace FineUIPro.Web.HJGL.TestPackage } } - #endregion + #endregion 绑定树节点 #region 点击TreeView + /// /// 点击TreeView /// @@ -294,7 +222,7 @@ namespace FineUIPro.Web.HJGL.TestPackage this.BindGrid(); } - #endregion + #endregion 点击TreeView #region 数据绑定 /// @@ -304,10 +232,10 @@ namespace FineUIPro.Web.HJGL.TestPackage { this.SetTextTemp(); this.PageInfoLoad(); ///页面输入保存信息 - string strSql = @" SELECT ptpPipe.PT_PipeId, ptpPipe.PTP_ID, ptpPipe.PipelineId, ptpPipe.DesignPress, - ptpPipe.DesignTemperature, ptpPipe.AmbientTemperature, ptpPipe.TestMedium, + string strSql = @" SELECT ptpPipe.PT_PipeId, ptpPipe.PTP_ID, ptpPipe.PipelineId, ptpPipe.DesignPress, + ptpPipe.DesignTemperature, ptpPipe.AmbientTemperature, ptpPipe.TestMedium, ptpPipe.TestMediumTemperature, ptpPipe.TestPressure, ptpPipe.HoldingTime,IsoInfo.PipelineCode,testMedium.MediumName - FROM dbo.PTP_PipelineList AS ptpPipe + FROM dbo.PTP_PipelineList AS ptpPipe LEFT JOIN dbo.HJGL_Pipeline AS IsoInfo ON ptpPipe.PipelineId = IsoInfo.PipelineId LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = IsoInfo.TestMedium WHERE ptpPipe.PTP_ID=@PTP_ID"; @@ -336,22 +264,58 @@ namespace FineUIPro.Web.HJGL.TestPackage Grid2.DataSource = null; Grid2.DataBind(); return; - } + } + if (!string.IsNullOrEmpty(this.txtGrid2code.Text.Trim())) + { + projectTestPackages = projectTestPackages.Where(x => x.TestPackageNo.Contains(this.txtGrid2code.Text.Trim())).ToList(); + } + // 分析每个试压包 var analyzeList = new List(); foreach (var pkg in projectTestPackages) { - var analyze = BLL.TestPackageEditService.getTestPackageAnalyze(pkg.PTP_ID, pkg.ProjectId); + var analyze = BLL.TestPackageEditService.getTestPackageAnalyze(pkg.PTP_ID, pkg.ProjectId); analyzeList.Add(analyze); } analyzeList = analyzeList.OrderBy(x => x.UnitWorkName).ThenBy(x => x.TestPackageNo).ToList(); + + if (drpCanPressureTest.SelectedValueArray.Length>0) + { + analyzeList = analyzeList.Where(x => drpCanPressureTest.SelectedValueArray.ToList().Contains(x.CanPressureTest)).ToList(); + } + if (drpStateStr.SelectedValueArray.Length > 0) + { + analyzeList = analyzeList.Where(x => drpStateStr.SelectedValueArray.ToList().Contains(x.StateStr)).ToList(); + } // 绑定到Grid1 Grid2.RecordCount = analyzeList.Count; Grid2.DataSource = analyzeList; Grid2.DataBind(); + + // 设置行样式(保留原逻辑) + for (int i = 0; i < Grid2.Rows.Count; i++) + { + string ptpId = Grid2.Rows[i].DataKeys[0].ToString(); + var ptpModel = analyzeList.FirstOrDefault(x=>x.PTP_ID== ptpId); + if (ptpModel != null) + { + + if (ptpModel.CanPressureTest== "未具备") + { + Grid2.Rows[i].RowCssClass = "Red"; + + } + else if (ptpModel.CanPressureTest == "易具备") + { + Grid2.Rows[i].RowCssClass = "Yellow"; + + } + } + } } #region 加载页面输入保存信息 + /// /// 加载页面输入保存信息 /// @@ -370,9 +334,11 @@ namespace FineUIPro.Web.HJGL.TestPackage this.txtTestMediumTemperature.Text = testPackageManage.TestMediumTemperature.ToString(); } } - #endregion + + #endregion 加载页面输入保存信息 #region 清空页面输入信息 + /// /// 清空页面输入信息 /// @@ -386,416 +352,65 @@ namespace FineUIPro.Web.HJGL.TestPackage this.txtTestMediumTemperature.Text = string.Empty; } + #endregion 清空页面输入信息 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #endregion - #endregion + #endregion 数据绑定 #region 分页排序 #region 页索引改变事件 + /// - /// 页索引改变事件 - /// - /// - /// - protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + /// 页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) { BindGrid(); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #endregion + #endregion 页索引改变事件 #region 排序 + /// - /// 排序 - /// - /// - /// - protected void Grid1_Sort(object sender, GridSortEventArgs e) + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) { BindGrid(); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #endregion + #endregion 排序 #region 分页选择下拉改变事件 + /// - /// 分页选择下拉改变事件 - /// - /// - /// - protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + /// 分页选择下拉改变事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) { Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); BindGrid(); } + #endregion 分页选择下拉改变事件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #endregion - - #endregion - + #endregion 分页排序 #region 关闭弹出窗口及刷新页面 + /// - /// 关闭弹出窗口 - /// - /// - /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) { this.PTP_ID = this.hdPTP_ID.Text; this.BindGrid(); @@ -803,79 +418,18 @@ namespace FineUIPro.Web.HJGL.TestPackage this.hdPTP_ID.Text = string.Empty; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /// /// 查询 /// /// /// - protected void Tree_TextChanged(object sender, EventArgs e) + protected void Tree_TextChanged(object sender, EventArgs e) { this.InitTreeMenu(); this.BindGrid(); } - #endregion - + #endregion 关闭弹出窗口及刷新页面 protected void btnMenuModify_Click(object sender, EventArgs e) { @@ -925,6 +479,7 @@ namespace FineUIPro.Web.HJGL.TestPackage } #region 查询 + /// /// 查询 /// @@ -934,6 +489,12 @@ namespace FineUIPro.Web.HJGL.TestPackage { InitTreeMenu(); } - #endregion + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid2(); + } + + #endregion 查询 + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.designer.cs index 051fbef4..bcb13255 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.designer.cs @@ -104,6 +104,42 @@ namespace FineUIPro.Web.HJGL.TestPackage /// protected global::FineUIPro.Panel panelTopRegion; + /// + /// txtGrid2code 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtGrid2code; + + /// + /// drpCanPressureTest 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCanPressureTest; + + /// + /// drpStateStr 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpStateStr; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQuery; + /// /// Grid2 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs index 5d761e75..552eaf46 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs @@ -1,16 +1,11 @@ using BLL; using System; using System.Collections.Generic; -using System.Data.SqlClient; using System.Data; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; +using System.Data.SqlClient; using System.IO; -using Model; -using Microsoft.SqlServer.Server; -using NPOI.SS.Formula.Functions; +using System.Linq; +using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.TestPackage { @@ -247,7 +242,7 @@ namespace FineUIPro.Web.HJGL.TestPackage protected void btnPrint_Click(object sender, EventArgs e) { var selectedRows = this.Grid1.SelectedRowIDArray; - if (selectedRows.Length==0) + if (selectedRows.Length == 0) { Alert.ShowInTop("请选择一条试压包", MessageBoxIcon.Warning); return; @@ -257,11 +252,11 @@ namespace FineUIPro.Web.HJGL.TestPackage { var item = exportWord(ptp_id); TestPackagePrintService.AddPrintCountByPTP_ID(ptp_id);//增加明细打印次数 - printFiles.Add(item.FirstOrDefault().Key, item.FirstOrDefault().Value); + printFiles.Add(item.FirstOrDefault().Key, item.FirstOrDefault().Value); } - if (printFiles.Count>1) + if (printFiles.Count > 1) { - string zipName = ""; + string zipName = ""; string rootPath = Funs.RootPath; string startPath = rootPath + "FileUpload\\试压包资料" + DateTime.Now.GetHashCode(); if (!Directory.Exists(startPath)) @@ -273,20 +268,20 @@ namespace FineUIPro.Web.HJGL.TestPackage { var sourceFile = item.Key; var destFile = startPath + "\\" + item.Value; - zipName+= item.Value.Replace(".pdf","")+"," ; + zipName += item.Value.Replace(".pdf", "") + ","; if (File.Exists(sourceFile)) { File.Copy(sourceFile, destFile, true); File.Delete(sourceFile); } } - zipName= zipName.TrimEnd(','); + zipName = zipName.TrimEnd(','); System.IO.Compression.ZipFile.CreateFromDirectory(startPath, zipPath); FileInfo info = new FileInfo(zipPath); long fileSize = info.Length; System.Web.HttpContext.Current.Response.Clear(); System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; - System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(zipName+".zip", System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(zipName + ".zip", System.Text.Encoding.UTF8)); System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); System.Web.HttpContext.Current.Response.TransmitFile(zipPath, 0, fileSize); System.Web.HttpContext.Current.Response.Flush(); @@ -305,8 +300,8 @@ namespace FineUIPro.Web.HJGL.TestPackage System.Web.HttpContext.Current.Response.TransmitFile(printFiles.FirstOrDefault().Key, 0, fileSize); System.Web.HttpContext.Current.Response.Flush(); System.Web.HttpContext.Current.Response.Close(); - } - + } + } protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) { @@ -316,8 +311,8 @@ namespace FineUIPro.Web.HJGL.TestPackage PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TestPackageDatePrint.aspx?PTP_ID={0}", keys[0], "编辑 - "))); } - } - protected Dictionary exportWord(string ptp_id) + } + protected Dictionary exportWord(string ptp_id) { var keyValuePairs = new Dictionary(); if (string.IsNullOrEmpty(ptp_id)) @@ -345,7 +340,7 @@ namespace FineUIPro.Web.HJGL.TestPackage if (this.drpPrintType.SelectedValue == "1")//pdf格式 { - exportName+=".pdf"; + exportName += ".pdf"; ListItem[] list = new ListItem[10]; list[0] = new ListItem("0", "File\\Fastreport\\JGZL\\管道试压包文件资料.frx"); list[1] = new ListItem("1", "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx"); @@ -368,21 +363,21 @@ namespace FineUIPro.Web.HJGL.TestPackage BLL.FastReportService.ExportMergeReport(FastReportItemList, Path, this.drpPrintType.SelectedValue); keyValuePairs.Add(Path, exportName); - /* FileInfo info = new FileInfo(Path); - long fileSize = info.Length; - System.Web.HttpContext.Current.Response.Clear(); - System.Web.HttpContext.Current.Response.ClearHeaders(); - System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; - System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(exportName + ".pdf", System.Text.Encoding.UTF8)); - System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); - System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize); - System.Web.HttpContext.Current.Response.Flush(); - System.Web.HttpContext.Current.Response.Close(); - File.Delete(Path);*/ + /* FileInfo info = new FileInfo(Path); + long fileSize = info.Length; + System.Web.HttpContext.Current.Response.Clear(); + System.Web.HttpContext.Current.Response.ClearHeaders(); + System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(exportName + ".pdf", System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); + System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize); + System.Web.HttpContext.Current.Response.Flush(); + System.Web.HttpContext.Current.Response.Close(); + File.Delete(Path);*/ } else if (this.drpPrintType.SelectedValue == "2")//word格式 { - exportName += ".docx"; + exportName += ".docx"; ListItem[] list = new ListItem[3]; list[0] = new ListItem("0", "File\\Fastreport\\JGZL\\管道试压包文件资料.frx"); list[1] = new ListItem("1", "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx"); @@ -455,21 +450,21 @@ namespace FineUIPro.Web.HJGL.TestPackage doc1.AppendDocument(doc5, Aspose.Words.ImportFormatMode.KeepSourceFormatting); //将合并的文档保存为 DOCX 文件 - var Path = Funs.RootPath + "FileUpload/"+ ptp_id + "Result.docx"; + var Path = Funs.RootPath + "FileUpload/" + ptp_id + "Result.docx"; doc1.Save(Path); - keyValuePairs.Add(Path, exportName); + keyValuePairs.Add(Path, exportName); - /* FileInfo info = new FileInfo(Path); - long fileSize = info.Length; + /* FileInfo info = new FileInfo(Path); + long fileSize = info.Length; - System.Web.HttpContext.Current.Response.Clear(); - System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; - System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(exportName + ".docx", System.Text.Encoding.UTF8)); - System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); - System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize); - System.Web.HttpContext.Current.Response.Flush(); - System.Web.HttpContext.Current.Response.Close();*/ + System.Web.HttpContext.Current.Response.Clear(); + System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(exportName + ".docx", System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); + System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize); + System.Web.HttpContext.Current.Response.Flush(); + System.Web.HttpContext.Current.Response.Close();*/ //File.Delete(Path); File.Delete(PathA); File.Delete(PathB); @@ -481,7 +476,7 @@ namespace FineUIPro.Web.HJGL.TestPackage } return keyValuePairs; - } + } #endregion @@ -498,7 +493,7 @@ namespace FineUIPro.Web.HJGL.TestPackage select new { MaterialCode1 = y.MaterialCode, MaterialCode2 = z.MaterialCode }).FirstOrDefault(); if (weldjoint != null) { - if (!string.IsNullOrEmpty(weldjoint.MaterialCode1)&&!string.IsNullOrEmpty(weldjoint.MaterialCode2)) + if (!string.IsNullOrEmpty(weldjoint.MaterialCode1) && !string.IsNullOrEmpty(weldjoint.MaterialCode2)) { materialCode = weldjoint.MaterialCode1 + "/" + weldjoint.MaterialCode2; } @@ -513,7 +508,7 @@ namespace FineUIPro.Web.HJGL.TestPackage materialCode = weldjoint.MaterialCode2; } } - + } } return materialCode; diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx.cs index ce32eb04..bab15b1e 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx.cs @@ -1,17 +1,13 @@ using BLL; -using NPOI.POIFS.Crypt.Dsig; using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.TestPackage { public partial class TestPackageDatePrint : PageBase - { + { /// /// 试压包主键 /// @@ -40,7 +36,7 @@ namespace FineUIPro.Web.HJGL.TestPackage } private void BindGrid() { - var list = BLL.TestPackagePrintService.GetListByPTP_ID(PTP_ID); + var list = BLL.TestPackagePrintService.GetListByPTP_ID(PTP_ID); //根据 BLL.TestPackagePrintService.TypeIntMap 和 list 进行左连接,确保所有类型都显示,获取对应的 PrintCount,没有的类型 PrintCount 为 0 var result = from type in BLL.TestPackagePrintService.TypeIntMap join item in list on type.Key equals item.TypeInt into gj @@ -69,7 +65,7 @@ namespace FineUIPro.Web.HJGL.TestPackage // 在文件名中加入时间戳,例如:PTP_ID_2025-09-17-14-30-00.pdf string timeStamp = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); string fileName = $"{PTP_ID}_{timeStamp}.pdf"; - string filePath = System.IO.Path.Combine(Funs.RootPath, "FileUpload", fileName); + string filePath = System.IO.Path.Combine(Funs.RootPath, "FileUpload", fileName); BLL.FastReportService.ExportMergeReport(FastReportItemList, filePath, "1"); FileInfo info = new FileInfo(filePath); long fileSize = info.Length; @@ -80,6 +76,6 @@ namespace FineUIPro.Web.HJGL.TestPackage System.Web.HttpContext.Current.Response.TransmitFile(filePath, 0, fileSize); System.Web.HttpContext.Current.Response.Flush(); System.Web.HttpContext.Current.Response.Close(); - } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.cs index 27421387..494f725e 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.cs @@ -256,11 +256,11 @@ namespace FineUIPro.Web.HJGL.TestPackage else if (this.tvControlItem.SelectedNode.CommandName == "TestPackage") { var testPackageManage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID); - + if (testPackageManage != null && !string.IsNullOrEmpty(testPackageManage.UnitWorkId)) { parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(testPackageManage.UnitWorkId); - } + } } ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName; @@ -577,8 +577,8 @@ namespace FineUIPro.Web.HJGL.TestPackage protected void Grid1_RowClick(object sender, GridRowClickEventArgs e) { var pTP_Pipeline = (from x in Funs.DB.PTP_PipelineList - where x.PT_PipeId == Grid1.SelectedRowID - select x).FirstOrDefault(); + where x.PT_PipeId == Grid1.SelectedRowID + select x).FirstOrDefault(); var pipe = PipelineService.GetPipelineByPipelineId(pTP_Pipeline.PipelineId); var pipecode = "/" + pipe.PipelineCode; Model.Parameter3D parameter3D = new Model.Parameter3D(); @@ -587,7 +587,7 @@ namespace FineUIPro.Web.HJGL.TestPackage parameter3D.ColorModel = colorModel; parameter3D.TagNum = pipecode; parameter3D.ButtonType = "4"; - // parameter3D.Line_No = Line_No; + // parameter3D.Line_No = Line_No; if (this.tvControlItem.SelectedNode.CommandName == "单位工程") { parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID); diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs index afa7e8b8..799ac7c4 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs @@ -1,15 +1,10 @@ using BLL; -using FineUIPro.Web.ProjectData; using MiniExcelLibs; -using NPOI.POIFS.Crypt.Dsig; using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.TestPackage @@ -191,7 +186,7 @@ namespace FineUIPro.Web.HJGL.TestPackage if (unitWork != null) { pipeline.UnitWorkId = Request.Params["UnitWorkId"]; - pipeline.UnitId = unitWork.UnitId; + pipeline.UnitId = unitWork.UnitId; } if (pds[i].B != null) @@ -255,7 +250,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { result.Add("第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"); } - + pipeline.Tabler = this.CurrUser.PersonId; pipeline.TableDate = DateTime.Now; @@ -392,12 +387,12 @@ namespace FineUIPro.Web.HJGL.TestPackage ProjectId = this.CurrUser.LoginProjectId, UnitId = x.UnitId, UnitWorkId = x.UnitWorkId, - TestPackageNo=x.TestPackageNo, - TestPackageName=x.TestPackageName, - Tabler =x.Tabler, - TableDate=x.TableDate, + TestPackageNo = x.TestPackageNo, + TestPackageName = x.TestPackageName, + Tabler = x.Tabler, + TableDate = x.TableDate, Remark = x.Remark, - AdjustTestPressure=x.AdjustTestPressure + AdjustTestPressure = x.AdjustTestPressure }).DistinctBy(temp => new { temp.PTP_ID, @@ -441,16 +436,16 @@ namespace FineUIPro.Web.HJGL.TestPackage Model.SGGLDB db = Funs.DB; var getTestPackage = from y in db.PTP_TestPackage where y.UnitWorkId == UnitWorkId select y; var allPipelineLists = from x in db.PTP_PipelineList - join y in db.PTP_TestPackage on x.PTP_ID equals y.PTP_ID - where y.UnitWorkId == UnitWorkId - select x; + join y in db.PTP_TestPackage on x.PTP_ID equals y.PTP_ID + where y.UnitWorkId == UnitWorkId + select x; List pipelineList_add = new List(); var weldJoints = (from x in PipelineList select new Model.PTP_PipelineList - { + { PTP_ID = x.PTP_ID, - TestPackageNo=x.TestPackageNo, + TestPackageNo = x.TestPackageNo, PipelineId = x.PipelineId, //TestPressure = x.TestPressure, }).DistinctBy(temp => new @@ -517,20 +512,20 @@ namespace FineUIPro.Web.HJGL.TestPackage { string UnitWorkId = Request.Params["UnitWorkId"]; var queryList = from x in Funs.DB.View_HJGL_Pipeline - join y in Funs.DB.PTP_PipelineList on x.PipelineId equals y.PipelineId into yGroup - from y in yGroup.DefaultIfEmpty() - where x.UnitWorkId == UnitWorkId && y==null - select new - { - x.PipelineId, - x.PipelineCode, - x.PipingClassCode, - x.MediumName, - x.DesignPress, - x.DesignTemperature, - x.TestMediumCode, - x.TestPressure - }; + join y in Funs.DB.PTP_PipelineList on x.PipelineId equals y.PipelineId into yGroup + from y in yGroup.DefaultIfEmpty() + where x.UnitWorkId == UnitWorkId && y == null + select new + { + x.PipelineId, + x.PipelineCode, + x.PipingClassCode, + x.MediumName, + x.DesignPress, + x.DesignTemperature, + x.TestMediumCode, + x.TestPressure + }; // materialize and add sequence number var list = queryList.ToList(); @@ -557,9 +552,9 @@ namespace FineUIPro.Web.HJGL.TestPackage { var value = new { - model = "" + model = new List() }; - MiniExcel.SaveAsByTemplate(path, uploadfilepath, value); + MiniExcel.SaveAsByTemplate(path, uploadfilepath, value); } FileInfo info = new FileInfo(path); long fileSize = info.Length; @@ -569,7 +564,7 @@ namespace FineUIPro.Web.HJGL.TestPackage System.Web.HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8; System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString().Trim()); System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize); - System.Web.HttpContext.Current.Response.Flush(); + System.Web.HttpContext.Current.Response.Flush(); File.Delete(path); System.Web.HttpContext.Current.Response.End(); diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageItemEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageItemEdit.aspx.cs index f8a2fd37..2fc8c47e 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageItemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageItemEdit.aspx.cs @@ -148,7 +148,7 @@ namespace FineUIPro.Web.HJGL.TestPackage LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId WHERE IsoInfo.ProjectId= @ProjectId"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); if (!string.IsNullOrEmpty(this.PTP_ID)) { strSql += " AND (IsoList.PTP_ID IS NULL OR IsoList.PTP_ID = @PTP_ID)"; @@ -270,7 +270,7 @@ namespace FineUIPro.Web.HJGL.TestPackage ShowNotify("此施压包已审核不能修改!", MessageBoxIcon.Warning); return; } - + Model.PTP_TestPackage testPackage = new Model.PTP_TestPackage(); testPackage.ProjectId = this.CurrUser.LoginProjectId; if (this.drpUnitWork.SelectedValue != BLL.Const._Null) diff --git a/SGGL/FineUIPro.Web/HJGL/WPQ/WPQEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WPQ/WPQEdit.aspx.cs index 8145cb96..cdd2c310 100644 --- a/SGGL/FineUIPro.Web/HJGL/WPQ/WPQEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WPQ/WPQEdit.aspx.cs @@ -1,6 +1,5 @@ using BLL; using System; -using System.Linq; namespace FineUIPro.Web.HJGL.WPQ { diff --git a/SGGL/FineUIPro.Web/HJGL/WPQ/WPQList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WPQ/WPQList.aspx.cs index e12eded6..1b3207c0 100644 --- a/SGGL/FineUIPro.Web/HJGL/WPQ/WPQList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WPQ/WPQList.aspx.cs @@ -41,7 +41,7 @@ namespace FineUIPro.Web.HJGL.WPQ listStr.Add(new SqlParameter("@WPQCode", "%" + this.txtWeldingProcedureCode.Text.Trim() + "%")); } - if (drpUnit.SelectedValue!=Const._Null) + if (drpUnit.SelectedValue != Const._Null) { strSql += " AND UnitId =@UnitId"; listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue)); diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index 0de764d8..ccae6c1a 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -1,12 +1,10 @@ using BLL; -using NPOI.SS.Util; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using System.Text; using System.Web; namespace FineUIPro.Web.HJGL.WeldingManage diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineEdit.aspx.cs index 1918eafd..b81748af 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineEdit.aspx.cs @@ -79,7 +79,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (!IsPostBack) { this.PipelineId = Request.Params["PipelineId"]; - + Base_MediumService.InitMediumDropDownList(this.drpMedium, this.CurrUser.LoginProjectId, true); Base_TestMediumService.InitMediumDropDownList(this.drpTestMedium, "1", true); @@ -90,7 +90,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage Base_TestMediumService.InitMediumDropDownList(this.drpLeakMedium, "2", true); Base_PurgeMethodService.InitPurgeMethodDropDownList(this.drpPCMedium, true, "-请选择-"); BLL.Base_MaterialService.InitMaterialDropDownList(this.drpMaterial, true, "请选择");//材质1 - + Model.Project_Sys_Set pressUnit = BLL.Project_SysSetService.GetSysSetBySetId("8", this.CurrUser.LoginProjectId); if (pressUnit != null && pressUnit.SetValue == "2") { @@ -101,7 +101,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } if (!string.IsNullOrEmpty(this.PipelineId)) { - + Model.View_HJGL_Pipeline pipeline = BLL.PipelineService.GetViewPipelineByPipelineId(this.PipelineId); BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, UnitWorkService.getUnitWorkByUnitWorkId(pipeline.UnitWorkId).UnitId, true);//单位 @@ -110,7 +110,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.UnitWorkId = pipeline.UnitWorkId; this.txtPipelineCode.Text = pipeline.PipelineCode; //this.txtUnitName.Text = pipeline.UnitName; - drpUnit.SelectedValue=pipeline.UnitId; + drpUnit.SelectedValue = pipeline.UnitId; this.txtSingleName.Text = pipeline.SingleName; if (!string.IsNullOrEmpty(pipeline.MediumId)) @@ -190,9 +190,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, workArea.UnitId, false);//单位 if (workArea != null) { - this.ProjectId = workArea.ProjectId; + this.ProjectId = workArea.ProjectId; //this.InstallationId = workArea.InstallationId; - + } } } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineList.aspx.cs index 911799ca..a16141df 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineList.aspx.cs @@ -77,9 +77,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); - // } + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + // } if (unitWork1.Count() > 0) { diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListIn.aspx.cs index 15b1713b..c8805eb5 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListIn.aspx.cs @@ -114,9 +114,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// Excel文件路径名 private void ImportXlsToData(string fileName) { - try + try { - string oleDBConnString = String.Empty; + string oleDBConnString = String.Empty; oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; oleDBConnString += "Data Source="; oleDBConnString += fileName; diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs index 5fc91471..7e52491b 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs @@ -1,11 +1,8 @@ using BLL; -using FineUIPro.Web.ProjectData; using MiniExcelLibs; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data; -using System.Data.OleDb; using System.Data.SqlClient; using System.IO; using System.Linq; diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs index 8013ee37..c97666d8 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs @@ -29,18 +29,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage public static List matList = new List(); - public enum ButtonState { Check=0,Import=1,Save=2} + public enum ButtonState { Check = 0, Import = 1, Save = 2 } public static int State; #endregion #region 加载 - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { @@ -93,7 +93,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var table = this.GetPagedDataTable(Grid2, tb); Grid2.DataSource = table; Grid2.DataBind(); - + } #region 模板下载 @@ -153,7 +153,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage responeData.message = "导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列"; return responeData; } - // DataRow[] dv = pds.Select("主项编号 <>'' and 管线号 <>'' and 材料编码 <>'' and 数量 <>''and 管线划分<>'' "); + // DataRow[] dv = pds.Select("主项编号 <>'' and 管线号 <>'' and 材料编码 <>'' and 数量 <>''and 管线划分<>'' "); DataRow[] dv = pds.Select(" 管线号 <>'' and 材料编码 <>'' and 数量 <>'' "); //导入数据库 @@ -168,7 +168,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage string unitworkId = string.Empty; unitworkId = Request.Params["UnitWorkId"]; - string PipeArea=string.Empty;//管线划分 1工厂预制 2现场施工 + string PipeArea = string.Empty;//管线划分 1工厂预制 2现场施工 if (dv[i]["管线号"] != null && !string.IsNullOrEmpty(dv[i]["管线号"].ToString())) { @@ -176,7 +176,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (pipeline.Count() > 0) { item.PipelineId = pipeline.First().PipelineId; - PipeArea=pipeline.First().PipeArea; + PipeArea = pipeline.First().PipeArea; } else { @@ -261,7 +261,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage result.Add((i + 2) + "Line, [数量] 不能为空
"); } - if (PipeArea=="1") + if (PipeArea == "1") { if (dv[i]["预制组件"] != null && !string.IsNullOrEmpty(dv[i]["预制组件"].ToString())) { @@ -315,7 +315,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } if (result.Count > 0) - { + { // result = result.Substring(0, result.LastIndexOf("|")); errorInfos = string.Join("|", result.Distinct()); //Alert alert = new Alert(); @@ -325,14 +325,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage responeData.code = 0; responeData.message = errorInfos; } - + return responeData; } private Model.ResponeData AddDatasetToSQL(List pds, int count) { Model.ResponeData responeData = new Model.ResponeData(); List result = new List(); - + if (count < 4) { responeData.code = 0; @@ -373,7 +373,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { result.Add((i + 2) + "Line, [管线号] 不能为空
"); } - + if (pds[i].C != null && !string.IsNullOrEmpty(pds[i].C.ToString())) { @@ -421,7 +421,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (!item.PrefabricatedComponents.Contains("-")) //预制组件关联的有图纸,图纸名称又是根据组件名称截取的 { result.Add((i + 2) + "Line, [预制组件] 不合规
"); - } + } } else { @@ -434,7 +434,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage matList.Add(item); } - + #endregion } @@ -533,7 +533,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void btnImport_Click(object sender, EventArgs e) { - if (State== (int)ButtonState.Check) + if (State == (int)ButtonState.Check) { ShowNotify("请先审核"); return; @@ -655,12 +655,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); } } - public void AddHJGL_PipeLineMat(List matList) + public void AddHJGL_PipeLineMat(List matList) { foreach (var item in matList) { - var pipeLineMat = from x in Funs.DB.HJGL_PipeLineMat where x.MaterialCode == item.MaterialCode && x.PipelineId == item.PipelineId &&x.PrefabricatedComponents==item.PrefabricatedComponents select x; - if (pipeLineMat.Count() == 0|| pipeLineMat==null) + var pipeLineMat = from x in Funs.DB.HJGL_PipeLineMat where x.MaterialCode == item.MaterialCode && x.PipelineId == item.PipelineId && x.PrefabricatedComponents == item.PrefabricatedComponents select x; + if (pipeLineMat.Count() == 0 || pipeLineMat == null) { item.PipeLineMatId = SQLHelper.GetNewID(typeof(Model.HJGL_PipeLineMat)); BLL.PipelineMatService.AddPipeLineMat(item); @@ -673,5 +673,5 @@ namespace FineUIPro.Web.HJGL.WeldingManage BLL.HJGL_PipelineComponentService.SyncPipelineComponentByMatId(item.PipeLineMatId); } } - } + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PreWeldReportAudit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PreWeldReportAudit.aspx.cs index 69a43531..62f59c1a 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PreWeldReportAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PreWeldReportAudit.aspx.cs @@ -70,8 +70,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/SelectTaskWeldJoint.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/SelectTaskWeldJoint.aspx.cs index 99420417..2239f650 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/SelectTaskWeldJoint.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/SelectTaskWeldJoint.aspx.cs @@ -1,13 +1,10 @@ -using Aspose.Words; -using BLL; +using BLL; using Model; -using NPOI.SS.Formula.Functions; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web.UI.WebControls; -using System.Windows.Forms; namespace FineUIPro.Web.HJGL.WeldingManage { @@ -152,7 +149,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage txtTaskDate.Enabled = false; var task = (from x in Funs.DB.HJGL_WeldTask where x.UnitWorkId == UnitWorkId && x.UnitId == unitId - && x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd") && x.SerialNumber==SerialNumber + && x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd") && x.SerialNumber == SerialNumber select x).FirstOrDefault(); if (task != null) { @@ -179,7 +176,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage Model.WBS_UnitWork UnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.UnitWorkId); BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, UnitWork.UnitId, false);//单位 this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text, list[0], drpUnit.SelectedValue); - SerialNumber= BLL.WeldTaskService.GetSerialNumberByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text, list[0], drpUnit.SelectedValue); + SerialNumber = BLL.WeldTaskService.GetSerialNumberByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text, list[0], drpUnit.SelectedValue); if (!string.IsNullOrEmpty(TaskDate)) { txtTaskDate.Text = TaskDate; @@ -701,7 +698,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage { e.RowSelectable = false; - }; + } + ; } protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointBatchEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointBatchEdit.aspx.cs index fcbb4978..699b20bc 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointBatchEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointBatchEdit.aspx.cs @@ -370,11 +370,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage for (int i = startInt; i <= endInt; i++) { - if (this.txtWeldJointCode.Text.Trim().Contains(txtPipelineCode.Text+"/Z-")) + if (this.txtWeldJointCode.Text.Trim().Contains(txtPipelineCode.Text + "/Z-")) { - + string number = Convert.ToString(i); - if (number.Length<5) + if (number.Length < 5) { int j = 5 - number.Length; for (int m = 0; m < j; m++) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs index 07bfc41e..b96a32da 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.HSSE.Meeting; using System; using System.Collections.Generic; using System.Linq; diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs index 0e6f4b61..310f02df 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs @@ -1,15 +1,10 @@ -using Apache.NMS.ActiveMQ.Threads; -using BLL; -using FineUIPro.Web.ProjectData; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Diagnostics; using System.Linq; using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; using System.Web; namespace FineUIPro.Web.HJGL.WeldingManage @@ -245,20 +240,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage TbPipeline.Hidden = true; TbUnitWork.Hidden = false; TbUnitWork2.Hidden = false; - lbUWTotalDin.Text= GetSumDinByUnitWorkId(this.tvControlItem.SelectedNodeID).ToString(); + lbUWTotalDin.Text = GetSumDinByUnitWorkId(this.tvControlItem.SelectedNodeID).ToString(); lbUWPreRate.Text = GetRateByUnitWork(this.tvControlItem.SelectedNodeID); lbUWShopSize.Text = GetShopSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); lbUWFiledSize.Text = GetFieldSumDinByUnitWork2(this.tvControlItem.SelectedNodeID).ToString(); lbUWSinglePreRateByDin.Text = GetShopRateByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); - lbUWShopSizeByLineShop.Text= GetShopSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); - lbUWFiledSizeByLineShop.Text= GetFieldSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); + lbUWShopSizeByLineShop.Text = GetShopSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); + lbUWFiledSizeByLineShop.Text = GetFieldSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); lbUWSinglePreRateByWeldJoint.Text = GetWeldJointRateByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); lbUWShopSum.Text = GetShopSumByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); lbUWFiledSum.Text = GetFieldSumByUnitWork(this.tvControlItem.SelectedNodeID).ToString(); - + } - + } } @@ -413,8 +408,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// private string GetRateByPipelineid(string pipelineid) { - string rate = ""; - + string rate = ""; + var db = Funs.DB; var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid && x.IsTwoJoint == null select x; if (q != null && q.Count() > 0) @@ -427,7 +422,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage SizeSum = g.Sum(x => x.Size) }).FirstOrDefault(); var proSum = (proSumModel != null) ? proSumModel.SizeSum : 0; - + var AllSumModel = (from x in q group x by x.PipelineId into g select new @@ -522,7 +517,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage where x.JointAttribute == "安装口" select x ).Count(); - + AllNum = shopNum + fieldNum; if (AllNum > 0) @@ -549,8 +544,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { sum = (from x in q - where x.JointAttribute == "预制口" - select x + where x.JointAttribute == "预制口" + select x ).Count(); return sum; } @@ -570,14 +565,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { sum = (from x in q - where x.JointAttribute == "安装口" - select x + where x.JointAttribute == "安装口" + select x ).Count(); return sum; } return 0; } - + /// ///管线总达因(根据管线id获取达因之和) /// @@ -591,7 +586,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { sum = (from x in q - select x.Size + select x.Size ).Sum() ?? 0; return sum; } @@ -615,18 +610,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { var proSumModel = (from x in q - where x.JointAttribute == "预制口" && x.PipeArea == PipelineService.PipeArea_SHOP + where x.JointAttribute == "预制口" && x.PipeArea == PipelineService.PipeArea_SHOP group x by x.UnitWorkId into g - select new - { + select new + { SizeSum = g.Sum(x => x.Size) }).FirstOrDefault(); var proSum = (proSumModel != null) ? proSumModel.SizeSum : 0; var AllSumModel = (from x in q - group x by x.UnitWorkId into g - select new - { + group x by x.UnitWorkId into g + select new + { SizeSum = g.Sum(x => x.Size) }).FirstOrDefault(); var AllSum = (AllSumModel != null) ? AllSumModel.SizeSum : 0; @@ -641,7 +636,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage return rate; } return "0%"; - + } /// @@ -657,12 +652,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { var ShopSum = (from x in q - where x.JointAttribute == "预制口" - group x by x.UnitWorkId into g - select new - { - SizeSum = g.Sum(x => x.Size) - }).FirstOrDefault()?.SizeSum; + where x.JointAttribute == "预制口" + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; ShopSum = (ShopSum != null) ? ShopSum : 0; sum = (decimal)ShopSum; return sum; @@ -683,12 +678,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { var FieldSum = (from x in q - where x.JointAttribute == "安装口" - group x by x.UnitWorkId into g - select new - { - SizeSum = g.Sum(x => x.Size) - }).FirstOrDefault()?.SizeSum; + where x.JointAttribute == "安装口" + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; FieldSum = (FieldSum != null) ? FieldSum : 0; sum = (decimal)FieldSum; @@ -697,11 +692,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q2 != null && q2.Count() > 0) { var FieldSum2 = (from x in q2 - group x by x.UnitWorkId into g - select new - { - SizeSum = g.Sum(x => x.Size) - }).FirstOrDefault()?.SizeSum; + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; FieldSum2 = (FieldSum2 != null) ? FieldSum2 : 0; sum = sum + (decimal)FieldSum2; } @@ -721,7 +716,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage int fieldNum = 0; int AllNum = 0; var db = Funs.DB; - var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null select x; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null select x; if (q != null && q.Count() > 0) { shopNum = (from x in q @@ -759,8 +754,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { sum = (from x in q - where x.JointAttribute == "预制口" - select x + where x.JointAttribute == "预制口" + select x ).Count(); return sum; } @@ -779,8 +774,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { sum = (from x in q - where x.JointAttribute == "安装口" - select x + where x.JointAttribute == "安装口" + select x ).Count(); return sum; } @@ -803,12 +798,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { shopNum = (from x in q - where x.JointAttribute == "预制口" - select x + where x.JointAttribute == "预制口" + select x ).Count(); fieldNum = (from x in q - where x.JointAttribute == "安装口" - select x + where x.JointAttribute == "安装口" + select x ).Count(); AllNum = shopNum + fieldNum; @@ -838,10 +833,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (q != null && q.Count() > 0) { var FieldSum = (from x in q - where x.JointAttribute == "安装口" - group x by x.UnitWorkId into g - select new - { + where x.JointAttribute == "安装口" + group x by x.UnitWorkId into g + select new + { SizeSum = g.Sum(x => x.Size) }).FirstOrDefault()?.SizeSum; FieldSum = (FieldSum != null) ? FieldSum : 0; @@ -863,11 +858,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage { decimal sum = 0; var db = Funs.DB; - var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint==null select x; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null select x; if (q != null && q.Count() > 0) { sum = (from x in q - select x.Size + select x.Size ).Sum() ?? 0; return sum; } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatch.aspx.cs index cdd0972b..77a4d323 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatch.aspx.cs @@ -14,7 +14,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage public int pageSize = PipelineService.pageSize; //public Dictionary dicSeclectPipeLine = new Dictionary(); //public static List tw_PipeMatMatchOutputs ; - public static decimal Rate = 0; + public static decimal Rate = 0; public string WarehouseCode { get @@ -77,7 +77,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage //ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); if (!IsPostBack) { - tw_PipeMatMatchOutputs=new List(); + tw_PipeMatMatchOutputs = new List(); PipeArea = Request.Params["PipeArea"]; if (PipeArea == "2") { @@ -89,10 +89,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage } HJGL_MaterialService.materialStockItems_FIELD = new List(); HJGL_MaterialService.materialStockItems_SHOP = new List(); - dicSeclectPipeLine=new Dictionary(); + dicSeclectPipeLine = new Dictionary(); var pipeline = (from x in Funs.DB.HJGL_Pipeline - where x.ProjectId == this.CurrUser.LoginProjectId - select x.FlowingSection).Distinct().ToList(); + where x.ProjectId == this.CurrUser.LoginProjectId + select x.FlowingSection).Distinct().ToList(); this.drpFlowingSection.DataTextField = "Value"; this.drpFlowingSection.DataValueField = "Value"; this.drpFlowingSection.DataSource = pipeline; @@ -150,15 +150,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) { foreach (var q in unitWork1) { - + int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count(); var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn1 = new TreeNode(); @@ -183,7 +183,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage foreach (var q in unitWork2) { int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count(); - // var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(q.UnitWorkId); + // var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(q.UnitWorkId); //int a = NowComPipelineCode.Count(); var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn2 = new TreeNode(); @@ -196,9 +196,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage tn2.ToolTip = "施工单位:" + unitNamesUnitIds; tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); tn2.EnableExpandEvent = true; - tn2.EnableClickEvent= true; + tn2.EnableClickEvent = true; tn2.EnableCheckBox = false; - + rootNode2.Nodes.Add(tn2); if (a > 0) { @@ -220,15 +220,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} var CompleteInOutPlanDetail_RelationList = from x in Funs.DB.Tw_InOutPlanDetail_Relation - join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id - where y.State==(int)TwConst.State.已完成 && y.WarehouseCode == WarehouseCode - select x; + join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id + where y.State == (int)TwConst.State.已完成 && y.WarehouseCode == WarehouseCode + select x; var pipeline = (from x in Funs.DB.HJGL_Pipeline join y in CompleteInOutPlanDetail_RelationList on x.PipelineId equals y.PipelineId into temp - from y in temp.DefaultIfEmpty() - where y == null && x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID - && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) + from y in temp.DefaultIfEmpty() + where y == null && x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID + && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) orderby x.PipelineCode select x).ToList(); if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null) @@ -253,10 +253,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage continue; }*/ TreeNode newNode = new TreeNode(); - newNode.Text = item.PipelineCode ; + newNode.Text = item.PipelineCode; newNode.NodeID = item.PipelineId; newNode.CommandName = "管线"; - newNode.EnableClickEvent = true; + newNode.EnableClickEvent = true; node.Nodes.Add(newNode); } if (pageindex < pageCount) @@ -306,7 +306,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - // this.BindGrid(); + // this.BindGrid(); } } @@ -331,7 +331,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage // 2.获取当前分页数据 Grid1.DataSource = dt; Grid1.DataBind(); - } + } void BindGrid2() { //var result = tw_PipeMatMatchOutputs @@ -362,16 +362,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage Rate = Math.Round((decimal)output.Average(item => item.MatchRate) * 100, 2); lbRate.Text = "匹配率:" + Rate.ToString() + "%"; }*/ - var selectList = new List() ; + var selectList = new List(); for (int i = 0; i < Grid2.Rows.Count; i++) { var model = Grid2.Rows[i].DataItem as Tw_PipeMatchOutput; - - if (model.MatchRate >=1) + + if (model.MatchRate >= 1) { Grid2.Rows[i].RowCssClass = "green"; selectList.Add(model.PipelineId); - + } else { @@ -381,7 +381,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } if (cbSelectCom.Checked) { - Grid2.SelectedRowIDArray= selectList.ToArray(); + Grid2.SelectedRowIDArray = selectList.ToArray(); } } @@ -430,11 +430,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage { var model = Grid1.Rows[i].DataItem as Tw_PipeMatMatchOutput; - if (model?.MatchRate < 1 || model?.MatchRate==null) + if (model?.MatchRate < 1 || model?.MatchRate == null) { Grid1.Rows[i].RowCssClass = "red"; - } + } } @@ -562,10 +562,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void btnAddPipelineMatchMat_Click(object sender, EventArgs e) { - var selectNodes= tvControlItem.GetCheckedNodes(); + var selectNodes = tvControlItem.GetCheckedNodes(); foreach (var node in selectNodes) - { - if (dicSeclectPipeLine.Where(x => x.Key == node.NodeID).Count() == 0 && node.CommandName== "管线") + { + if (dicSeclectPipeLine.Where(x => x.Key == node.NodeID).Count() == 0 && node.CommandName == "管线") { dicSeclectPipeLine.Add(node.NodeID, node.Text); } @@ -573,7 +573,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), WarehouseCode); BindGrid3(); - BindGrid2(); + BindGrid2(); } protected void btnDeletePipelineMatchMat_Click(object sender, EventArgs e) @@ -594,31 +594,32 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } protected void btnGenTask_Click(object sender, EventArgs e) - { if (Grid2.SelectedRowIDArray.Count() > 0) + { + if (Grid2.SelectedRowIDArray.Count() > 0) { SaveTask(); ShowNotify("生成任务单成功!", MessageBoxIcon.Warning); - // Alert.Show("生成任务单成功!", MessageBoxIcon.Warning); - Grid1.DataSource = null; - Grid1.DataBind(); - Grid2.DataSource = null; - Grid2.DataBind(); - Grid3.DataSource = null; - Grid3.DataBind(); + // Alert.Show("生成任务单成功!", MessageBoxIcon.Warning); + Grid1.DataSource = null; + Grid1.DataBind(); + Grid2.DataSource = null; + Grid2.DataBind(); + Grid3.DataSource = null; + Grid3.DataBind(); } else { ShowNotify("请先选择需要发起任单的管线!", MessageBoxIcon.Warning); } - + } private void SaveTask() { var weldingRods = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "2" select x; var weldingWires = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "1" select x; var selectRowId = (from x in Funs.DB.View_HJGL_NoWeldJointFind - where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null && - x.WeldTaskId == null && x.WeldingMethodCode != null + where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null && + x.WeldTaskId == null && x.WeldingMethodCode != null select x).ToList(); Dictionary unitworkTaskCode = new Dictionary(); @@ -626,9 +627,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage Dictionary matchPipeline = new Dictionary(); foreach (var rowIndex in Grid2.SelectedRowIndexArray) { - matchPipeline.Add(rowIndex+1, Grid2.Rows[rowIndex].RowID); + matchPipeline.Add(rowIndex + 1, Grid2.Rows[rowIndex].RowID); } - if (PipeArea=="1") //工厂预制的管线,则只选择预制口 + if (PipeArea == "1") //工厂预制的管线,则只选择预制口 { selectRowId = selectRowId.Where(x => x.JointAttribute == "预制口").ToList(); } @@ -640,14 +641,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage NewTask.ProjectId = this.CurrUser.LoginProjectId; NewTask.UnitWorkId = PipelineService.GetPipelineByPipelineId(weldjoint.PipelineId)?.UnitWorkId; NewTask.UnitId = this.CurrUser.UnitId; - if (unitworkTaskCode.FirstOrDefault(x=>x.Key== NewTask.UnitWorkId).Value!=null) + if (unitworkTaskCode.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value != null) { NewTask.TaskCode = unitworkTaskCode.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value; } else { NewTask.TaskCode = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, DateTime.Now.Date.ToString("yyyy-MM-dd"), NewTask.UnitWorkId, this.CurrUser.UnitId); - unitworkTaskCode.Add(NewTask.UnitWorkId, NewTask.TaskCode); + unitworkTaskCode.Add(NewTask.UnitWorkId, NewTask.TaskCode); } if (unitworkSerialNumber.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value != null) @@ -661,7 +662,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } NewTask.WeldTaskId = SQLHelper.GetNewID(); - NewTask.WeldJointId = weldjoint.WeldJointId; + NewTask.WeldJointId = weldjoint.WeldJointId; var oldWeldTask = BLL.WeldTaskService.GetWeldTaskByWeldJointId(NewTask.WeldJointId); if (oldWeldTask != null) { @@ -671,7 +672,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage Model.HJGL_WeldJoint weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(NewTask.WeldJointId); if (weldJoint != null) { - NewTask.PipeLineSortIndex = matchPipeline.FirstOrDefault(x => x.Value == weldJoint.PipelineId).Key; + NewTask.PipeLineSortIndex = matchPipeline.FirstOrDefault(x => x.Value == weldJoint.PipelineId).Key; NewTask.WeldingRod = weldJoint.WeldingRod; NewTask.WeldingWire = weldJoint.WeldingWire; //获取可替代焊丝焊条 @@ -738,7 +739,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage BLL.WeldJointService.UpdateWeldJoint(weldJoint); BLL.WeldTaskService.AddWeldTask(NewTask); } - + } private bool IsCoverClass(string wpsClass, string matClass) { diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatchGet.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatchGet.aspx.cs index 59a16b99..96281c2d 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatchGet.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatchGet.aspx.cs @@ -1,13 +1,9 @@ using BLL; -using FastReport.Editor; using MiniExcelLibs; -using Model; using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.WeldingManage @@ -15,7 +11,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage public partial class WeldMatMatchGet : PageBase { - public static List pipelinecode=new List(); + public static List pipelinecode = new List(); protected void Page_Load(object sender, EventArgs e) { @@ -23,11 +19,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage { var UnitWorkId = Request.Params["UnitWorkId"]; var PipeArea = Request.Params["PipeArea"]; - // txtProgressBar.Text = "20"; + // txtProgressBar.Text = "20"; GetStockNum(UnitWorkId, PipeArea); } } - public void GetStockNum(string UnitWorkId,string PipeArea) + public void GetStockNum(string UnitWorkId, string PipeArea) { var pipeline = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == UnitWorkId && x.PipeArea == PipeArea @@ -52,8 +48,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage string path = Funs.RootPath + @"File\Excel\Temp\weldMatchGet.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); var a = (from x in pipelinecode select new { PipelineCode = x }).ToList(); - var b=(from x in Funs.DB .HJGL_Pipeline where pipelinecode.Contains(x.PipelineCode) - select new {管线号=x.PipelineCode ,流水段=x.FlowingSection,匹配率="100%",计划安装日期=x.PlanStartDate }).ToList(); + var b = (from x in Funs.DB.HJGL_Pipeline + where pipelinecode.Contains(x.PipelineCode) + select new { 管线号 = x.PipelineCode, 流水段 = x.FlowingSection, 匹配率 = "100%", 计划安装日期 = x.PlanStartDate }).ToList(); MiniExcel.SaveAs(path, b); string fileName = "材料匹配100%管线.xlsx"; diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs index b80da60f..d3d74b88 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs @@ -1,6 +1,5 @@ using BLL; using MiniExcelLibs; -using NPOI.SS.Formula.Functions; using System; using System.Collections.Generic; using System.Data; @@ -14,7 +13,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { protected void Page_Load(object sender, EventArgs e) { - // ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); + // ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); if (!IsPostBack) { @@ -72,8 +71,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) { @@ -124,7 +123,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage foreach (var item in p) { TreeNode newNode = new TreeNode(); - newNode.Text = item.WeldingDailyCode+"("+BLL.UnitService.getUnitNamesUnitIds(item.UnitId)+")"; + newNode.Text = item.WeldingDailyCode + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")"; newNode.NodeID = item.WeldingDailyId; newNode.EnableClickEvent = true; newNode.CommandName = "WeldingDaily"; @@ -212,7 +211,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); var SumDia = tb.AsEnumerable().Sum(x => x.Field("Size")); var WelderCount = tb.AsEnumerable().Select(x => x.Field("CoverWelderCode")).ToList().Distinct().Count(); - txtSumSize.Text= SumDia.ToString(); + txtSumSize.Text = SumDia.ToString(); txtTeam.Text = WelderCount.ToString(); // 2.获取当前分页数据 //var table = this.GetPagedDataTable(Grid1, tb1); @@ -534,7 +533,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage case "UnitWork": value = BLL.WeldingDailyService.GetFileOutValueByUnitWorkId(this.tvControlItem.SelectedNodeID, this.txtMonth.Text.Trim()); var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID); - filename = "焊接日报-" + unitWork.UnitWorkName+ this.txtMonth.Text.Trim()+ ".xlsx"; + filename = "焊接日报-" + unitWork.UnitWorkName + this.txtMonth.Text.Trim() + ".xlsx"; break; case "WeldingDaily": value = WeldingDailyService.GetFileOutValueById(this.tvControlItem.SelectedNodeID); @@ -545,10 +544,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage } string path = Funs.RootPath + @"File\Excel\Temp\焊接日报.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); - if (value.Count>0) + if (value.Count > 0) { MiniExcel.SaveAs(path, value); - + FileInfo info = new FileInfo(path); long fileSize = info.Length; System.Web.HttpContext.Current.Response.Clear(); @@ -569,13 +568,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void btnMenuDeleteDetail_Click(object sender, EventArgs e) { - if (!string .IsNullOrEmpty(Grid1.SelectedRowID)) + if (!string.IsNullOrEmpty(Grid1.SelectedRowID)) { - string errlog= BLL.WeldingDailyService.DeleteWeldingDailyItemByweldJointId(Grid1.SelectedRowID); - if (string.IsNullOrEmpty(errlog) ) + string errlog = BLL.WeldingDailyService.DeleteWeldingDailyItemByweldJointId(Grid1.SelectedRowID); + if (string.IsNullOrEmpty(errlog)) { BindGrid(); - ShowNotify("删除明细成功",MessageBoxIcon.Success); + ShowNotify("删除明细成功", MessageBoxIcon.Success); } else { @@ -583,7 +582,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } - + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs index cc9e7ad2..9a9f438f 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs @@ -140,7 +140,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage { BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true); BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWork, this.CurrUser.LoginProjectId, true); - Base_WeldingLocationServie.InitWeldingLocationDropDownList(this.drpWeldingLocationId,true); + Base_WeldingLocationServie.InitWeldingLocationDropDownList(this.drpWeldingLocationId, true); var report = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(this.WeldingDailyId); if (report != null) @@ -179,7 +179,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage //txtWeldingDate.MaxDate = DateTime.Now; this.txtWeldingDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now); - this.txtTableDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now); + this.txtTableDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now); string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + this.CurrUser.PersonName + "-"; this.txtWeldingDailyCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", this.CurrUser.LoginProjectId, perfix); } @@ -227,7 +227,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage { var weldJointIds = (from x in list where x.UnitWorkId == this.UnitWorkId && x.TaskDate.Value.Date <= Convert.ToDateTime(txtWeldingDate.Text) - && x.WeldingDailyId == null + && x.WeldingDailyId == null select x).ToList(); weldJointIds = weldJointIds.GroupBy(x => x.WeldJointId, (key, group) => group.OrderByDescending(x => x.TaskDate).First()).ToList(); task = weldJointIds; @@ -307,14 +307,14 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage string stateName = string.Empty; if (PipeArea != null && !string.IsNullOrEmpty(PipeArea.ToString())) { - - string txt = PipelineService.GetPipeArea().FirstOrDefault(x => x.Value == PipeArea.ToString())?.Text; - return txt; - - + string txt = PipelineService.GetPipeArea().FirstOrDefault(x => x.Value == PipeArea.ToString())?.Text; + + return txt; + + } - + return stateName; } #region 焊接日报 提交事件 @@ -461,7 +461,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); return; } - if (this.drpUnit.SelectedValue==BLL.Const._Null) + if (this.drpUnit.SelectedValue == BLL.Const._Null) { ShowNotify("请选择单位名称!", MessageBoxIcon.Warning); return; @@ -867,7 +867,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage newWeldJoint.WeldingDailyCode = this.txtWeldingDailyCode.Text.Trim(); newWeldJoint.CoverWelderId = coverWelderId; newWeldJoint.BackingWelderId = backingWelderId; - newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId,coverWelderId).TeamGroupId; + newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, coverWelderId).TeamGroupId; newWeldJoint.BackingWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, backingWelderId).TeamGroupId; //if (item.WeldingLocationId != Const._Null) //{ @@ -1002,7 +1002,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage updateWeldJoint.WeldingDailyCode = null; updateWeldJoint.CoverWelderId = null; updateWeldJoint.BackingWelderId = null; - updateWeldJoint.CoverWelderTeamGroupId= null; + updateWeldJoint.CoverWelderTeamGroupId = null; updateWeldJoint.BackingWelderTeamGroupId = null; BLL.WeldJointService.UpdateWeldJoint(updateWeldJoint); } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs index dc8f8a87..503d0e6f 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.HJGL.HotProcessHard; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -235,14 +234,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage where x.UnitWorkId == node.NodeID && x.TaskDate < Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01").AddMonths(1) && x.TaskDate >= Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01") - select new { x.TaskDate.Value.Date, x.UnitId,x.SerialNumber }).Distinct().ToList().OrderBy(x => x.SerialNumber); + select new { x.TaskDate.Value.Date, x.UnitId, x.SerialNumber }).Distinct().ToList().OrderBy(x => x.SerialNumber); if (p.Count() > 0) { foreach (var item in p) { TreeNode newNode = new TreeNode(); newNode.CommandName = "Date"; - newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date)+"-"+ item.SerialNumber + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")"; + newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "-" + item.SerialNumber + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")"; newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date) + "|" + item.SerialNumber; newNode.EnableClickEvent = true; node.Nodes.Add(newNode); @@ -264,7 +263,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage newNode.CommandName = "Date"; // newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")"; newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "-" + item.SerialNumber + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")"; - newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date)+"|"+item.SerialNumber; + newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date) + "|" + item.SerialNumber; newNode.EnableClickEvent = true; node.Nodes.Add(newNode); } @@ -282,7 +281,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim())) { - weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x=>x.PipeLineSortIndex).ToList(); + weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x => x.PipeLineSortIndex).ToList(); } DataTable tb = this.LINQToDataTable(weldingTask); @@ -619,13 +618,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage //GetCanWelderDropDownList(GetWeldingTaskList); } - string unitWorkId = string.Empty, unitId2 = string.Empty; string taskdate = string.Empty;string serialNumber=string.Empty; + string unitWorkId = string.Empty, unitId2 = string.Empty; string taskdate = string.Empty; string serialNumber = string.Empty; if (tvControlItem.SelectedNodeID.Contains("|")) { unitWorkId = tvControlItem.SelectedNodeID.Split('|')[0]; unitId2 = tvControlItem.SelectedNodeID.Split('|')[1]; taskdate = tvControlItem.SelectedNodeID.Split('|')[2]; - serialNumber= tvControlItem.SelectedNodeID.Split('|')[3]; + serialNumber = tvControlItem.SelectedNodeID.Split('|')[3]; } else { @@ -1223,7 +1222,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]); if (taskTime != null) { - var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]).OrderBy(z=>z.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList(); + var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]).OrderBy(z => z.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList(); if (pipelines.Any()) { @@ -1304,7 +1303,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } - + protected void btnPrintJoint_Click(object sender, EventArgs e) { @@ -1326,7 +1325,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage WeldJointId = x.WeldJointId, Spec = x.Specification, SortIndex = x.WeldJointCode.Replace(x.PipelineCode + "/", ""), - }).OrderBy(x=> x.pipelineCode).ThenBy(x=> x.SortIndex).ToList(); + }).OrderBy(x => x.pipelineCode).ThenBy(x => x.SortIndex).ToList(); var tb = LINQToDataTable(result); if (tb != null && tb.Rows.Count > 0) { @@ -1358,7 +1357,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (taskTime != null) { var weldTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]); - var pipelines = weldTaskList.OrderBy(x=>x.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList(); + var pipelines = weldTaskList.OrderBy(x => x.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList(); if (pipelines.Any()) { @@ -1376,14 +1375,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] && x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1] - && x.TaskDate.Value.Date == time.Date && x.AuditMan != null && + && x.TaskDate.Value.Date == time.Date && x.AuditMan != null && x.Tabler != null select x).FirstOrDefault(); Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster { CreateManName = !string.IsNullOrEmpty(weldTask_CreateName?.Tabler) ? BLL.Person_PersonsService.getSignatureUrl(weldTask_CreateName.Tabler) : "", - AuditManName = !string.IsNullOrEmpty(weldTask?.AuditMan) ? BLL.Person_PersonsService.getSignatureUrl(weldTask.AuditMan) : "", + AuditManName = !string.IsNullOrEmpty(weldTask?.AuditMan) ? BLL.Person_PersonsService.getSignatureUrl(weldTask.AuditMan) : "", }; tw_PrintMasters.Add(printMaster); DataTable Table1 = LINQToDataTable(tw_PrintMasters); @@ -1451,7 +1450,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { ShowNotify("请选择任务单", MessageBoxIcon.Question); } - } + } } protected void btnPassMaster_OnClick(object sender, EventArgs e) @@ -1465,9 +1464,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage { var time = Convert.ToDateTime(taskTime); var weldTaskList = (from x in Funs.DB.HJGL_WeldTask - where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] && x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1] - && x.TaskDate.Value.Date == time.Date - select x).ToList(); + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] && x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1] + && x.TaskDate.Value.Date == time.Date + select x).ToList(); foreach (var weldTask in weldTaskList) { @@ -1482,7 +1481,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { ShowNotify("请选择任务单", MessageBoxIcon.Question); } - } + } } protected void btnPassMaster2_OnClick(object sender, EventArgs e) @@ -1496,9 +1495,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage { var time = Convert.ToDateTime(taskTime); var weldTaskList = (from x in Funs.DB.HJGL_WeldTask - where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] && x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1] - && x.TaskDate.Value.Date == time.Date - select x).ToList(); + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] && x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1] + && x.TaskDate.Value.Date == time.Date + select x).ToList(); foreach (var weldTask in weldTaskList) { @@ -1513,7 +1512,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { ShowNotify("请选择任务单", MessageBoxIcon.Question); } - } + } } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs index c305a3f4..57a4641b 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; namespace FineUIPro.Web.HJGL.WeldingManage { @@ -530,7 +529,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } - // BindGrid(); + // BindGrid(); ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success); } else diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs index b506dbfc..43a9ec79 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs @@ -12,7 +12,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { public partial class WeldingPlan : PageBase { - + protected void Page_Load(object sender, EventArgs e) { ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); @@ -75,8 +75,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -119,7 +119,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) { this.BindGrid(); - + ctlAuditFlow.BindData(); } #endregion @@ -218,7 +218,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage strSql += " AND line.FlowingSection LIKE @FlowingSection"; listStr.Add(new SqlParameter("@FlowingSection", "%" + this.txtFlowingSection.Text.Trim() + "%")); } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -480,7 +480,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void btnUpDateState_Click(object sender, EventArgs e) { string unitworkid = this.tvControlItem.SelectedNodeID; - var pipeline=PipelineService.GetPipelinesByUnitWordId(unitworkid); + var pipeline = PipelineService.GetPipelinesByUnitWordId(unitworkid); foreach (var item in pipeline) { BLL.PipelineService.GetStateByPipelineId(item.PipelineId); @@ -488,6 +488,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage } BindGrid(); } - + } } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlanIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlanIn.aspx.cs index 81d682cd..1482a6ea 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlanIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlanIn.aspx.cs @@ -3,10 +3,8 @@ using MiniExcelLibs; using System; using System.Collections.Generic; using System.Data; -using System.Data.OleDb; using System.IO; using System.Linq; -using System.Net.Mail; namespace FineUIPro.Web.HJGL.WeldingManage { @@ -32,10 +30,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// /// 1 预制口,2安装口 /// - public string Type { - get - { - return (string)ViewState["Type"]; } + public string Type + { + get + { + return (string)ViewState["Type"]; + } set { ViewState["Type"] = value; @@ -78,7 +78,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage Pipeline_ComponentList.Clear(); } errorInfos = string.Empty; - + } } #endregion @@ -143,7 +143,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// Excel文件路径名 private void ImportXlsToData(string fileName) { - // var rows =Funs.LINQToDataTable(MiniExcel.Query(fileName).ToList()) ; + // var rows =Funs.LINQToDataTable(MiniExcel.Query(fileName).ToList()) ; var rows = MiniExcel.QueryAsDataTable(fileName, useHeaderRow: true); Model.ResponeData responeData = new Model.ResponeData(); switch (Type) @@ -155,7 +155,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage responeData = AddDatasetToSQL_FIELD(rows, 12); break; } - if (responeData.code==1) + if (responeData.code == 1) { ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); } @@ -167,7 +167,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage Target = Target.Self }; alert.Show(); - // ShowNotify(responeData.message, MessageBoxIcon.Success); + // ShowNotify(responeData.message, MessageBoxIcon.Success); } } @@ -229,9 +229,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage { result += "第" + (i + 2).ToString() + "行," + "无效的时间格式" + "|"; } - - PipelineList.Add(pipeline); - + + PipelineList.Add(pipeline); + } if (!string.IsNullOrEmpty(result)) { @@ -248,7 +248,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage else { errorInfos = string.Empty; - // ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + // ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); } } else @@ -396,7 +396,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } break; } - + } else { @@ -430,7 +430,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { BLL.HJGL_PipelineComponentService.UpdatePipelineComponent(item); } - } + } break; case BLL.PipelineService.PipeArea_FIELD: if (PipelineList.Count > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs index 1dc4524b..bdba99e7 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs @@ -31,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); if (this.drpUnitId.SelectedValue != BLL.Const._Null) - { + { listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue)); } else diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/WelderEfficacy.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/WelderEfficacy.aspx.cs index 7330b966..9a4e3e0e 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/WelderEfficacy.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/WelderEfficacy.aspx.cs @@ -54,7 +54,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport listStr.Add(new SqlParameter("@JointAttribute", null)); } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_WelderEfficacy", parameter); diff --git a/SGGL/FineUIPro.Web/HSSE/Accident/AccidentPersonRecordEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Accident/AccidentPersonRecordEdit.aspx.cs index 07b42071..c3df11d9 100644 --- a/SGGL/FineUIPro.Web/HSSE/Accident/AccidentPersonRecordEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Accident/AccidentPersonRecordEdit.aspx.cs @@ -104,7 +104,7 @@ namespace FineUIPro.Web.HSSE.Accident } this.hdWorkPackageId.Text = accidentPersonRecord.WorkPackageId; - this.txtWorkPackageName.Text= accidentPersonRecord.WorkPackageName; + this.txtWorkPackageName.Text = accidentPersonRecord.WorkPackageName; } } else diff --git a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx.cs index 4d73a32d..3db67ab4 100644 --- a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx.cs @@ -475,15 +475,15 @@ namespace FineUIPro.Web.HSSE.ActionPlan //if (!CurrUser.PersonId.Equals(actionPlanList1.CompileMan)) //{ - Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetConstructSoluAppByApproveMan(ActionPlanListId, CurrUser.PersonId, Convert.ToInt32(actionPlanList1.Edition)); - if (type == BLL.Const.BtnSubmit) - { - approve.ApproveDate = DateTime.Now; - } - approve.Edition = Convert.ToInt32(edtion); - approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); - approve.ApproveIdea = txtOptions.Text.Trim(); - ActionPlanListApproveService.UpdateActionPlanListApprove(approve); + Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetConstructSoluAppByApproveMan(ActionPlanListId, CurrUser.PersonId, Convert.ToInt32(actionPlanList1.Edition)); + if (type == BLL.Const.BtnSubmit) + { + approve.ApproveDate = DateTime.Now; + } + approve.Edition = Convert.ToInt32(edtion); + approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + approve.ApproveIdea = txtOptions.Text.Trim(); + ActionPlanListApproveService.UpdateActionPlanListApprove(approve); //} //else //{ diff --git a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListView.aspx.cs index 86286895..595f1855 100644 --- a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListView.aspx.cs @@ -1,7 +1,6 @@ -using System; +using BLL; +using System; using System.Collections.Generic; -using System.Web; -using BLL; using System.Linq; namespace FineUIPro.Web.HSSE.ActionPlan diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs index b50a72fb..21d3194b 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs @@ -1,9 +1,7 @@ using Aspose.Words; using BLL; using System; -using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.IO; using System.Linq; diff --git a/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.cs index 0c8883b1..1120ce95 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/OfficeCheck.aspx.cs @@ -106,7 +106,7 @@ namespace FineUIPro.Web.HSSE.Check /// /// protected void btnSubmit_Click(object sender, EventArgs e) - { + { if (Grid1.SelectedRowIndexArray.Length > 0) { foreach (int rowIndex in Grid1.SelectedRowIndexArray) @@ -120,7 +120,7 @@ namespace FineUIPro.Web.HSSE.Check { getR.States = BLL.Const.State_2; Funs.DB.SubmitChanges(); - } + } } } diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.cs index 23dc133f..a172ec00 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.cs @@ -172,7 +172,7 @@ namespace FineUIPro.Web.HSSE.Check { BLL.LogService.AddSys_Log(this.CurrUser, newCheckTwolevel.CheckCode, newCheckTwolevel.ProjectLeaderCheckId, BLL.Const.ProjectLeaderCheckMenuId, BLL.Const.BtnDelete); BLL.Check_ProjectLeaderCheckService.DeleteProjectLeaderCheckById(rowID); - + } } this.BindGrid(); diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs index c76f00b8..4461a671 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs @@ -1,10 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; +using BLL; +using System; namespace FineUIPro.Web.HSSE.Check { diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.cs index 5cfb05d6..3ceac29f 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; -using FineUIPro.Web.SysManage; +using BLL; +using System; namespace FineUIPro.Web.HSSE.Check { @@ -66,7 +60,7 @@ namespace FineUIPro.Web.HSSE.Check { if (!IsPostBack) { - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.ProjectLeaderCheckId = Request.Params["ProjectLeaderCheckId"]; this.UnitId = Request.Params["UnitId"]; this.MenuId = Const.ProjectLeaderCheckMenuId; diff --git a/SGGL/FineUIPro.Web/HSSE/Check/PunishNoticeView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/PunishNoticeView.aspx.cs index 8a5421ff..18114100 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/PunishNoticeView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/PunishNoticeView.aspx.cs @@ -84,7 +84,8 @@ namespace FineUIPro.Web.HSSE.Check this.txtCurrency.Text = punishNotice.Currency; } } - }; + } + ; } } //处罚明细 diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs index b699537e..13e4c10e 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs @@ -397,7 +397,7 @@ namespace FineUIPro.Web.HSSE.Check Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } - + printRectify(getRectify); } @@ -1119,7 +1119,7 @@ namespace FineUIPro.Web.HSSE.Check protected void btnAll_Click(object sender, EventArgs e) { - PrinterDocService.PrinterRectifyNoticesHtmlAll(this.ProjectId,"1"); + PrinterDocService.PrinterRectifyNoticesHtmlAll(this.ProjectId, "1"); } protected void btnAll2_Click(object sender, EventArgs e) { diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.cs index 2b427a92..b044e4d1 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.cs @@ -53,7 +53,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 绑定数据 /// private void BindGrid() - { + { string strSql = @" SELECT CostManage.CostManageId, CostManage.ProjectId,CostManage.UnitId,Unit.UnitName,CostManage.ContractNum,CostManage.CostManageDate, CostManage.States,(CASE WHEN CostManage.States =1 THEN '审核中' WHEN CostManage.States =2 THEN '已完成' ELSE '待提交' END) AS StatesName, CostManage.CompileMan,Users.PersonName AS CompileManName,CostManage.CompileDate,CostManage.SumMoney @@ -62,7 +62,7 @@ namespace FineUIPro.Web.HSSE.CostGoods LEFT JOIN Person_Persons AS Users ON CostManage.CompileMan = Users.PersonId WHERE 1=1 "; List listStr = new List(); strSql += " AND CostManage.ProjectId = @ProjectId"; - listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) { @@ -168,7 +168,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageEdit.aspx?CostManageId={0}", costManage.CostManageId, "编辑 - "))); } - else + else { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageView.aspx?CostManageId={0}", costManage.CostManageId, "查看 - "))); } @@ -304,7 +304,7 @@ namespace FineUIPro.Web.HSSE.CostGoods } else { - strValue="待【"+Person_PersonsService.GetPersonsNameById(costManage.CompileMan) +"】提交"; + strValue = "待【" + Person_PersonsService.GetPersonsNameById(costManage.CompileMan) + "】提交"; } } } @@ -314,7 +314,7 @@ namespace FineUIPro.Web.HSSE.CostGoods #endregion protected void Window1_Close(object sender, WindowCloseEventArgs e) - { + { // 绑定表格 this.BindGrid(); } @@ -348,7 +348,7 @@ namespace FineUIPro.Web.HSSE.CostGoods } else { - string messaage = CostManageService.PushDataToHSE(this.CurrUser.LoginProjectId, costManage.ContractNum,costManageId); + string messaage = CostManageService.PushDataToHSE(this.CurrUser.LoginProjectId, costManage.ContractNum, costManageId); if (string.IsNullOrEmpty(messaage)) { Alert.ShowInTop("推送成功!", MessageBoxIcon.Success); diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs index 942ea3d1..7b1ec2bc 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs @@ -60,27 +60,27 @@ namespace FineUIPro.Web.HSSE.CostGoods if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideRefreshReference(); - this.ProjectId = this.CurrUser.LoginProjectId; + this.ProjectId = this.CurrUser.LoginProjectId; this.CostManageId = Request.Params["CostManageId"]; var costManage = BLL.CostManageService.GetCostManageById(this.CostManageId); if (costManage != null) { this.ProjectId = costManage.ProjectId; this.drpUnit.Text = UnitService.GetUnitNameByUnitId(costManage.UnitId); - + this.txtContractNum.Text = costManage.ContractNum; this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate); BindGrid(); this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(this.ProjectId); this.txtHseCost.Text = ProjectUnitService.GetSumHSECost(this.ProjectId, costManage.UnitId).ToString(); - this.txtGetCost.Text = CostManageService.GetSumHSECost(this.ProjectId, costManage.UnitId , this.CostManageId).ToString(); + this.txtGetCost.Text = CostManageService.GetSumHSECost(this.ProjectId, costManage.UnitId, this.CostManageId).ToString(); NowFlow = CostManageService.getNowCostManageFlowOperateList(costManage.CostManageId); if (NowFlow != null) { this.txtOpinion.Text = NowFlow.Opinion; } - - NextFlow = CostManageService.getNextCostManageFlowOperateList(costManage.CostManageId,this.CurrUser.PersonId); + + NextFlow = CostManageService.getNextCostManageFlowOperateList(costManage.CostManageId, this.CurrUser.PersonId); if (NextFlow != null) { Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpNextMan, this.ProjectId, NextFlow.UnitId, true); @@ -120,7 +120,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { JObject summary = new JObject(); summary.Add("InvestCostProject", "本次申请合计金额(元)"); - summary.Add("PriceMoney", getItem.Sum(x=>x.PriceMoney ?? 0)); + summary.Add("PriceMoney", getItem.Sum(x => x.PriceMoney ?? 0)); Grid1.SummaryData = summary; } @@ -132,7 +132,7 @@ namespace FineUIPro.Web.HSSE.CostGoods protected void Window1_Close(object sender, EventArgs e) { BindGrid(); - } + } #endregion #region BindGrid2 @@ -142,7 +142,7 @@ namespace FineUIPro.Web.HSSE.CostGoods private void BindGrid2() { var FlowOperates = from x in Funs.DB.CostGoods_CostManageFlowOperate - where x.CostManageId == this.CostManageId + where x.CostManageId == this.CostManageId select new { x.FlowOperateId, @@ -150,9 +150,9 @@ namespace FineUIPro.Web.HSSE.CostGoods x.AuditFlowName, x.SortIndex, x.UnitId, - UnitName=Funs.DB.Base_Unit.First(u=>u.UnitId == x.UnitId).UnitName, + UnitName = Funs.DB.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName, x.OperaterId, - OperaterName= Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName, + OperaterName = Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName, x.OperaterTime, x.IsAgree, x.Opinion, @@ -172,14 +172,14 @@ namespace FineUIPro.Web.HSSE.CostGoods /// /// protected void btnSubmit_Click(object sender, EventArgs e) - { + { if (this.drpNextMan.SelectedValue == BLL.Const._Null && this.rblIsAgree.SelectedValue == "1" && NextFlow != null) { Alert.ShowInTop("请选择" + this.drpNextMan.Label + "!", MessageBoxIcon.Warning); return; } this.SaveData(); - + } /// @@ -187,7 +187,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// /// private void SaveData() - { + { var getCost = CostManageService.GetCostManageById(this.CostManageId); if (getCost != null) { @@ -195,7 +195,7 @@ namespace FineUIPro.Web.HSSE.CostGoods if (this.rblIsAgree.SelectedValue == "0") ///不同意 直接打回编制人 { isAgree = false; - NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text + ","+ this.txtOpinion.Text; + NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text + "," + this.txtOpinion.Text; getCost.States = BLL.Const.State_0; getCost.NextManId = getCost.CompileMan; BLL.CostManageService.UpdateCostManage(getCost); @@ -203,7 +203,7 @@ namespace FineUIPro.Web.HSSE.CostGoods } else { - NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text+"。"; + NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text + "。"; NowFlow.IsClosed = true; if (NextFlow != null) { @@ -211,7 +211,7 @@ namespace FineUIPro.Web.HSSE.CostGoods BLL.CostManageService.updateCostManageFlowOperate(NextFlow); getCost.NextManId = this.drpNextMan.SelectedValue; - BLL.CostManageService.UpdateCostManage(getCost); + BLL.CostManageService.UpdateCostManage(getCost); } else { @@ -222,12 +222,12 @@ namespace FineUIPro.Web.HSSE.CostGoods } NowFlow.IsAgree = isAgree; - NowFlow.OperaterTime = DateTime.Now; + NowFlow.OperaterTime = DateTime.Now; BLL.CostManageService.updateCostManageFlowOperate(NowFlow); } PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - } + } #endregion #region 附件上传 @@ -241,7 +241,7 @@ namespace FineUIPro.Web.HSSE.CostGoods if (!string.IsNullOrEmpty(this.CostManageId)) { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageAttachUrl&menuId={1}&type=-1", this.CostManageId, BLL.Const.ProjectCostManageMenuId))); - } + } } #endregion diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs index eae45c38..f487a437 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs @@ -121,7 +121,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { JObject summary = new JObject(); summary.Add("InvestCostProject", "本次申请合计金额(元)"); - summary.Add("PriceMoney", getItem.Sum(x=>x.PriceMoney ?? 0)); + summary.Add("PriceMoney", getItem.Sum(x => x.PriceMoney ?? 0)); Grid1.SummaryData = summary; } @@ -133,7 +133,7 @@ namespace FineUIPro.Web.HSSE.CostGoods protected void Window1_Close(object sender, EventArgs e) { BindGrid(); - } + } #endregion #region 新增费用申请情况 @@ -167,7 +167,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { this.Edit(); } - + /// /// 编辑 /// @@ -238,7 +238,7 @@ namespace FineUIPro.Web.HSSE.CostGoods private void BindGrid2() { var FlowOperates = from x in Funs.DB.CostGoods_CostManageFlowOperate - where x.CostManageId == this.CostManageId + where x.CostManageId == this.CostManageId select new { x.FlowOperateId, @@ -246,16 +246,16 @@ namespace FineUIPro.Web.HSSE.CostGoods x.AuditFlowName, x.SortIndex, x.UnitId, - UnitName=Funs.DB.Base_Unit.First(u=>u.UnitId == x.UnitId).UnitName, + UnitName = Funs.DB.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName, x.OperaterId, - OperaterName= Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName, + OperaterName = Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName, x.OperaterTime, x.IsAgree, x.Opinion, x.IsClosed }; - this.Grid2.DataSource = FlowOperates.OrderByDescending(x=>x.SortIndex); + this.Grid2.DataSource = FlowOperates.OrderByDescending(x => x.SortIndex); this.Grid2.DataBind(); } #endregion @@ -278,7 +278,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// /// protected void btnSubmit_Click(object sender, EventArgs e) - { + { if (this.drpNextMan.SelectedValue == BLL.Const._Null) { Alert.ShowInTop("请选择" + this.drpNextMan.Label + "!", MessageBoxIcon.Warning); @@ -311,8 +311,8 @@ namespace FineUIPro.Web.HSSE.CostGoods CompileMan = this.CurrUser.PersonId, CompileDate = DateTime.Now, }; - var costManageItems = CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId); - if (costManageItems.Count ==0) + var costManageItems = CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId); + if (costManageItems.Count == 0) { costManage.SumMoney = decimal.Parse(txtHseCost.Text.Trim()); } @@ -326,16 +326,16 @@ namespace FineUIPro.Web.HSSE.CostGoods costManage.NextManId = costManage.CompileMan; } - var getCost= CostManageService.GetCostManageById(this.CostManageId); + var getCost = CostManageService.GetCostManageById(this.CostManageId); if (getCost != null) - { + { costManage.CostManageId = this.CostManageId; BLL.CostManageService.UpdateCostManage(costManage); BLL.LogService.AddSys_Log(this.CurrUser, costManage.CostManageCode, costManage.CostManageId, BLL.Const.ProjectCostManageMenuId, BLL.Const.BtnModify); } else { - costManage.CostManageCode = Funs.GetNewFileName(); + costManage.CostManageCode = Funs.GetNewFileName(); costManage.CostManageId = this.CostManageId; BLL.CostManageService.AddCostManage(costManage); BLL.LogService.AddSys_Log(this.CurrUser, costManage.CostManageCode, costManage.CostManageId, BLL.Const.ProjectCostManageMenuId, BLL.Const.BtnAdd); @@ -343,10 +343,10 @@ namespace FineUIPro.Web.HSSE.CostGoods if (type == Const.BtnSubmit) { - var getNext=CostManageService.getNextCostManageFlowOperateList(this.CostManageId, this.CurrUser.PersonId); - if(getNext != null) + var getNext = CostManageService.getNextCostManageFlowOperateList(this.CostManageId, this.CurrUser.PersonId); + if (getNext != null) { - getNext.OperaterId = this.drpNextMan.SelectedValue ; + getNext.OperaterId = this.drpNextMan.SelectedValue; CostManageService.updateCostManageFlowOperate(getNext); } } diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageItemEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageItemEdit.aspx.cs index 95578ceb..aa45dd3d 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageItemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageItemEdit.aspx.cs @@ -1,6 +1,4 @@ using BLL; -using FineUIPro.Web.BaseInfo; -using Model; using System; namespace FineUIPro.Web.HSSE.CostGoods @@ -63,7 +61,7 @@ namespace FineUIPro.Web.HSSE.CostGoods this.drpSupCostType.SelectedValue = costManageItem.SupCostTypeId; CostTypeService.InitCostTypeItemDropDownList(this.drpCostType, this.drpSupCostType.SelectedValue, false); this.drpCostType.SelectedValue = costManageItem.CostTypeId; - this.txtInvestCostProject.Text= costManageItem.InvestCostProject; + this.txtInvestCostProject.Text = costManageItem.InvestCostProject; if (costManageItem.PriceMoney != null) { this.txtPriceMoney.Text = Convert.ToString(costManageItem.PriceMoney); @@ -91,7 +89,7 @@ namespace FineUIPro.Web.HSSE.CostGoods PriceMoney = Funs.GetNewDecimalOrZero(this.txtPriceMoney.Text.Trim()), }; - var getSupType =CostTypeService.GetCostTypeById(this.drpSupCostType.SelectedValue); + var getSupType = CostTypeService.GetCostTypeById(this.drpSupCostType.SelectedValue); if (getSupType != null) { costManageItem.SupCostTypeId = getSupType.CostTypeId; @@ -102,7 +100,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { isSave = false; } - var getCostType=CostTypeService.GetCostTypeItemById(this.drpCostType.SelectedValue); + var getCostType = CostTypeService.GetCostTypeItemById(this.drpCostType.SelectedValue); if (getCostType != null) { costManageItem.CostTypeId = getCostType.CostTypeItemId; @@ -144,7 +142,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// protected void drpSupCostType_SelectedIndexChanged(object sender, EventArgs e) { - CostTypeService.InitCostTypeItemDropDownList(this.drpCostType,this.drpSupCostType.SelectedValue, false); + CostTypeService.InitCostTypeItemDropDownList(this.drpCostType, this.drpSupCostType.SelectedValue, false); } #region 附件上传 diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageView.aspx.cs index 7de789b9..99995c53 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageView.aspx.cs @@ -42,9 +42,9 @@ namespace FineUIPro.Web.HSSE.CostGoods if (costManage != null) { strProjectId = costManage.ProjectId; - this.drpUnit.Text=UnitService.GetUnitNameByUnitId(costManage.UnitId); + this.drpUnit.Text = UnitService.GetUnitNameByUnitId(costManage.UnitId); this.txtContractNum.Text = costManage.ContractNum; - this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate); + this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate); this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(strProjectId); this.txtHseCost.Text = ProjectUnitService.GetSumHSECost(strProjectId, costManage.UnitId).ToString(); this.txtGetCost.Text = CostManageService.GetSumHSECost(strProjectId, costManage.UnitId, this.CostManageId).ToString(); @@ -113,7 +113,7 @@ namespace FineUIPro.Web.HSSE.CostGoods x.IsClosed }; - this.Grid2.DataSource = FlowOperates.OrderByDescending(x=> x.SortIndex); + this.Grid2.DataSource = FlowOperates.OrderByDescending(x => x.SortIndex); this.Grid2.DataBind(); if (FlowOperates.FirstOrDefault(x => x.OperaterId != null) != null) { @@ -134,7 +134,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageAttachUrl&menuId={1}&type=-1", this.CostManageId, BLL.Const.ProjectCostManageMenuId))); } - + } #endregion } diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummary.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummary.aspx.cs index 8d58f331..176b5943 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummary.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummary.aspx.cs @@ -1,10 +1,7 @@ using BLL; -using Model; using System; -using System.Collections.Generic; using System.Data; using System.Linq; -using System.Text; namespace FineUIPro.Web.HSSE.CostGoods { @@ -86,23 +83,23 @@ namespace FineUIPro.Web.HSSE.CostGoods sDate = getMinYear.Value; } } - + for (int i = 0; sDate + i <= eDate; i++) { gr = new FineUIPro.GroupField(); gr.HeaderText = (sDate + i).ToString() + "年(元)"; - gr.HeaderTextAlign= TextAlign.Center; + gr.HeaderTextAlign = TextAlign.Center; bf = new FineUIPro.BoundField(); - bf.DataField = (sDate + i).ToString() +"a"; + bf.DataField = (sDate + i).ToString() + "a"; bf.DataFormatString = "{0}"; bf.HeaderText = "计划"; bf.Width = 100; - bf.HeaderTextAlign = TextAlign.Center; + bf.HeaderTextAlign = TextAlign.Center; gr.Columns.Add(bf); bf = new FineUIPro.BoundField(); - bf.DataField = (sDate + i).ToString() +"b"; + bf.DataField = (sDate + i).ToString() + "b"; bf.DataFormatString = "{0}"; bf.HeaderText = "申请"; bf.Width = 100; @@ -112,7 +109,7 @@ namespace FineUIPro.Web.HSSE.CostGoods Grid1.Columns.Add(gr); } } - + gr = new FineUIPro.GroupField(); gr.HeaderText = "合计(元)"; gr.HeaderTextAlign = TextAlign.Center; @@ -135,7 +132,7 @@ namespace FineUIPro.Web.HSSE.CostGoods Grid1.Columns.Add(gr); Grid1.DataKeyNames = new string[] { "Id", "CostTypeName" }; - + } #endregion @@ -180,10 +177,10 @@ namespace FineUIPro.Web.HSSE.CostGoods DataTable table = new DataTable(); table.Columns.Add(new DataColumn("Id", typeof(string))); table.Columns.Add(new DataColumn("SupCostTypeName", typeof(string))); - table.Columns.Add(new DataColumn("CostTypeName", typeof(string))); + table.Columns.Add(new DataColumn("CostTypeName", typeof(string))); for (int i = 0; sDate + i <= eDate; i++) { - table.Columns.Add(new DataColumn((sDate + i).ToString() +"a", typeof(string))); + table.Columns.Add(new DataColumn((sDate + i).ToString() + "a", typeof(string))); table.Columns.Add(new DataColumn((sDate + i).ToString() + "b", typeof(string))); } @@ -219,7 +216,7 @@ namespace FineUIPro.Web.HSSE.CostGoods var getCostManageItem = from x in Funs.DB.CostGoods_CostManageItem join y in Funs.DB.CostGoods_CostManage on x.CostManageId equals y.CostManageId - where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId) && y.States==Const.State_2 + where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId) && y.States == Const.State_2 select new { x.CostManageId, x.CostManageItemId, Year = y.CostManageDate.Value.Year, x.SupCostTypeId, x.CostTypeId, x.PriceMoney }; foreach (var item in getType) @@ -278,10 +275,10 @@ namespace FineUIPro.Web.HSSE.CostGoods Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = this.Grid1.RecordCount; - + Response.Write(GetGridTableHtml(this.Grid1)); Response.End(); - } + } #endregion #region 分页 排序 @@ -325,9 +322,9 @@ namespace FineUIPro.Web.HSSE.CostGoods /// protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) { - this.LoadData(); + this.LoadData(); } - + protected void Window1_Close(object sender, WindowCloseEventArgs e) { diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummaryUnit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummaryUnit.aspx.cs index ea8eb445..337c21bb 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummaryUnit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummaryUnit.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using NPOI.SS.Formula.Functions; using System; using System.Collections.Generic; using System.Data; @@ -32,7 +31,7 @@ namespace FineUIPro.Web.HSSE.CostGoods InitUnitGrid(); } - protected static List getUnit= new List(); + protected static List getUnit = new List(); protected static List getSUnit = new List(); #region 按年份 @@ -46,7 +45,7 @@ namespace FineUIPro.Web.HSSE.CostGoods bf.DataFormatString = "{0}"; bf.HeaderText = "编号"; bf.Width = 60; - bf.Hidden = true; + bf.Hidden = true; Grid1.Columns.Add(bf); bf = new FineUIPro.BoundField(); @@ -68,9 +67,9 @@ namespace FineUIPro.Web.HSSE.CostGoods this.ProjectId = this.ProjectId ?? this.CurrUser.LoginProjectId; getUnit = (from x in Funs.DB.Project_ProjectUnit - join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId - where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_1 - select y).ToList(); + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_1 + select y).ToList(); foreach (var item in getUnit) { gr = new FineUIPro.GroupField(); @@ -78,9 +77,9 @@ namespace FineUIPro.Web.HSSE.CostGoods gr.HeaderTextAlign = TextAlign.Center; bf = new FineUIPro.BoundField(); - bf.DataField = item.UnitId+"a"; + bf.DataField = item.UnitId + "a"; bf.DataFormatString = "{0}"; - bf.HeaderText = "计划"; + bf.HeaderText = "计划"; bf.Width = 100; gr.Columns.Add(bf); @@ -94,9 +93,9 @@ namespace FineUIPro.Web.HSSE.CostGoods Grid1.Columns.Add(gr); } getSUnit = (from x in Funs.DB.Project_ProjectUnit - join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId - where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_2 - select y).ToList(); + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_2 + select y).ToList(); foreach (var item in getSUnit) { gr = new FineUIPro.GroupField(); @@ -162,7 +161,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { this.ProjectId = Request.Params["projectId"]; } - Funs.DropDownPageSize(this.ddlPageSize); + Funs.DropDownPageSize(this.ddlPageSize); LoadData(); } } @@ -191,9 +190,9 @@ namespace FineUIPro.Web.HSSE.CostGoods table.Columns.Add(new DataColumn("CostTypeName", typeof(string))); foreach (var item in getUnit) { - table.Columns.Add(new DataColumn(item.UnitId+"a", typeof(string))); - table.Columns.Add(new DataColumn(item.UnitId+"b", typeof(string))); - } + table.Columns.Add(new DataColumn(item.UnitId + "a", typeof(string))); + table.Columns.Add(new DataColumn(item.UnitId + "b", typeof(string))); + } foreach (var item in getSUnit) { table.Columns.Add(new DataColumn(item.UnitId + "a", typeof(string))); @@ -222,7 +221,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// /// private void SetTable(DataTable table, int? year) - { + { var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId where y.ProjectId == this.ProjectId && (!year.HasValue || y.Year == year) @@ -312,7 +311,7 @@ namespace FineUIPro.Web.HSSE.CostGoods Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = this.Grid1.RecordCount; - + Response.Write(GetGridTableHtml(this.Grid1)); Response.End(); } @@ -360,7 +359,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) { - this.LoadData(); + this.LoadData(); } protected void txtYear_ClearIconClick(object sender, EventArgs e) diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/Expense.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/Expense.aspx.cs index 95ea6f0d..06d8928e 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/Expense.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/Expense.aspx.cs @@ -1,10 +1,7 @@ using BLL; -using Model; using System; -using System.Collections.Generic; using System.Data; using System.Linq; -using System.Text; namespace FineUIPro.Web.HSSE.CostGoods { @@ -107,7 +104,7 @@ namespace FineUIPro.Web.HSSE.CostGoods Grid1.Columns.Add(bf); Grid1.DataKeyNames = new string[] { "Id", "CostTypeName" }; - + } #endregion @@ -154,7 +151,7 @@ namespace FineUIPro.Web.HSSE.CostGoods DataTable table = new DataTable(); table.Columns.Add(new DataColumn("Id", typeof(string))); table.Columns.Add(new DataColumn("SupCostTypeName", typeof(string))); - table.Columns.Add(new DataColumn("CostTypeName", typeof(string))); + table.Columns.Add(new DataColumn("CostTypeName", typeof(string))); for (int i = 0; sDate + i <= eDate; i++) { table.Columns.Add(new DataColumn((sDate + i).ToString(), typeof(string))); @@ -174,11 +171,11 @@ namespace FineUIPro.Web.HSSE.CostGoods return table; } - private void SetTable(DataTable table,string unitId) + private void SetTable(DataTable table, string unitId) { var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId - where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == this.drpUnit.SelectedValue) + where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == this.drpUnit.SelectedValue) orderby y.Year, x.SupSortIndex, x.SortIndex select new { x.ExpenseDetailId, x.ExpenseId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney }; var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct(); @@ -220,7 +217,7 @@ namespace FineUIPro.Web.HSSE.CostGoods int rSum = 3; for (int i = 0; sDate + i <= eDate; i++) { - var getV = getDetail.Where(x => x.Year == sDate + i ); + var getV = getDetail.Where(x => x.Year == sDate + i); if (getV.Count() > 0) { rowSum[rSum] = getV.Sum(x => x.CostMoney ?? 0); @@ -249,10 +246,10 @@ namespace FineUIPro.Web.HSSE.CostGoods Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = this.Grid1.RecordCount; - + Response.Write(GetGridTableHtml(this.Grid1)); Response.End(); - } + } #endregion #region 分页 排序 @@ -364,7 +361,7 @@ namespace FineUIPro.Web.HSSE.CostGoods var getEx = ExpenseService.GetExpenseById(rowID); if (getEx != null && !string.IsNullOrEmpty(getEx.UnitId)) { - BLL.LogService.AddSys_Log(this.CurrUser, getEx.ExpenseCode, getEx.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnDelete); + BLL.LogService.AddSys_Log(this.CurrUser, getEx.ExpenseCode, getEx.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnDelete); BLL.ExpenseService.DeleteExpenseById(rowID); } } @@ -382,7 +379,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) { - this.LoadData(); + this.LoadData(); } #region 获取按钮权限 diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseEdit.aspx.cs index 0045aaf5..5c91cd5b 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseEdit.aspx.cs @@ -1,6 +1,4 @@ using BLL; -using FineUIPro.Web.HSSE.License; -using Model; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -66,7 +64,7 @@ namespace FineUIPro.Web.HSSE.CostGoods Model.CostGoods_Expense expense = new Model.CostGoods_Expense(); if (string.IsNullOrEmpty(this.ExpenseId)) { - expense = Funs.DB.CostGoods_Expense.FirstOrDefault(x =>x.ProjectId == this.ProjectId && x.UnitId == this.drpUnit.SelectedValue && x.Year == Funs.GetNewInt(this.txtYear.Text)); + expense = Funs.DB.CostGoods_Expense.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == this.drpUnit.SelectedValue && x.Year == Funs.GetNewInt(this.txtYear.Text)); } else { @@ -83,9 +81,9 @@ namespace FineUIPro.Web.HSSE.CostGoods /// /// private void SetPage(Model.CostGoods_Expense expense) - { + { if (expense != null) - { + { this.ExpenseId = expense.ExpenseId; this.ProjectId = expense.ProjectId; this.drpUnit.SelectedValue = expense.UnitId; @@ -105,7 +103,7 @@ namespace FineUIPro.Web.HSSE.CostGoods } else { - var index = Funs.DB.CostGoods_Expense.Where(x =>x.ProjectId == this.ProjectId && x.Year.ToString() == this.txtYear.Text).Max(x => x.SortIndex); + var index = Funs.DB.CostGoods_Expense.Where(x => x.ProjectId == this.ProjectId && x.Year.ToString() == this.txtYear.Text).Max(x => x.SortIndex); if (index.HasValue) { this.lbSortIndex.Text = (index.Value + 1).ToString(); @@ -128,8 +126,8 @@ namespace FineUIPro.Web.HSSE.CostGoods Year = Funs.GetNewInt(this.txtYear.Text), SortIndex = Funs.GetNewIntOrZero(this.lbSortIndex.Text), }; - - ExpenseService.AddExpense(newExpense); + + ExpenseService.AddExpense(newExpense); this.ExpenseId = newExpense.ExpenseId; ExpenseDetailService.AddCostDetail(this.ExpenseId); } @@ -173,21 +171,21 @@ namespace FineUIPro.Web.HSSE.CostGoods { Model.CostGoods_Expense expense = new Model.CostGoods_Expense { - ProjectId = this.ProjectId, + ProjectId = this.ProjectId, UnitId = this.drpUnit.SelectedValue, - ReportDate = Funs.GetNewDateTime(this.txtReportDate.Text.Trim()), + ReportDate = Funs.GetNewDateTime(this.txtReportDate.Text.Trim()), CompileDate = DateTime.Now, CompileMan = this.CurrUser.PersonId, SortIndex = Funs.GetNewInt(this.lbSortIndex.Text), - Year =Funs.GetNewInt(this.txtYear.Text), + Year = Funs.GetNewInt(this.txtYear.Text), }; - + if (!string.IsNullOrEmpty(this.ExpenseId)) { expense.ExpenseId = this.ExpenseId; BLL.ExpenseService.UpdateExpense(expense); BLL.LogService.AddSys_Log(this.CurrUser, expense.ExpenseCode, expense.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnModify); - // BLL.ExpenseDetailService.DeleteCostDetailByExpenseId(this.ExpenseId); + // BLL.ExpenseDetailService.DeleteCostDetailByExpenseId(this.ExpenseId); } else { @@ -232,7 +230,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { if (this.drpUnit.SelectedValue != Const._Null && !string.IsNullOrEmpty(this.txtYear.Text)) { - SetPage(Funs.DB.CostGoods_Expense.FirstOrDefault(x =>x.ProjectId == this.ProjectId && x.UnitId == this.drpUnit.SelectedValue && x.Year.ToString() == this.txtYear.Text)); + SetPage(Funs.DB.CostGoods_Expense.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == this.drpUnit.SelectedValue && x.Year.ToString() == this.txtYear.Text)); } } #endregion @@ -244,7 +242,7 @@ namespace FineUIPro.Web.HSSE.CostGoods private List jerqueSaveList() { var returnList = Funs.DB.CostGoods_ExpenseDetail.Where(x => x.ExpenseId == this.ExpenseId); - JArray mergedData = Grid1.GetMergedData(); + JArray mergedData = Grid1.GetMergedData(); foreach (JObject mergedRow in mergedData) { string status = mergedRow.Value("status"); @@ -254,7 +252,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { item.CostMoney = Funs.GetNewDecimalOrZero(values.Value("CostMoney")); } - + } return returnList.ToList(); } diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseUnit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseUnit.aspx.cs index 408b14a8..e11e462d 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseUnit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseUnit.aspx.cs @@ -31,7 +31,7 @@ namespace FineUIPro.Web.HSSE.CostGoods InitUnitGrid(); } - protected static List getUnit= new List(); + protected static List getUnit = new List(); protected static List getSUnit = new List(); #region 按年份 @@ -44,7 +44,7 @@ namespace FineUIPro.Web.HSSE.CostGoods bf.DataFormatString = "{0}"; bf.HeaderText = "编号"; bf.Width = 60; - bf.Hidden = true; + bf.Hidden = true; Grid1.Columns.Add(bf); bf = new FineUIPro.BoundField(); @@ -66,28 +66,28 @@ namespace FineUIPro.Web.HSSE.CostGoods this.ProjectId = this.ProjectId ?? this.CurrUser.LoginProjectId; getUnit = (from x in Funs.DB.Project_ProjectUnit - join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId - where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_1 - select y).ToList(); + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_1 + select y).ToList(); foreach (var item in getUnit) { bf = new FineUIPro.BoundField(); bf.DataField = item.UnitId; bf.DataFormatString = "{0}"; - bf.HeaderText = item.UnitName+ "(元)"; + bf.HeaderText = item.UnitName + "(元)"; bf.Width = 200; Grid1.Columns.Add(bf); } getSUnit = (from x in Funs.DB.Project_ProjectUnit - join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId - where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_2 - select y).ToList(); + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_2 + select y).ToList(); foreach (var item in getSUnit) { bf = new FineUIPro.BoundField(); bf.DataField = item.UnitId; bf.DataFormatString = "{0}"; - bf.HeaderText = item.UnitName+ "(元)"; + bf.HeaderText = item.UnitName + "(元)"; bf.Width = 220; Grid1.Columns.Add(bf); } @@ -122,7 +122,7 @@ namespace FineUIPro.Web.HSSE.CostGoods Funs.DropDownPageSize(this.ddlPageSize); ////权限按钮方法 this.GetButtonPower(); - this.btnNew.OnClientClick = Window1.GetShowReference("ExpenseEdit.aspx") + "return false;"; + this.btnNew.OnClientClick = Window1.GetShowReference("ExpenseEdit.aspx") + "return false;"; LoadData(); } } @@ -152,7 +152,7 @@ namespace FineUIPro.Web.HSSE.CostGoods foreach (var item in getUnit) { table.Columns.Add(new DataColumn(item.UnitId, typeof(string))); - } + } foreach (var item in getSUnit) { table.Columns.Add(new DataColumn(item.UnitId, typeof(string))); @@ -179,7 +179,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId - where y.ProjectId == this.ProjectId && (!year.HasValue || y.Year == year) + where y.ProjectId == this.ProjectId && (!year.HasValue || y.Year == year) orderby y.Year, x.SupSortIndex, x.SortIndex select new { x.ExpenseDetailId, x.ExpenseId, y.UnitId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney }; var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct(); @@ -229,12 +229,12 @@ namespace FineUIPro.Web.HSSE.CostGoods } - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) { Response.ClearContent(); string filename = Funs.GetNewFileName(); @@ -242,7 +242,7 @@ namespace FineUIPro.Web.HSSE.CostGoods Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = this.Grid1.RecordCount; - + Response.Write(GetGridTableHtml(this.Grid1)); Response.End(); } @@ -357,7 +357,7 @@ namespace FineUIPro.Web.HSSE.CostGoods var getEx = ExpenseService.GetExpenseById(rowID); if (getEx != null && !string.IsNullOrEmpty(getEx.UnitId)) { - BLL.LogService.AddSys_Log(this.CurrUser, getEx.ExpenseCode, getEx.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnDelete); + BLL.LogService.AddSys_Log(this.CurrUser, getEx.ExpenseCode, getEx.ExpenseId, BLL.Const.ProjectExpenseMenuId, BLL.Const.BtnDelete); BLL.ExpenseService.DeleteExpenseById(rowID); } } @@ -375,7 +375,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) { - this.LoadData(); + this.LoadData(); } #region 获取按钮权限 diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseView.aspx.cs index 562f8a84..58f872b5 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/ExpenseView.aspx.cs @@ -1,6 +1,5 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; namespace FineUIPro.Web.HSSE.CostGoods @@ -58,7 +57,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { this.drpUnit.Readonly = true; } - + SetPage(BLL.ExpenseService.GetExpenseById(this.ExpenseId)); } diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingSave.aspx.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingSave.aspx.cs index ba79d735..a047d648 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingSave.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/TestTrainingSave.aspx.cs @@ -110,7 +110,8 @@ namespace FineUIPro.Web.HSSE.EduTrain if (this.drpMenuType.SelectedValue != Const._Null) { training.MenuType = this.drpMenuType.SelectedValue; - }; + } + ; if (String.IsNullOrEmpty(TrainingId)) { diff --git a/SGGL/FineUIPro.Web/HSSE/Emergency/DrillRecordList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Emergency/DrillRecordList.aspx.cs index 284f6e5c..fbda145b 100644 --- a/SGGL/FineUIPro.Web/HSSE/Emergency/DrillRecordList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Emergency/DrillRecordList.aspx.cs @@ -1,9 +1,9 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using BLL; using System.Text; using AspNet = System.Web.UI.WebControls; diff --git a/SGGL/FineUIPro.Web/HSSE/Emergency/DrillRecordListEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Emergency/DrillRecordListEdit.aspx.cs index dd91a921..a6e20401 100644 --- a/SGGL/FineUIPro.Web/HSSE/Emergency/DrillRecordListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Emergency/DrillRecordListEdit.aspx.cs @@ -109,7 +109,7 @@ namespace FineUIPro.Web.HSSE.Emergency this.ctlAuditFlow.UnitId = this.CurrUser.UnitId; } } - + /// /// 初始化下拉框 /// diff --git a/SGGL/FineUIPro.Web/HSSE/Environmental/EnvironmentalMonitoring.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Environmental/EnvironmentalMonitoring.aspx.cs index 38d1e139..a2fa37bd 100644 --- a/SGGL/FineUIPro.Web/HSSE/Environmental/EnvironmentalMonitoring.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Environmental/EnvironmentalMonitoring.aspx.cs @@ -1,11 +1,7 @@ using BLL; using System; -using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; -using System.Text; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.HSSE.Environmental { @@ -165,7 +161,7 @@ namespace FineUIPro.Web.HSSE.Environmental #endregion protected void btnApiView_Click(object sender, EventArgs e) - { + { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EnvironmentalMonitoringApiView.aspx?Projectid={0}", this.ProjectId, "查看 - "))); } diff --git a/SGGL/FineUIPro.Web/HSSE/Environmental/EnvironmentalMonitoringApiView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Environmental/EnvironmentalMonitoringApiView.aspx.cs index b2d9e7c7..98ea6844 100644 --- a/SGGL/FineUIPro.Web/HSSE/Environmental/EnvironmentalMonitoringApiView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Environmental/EnvironmentalMonitoringApiView.aspx.cs @@ -1,11 +1,6 @@ using BLL; using System; -using System.Collections.Generic; -using System.Data; -using System.Data.OleDb; using System.IO; -using System.Linq; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HSSE.Environmental { @@ -16,12 +11,12 @@ namespace FineUIPro.Web.HSSE.Environmental if (!IsPostBack) { txtUrl.Text = Funs.SGGLApiUrl; - txtProjectid.Text = this.Request.Params["Projectid"]; + txtProjectid.Text = this.Request.Params["Projectid"]; } } protected void imgbtnUpload_Click(object sender, EventArgs e) - { + { string rootPath = Server.MapPath("~/"); string filePath = "File\\Word\\HSSE\\环境监测数据接口.docx"; diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs index 0f451d46..353dc91c 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs @@ -1,15 +1,13 @@ using BLL; using Model; +using NPOI.SS.Util; using System; using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.IO; -using NPOI.SS.Util; +using System.Linq; +using System.Web.UI.WebControls; namespace FineUIPro.Web.HSSE.Hazard { diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskCheckSee.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskCheckSee.aspx.cs index 4698bb12..55f2b4e0 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskCheckSee.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskCheckSee.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Threading.Tasks; namespace FineUIPro.Web.HSSE.Hazard { diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs index 9cc7b61e..8f4fd63b 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs @@ -1,20 +1,17 @@ using BLL; -using Org.BouncyCastle.Crypto; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; namespace FineUIPro.Web.HSSE.Hazard { public partial class ConstructionRiskControlCheck : PageBase { #region 定义变量 - + /// /// 项目主键 /// - + public string ConstructionRiskCheckId { get @@ -37,7 +34,7 @@ namespace FineUIPro.Web.HSSE.Hazard ViewState["ConstructionRiskId"] = value; } } - + #endregion @@ -50,14 +47,14 @@ namespace FineUIPro.Web.HSSE.Hazard protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { string ConstructionRiskCheckId = Request["ConstructionRiskCheckId"]; if (!string.IsNullOrEmpty(ConstructionRiskCheckId)) { - this.ConstructionRiskCheckId = ConstructionRiskCheckId; + this.ConstructionRiskCheckId = ConstructionRiskCheckId; } this.ConstructionRiskId = Request["ConstructionRiskId"]; - var constructionRiskCheck = Funs.DB.HSSE_ConstructionRiskCheck.FirstOrDefault(x=>x.ConstructionRiskCheckId == this.ConstructionRiskCheckId); + var constructionRiskCheck = Funs.DB.HSSE_ConstructionRiskCheck.FirstOrDefault(x => x.ConstructionRiskCheckId == this.ConstructionRiskCheckId); if (constructionRiskCheck != null) { this.ConstructionRiskId = constructionRiskCheck.ConstructionRiskId; @@ -170,7 +167,7 @@ namespace FineUIPro.Web.HSSE.Hazard } else { - var projectUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId,this.CurrUser.UnitId); + var projectUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId); if (projectUnit != null && projectUnit.UnitType == BLL.Const.ProjectUnitType_2) { this.txtRectification.Hidden = false; diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlEdit.aspx.cs index f6323317..d70d4d37 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlEdit.aspx.cs @@ -1,8 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; namespace FineUIPro.Web.HSSE.Hazard { @@ -26,7 +24,7 @@ namespace FineUIPro.Web.HSSE.Hazard /// /// 项目主键 /// - + public string ControlId { get @@ -39,8 +37,8 @@ namespace FineUIPro.Web.HSSE.Hazard } } - - #endregion + + #endregion #region 加载页面 /// @@ -51,31 +49,31 @@ namespace FineUIPro.Web.HSSE.Hazard protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { - + { + this.ConstructionRiskId = Request.Params["ConstructionRiskId"]; this.ControlId = Request.Params["ControlId"]; - - var constructionRiskControl = Funs.DB.HSSE_ConstructionRiskControl.FirstOrDefault(x=>x.ControlId == this.ControlId); + + var constructionRiskControl = Funs.DB.HSSE_ConstructionRiskControl.FirstOrDefault(x => x.ControlId == this.ControlId); if (constructionRiskControl != null) { - + if (!string.IsNullOrEmpty(constructionRiskControl.Measures)) { txtMeasures.Text = constructionRiskControl.Measures; } - - } + + } } } #endregion - - + + #region 保存按钮 /// @@ -99,26 +97,26 @@ namespace FineUIPro.Web.HSSE.Hazard Model.HSSE_ConstructionRiskControl newConstructionRiskControl = new Model.HSSE_ConstructionRiskControl { ConstructionRiskId = this.ConstructionRiskId, - + }; - newConstructionRiskControl.Measures = this.txtMeasures.Text ; - + newConstructionRiskControl.Measures = this.txtMeasures.Text; + if (!string.IsNullOrEmpty(this.ControlId)) { newConstructionRiskControl.ControlId = this.ControlId; - BLL.ConstructionRiskListService.UpdateConstructionRiskControl(newConstructionRiskControl); + BLL.ConstructionRiskListService.UpdateConstructionRiskControl(newConstructionRiskControl); BLL.LogService.AddSys_Log(this.CurrUser, newConstructionRiskControl.ConstructionRiskId, newConstructionRiskControl.ConstructionRiskId, BLL.Const.ProjectEnvironmentalRiskListMenuId, BLL.Const.BtnModify); } else { newConstructionRiskControl.ControlId = SQLHelper.GetNewID(typeof(Model.Hazard_EnvironmentalRiskList)); this.ControlId = newConstructionRiskControl.ControlId; - BLL.ConstructionRiskListService.AddConstructionRiskControl(newConstructionRiskControl); + BLL.ConstructionRiskListService.AddConstructionRiskControl(newConstructionRiskControl); BLL.LogService.AddSys_Log(this.CurrUser, newConstructionRiskControl.ConstructionRiskId, newConstructionRiskControl.ConstructionRiskId, BLL.Const.ProjectEnvironmentalRiskListMenuId, BLL.Const.BtnAdd); } - - } + + } protected void rdCheckResult_SelectedIndexChanged(object sender, EventArgs e) { diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskDataIn.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskDataIn.aspx.cs index edbef445..d5f77316 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskDataIn.aspx.cs @@ -1,6 +1,4 @@ using BLL; -using FineUIPro.Web.SysManage; -using Model; using System; using System.Collections.Generic; using System.Data; @@ -474,7 +472,7 @@ namespace FineUIPro.Web.HSSE.Hazard newConstructionRisk.LicenseDes = licenseDes.Substring(0, licenseDes.Length - 1); } newConstructionRisk.RiskLevel = row8; - newConstructionRisk.States= BLL.Const.ConstructionRisk_Compile; + newConstructionRisk.States = BLL.Const.ConstructionRisk_Compile; Funs.DB.HSSE_ConstructionRisk.InsertOnSubmit(newConstructionRisk); string[] riskControls = row9.Split('|'); int a = 0; diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskMap.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskMap.aspx.cs index c74be662..a5b6bcb7 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskMap.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskMap.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; using System.Web.Services; namespace FineUIPro.Web.ProjectData @@ -100,7 +99,7 @@ namespace FineUIPro.Web.ProjectData riskLevel += item + ","; } //strSql += " and RiskLevel='" + drpRiskLevel.SelectedValue + "' "; - strSql += " and '"+riskLevel+"' like '%'+RiskLevel+'%' "; + strSql += " and '" + riskLevel + "' like '%'+RiskLevel+'%' "; } strSql += " group by b.[MainItemId],b.[Coordinate],b.[MainItemName] "; SqlParameter[] parameter = listStr.ToArray(); diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/LocationSelect.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/LocationSelect.aspx.cs index 2db3d39f..725dd73e 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/LocationSelect.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/LocationSelect.aspx.cs @@ -1,7 +1,6 @@ using BLL; using System; using System.Linq; -using System.Web.Services; namespace FineUIPro.Web.HSSE.Hazard { @@ -24,8 +23,8 @@ namespace FineUIPro.Web.HSSE.Hazard if (!IsPostBack) { ProjectCode = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId); - ConstructionRiskId = Request.Params["ConstructionRiskId"] ; - if (!string.IsNullOrEmpty(Request.Params["type"])) + ConstructionRiskId = Request.Params["ConstructionRiskId"]; + if (!string.IsNullOrEmpty(Request.Params["type"])) { this.btnSave.Hidden = true; } @@ -37,7 +36,7 @@ namespace FineUIPro.Web.HSSE.Hazard } } } - + #region 保存事件 /// @@ -47,17 +46,17 @@ namespace FineUIPro.Web.HSSE.Hazard /// protected void btnSave_Click(object sender, EventArgs e) { - var risk = Funs.DB.HSSE_ConstructionRisk.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId); + var risk = Funs.DB.HSSE_ConstructionRisk.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId); if (risk != null) { - risk.Coordinate=txtLoc.Text.Trim(); + risk.Coordinate = txtLoc.Text.Trim(); Funs.DB.SubmitChanges(); } PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(txtLoc.Text.Trim()) + ActiveWindow.GetHidePostBackReference()); } #endregion - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ShowWBS.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ShowWBS.aspx.cs index c847e6ae..2f4fa14a 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ShowWBS.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ShowWBS.aspx.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; using System.Linq; using System.Web.UI.WebControls; using AspNet = System.Web.UI.WebControls; diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs index 6189dfd8..6a63a1fb 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs @@ -1,8 +1,6 @@ using BLL; using System; using System.Collections.Generic; -using System.Data; -using System.Data.SqlClient; using System.Linq; using System.Text; using AspNet = System.Web.UI.WebControls; @@ -131,7 +129,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection var getData = HSSE_Hazard_HazardRegisterService.getListData(this.CurrUser.LoginProjectId, this.txtCheckMan.Text.Trim(), this.txtType.Text.Trim(), this.txtWorkAreaName.Text.Trim(), - this.txtResponsibilityUnitName.Text.Trim(),Funs.GetNewDateTime(txtStartTime.Text.Trim()),Funs.GetNewDateTime(this.txtEndTime.Text.Trim()), Funs.GetNewDateTime(this.txtStartRectificationTime.Text.Trim()), Funs.GetNewDateTime(this.txtEndRectificationTime.Text.Trim()), + this.txtResponsibilityUnitName.Text.Trim(), Funs.GetNewDateTime(txtStartTime.Text.Trim()), Funs.GetNewDateTime(this.txtEndTime.Text.Trim()), Funs.GetNewDateTime(this.txtStartRectificationTime.Text.Trim()), Funs.GetNewDateTime(this.txtEndRectificationTime.Text.Trim()), this.drpStates.SelectedValue, this.CurrUser.PersonId, this.CurrUser.UnitId, Grid1); Grid1.RecordCount = HSSE_Hazard_HazardRegisterService.count; Grid1.DataSource = getData; diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx.cs index 4f4a65d2..f2f6ef6f 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx.cs @@ -152,7 +152,7 @@ namespace FineUIPro.Web.HSSE.InformationProject where x.StandardName != null && z.ProjectId == this.CurrUser.LoginProjectId select new Model.View_InformationProject_ConstructionStandardSelectedItem { - ConstructionStandardSelectedItemId =y.ConstructionStandardSelectedItemId, + ConstructionStandardSelectedItemId = y.ConstructionStandardSelectedItemId, ConstructionStandardIdentifyId = y.ConstructionStandardIdentifyId, ProjectId = this.CurrUser.LoginProjectId, StandardId = x.StandardId, @@ -192,7 +192,7 @@ namespace FineUIPro.Web.HSSE.InformationProject where x.ConstructionStandardIdentifyId == this.ConstructionStandardIdentifyId select x; } - + if (!string.IsNullOrEmpty(this.txtStandardGrade.Text.Trim())) { q = q.Where(e => e.StandardGrade.Contains(this.txtStandardGrade.Text.Trim())); diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReport.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReport.aspx.cs index 28d602cb..d56deb02 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReport.aspx.cs @@ -254,4 +254,4 @@ namespace FineUIPro.Web.HSSE.InformationProject } #endregion } - } \ No newline at end of file +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.cs index d1996dfb..52371013 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.cs @@ -1,10 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.HSSE.InformationProject { diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReport.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReport.aspx.cs index 1823238f..d486bf72 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReport.aspx.cs @@ -44,7 +44,7 @@ namespace FineUIPro.Web.InformationProject } ////权限按钮方法 - this.GetButtonPower(); + this.GetButtonPower(); BLL.ConstValue.InitConstValueDropDownList(this.drpYear, BLL.ConstValue.Group_0008, true); BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, BLL.ConstValue.Group_0009, true); @@ -111,7 +111,7 @@ namespace FineUIPro.Web.InformationProject List listStr = new List(); strSql += " AND MillionsMonthlyReport.ProjectId = '" + this.ProjectId + "'"; if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值 - { + { strSql += " AND MillionsMonthlyReport.States = @States"; ///状态为已完成 listStr.Add(new SqlParameter("@States", BLL.Const.State_2)); } @@ -120,7 +120,7 @@ namespace FineUIPro.Web.InformationProject strSql += " AND MillionsMonthlyReport.Year = @Year"; listStr.Add(new SqlParameter("@Year", Funs.GetNewInt(this.drpYear.SelectedValue))); } - if (this.drpMonth.SelectedValue!=BLL.Const._Null) + if (this.drpMonth.SelectedValue != BLL.Const._Null) { strSql += " AND MillionsMonthlyReport.Month = @Month "; listStr.Add(new SqlParameter("@Month", Funs.GetNewInt(this.drpMonth.SelectedValue))); diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReportEdit.aspx.cs index 1ac99667..1a2d3a9e 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReportEdit.aspx.cs @@ -1,10 +1,7 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.InformationProject { @@ -63,7 +60,7 @@ namespace FineUIPro.Web.InformationProject BLL.ConstValue.InitConstValueDropDownList(this.drpYear, BLL.ConstValue.Group_0008, true); BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, BLL.ConstValue.Group_0009, true); - BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.ProjectId,"", true); + BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.ProjectId, "", true); this.MillionsMonthlyReportId = Request.Params["MillionsMonthlyReportId"]; if (!string.IsNullOrEmpty(this.MillionsMonthlyReportId)) @@ -72,7 +69,7 @@ namespace FineUIPro.Web.InformationProject if (millionsMonthlyReport != null) { this.ProjectId = millionsMonthlyReport.ProjectId; - BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.ProjectId,"", true); + BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.ProjectId, "", true); if (millionsMonthlyReport.Year != null) { this.drpYear.SelectedValue = Convert.ToString(millionsMonthlyReport.Year); @@ -353,7 +350,7 @@ namespace FineUIPro.Web.InformationProject if (flowOperate != null) { millionsMonthlyReport.States = BLL.Const.State_2; - } + } else { millionsMonthlyReport.States = this.ctlAuditFlow.NextStep; @@ -381,7 +378,7 @@ namespace FineUIPro.Web.InformationProject millionsMonthlyReport.MedicalTreatmentLossHour = Funs.GetNewInt(this.txtMedicalTreatmentLossHour.Text.Trim()); millionsMonthlyReport.FireNum = Funs.GetNewInt(this.txtFireNum.Text.Trim()); millionsMonthlyReport.EnvironmenNum = Funs.GetNewInt(this.txtEnvironmenNum.Text.Trim()); - millionsMonthlyReport.TrafficNum = Funs.GetNewInt(this.txtTrafficNum.Text.Trim()); + millionsMonthlyReport.TrafficNum = Funs.GetNewInt(this.txtTrafficNum.Text.Trim()); millionsMonthlyReport.EquipmentNum = Funs.GetNewInt(this.txtEquipmentNum.Text.Trim()); millionsMonthlyReport.QualityNum = Funs.GetNewInt(this.txtQualityNum.Text.Trim()); millionsMonthlyReport.OtherNum = Funs.GetNewInt(this.txtOtherNum.Text.Trim()); @@ -409,7 +406,7 @@ namespace FineUIPro.Web.InformationProject millionsMonthlyReport.MillionsMonthlyReportId = this.MillionsMonthlyReportId; BLL.ProjectMillionsMonthlyReportService.UpdateMillionsMonthlyReport(millionsMonthlyReport); BLL.LogService.AddSys_Log(this.CurrUser, millionsMonthlyReport.Year.ToString() + "-" + millionsMonthlyReport.Month.ToString(), millionsMonthlyReport.MillionsMonthlyReportId, BLL.Const.ProjectMillionsMonthlyReportMenuId, BLL.Const.BtnModify); - + } else { diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReportView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReportView.aspx.cs index d72fce22..4270b0ab 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReportView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReportView.aspx.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.InformationProject { @@ -68,7 +63,7 @@ namespace FineUIPro.Web.InformationProject if (millionsMonthlyReport.Year != null) { var constValue = BLL.ConstValue.GetConstByConstValueAndGroupId(millionsMonthlyReport.Year.ToString(), BLL.ConstValue.Group_0008); - if (constValue!=null) + if (constValue != null) { this.txtYear.Text = constValue.ConstText; } @@ -122,7 +117,7 @@ namespace FineUIPro.Web.InformationProject if (millionsMonthlyReport.MinorAccidentLossHour != null) { this.txtMinorAccidentLossHour.Text = Convert.ToString(millionsMonthlyReport.MinorAccidentLossHour); - } + } if (millionsMonthlyReport.DeathAccidentNum != null) { this.txtDeathAccidentNum.Text = Convert.ToString(millionsMonthlyReport.DeathAccidentNum); @@ -131,7 +126,7 @@ namespace FineUIPro.Web.InformationProject { this.txtDeathAccidentPersonNum.Text = Convert.ToString(millionsMonthlyReport.DeathAccidentPersonNum); } - if (millionsMonthlyReport.DeathAccidentLossHour!= null) + if (millionsMonthlyReport.DeathAccidentLossHour != null) { this.txtDeathAccidentLossHour.Text = Convert.ToString(millionsMonthlyReport.DeathAccidentLossHour); } @@ -254,7 +249,7 @@ namespace FineUIPro.Web.InformationProject if (!string.IsNullOrEmpty(millionsMonthlyReport.CompileMan)) { var user = BLL.Person_PersonsService.GetPerson_PersonsById(millionsMonthlyReport.CompileMan); - if (user!=null) + if (user != null) { this.txtCompileManName.Text = user.PersonName; } diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/WorkSummaryReport.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/WorkSummaryReport.aspx.cs index 07b08f45..75c63fe2 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/WorkSummaryReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/WorkSummaryReport.aspx.cs @@ -192,7 +192,7 @@ namespace FineUIPro.Web.HSSE.InformationProject //} //else //{ - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WorkSummaryReportEdit.aspx?workSummaryReportId={0}", id, "编辑 - "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WorkSummaryReportEdit.aspx?workSummaryReportId={0}", id, "编辑 - "))); //} } } diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/WorkSummaryReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/WorkSummaryReportEdit.aspx.cs index e72da3e4..b1f215c2 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/WorkSummaryReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/WorkSummaryReportEdit.aspx.cs @@ -183,15 +183,15 @@ namespace FineUIPro.Web.HSSE.InformationProject else { Model.InformationProject_WorkSummaryReport oldReport = (from x in Funs.DB.InformationProject_WorkSummaryReport - where x.ProjectId == report.ProjectId && x.YearId == report.YearId - select x).FirstOrDefault(); + where x.ProjectId == report.ProjectId && x.YearId == report.YearId + select x).FirstOrDefault(); if (oldReport == null) { this.WorkSummaryReportId = SQLHelper.GetNewID(typeof(Model.InformationProject_WorkSummaryReport)); report.WorkSummaryReportId = this.WorkSummaryReportId; BLL.ProjectWorkSummaryReportService.AddWorkSummaryReport(report); BLL.LogService.AddSys_Log(this.CurrUser, report.YearId.ToString(), report.WorkSummaryReportId, BLL.Const.ProjectWorkSummaryReportMenuId, BLL.Const.BtnAdd); - + } else { diff --git a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDin.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDin.aspx.cs index 4298f4d5..a52c05d8 100644 --- a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDin.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDin.aspx.cs @@ -215,7 +215,7 @@ namespace FineUIPro.Web.HSSE.Manager return; } - var getNMonthReport = Funs.DB.SeDin_MonthReport.FirstOrDefault(x =>x.ProjectId == this.CurrUser.LoginProjectId && x.States != Const.State_3); + var getNMonthReport = Funs.DB.SeDin_MonthReport.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.States != Const.State_3); if (getNMonthReport != null) { Alert.ShowInTop("存在未完成月报,请先办理完成!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDinEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDinEdit.aspx.cs index d64de810..2d03c800 100644 --- a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDinEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDinEdit.aspx.cs @@ -146,7 +146,7 @@ namespace FineUIPro.Web.HSSE.Manager SetStep(); if (string.IsNullOrEmpty(this.MonthReportId)) { - ReporMonth.Text= Request.Params["Month"]; + ReporMonth.Text = Request.Params["Month"]; } } } @@ -1446,12 +1446,14 @@ namespace FineUIPro.Web.HSSE.Manager protected void MonthWorkTime_Blur(object sender, EventArgs e) { var monthWorkTimeValue = Funs.GetNewDecimalOrZero(this.MonthWorkTime.Text); - decimal hdYearWorkTimeValue =0; - decimal hdSafeWorkTimeValue =0; - DateTime month=Funs.GetNewDateTimeOrNow(this.ReporMonth.Text); + decimal hdYearWorkTimeValue = 0; + decimal hdSafeWorkTimeValue = 0; + DateTime month = Funs.GetNewDateTimeOrNow(this.ReporMonth.Text); - var getMaxMonthReport = (from x in Funs.DB.SeDin_MonthReport where x.ProjectId == this.ProjectId && x.ReporMonth < month - orderby x.ReporMonth descending select x).FirstOrDefault(); + var getMaxMonthReport = (from x in Funs.DB.SeDin_MonthReport + where x.ProjectId == this.ProjectId && x.ReporMonth < month + orderby x.ReporMonth descending + select x).FirstOrDefault(); if (getMaxMonthReport != null) { var getMonthReport2 = Funs.DB.SeDin_MonthReport2.FirstOrDefault(x => x.MonthReportId == getMaxMonthReport.MonthReportId); diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.cs index 0518fb4e..b9c09dcd 100644 --- a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.cs @@ -51,7 +51,7 @@ namespace FineUIPro.Web.HSSE.Meeting this.drpUnitId.Enabled = false; } this.btnNew.OnClientClick = Window1.GetShowReference("SafetyLeaderGroupMeetingEdit.aspx") + "return false;"; - + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); @@ -230,7 +230,7 @@ namespace FineUIPro.Web.HSSE.Meeting BLL.LogService.AddSys_Log(this.CurrUser, meet.SafetyLeaderGroupMeetingCode, meet.SafetyLeaderGroupMeetingId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId, BLL.Const.BtnDelete); BLL.SafetyLeaderGroupMeetingService.DeleteSafetyLeaderGroupMeetingById(rowID); - + } } this.BindGrid(); diff --git a/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExamination.aspx.cs b/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExamination.aspx.cs index 7c576e32..057db5ca 100644 --- a/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExamination.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExamination.aspx.cs @@ -145,7 +145,7 @@ namespace FineUIPro.Web.HSSE.OccupationHealth } var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, menuId); if (buttonList.Count() > 0) - { + { if (buttonList.Contains(BLL.Const.BtnModify)) { this.btnMenuEdit.Hidden = false; diff --git a/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs index 93f7c868..b2ea9278 100644 --- a/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs @@ -45,9 +45,9 @@ namespace FineUIPro.Web.HSSE.OccupationHealth if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - - this.SitePersonId = Request.Params["SitePersonId"]; - var getPerson= SitePerson_PersonService.GetSitePersonById(this.SitePersonId); + + this.SitePersonId = Request.Params["SitePersonId"]; + var getPerson = SitePerson_PersonService.GetSitePersonById(this.SitePersonId); if (getPerson != null) { this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(getPerson.ProjectId); diff --git a/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQuality.aspx.cs b/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQuality.aspx.cs index e5e56625..9b725f45 100644 --- a/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQuality.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQuality.aspx.cs @@ -82,7 +82,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit strSql += " AND Person.UnitId = @UnitId"; listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim())); } - if (this.drpPersonStates.SelectedValue != Const._Null && !string.IsNullOrEmpty( this.drpPersonStates.SelectedValue)) + if (this.drpPersonStates.SelectedValue != Const._Null && !string.IsNullOrEmpty(this.drpPersonStates.SelectedValue)) { strSql += " AND Person.States =@States "; listStr.Add(new SqlParameter("@States", this.drpPersonStates.SelectedValue)); diff --git a/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQualityEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQualityEdit.aspx.cs index dd807330..3d60d9f4 100644 --- a/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQualityEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/QualityAudit/PersonQualityEdit.aspx.cs @@ -72,7 +72,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit var getData = BLL.PersonQualityService.GetDataById(this.PersonQualityId); if (getData != null) { - this.PersonId = getData.PersonId; + this.PersonId = getData.PersonId; this.txtCertificateNo.Text = getData.CertificateNo; this.drpCertificate.SelectedValue = getData.CertificateId; this.txtGrade.Text = getData.Grade; @@ -113,7 +113,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit this.txtWorkPostName.Text = workPost.WorkPostName; } } - + if (Request.Params["value"] == "0") { this.btnSave.Hidden = true; diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs index 785a5f03..5009dbfc 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs @@ -1,9 +1,6 @@ using BLL; -using FineUIPro.Web.DataShow; -using Model; using System; using System.Linq; -using System.Runtime.InteropServices.ComTypes; using System.Text; using AspNet = System.Web.UI.WebControls; diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs index b8220184..be2a08ef 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs @@ -270,7 +270,7 @@ Where ProjectId=@ProjectId "; var tCount = Grid1.Rows[i].Values[8].ToString(); var tCount1 = Grid1.Rows[i].Values[9].ToString(); - if (tCount == "0" && tCount1 == "0") ////未参加过培训的人员 + if (tCount == "0" && tCount1 == "0") ////未参加过培训的人员 { Grid1.Rows[i].RowCssClass = "Red"; } @@ -734,8 +734,8 @@ Where ProjectId=@ProjectId "; protected void btnRefresh_Click(object sender, EventArgs e) { - int count = GetDataService.SendCarNo(this.ProjectId); - Alert.ShowInTop("刷新完成"+ count.ToString()+"条。", MessageBoxIcon.Success); + int count = GetDataService.SendCarNo(this.ProjectId); + Alert.ShowInTop("刷新完成" + count.ToString() + "条。", MessageBoxIcon.Success); } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs index a5437129..9ebf49a2 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs @@ -57,7 +57,7 @@ namespace FineUIPro.Web.HSSE.SitePerson , this.txtPersonName.Text.Trim(), this.txtIdcard.Text.Trim(), Funs.GetNewDateTimeOrNow(this.txtStartDate.Text), Grid1); Grid1.RecordCount = SitePerson_PersonService.nowCount; Grid1.DataSource = getData; - Grid1.DataBind(); + Grid1.DataBind(); } #region 查询 @@ -114,7 +114,7 @@ namespace FineUIPro.Web.HSSE.SitePerson /// protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) { - + } /// @@ -124,7 +124,7 @@ namespace FineUIPro.Web.HSSE.SitePerson /// protected void btnMenuEdit_Click(object sender, EventArgs e) { - + } #endregion diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/WorkPostStatistic.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/WorkPostStatistic.aspx.cs index 0837d504..d5b8ba91 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/WorkPostStatistic.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/WorkPostStatistic.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using NPOI.Util; using System; using System.Collections.Generic; using System.Data; diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx.cs index ab5aa913..614915dd 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx.cs @@ -51,7 +51,7 @@ namespace FineUIPro.Web.HSSE.Solution //单位工程 BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkId, this.CurrUser.LoginProjectId, true); //分部分项 - BLL.SpecialSchemeTypeService.InitSpecialSchemeTypeDropDownList(this.drpWorkPackageId, true); + BLL.SpecialSchemeTypeService.InitSpecialSchemeTypeDropDownList(this.drpWorkPackageId, true); //是否需要专家论证 BLL.ConstValue.InitConstValueRadioButtonList(this.rblIsArgument, ConstValue.Group_0001, "False"); //作业状态 @@ -93,7 +93,7 @@ namespace FineUIPro.Web.HSSE.Solution { this.rbWorkStates.SelectedValue = getItem.WorkStates; } - this.drpUnitId.SelectedValue = getItem.UnitId; + this.drpUnitId.SelectedValue = getItem.UnitId; } else { diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs index bc2bd427..979864b9 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs @@ -1,6 +1,5 @@ using BLL; using System; -using System.Linq; using System.Web; namespace FineUIPro.Web.HSSE.Solution diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/RectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Technique/RectifyEdit.aspx.cs index 6474aad4..49d055a8 100644 --- a/SGGL/FineUIPro.Web/HSSE/Technique/RectifyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Technique/RectifyEdit.aspx.cs @@ -106,7 +106,7 @@ namespace FineUIPro.Web.HSSE.Technique rectify.SupRectifyId = this.SupRectifyId; rectify.RectifyId = SQLHelper.GetNewID(typeof(Model.Technique_Rectify)); BLL.RectifyService.AddRectify(rectify); - + BLL.LogService.AddSys_Log(this.CurrUser, rectify.RectifyName, rectify.RectifyId, BLL.Const.RectifyMenuId, Const.BtnAdd); } else @@ -118,7 +118,7 @@ namespace FineUIPro.Web.HSSE.Technique } rectify.RectifyId = this.RectifyId; BLL.RectifyService.UpdateRectify(rectify); - + BLL.LogService.AddSys_Log(this.CurrUser, rectify.RectifyName, rectify.RectifyId, BLL.Const.RectifyMenuId, Const.BtnModify); } PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs index 96945ffc..0551ac1a 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs @@ -1,11 +1,9 @@ using BLL; using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; -using System.Web.UI.WebControls; namespace FineUIPro.Web.JDGL.Check { diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs index df5b6f62..7d2b3b35 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs @@ -1,7 +1,6 @@ using BLL; using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; @@ -47,7 +46,7 @@ namespace FineUIPro.Web.OfficeCheck.Check { this.drpSubjectProject.SelectedValue = checkInfo.SubjectProjectId; this.txtCheckLeader.Text = Person_PersonsService.GetPersonsNameById(checkInfo.CheckTeamLeader); - this. txtSubjectUnitMan.Text= Person_PersonsService.GetPersonsNameById(checkInfo.SubjectUnitMan); + this.txtSubjectUnitMan.Text = Person_PersonsService.GetPersonsNameById(checkInfo.SubjectUnitMan); } this.txtCheckMan.Text = this.CurrUser.PersonName; this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); @@ -177,7 +176,7 @@ namespace FineUIPro.Web.OfficeCheck.Check { JObject values = teamGroupRow.Value("values"); bool isSelect = Convert.ToBoolean(values.Value("IsSelect")); if (isSelect) - { + { var taleItem = Funs.DB.ProjectSupervision_Check1.FirstOrDefault(x => x.ID == values.Value("ID")); if (taleItem != null) { diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx.cs index 2df5955d..a7edc243 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx.cs @@ -1,9 +1,7 @@ using BLL; -using FineUIPro.Web.HSSE.Check; using System; using System.Collections.Generic; using System.Linq; -using System.Security.Policy; using System.Web.UI.WebControls; namespace FineUIPro.Web.OfficeCheck.Check @@ -153,7 +151,7 @@ namespace FineUIPro.Web.OfficeCheck.Check /// /// protected void btnEdit_Click(object sender, EventArgs e) - { + { string window = String.Format("CheckNoticeEdit.aspx?CheckNoticeId={0}", this.CheckNoticeId, "编辑 - "); PageContext.RegisterStartupScript(Window1.GetShowReference(window)); } @@ -196,7 +194,7 @@ namespace FineUIPro.Web.OfficeCheck.Check this.txtCheckStartTime.Text = string.Empty; this.txtCheckEndTime.Text = string.Empty; this.txtCompileMan.Text = string.Empty; - this.txtCompileDate.Text = string.Empty; + this.txtCompileDate.Text = string.Empty; this.lblResult.Text = string.Empty; this.lblCheckReportResult.Text = string.Empty; this.lblCheckResult.Text = string.Empty; @@ -385,7 +383,7 @@ namespace FineUIPro.Web.OfficeCheck.Check var getRectify = ProjectSupervision_RectifyService.GetRectifyByCheckNoticeId(this.CheckNoticeId); if (getRectify != null && getRectify.States != "0" && !string.IsNullOrEmpty(getRectify.States)) { - window = String.Format("RectifyEdit.aspx?CheckNoticeId={0}&type=1", this.CheckNoticeId, "编辑 - "); + window = String.Format("RectifyEdit.aspx?CheckNoticeId={0}&type=1", this.CheckNoticeId, "编辑 - "); } PageContext.RegisterStartupScript(Window2.GetShowReference(window)); diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckNoticeEdit.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckNoticeEdit.aspx.cs index 7f688b35..c35ddbac 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckNoticeEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckNoticeEdit.aspx.cs @@ -33,7 +33,7 @@ namespace FineUIPro.Web.OfficeCheck.Check { if (!IsPostBack) { - this.GetButtonPower(); + this.GetButtonPower(); BLL.UnitService.InitSeDinAndCNCECUnitDropDownList(this.drpUnit, false); BLL.DepartService.InitDepartDropDownList(this.drpDepart, true); this.drpDepart.SelectedValue = Const.Depart_constructionId; @@ -59,7 +59,7 @@ namespace FineUIPro.Web.OfficeCheck.Check this.drpCheckTeamLeader.SelectedValue = checkNotice.SubjectUnitMan; this.txtSubjectUnitAdd.Text = checkNotice.SubjectUnitAdd; this.txtSubjectUnitTel.Text = checkNotice.SubjectUnitTel; - + this.drpSex.SelectedValue = checkNotice.SexName; this.hdUserId.Text = checkNotice.CheckTeamLeader; } @@ -86,7 +86,7 @@ namespace FineUIPro.Web.OfficeCheck.Check ShowNotify("请先填写检查组长!", MessageBoxIcon.Warning); return; } - Model.ProjectSupervision_CheckNotice newCheckNotice = new Model.ProjectSupervision_CheckNotice(); + Model.ProjectSupervision_CheckNotice newCheckNotice = new Model.ProjectSupervision_CheckNotice(); newCheckNotice.SubjectUnitAdd = this.txtSubjectUnitAdd.Text.Trim(); if (this.drpSubjectUnitMan.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpSubjectUnitMan.SelectedValue)) { @@ -148,7 +148,7 @@ namespace FineUIPro.Web.OfficeCheck.Check var units = BLL.ProjectService.GetProjectByProjectId(this.drpSubjectProject.SelectedValue); if (units != null) { - this.txtSubjectUnitAdd.Text = units.ProjectAddress; + this.txtSubjectUnitAdd.Text = units.ProjectAddress; } SitePerson_PersonService.InitSitePersonDropDownList(this.drpSubjectUnitMan, this.drpSubjectProject.SelectedValue, Const.UnitId_SEDIN, null, null, true); } @@ -209,7 +209,7 @@ namespace FineUIPro.Web.OfficeCheck.Check { this.txtSubjectUnitTel.Text = getperson.Telephone; } - } + } } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckReport.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckReport.aspx.cs index a30949f5..06e704ba 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckReport.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckReport.aspx.cs @@ -53,7 +53,7 @@ namespace FineUIPro.Web.OfficeCheck.Check } this.CheckNoticeId = Request.Params["CheckNoticeId"]; if (!string.IsNullOrEmpty(this.CheckNoticeId)) - { + { var checkReport = BLL.CheckReportService.GetCheckReportByCheckNoticeId(this.CheckNoticeId); if (checkReport != null) { @@ -63,7 +63,7 @@ namespace FineUIPro.Web.OfficeCheck.Check this.txtValues3.Text = checkReport.BasicInfo; //this.txtValues4.Text = checkReport.ConformItem; this.txtValues6.Text = checkReport.Opinion; - this.txtValues7.Text = checkReport.CheckResult; + this.txtValues7.Text = checkReport.CheckResult; } this.BindGrid2(); this.BindGrid(); @@ -133,8 +133,8 @@ namespace FineUIPro.Web.OfficeCheck.Check where IsSelect=1 and DeletScore >0 and CheckNoticeId =@CheckNoticeId"; listStr.Add(new SqlParameter("@CheckNoticeId", this.CheckNoticeId)); - } - + } + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); var table = this.GetPagedDataTable(Grid2, tb); diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckTeamEdit.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckTeamEdit.aspx.cs index ca7a7ce2..6415d827 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckTeamEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckTeamEdit.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.BaseInfo; using System; namespace FineUIPro.Web.OfficeCheck.Check @@ -167,7 +166,7 @@ namespace FineUIPro.Web.OfficeCheck.Check if (!string.IsNullOrEmpty(sysUser.UnitId)) { this.drpUnit.SelectedValue = sysUser.UnitId; - this.drpUnit.Enabled = false; + this.drpUnit.Enabled = false; } this.drpSex.SelectedValue = sysUser.Sex == "0" ? "女" : "男"; diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs index c002679f..76d39512 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/RectifyEdit.aspx.cs @@ -43,7 +43,7 @@ namespace FineUIPro.Web.OfficeCheck.Check protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { string type = Request.Params["type"]; if (type == "1") { @@ -77,7 +77,7 @@ namespace FineUIPro.Web.OfficeCheck.Check if (!string.IsNullOrEmpty(getRectify.SignPerson)) { this.drpSignPerson.SelectedValue = getRectify.SignPerson; - } + } if (getRectify.States == Const.State_1 || getRectify.States == Const.State_2) { this.btnSure.Hidden = false; @@ -103,11 +103,11 @@ namespace FineUIPro.Web.OfficeCheck.Check this.txtCheckPerson.Text += item.UserName + "、"; } - string perfix = DateTime.Now.Year.ToString()+ DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + "-"; + string perfix = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + "-"; this.txtRectifyNoticesCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode3", "dbo.ProjectSupervision_Rectify", "RectifyCode", perfix); } - this.txtCheckedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.txtCheckedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); } BindGrid(); rectifyItemLists.Clear(); @@ -131,7 +131,7 @@ namespace FineUIPro.Web.OfficeCheck.Check public void BindGrid() { string strSql = string.Empty; - List listStr = new List(); + List listStr = new List(); if (Funs.DB.ProjectSupervision_RectifyItem.FirstOrDefault(x => x.RectifyId == this.hdRectifyNoticesId.Text) != null) { strSql = @"select RectifyItemId,WrongContent,Requirement,LimitTime,RectifyResults,IsRectify,HiddenHazardType @@ -186,8 +186,8 @@ namespace FineUIPro.Web.OfficeCheck.Check string requirement = values.Value("Requirement"); string rectifyResults = values.Value("RectifyResults"); TextBox txtlimitTim = (TextBox)Grid1.Rows[i].FindControl("txtLimitTimes"); - - + + var item = new ProjectSupervision_RectifyItem(); item.RectifyItemId = rectifyNoticesItemId; item.RectifyId = hdRectifyNoticesId.Text.Trim(); @@ -196,8 +196,8 @@ namespace FineUIPro.Web.OfficeCheck.Check item.LimitTime = Funs.GetNewDateTime(txtlimitTim.Text); item.RectifyResults = rectifyResults; DropDownList drpIsRect = (DropDownList)Grid1.Rows[i].FindControl("drpIsRectify"); - item.IsRectify =Convert.ToBoolean( drpIsRect.SelectedValue); - DropDownList drpHiddenHazardType = (DropDownList)Grid1.Rows[i].FindControl("drpHiddenHazardTypeify"); + item.IsRectify = Convert.ToBoolean(drpIsRect.SelectedValue); + DropDownList drpHiddenHazardType = (DropDownList)Grid1.Rows[i].FindControl("drpHiddenHazardTypeify"); item.HiddenHazardType = drpHiddenHazardType.SelectedValue; rectifyItemLists.Add(item); } @@ -267,7 +267,7 @@ namespace FineUIPro.Web.OfficeCheck.Check } else { - string checkReportItemId= Grid1.Rows[e.RowIndex].Values[12].ToString(); + string checkReportItemId = Grid1.Rows[e.RowIndex].Values[12].ToString(); PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Rectify&menuId={1}&type=0&strParam=1", checkReportItemId, BLL.Const.CheckInfoMenuId))); } } diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormation.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormation.aspx.cs index 32d34fae..3f00d27b 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormation.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormation.aspx.cs @@ -1,10 +1,8 @@ -using Aspose.Words; -using BLL; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; using System.Linq; namespace FineUIPro.Web.PHTGL.BiddingManagement @@ -397,7 +395,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement } string Id = Grid1.SelectedRowID; - BLL.PHTGL_ActionPlanFormationService.PrintFile( Id); + BLL.PHTGL_ActionPlanFormationService.PrintFile(Id); } #endregion diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReview.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReview.aspx.cs index 90d9d271..78867fbd 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReview.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReview.aspx.cs @@ -437,7 +437,7 @@ string ActionPlanID = Act.ActionPlanID; //ActionPlanFormation actionPlanFormation = new ActionPlanFormation(); //actionPlanFormation.Print(ActionPlanID); - BLL.PHTGL_ActionPlanFormationService.PrintFile( ActionPlanID); + BLL.PHTGL_ActionPlanFormationService.PrintFile(ActionPlanID); } #endregion diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs index a62e29e1..b93a7572 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs @@ -1,9 +1,9 @@ using BLL; +using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs index 01b3878a..c8dd8055 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs @@ -1,9 +1,9 @@ using BLL; +using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx.cs index ff2edc46..a76fe851 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx.cs @@ -1,10 +1,8 @@ -using Aspose.Words; -using BLL; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; using System.Linq; namespace FineUIPro.Web.PHTGL.BiddingManagement @@ -350,7 +348,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement { if (buttonList.Contains(Const.BtnAdd)) { - btnNew.Hidden = false; + btnNew.Hidden = false; } if (buttonList.Contains(Const.BtnModify)) { @@ -469,7 +467,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement return; } string Id = Grid1.SelectedRowID; - BLL.PHTGL_BidApproveUserReviewService.PrintFile( Id); + BLL.PHTGL_BidApproveUserReviewService.PrintFile(Id); } #endregion } diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs index 44f1eeb7..4ce3f39f 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs @@ -1,9 +1,9 @@ using BLL; +using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { @@ -242,14 +242,14 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement } else { - /* Model.PHTGL_SetSubReview _SetSubReview = new Model.PHTGL_SetSubReview(); - _SetSubReview.SetSubReviewID = SQLHelper.GetNewID(typeof(Model.PHTGL_SetSubReview)); - var BidUser = BLL.PHTGL_BidApproveUserReviewService.GetPHTGL_BidApproveUserReviewById(ApproveUserReviewID); - _SetSubReview.ApproveUserReviewID = ApproveUserReviewID; - _SetSubReview.ActionPlanID = BidUser.ActionPlanID; - _SetSubReview.State = Const.ContractCreating; - _SetSubReview.Type = 0; - PHTGL_SetSubReviewService.AddPHTGL_SetSubReview(_SetSubReview);*/ + /* Model.PHTGL_SetSubReview _SetSubReview = new Model.PHTGL_SetSubReview(); + _SetSubReview.SetSubReviewID = SQLHelper.GetNewID(typeof(Model.PHTGL_SetSubReview)); + var BidUser = BLL.PHTGL_BidApproveUserReviewService.GetPHTGL_BidApproveUserReviewById(ApproveUserReviewID); + _SetSubReview.ApproveUserReviewID = ApproveUserReviewID; + _SetSubReview.ActionPlanID = BidUser.ActionPlanID; + _SetSubReview.State = Const.ContractCreating; + _SetSubReview.Type = 0; + PHTGL_SetSubReviewService.AddPHTGL_SetSubReview(_SetSubReview);*/ ChangeState(Const.ContractReview_Complete); } diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs index 919f0ea5..1fa93c9c 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs @@ -1,11 +1,10 @@ using BLL; +using Model; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Web.DynamicData; -using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { @@ -43,7 +42,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); ApproveUserReviewID = Request.Params["ApproveUserReviewID"]; BLL.DepartService.InitDepartDropDownList(DropDepart, true); - BLL.PHTGL_BidDocumentsReviewService.InitGetBidCompleteDropDownList(drpBidDocumentCode,this.CurrUser.LoginProjectId, true); + BLL.PHTGL_BidDocumentsReviewService.InitGetBidCompleteDropDownList(drpBidDocumentCode, this.CurrUser.LoginProjectId, true); Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropUser, null, Const.UnitId_SEDIN, null, false); ///绑定施工管理部正副主任 @@ -154,12 +153,12 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { - var bid=PHTGL_BidDocumentsReviewService.GetPHTGL_BidDocumentsReviewById(drpBidDocumentCode.SelectedValue); - if (bid!= null) + var bid = PHTGL_BidDocumentsReviewService.GetPHTGL_BidDocumentsReviewById(drpBidDocumentCode.SelectedValue); + if (bid != null) { txtProjectName.Text = PHTGL_ActionPlanFormationService.GetPHTGL_ActionPlanFormationById(bid.ActionPlanID).ProjectShortName; - txtBidProject.Text = bid.BidDocumentsName ; - } + txtBidProject.Text = bid.BidDocumentsName; + } } private bool Save(int state) @@ -195,12 +194,12 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement return false; } -/* if (DropDeputyGeneralManager.SelectedValue == Const._Null) - { - ShowNotify("请选择分管副总经理!", MessageBoxIcon.Warning); - return false; + /* if (DropDeputyGeneralManager.SelectedValue == Const._Null) + { + ShowNotify("请选择分管副总经理!", MessageBoxIcon.Warning); + return false; - }*/ + }*/ Model.PHTGL_BidApproveUserReview newtable = new Model.PHTGL_BidApproveUserReview(); var Bid = BLL.PHTGL_BidDocumentsReviewService.GetPHTGL_BidDocumentsReviewById(drpBidDocumentCode.SelectedValue); @@ -230,7 +229,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement BLL.PHTGL_BidApproveUserReview_Sch1Service.DeletePHTGL_BidApproveUserReview_Sch1ByReviewID(newtable.ApproveUserReviewID); - + JArray EditorArr = Grid1.GetMergedData(); if (EditorArr.Count > 0) { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReview.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReview.aspx.cs index a93a1e4a..67bbbbba 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReview.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReview.aspx.cs @@ -1,10 +1,8 @@ -using Aspose.Words; -using BLL; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; using System.Linq; namespace FineUIPro.Web.PHTGL.BiddingManagement diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs index 2a9b63ef..c8afe8be 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs @@ -1,9 +1,9 @@ using BLL; +using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs index 64005fd4..535d413b 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs @@ -1,9 +1,9 @@ using BLL; +using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { @@ -113,7 +113,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement } } } - + #region 数据绑定 /// /// 数据绑定 @@ -215,7 +215,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement private bool Save() { - + //if (Approval_Construction.SelectedValue==Const._Null) //{ // ShowNotify("请选择施工管理部审批人员!", MessageBoxIcon.Warning); @@ -299,10 +299,10 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement } PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - } + } } - + protected void btnSubmit_Click(object sender, EventArgs e) { if (Save()) @@ -365,7 +365,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement /// protected void btnAttachUrl_Click(object sender, EventArgs e) { - if (string .IsNullOrEmpty(BidDocumentsReviewId)) + if (string.IsNullOrEmpty(BidDocumentsReviewId)) { Save(); } diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReview.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReview.aspx.cs index feaed5a3..6b7fabe7 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReview.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReview.aspx.cs @@ -1,10 +1,8 @@ -using Aspose.Words; -using BLL; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; using System.Linq; namespace FineUIPro.Web.PHTGL.BiddingManagement @@ -382,7 +380,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement if (this.judgementDelete(rowID, isShow)) { var p = BLL.PHTGL_SetSubReviewService.GetPHTGL_SetSubReviewById(rowID); - if (p != null&& p.State==Const.ContractCreating) + if (p != null && p.State == Const.ContractCreating) { BLL.LogService.AddSys_Log(this.CurrUser, p.SetSubReviewID, p.ApproveUserReviewID, BLL.Const.SetSubReview, BLL.Const.BtnDelete); PHTGL_ApproveService.DeletePHTGL_ApproveBycontractId(rowID); @@ -444,7 +442,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement btnNew.Hidden = false; btnNew2.Hidden = false; btnAdd1.Hidden = false; - btnAdd2.Hidden = false; + btnAdd2.Hidden = false; } if (buttonList.Contains(Const.BtnModify)) { @@ -652,6 +650,6 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement } #endregion - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs index 6cb3db4d..358df097 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs @@ -1,9 +1,9 @@ using BLL; +using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewEdit.aspx.cs index 4558339d..a1bc353b 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewEdit.aspx.cs @@ -252,7 +252,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement Model.PHTGL_SetSubReview _SetSubReview = new Model.PHTGL_SetSubReview(); - var BidDoc = BLL.PHTGL_BidDocumentsReviewService.GetPHTGL_BidDocumentsReviewById(DropBidCode.SelectedValue); + var BidDoc = BLL.PHTGL_BidDocumentsReviewService.GetPHTGL_BidDocumentsReviewById(DropBidCode.SelectedValue); _SetSubReview.ActionPlanID = BidDoc.ActionPlanID; _SetSubReview.BidDocumentsReviewId = DropBidCode.SelectedValue; _SetSubReview.SetSubReviewCode = txtSetSubReviewCode.Text.Trim().ToString(); @@ -270,7 +270,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement _SetSubReview.SetSubReviewID = SQLHelper.GetNewID(typeof(Model.PHTGL_SetSubReview)); SetSubReviewID = _SetSubReview.SetSubReviewID; - if (state== Const.ContractCreat_Complete) + if (state == Const.ContractCreat_Complete) { if (CBIsOwenerApprove.SelectedValueArray[0] == "1") { @@ -287,7 +287,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement return false; } - } + } PHTGL_SetSubReviewService.AddPHTGL_SetSubReview(_SetSubReview); } diff --git a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/BidProjectQuantityEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/BidProjectQuantityEdit.aspx.cs index 3c6c6c07..07bcc32a 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/BidProjectQuantityEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/BidProjectQuantityEdit.aspx.cs @@ -1,7 +1,7 @@ -using System; -using System.Linq; -using BLL; +using BLL; using Model; +using System; +using System.Linq; namespace FineUIPro.Web.PHTGL.BillOfQuantities { diff --git a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/BidProjectQuantityList.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/BidProjectQuantityList.aspx.cs index 9ed04807..37113642 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/BidProjectQuantityList.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/BidProjectQuantityList.aspx.cs @@ -1,7 +1,6 @@ -using System; -using BLL; +using BLL; using Model; -using AspNet = System.Web.UI.WebControls; +using System; namespace FineUIPro.Web.PHTGL.BillOfQuantities { diff --git a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/MainProjectQuantityEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/MainProjectQuantityEdit.aspx.cs index 84270712..bfea754d 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/MainProjectQuantityEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/MainProjectQuantityEdit.aspx.cs @@ -1,6 +1,6 @@ -using System; -using BLL; +using BLL; using Model; +using System; namespace FineUIPro.Web.PHTGL.BillOfQuantities { @@ -136,7 +136,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities if (string.IsNullOrEmpty(MainProjectQuantityId)) { return; - } + } PHTGL_BidProjectQuantityService.ExportByMainProjectQuantityId(MainProjectQuantityId); } diff --git a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/PHTGL_QuantityEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/PHTGL_QuantityEdit.aspx.cs index 89def787..d12c31cb 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/PHTGL_QuantityEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/PHTGL_QuantityEdit.aspx.cs @@ -1,10 +1,6 @@ using BLL; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.BillOfQuantities { @@ -39,7 +35,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); ////权限按钮方法 - // this.GetButtonPower(); + // this.GetButtonPower(); this.Id = Request.Params["Id"]; this.Type = Request.Params["Type"]; if (!string.IsNullOrEmpty(this.Id)) @@ -78,7 +74,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities /// protected void btnSave_Click(object sender, EventArgs e) { - + if (string.IsNullOrEmpty(this.Id)) { Model.PHTGL_Quantity table = new Model.PHTGL_Quantity(); @@ -97,7 +93,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities table.WorkContent = this.txtWorkContent.Text; table.Remarks = this.txtRemarks.Text; table.Id = SQLHelper.GetNewID(typeof(Model.PHTGL_Quantity)); - table.IsTemplate=true; + table.IsTemplate = true; BLL.PHTGL_QuantityService.AddPHTGL_Quantity(table); } diff --git a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantityIn.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantityIn.aspx.cs index 5651b9b7..a15e81d2 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantityIn.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantityIn.aspx.cs @@ -1,12 +1,9 @@ -using System; -using System.Collections.Generic; +using BLL; +using Model; +using System; using System.IO; -using System.Linq; using System.Text; using System.Web; -using BLL; -using MiniExcelLibs; -using Model; namespace FineUIPro.Web.PHTGL.BillOfQuantities { @@ -14,7 +11,8 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities { #region 加载 - public string MainProjectQuantityId { + public string MainProjectQuantityId + { get { return (string)ViewState["MainProjectQuantityId"]; @@ -22,7 +20,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities } set { - ViewState["MainProjectQuantityId"]=value; + ViewState["MainProjectQuantityId"] = value; } } /// @@ -77,7 +75,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities //文件上传服务器后的名称 var fileName = rootPath + initPath + hdFileName.Text; - ResponeData responeData=new ResponeData() ; + ResponeData responeData = new ResponeData(); if (string.IsNullOrEmpty(MainProjectQuantityId)) { responeData = PHTGL_QuantityService.ImportData(fileName, Request.Params["Type"]); @@ -85,11 +83,11 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities } else { - responeData = PHTGL_QuantityService.ImportData(fileName, "",MainProjectQuantityId); + responeData = PHTGL_QuantityService.ImportData(fileName, "", MainProjectQuantityId); } - if (responeData.code==1) + if (responeData.code == 1) { ShowNotify("数据导入成功!", MessageBoxIcon.Success); @@ -100,7 +98,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities } - + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } diff --git a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantityList.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantityList.aspx.cs index 3836e808..dade4c6e 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantityList.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantityList.aspx.cs @@ -1,9 +1,9 @@ -using System; +using BLL; +using Model; +using System; using System.Linq; using System.Text; using System.Web; -using BLL; -using Model; namespace FineUIPro.Web.PHTGL.BillOfQuantities { @@ -93,7 +93,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities break; case "5.1": menuid = Const.TemQuantityListMenuId5_1; - break; + break; case "5.2": menuid = Const.TemQuantityListMenuId5_2; break; @@ -122,9 +122,9 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities if (buttonList.Contains(Const.BtnDelete)) btnMenuDelete.Hidden = false; } - if (this.CurrUser.PersonId==Const.hfnbdId) + if (this.CurrUser.PersonId == Const.hfnbdId) { - btnCheck.Hidden=false; + btnCheck.Hidden = false; } } @@ -193,7 +193,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities protected void btnNew_Click(object sender, EventArgs e) { PageContext.RegisterStartupScript( - Window1.GetShowReference(string.Format("PHTGL_QuantityEdit.aspx?Id={0}&Type={1}", string.Empty,Type, "增加 - "))); + Window1.GetShowReference(string.Format("PHTGL_QuantityEdit.aspx?Id={0}&Type={1}", string.Empty, Type, "增加 - "))); } /// @@ -305,7 +305,7 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities protected void btnSearch_Click(object sender, EventArgs e) { - BindGrid(); + BindGrid(); } protected void btnCheck_OnClick(object sender, EventArgs e) diff --git a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantitySelect.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantitySelect.aspx.cs index 9f9c6bdc..54b19169 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantitySelect.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BillOfQuantities/TemQuantitySelect.aspx.cs @@ -1,11 +1,6 @@ using BLL; using Model; using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.BillOfQuantities { @@ -47,20 +42,20 @@ namespace FineUIPro.Web.PHTGL.BillOfQuantities protected void btnSave_Click(object sender, EventArgs e) { var CheckIdList = Grid1.SelectedRowIDArray; - if (CheckIdList.Length>0) + if (CheckIdList.Length > 0) { foreach (var item in CheckIdList) { var model = BLL.PHTGL_QuantityService.GetPHTGL_QuantityById(item); PHTGL_QuantityService.AddPHTGL_QuantityByTemModel(model, MainProjectQuantityId); } - ShowNotify("保存成功",MessageBoxIcon.Success); + ShowNotify("保存成功", MessageBoxIcon.Success); } } protected void btnSearch_Click(object sender, EventArgs e) { - BindGrid(); + BindGrid(); } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs index 698bc82f..7395277b 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs @@ -183,7 +183,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile } - var tb = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId); + var tb = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId); Grid1.DataSource = tb; Grid1.DataBind(); } diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewEdit.aspx.cs index 65050db7..f5e775bb 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewEdit.aspx.cs @@ -28,7 +28,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile { ContractReviewId = Request.Params["ContractReviewId"]; this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - + BLL.DepartService.InitDepartDropDownList(DropDepart, true); #region 会签下拉框 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConstructionManager, null, Const.UnitId_SEDIN, null, true);//施工经理 diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackComparison.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackComparison.aspx.cs index 046761a0..133c1363 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackComparison.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackComparison.aspx.cs @@ -1,14 +1,8 @@ using BLL; -using Model; using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; -using System.Data; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.ContractCompile { @@ -101,11 +95,11 @@ namespace FineUIPro.Web.PHTGL.ContractCompile protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) { try - { - - string Id =e.DataItem.GetType().GetProperty("Id").GetValue(e.DataItem).ToString(); + { + + string Id = e.DataItem.GetType().GetProperty("Id").GetValue(e.DataItem).ToString(); var model = PhtglContractTrackService.GetPHTGL_ContractTrackById(Id); - + // 工程量偏差 decimal? QuantityOffset = Funs.GetNewDecimalOrZero(model.EstimatedQuantity) - Funs.GetNewDecimalOrZero(model.SettledQuantity); @@ -126,9 +120,9 @@ namespace FineUIPro.Web.PHTGL.ContractCompile } catch (Exception ex) { - + } - + } /// @@ -254,7 +248,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile model.ProjectDescription = ProjectDescription; model.UnitOfMeasurement = UnitOfMeasurement; model.Quantity = Quantity; - model.TotalCostFixedComprehensiveUnitPrice = Funs.GetNewDecimalOrZero( TotalCostFixedComprehensiveUnitPrice); + model.TotalCostFixedComprehensiveUnitPrice = Funs.GetNewDecimalOrZero(TotalCostFixedComprehensiveUnitPrice); model.MainMaterialCost = Funs.GetNewDecimalOrZero(MainMaterialCost); model.TotalPrice = Funs.GetNewDecimalOrZero(TotalPrice); model.CalculationRule = CalculationRule; @@ -267,7 +261,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile model.EstimatedQuantity = EstimatedQuantity; model.EstimatedAmount = Funs.GetNewDecimal(EstimatedAmount); model.SettledQuantity = SettledQuantity; - model.SettledAmount = Funs.GetNewDecimalOrZero(SettledQuantity)* Funs.GetNewDecimalOrZero(TotalCostFixedComprehensiveUnitPrice); + model.SettledAmount = Funs.GetNewDecimalOrZero(SettledQuantity) * Funs.GetNewDecimalOrZero(TotalCostFixedComprehensiveUnitPrice); PhtglContractTrackService.UpdatePHTGL_ContractTrack(model); } @@ -280,7 +274,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile { ShowNotify("计算合同权重失败,请选择施工分包合同后重新保存", MessageBoxIcon.Question); } - + BindGrid(); } diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackEdit.aspx.cs index 527b7f88..2b9b3b9c 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackEdit.aspx.cs @@ -1,16 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Data.SqlClient; -using System.Linq; -using System.Net.Configuration; -using BLL; -using FineUIPro.Web.PHTGL.BiddingManagement; +using BLL; using Model; using Newtonsoft.Json.Linq; +using System; +using System.Linq; namespace FineUIPro.Web.PHTGL.ContractCompile { - public partial class ContractTrackEdit: PageBase + public partial class ContractTrackEdit : PageBase { #region @@ -44,7 +40,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile var model = PhtglContractTrackService.GetPHTGL_ContractTrackById(Id); if (model != null) { - + DropContractCode.SelectedValue = ContractService.GetContractById(model.ContractId).ContractNum; txtSerialNumber.Text = model.SerialNumber; txtMainItemCode.Text = model.MainItemCode; @@ -58,7 +54,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile txtProjectDescription.Text = model.ProjectDescription; txtUnitOfMeasurement.Text = model.UnitOfMeasurement; txtQuantity.Text = model.Quantity; - txtTotalCostFixedComprehensiveUnitPrice.Text = model.TotalCostFixedComprehensiveUnitPrice.HasValue?model.TotalCostFixedComprehensiveUnitPrice.ToString():""; + txtTotalCostFixedComprehensiveUnitPrice.Text = model.TotalCostFixedComprehensiveUnitPrice.HasValue ? model.TotalCostFixedComprehensiveUnitPrice.ToString() : ""; txtMainMaterialCost.Text = model.MainMaterialCost.HasValue ? model.MainMaterialCost.ToString() : ""; txtTotalPrice.Text = model.TotalPrice.HasValue ? model.TotalPrice.ToString() : ""; txtCalculationRule.Text = model.CalculationRule; @@ -67,7 +63,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile txtConstructionSubcontractor.Text = model.ConstructionSubcontractor; txtContractWeight.Text = model.ContractWeight; txtMaterialSupplier.Text = model.MaterialSupplier; - cbIsWithinGeneralContractScope.Checked = model.IsWithinGeneralContractScope ??false; + cbIsWithinGeneralContractScope.Checked = model.IsWithinGeneralContractScope ?? false; txtEstimatedQuantity.Text = model.EstimatedQuantity; txtEstimatedAmount.Text = model.EstimatedAmount.HasValue ? model.EstimatedAmount.ToString() : ""; @@ -87,11 +83,11 @@ namespace FineUIPro.Web.PHTGL.ContractCompile { Model.PHTGL_ContractTrackProgress queryProgress = new PHTGL_ContractTrackProgress(); queryProgress.ContractTrackProgressId = ID; - var tb= PhtglContracttrackprogressService.GetListData(queryProgress, Grid1); - Grid1.RecordCount = PhtglContracttrackprogressService.Count; - Grid1.DataSource = tb; - Grid1.DataBind(); - #region Grid1 + var tb = PhtglContracttrackprogressService.GetListData(queryProgress, Grid1); + Grid1.RecordCount = PhtglContracttrackprogressService.Count; + Grid1.DataSource = tb; + Grid1.DataBind(); + #region Grid1 // 删除选中单元格的客户端脚本 string deleteScript = GetDeleteScript(); @@ -151,10 +147,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile var table = new PHTGL_ContractTrack(); if (string.IsNullOrEmpty(DropContractCode.SelectedValue)) { - ShowNotify("请选择施工分包合同",MessageBoxIcon.Question); + ShowNotify("请选择施工分包合同", MessageBoxIcon.Question); return; } - table.ContractId =ContractService.GetContractByContractNum(DropContractCode.SelectedValue).ContractId; + table.ContractId = ContractService.GetContractByContractNum(DropContractCode.SelectedValue).ContractId; table.SerialNumber = txtSerialNumber.Text; table.MainItemCode = txtMainItemCode.Text; table.MainItemName = txtMainItemName.Text; @@ -175,10 +171,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile table.Remarks = txtRemarks.Text; table.ConstructionSubcontractor = txtConstructionSubcontractor.Text; table.ContractWeight = txtContractWeight.Text; - table.MaterialSupplier = txtMaterialSupplier.Text; + table.MaterialSupplier = txtMaterialSupplier.Text; table.IsWithinGeneralContractScope = cbIsWithinGeneralContractScope.Checked; table.EstimatedQuantity = txtEstimatedQuantity.Text; - table.EstimatedAmount = Funs.GetNewDecimalOrZero(txtEstimatedAmount.Text); + table.EstimatedAmount = Funs.GetNewDecimalOrZero(txtEstimatedAmount.Text); table.SettledQuantity = txtSettledQuantity.Text; table.SettledAmount = Funs.GetNewDecimalOrZero(txtSettledAmount.Text); table.ContractNum = DropContractCode.SelectedValue; diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackIn.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackIn.aspx.cs index 34b8f586..1a039ef3 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackIn.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackIn.aspx.cs @@ -1,13 +1,9 @@ using BLL; using Model; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.ContractCompile { @@ -80,7 +76,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile var fileName = rootPath + initPath + hdFileName.Text; ResponeData responeData = new ResponeData(); - responeData = PhtglContractTrackService.ImportData(fileName, ContractId, this.CurrUser.LoginProjectId); + responeData = PhtglContractTrackService.ImportData(fileName, ContractId, this.CurrUser.LoginProjectId); if (responeData.code == 1) diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackList.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackList.aspx.cs index 4e5961e3..cc4ec74e 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackList.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackList.aspx.cs @@ -1,12 +1,8 @@ using BLL; -using Microsoft.Vbe.Interop; using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.ContractCompile @@ -29,7 +25,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile this.DropContractCode.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId); this.DropContractCode.DataBind(); Funs.FineUIPleaseSelect(this.DropContractCode); - PHTGL_QuantityService.IniGetMajorItems3DownList(drpMajorItems,true); + PHTGL_QuantityService.IniGetMajorItems3DownList(drpMajorItems, true); DropMainContractCode_SelectedIndexChanged(null, null); this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); // 绑定表格 @@ -49,21 +45,21 @@ namespace FineUIPro.Web.PHTGL.ContractCompile table.ContractId = this.ContractId; table.ProjectCode = this.txtProjectCode.Text.Trim(); table.ProjectName = this.txtProjectName.Text.Trim(); - table.MainItemName=this.txtMainItemName.Text.Trim(); - if (drpMajorItems.SelectedValue!=Const._Null) + table.MainItemName = this.txtMainItemName.Text.Trim(); + if (drpMajorItems.SelectedValue != Const._Null) { - table.MajorName=drpMajorItems.SelectedValue; + table.MajorName = drpMajorItems.SelectedValue; } var tb = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackByModle(table); - + //tb = GetFilteredTable(Grid1.FilteredData, tb); - Grid1.DataSource = PhtglContractTrackService.GetListData(table,Grid1); + Grid1.DataSource = PhtglContractTrackService.GetListData(table, Grid1); Grid1.RecordCount = PhtglContractTrackService.Count; Grid1.DataBind(); var sumTotalPricea = tb.Select(x => x.TotalPrice).ToList().Sum(); lbTotalPrice.Text = sumTotalPricea.ToString(); } - + #endregion #region GV 数据操作 @@ -156,7 +152,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile /// /// /// - + /// /// Grid行双击事件 @@ -468,17 +464,17 @@ namespace FineUIPro.Web.PHTGL.ContractCompile model.MainItemName = MainItemName; model.MajorName = MajorName; model.MajorCode = MajorCode; - model.SubProject= SubProject; - model.SubItemProject= SubItemProject; + model.SubProject = SubProject; + model.SubItemProject = SubItemProject; // model.ProjectCode = ProjectCode; model.ProjectName = ProjectName; model.ProjectDescription = ProjectDescription; model.UnitOfMeasurement = UnitOfMeasurement; model.Quantity = Quantity; - model.TotalCostFixedComprehensiveUnitPrice =Funs.GetNewDecimalOrZero( TotalCostFixedComprehensiveUnitPrice); + model.TotalCostFixedComprehensiveUnitPrice = Funs.GetNewDecimalOrZero(TotalCostFixedComprehensiveUnitPrice); model.MainMaterialCost = Funs.GetNewDecimalOrZero(MainMaterialCost); - // model.TotalPrice = Funs.GetNewDecimalOrZero(TotalPrice); - model.TotalPrice = (Funs.GetNewDecimalOrZero(Quantity)* model.TotalCostFixedComprehensiveUnitPrice); + // model.TotalPrice = Funs.GetNewDecimalOrZero(TotalPrice); + model.TotalPrice = (Funs.GetNewDecimalOrZero(Quantity) * model.TotalCostFixedComprehensiveUnitPrice); model.CalculationRule = CalculationRule; model.WorkContent = WorkContent; model.Remarks = Remarks; @@ -493,7 +489,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile PhtglContractTrackService.UpdatePHTGL_ContractTrack(model); } - + } ShowNotify("保存成功", MessageBoxIcon.Success); BindGrid(); diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackMatchWBS.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackMatchWBS.aspx.cs index 619652fe..a2b6993a 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackMatchWBS.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackMatchWBS.aspx.cs @@ -481,8 +481,8 @@ namespace FineUIPro.Web.PHTGL.ContractCompile where x.ProjectId == this.CurrUser.LoginProjectId select x; var workPackages = (from x in db.WBS_WorkPackage - where x.ProjectId == this.CurrUser.LoginProjectId - select x).ToList(); + where x.ProjectId == this.CurrUser.LoginProjectId + select x).ToList(); var controlItemAndCycles = from x in totalControlItemAndCycles where SelectedList.Contains(x.ControlItemAndCycleId) select x; @@ -522,7 +522,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c); //更新上级WBS内容概算费用 BLL.WorkPackageService.UpdateWorkPackagesPlanCost(workPackages, c.WorkPackageId, changePlanCost); - var workPackage = workPackages.FirstOrDefault(x=>x.WorkPackageId== c.WorkPackageId); + var workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == c.WorkPackageId); if (workPackage != null) { var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId); diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressChart.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressChart.aspx.cs index f1f0a622..8a1ee22a 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressChart.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressChart.aspx.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.PHTGL.ContractCompile { @@ -31,25 +28,25 @@ namespace FineUIPro.Web.PHTGL.ContractCompile var db = Funs.DB; var result = (from x in db.PHTGL_ContractTrackProgress - join y in db.PHTGL_ContractTrack on x.ContractTrackId equals y.Id + join y in db.PHTGL_ContractTrack on x.ContractTrackId equals y.Id - where y.ContractId == ContractId - group x by x.Date into g - select new + where y.ContractId == ContractId + group x by x.Date into g + select new - { - 月份 = g.Key, - BCWS工程量 = g.Sum(x => x.BCWS_Quantity), - BCWS产值 = g.Sum(x => x.BCWS_OutputValue), - BCWS百分比 = g.Sum(x => x.BCWS_Percentage), - ACWP工程量 = g.Sum(x => x.ACWP_Quantity), - ACWP产值 = g.Sum(x => x.ACWP_OutputValue), - ACWP百分比 = g.Sum(x => x.ACWP_Percentage) - }).ToList(); + { + 月份 = g.Key, + BCWS工程量 = g.Sum(x => x.BCWS_Quantity), + BCWS产值 = g.Sum(x => x.BCWS_OutputValue), + BCWS百分比 = g.Sum(x => x.BCWS_Percentage), + ACWP工程量 = g.Sum(x => x.ACWP_Quantity), + ACWP产值 = g.Sum(x => x.ACWP_OutputValue), + ACWP百分比 = g.Sum(x => x.ACWP_Percentage) + }).ToList(); this.ChartEV.CreateMaryChartHTGL(LINQToDataTable(result), 1020, 420, null); } - + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetection.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetection.aspx.cs index 28ce3cd1..07697dd7 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetection.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetection.aspx.cs @@ -1,18 +1,11 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.ContractCompile { public partial class ContractTrackProgressDetection : PageBase { - + public string ContractId { get => (string)ViewState["ContractId"]; @@ -21,7 +14,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { //主合同编号 this.DropContractCode.DataTextField = "ContractNum"; this.DropContractCode.DataValueField = "ContractNum"; @@ -29,10 +22,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile this.DropContractCode.DataBind(); Funs.FineUIPleaseSelect(this.DropContractCode); DropMainContractCode_SelectedIndexChanged(null, null); - + } } - + protected void DropMainContractCode_SelectedIndexChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(DropContractCode.SelectedValue)) @@ -50,8 +43,8 @@ namespace FineUIPro.Web.PHTGL.ContractCompile } - panelCenterRegion.IFrameUrl = "./ContractTrackProgressDetectionGrid.aspx?ContractId="+ContractId; - } + panelCenterRegion.IFrameUrl = "./ContractTrackProgressDetectionGrid.aspx?ContractId=" + ContractId; + } } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetectionGrid.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetectionGrid.aspx.cs index e11b0c6c..e38f37ec 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetectionGrid.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressDetectionGrid.aspx.cs @@ -7,10 +7,7 @@ using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using Model; namespace FineUIPro.Web.PHTGL.ContractCompile { @@ -23,7 +20,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile { InitGrid(); } - public DataTable GridTable=new DataTable(); + public DataTable GridTable = new DataTable(); private void InitGrid() { FineUIPro.BoundField bf; @@ -33,7 +30,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile ContractId = Request.Params["ContractId"]; - GridTable.Columns.Add("Id"); + GridTable.Columns.Add("Id"); GridTable.Columns.Add("SerialNumber"); ListItem[] list = new ListItem[8]; list[0] = new ListItem("主项号", "MainItemCode"); @@ -65,8 +62,8 @@ namespace FineUIPro.Web.PHTGL.ContractCompile queryContractTrack.ProjectId = this.CurrUser.LoginProjectId; queryContractTrack.ContractId = this.ContractId; var modelContractTracks = BLL.PhtglContractTrackService.GetFirstPHTGL_ContractTrackByModle(queryContractTrack); - if (modelContractTracks==null) return; - + if (modelContractTracks == null) return; + Model.PHTGL_ContractTrackProgress table = new Model.PHTGL_ContractTrackProgress(); table.ContractTrackId = modelContractTracks.Id; @@ -74,7 +71,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile foreach (var item in tb) { //string date = item.Date.Replace("-", ""); - string date = item.Date+"#" ; + string date = item.Date + "#"; GroupField p = new GroupField(); p.HeaderText = item.Date; p.TextAlign = TextAlign.Center; @@ -85,7 +82,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile GroupField p1BCWS = new GroupField(); p1BCWS.HeaderText = "BCWS"; - p1BCWS.TextAlign = TextAlign.Center; + p1BCWS.TextAlign = TextAlign.Center; p1BCWS.Attributes["data-color"] = "color1"; GroupField p1ACWP = new GroupField(); p1ACWP.HeaderText = "ACWP"; @@ -111,10 +108,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile #region BCWS txTextBox = new FineUIPro.TextBox(); - txTextBox.ID = "txt" +date+ "BCWS_Quantity"; + txTextBox.ID = "txt" + date + "BCWS_Quantity"; rf = new RenderField(); - rf.ColumnID = date+"BCWS_Quantity"; - rf.DataField = date+"BCWS_Quantity"; + rf.ColumnID = date + "BCWS_Quantity"; + rf.DataField = date + "BCWS_Quantity"; rf.HeaderText = "工程量"; rf.TextAlign = FineUIPro.TextAlign.Left; rf.Editor.Add(txTextBox); @@ -253,15 +250,15 @@ namespace FineUIPro.Web.PHTGL.ContractCompile p2.Columns.Add(p2ACWP); p.Columns.Add(p1); - p.Columns.Add(p2); + p.Columns.Add(p2); Grid1.Columns.Add(p); } - + } - } + } #endregion public string ContractId { @@ -272,9 +269,9 @@ namespace FineUIPro.Web.PHTGL.ContractCompile { if (!IsPostBack) { - this.GetButtonPower(); + this.GetButtonPower(); - PHTGL_QuantityService.IniGetMajorItems3DownList(drpMajorItems, true); + PHTGL_QuantityService.IniGetMajorItems3DownList(drpMajorItems, true); // 绑定表格 this.BindGrid(); @@ -314,7 +311,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile Parallel.ForEach(splitContractTracks, parallelOptions, sublist => { var tempTable = GridTable.Clone(); // 创建临时的 DataTable - foreach (var item in sublist) + foreach (var item in sublist) { DataRow row = tempTable.NewRow(); row["SerialNumber"] = item.SerialNumber; @@ -353,7 +350,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile row[date + "SumACWP_Percentage"] = SumModel.ACWP_Percentage; } concurrentGridTable.TryAdd(item.Id, row); - // GridTable.Rows.Add(row); + // GridTable.Rows.Add(row); } }); // 将线程安全的数据拷贝到 GridTable @@ -364,10 +361,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile GridTable.Rows.Add(newRow); } Grid1.RecordCount = count; - Grid1.DataSource = GridTable.AsEnumerable().OrderBy(x => x["SerialNumber"].ToString(), new CustomComparer());; + Grid1.DataSource = GridTable.AsEnumerable().OrderBy(x => x["SerialNumber"].ToString(), new CustomComparer()); ; Grid1.DataBind(); } - } + } protected void Grid1_OnRowDataBound(object sender, GridRowEventArgs e) { if (!string.IsNullOrEmpty(ContractId)) @@ -492,44 +489,44 @@ namespace FineUIPro.Web.PHTGL.ContractCompile if (EditorArr.Count > 0) { for (int i = 0; i < EditorArr.Count; i++) - { + { JObject objects = (JObject)EditorArr[i]; - var listfiled = objects["values"].ToList(); + var listfiled = objects["values"].ToList(); - var Id = objects["id"].ToString(); - var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(Id); - - - if (model!=null) - { - foreach (var item in listfiled) //遍历行中的字段 - { - var b = item; - var txtname = b.First.Path.Substring(b.First.Path.LastIndexOf('.') + 1); - var txtvalue = b.First.Value(); - string date = txtname.Split('#')[0].ToString(); - string filed = txtname.Split('#')[1].ToString(); + var Id = objects["id"].ToString(); + var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(Id); - var modelContractTrackProgress = PhtglContracttrackprogressService.GetPHTGL_ContractTrackProgressByTrackIdAndDate(Id, date); - if (modelContractTrackProgress!=null) - { - switch (filed) - { + + if (model != null) + { + foreach (var item in listfiled) //遍历行中的字段 + { + var b = item; + var txtname = b.First.Path.Substring(b.First.Path.LastIndexOf('.') + 1); + var txtvalue = b.First.Value(); + string date = txtname.Split('#')[0].ToString(); + string filed = txtname.Split('#')[1].ToString(); + + var modelContractTrackProgress = PhtglContracttrackprogressService.GetPHTGL_ContractTrackProgressByTrackIdAndDate(Id, date); + if (modelContractTrackProgress != null) + { + switch (filed) + { case "ACWP_Quantity": - modelContractTrackProgress.ACWP_Quantity = Funs.GetNewDecimalOrZero(txtvalue) ; + modelContractTrackProgress.ACWP_Quantity = Funs.GetNewDecimalOrZero(txtvalue); break; case "BCWS_Quantity": modelContractTrackProgress.BCWS_Quantity = Funs.GetNewDecimalOrZero(txtvalue); break; } - } - PhtglContracttrackprogressService.UpdatePHTGL_ContractTrackProgress(modelContractTrackProgress); + } + PhtglContracttrackprogressService.UpdatePHTGL_ContractTrackProgress(modelContractTrackProgress); } - + } - + } } @@ -542,7 +539,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile private void CheckProgressd() { if (!string.IsNullOrEmpty(ContractId)) - { + { Model.PHTGL_ContractTrack queryContractTrack = new Model.PHTGL_ContractTrack(); queryContractTrack.ProjectId = this.CurrUser.LoginProjectId; queryContractTrack.ContractId = this.ContractId; @@ -595,11 +592,11 @@ namespace FineUIPro.Web.PHTGL.ContractCompile } if (buttonList.Contains(BLL.Const.BtnModify)) { - // this.btnMenuEdit.Hidden = false; + // this.btnMenuEdit.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnDelete)) { - // this.btnMenuDelete.Hidden = false; + // this.btnMenuDelete.Hidden = false; } } } diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs index 24d661d7..628fc5fc 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs @@ -1,11 +1,7 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.ContractCompile @@ -45,9 +41,9 @@ namespace FineUIPro.Web.PHTGL.ContractCompile private void BindGrid() { var db = Funs.DB; - var q = + var q = from x in db.PHTGL_ContractTrack - join y in db.PHTGL_ContractTrackMatchWBS on x.Id equals y.ContractTrackId into g + join y in db.PHTGL_ContractTrackMatchWBS on x.Id equals y.ContractTrackId into g from y in g.DefaultIfEmpty() join z in db.WBS_ControlItemAndCycle on y.ControlItemAndCycleId equals z.ControlItemAndCycleId into _ControlJoin from z in _ControlJoin.DefaultIfEmpty() @@ -58,55 +54,55 @@ namespace FineUIPro.Web.PHTGL.ContractCompile (string.IsNullOrEmpty(this.txtProjectName.Text.Trim()) || x.ProjectName.Contains(this.txtProjectName.Text.Trim())) && (string.IsNullOrEmpty(this.txtMainItemName.Text.Trim()) || x.MainItemName.Contains(this.txtMainItemName.Text.Trim())) select new - { - MatchWbsId= y.Id , - y.ContractTrackId, - y.ControlItemAndCycleId, - z.WBSCode, - z.ControlItemContent, - z.Weights, - y.WorkPackageEstimate, - x.Id, - x.ContractNum, - x.MainItemCode, - x.MainItemName, - x.MajorName, - x.MajorCode, - x.SubProject, - x.SubItemProject, - x.ProjectCode, - x.ProjectName, - x.ProjectDescription, - x.UnitOfMeasurement, - x.Quantity, - x.TotalCostFixedComprehensiveUnitPrice, - x.MainMaterialCost, - x.TotalPrice, - x.CalculationRule, - x.WorkContent, - x.Remarks, - x.ConstructionSubcontractor, - x.ContractWeight, - x.MaterialSupplier, - x.IsWithinGeneralContractScope, - x.EstimatedQuantity, - x.EstimatedAmount, - x.SettledQuantity, - x.SettledAmount, - x.ContractId, - x.SerialNumber + { + MatchWbsId = y.Id, + y.ContractTrackId, + y.ControlItemAndCycleId, + z.WBSCode, + z.ControlItemContent, + z.Weights, + y.WorkPackageEstimate, + x.Id, + x.ContractNum, + x.MainItemCode, + x.MainItemName, + x.MajorName, + x.MajorCode, + x.SubProject, + x.SubItemProject, + x.ProjectCode, + x.ProjectName, + x.ProjectDescription, + x.UnitOfMeasurement, + x.Quantity, + x.TotalCostFixedComprehensiveUnitPrice, + x.MainMaterialCost, + x.TotalPrice, + x.CalculationRule, + x.WorkContent, + x.Remarks, + x.ConstructionSubcontractor, + x.ContractWeight, + x.MaterialSupplier, + x.IsWithinGeneralContractScope, + x.EstimatedQuantity, + x.EstimatedAmount, + x.SettledQuantity, + x.SettledAmount, + x.ContractId, + x.SerialNumber }; ; if (drpMajorItems.SelectedValue != Const._Null) { - q= q.Where(x => - x.MajorName.Contains(this.drpMajorItems.SelectedValue)); + q = q.Where(x => + x.MajorName.Contains(this.drpMajorItems.SelectedValue)); } Grid1.RecordCount = q.Count(); Grid1.DataSource = q.ToList().OrderBy(x => x.SerialNumber, new CustomComparer()).ToList().Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize); Grid1.DataBind(); - + } protected void DropMainContractCode_SelectedIndexChanged(object sender, EventArgs e) @@ -185,7 +181,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } - string ID = Grid1.SelectedRow.DataKeys[0].ToString(); + string ID = Grid1.SelectedRow.DataKeys[0].ToString(); var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(ID); if (model != null) ///已上报时不能删除 { @@ -216,7 +212,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile ShowNotify("删除数据成功!", MessageBoxIcon.Success); } } - + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) { if (Grid1.SelectedRowIndexArray.Length == 0) diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ActionPlanFile.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ActionPlanFile.aspx.cs index 1bf18146..d26e7407 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ActionPlanFile.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ActionPlanFile.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.PHTGL.BiddingManagement; using System; using System.Collections.Generic; using System.Data; @@ -135,7 +134,7 @@ namespace FineUIPro.Web.PHTGL.Filing //ActionPlanFormation actionPlanFormation = new ActionPlanFormation(); var Act = BLL.PHTGL_ActionPlanReviewService.GetPHTGL_ActionPlanReviewById(fileId); //actionPlanFormation.Print(Act.ActionPlanID); - BLL.PHTGL_ActionPlanFormationService.PrintFile( Act.ActionPlanID); + BLL.PHTGL_ActionPlanFormationService.PrintFile(Act.ActionPlanID); return; } diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ApproveUserFile.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ApproveUserFile.aspx.cs index 6a82b512..37fb38b9 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ApproveUserFile.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ApproveUserFile.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.PHTGL.BiddingManagement; using System; using System.Collections.Generic; using System.Data; @@ -105,7 +104,7 @@ namespace FineUIPro.Web.PHTGL.Filing } if (e.CommandName == "export") { - BLL.PHTGL_BidApproveUserReviewService.PrintFile( fileId); + BLL.PHTGL_BidApproveUserReviewService.PrintFile(fileId); //ApproveUserReview approveUserReview = new ApproveUserReview(); //approveUserReview.Print(fileId); diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsFile.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsFile.aspx.cs index b89edbe8..eab2cb22 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsFile.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsFile.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.PHTGL.BiddingManagement; using System; using System.Collections.Generic; using System.Data; diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBook.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBook.aspx.cs index a6802c1d..38631805 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBook.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBook.aspx.cs @@ -1,10 +1,6 @@ using BLL; using System; -using System.Collections.Generic; -using System.Data; -using System.Data.SqlClient; using System.Linq; -using System.Web.UI.DataVisualization.Charting; namespace FineUIPro.Web.PHTGL.Filing { @@ -54,7 +50,7 @@ namespace FineUIPro.Web.PHTGL.Filing BLL.DepartService.InitDepartDropDownList(this.drpDepartId, false); Type = Request.Params["Type"]; GetButtonPower(); - if (Type=="1") + if (Type == "1") { btnNew.OnClientClick = Window1.GetShowReference("BidDocumentsStandingBookEditProject.aspx", "基本信息") + "return false;"; this.ProjectId = this.CurrUser.LoginProjectId; @@ -68,7 +64,7 @@ namespace FineUIPro.Web.PHTGL.Filing btnNew.OnClientClick = Window1.GetShowReference("BidDocumentsStandingBookEdit.aspx", "基本信息") + "return false;"; } - + BindGrid(); } @@ -81,7 +77,7 @@ namespace FineUIPro.Web.PHTGL.Filing { Model.PHTGL_BidDocumentsStandingBook _BidDocumentsStandingBook = new Model.PHTGL_BidDocumentsStandingBook(); - if (Type=="1") + if (Type == "1") { if (!(this.CurrUser.PersonId == Const.sysglyId || this.CurrUser.PersonId == Const.hfnbdId)) { @@ -108,26 +104,26 @@ namespace FineUIPro.Web.PHTGL.Filing } } - if (dropState.SelectedValue!=Const._Null) + if (dropState.SelectedValue != Const._Null) { - _BidDocumentsStandingBook.State = Funs.GetNewInt(dropState.SelectedValue) ; + _BidDocumentsStandingBook.State = Funs.GetNewInt(dropState.SelectedValue); } if (!string.IsNullOrEmpty(txtEPCCode.Text)) { - _BidDocumentsStandingBook.EPCCode= txtEPCCode.Text; + _BidDocumentsStandingBook.EPCCode = txtEPCCode.Text; } if (!string.IsNullOrEmpty(txtShortName.Text)) { - _BidDocumentsStandingBook.ProjectShortName= txtShortName.Text; + _BidDocumentsStandingBook.ProjectShortName = txtShortName.Text; } if (!string.IsNullOrEmpty(txtProjectCode.Text)) { - _BidDocumentsStandingBook.ProjectCode= txtProjectCode.Text; + _BidDocumentsStandingBook.ProjectCode = txtProjectCode.Text; } - var q= BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookByModle(_BidDocumentsStandingBook); + var q = BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookByModle(_BidDocumentsStandingBook); Grid1.RecordCount = q.Count; - Grid1.DataSource=q; + Grid1.DataSource = q; Grid1.DataBind(); } @@ -229,10 +225,10 @@ namespace FineUIPro.Web.PHTGL.Filing return; } string id = Grid1.SelectedRowID; - var model=BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(id); + var model = BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(id); if (model != null) { - if (Type=="1") + if (Type == "1") { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BidDocumentsStandingBookEditProject.aspx?BidDocumentsStandingBookId={0}", id, "编辑 - "))); @@ -413,7 +409,7 @@ namespace FineUIPro.Web.PHTGL.Filing protected void btnImport_Click(object sender, EventArgs e) { - if (Type=="1") + if (Type == "1") { PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("BidDocumentsStandingBookIn.aspx?Type=1", "导入 - "))); @@ -428,8 +424,8 @@ namespace FineUIPro.Web.PHTGL.Filing public string ConvertState(object State) { string StateName = string.Empty; - if (State!=null&&!string.IsNullOrEmpty(State.ToString())) - { + if (State != null && !string.IsNullOrEmpty(State.ToString())) + { switch (State.ToString()) { case "0": @@ -465,10 +461,10 @@ namespace FineUIPro.Web.PHTGL.Filing string rowID = Grid1.DataKeys[rowIndex][0].ToString(); if (this.judgementDelete(rowID, isShow)) { - var p = BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(rowID); + var p = BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(rowID); if (p != null) { - if (p.State==1) + if (p.State == 1) { ShowNotify(message: "已提交,删除失败!", MessageBoxIcon.Error); return; @@ -482,7 +478,7 @@ namespace FineUIPro.Web.PHTGL.Filing AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-BidDocuments", Const.ProjectBidDocumentsStandingBookMenuId); AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ApprovePersonForm", Const.ProjectBidDocumentsStandingBookMenuId); AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-SetSubReview", Const.ProjectBidDocumentsStandingBookMenuId); - AttachFileService.DeleteAttachFile(Funs.RootPath, rowID +"-ShortListApproval", Const.ProjectBidDocumentsStandingBookMenuId); + AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ShortListApproval", Const.ProjectBidDocumentsStandingBookMenuId); } } } diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEdit.aspx.cs index d1b6d90a..ffc50c0c 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEdit.aspx.cs @@ -1,16 +1,9 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; -using FineUIPro.Web.PHTGL.BiddingManagement; namespace FineUIPro.Web.PHTGL.Filing { - public partial class BidDocumentsStandingBookEdit: PageBase + public partial class BidDocumentsStandingBookEdit : PageBase { #region /// @@ -72,8 +65,8 @@ namespace FineUIPro.Web.PHTGL.Filing this.txtApprovePersonFormCode.Text = model.ApprovePersonFormCode; this.txtBidWinner.Text = model.BidWinner; this.txtSetSubReviewCode.Text = model.SetSubReviewCode; - this.txtBidNoticeCode.Text=model.BidNoticeCode; - this.txtBidUnitFileCode.Text = model.BidUnitFileCode; + this.txtBidNoticeCode.Text = model.BidNoticeCode; + this.txtBidUnitFileCode.Text = model.BidUnitFileCode; } } } @@ -89,7 +82,7 @@ namespace FineUIPro.Web.PHTGL.Filing { Model.PHTGL_BidDocumentsStandingBook table = new Model.PHTGL_BidDocumentsStandingBook(); table.UnitId = this.CurrUser.UnitId; - table.DepartId=this.CurrUser.DepartId; + table.DepartId = this.CurrUser.DepartId; table.EPCCode = this.txtEPCCode.Text; table.ProjectShortName = this.txtProjectShortName.Text; table.ProjectCode = this.txtProjectCode.Text; @@ -104,10 +97,10 @@ namespace FineUIPro.Web.PHTGL.Filing table.Bidding_StartTime = this.txtBidding_StartTime.Text; table.ApprovePersonFormCode = this.txtApprovePersonFormCode.Text; table.BidWinner = this.txtBidWinner.Text; - table.SetSubReviewCode = this.txtSetSubReviewCode.Text; + table.SetSubReviewCode = this.txtSetSubReviewCode.Text; table.State = 0; - table.BidNoticeCode=this.txtBidNoticeCode.Text; - table.BidUnitFileCode=this.txtBidUnitFileCode.Text; + table.BidNoticeCode = this.txtBidNoticeCode.Text; + table.BidUnitFileCode = this.txtBidUnitFileCode.Text; if (Type == "1") { table.ProjectId = this.CurrUser.LoginProjectId; @@ -238,13 +231,13 @@ namespace FineUIPro.Web.PHTGL.Filing /// private void GetButtonPower() { - if (!string .IsNullOrEmpty(BidDocumentsStandingBookId)) + if (!string.IsNullOrEmpty(BidDocumentsStandingBookId)) { var q = BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(BidDocumentsStandingBookId); - if (q != null&& q.State==1) + if (q != null && q.State == 1) { btnSave.Hidden = true; - btnSubmit.Hidden=true; + btnSubmit.Hidden = true; } } } @@ -263,7 +256,7 @@ namespace FineUIPro.Web.PHTGL.Filing BidDocumentsStandingBookId = Guid.NewGuid().ToString(); } PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/BidDocumentsStandingBook&menuId={1}", - this.BidDocumentsStandingBookId+ "-BidUnit", BLL.Const.ProjectBidDocumentsStandingBookMenuId))); + this.BidDocumentsStandingBookId + "-BidUnit", BLL.Const.ProjectBidDocumentsStandingBookMenuId))); } /// /// 中标通知书 @@ -277,7 +270,7 @@ namespace FineUIPro.Web.PHTGL.Filing BidDocumentsStandingBookId = Guid.NewGuid().ToString(); } PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/BidDocumentsStandingBook&menuId={1}", - this.BidDocumentsStandingBookId+ "-BidNotice", BLL.Const.ProjectBidDocumentsStandingBookMenuId))); + this.BidDocumentsStandingBookId + "-BidNotice", BLL.Const.ProjectBidDocumentsStandingBookMenuId))); } /// /// 实施计划文件 @@ -382,6 +375,6 @@ namespace FineUIPro.Web.PHTGL.Filing // //this.txtApprovePersonFormCode.Text = model.ApprovePersonFormCode; // } - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEditProject.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEditProject.aspx.cs index bba7bd75..06e3b70b 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEditProject.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookEditProject.aspx.cs @@ -1,10 +1,5 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.Filing { diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookIn.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookIn.aspx.cs index 4072ea4d..2b9b48b4 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookIn.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/BidDocumentsStandingBookIn.aspx.cs @@ -1,12 +1,8 @@ using BLL; -using FineUIPro.Web.HJGL.WeldingManage; using MiniExcelLibs; using Model; -using Newtonsoft.Json; using System; using System.Collections.Generic; -using System.Data; -using System.Data.OleDb; using System.IO; using System.Linq; @@ -106,7 +102,7 @@ namespace FineUIPro.Web.PHTGL.Filing string filePath = initFullPath + this.hdFileName.Text; this.fuAttachUrl.PostedFile.SaveAs(filePath); ImportXlsToData(rootPath + initPath + this.hdFileName.Text); - + if (string.IsNullOrEmpty(errorInfos)) { if (!string.IsNullOrEmpty(this.hdFileName.Text)) @@ -202,7 +198,7 @@ namespace FineUIPro.Web.PHTGL.Filing _BidDocumentsStandingBook.State = 0; _BidDocumentsStandingBook.UnitId = this.CurrUser.UnitId; _BidDocumentsStandingBook.DepartId = this.CurrUser.DepartId; - if (Type=="1") + if (Type == "1") { _BidDocumentsStandingBook.ProjectId = this.CurrUser.LoginProjectId; } @@ -221,12 +217,12 @@ namespace FineUIPro.Web.PHTGL.Filing _BidDocumentsStandingBook.ApprovePersonFormCode = pds[i].M; _BidDocumentsStandingBook.BidWinner = pds[i].N; _BidDocumentsStandingBook.SetSubReviewCode = pds[i].O; - _BidDocumentsStandingBook.BidNoticeCode= pds[i].P; - _BidDocumentsStandingBook.BidUnitFileCode= pds[i].Q; - BidDocStandingBookList.Add(_BidDocumentsStandingBook); + _BidDocumentsStandingBook.BidNoticeCode = pds[i].P; + _BidDocumentsStandingBook.BidUnitFileCode = pds[i].Q; + BidDocStandingBookList.Add(_BidDocumentsStandingBook); - //if (col24 != null) - //{ + //if (col24 != null) + //{ //} //else diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.cs index 7023c3bd..091b6c16 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBook.aspx.cs @@ -1,12 +1,7 @@ using BLL; -using FineUIPro.Web.PHTGL.ContractCompile; using System; -using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.Filing @@ -37,10 +32,10 @@ namespace FineUIPro.Web.PHTGL.Filing /// private void BindGrid() { - var model = new Model.PHTGL_ContractStandingBook(); + var model = new Model.PHTGL_ContractStandingBook(); var RoleIds = this.CurrUser.RoleIds; - + if (this.CurrUser.PersonId == Const.hfnbdId || this.CurrUser.PersonId == Const.sysglyId) { @@ -56,15 +51,15 @@ namespace FineUIPro.Web.PHTGL.Filing else if (RoleIds.Contains(Const.SedinHTGLDepartManager) && !string.IsNullOrEmpty(RoleIds)) { model.UnitId = this.CurrUser.UnitId; - model.DepartId= this.CurrUser.DepartId; + model.DepartId = this.CurrUser.DepartId; } - + else { model.UnitId = "normal"; } - + if (!string.IsNullOrEmpty(txtContractName.Text.Trim())) { model.ContractName = txtContractName.Text.Trim(); @@ -73,11 +68,11 @@ namespace FineUIPro.Web.PHTGL.Filing { model.States = Funs.GetNewInt(dropState.SelectedValue); } - var list= BLL.ContractStandingBookService.GetPHTGL_ContractStandingBookByModle( model); + var list = BLL.ContractStandingBookService.GetPHTGL_ContractStandingBookByModle(model); //var list= BLL.ContractStandingBookService.getListData( model, Grid1); if (drpDepartId.SelectedValue != Const._Null) { - list=list.Where(d => d.DepartId==drpDepartId.SelectedValue). ToList(); + list = list.Where(d => d.DepartId == drpDepartId.SelectedValue).ToList(); } Grid1.RecordCount = list.Count; var table = this.GetPagedDataTable(Grid1, list); @@ -182,8 +177,8 @@ namespace FineUIPro.Web.PHTGL.Filing dropState.SelectedValue = Const._Null; //txtSubConstruction.Text = string.Empty; } - - + + /// /// 状态 /// @@ -290,13 +285,13 @@ namespace FineUIPro.Web.PHTGL.Filing } // BLL.LogService.AddSys_Log(this.CurrUser, p.ContractName, p.ContractId, BLL.Const.ContractMenuId, BLL.Const.BtnDelete); BLL.ContractStandingBookService.DeleteContractById(rowID); - AttachFileService.DeleteAttachFile(Funs.RootPath, rowID , Const.ContractStandingBookMenuId); - // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-BidNotice", Const.ProjectBidDocumentsStandingBookMenuId); - // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ActionPlan", Const.ProjectBidDocumentsStandingBookMenuId); - // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-BidDocuments", Const.ProjectBidDocumentsStandingBookMenuId); - // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ApprovePersonForm", Const.ProjectBidDocumentsStandingBookMenuId); - // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-SetSubReview", Const.ProjectBidDocumentsStandingBookMenuId); - // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ShortListApproval", Const.ProjectBidDocumentsStandingBookMenuId); + AttachFileService.DeleteAttachFile(Funs.RootPath, rowID, Const.ContractStandingBookMenuId); + // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-BidNotice", Const.ProjectBidDocumentsStandingBookMenuId); + // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ActionPlan", Const.ProjectBidDocumentsStandingBookMenuId); + // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-BidDocuments", Const.ProjectBidDocumentsStandingBookMenuId); + // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ApprovePersonForm", Const.ProjectBidDocumentsStandingBookMenuId); + // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-SetSubReview", Const.ProjectBidDocumentsStandingBookMenuId); + // AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ShortListApproval", Const.ProjectBidDocumentsStandingBookMenuId); } } } diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookEdit.aspx.cs index f4e65242..6da5be17 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookEdit.aspx.cs @@ -1,15 +1,6 @@ using BLL; -using Model; using System; using System.Collections.Generic; -using System.Data.SqlClient; -using System.Data; -using System.Linq; -using System.Reflection; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using FineUIPro.Web.PHTGL.ContractCompile; namespace FineUIPro.Web.PHTGL.Filing { @@ -43,8 +34,8 @@ namespace FineUIPro.Web.PHTGL.Filing ViewState["ContractId"] = value; } } - - + + public bool IsCreate { @@ -90,7 +81,7 @@ namespace FineUIPro.Web.PHTGL.Filing { Model.PHTGL_ContractStandingBook contract = BLL.ContractStandingBookService.GetContractById(contractId); if (contract != null) - { + { txtEPCCode.Text = contract.EPCCode; txtContractAttribute.Text = contract.ContractAttribute; @@ -100,7 +91,7 @@ namespace FineUIPro.Web.PHTGL.Filing this.txtProjectCode.Text = contract.ProjectCode; this.txtParties.Text = contract.Parties; this.txtBuildUnit.Text = contract.BuildUnit; - this.txtCurrency.Text= contract.Currency; + this.txtCurrency.Text = contract.Currency; txtOpeningBank_TT.Text = contract.OpeningBank_TT; txtOpeningBank_Electrophore.Text = contract.OpeningBank_Electrophore; txtBankAccount_TT.Text = contract.BankAccount_TT; @@ -123,12 +114,12 @@ namespace FineUIPro.Web.PHTGL.Filing txtIsItACentralizedPurchaseSupplier.Text = contract.IsItACentralizedPurchaseSupplier; this.txtAgent.Text = contract.Agent; this.txtContractType.Text = contract.ContractType; - this.txtConfirmWay.Text= contract.ConfirmWay; - this.txtDepart.Text=BLL.DepartService.getDepartNameById(contract.DepartId); + this.txtConfirmWay.Text = contract.ConfirmWay; + this.txtDepart.Text = BLL.DepartService.getDepartNameById(contract.DepartId); this.txtContractAmount.Text = contract.ContractAmount; } - + } else { @@ -157,7 +148,7 @@ namespace FineUIPro.Web.PHTGL.Filing { ContractId = Guid.NewGuid().ToString(); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ContractStandingBook&menuId={1}", this.ContractId+"-1", BLL.Const.ContractStandingBookMenuId))); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ContractStandingBook&menuId={1}", this.ContractId + "-1", BLL.Const.ContractStandingBookMenuId))); } #endregion @@ -205,9 +196,9 @@ namespace FineUIPro.Web.PHTGL.Filing contract.ContractType = this.txtContractType.Text; contract.ConfirmWay = this.txtConfirmWay.Text; contract.DepartId = this.CurrUser.DepartId; - + contract.ContractAmount = this.txtContractAmount.Text; - if (Type==Const.BtnSubmit) + if (Type == Const.BtnSubmit) { contract.States = 1; @@ -258,7 +249,7 @@ namespace FineUIPro.Web.PHTGL.Filing } protected void btnSubmit_Click(object sender, EventArgs e) { - if (!BLL.AttachFileService.Getfile(ContractId , BLL.Const.ContractStandingBookMenuId)) + if (!BLL.AttachFileService.Getfile(ContractId, BLL.Const.ContractStandingBookMenuId)) { ShowNotify("未上传合同签字盖章扫描版文件,无法提交!", MessageBoxIcon.Warning); return; diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookIn.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookIn.aspx.cs index ace2a014..8bd65069 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookIn.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractStandingBookIn.aspx.cs @@ -5,8 +5,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.Filing @@ -203,40 +201,40 @@ namespace FineUIPro.Web.PHTGL.Filing _ContractStandingBook.DepartId = this.CurrUser.DepartId; _ContractStandingBook.Agent = this.CurrUser.PersonName; _ContractStandingBook.CreatUser = this.CurrUser.PersonId; - _ContractStandingBook.CreateDate = DateTime.Now.ToString() ; + _ContractStandingBook.CreateDate = DateTime.Now.ToString(); if (Type == "1") { _ContractStandingBook.ProjectId = this.CurrUser.LoginProjectId; } _ContractStandingBook.ContractName = item.ContractName; - _ContractStandingBook.ContractNum= item.ContractNum; - _ContractStandingBook.ProjectName= item.ProjectName; - _ContractStandingBook.ProjectCode= item.ProjectCode; - _ContractStandingBook.Parties= item.Parties; - _ContractStandingBook.Currency= item.Currency; - _ContractStandingBook.ContractAmount= item.ContractAmount; - _ContractStandingBook.ContractType= item.ContractType; - _ContractStandingBook.EPCCode= item.EPCCode; - _ContractStandingBook.ContractAttribute= item.ContractAttribute; + _ContractStandingBook.ContractNum = item.ContractNum; + _ContractStandingBook.ProjectName = item.ProjectName; + _ContractStandingBook.ProjectCode = item.ProjectCode; + _ContractStandingBook.Parties = item.Parties; + _ContractStandingBook.Currency = item.Currency; + _ContractStandingBook.ContractAmount = item.ContractAmount; + _ContractStandingBook.ContractType = item.ContractType; + _ContractStandingBook.EPCCode = item.EPCCode; + _ContractStandingBook.ContractAttribute = item.ContractAttribute; _ContractStandingBook.OpeningBank_TT = item.OpeningBankTT; _ContractStandingBook.OpeningBank_Electrophore = item.OpeningBankelectrophore; _ContractStandingBook.BankAccount_TT = item.BankAccountTT; _ContractStandingBook.BankAccount_Electrophore = item.BankAccountelectrophore; _ContractStandingBook.LineNumber_Electrophore = item.LineNumberelectrophore; - _ContractStandingBook.Retentionmoney= item.Retentionmoney; - _ContractStandingBook.Status= item.Status; - _ContractStandingBook.ContactUnitOfPartyA= item.ContactUnitOfPartyA; - _ContractStandingBook.ContactPersonOfPartyA= item.ContactPersonOfPartyA; - _ContractStandingBook.ContactPersonOfPartyB= item.ContactPersonOfPartyB; - _ContractStandingBook.ContactPersonPhoneOfPartyB= item.ContactPersonPhoneOfPartyB; - _ContractStandingBook.ContactPersonEmailOfPartyB= item.ContactPersonEmailOfPartyB; - _ContractStandingBook.ContractAmountExcludingTax= item.ContractAmountExcludingTax; - _ContractStandingBook.PriceMethod= item.PriceMethod; - _ContractStandingBook.SignedOnDate= item.SignedOnDate; - _ContractStandingBook.ContractStartDate= item.ContractStartDate; - _ContractStandingBook.ContractEndDate= item.ContractEndDate; - _ContractStandingBook.PricingBasis= item.PricingBasis; - _ContractStandingBook.SubcontractingMethod= item.SubcontractingMethod; + _ContractStandingBook.Retentionmoney = item.Retentionmoney; + _ContractStandingBook.Status = item.Status; + _ContractStandingBook.ContactUnitOfPartyA = item.ContactUnitOfPartyA; + _ContractStandingBook.ContactPersonOfPartyA = item.ContactPersonOfPartyA; + _ContractStandingBook.ContactPersonOfPartyB = item.ContactPersonOfPartyB; + _ContractStandingBook.ContactPersonPhoneOfPartyB = item.ContactPersonPhoneOfPartyB; + _ContractStandingBook.ContactPersonEmailOfPartyB = item.ContactPersonEmailOfPartyB; + _ContractStandingBook.ContractAmountExcludingTax = item.ContractAmountExcludingTax; + _ContractStandingBook.PriceMethod = item.PriceMethod; + _ContractStandingBook.SignedOnDate = item.SignedOnDate; + _ContractStandingBook.ContractStartDate = item.ContractStartDate; + _ContractStandingBook.ContractEndDate = item.ContractEndDate; + _ContractStandingBook.PricingBasis = item.PricingBasis; + _ContractStandingBook.SubcontractingMethod = item.SubcontractingMethod; _ContractStandingBook.IsItACentralizedPurchaseSupplier = item.IsItACentralizedPurchaseSupplier; ContractStandingBookList.Add(_ContractStandingBook); diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx.cs index b540c31d..e71211c9 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.PHTGL.BiddingManagement; using System; using System.Collections.Generic; using System.Data; @@ -112,7 +111,7 @@ namespace FineUIPro.Web.PHTGL.Filing strSql += " AND Con.ContractName LIKE @ContractName"; listStr.Add(new SqlParameter("@ContractName", "%" + this.txtContractName.Text.Trim() + "%")); } - if (! string .IsNullOrEmpty(drpDepartId.SelectedValue)) + if (!string.IsNullOrEmpty(drpDepartId.SelectedValue)) { strSql += " AND Con.DepartId = @DepartId"; listStr.Add(new SqlParameter("@DepartId", drpDepartId.SelectedValue)); diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/SetSubFile.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/SetSubFile.aspx.cs index eaaf8a48..b4e46d62 100644 --- a/SGGL/FineUIPro.Web/PHTGL/Filing/SetSubFile.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/Filing/SetSubFile.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.PHTGL.BiddingManagement; using System; using System.Collections.Generic; using System.Data; diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs index 275c0fde..37a88fa8 100644 --- a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs @@ -1,13 +1,9 @@ using BLL; using Model; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.InvoiceManage { @@ -15,7 +11,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage { #region 加载 - + /// /// 加载页面 /// @@ -25,7 +21,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage { if (!IsPostBack) { - + } } @@ -68,7 +64,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage var fileName = rootPath + initPath + hdFileName.Text; ResponeData responeData; - responeData = PhtglInvoiceService.ImportData(fileName, this.CurrUser.LoginProjectId,this.CurrUser.PersonId); + responeData = PhtglInvoiceService.ImportData(fileName, this.CurrUser.LoginProjectId, this.CurrUser.PersonId); if (responeData.code == 1) diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs index 707b5bf0..8d35a23c 100644 --- a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs @@ -6,9 +6,6 @@ using System.Data; using System.IO; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.InvoiceManage { @@ -38,12 +35,12 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage private void BindGrid() { Model.PHTGL_Invoice table = new Model.PHTGL_Invoice(); - table.ProjectId = this.CurrUser.LoginProjectId; - if( DropContractCode.SelectedValue!=Const._Null) + table.ProjectId = this.CurrUser.LoginProjectId; + if (DropContractCode.SelectedValue != Const._Null) { table.ContractId = this.DropContractCode.SelectedValue; } - var tb = BLL.PhtglInvoiceService.GetOrderInListData(table, Grid1,drpStates.SelectedValue); + var tb = BLL.PhtglInvoiceService.GetOrderInListData(table, Grid1, drpStates.SelectedValue); Grid1.RecordCount = PhtglInvoiceService.Count; //tb = GetFilteredTable(Grid1.FilteredData, tb); Grid1.DataSource = tb; @@ -131,7 +128,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage } if (buttonList.Contains(BLL.Const.BtnDelete)) { - // this.btnMenuDelete.Hidden = false; + // this.btnMenuDelete.Hidden = false; } } } @@ -192,23 +189,23 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage return sb.ToString(); } #endregion - - + + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) - { - if (e.CommandName== "OrderInDetail") + { + if (e.CommandName == "OrderInDetail") { Window1.Title = "入库单详情"; PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "0", "编辑 - "))); } - else if(e.CommandName== "OrderOutDetail") + else if (e.CommandName == "OrderOutDetail") { Window1.Title = "出库单详情"; PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "1", "编辑 - "))); } else if (e.CommandName == "OrderInDetailPrint") { - Print(e.RowID,"0"); + Print(e.RowID, "0"); } else if (e.CommandName == "OrderOutDetailPrint") { @@ -220,7 +217,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage { var id = e.RowID; var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(id); - if (model.State> PhtglInvoiceService.StateDataIn) + if (model.State > PhtglInvoiceService.StateDataIn) { Grid1.FindColumn("btnOrderInDetail").Hidden = false; Grid1.FindColumn("btnOrderInDetailPrint").Hidden = false; @@ -233,7 +230,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage } - private void Print(string Id,string Type) + private void Print(string Id, string Type) { BLL.FastReportService.ResetData(); if (string.IsNullOrEmpty(Id)) @@ -242,8 +239,8 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage ShowNotify("请选择要打印的项", MessageBoxIcon.Warning); return; } - - var printModel= PhtglInvoiceService.GetPHTGL_InvoicePrintModel(Id); + + var printModel = PhtglInvoiceService.GetPHTGL_InvoicePrintModel(Id); List orders = new List(); orders.Add(printModel.Order); DataTable Table1 = LINQToDataTable(orders); @@ -257,7 +254,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage Data.TableName = "Data"; } - List orderApproveIns = new List(); + List orderApproveIns = new List(); orderApproveIns.Add(printModel.ApproveIn); DataTable ApproveInData = LINQToDataTable(orderApproveIns); if (ApproveInData != null) @@ -273,11 +270,11 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage ApproveOutData.TableName = "ApproveOutData"; } - - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("AmountInWords", Funs.NumericCapitalization(printModel.Data.Sum(p => p.Amount))); - - + + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("AmountInWords", Funs.NumericCapitalization(printModel.Data.Sum(p => p.Amount))); + + BLL.FastReportService.AddFastreportTable(Table1); BLL.FastReportService.AddFastreportTable(Data); BLL.FastReportService.AddFastreportTable(ApproveInData); @@ -285,7 +282,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage BLL.FastReportService.AddFastreportParameter(keyValuePairs); string initTemplatePath = ""; string rootPath = Server.MapPath("~/"); - if (Type=="0") + if (Type == "0") { initTemplatePath = "File\\Fastreport\\发票存货入库单.frx"; } @@ -298,7 +295,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); } - } + } #region 查询 /// /// 查询按钮 diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs index 1acae3f7..53bb80d2 100644 --- a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs @@ -1,18 +1,14 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Security.Policy; using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; -using Org.BouncyCastle.Asn1.Ocsp; namespace FineUIPro.Web.PHTGL.InvoiceManage { public partial class InvoiceOrderDetail : PageBase { - public string InvoiceId { + public string InvoiceId + { get { return (string)ViewState["InvoiceId"]; @@ -47,41 +43,41 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage Type = HttpUtility.ParseQueryString(uri.Query).Get("Type"); } Model.PHTGL_Invoice table = new Model.PHTGL_Invoice(); - table.ProjectId = this.CurrUser.LoginProjectId; - table.InvoiceId=InvoiceId; + table.ProjectId = this.CurrUser.LoginProjectId; + table.InvoiceId = InvoiceId; var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId); var ContractModel = BLL.ContractService.GetContractById(invoiceModel.ContractId); - + if (invoiceModel != null) { - txtProjectName.Text=ProjectService.GetProjectNameByProjectId(invoiceModel.ProjectId); - txtContractNum.Text= ContractModel?.ContractNum; - txtSellerName.Text=invoiceModel.SellerName; - txtOrderInDate.SelectedDate=invoiceModel.OrderInDate; - txtInvoiceDate.Text=invoiceModel.InvoiceDate; - txtOrderCode.Text=invoiceModel.OrderCode; - txtInvoiceNumber.Text=invoiceModel.InvoiceNumber; - txtOrderOutDate.SelectedDate=invoiceModel.OrderOutDate; - txtMaterialRequisitionUnit.Text=invoiceModel.MaterialRequisitionUnit; + txtProjectName.Text = ProjectService.GetProjectNameByProjectId(invoiceModel.ProjectId); + txtContractNum.Text = ContractModel?.ContractNum; + txtSellerName.Text = invoiceModel.SellerName; + txtOrderInDate.SelectedDate = invoiceModel.OrderInDate; + txtInvoiceDate.Text = invoiceModel.InvoiceDate; + txtOrderCode.Text = invoiceModel.OrderCode; + txtInvoiceNumber.Text = invoiceModel.InvoiceNumber; + txtOrderOutDate.SelectedDate = invoiceModel.OrderOutDate; + txtMaterialRequisitionUnit.Text = invoiceModel.MaterialRequisitionUnit; } BindGrid(); BindApproveData(); - if (Type=="0") + if (Type == "0") { Grid1.Title = "入库单列表"; PanelOrderIn.Hidden = false; } - else if (Type=="1") + else if (Type == "1") { PanelOrderOut.Hidden = false; Grid1.Title = "出库单列表"; } - if (invoiceModel.CreateUser== this.CurrUser.PersonId) //创建人 + if (invoiceModel.CreateUser == this.CurrUser.PersonId) //创建人 { TbCreate.Hidden = false; - if (invoiceModel.State> PhtglInvoiceService.StateCreate) + if (invoiceModel.State > PhtglInvoiceService.StateCreate) { Form_approve.Hidden = false; } @@ -91,14 +87,14 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage { TbApprove.Hidden = false; Form_approve.Hidden = false; - - } + + } } } public void BindApproveData() - { - var approveModel = PHTGL_ApproveService.GetAllApproveData(InvoiceId, Type=="0"? "Invoice_Input" : "Invoice_Output"); + { + var approveModel = PHTGL_ApproveService.GetAllApproveData(InvoiceId, Type == "0" ? "Invoice_Input" : "Invoice_Output"); if (approveModel != null) { Grid2.DataSource = approveModel; @@ -110,16 +106,16 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage var invoiceDetail = PhtglInvoicedetailService.GetPHTGL_InvoiceDetailByInvoiceId(InvoiceId); Grid1.DataSource = invoiceDetail; Grid1.DataBind(); - txtSumUnitPrice.Text= invoiceDetail.Sum(p=>p.UnitPrice).ToString(); - txtSumTax.Text=invoiceDetail.Sum(p=>p.Tax).ToString(); - txtSumAmount.Text=invoiceDetail.Sum(p=>p.Amount).ToString(); - txtAmountInWords.Text = Funs.NumericCapitalization(invoiceDetail.Sum(p => p.Amount)??0); + txtSumUnitPrice.Text = invoiceDetail.Sum(p => p.UnitPrice).ToString(); + txtSumTax.Text = invoiceDetail.Sum(p => p.Tax).ToString(); + txtSumAmount.Text = invoiceDetail.Sum(p => p.Amount).ToString(); + txtAmountInWords.Text = Funs.NumericCapitalization(invoiceDetail.Sum(p => p.Amount) ?? 0); } - + protected void Grid1_OnRowCommand(object sender, GridCommandEventArgs e) { - if (e.CommandName=="delete") + if (e.CommandName == "delete") { PhtglInvoicedetailService.DeletePHTGL_InvoiceDetailById(e.RowID); BindGrid(); @@ -128,7 +124,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) { - if (Type=="1") + if (Type == "1") { Grid1.FindColumn("btnDelete").Hidden = true; } @@ -136,26 +132,26 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage protected string GetTaxRate(object eval) { - string result=""; - if (eval!=null) + string result = ""; + if (eval != null) { decimal taxRate = Convert.ToDecimal(eval); string percentage = string.Format("{0:P0}", taxRate); - result= percentage.Replace("%", ""); - } + result = percentage.Replace("%", ""); + } return result; } protected string GetNoTaxPrice(object amount, object tax) { //获取amount-tax 的值 - string result=""; + string result = ""; if (amount != null && tax != null) { decimal amountValue = Convert.ToDecimal(amount); decimal taxValue = Convert.ToDecimal(tax); decimal noTaxPrice = amountValue - taxValue; - result= noTaxPrice.ToString(); + result = noTaxPrice.ToString(); } return result; } @@ -163,12 +159,12 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage protected void btnSave_Click(object sender, EventArgs e) { var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId); - invoiceModel.OrderInDate=txtOrderInDate.SelectedDate; - invoiceModel.OrderOutDate=txtOrderOutDate.SelectedDate; - invoiceModel.OrderCode=txtOrderCode.Text; - invoiceModel.MaterialRequisitionUnit=txtMaterialRequisitionUnit.Text; + invoiceModel.OrderInDate = txtOrderInDate.SelectedDate; + invoiceModel.OrderOutDate = txtOrderOutDate.SelectedDate; + invoiceModel.OrderCode = txtOrderCode.Text; + invoiceModel.MaterialRequisitionUnit = txtMaterialRequisitionUnit.Text; BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(invoiceModel); - ShowNotify("保存成功!" ,MessageBoxIcon.Success); + ShowNotify("保存成功!", MessageBoxIcon.Success); } protected void btnEditProcess_Click(object sender, EventArgs e) @@ -187,7 +183,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage protected void btnAgree_Click(object sender, EventArgs e) { - PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type),this.CurrUser.PersonId,true, txtApproveIdea.Text); + PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type), this.CurrUser.PersonId, true, txtApproveIdea.Text); ShowNotify("审批成功!", MessageBoxIcon.Success); if (!string.IsNullOrEmpty(Request.Params["PHTUrl"])) { diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs index f5dd7f3b..1cd00c00 100644 --- a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs @@ -1,9 +1,7 @@ using BLL; using Model; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; using System.Web.UI; using System.Web.UI.WebControls; @@ -40,25 +38,25 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage InvoiceId = Request.QueryString["InvoiceId"]; Type = Request.QueryString["Type"]; this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - var model= PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId); + var model = PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId); int[] arr = new Int32[] { PhtglInvoiceService.StateCreate, PhtglInvoiceService.StateInPutApproveRefuse, PhtglInvoiceService.StateInPutApproveSuccess, PhtglInvoiceService.StateOutPutApproveRefuse, }; if (arr.ToList().Contains(model.State.Value)) { - if (model.State== PhtglInvoiceService.StateInPutApproveRefuse|| model.State == PhtglInvoiceService.StateOutPutApproveRefuse) + if (model.State == PhtglInvoiceService.StateInPutApproveRefuse || model.State == PhtglInvoiceService.StateOutPutApproveRefuse) { - btnSubmit.Text="重新发起流程"; + btnSubmit.Text = "重新发起流程"; } btnSubmit.Hidden = false; } - if (Type=="0") + if (Type == "0") { Panel_OrderIn.Hidden = false; - + } else if (Type == "1") { Panel_OrderOut.Hidden = false; - } + } //入库下拉框 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProfessionalEngineer, null, Const.UnitId_SEDIN, null, true);//专业工程师 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConstructionManager, null, Const.UnitId_SEDIN, null, true);//施工经理 @@ -71,18 +69,18 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConUnitMaterialOfficer, null, Const.UnitId_SEDIN, null, true);//施工单位材料经理 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConUnitProjectManager, null, Const.UnitId_SEDIN, null, true);//施工单位项目经理 - var invoiceApproveManEntity= PhtglInvoiceService.GetInvoiceApproveManEntity(InvoiceId); + var invoiceApproveManEntity = PhtglInvoiceService.GetInvoiceApproveManEntity(InvoiceId); //入库下拉框初始化值 - DropProfessionalEngineer.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ProjectManager; - DropConstructionManager.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ConstructionManager; - DropControlManager_In.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ControlManager; - DropProjectManager_In.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ProjectManager; + DropProfessionalEngineer.SelectedValue = invoiceApproveManEntity.InputApproveMan?.ProjectManager; + DropConstructionManager.SelectedValue = invoiceApproveManEntity.InputApproveMan?.ConstructionManager; + DropControlManager_In.SelectedValue = invoiceApproveManEntity.InputApproveMan?.ControlManager; + DropProjectManager_In.SelectedValue = invoiceApproveManEntity.InputApproveMan?.ProjectManager; //出库下拉框初始化值 - DropPurchasingMan.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.PurchasingMan; - DropControlManager_Out.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ControlManager; - DropProjectManager_Out.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ProjectManager; - DropConUnitMaterialOfficer.SelectedValue = invoiceApproveManEntity.OutputApproveMan?.ConUnitMaterialOfficer; - DropConUnitProjectManager.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ConUnitProjectManager; + DropPurchasingMan.SelectedValue = invoiceApproveManEntity.OutputApproveMan?.PurchasingMan; + DropControlManager_Out.SelectedValue = invoiceApproveManEntity.OutputApproveMan?.ControlManager; + DropProjectManager_Out.SelectedValue = invoiceApproveManEntity.OutputApproveMan?.ProjectManager; + DropConUnitMaterialOfficer.SelectedValue = invoiceApproveManEntity.OutputApproveMan?.ConUnitMaterialOfficer; + DropConUnitProjectManager.SelectedValue = invoiceApproveManEntity.OutputApproveMan?.ConUnitProjectManager; } @@ -117,10 +115,10 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage } var model_In = new Inputapproveman() { - ProfessionalEngineer= DropProfessionalEngineer.SelectedValue, - ConstructionManager= DropConstructionManager.SelectedValue, - ControlManager= DropControlManager_In.SelectedValue, - ProjectManager= DropProjectManager_In.SelectedValue + ProfessionalEngineer = DropProfessionalEngineer.SelectedValue, + ConstructionManager = DropConstructionManager.SelectedValue, + ControlManager = DropControlManager_In.SelectedValue, + ProjectManager = DropProjectManager_In.SelectedValue }; var model_Out = new Outputapproveman() { @@ -139,17 +137,17 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage { PhtglInvoiceService.SaveOutputApproveManEntity(InvoiceId, model_Out); } - - + + } protected void btnSubmit_Click(object sender, EventArgs e) { - Save(); - PhtglInvoiceService.StartApprovalProcess(InvoiceId); - OAWebSevice.Pushoa(); - ShowNotify("提交成功!",MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetHideReference()); + Save(); + PhtglInvoiceService.StartApprovalProcess(InvoiceId); + OAWebSevice.Pushoa(); + ShowNotify("提交成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHideReference()); } protected void btnSave_Click(object sender, EventArgs e) diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs index d263b701..f6166712 100644 --- a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs @@ -1,15 +1,10 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.InvoiceManage { - public partial class InvoiceStandingBook :PageBase + public partial class InvoiceStandingBook : PageBase { protected void Page_Load(object sender, EventArgs e) @@ -30,9 +25,9 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage private void BindGrid() { Model.PHTGL_Invoice table = new Model.PHTGL_Invoice(); - table.ProjectId=this.CurrUser.LoginProjectId; + table.ProjectId = this.CurrUser.LoginProjectId; table.State = PhtglInvoiceService.StateDataIn; - var tb = BLL.PhtglInvoiceService.GetListData(table, Grid1); + var tb = BLL.PhtglInvoiceService.GetListData(table, Grid1); Grid1.RecordCount = PhtglInvoiceService.Count; //tb = GetFilteredTable(Grid1.FilteredData, tb); Grid1.DataSource = tb; @@ -177,7 +172,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage { if (buttonList.Contains(BLL.Const.BtnAdd)) { - // this.btnNew.Hidden = false; + // this.btnNew.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnModify)) { @@ -263,7 +258,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage } string ID = Grid1.SelectedRowID; var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(ID); - if (model != null && !string.IsNullOrEmpty(model.ContractId)) + if (model != null && !string.IsNullOrEmpty(model.ContractId)) { PhtglInvoiceService.ChangeStateToCreate(model.InvoiceId); ShowNotify("操作成功!", MessageBoxIcon.Success); diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs index da04f886..a739d644 100644 --- a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs @@ -1,10 +1,5 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PHTGL.InvoiceManage { @@ -44,7 +39,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage Model.PHTGL_Invoice model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(this.InvoiceId); if (model != null) { - + this.txtInvoiceCode.Text = model.InvoiceCode; this.txtInvoiceNumber.Text = model.InvoiceNumber; this.txtSellerName.Text = model.SellerName; @@ -69,16 +64,16 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage /// protected void btnSave_Click(object sender, EventArgs e) { - + if (string.IsNullOrEmpty(this.InvoiceId)) { - ShowNotify("暂不支持新增",MessageBoxIcon.Warning); + ShowNotify("暂不支持新增", MessageBoxIcon.Warning); } else { var model = PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId); - model.ContractId= DropContractCode.SelectedValue; + model.ContractId = DropContractCode.SelectedValue; BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(model); } PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.cs index fbea2170..cbc484f4 100644 --- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.cs @@ -3,7 +3,6 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; -using System.Linq; using System.Web.UI.WebControls; namespace FineUIPro.Web.PZHGL.InformationProject diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.cs index 6c288139..582d1798 100644 --- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.cs @@ -694,7 +694,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.CellFormat.Width = 37; - builder.Write(list2.Sum(x=>x.ContractAmount??0).ToString("0.####")); + builder.Write(list2.Sum(x => x.ContractAmount ?? 0).ToString("0.####")); //本月应付 builder.InsertCell(); builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.cs index e8623af4..eedd3c77 100644 --- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.cs @@ -3,9 +3,7 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; -using System.Linq; using System.Web; -using System.Web.UI.WebControls; namespace FineUIPro.Web.PZHGL.InformationProject { diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs index 8cc342be..83d4faa9 100644 --- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs @@ -2143,8 +2143,8 @@ namespace FineUIPro.Web.PZHGL.InformationProject where personLogIds.Contains(x.ConstructionLogId) select x; var allHJGLs = from x in db.ZHGL_ConstructionLogHJGL - where personLogIds.Contains(x.ConstructionLogId) - select x; + where personLogIds.Contains(x.ConstructionLogId) + select x; List personItems = new List(); List workPostList = Funs.GetStrListByStr(this.hdWorkPostId.Text, ','); workPostList.Distinct(); diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLogWorkEfficiency.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLogWorkEfficiency.aspx.cs index eaa3f0e4..cecdc8de 100644 --- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLogWorkEfficiency.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLogWorkEfficiency.aspx.cs @@ -1,9 +1,7 @@ using BLL; -using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; -using System.Linq; using System.Web.UI.WebControls; namespace FineUIPro.Web.PZHGL.InformationProject diff --git a/SGGL/FineUIPro.Web/Person/CompanyPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/CompanyPerson.aspx.cs index a3718022..d5f77fcf 100644 --- a/SGGL/FineUIPro.Web/Person/CompanyPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/CompanyPerson.aspx.cs @@ -39,7 +39,7 @@ namespace FineUIPro.Web.Person private void BindGrid() { var getData = Person_PersonsService.getListData(Const.UnitId_SEDIN, this.drpDepart.SelectedValue, this.drpProject.SelectedValue, - this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, null,null, Grid1); + this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, null, null, Grid1); Grid1.RecordCount = Person_PersonsService.count; Grid1.DataSource = getData; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs index 6c7fcb49..0594c58e 100644 --- a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using Model; using System; using System.Collections.Generic; using System.Linq; @@ -28,7 +27,7 @@ namespace FineUIPro.Web.Person this.drpIsPost.SelectedValue = Const._True; DropListService.InitConstDropDownList(this.drpPersonType, DropListService.Group_PersonType, false); Funs.FineUIPleaseSelect(drpPersonType, "按员工类别查询"); - + WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, false); Funs.FineUIPleaseSelect(drpWorkPost, "按岗位查询"); // 绑定表格 @@ -46,7 +45,7 @@ namespace FineUIPro.Web.Person string personId = Grid1.SelectedRowID; if (args.Length > 0 && !string.IsNullOrEmpty(personId)) { - var commandName = args[0]; + var commandName = args[0]; if (commandName == "editit") { if (!this.btnMenuEdit.Hidden) @@ -103,7 +102,7 @@ namespace FineUIPro.Web.Person /// private void BindGrid() { - string[] workPostIds= this.drpWorkPost.SelectedValueArray.Where(x => x != Const._Null).ToArray(); + string[] workPostIds = this.drpWorkPost.SelectedValueArray.Where(x => x != Const._Null).ToArray(); var getData = Person_PersonsService.getListData(Const.UnitId_SEDIN, Const.Depart_constructionId, this.drpProject.SelectedValue, this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, null, workPostIds, Grid1); Grid1.RecordCount = Person_PersonsService.count; @@ -164,7 +163,7 @@ namespace FineUIPro.Web.Person /// protected void btnMenuDelete_Click(object sender, EventArgs e) { - // this.PageSize = this.Grid1.PageIndex; + // this.PageSize = this.Grid1.PageIndex; this.DeleteData(); } @@ -332,7 +331,7 @@ namespace FineUIPro.Web.Person if (getPerson != null && getPerson.IsPost == true) { var getcuuProject = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == getPerson.IdentityCard && x.States == Const.ProjectPersonStates_1); - if (getcuuProject != null && (getPerson.MultiProject == false|| !getPerson.MultiProject.HasValue)) + if (getcuuProject != null && (getPerson.MultiProject == false || !getPerson.MultiProject.HasValue)) { SitePerson_PersonService.SetSitePerson_PersonStates(getcuuProject.SitePersonId, Const.ProjectPersonStates_2, DateTime.Now); } @@ -351,7 +350,7 @@ namespace FineUIPro.Web.Person using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { int count = 0; - var getSitePersons = db.SitePerson_PersonItem.Where(x=>x.IdentityCard != null).Select(x => x.IdentityCard).Distinct(); + var getSitePersons = db.SitePerson_PersonItem.Where(x => x.IdentityCard != null).Select(x => x.IdentityCard).Distinct(); if (getSitePersons.Count() > 0) { foreach (var item in getSitePersons) diff --git a/SGGL/FineUIPro.Web/Person/DepartPersonShunt.aspx.cs b/SGGL/FineUIPro.Web/Person/DepartPersonShunt.aspx.cs index fb0fffea..3994c806 100644 --- a/SGGL/FineUIPro.Web/Person/DepartPersonShunt.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/DepartPersonShunt.aspx.cs @@ -1,11 +1,7 @@ using BLL; -using FastReport.DevComponents.Editors; using Model; using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; -using System.Data; -using System.Data.SqlClient; using System.Linq; using AspNet = System.Web.UI.WebControls; @@ -29,7 +25,7 @@ namespace FineUIPro.Web.Person this.GetButtonPower(); WorkPostService.InitWorkPostNameByTypeDropDownList2(this.drpWorkPost, "1", false); //加载管理岗位 Funs.FineUIPleaseSelect(this.drpWorkPost, "请选择岗位"); - + WorkPostService.InitWorkPostNameByTypeDropDownList(this.drpWP, Const.PostType_1, false); //加载管理岗位 Funs.FineUIPleaseSelectNull(this.drpWP, "请选择岗位"); @@ -53,7 +49,7 @@ namespace FineUIPro.Web.Person /// private void BindGrid() { - var getData = Person_ShuntService.getListData(this.drpWorkPost.SelectedValue,this.drpPostTitle.SelectedValue,String.Empty,this.drpCertificate.SelectedValue, Grid1); + var getData = Person_ShuntService.getListData(this.drpWorkPost.SelectedValue, this.drpPostTitle.SelectedValue, String.Empty, this.drpCertificate.SelectedValue, Grid1); Grid1.RecordCount = Person_ShuntService.count; Grid1.DataSource = getData; Grid1.DataBind(); @@ -79,7 +75,7 @@ namespace FineUIPro.Web.Person /// private void GetButtonPower() { - var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DepartPersonShuntMenuId); + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DepartPersonShuntMenuId); if (buttonList.Count() > 0) { if (buttonList.Contains(BLL.Const.BtnAdd)) @@ -101,7 +97,7 @@ namespace FineUIPro.Web.Person } #endregion - + /// /// 关闭弹出窗 /// @@ -295,7 +291,7 @@ namespace FineUIPro.Web.Person return; } - int count=0; + int count = 0; int outCount = 0; var workPosts = BLL.WorkPostService.GetWorkPostList(); foreach (JObject mergedRow in Grid1.GetMergedData()) @@ -306,7 +302,7 @@ namespace FineUIPro.Web.Person if (cb.Checked) //选择项 { string personId = this.Grid1.Rows[i].RowID; - string workPostId = string.Empty; + string workPostId = string.Empty; var getWorkPost = WorkPostService.GetWorkPostByName(values.Value("WorkPost")); if (getWorkPost != null) { @@ -331,7 +327,7 @@ namespace FineUIPro.Web.Person string message = "批量派遣成功!共计成功" + count.ToString() + "人。"; if (outCount > 0) { - message+="未能派遣(不在职)人员" + outCount.ToString() + "人。"; + message += "未能派遣(不在职)人员" + outCount.ToString() + "人。"; } ShowNotify(message, MessageBoxIcon.Success); BindGrid(); @@ -390,12 +386,12 @@ namespace FineUIPro.Web.Person DataId = newProjectPerson.PersonId, ProjectId = newProjectPerson.ProjectId, }; - SitePerson_PersonService.UpdateSitePerson(newProjectPerson,newlog); + SitePerson_PersonService.UpdateSitePerson(newProjectPerson, newlog); LogService.AddSys_Log(this.CurrUser, newProjectPerson.IdentityCard, newProjectPerson.SitePersonId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnModify); } else { - newProjectPerson.SitePersonId = SQLHelper.GetNewID(); + newProjectPerson.SitePersonId = SQLHelper.GetNewID(); SitePerson_PersonService.AddSitePerson(newProjectPerson); LogService.AddSys_Log(this.CurrUser, newProjectPerson.IdentityCard, newProjectPerson.SitePersonId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnAdd); } diff --git a/SGGL/FineUIPro.Web/Person/PersonContractEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonContractEdit.aspx.cs index cf5b1b8a..ff4c717f 100644 --- a/SGGL/FineUIPro.Web/Person/PersonContractEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/PersonContractEdit.aspx.cs @@ -70,7 +70,7 @@ namespace FineUIPro.Web.Person { this.PersonId = getData.PersonId; this.drpUnit.SelectedValue = getData.UnitId; - this.drpProject.SelectedValue = getData.ProjectId; + this.drpProject.SelectedValue = getData.ProjectId; this.txtTelephone.Text = getData.Telephone; this.drpContractType.SelectedValue = getData.ContractType; this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", getData.StartDate); @@ -87,7 +87,7 @@ namespace FineUIPro.Web.Person this.txtPersonName.Text = person.PersonName; this.txtIdentityCard.Text = person.IdentityCard; } - + if (Request.Params["value"] == "0") { this.btnSave.Hidden = true; @@ -120,7 +120,7 @@ namespace FineUIPro.Web.Person PersonContractId = this.PersonContractId, StartDate = Funs.GetNewDateTime(this.txtStartDate.Text.Trim()), EndDate = Funs.GetNewDateTime(this.txtEndDate.Text.Trim()), - Telephone=this.txtTelephone.Text.Trim(), + Telephone = this.txtTelephone.Text.Trim(), }; if (!string.IsNullOrEmpty(this.drpProject.SelectedValue) && this.drpProject.SelectedValue != Const._Null) { diff --git a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs index 4e630094..f3f65ca8 100644 --- a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs @@ -1,6 +1,4 @@ using BLL; -using FineUIPro.Web.HSSE.SitePerson; -using Model; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -8,7 +6,6 @@ using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using System.Web.UI.DataVisualization.Charting; namespace FineUIPro.Web.Person { @@ -113,7 +110,7 @@ namespace FineUIPro.Web.Person if (person.IsForeign.HasValue) { this.ckIsForeign.Checked = person.IsForeign.Value; - } + } if (person.IsOffice.HasValue) { this.ckIsOffice.Checked = person.IsOffice.Value; @@ -241,7 +238,7 @@ namespace FineUIPro.Web.Person } } - + } else { @@ -284,7 +281,7 @@ namespace FineUIPro.Web.Person SynchroSetService.InitCountryDropDownList(this.drpCountryCode, false); this.drpCountryCode.SelectedValue = "101"; CityService.InitCityDropDownList(this.drpProvinceCode, this.drpCountryCode.SelectedValue, true); - + DropListService.InitConstRadioButtonList(this.rbPersonType, DropListService.Group_PersonType, "1"); } @@ -560,12 +557,12 @@ namespace FineUIPro.Web.Person Address = this.txtAddress.Text.Trim(), SignatureUrl = this.SignatureUrl, IsPost = this.ckIsPost.Checked, - MultiProject=this.ckIsMultiProject.Checked, + MultiProject = this.ckIsMultiProject.Checked, IsOffice = this.ckIsOffice.Checked, }; newPerson.HomePageType = this.rblHomePageType.SelectedValue; newPerson.IsInspectionBrigade = cbIsInspectionBrigade.Checked; - newPerson.RoleIds = Funs.GetStringByArray(this.drpRole.SelectedValueArray); + newPerson.RoleIds = Funs.GetStringByArray(this.drpRole.SelectedValueArray); if (!string.IsNullOrEmpty(imgPhoto.ImageUrl) && imgPhoto.ImageUrl != "~/res/images/blank.png") { newPerson.PhotoUrl = imgPhoto.ImageUrl.Replace("~/", ""); @@ -711,7 +708,7 @@ namespace FineUIPro.Web.Person } } #endregion - + #region 证书信息 /// /// diff --git a/SGGL/FineUIPro.Web/Person/PersonItemEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonItemEdit.aspx.cs index 36f9a595..b56657eb 100644 --- a/SGGL/FineUIPro.Web/Person/PersonItemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/PersonItemEdit.aspx.cs @@ -65,7 +65,7 @@ namespace FineUIPro.Web.Person this.drpUnit.SelectedValue = getData.UnitId; this.txtUnitName.Text = getData.UnitName; this.drpProject.SelectedValue = getData.ProjectId; - this.txtProjectName.Text = getData.ProjectName; + this.txtProjectName.Text = getData.ProjectName; this.txtTeamGroupName.Text = getData.TeamGroupName; this.drpWorkPost.SelectedValue = getData.WorkPostId; this.txtWorkPostName.Text = getData.WorkPostName; @@ -73,7 +73,7 @@ namespace FineUIPro.Web.Person this.txtOutTime.Text = string.Format("{0:yyyy-MM-dd}", getData.OutTime); this.txtOutResult.Text = getData.OutResult; - TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroup, getData.ProjectId,getData.UnitId, true); + TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroup, getData.ProjectId, getData.UnitId, true); this.drpTeamGroup.SelectedValue = getData.TeamGroupId; } } @@ -84,7 +84,7 @@ namespace FineUIPro.Web.Person this.txtPersonName.Text = person.PersonName; this.txtIdentityCard.Text = person.IdentityCard; } - + if (Request.Params["value"] == "0") { this.btnSave.Hidden = true; @@ -155,7 +155,7 @@ namespace FineUIPro.Web.Person { newData.TeamGroupName = this.txtTeamGroupName.Text.Trim(); } - + if (!string.IsNullOrEmpty(this.PersonItemId)) { BLL.SitePerson_PersonItemService.UpdatePersonItem(newData); @@ -165,7 +165,7 @@ namespace FineUIPro.Web.Person { this.PersonItemId = SQLHelper.GetNewID(); newData.PersonItemId = this.PersonItemId; - BLL.SitePerson_PersonItemService.AddPersonItem(newData,null); + BLL.SitePerson_PersonItemService.AddPersonItem(newData, null); BLL.LogService.AddSys_Log(this.CurrUser, newData.PersonName, newData.PersonItemId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnAdd); } @@ -186,7 +186,7 @@ namespace FineUIPro.Web.Person { this.txtProjectName.Text = this.drpProject.SelectedText; } - SetTeam(); + SetTeam(); } /// @@ -196,7 +196,7 @@ namespace FineUIPro.Web.Person /// protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) { - if(!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != Const._Null) + if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != Const._Null) { this.txtUnitName.Text = this.drpUnit.SelectedText; } diff --git a/SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs index 38c3d348..0d0e270c 100644 --- a/SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/PersonLib.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using Model; using System; using System.Linq; @@ -47,7 +46,7 @@ namespace FineUIPro.Web.Person private void BindGrid() { var getData = Person_PersonsService.getListData(this.drpUnit.SelectedValue, this.drpDepart.SelectedValue, this.drpProject.SelectedValue, - this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, this.txtAccount.Text.Trim(),null, Grid1); + this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.drpIsPost.SelectedValue, this.drpPersonType.SelectedValue, this.txtAccount.Text.Trim(), null, Grid1); Grid1.RecordCount = Person_PersonsService.count; Grid1.DataSource = getData; Grid1.DataBind(); @@ -253,8 +252,8 @@ namespace FineUIPro.Web.Person { int countRecod = 0; int pCountRecod = 0; - string info=string.Empty; - var getPerson = (from x in Funs.DB.Person_Persons + string info = string.Empty; + var getPerson = (from x in Funs.DB.Person_Persons where x.IdentityCard != null && x.IdentityCard.Length > 1 && !x.Birthday.HasValue && x.IsCardNoOK.Value select x).Take(1000); foreach (var item in getPerson) @@ -265,18 +264,18 @@ namespace FineUIPro.Web.Person string qrUrl = BLL.CreateQRCodeService.CreateCode_Simple("person$" + item.IdentityCard); item.QRCodeAttachUrl = ("~/" + qrUrl); } - + DateTime? birth = IDCardValid.getBirthByIDCard(item.IdentityCard); if (birth.HasValue) { item.Birthday = birth.Value; } - + Funs.DB.SubmitChanges(); countRecod++; } info = "操作完成,共处理人员按身份证设置年龄" + countRecod.ToString() + "条。"; - + //var getPPersons = (from x in Funs.DB.SitePerson_Person // join y in Funs.DB.Person_Persons on x.PersonId equals y.PersonId // where x.States == Const.ProjectPersonStates_1 && y.CurrentProjectId == null diff --git a/SGGL/FineUIPro.Web/Person/PersonTrainEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonTrainEdit.aspx.cs index 76412068..2980d0c0 100644 --- a/SGGL/FineUIPro.Web/Person/PersonTrainEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/PersonTrainEdit.aspx.cs @@ -58,7 +58,7 @@ namespace FineUIPro.Web.Person if (getData != null) { this.PersonId = getData.PersonId; - this.drpTrainType.SelectedValue = getData.TrainTypeId; + this.drpTrainType.SelectedValue = getData.TrainTypeId; this.txtTrainDate.Text = string.Format("{0:yyyy-MM-dd}", getData.TrainDate); this.txtTrainPlace.Text = getData.TrainPlace; this.txtTrainResult.Text = getData.TrainResult; @@ -71,7 +71,7 @@ namespace FineUIPro.Web.Person this.txtPersonName.Text = person.PersonName; this.txtIdentityCard.Text = person.IdentityCard; } - + if (Request.Params["value"] == "0") { this.btnSave.Hidden = true; @@ -106,7 +106,7 @@ namespace FineUIPro.Web.Person TrainPlace = this.txtTrainPlace.Text.Trim(), TrainResult = this.txtTrainResult.Text.Trim(), }; - + if (!string.IsNullOrEmpty(this.PersonTrainId)) { BLL.Person_PersonTrainService.UpdateData(newData); diff --git a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs index 883e3665..6d06ace9 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs @@ -20,7 +20,7 @@ namespace FineUIPro.Web.Person this.GetButtonPower(); this.btnNew.OnClientClick = Window1.GetShowReference("ProjectPersonEdit.aspx") + "return false;"; ProjectService.InitProjectShortNameDropDownList(this.drpProject, false); - this.drpProject.SelectedIndex= 0; + this.drpProject.SelectedIndex = 0; Funs.FineUIPleaseSelect(drpProject, "按项目查询"); Funs.FineUIPleaseSelect(drpUnit, "按单位查询"); @@ -99,7 +99,7 @@ namespace FineUIPro.Web.Person /// private void BindGrid() { - var getData = SitePerson_PersonService.getListData(this.drpProject.SelectedValue, this.drpUnit.SelectedValue,this.drpDepart.SelectedValue, this.drpWorkPost.SelectedValue, + var getData = SitePerson_PersonService.getListData(this.drpProject.SelectedValue, this.drpUnit.SelectedValue, this.drpDepart.SelectedValue, this.drpWorkPost.SelectedValue, this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.rbIsPostStates.SelectedValue, this.drpPersonType.SelectedValue, Grid1); Grid1.RecordCount = SitePerson_PersonService.count; Grid1.DataSource = getData; @@ -328,7 +328,7 @@ namespace FineUIPro.Web.Person Alert.ShowInParent("操作完成!共补卡号" + count.ToString() + "个。", MessageBoxIcon.Information); BindGrid(); } - else + else { Alert.ShowInParent("请先选择项目!", MessageBoxIcon.Warning); } diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs index 1fbba3a0..9a45fa58 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FastReport.Editor.Syntax; using Model; using Newtonsoft.Json.Linq; using System; @@ -97,7 +96,7 @@ namespace FineUIPro.Web.Person { SetPersonInfo(getPersons); } - + this.txtIdentityCard.Focus(); } @@ -165,7 +164,7 @@ namespace FineUIPro.Web.Person this.drpProjectRole.Enabled = true; } } - } + } } #endregion #endregion @@ -202,7 +201,7 @@ namespace FineUIPro.Web.Person this.txtIdentityCard.Readonly = true; } - var getProjectPersom = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.drpProject.SelectedValue,this.PersonId); + var getProjectPersom = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.drpProject.SelectedValue, this.PersonId); if (getProjectPersom != null) { this.SitePersonId = getProjectPersom.SitePersonId; @@ -215,7 +214,7 @@ namespace FineUIPro.Web.Person this.SitePersonId = getProjectPerson.SitePersonId; } } - + #region 基本信息 this.txtPersonName.Text = person.PersonName; this.drpUnit.SelectedValue = person.UnitId; @@ -224,13 +223,13 @@ namespace FineUIPro.Web.Person string name = UnitService.GetUnitNameByUnitId(person.UnitId); var getIsPost = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == person.IdentityCard && x.States != Const.ProjectPersonStates_2 && x.ProjectId != this.drpProject.SelectedValue); if (getIsPost != null) - { + { Alert.ShowInParent("当前人员所属单位【" + name + "】不在该项目单位中且人员在项目" + ProjectService.GetProjectNameByProjectId(getIsPost.ProjectId) + "不是【离岗】状态,请查证!", MessageBoxIcon.Warning); } else { Alert.ShowInParent("当前人员所属单位【" + name + "】不在该项目单位中,请重新选择所属单位!", MessageBoxIcon.Warning); - } + } } this.txtAccount.Text = person.Account; if (person.IsForeign.HasValue) @@ -431,7 +430,7 @@ namespace FineUIPro.Web.Person { this.drpUnit.SelectedValue = this.CurrUser.UnitId ?? ProjectService.getProjectUnitIdByUnitType(this.drpProject.SelectedValue, Const.ProjectUnitType_1); } - Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpAuditor, this.drpProject.SelectedValue, ProjectService.getProjectUnitIdByUnitType(this.drpProject.SelectedValue,Const.ProjectUnitType_1), BLL.Const.HSSEManager + "," + BLL.Const.HSSEAssistantManager, false); + Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpAuditor, this.drpProject.SelectedValue, ProjectService.getProjectUnitIdByUnitType(this.drpProject.SelectedValue, Const.ProjectUnitType_1), BLL.Const.HSSEManager + "," + BLL.Const.HSSEAssistantManager, false); TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroup, this.drpProject.SelectedValue, this.drpUnit.SelectedValue, false); gvWorkArea.DataSource = UnitWorkService.GetUnitWorkLists(this.drpProject.SelectedValue); gvWorkArea.DataBind();//单位工程 @@ -774,7 +773,7 @@ namespace FineUIPro.Web.Person } else { - string info="提示:"; + string info = "提示:"; if (!string.IsNullOrEmpty(personInfo)) { info += personInfo; @@ -888,7 +887,7 @@ namespace FineUIPro.Web.Person OutTime = Funs.GetNewDateTime(this.txtOutTime.Text), OutResult = this.txtOutResult.Text.Trim(), States = string.IsNullOrEmpty(this.hdStates.Text) ? Const.ProjectPersonStates_0 : this.hdStates.Text, - IsSafetyMonitoring=this.ckIsSafetyMonitoring.Checked, + IsSafetyMonitoring = this.ckIsSafetyMonitoring.Checked, IsCQMSCheck = this.ckIsCQMSCheck.Checked }; if (newPerson.States == Const.ProjectPersonStates_2 || newPerson.States == Const.ProjectPersonStates_R) diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.cs index 59a1a619..f6a925c4 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.cs @@ -1,8 +1,5 @@ using BLL; -using FastReport.Editor.Syntax; -using Newtonsoft.Json.Linq; using System; -using System.IO; using System.Linq; namespace FineUIPro.Web.Person @@ -79,7 +76,7 @@ namespace FineUIPro.Web.Person this.drpProject.Readonly = false; Alert.ShowInParent("请先选择项目!", MessageBoxIcon.Warning); } - + getInitGridCertificate(); getInitGridTestRecord(); getInitGridInOut(); @@ -221,7 +218,7 @@ namespace FineUIPro.Web.Person } this.hdStates.Text = getProjectPerson.States; this.lbStates.Text = GetProjectPersonStates(getProjectPerson.States); - + this.drpProject.SelectedValue = getProjectPerson.ProjectId; InitDropDownListProject(); this.drpUnit.SelectedValue = getProjectPerson.UnitId; diff --git a/SGGL/FineUIPro.Web/PersonManage/Test/TestPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/PersonManage/Test/TestPlanEdit.aspx.cs index 9f4c007e..a1eb8bc5 100644 --- a/SGGL/FineUIPro.Web/PersonManage/Test/TestPlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PersonManage/Test/TestPlanEdit.aspx.cs @@ -40,14 +40,14 @@ namespace FineUIPro.Web.PersonManage.Test this.TestPlanId = Request.Params["TestPlanId"]; this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); Funs.FineUIPleaseSelect(this.drpUserType); - // Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpPlanMan, this.CurrUser.LoginProjectId, Const.UnitId_SEDIN, null, true); + // Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpPlanMan, this.CurrUser.LoginProjectId, Const.UnitId_SEDIN, null, true); TestTrainingService.InitTestTrainingDropDownList(this.drpTraining, true); var getTestPlan = ServerTestPlanService.GetTestPlanById(this.TestPlanId); if (getTestPlan != null) { this.txtPlanCode.Text = getTestPlan.PlanCode; this.txtPlanName.Text = getTestPlan.PlanName; - this.PlanManName.Text =Person_PersonsService.GetPersonsNameById( getTestPlan.PlanManId); + this.PlanManName.Text = Person_PersonsService.GetPersonsNameById(getTestPlan.PlanManId); this.PlanManId.Text = getTestPlan.PlanManId; this.txtPlanDate.Text = string.Format("{0:yyyy-MM-dd}", getTestPlan.PlanDate); @@ -289,9 +289,9 @@ namespace FineUIPro.Web.PersonManage.Test SValue = Funs.GetNewInt(this.txtSValue.Text), MValue = Funs.GetNewInt(this.txtMValue.Text), JValue = Funs.GetNewInt(this.txtJValue.Text), - PlanManId=this.PlanManId.Text, + PlanManId = this.PlanManId.Text, }; - + newTestPlan.States = Const.State_0; if (type == Const.BtnSubmit) { diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs index 392dd14b..e1daefb7 100644 --- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs +++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs @@ -1,12 +1,9 @@ namespace FineUIPro.Web.Personal { using BLL; - using FastReport.Utils; - using Model; using System; using System.IO; using System.Linq; - using System.Web.UI.DataVisualization.Charting; public partial class PersonalInfo : PageBase { @@ -95,7 +92,7 @@ imgPhoto.ImageUrl = ("~/" + getData.PhotoUrl); } } - } + } #endregion protected void btnCustomQuery_Click(object sender, EventArgs e) @@ -186,7 +183,7 @@ if (getData != null) { getData.JobNum = this.txtJobNum.Text.Trim(); - getData.Sex = this.rblSex.SelectedValue; + getData.Sex = this.rblSex.SelectedValue; getData.IdentityCard = this.txtIdentityCard.Text.Trim(); getData.Birthday = IDCardValid.getBirthByIDCard(getData.IdentityCard); getData.Telephone = this.txtTelephone.Text.Trim(); diff --git a/SGGL/FineUIPro.Web/ProjectData/LocationSelect.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/LocationSelect.aspx.cs index 0d0f855d..61261ff3 100644 --- a/SGGL/FineUIPro.Web/ProjectData/LocationSelect.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/LocationSelect.aspx.cs @@ -22,7 +22,7 @@ namespace FineUIPro.Web.ProjectData { if (!IsPostBack) { - MainItemId = Request.Params["MainItemId"]; + MainItemId = Request.Params["MainItemId"]; var MainItem = Funs.DB.ProjectData_MainItem.FirstOrDefault(x => x.MainItemId == MainItemId); if (MainItem != null) { @@ -32,7 +32,7 @@ namespace FineUIPro.Web.ProjectData ProjectCode = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId); } } - + #region 保存事件 /// @@ -42,10 +42,10 @@ namespace FineUIPro.Web.ProjectData /// protected void btnSave_Click(object sender, EventArgs e) { - var MainItem = Funs.DB.ProjectData_MainItem.FirstOrDefault(x => x.MainItemId == MainItemId); + var MainItem = Funs.DB.ProjectData_MainItem.FirstOrDefault(x => x.MainItemId == MainItemId); if (MainItem != null) { - MainItem.Coordinate=txtLoc.Text.Trim(); + MainItem.Coordinate = txtLoc.Text.Trim(); Funs.DB.SubmitChanges(); } PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(txtLoc.Text.Trim()) @@ -53,6 +53,6 @@ namespace FineUIPro.Web.ProjectData } #endregion - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs index 8eb68518..a676d4e1 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs @@ -1,10 +1,9 @@ using BLL; using Model; using System; -using System.Linq; -using System.ServiceModel; -using System.Text.RegularExpressions; using System.Data; +using System.Linq; +using System.Text.RegularExpressions; namespace FineUIPro.Web.ProjectData { diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs index e786741a..b7f8daa0 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs @@ -579,7 +579,7 @@ namespace FineUIPro.Web.common.ProjectSet this.AvevaNetUrl.Text = s.SetValue; } else if (s.SetId == "10") - { + { if (s.IsAuto == true) { this.ckPressMustCheckBItem.Checked = true; diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.cs index 01be3f93..c6918d53 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitSave.aspx.cs @@ -1,7 +1,5 @@ using BLL; using System; -using System.Data; -using System.Linq; namespace FineUIPro.Web.ProjectData { @@ -178,7 +176,7 @@ namespace FineUIPro.Web.ProjectData /// private void BindGrid() { - this.Grid1.DataSource =ProjectUnitService.GetProjectUnitItemList(this.ProjectId, this.UnitId); + this.Grid1.DataSource = ProjectUnitService.GetProjectUnitItemList(this.ProjectId, this.UnitId); this.Grid1.PageIndex = 0; this.Grid1.DataBind(); } @@ -204,7 +202,7 @@ namespace FineUIPro.Web.ProjectData reSetTable(true); var trainTypeItem = ProjectUnitService.GetProjectUnitItemById(Grid1.SelectedRowID); if (trainTypeItem != null) - { + { this.txtContractNum.Text = trainTypeItem.ContractNum.ToString(); this.txtTotalMoney.Text = trainTypeItem.TotalMoney.ToString(); this.txtHSEMoney.Text = trainTypeItem.HSEMoney.ToString(); @@ -263,7 +261,7 @@ namespace FineUIPro.Web.ProjectData reSetTable(false); this.ShowNotify("保存成功!", MessageBoxIcon.Success); this.BindGrid(); - + } else { diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitView.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitView.aspx.cs index 2f36873b..11e4bf3b 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectUnitView.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUnitView.aspx.cs @@ -73,7 +73,7 @@ namespace FineUIPro.Web.ProjectData this.BindGrid(projectUnit.ProjectId, projectUnit.UnitId); } - } + } } } diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs index ffa837c8..60187208 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs @@ -101,7 +101,7 @@ namespace FineUIPro.Web.ProjectData UnitWork.UnitWorkName = this.txtUnitWorkName.Text.Trim(); if (this.drpUnit.SelectedValue != BLL.Const._Null) { - UnitWork.UnitId =string.Join(",", this.drpUnit.SelectedValueArray) ; + UnitWork.UnitId = string.Join(",", this.drpUnit.SelectedValueArray); } else { @@ -165,7 +165,7 @@ namespace FineUIPro.Web.ProjectData } protected void btnMap_Click(object sender, EventArgs e) { - PageContext.RegisterStartupScript ( Window2.GetShowReference(String.Format("LocationSelect.aspx?unitWorkId=" + Request.Params["UnitWorkId"]))); + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("LocationSelect.aspx?unitWorkId=" + Request.Params["UnitWorkId"]))); } #region 关闭窗口 /// diff --git a/SGGL/FineUIPro.Web/SHIYE/InformationProject/SafetyBriefing.aspx.cs b/SGGL/FineUIPro.Web/SHIYE/InformationProject/SafetyBriefing.aspx.cs index f07aeb64..17313102 100644 --- a/SGGL/FineUIPro.Web/SHIYE/InformationProject/SafetyBriefing.aspx.cs +++ b/SGGL/FineUIPro.Web/SHIYE/InformationProject/SafetyBriefing.aspx.cs @@ -7,7 +7,7 @@ using System.Linq; namespace FineUIPro.Web.SHIYE.InformationProject { - public partial class SafetyBriefing :PageBase + public partial class SafetyBriefing : PageBase { #region 项目主键 /// diff --git a/SGGL/FineUIPro.Web/SHIYE/InformationProject/SafetyBriefingEdit.aspx.cs b/SGGL/FineUIPro.Web/SHIYE/InformationProject/SafetyBriefingEdit.aspx.cs index e564172d..6f5f7ee9 100644 --- a/SGGL/FineUIPro.Web/SHIYE/InformationProject/SafetyBriefingEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/SHIYE/InformationProject/SafetyBriefingEdit.aspx.cs @@ -59,7 +59,7 @@ namespace FineUIPro.Web.SHIYE.InformationProject BLL.ConstValue.InitConstValueDropDownList(this.drpYear, BLL.ConstValue.Group_0008, true); BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, BLL.ConstValue.Group_0009, true); - BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.ProjectId,"", true); + BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.ProjectId, "", true); this.SafetyBriefingId = Request.Params["safetyBriefingId"]; if (!string.IsNullOrEmpty(this.SafetyBriefingId)) @@ -111,7 +111,7 @@ namespace FineUIPro.Web.SHIYE.InformationProject //GetData(startTime, endTime); this.drpCompileMan.SelectedValue = this.CurrUser.PersonId; this.txtUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(string.IsNullOrEmpty(this.CurrUser.UnitId) ? Const.UnitId_SEDIN : this.CurrUser.UnitId); - } + } } } #endregion diff --git a/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.cs b/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.cs index 03622ea7..e373f0a0 100644 --- a/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.cs +++ b/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.cs @@ -63,7 +63,7 @@ } ////权限按钮方法 this.GetButtonPower(); - this.btnNew.OnClientClick = Window1.GetShowReference("EquipmentManageEdit.aspx?type="+this.Type) + "return false;"; + this.btnNew.OnClientClick = Window1.GetShowReference("EquipmentManageEdit.aspx?type=" + this.Type) + "return false;"; Funs.DropDownPageSize(this.ddlPageSize); // 绑定表格 this.BindGrid(); @@ -167,7 +167,7 @@ var getD = EquipmentService.GetEquipmentByEquipmentId(rowID); if (getD != null) { - LogService.AddSys_Log(this.CurrUser, getD.EquipmentName.ToString(), getD.EquipmentId,this.MenuId, BLL.Const.BtnDelete); + LogService.AddSys_Log(this.CurrUser, getD.EquipmentName.ToString(), getD.EquipmentId, this.MenuId, BLL.Const.BtnDelete); BLL.EquipmentService.DeleteEquipmentById(rowID); } } diff --git a/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.cs b/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.cs index a608d5b0..b874eec2 100644 --- a/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.CQMS.Material; using System; using System.Linq; @@ -62,7 +61,7 @@ namespace FineUIPro.Web.SmartSite if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - + this.EquipmentId = Request.Params["EquipmentId"]; this.Type = Request.Params["type"]; if (this.Type == "D") @@ -82,7 +81,7 @@ namespace FineUIPro.Web.SmartSite ProjectService.InitProjectDropDownList(this.drpProject, true); if (!string.IsNullOrEmpty(this.EquipmentId)) - { + { var Equipment = BLL.EquipmentService.GetEquipmentByEquipmentId(this.EquipmentId); if (Equipment != null) { @@ -90,12 +89,12 @@ namespace FineUIPro.Web.SmartSite this.drpProject.SelectedValue = Equipment.ProjectId; this.Type = Equipment.Type; this.txtEquipmentName.Text = Equipment.EquipmentName; - this.txtEquipmentModel.Text = Equipment.EquipmentModel; - this.txtNumber.Text = Equipment.Number.ToString(); - this.txtRunningState.Text = Equipment.RunningState; - this.txtSupplier.Text = Equipment.Supplier; - this.txtSupplierMan.Text = Equipment.SupplierMan; - this.txtSupplierTel.Text = Equipment.SupplierTel; + this.txtEquipmentModel.Text = Equipment.EquipmentModel; + this.txtNumber.Text = Equipment.Number.ToString(); + this.txtRunningState.Text = Equipment.RunningState; + this.txtSupplier.Text = Equipment.Supplier; + this.txtSupplierMan.Text = Equipment.SupplierMan; + this.txtSupplierTel.Text = Equipment.SupplierTel; } } } @@ -113,17 +112,17 @@ namespace FineUIPro.Web.SmartSite Alert.ShowInParent("请选择项目!", MessageBoxIcon.Warning); return; } - + Model.SmartSite_Equipment newEquipment = new Model.SmartSite_Equipment { EquipmentName = this.txtEquipmentName.Text.Trim(), Type = this.Type, - EquipmentModel = this.txtEquipmentModel.Text.Trim(), + EquipmentModel = this.txtEquipmentModel.Text.Trim(), Number = Funs.GetNewIntOrZero(this.txtNumber.Text.Trim()), - RunningState = this.txtRunningState.Text.Trim(), - Supplier = this.txtSupplier.Text.Trim(), - SupplierMan = this.txtSupplierMan.Text.Trim(), - SupplierTel = this.txtSupplierTel.Text.Trim(), + RunningState = this.txtRunningState.Text.Trim(), + Supplier = this.txtSupplier.Text.Trim(), + SupplierMan = this.txtSupplierMan.Text.Trim(), + SupplierTel = this.txtSupplierTel.Text.Trim(), }; if (this.drpProject.SelectedValue != Const._Null) diff --git a/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.cs b/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.cs index e54ae6cc..a042cbcb 100644 --- a/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.cs +++ b/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.cs @@ -168,7 +168,7 @@ var getD = EquipmentSoftService.GetEquipmentSoftByEquipmentSoftId(rowID); if (getD != null) { - LogService.AddSys_Log(this.CurrUser, getD.EquipmentSoftName.ToString(), getD.EquipmentSoftId,this.MenuId, BLL.Const.BtnDelete); + LogService.AddSys_Log(this.CurrUser, getD.EquipmentSoftName.ToString(), getD.EquipmentSoftId, this.MenuId, BLL.Const.BtnDelete); BLL.EquipmentSoftService.DeleteEquipmentSoftById(rowID); } } diff --git a/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.cs b/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.cs index ba50010a..d202e988 100644 --- a/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.CQMS.Material; using System; using System.Linq; @@ -62,7 +61,7 @@ namespace FineUIPro.Web.SmartSite if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - + this.EquipmentSoftId = Request.Params["EquipmentSoftId"]; this.Type = Request.Params["type"]; if (this.Type == "D") @@ -83,7 +82,7 @@ namespace FineUIPro.Web.SmartSite ProjectService.InitProjectDropDownList(this.drpProject, true); EquipmentService.InitEquipmentDropDownList(this.drpEQ, this.drpProject.SelectedValue, this.Type, true); if (!string.IsNullOrEmpty(this.EquipmentSoftId)) - { + { var Equipment = BLL.EquipmentSoftService.GetEquipmentSoftByEquipmentSoftId(this.EquipmentSoftId); if (Equipment != null) { @@ -93,12 +92,12 @@ namespace FineUIPro.Web.SmartSite this.drpEQ.SelectedValue = Equipment.EquipmentId; this.Type = Equipment.Type; this.txtEquipmentSoftName.Text = Equipment.EquipmentSoftName; - this.txtEquipmentSoftModel.Text = Equipment.EquipmentSoftModel; - this.txtNumber.Text = Equipment.Number.ToString(); - this.txtRunningState.Text = Equipment.RunningState; - this.txtSupplier.Text = Equipment.Supplier; - this.txtSupplierMan.Text = Equipment.SupplierMan; - this.txtSupplierTel.Text = Equipment.SupplierTel; + this.txtEquipmentSoftModel.Text = Equipment.EquipmentSoftModel; + this.txtNumber.Text = Equipment.Number.ToString(); + this.txtRunningState.Text = Equipment.RunningState; + this.txtSupplier.Text = Equipment.Supplier; + this.txtSupplierMan.Text = Equipment.SupplierMan; + this.txtSupplierTel.Text = Equipment.SupplierTel; } } } @@ -116,17 +115,17 @@ namespace FineUIPro.Web.SmartSite Alert.ShowInParent("请选择项目!", MessageBoxIcon.Warning); return; } - + Model.SmartSite_EquipmentSoft newEquipment = new Model.SmartSite_EquipmentSoft { EquipmentSoftName = this.txtEquipmentSoftName.Text.Trim(), Type = this.Type, - EquipmentSoftModel = this.txtEquipmentSoftModel.Text.Trim(), + EquipmentSoftModel = this.txtEquipmentSoftModel.Text.Trim(), Number = Funs.GetNewIntOrZero(this.txtNumber.Text.Trim()), - RunningState = this.txtRunningState.Text.Trim(), - Supplier = this.txtSupplier.Text.Trim(), - SupplierMan = this.txtSupplierMan.Text.Trim(), - SupplierTel = this.txtSupplierTel.Text.Trim(), + RunningState = this.txtRunningState.Text.Trim(), + Supplier = this.txtSupplier.Text.Trim(), + SupplierMan = this.txtSupplierMan.Text.Trim(), + SupplierTel = this.txtSupplierTel.Text.Trim(), }; if (this.drpProject.SelectedValue != Const._Null) @@ -174,7 +173,7 @@ namespace FineUIPro.Web.SmartSite protected void drpProject_SelectedIndexChanged(object sender, EventArgs e) { - EquipmentService.InitEquipmentDropDownList(this.drpEQ, this.drpProject.SelectedValue,this.Type, true); + EquipmentService.InitEquipmentDropDownList(this.drpEQ, this.drpProject.SelectedValue, this.Type, true); } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/SysManage/DocEdit.aspx.cs b/SGGL/FineUIPro.Web/SysManage/DocEdit.aspx.cs index 69845cdb..7c21cd98 100644 --- a/SGGL/FineUIPro.Web/SysManage/DocEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/DocEdit.aspx.cs @@ -1,6 +1,5 @@ using BLL; using System; -using System.Web; namespace FineUIPro.Web.SysManage { diff --git a/SGGL/FineUIPro.Web/SysManage/DocView.aspx.cs b/SGGL/FineUIPro.Web/SysManage/DocView.aspx.cs index 9547db46..c5a16110 100644 --- a/SGGL/FineUIPro.Web/SysManage/DocView.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/DocView.aspx.cs @@ -1,6 +1,5 @@ using BLL; using System; -using System.Web; namespace FineUIPro.Web.SysManage { diff --git a/SGGL/FineUIPro.Web/SysManage/HttpLog.aspx.cs b/SGGL/FineUIPro.Web/SysManage/HttpLog.aspx.cs index 0000509b..3e17c60e 100644 --- a/SGGL/FineUIPro.Web/SysManage/HttpLog.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/HttpLog.aspx.cs @@ -1,13 +1,6 @@ using BLL; using System; -using System.Collections.Generic; -using System.Data; -using System.Data.SqlClient; -using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.SysManage @@ -32,11 +25,11 @@ namespace FineUIPro.Web.SysManage private void BindGrid() { Model.Sys_HttpLog table = new Model.Sys_HttpLog(); - table.LogTime=txtLogTime.SelectedDate; - table.UserName=txtUserName.Text.Trim(); - table.HttpUrl=txtHttpUrl.Text.Trim(); - table.LogTxt=txtLogTxt.Text.Trim(); - table.MeThod=txtMeThod.Text.Trim(); + table.LogTime = txtLogTime.SelectedDate; + table.UserName = txtUserName.Text.Trim(); + table.HttpUrl = txtHttpUrl.Text.Trim(); + table.LogTxt = txtLogTxt.Text.Trim(); + table.MeThod = txtMeThod.Text.Trim(); var tb = BLL.SysHttplogService.getListData(table, Grid1); Grid1.RecordCount = SysHttplogService.count; //tb = GetFilteredTable(Grid1.FilteredData, tb); diff --git a/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.cs b/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.cs index 63d56f7f..eefba02b 100644 --- a/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.cs @@ -1,9 +1,5 @@ using BLL; -using FineUIPro.Web.DataShow; using System; -using System.Collections.Generic; -using System.Data; -using System.Data.SqlClient; using System.Linq; namespace FineUIPro.Web.SysManage @@ -13,7 +9,7 @@ namespace FineUIPro.Web.SysManage protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack && this.CurrUser != null) - { + { Funs.DropDownPageSize(this.ddlPageSize); // 绑定表格 this.BindGrid(); @@ -25,7 +21,7 @@ namespace FineUIPro.Web.SysManage /// private void BindGrid() { - var getDataList = Funs.DB.Sp_Project_GetToDoItems( this.CurrUser.LoginProjectId, this.CurrUser.PersonId).ToList(); + var getDataList = Funs.DB.Sp_Project_GetToDoItems(this.CurrUser.LoginProjectId, this.CurrUser.PersonId).ToList(); Grid1.RecordCount = getDataList.Count(); Grid1.DataSource = getDataList; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/SysManage/SysConstSet.aspx.cs b/SGGL/FineUIPro.Web/SysManage/SysConstSet.aspx.cs index 9689f640..d4fa687d 100644 --- a/SGGL/FineUIPro.Web/SysManage/SysConstSet.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/SysConstSet.aspx.cs @@ -1,13 +1,13 @@ using BLL; +using Model; +using Newtonsoft.Json; +using RestSharp; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Web; -using Newtonsoft.Json; -using RestSharp; -using Model; namespace FineUIPro.Web.SysManage { @@ -1195,7 +1195,7 @@ namespace FineUIPro.Web.SysManage request.AddParameter("UnitName", thisUnit.UnitName); request.AddParameter("CollCropCode", thisUnit.CollCropCode); IRestResponse response = client.Execute(request); - + Alert.Show(response.Content); } } diff --git a/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs b/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs index 75ab0ceb..cc8fd204 100644 --- a/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs @@ -98,7 +98,8 @@ if (Grid1.SelectedRowIndexArray.Length > 0) { foreach (int rowIndex in Grid1.SelectedRowIndexArray) - { var getperson = Person_PersonsService.GetPerson_PersonsById(Grid1.DataKeys[rowIndex][0].ToString()); + { + var getperson = Person_PersonsService.GetPerson_PersonsById(Grid1.DataKeys[rowIndex][0].ToString()); if (getperson != null) { BLL.Person_PersonsService.UpdatePassword(getperson.PersonId, Funs.getInitialPassword(getperson.UnitId, getperson.IdentityCard)); diff --git a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/IFLogList.aspx.cs b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/IFLogList.aspx.cs index 2b1b64da..ffdbd79b 100644 --- a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/IFLogList.aspx.cs +++ b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/IFLogList.aspx.cs @@ -1,22 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Data.SqlClient; -using BLL; -using System.Data; +using BLL; +using System; namespace FineUIPro.Web.InterFace { public partial class IFLogList : PageBase { protected void Page_Load(object sender, EventArgs e) - { + { if (!IsPostBack) { - // BLL.ConstValue.InitConstValueDropDownList(this.drpDataType, "DataType", true); + // BLL.ConstValue.InitConstValueDropDownList(this.drpDataType, "DataType", true); BindGrid(); } } @@ -25,12 +18,12 @@ namespace FineUIPro.Web.InterFace private void BindGrid() { - Model.InterFaceLog interFaceLog=new Model.InterFaceLog(); - interFaceLog.InterFaceName=txtUserName.Text; - var q= BLL.InterFaceLogService.GetInterFaceLogByModle(interFaceLog); + Model.InterFaceLog interFaceLog = new Model.InterFaceLog(); + interFaceLog.InterFaceName = txtUserName.Text; + var q = BLL.InterFaceLogService.GetInterFaceLogByModle(interFaceLog); Grid1.RecordCount = InterFaceLogService.count; - Grid1.DataSource= InterFaceLogService.getListData(interFaceLog, Grid1); - Grid1.DataBind(); + Grid1.DataSource = InterFaceLogService.getListData(interFaceLog, Grid1); + Grid1.DataBind(); } diff --git a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceEdit.aspx.cs b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceEdit.aspx.cs index 57514dfb..6b05b68e 100644 --- a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceEdit.aspx.cs @@ -1,11 +1,7 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.Security; -using System.Web.UI; using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.InterFace { @@ -42,9 +38,9 @@ namespace FineUIPro.Web.InterFace this.GetButtonPower(); this.InterFaceSetId = Request.Params["InterFaceSetId"]; BLL.ConstValue.InitConstValueDropDownList(this.drpIsOpen, ConstValue.Group_0001, false); - BLL.InterFaceSetService.InitReqMethodDropDownList(this.DrpUrlReqMethod, false); - BLL.InterFaceSetService.InitReqMethodDropDownList(this.DrpForUrlReqMethod, false); - BLL.InterFaceSetService.InitReqMethodDropDownList(this.DrpCallBackUrlReqMethod, false); + BLL.InterFaceSetService.InitReqMethodDropDownList(this.DrpUrlReqMethod, false); + BLL.InterFaceSetService.InitReqMethodDropDownList(this.DrpForUrlReqMethod, false); + BLL.InterFaceSetService.InitReqMethodDropDownList(this.DrpCallBackUrlReqMethod, false); this.drpUnit.DataTextField = "UnitName"; this.drpUnit.DataValueField = "UnitId"; this.drpUnit.DataSource = BLL.UnitService.GetUnitDropDownList(); @@ -76,8 +72,8 @@ namespace FineUIPro.Web.InterFace var FaceSet = BLL.InterFaceSetService.GetInterFaceSetById(this.InterFaceSetId); if (FaceSet != null) { - - + + if (!string.IsNullOrEmpty(FaceSet.UnitId)) { this.drpUnit.SelectedValue = FaceSet.UnitId; @@ -85,13 +81,13 @@ namespace FineUIPro.Web.InterFace this.txtFaceName.Text = FaceSet.InterFaceName; this.txtFaceUrl.Text = FaceSet.InterFaceUrl; this.txtFaceForUrl.Text = FaceSet.InterFaceForUrl; - this.txtCallBackUrl.Text=FaceSet.InterFaceCallBackUrl; - this.IsCallBack.Checked =(bool) FaceSet.IsCallBack; + this.txtCallBackUrl.Text = FaceSet.InterFaceCallBackUrl; + this.IsCallBack.Checked = (bool)FaceSet.IsCallBack; if (!string.IsNullOrEmpty(FaceSet.AuthUnitIds)) { this.drpAuthUnit.Values = FaceSet.AuthUnitIds.Split(','); } - + this.txtRemarks.Text = FaceSet.TxtRemarks; if (FaceSet.IsOpen.HasValue) { @@ -145,7 +141,7 @@ namespace FineUIPro.Web.InterFace if (item != "") { AuthUnitName += item + ","; - + } } AuthUnitId = AuthUnitId.Substring(0, AuthUnitId.LastIndexOf(",")); @@ -166,9 +162,9 @@ namespace FineUIPro.Web.InterFace UnitId = UnitId, IsCallBack = IsCallBack.Checked, InterFaceCallBackUrl = txtCallBackUrl.Text, - UrlReqMethod=DrpUrlReqMethod.SelectedValue.Trim(), - ForUrlReqMethod=DrpForUrlReqMethod.SelectedValue.Trim(), - CallBackUrlReqMethod=DrpCallBackUrlReqMethod.SelectedValue.Trim() + UrlReqMethod = DrpUrlReqMethod.SelectedValue.Trim(), + ForUrlReqMethod = DrpForUrlReqMethod.SelectedValue.Trim(), + CallBackUrlReqMethod = DrpCallBackUrlReqMethod.SelectedValue.Trim() }; if (string.IsNullOrEmpty(this.InterFaceSetId)) @@ -183,7 +179,7 @@ namespace FineUIPro.Web.InterFace BLL.InterFaceSetService.UpdateInterFaceSet(newSet); BLL.LogService.AddLog(this.CurrUser.PersonId, "修改接口设置" + this.txtFaceName.Text.Trim()); } - + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } @@ -195,7 +191,7 @@ namespace FineUIPro.Web.InterFace /// private void GetButtonPower() { - var buttonList = BLL.CommonService.GetAllButtonList(null,this.CurrUser.PersonId, BLL.Const.InterFaceSetMenuId); + var buttonList = BLL.CommonService.GetAllButtonList(null, this.CurrUser.PersonId, BLL.Const.InterFaceSetMenuId); if (buttonList.Count() > 0) { if (buttonList.Contains(BLL.Const.BtnSave)) @@ -208,7 +204,7 @@ namespace FineUIPro.Web.InterFace protected void IsCallBack_CheckedChanged(object sender, CheckedEventArgs e) { - if (IsCallBack.Checked==true) + if (IsCallBack.Checked == true) { this.txtCallBackUrl.Hidden = false; } diff --git a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceSet.aspx.cs b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceSet.aspx.cs index fd930711..0b6e622c 100644 --- a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceSet.aspx.cs +++ b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceSet.aspx.cs @@ -1,11 +1,11 @@ namespace FineUIPro.Web.InterFace { + using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; - using BLL; public partial class InterFaceSet : PageBase { @@ -17,7 +17,7 @@ protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { ////权限按钮方法 this.GetButtonPower(); btnNew.OnClientClick = Window1.GetShowReference("InterFaceEdit.aspx") + "return false;"; @@ -37,7 +37,7 @@ { string strSql = "SELECT InterFaceSetId,InterFaceName,InterFaceForUrl,InterFaceUrl,Unit.UnitName as UnitId,AuthUnitName,IsOpen,ValidPeriod,TxtRemarks FROM InterFaceSet" + @" AS FaceSet LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = FaceSet.UnitId where 1=1 "; - + List listStr = new List(); if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim())) { @@ -54,13 +54,13 @@ strSql += " AND IsOpen = @IsOpen"; listStr.Add(new SqlParameter("@IsOpen", this.cbRoleCategory.Items[0].Selected)); } - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); // 2.获取当前分页数据 //var table = this.GetPagedDataTable(Grid1, tb1); - Grid1.RecordCount = tb.Rows.Count; + Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); @@ -76,7 +76,7 @@ { if (this.CurrUser != null) { - var buttonList = BLL.CommonService.GetAllButtonList(null,this.CurrUser.PersonId, BLL.Const.InterFaceSetMenuId); + var buttonList = BLL.CommonService.GetAllButtonList(null, this.CurrUser.PersonId, BLL.Const.InterFaceSetMenuId); if (buttonList.Count() > 0) { if (buttonList.Contains(BLL.Const.BtnAdd)) @@ -97,7 +97,7 @@ } } #endregion - + #region 删除数据 /// /// 批量删除数据 @@ -111,11 +111,11 @@ protected void btnStart_Click(object sender, EventArgs e) { Model.SGGLDB db = Funs.DB; - List FaceList = db.InterFaceSet.Where(p=>p.IsOpen==true).ToList(); - foreach(var item in FaceList) + List FaceList = db.InterFaceSet.Where(p => p.IsOpen == true).ToList(); + foreach (var item in FaceList) { - // if (!string.IsNullOrEmpty(item.InterFaceUrl)) - // APIServiceTimer.GetApiData(item.InterFaceSetId, item.InterFaceUrl); + // if (!string.IsNullOrEmpty(item.InterFaceUrl)) + // APIServiceTimer.GetApiData(item.InterFaceSetId, item.InterFaceUrl); } } @@ -125,8 +125,8 @@ List FaceList = db.InterFaceSet.Where(p => p.IsOpen == true).ToList(); foreach (var item in FaceList) { - // if (!string.IsNullOrEmpty(item.InterFaceForUrl)) - // APIServiceTimer.UpApiData(item.InterFaceSetId, item.InterFaceForUrl, item.IsReqPost); + // if (!string.IsNullOrEmpty(item.InterFaceForUrl)) + // APIServiceTimer.UpApiData(item.InterFaceSetId, item.InterFaceForUrl, item.IsReqPost); } } /// diff --git a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceTask.aspx.cs b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceTask.aspx.cs index 1840cff5..c4a88bd3 100644 --- a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceTask.aspx.cs +++ b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceTask.aspx.cs @@ -1,11 +1,7 @@ namespace FineUIPro.Web.InterFace { using System; - using System.Collections.Generic; - using System.Data; - using System.Data.SqlClient; using System.Linq; - using BLL; public partial class InterFaceTask : PageBase { @@ -33,9 +29,9 @@ /// private void BindGrid() { - Model.InterFaceTask interFaceTask=new Model.InterFaceTask(); + Model.InterFaceTask interFaceTask = new Model.InterFaceTask(); interFaceTask.InterFaceName = txtInterFaceName.Text; - var q= BLL.InterFaceTaskService.GetInterFaceTaskByModle(interFaceTask); + var q = BLL.InterFaceTaskService.GetInterFaceTaskByModle(interFaceTask); Grid1.DataSource = q; Grid1.DataBind(); } @@ -50,7 +46,7 @@ { if (this.CurrUser != null) { - var buttonList = BLL.CommonService.GetAllButtonList(null,this.CurrUser.PersonId, BLL.Const.InterFaceTaskMenuId); + var buttonList = BLL.CommonService.GetAllButtonList(null, this.CurrUser.PersonId, BLL.Const.InterFaceTaskMenuId); if (buttonList.Count() > 0) { if (buttonList.Contains(BLL.Const.BtnModify)) diff --git a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceTaskEdit.aspx.cs b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceTaskEdit.aspx.cs index 5b830360..acb54943 100644 --- a/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceTaskEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/TaskScheduling/InterFace/InterFaceTaskEdit.aspx.cs @@ -1,11 +1,8 @@ using BLL; -using Model; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.InterFace @@ -25,7 +22,8 @@ namespace FineUIPro.Web.InterFace } protected void Page_Load(object sender, EventArgs e) { - if (!IsPostBack) { + if (!IsPostBack) + { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); InterFaceTaskId = Request.Params["InterFaceTaskId"]; InterFaceSetService.InitInterFaceDropDownList(DropInterFaceSet, false); @@ -52,15 +50,15 @@ namespace FineUIPro.Web.InterFace if (!string.IsNullOrEmpty(InterFaceTaskId)) { var model = BLL.InterFaceTaskService.GetInterFaceTaskById(InterFaceTaskId); - txtFrequency.Text= model.Frequency; - txtInterFaceName.Text= model.InterFaceName; + txtFrequency.Text = model.Frequency; + txtInterFaceName.Text = model.InterFaceName; IsEnable.Checked = (bool)model.Enable; - var a = model.InterFaceSetLists.Split(','); + var a = model.InterFaceSetLists.Split(','); var q = (from x in a select new { id = Guid.NewGuid().ToString(), InterFaceSetId = x.ToString() }).ToList(); - Grid1.DataSource= q; - Grid1.DataBind(); + Grid1.DataSource = q; + Grid1.DataBind(); } - + } protected void btnSave_Click(object sender, EventArgs e) @@ -68,7 +66,7 @@ namespace FineUIPro.Web.InterFace List list = new List(); JArray EditorArr = Grid1.GetMergedData(); if (EditorArr.Count > 0) - { + { for (int i = 0; i < EditorArr.Count; i++) { JObject objects = (JObject)EditorArr[i]; @@ -76,20 +74,20 @@ namespace FineUIPro.Web.InterFace list.Add(objects["values"]["InterFaceSetId"].ToString()); } } - + if (!string.IsNullOrEmpty(InterFaceTaskId)) { - var model=BLL.InterFaceTaskService.GetInterFaceTaskById(InterFaceTaskId); - model.InterFaceName=txtInterFaceName.Text; + var model = BLL.InterFaceTaskService.GetInterFaceTaskById(InterFaceTaskId); + model.InterFaceName = txtInterFaceName.Text; model.Frequency = txtFrequency.Text; - model.InterFaceSetLists=string .Join(",", list); + model.InterFaceSetLists = string.Join(",", list); model.CreateTime = DateTime.Now; model.Enable = IsEnable.Checked; InterFaceTaskService.UpdateInterFaceTask(model); } else { - Model.InterFaceTask model =new Model.InterFaceTask(); + Model.InterFaceTask model = new Model.InterFaceTask(); model.InterFaceTaskId = SQLHelper.GetNewID(typeof(Model.InterFaceTask)); InterFaceTaskId = model.InterFaceTaskId; model.InterFaceName = txtInterFaceName.Text; @@ -102,7 +100,7 @@ namespace FineUIPro.Web.InterFace QuartzServices.SyncISchedulerById(InterFaceTaskId); ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - + } private string GetDeleteScript() { diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.cs index cabfc630..19be81b6 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.cs @@ -1,11 +1,9 @@ -using System; +using BLL; +using System; using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; using System.IO; -using BLL; +using System.Linq; +using System.Web.UI; namespace FineUIPro.Web.ZHGL.DataIn { diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.cs index 63d0f16e..69e70c01 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.cs @@ -6,7 +6,7 @@ using System.Linq; namespace FineUIPro.Web.ZHGL.DataIn { - public partial class DrillConductedQuarterlyReportBar :PageBase + public partial class DrillConductedQuarterlyReportBar : PageBase { #region 定义变量 /// diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.cs index 631e421c..90c6640b 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.cs @@ -1,13 +1,9 @@ -using System; +using BLL; +using System; using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; -using System.IO; -using System.Data.OleDb; using System.Data; +using System.Data.OleDb; +using System.Linq; namespace FineUIPro.Web.ZHGL.DataIn { diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.cs index b2945ed1..fdefc3c8 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.cs @@ -1,11 +1,9 @@ -using System; +using BLL; +using System; using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; using System.IO; +using System.Linq; +using System.Web.UI; namespace FineUIPro.Web.ZHGL.DataIn { diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.cs index 1c136b85..b87bdb7e 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.cs @@ -1,11 +1,9 @@ -using System; +using BLL; +using System; using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; using System.IO; +using System.Linq; +using System.Web.UI; namespace FineUIPro.Web.ZHGL.DataIn { diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/CQMSData_CQMS.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/CQMSData_CQMS.aspx.cs index b54b7ce1..b86b058e 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/CQMSData_CQMS.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/CQMSData_CQMS.aspx.cs @@ -1,13 +1,11 @@ -using System; -using System.Data; -using System.Data.SqlClient; +using BLL; +using System; using System.Text; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync { - public partial class CQMSData_CQMS : PageBase + public partial class CQMSData_CQMS : PageBase { protected void Page_Load(object sender, EventArgs e) @@ -92,7 +90,7 @@ namespace FineUIPro.Web.ZHGL.DataSync { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CQMSData_CQMSEdit.aspx?Id={0}", string.Empty, "增加 - "))); - + } @@ -139,12 +137,12 @@ namespace FineUIPro.Web.ZHGL.DataSync { string rowID = Grid1.DataKeys[rowIndex][0].ToString(); var model = BLL.CQMSDataService.GetCQMSData_CQMSById(rowID); - if (model!=null) + if (model != null) { BLL.CQMSDataService.DeleteCQMSData_CQMSById(rowID); } - + } BindGrid(); diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/CQMSData_CQMSEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/CQMSData_CQMSEdit.aspx.cs index 9178e1bd..1ab78cd4 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/CQMSData_CQMSEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/CQMSData_CQMSEdit.aspx.cs @@ -1,14 +1,10 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.ZHGL.DataSync { - public partial class CQMSData_CQMSEdit: PageBase + public partial class CQMSData_CQMSEdit : PageBase { #region /// @@ -198,10 +194,10 @@ namespace FineUIPro.Web.ZHGL.DataSync { if (txtReportDate.SelectedDate == null) { - + ShowNotify("请选择上报日期!"); return; - + } Model.CQMSData_CQMS table = new Model.CQMSData_CQMS(); table.UnitId = BLL.Const.UnitId_SEDIN; @@ -288,8 +284,8 @@ namespace FineUIPro.Web.ZHGL.DataSync { if (!string.IsNullOrEmpty(this.Id)) { - var responedata= CQMSDataService.PushCncec(Id); - if (responedata.code==1) + var responedata = CQMSDataService.PushCncec(Id); + if (responedata.code == 1) { ShowNotify("上报成功!"); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); @@ -298,11 +294,11 @@ namespace FineUIPro.Web.ZHGL.DataSync else { ShowNotify(responedata.message); - // PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + // PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } } - + } } diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/DataStatistics.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/DataStatistics.aspx.cs index 44d15022..0ac452ad 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/DataStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/DataStatistics.aspx.cs @@ -1,12 +1,7 @@ -using Aspose.Words; -using BLL; +using BLL; using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; -using System.IO; -using System.Linq; namespace FineUIPro.Web.ZHGL.DataSync { diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/HJGLData_HJGL.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/HJGLData_HJGL.aspx.cs index 3b61a60d..c06280a5 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/HJGLData_HJGL.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/HJGLData_HJGL.aspx.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using BLL; +using System; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/HJGLData_HJGLEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/HJGLData_HJGLEdit.aspx.cs index d31cb828..59d69f77 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/HJGLData_HJGLEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/HJGLData_HJGLEdit.aspx.cs @@ -1,11 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; +using BLL; using Newtonsoft.Json.Linq; +using System; +using System.Linq; namespace FineUIPro.Web.ZHGL.DataSync { @@ -16,16 +12,16 @@ namespace FineUIPro.Web.ZHGL.DataSync /// 主键 /// public string Id - { - get { - return (string)ViewState["Id"]; + get + { + return (string)ViewState["Id"]; + } + set + { + ViewState["Id"] = value; + } } - set - { - ViewState["Id"] = value; - } - } #endregion protected void Page_Load(object sender, EventArgs e) { @@ -154,23 +150,23 @@ namespace FineUIPro.Web.ZHGL.DataSync } - private void BindGrid() - { - if (!string.IsNullOrEmpty(this.Id)) + private void BindGrid() { + if (!string.IsNullOrEmpty(this.Id)) + { Model.HJGLData_HJGL model = BLL.HJGLData_HJGLService.GetHJGLData_HJGLById(this.Id); if (model != null) { - var dt= BLL.HJGLData_DefectService.GetHJGLData_DefectByDate(model.ReportDate); + var dt = BLL.HJGLData_DefectService.GetHJGLData_DefectByDate(model.ReportDate); Grid1.RecordCount = dt.Count; - // var table = this.GetPagedDataTable(Grid1, tb); + // var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = dt; Grid1.DataBind(); } - } + } - } + } protected void txtReportDate_DateSelect(object sender, EventArgs e) { if (txtReportDate.SelectedDate != null) @@ -209,24 +205,24 @@ namespace FineUIPro.Web.ZHGL.DataSync { return Confirm.GetShowReference("确定删除当前数据吗?", String.Empty, MessageBoxIcon.Question, Grid1.GetDeleteSelectedRowsReference(), String.Empty); } - #region 获取按钮权限 - /// - /// 获取按钮权限 - /// - /// - /// - private void GetButtonPower() - { - var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGLData_HJGLMenuId); - if (buttonList.Count() > 0) + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() { - if (buttonList.Contains(BLL.Const.BtnSave)) + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGLData_HJGLMenuId); + if (buttonList.Count() > 0) { - this.btnSave.Hidden = false; + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } } } - } - #endregion + #endregion -} + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSE.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSE.aspx.cs index c8b43d8e..49187d0c 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSE.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSE.aspx.cs @@ -1,15 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using BLL; +using System; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync { - public partial class HSSEData_HSSE :PageBase + public partial class HSSEData_HSSE : PageBase { protected void Page_Load(object sender, EventArgs e) @@ -139,7 +134,7 @@ namespace FineUIPro.Web.ZHGL.DataSync { string rowID = Grid1.DataKeys[rowIndex][0].ToString(); var model = BLL.HSSEData_HSSEService.GetHSSEData_HSSEById(rowID); - if (model!=null) + if (model != null) { BLL.HSSEData_HSSEService.DeleteHSSEData_HSSEById(rowID); BLL.HSSEData_HiddenDangerDetailService.DeleteHSSEData_HiddenDangerDetailByDate(model.ReportDate); diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs index 0f618230..8b2bac6d 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs @@ -1,15 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; +using BLL; using Newtonsoft.Json.Linq; +using System; +using System.Linq; namespace FineUIPro.Web.ZHGL.DataSync { - public partial class HSSEData_HSSEEdit: PageBase + public partial class HSSEData_HSSEEdit : PageBase { #region /// @@ -561,7 +557,7 @@ namespace FineUIPro.Web.ZHGL.DataSync /// protected void btnCopy_Click(object sender, EventArgs e) { - Model.HSSEData_HSSE model = Funs.DB.HSSEData_HSSE.OrderByDescending(x=>x.ReportDate).FirstOrDefault(); + Model.HSSEData_HSSE model = Funs.DB.HSSEData_HSSE.OrderByDescending(x => x.ReportDate).FirstOrDefault(); if (model != null) { if (model.BeUnderConstructionNum.HasValue) diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMS.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMS.aspx.cs index 490de2a7..04de3207 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMS.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMS.aspx.cs @@ -1,13 +1,11 @@ -using System; -using System.Data; -using System.Data.SqlClient; +using BLL; +using System; using System.Text; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { - public partial class Project_CQMSData_CQMS : PageBase + public partial class Project_CQMSData_CQMS : PageBase { protected void Page_Load(object sender, EventArgs e) @@ -93,7 +91,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("Project_CQMSData_CQMSEdit.aspx?Id={0}", string.Empty, "增加 - "))); - + } @@ -140,12 +138,12 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { string rowID = Grid1.DataKeys[rowIndex][0].ToString(); var model = BLL.Project_CQMSDataService.GetProject_CQMSData_CQMSById(rowID); - if (model!=null) + if (model != null) { BLL.Project_CQMSDataService.DeleteProject_CQMSData_CQMSById(rowID); } - + } BindGrid(); diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMSEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMSEdit.aspx.cs index 86a430b3..ef1256d2 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMSEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMSEdit.aspx.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { @@ -198,10 +194,10 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { if (txtReportDate.SelectedDate == null) { - + ShowNotify("请选择上报日期!"); return; - + } Model.Project_CQMSData_CQMS table = new Model.Project_CQMSData_CQMS(); table.UnitId = BLL.Const.UnitId_SEDIN; @@ -276,7 +272,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync if (txtReportDate.SelectedDate != null) { DateTime dt = (DateTime)txtReportDate.SelectedDate; - if (BLL.Project_CQMSDataService.IsReportByDate(dt,this.CurrUser.LoginProjectId)) + if (BLL.Project_CQMSDataService.IsReportByDate(dt, this.CurrUser.LoginProjectId)) { txtReportDate.SelectedDate = null; ShowNotify("该日期已上报!"); @@ -303,7 +299,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync // } // } - + //} } diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGL.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGL.aspx.cs index 39e94411..a7fa756e 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGL.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGL.aspx.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using BLL; +using System; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLEdit.aspx.cs index a2c4f287..4e575240 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLEdit.aspx.cs @@ -1,12 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; -using FineUIPro.Web.HJGL.BaseInfo; +using BLL; using Newtonsoft.Json.Linq; +using System; +using System.Linq; namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { @@ -17,16 +12,16 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync /// 主键 /// public string Id - { - get { - return (string)ViewState["Id"]; + get + { + return (string)ViewState["Id"]; + } + set + { + ViewState["Id"] = value; + } } - set - { - ViewState["Id"] = value; - } - } #endregion protected void Page_Load(object sender, EventArgs e) { @@ -157,23 +152,23 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync } - private void BindGrid() - { - if (!string.IsNullOrEmpty(this.Id)) + private void BindGrid() { + if (!string.IsNullOrEmpty(this.Id)) + { Model.Project_HJGLData_HJGL model = BLL.Project_HJGLData_HJGLService.GetProject_HJGLData_HJGLById(this.Id); if (model != null) { - var dt= BLL.Project_HJGLData_DefectService.GetProject_HJGLData_DefectByDate(model.ReportDate,this.CurrUser.LoginProjectId); + var dt = BLL.Project_HJGLData_DefectService.GetProject_HJGLData_DefectByDate(model.ReportDate, this.CurrUser.LoginProjectId); Grid1.RecordCount = dt.Count; - // var table = this.GetPagedDataTable(Grid1, tb); + // var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = dt; Grid1.DataBind(); } - } + } - } + } protected void txtReportDate_DateSelect(object sender, EventArgs e) { if (txtReportDate.SelectedDate != null) @@ -212,24 +207,24 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { return Confirm.GetShowReference("确定删除当前数据吗?", String.Empty, MessageBoxIcon.Question, Grid1.GetDeleteSelectedRowsReference(), String.Empty); } - #region 获取按钮权限 - /// - /// 获取按钮权限 - /// - /// - /// - private void GetButtonPower() - { - var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.Project_HJGLData_HJGLMenuId); - if (buttonList.Count() > 0) + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() { - if (buttonList.Contains(BLL.Const.BtnSave)) + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.Project_HJGLData_HJGLMenuId); + if (buttonList.Count() > 0) { - this.btnSave.Hidden = false; + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } } } - } - #endregion + #endregion -} + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSE.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSE.aspx.cs index 89e7a5e6..7f3f71b0 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSE.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSE.aspx.cs @@ -1,15 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using BLL; +using System; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { - public partial class Project_HSSEData_HSSE :PageBase + public partial class Project_HSSEData_HSSE : PageBase { protected void Page_Load(object sender, EventArgs e) @@ -140,7 +135,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { string rowID = Grid1.DataKeys[rowIndex][0].ToString(); var model = BLL.Project_HSSEData_HSSEService.GetProject_HSSEData_HSSEById(rowID); - if (model!=null) + if (model != null) { BLL.Project_HSSEData_HSSEService.DeleteProject_HSSEData_HSSEById(rowID); BLL.HSSEData_HiddenDangerDetailService.DeleteHSSEData_HiddenDangerDetailByDate(model.ReportDate); diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEEdit.aspx.cs index 43d66712..25f2eecd 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEEdit.aspx.cs @@ -1,15 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; +using BLL; using Newtonsoft.Json.Linq; +using System; +using System.Linq; namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { - public partial class Project_HSSEData_HSSEEdit: PageBase + public partial class Project_HSSEData_HSSEEdit : PageBase { #region /// @@ -475,7 +471,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync table.Id = this.Id; BLL.Project_HSSEData_HSSEService.UpdateProject_HSSEData_HSSE(table); } - BLL.Project_HSSEData_HiddenDangerDetailService.DeleteProject_HSSEData_HiddenDangerDetailByDate(table.ReportDate,this.CurrUser.LoginProjectId); + BLL.Project_HSSEData_HiddenDangerDetailService.DeleteProject_HSSEData_HiddenDangerDetailByDate(table.ReportDate, this.CurrUser.LoginProjectId); JArray EditorArr = Grid1.GetMergedData(); if (EditorArr.Count > 0) { @@ -503,7 +499,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync if (txtReportDate.SelectedDate != null) { DateTime dt = (DateTime)txtReportDate.SelectedDate; - if (BLL.Project_HSSEData_HSSEService.IsReportByDate(dt,this.CurrUser.LoginProjectId)) + if (BLL.Project_HSSEData_HSSEService.IsReportByDate(dt, this.CurrUser.LoginProjectId)) { txtReportDate.SelectedDate = null; ShowNotify("该日期已上报!"); diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSE.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSE.aspx.cs index c6d58b0d..6e8af647 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSE.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSE.aspx.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using BLL; +using System; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEEdit.aspx.cs index 353abcb0..8a04acff 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/ProjectDataSync/Project_SYHSEData_SYHSEEdit.aspx.cs @@ -1,14 +1,10 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync { - public partial class Project_SYHSEData_SYHSEEdit: PageBase + public partial class Project_SYHSEData_SYHSEEdit : PageBase { #region /// @@ -269,7 +265,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync if (txtReportDate.SelectedDate != null) { DateTime dt = (DateTime)txtReportDate.SelectedDate; - if (BLL.Project_SYHSEData_SYHSEService.IsReportByDate(dt,this.CurrUser.LoginProjectId)) + if (BLL.Project_SYHSEData_SYHSEService.IsReportByDate(dt, this.CurrUser.LoginProjectId)) { txtReportDate.SelectedDate = null; ShowNotify("该日期已上报!"); diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.cs index eb025504..c058ccde 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_Data.aspx.cs @@ -1,16 +1,11 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync { - public partial class SYHSEData_Data :PageBase + public partial class SYHSEData_Data : PageBase { protected void Page_Load(object sender, EventArgs e) diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs index 307b9667..60fb4312 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_DataEdit.aspx.cs @@ -1,13 +1,7 @@ using BLL; -using Model; using Newtonsoft.Json.Linq; -using RestSharp.Extensions; using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync { @@ -40,7 +34,7 @@ namespace FineUIPro.Web.ZHGL.DataSync BLL.Base_FactoryService.InitBase_FactoryDownList(DropFactory, true); if (!string.IsNullOrEmpty(this.Id)) { - // Model.SYHSEData_Data model = BLL.SYHSEData_DataService.GetSYHSEData_DataById(this.Id); + // Model.SYHSEData_Data model = BLL.SYHSEData_DataService.GetSYHSEData_DataById(this.Id); Model.SYHSEData_Data model = BLL.SYHSEData_DataService.GetSYHSEData_DataById(this.Id); if (model != null) @@ -48,7 +42,7 @@ namespace FineUIPro.Web.ZHGL.DataSync //this.txtUnitId.Text = model.UnitId; if (!string.IsNullOrEmpty(model.FactoryId)) { - DropFactory.SelectedValue=model.FactoryId; + DropFactory.SelectedValue = model.FactoryId; } if (model.ReportDate != null) @@ -144,7 +138,7 @@ namespace FineUIPro.Web.ZHGL.DataSync return; } - if (DropFactory.SelectedValue==Const._Null) + if (DropFactory.SelectedValue == Const._Null) { ShowNotify("请选择实业!"); @@ -189,9 +183,9 @@ namespace FineUIPro.Web.ZHGL.DataSync defect.Medium = objects["values"]["Medium"].ToString(); defect.MeasurementUnit = objects["values"]["MeasurementUnit"].ToString(); defect.Value = objects["values"]["Value"].ToString(); - defect.DateTime =DateTime.Parse(objects["values"]["DateTime"].ToString()) ; + defect.DateTime = DateTime.Parse(objects["values"]["DateTime"].ToString()); //defect.HazardLevel = Funs.GetNewInt(objects["values"]["HazardLevel"].ToString()); - + BLL.HazardRealtimedeviceService.AddHazard_RealTimeDevice(defect); } } @@ -252,7 +246,7 @@ namespace FineUIPro.Web.ZHGL.DataSync Grid_Realtimedevice.DataSource = dt_Realtimedevice; Grid_Realtimedevice.DataBind(); - var dt_Hidden= SyhsedataHiddendangercheckService.GetSYHSEData_HiddenDangerCheckByDate(model.ReportDate); + var dt_Hidden = SyhsedataHiddendangercheckService.GetSYHSEData_HiddenDangerCheckByDate(model.ReportDate); Grid_Hidden.RecordCount = dt_Hidden.Count; Grid_Hidden.DataSource = dt_Hidden; Grid_Hidden.DataBind(); diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_SYHSE.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_SYHSE.aspx.cs index 55a980dd..b8a76071 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_SYHSE.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_SYHSE.aspx.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using BLL; +using System; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.DataSync diff --git a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_SYHSEEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_SYHSEEdit.aspx.cs index 0db446d8..705ef3ef 100644 --- a/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_SYHSEEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/DataSync/SYHSEData_SYHSEEdit.aspx.cs @@ -1,14 +1,10 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.ZHGL.DataSync { - public partial class SYHSEData_SYHSEEdit: PageBase + public partial class SYHSEData_SYHSEEdit : PageBase { #region /// diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs index d4d0ab23..513c7e66 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs @@ -1,9 +1,9 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using BLL; using System.Text; using AspNet = System.Web.UI.WebControls; diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs index a6960b58..062ef1c8 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs @@ -99,7 +99,7 @@ namespace FineUIPro.Web.ZHGL.Emergency //this.ctlAuditFlow.UnitId = this.CurrUser.UnitId; } } - + /// /// 初始化下拉框 /// diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs index 3a69e356..5843c0b7 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs @@ -43,7 +43,7 @@ namespace FineUIPro.Web.ZHGL.Emergency // this.UnitId = thisUnit.UnitId; //} - BLL.UnitService.InitBranchUnitDropDownList(this.drpUnitId, BLL.Const.UnitId_SEDIN, true); + BLL.UnitService.InitBranchUnitDropDownList(this.drpUnitId, BLL.Const.UnitId_SEDIN, true); //BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true); //if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) //{ @@ -57,7 +57,7 @@ namespace FineUIPro.Web.ZHGL.Emergency //} this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 - this.BindGrid(); + this.BindGrid(); } } /// @@ -82,7 +82,7 @@ namespace FineUIPro.Web.ZHGL.Emergency { //listStr.Add(new SqlParameter("@UnitId", this.UnitId)); strSql += " AND EmergencyList.States = @States"; ///状态为已完成 - listStr.Add(new SqlParameter("@States", BLL.Const.State_2)); + listStr.Add(new SqlParameter("@States", BLL.Const.State_2)); } else { @@ -106,7 +106,7 @@ namespace FineUIPro.Web.ZHGL.Emergency } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - Grid1.RecordCount = tb.Rows.Count; + Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); @@ -195,13 +195,13 @@ namespace FineUIPro.Web.ZHGL.Emergency { if (this.btnMenuEdit.Hidden || Emergency.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EmergencyListView.aspx?EmergencyListId={0}", id, "查看 - "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EmergencyListView.aspx?EmergencyListId={0}", id, "查看 - "))); } else { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EmergencyListEdit.aspx?EmergencyListId={0}", id, "编辑 - "))); } - } + } } #endregion @@ -214,7 +214,7 @@ namespace FineUIPro.Web.ZHGL.Emergency protected void btnMenuDelete_Click(object sender, EventArgs e) { if (Grid1.SelectedRowIndexArray.Length > 0) - { + { foreach (int rowIndex in Grid1.SelectedRowIndexArray) { string rowID = Grid1.DataKeys[rowIndex][0].ToString(); @@ -230,9 +230,9 @@ namespace FineUIPro.Web.ZHGL.Emergency this.BindGrid(); ShowNotify("删除数据成功!", MessageBoxIcon.Success); } - } + } #endregion - + #region 获取按钮权限 /// /// 获取按钮权限 diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.cs index 5e4d6951..d93db5e0 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.cs @@ -1,10 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.ZHGL.Emergency { @@ -36,8 +31,8 @@ namespace FineUIPro.Web.ZHGL.Emergency protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.EmergencyListId = Request.Params["EmergencyListId"]; if (!string.IsNullOrEmpty(this.EmergencyListId)) { @@ -48,8 +43,8 @@ namespace FineUIPro.Web.ZHGL.Emergency this.txtEmergencyCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.EmergencyListId); this.txtEmergencyName.Text = EmergencyList.EmergencyName; this.drpUnit.Text = BLL.UnitService.GetUnitNameByUnitId(EmergencyList.UnitId); - var emergencyType =BLL.EmergencyTypeService.GetEmergencyTypeById(EmergencyList.EmergencyTypeId); - if(emergencyType != null) + var emergencyType = BLL.EmergencyTypeService.GetEmergencyTypeById(EmergencyList.EmergencyTypeId); + if (emergencyType != null) { this.drpEmergencyType.Text = emergencyType.EmergencyTypeName; } @@ -59,14 +54,14 @@ namespace FineUIPro.Web.ZHGL.Emergency this.txtEmergencyContents.Text = HttpUtility.HtmlDecode(EmergencyList.EmergencyContents); } } - + ///初始化审核菜单 //this.ctlAuditFlow.MenuId = BLL.Const.UnitEmergencyListMenuId; //this.ctlAuditFlow.DataId = this.EmergencyListId; } } #endregion - + #region 附件上传 /// /// 上传附件 diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs index 050823ba..378cc4d9 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs @@ -1,9 +1,9 @@ -using System; +using BLL; +using Newtonsoft.Json.Linq; +using System; using System.Collections.Generic; using System.Linq; using System.Text; -using BLL; -using Newtonsoft.Json.Linq; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs index 9e9de818..a38972c7 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs @@ -1370,7 +1370,7 @@ namespace FineUIPro.Web.ZHGL.Environmental PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); return; } - else if (code=="3") + else if (code == "3") { Alert.ShowInParent("集团当前季度数据已锁定,无法上传!", MessageBoxIcon.Error); } @@ -1389,26 +1389,26 @@ namespace FineUIPro.Web.ZHGL.Environmental protected void btnSave_Click(object sender, EventArgs e) { - /* bool isEmpty = false; - foreach (JObject mergedRow in Grid1.GetMergedData()) - { - JObject values = mergedRow.Value("values"); - int rowIndex = mergedRow.Value("index"); - string sortIndex = values.Value("SortIndex"); - if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38") - { - if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) - { - isEmpty = true; - break; - } - } - } - if (isEmpty) - { - ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); - return; - }*/ + /* bool isEmpty = false; + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int rowIndex = mergedRow.Value("index"); + string sortIndex = values.Value("SortIndex"); + if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38") + { + if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) + { + isEmpty = true; + break; + } + } + } + if (isEmpty) + { + ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); + return; + }*/ Save("add"); ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReport.aspx.cs index 5fe6073c..cc51d128 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReport.aspx.cs @@ -1,9 +1,9 @@ -using System; +using BLL; +using Newtonsoft.Json.Linq; +using System; using System.Collections.Generic; using System.Linq; using System.Text; -using BLL; -using Newtonsoft.Json.Linq; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental @@ -211,7 +211,7 @@ namespace FineUIPro.Web.ZHGL.Environmental if (buttonList.Contains(BLL.Const.BtnDelete)) { this.btnDelete.Hidden = false; - } + } } var getReport = BLL.ChemicalReportService.GetChemicalReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); @@ -234,7 +234,7 @@ namespace FineUIPro.Web.ZHGL.Environmental // } // else if (getReport.HandleState == BLL.Const.HandleState_4) // { - this.btnUpdata.Hidden = false; + this.btnUpdata.Hidden = false; // } //} } diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReportSave.aspx.cs index 1e2dbf3c..9383b53a 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReportSave.aspx.cs @@ -1,7 +1,6 @@ using BLL; using Model; using Newtonsoft.Json.Linq; -using Org.BouncyCastle.Asn1.Ocsp; using System; using System.Collections.Generic; using System.Data; diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx.cs index b267f225..3b241f24 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx.cs @@ -3,9 +3,6 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReportSave.aspx.cs index 67dae505..a2f08365 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReportSave.aspx.cs @@ -1,11 +1,9 @@ using BLL; using Model; using Newtonsoft.Json.Linq; -using Org.BouncyCastle.Asn1.Ocsp; using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; using System.Web.UI.WebControls; @@ -468,7 +466,7 @@ namespace FineUIPro.Web.ZHGL.Environmental var model = new Environmental_EnergyReportItem { EnergyReportItemId = SQLHelper.GetNewID(typeof(Model.Environmental_EnergyReportItem)), - BusinessCategory = getLenthSpace(indexName.SortIndex) +isthisUnit.UnitName, + BusinessCategory = getLenthSpace(indexName.SortIndex) + isthisUnit.UnitName, SortIndex = item.SortIndex, SortUnit = 2, }; @@ -481,7 +479,7 @@ namespace FineUIPro.Web.ZHGL.Environmental model = new Environmental_EnergyReportItem { EnergyReportItemId = SQLHelper.GetNewID(typeof(Model.Environmental_EnergyReportItem)), - BusinessCategory = getLenthSpace(indexName.SortIndex) +unitItem.UnitName, + BusinessCategory = getLenthSpace(indexName.SortIndex) + unitItem.UnitName, SortIndex = item.SortIndex, SortUnit = j, }; @@ -654,16 +652,18 @@ namespace FineUIPro.Web.ZHGL.Environmental #endregion #region 取具体数量的空格 - private string getLenthSpace(string SortIndex) { + private string getLenthSpace(string SortIndex) + { string returnVal = ""; if (SortIndex == "02" || SortIndex == "16" || SortIndex == "44") { returnVal += "A"; } - else { + else + { returnVal += "B"; } - + return returnVal; } #endregion diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/OperationReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/OperationReport.aspx.cs index 333c5e29..fa2b65b4 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/OperationReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/OperationReport.aspx.cs @@ -5,8 +5,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental @@ -97,7 +95,8 @@ namespace FineUIPro.Web.ZHGL.Environmental } this.Grid1.Title = "中央企业节能环保和经营状况季报" + this.drpQuarters.SelectedItem.Text + this.drpYear.SelectedItem.Text + upState; } - else { + else + { var upState = "(未上报)"; @@ -232,7 +231,7 @@ namespace FineUIPro.Web.ZHGL.Environmental Model.Environmental_OperationReport report = Funs.DB.Environmental_OperationReport.Where(s => s.UnitId == currUnitId && s.Year.ToString() == year && s.Quarters.ToString() == quarter).FirstOrDefault(); if (report != null) { - if (report.UpState=="3") + if (report.UpState == "3") { ShowNotify("当前报表已经上报!不能重复上报。", MessageBoxIcon.Warning); return; diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/OperationReportEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/OperationReportEdit.aspx.cs index 7a3bdb34..f9a512c9 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/OperationReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/OperationReportEdit.aspx.cs @@ -66,7 +66,7 @@ namespace FineUIPro.Web.ZHGL.Environmental ddlUnitId.SelectedValue = BLL.Const.UnitId_SEDIN; BindGrid(year, quarter, unitId); - + } } @@ -170,19 +170,20 @@ namespace FineUIPro.Web.ZHGL.Environmental var reportItemlist = new List(); //第一个本单位 var isthisUnit = CommonService.GetIsThisUnit(); - var reportItemModel = new Model.Environmental_OperationReportItem() { + var reportItemModel = new Model.Environmental_OperationReportItem() + { BusinessReportItemId = Guid.NewGuid().ToString(), SortIndex = 1, UnitName = isthisUnit.UnitName, - SortUnitName= isthisUnit.UnitName, + SortUnitName = isthisUnit.UnitName, Code = isthisUnit.UnitCode, UnitLevel = "", - CreateDate=null, - Place= isthisUnit.Address, - PersonNum=0, - TotalAssets=0, - TotalValue=0, - NewInvestment=0, + CreateDate = null, + Place = isthisUnit.Address, + PersonNum = 0, + TotalAssets = 0, + TotalValue = 0, + NewInvestment = 0, }; reportItemlist.Add(reportItemModel); //加载分单位 @@ -363,10 +364,11 @@ namespace FineUIPro.Web.ZHGL.Environmental #endregion #region 保存子表 - private void saveReportItem(string BusinessReportId) { + private void saveReportItem(string BusinessReportId) + { var list = Funs.DB.Environmental_OperationReportItem.Where(x => x.BusinessReportId == BusinessReportId).ToList(); //先删除 - if (list.Count>0) + if (list.Count > 0) { Funs.DB.Environmental_OperationReportItem.DeleteAllOnSubmit(list); Funs.DB.SubmitChanges(); @@ -379,17 +381,18 @@ namespace FineUIPro.Web.ZHGL.Environmental { JObject values = item.Value("values"); int i = item.Value("index"); - var model = new Model.Environmental_OperationReportItem() { - BusinessReportItemId= Grid1.Rows[i].DataKeys[0].ToString(), - BusinessReportId= BusinessReportId, - SortIndex= i+1, + var model = new Model.Environmental_OperationReportItem() + { + BusinessReportItemId = Grid1.Rows[i].DataKeys[0].ToString(), + BusinessReportId = BusinessReportId, + SortIndex = i + 1, UnitName = values.Value("UnitName").ToString(), - SortUnitName= isthisUnit.UnitName, - Code= values.Value("Code").ToString(), - UnitLevel= values.Value("UnitLevel").ToString(), - Place= values.Value("Place").ToString(), - PersonNum= values.Value("PersonNum"), - TotalAssets= values.Value("TotalAssets"), + SortUnitName = isthisUnit.UnitName, + Code = values.Value("Code").ToString(), + UnitLevel = values.Value("UnitLevel").ToString(), + Place = values.Value("Place").ToString(), + PersonNum = values.Value("PersonNum"), + TotalAssets = values.Value("TotalAssets"), TotalValue = values.Value("TotalValue"), NewInvestment = values.Value("NewInvestment"), diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx.cs index 4f194a89..2b0cfef1 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx.cs @@ -1,8 +1,8 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Linq; using System.Text; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental @@ -39,9 +39,9 @@ namespace FineUIPro.Web.ZHGL.Environmental this.InitDropDownList(); this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.ProjectId = this.ProjectId; - if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) ) + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) { - this.panelLeftRegion.Hidden = true; + this.panelLeftRegion.Hidden = true; ////权限按钮方法 this.GetButtonPower(); } diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.cs index 481502d8..2b95f832 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.cs @@ -3,9 +3,7 @@ using Model; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; -using System.Data; using System.Linq; -using System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental { @@ -51,7 +49,7 @@ namespace FineUIPro.Web.ZHGL.Environmental drpUnit.DataValueField = "UnitId"; drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); drpUnit.DataBind(); - this.drpUnit.Readonly = true; + this.drpUnit.Readonly = true; string year = Request.QueryString["Year"]; string months = Request.QueryString["Months"]; ArchitectureReportId = Request.QueryString["ArchitectureReportId"]; diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectChemicalReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectChemicalReport.aspx.cs index e5319f40..357e8fca 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectChemicalReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectChemicalReport.aspx.cs @@ -1,8 +1,8 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Linq; using System.Text; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectChemicalReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectChemicalReportSave.aspx.cs index 6b35ec4a..0c6fd13e 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectChemicalReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectChemicalReportSave.aspx.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Linq; -using System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental { diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectEnergyReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectEnergyReport.aspx.cs index c76b79c4..f2cdaba7 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectEnergyReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectEnergyReport.aspx.cs @@ -3,9 +3,6 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental @@ -63,7 +60,7 @@ namespace FineUIPro.Web.ZHGL.Environmental { upState = "(未上报)"; } - this.SimpleForm1.Title = "中央企业节能环保产业企业生产和服务业务情况报表" + report.QuartersStr + report.YearStr ; + this.SimpleForm1.Title = "中央企业节能环保产业企业生产和服务业务情况报表" + report.QuartersStr + report.YearStr; lbUnitName.Text = "填报企业:" + report.ProjectName; if (report.FillingDate != null) { diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectEnergyReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectEnergyReportSave.aspx.cs index 94c7ebc3..9a940de8 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectEnergyReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectEnergyReportSave.aspx.cs @@ -4,9 +4,6 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental { @@ -243,7 +240,7 @@ namespace FineUIPro.Web.ZHGL.Environmental //string EnergyReportId = Request.QueryString["EnergyReportId"]; Model.Environmental_ProjectEnergyReport report = new Environmental_ProjectEnergyReport { - ProjectId=this.CurrUser.LoginProjectId, + ProjectId = this.CurrUser.LoginProjectId, Year = Funs.GetNewIntOrZero(drpYear.SelectedValue), Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue) }; diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectOperationReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectOperationReport.aspx.cs index f5409858..6b4b7ce6 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectOperationReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectOperationReport.aspx.cs @@ -5,9 +5,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental { diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectOperationReportEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectOperationReportEdit.aspx.cs index 89adf185..a4e3340c 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectOperationReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ProjectOperationReportEdit.aspx.cs @@ -1,14 +1,7 @@ using BLL; -using Newtonsoft.Json.Linq; - using System; -using System.Collections.Generic; using System.Linq; -using System.Reflection; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Environmental { diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.cs index 1b3446c9..1bd15f5b 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.cs @@ -1,8 +1,8 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Linq; using System.Text; -using BLL; namespace FineUIPro.Web.ZHGL.Information { diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.cs index 61ad983f..935dd7bf 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.cs @@ -795,7 +795,7 @@ namespace FineUIPro.Web.ZHGL.Information } } #endregion - + #region 复制上月数据 /// /// 复制上月报表数据 diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.cs index 26631cdc..5349b28f 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Information { diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.cs index 73d3d69e..61561a3c 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.cs @@ -405,7 +405,7 @@ namespace FineUIPro.Web.ZHGL.Information } } #endregion - + #region 关闭办理流程窗口 /// /// 关闭办理流程窗口 diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.cs index 3a1a44a0..2bb7ce86 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.cs @@ -343,7 +343,7 @@ namespace FineUIPro.Web.ZHGL.Information Save("submit"); } #endregion - + #region Grid1行点击事件 protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) { diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.cs index e26119e9..675213e2 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.cs @@ -1,9 +1,9 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Information @@ -16,7 +16,7 @@ namespace FineUIPro.Web.ZHGL.Information if (!IsPostBack) { string loginform = ConfigurationManager.AppSettings["LoginForm"]; - if (!string.IsNullOrWhiteSpace(loginform) &&loginform == "Login_ZJ.aspx") + if (!string.IsNullOrWhiteSpace(loginform) && loginform == "Login_ZJ.aspx") {//判断是否是重机客户,如果是重定向页面 Response.Redirect("MillionsMonthlyReportZJ.aspx"); } diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/QualityWorkSummaryReportEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/QualityWorkSummaryReportEdit.aspx.cs index 9b34448e..2a69c367 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/QualityWorkSummaryReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/QualityWorkSummaryReportEdit.aspx.cs @@ -257,7 +257,7 @@ namespace FineUIPro.Web.ZHGL.Information //} //if (type != "submit") //{ - PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); //} } @@ -330,7 +330,7 @@ namespace FineUIPro.Web.ZHGL.Information newReport.QualityWorkSummaryReportId = this.QualityWorkSummaryReportId; newReport.UnitId = this.ddlUnitId.SelectedValue; newReport.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); - + newReport.Performance = report.Performance; newReport.AccidentSituation = report.AccidentSituation; newReport.Awards = report.Awards; diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/QuarterlyProjectQuality.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/QuarterlyProjectQuality.aspx.cs index dd59b91e..4222b9a0 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/QuarterlyProjectQuality.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/QuarterlyProjectQuality.aspx.cs @@ -1,7 +1,6 @@ using BLL; using System; using System.Linq; -using System.Web; using System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Information @@ -23,7 +22,7 @@ namespace FineUIPro.Web.ZHGL.Information ViewState["QuarterlyProjectQualityId"] = value; } } -#endregion + #endregion #region 加载页面 protected void Page_Load(object sender, EventArgs e) @@ -54,7 +53,7 @@ namespace FineUIPro.Web.ZHGL.Information lbCompileMan.Text = string.Empty; this.lbTel.Text = string.Empty; this.lbCompileDate.Text = string.Empty; - } + } #endregion #region 获取记录值 @@ -175,7 +174,7 @@ namespace FineUIPro.Web.ZHGL.Information { BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarter.ToString(), report.QuarterlyProjectQualityId, BLL.Const.QuarterlyProjectQualityMenuId, BLL.Const.BtnDelete); - BLL.QuarterlyProjectQualityService.DeleteQuarterlyProjectQualityById(report.QuarterlyProjectQualityId); + BLL.QuarterlyProjectQualityService.DeleteQuarterlyProjectQualityById(report.QuarterlyProjectQualityId); SetEmpty(); this.btnNew.Hidden = false; diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/QuarterlyProjectQualityEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/QuarterlyProjectQualityEdit.aspx.cs index 21b6d09e..f86268bd 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/QuarterlyProjectQualityEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/QuarterlyProjectQualityEdit.aspx.cs @@ -48,9 +48,9 @@ namespace FineUIPro.Web.ZHGL.Information ddlQuarter.DataValueField = "ConstValue"; ddlQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011); ddlQuarter.DataBind(); - + this.ddlUnitId.Readonly = true; - string unitId = Request.Params["UnitId"]; + string unitId = Request.Params["UnitId"]; string year = Request.QueryString["Year"]; string quarter = Request.QueryString["Quarter"]; this.QuarterlyProjectQualityId = Request.Params["QuarterlyProjectQualityId"]; @@ -69,8 +69,8 @@ namespace FineUIPro.Web.ZHGL.Information if (!string.IsNullOrEmpty(quarterlyProjectQuality.UnitId)) { this.ddlUnitId.SelectedValue = quarterlyProjectQuality.UnitId; - BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.ddlResponsiblePerson, this.ddlUnitId.SelectedValue,"", true); - BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.ddlCompileMan, this.ddlUnitId.SelectedValue,"", true); + BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.ddlResponsiblePerson, this.ddlUnitId.SelectedValue, "", true); + BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.ddlCompileMan, this.ddlUnitId.SelectedValue, "", true); } if (quarterlyProjectQuality.Year.HasValue) @@ -129,8 +129,8 @@ namespace FineUIPro.Web.ZHGL.Information this.btnCopy.Hidden = false; this.ddlUnitId.SelectedValue = unitId; - BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.ddlResponsiblePerson, this.ddlUnitId.SelectedValue,"", true); - BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.ddlCompileMan, this.ddlUnitId.SelectedValue,"", true); + BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.ddlResponsiblePerson, this.ddlUnitId.SelectedValue, "", true); + BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.ddlCompileMan, this.ddlUnitId.SelectedValue, "", true); this.ddlYearId.SelectedValue = year; this.ddlQuarter.SelectedValue = quarter; @@ -272,7 +272,7 @@ namespace FineUIPro.Web.ZHGL.Information YearDirectEconomicLoss = Funs.GetNewInt(this.txtYearDirectEconomicLoss.Text.Trim()), Tel = this.txtTel.Text.Trim() }; - if (this.ddlUnitId.SelectedValue!=BLL.Const._Null) + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) { quarterlyProjectQuality.UnitId = this.ddlUnitId.SelectedValue; } @@ -297,7 +297,7 @@ namespace FineUIPro.Web.ZHGL.Information if (string.IsNullOrEmpty(this.QuarterlyProjectQualityId)) { - var s = BLL.QuarterlyProjectQualityService.GetQuarterlyProjectQualityByUnitIdAndYearAndQuarter(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue),Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue)); + var s = BLL.QuarterlyProjectQualityService.GetQuarterlyProjectQualityByUnitIdAndYearAndQuarter(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue)); if (s != null) { ShowNotify("该单位的该季度工程项目质量信息表已经存在,不能重复编制!", MessageBoxIcon.Warning); @@ -351,12 +351,12 @@ namespace FineUIPro.Web.ZHGL.Information /// protected void btnSave_Click(object sender, EventArgs e) { - if (this.ddlUnitId.SelectedValue==BLL.Const._Null) + if (this.ddlUnitId.SelectedValue == BLL.Const._Null) { Alert.ShowInTop("请选择单位", MessageBoxIcon.Warning); return; } - if (this.ddlYearId.SelectedValue==BLL.Const._Null) + if (this.ddlYearId.SelectedValue == BLL.Const._Null) { Alert.ShowInTop("请选择年度", MessageBoxIcon.Warning); return; diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.cs index 7bbf141e..c43bd113 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.cs @@ -24,7 +24,7 @@ namespace FineUIPro.Web.ZHGL.Information private void BindGrid() { string strSql = "select * from View_ProjectData_FlowOperate where DataId=@DataId order by SortIndex desc"; - SqlParameter[] parameter = new SqlParameter[] + SqlParameter[] parameter = new SqlParameter[] { new SqlParameter("@DataId",Request.Params["Id"]), }; @@ -39,7 +39,7 @@ namespace FineUIPro.Web.ZHGL.Information Grid1.DataBind(); } #endregion - + /// /// 排序 /// diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs index f4af5b2e..c4aaffda 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs @@ -48,7 +48,7 @@ namespace FineUIPro.Web.ZHGL.Information { this.Type = Request.Params["Type"]; this.Id = Request.Params["Id"]; - this.BindGrid(); + this.BindGrid(); } } #endregion @@ -106,7 +106,7 @@ namespace FineUIPro.Web.ZHGL.Information string handleStates = (this.cbNext.SelectedValue == "0") ? BLL.Const.HandleState_4 : BLL.Const.HandleState_3; if (!string.IsNullOrEmpty(handleMan) && handleMan != Const._Null) { - + #region 企业安全数据统计月报 if (Type == "MillionsMonthlyReport")//企业安全数据统计月报 { @@ -248,7 +248,7 @@ namespace FineUIPro.Web.ZHGL.Information /// /// /// - private void SetFlowData(string menuId, string dataId,string handleMan) + private void SetFlowData(string menuId, string dataId, string handleMan) { var getIsExitOperate = Funs.DB.ProjectData_FlowOperate.FirstOrDefault(x => x.DataId == this.Id); if (getIsExitOperate == null) //首次生成审批记录 @@ -276,7 +276,7 @@ namespace FineUIPro.Web.ZHGL.Information BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate); } - string states = (this.cbNext.SelectedValue == "0") ? BLL.Const.State_2: BLL.Const.State_1; + string states = (this.cbNext.SelectedValue == "0") ? BLL.Const.State_2 : BLL.Const.State_1; ////增加 下一步办理信息 Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate { @@ -288,7 +288,7 @@ namespace FineUIPro.Web.ZHGL.Information }; BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate); } - + /// /// /// diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyBriefing.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyBriefing.aspx.cs index 03a23e9f..46b4c9bd 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyBriefing.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyBriefing.aspx.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Text; -using BLL; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Information { @@ -217,7 +214,7 @@ namespace FineUIPro.Web.ZHGL.Information } } #endregion - + #region 单位下拉选择事件 /// /// 单位下拉框联动事件 diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyBriefingEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyBriefingEdit.aspx.cs index 88dcaf33..ccf0594c 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyBriefingEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyBriefingEdit.aspx.cs @@ -42,7 +42,7 @@ namespace FineUIPro.Web.ZHGL.Information drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); drpUnit.DataBind(); this.drpUnit.Readonly = true; - BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.drpUnit.SelectedValue,"", true); + BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCompileMan, this.drpUnit.SelectedValue, "", true); string unitId = Request.QueryString["UnitId"]; string year = Request.QueryString["Year"]; string months = Request.QueryString["Months"]; @@ -167,20 +167,20 @@ namespace FineUIPro.Web.ZHGL.Information Auditor = this.txtAuditor.Text.Trim(), Approver = this.txtApprover.Text.Trim(), MainWork = this.txtMainWork.Text, - HazardRecording=this.txtHazardRecording.Text, - SafetyAccident=this.txtSafetyAccident.Text, - EPAccident=this.txtEPAccident.Text, - OHAccident=this.txtOHAccident.Text, - WorkPermitNum=this.txtWorkPermitNum.Text, - HiddenDangerDetection =this.txtHiddenDangerDetection.Text, - RectificationSituation=this.txtRectificationSituation.Text, - CheckProblemsRectification=this.txtCheckProblemsRectification.Text, - PendingProject=this.txtPendingProject.Text, - ContractorManagement=this.txtContractorManagement.Text, - EnvironmentalEmissions=this.txtEnvironmentalEmissions.Text, - NextMonthWorkPlan=this.txtNextMonthWorkPlan.Text + HazardRecording = this.txtHazardRecording.Text, + SafetyAccident = this.txtSafetyAccident.Text, + EPAccident = this.txtEPAccident.Text, + OHAccident = this.txtOHAccident.Text, + WorkPermitNum = this.txtWorkPermitNum.Text, + HiddenDangerDetection = this.txtHiddenDangerDetection.Text, + RectificationSituation = this.txtRectificationSituation.Text, + CheckProblemsRectification = this.txtCheckProblemsRectification.Text, + PendingProject = this.txtPendingProject.Text, + ContractorManagement = this.txtContractorManagement.Text, + EnvironmentalEmissions = this.txtEnvironmentalEmissions.Text, + NextMonthWorkPlan = this.txtNextMonthWorkPlan.Text }; - if (this.drpCompileMan.SelectedValue!=BLL.Const._Null) + if (this.drpCompileMan.SelectedValue != BLL.Const._Null) { report.CompileMan = this.drpCompileMan.SelectedValue; } @@ -209,7 +209,7 @@ namespace FineUIPro.Web.ZHGL.Information BLL.SafetyBriefingService.UpdateSafetyBriefing(report); BLL.LogService.AddSys_Log(this.CurrUser, report.YearId.ToString() + "-" + report.Month.ToString(), report.SafetyBriefingId, BLL.Const.SafetyBriefingMenuId, BLL.Const.BtnModify); } - + if (type == "updata") //数据同步 { if (report.UpState == BLL.Const.UpState_2) @@ -316,7 +316,7 @@ namespace FineUIPro.Web.ZHGL.Information newReport.NextMonthWorkPlan = report.NextMonthWorkPlan; newReport.UpState = BLL.Const.UpState_2; BLL.SafetyBriefingService.AddSafetyBriefing(newReport); - + GetValues(newReport.SafetyBriefingId); } } diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs index d888f427..2b45e8af 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs @@ -6,8 +6,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Information { diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.cs index 0432df9f..9c6e84e3 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.cs @@ -424,7 +424,7 @@ namespace FineUIPro.Web.ZHGL.Information this.btnImport.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnPrint)) - { + { this.btnPrint.Hidden = false; } int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.cs index 69c02fa7..e1bcd807 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.cs @@ -1,11 +1,10 @@ -using System; +using BLL; +using System; using System.Collections.Generic; +using System.IO; using System.Linq; -using System.Web; using System.Web.UI; using System.Web.UI.WebControls; -using BLL; -using System.IO; namespace FineUIPro.Web.ZHGL.Information { @@ -986,7 +985,7 @@ namespace FineUIPro.Web.ZHGL.Information Save("submit"); } #endregion - + #region 上传附件 /// /// 上传安全专职人员名单附件 diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/WorkSummaryReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/WorkSummaryReport.aspx.cs index a84ac17a..cf4d8ab8 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/WorkSummaryReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/WorkSummaryReport.aspx.cs @@ -326,7 +326,7 @@ namespace FineUIPro.Web.ZHGL.Information /// protected void BtnBulletLeft_Click(object sender, EventArgs e) { - int y = Convert.ToInt32(drpYear.SelectedValue)- 1; + int y = Convert.ToInt32(drpYear.SelectedValue) - 1; drpYear.SelectedValue = y.ToString(); GetValue(); } diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/WorkSummaryReportEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/WorkSummaryReportEdit.aspx.cs index ca44b649..74d3f486 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/WorkSummaryReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/WorkSummaryReportEdit.aspx.cs @@ -45,7 +45,7 @@ namespace FineUIPro.Web.ZHGL.Information ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); ddlYearId.DataBind(); - this.ddlUnitId.Readonly = true; + this.ddlUnitId.Readonly = true; string unitId = Request.Params["UnitId"]; string year = Request.QueryString["Year"]; this.WorkSummaryReportId = Request.Params["WorkSummaryReportId"]; diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.cs index ebfc66ad..78b2c218 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.cs @@ -4,8 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Meeting { @@ -25,7 +23,7 @@ namespace FineUIPro.Web.ZHGL.Meeting ////权限按钮方法 this.GetButtonPower(); this.btnNew.OnClientClick = Window1.GetShowReference("CompanySafetyMeetingEdit.aspx") + "return false;"; - + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.cs index 33148376..b4221810 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.cs @@ -4,8 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Meeting { @@ -25,7 +23,7 @@ namespace FineUIPro.Web.ZHGL.Meeting ////权限按钮方法 this.GetButtonPower(); this.btnNew.OnClientClick = Window1.GetShowReference("CompanySpecialMeetingEdit.aspx") + "return false;"; - + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs index 65b0551d..298e6e16 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs @@ -46,8 +46,8 @@ namespace FineUIPro.Web.ZHGL.Meeting { this.txtCompanySpecialMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", CompanySpecialMeeting.CompanySpecialMeetingDate); } - - this.txtCompileMan.Text =Person_PersonsService.GetPersonsNameById(CompanySpecialMeeting.CompileMan); + + this.txtCompileMan.Text = Person_PersonsService.GetPersonsNameById(CompanySpecialMeeting.CompileMan); if (CompanySpecialMeeting.AttentPersonNum != null) { this.txtAttentPersonNum.Text = CompanySpecialMeeting.AttentPersonNum.ToString(); diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs index a88ee579..13022901 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs @@ -1,5 +1,4 @@ using Aspose.Words; -using Aspose.Words.Tables; using BLL; using System; using System.Collections.Generic; diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx.cs index 80daa273..6e123b20 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx.cs @@ -1,7 +1,6 @@ -using System; +using BLL; +using System; using System.Collections.Generic; -using System.Web; -using BLL; using System.Linq; namespace FineUIPro.Web.ZHGL.Plan diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlan.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlan.aspx.cs index 036ad66e..3e7161e7 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlan.aspx.cs @@ -2,9 +2,7 @@ using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; -using System.Threading.Tasks; namespace FineUIPro.Web.ZHGL.Plan { diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlanEdit.aspx.cs index 15ab38f7..b078d8b1 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlanEdit.aspx.cs @@ -1,12 +1,9 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Plan { @@ -201,7 +198,7 @@ namespace FineUIPro.Web.ZHGL.Plan this.txtOpinions.Text = string.Empty; } } - + protected void btnSave_Click(object sender, EventArgs e) { if (validate()) diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlanView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlanView.aspx.cs index 12e7ec2b..cf1af146 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlanView.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/MainPlanView.aspx.cs @@ -1,12 +1,9 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Plan { diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ProjectPlan.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ProjectPlan.aspx.cs index 4fcac6c6..ef422fb3 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/ProjectPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ProjectPlan.aspx.cs @@ -5,7 +5,6 @@ using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; -using NPOI.SS.Util; namespace FineUIPro.Web.ZHGL.Plan { diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/TechnicalProposalReview.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/TechnicalProposalReview.aspx.cs index 2ecf45fa..6c0e2f20 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/TechnicalProposalReview.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/TechnicalProposalReview.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.ZHGL.Plan { diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/TechnicalProposalReviewView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/TechnicalProposalReviewView.aspx.cs index 641df034..e21026e2 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/TechnicalProposalReviewView.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/TechnicalProposalReviewView.aspx.cs @@ -1,12 +1,5 @@ using BLL; -using Newtonsoft.Json.Linq; using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections.Generic; -using System.Linq; -using System.Web.UI.WebControls; -using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Plan { diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroRecord.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroRecord.aspx.cs index be1c5357..573b8802 100644 --- a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroRecord.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroRecord.aspx.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using System.Linq; using System.Text; using AspNet = System.Web.UI.WebControls; -using System.Linq; namespace FineUIPro.Web.ZHGL.RealName { @@ -182,7 +182,7 @@ namespace FineUIPro.Web.ZHGL.RealName db.RealName_PushLog.DeleteAllOnSubmit(getRealName_PushLog); db.SubmitChanges(); } + } } - } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs index 4f06e9b1..2652422a 100644 --- a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs @@ -664,6 +664,6 @@ namespace FineUIPro.Web.ZHGL.RealName } } - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs index 7fdc7fa8..d48dac1e 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs @@ -1,10 +1,10 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; -using BLL; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ZHGL.Supervise diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs index c7d53787..369e6b4a 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs @@ -54,7 +54,7 @@ namespace FineUIPro.Web.ZHGL.Supervise BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, true); BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true); - BLL.UnitService.InitBranchUnitDropDownList(this.ddlCheckUnitId,BLL.Const.UnitId_SEDIN, false); + BLL.UnitService.InitBranchUnitDropDownList(this.ddlCheckUnitId, BLL.Const.UnitId_SEDIN, false); Funs.FineUIPleaseSelect(this.drpCheckMainType); //Funs.FineUIPleaseSelect(this.drpCheckType); this.SuperviseCheckReportId = Request.Params["SuperviseCheckReportId"]; diff --git a/SGGL/FineUIPro.Web/common/PageBase.cs b/SGGL/FineUIPro.Web/common/PageBase.cs index 268d260e..58415fd2 100644 --- a/SGGL/FineUIPro.Web/common/PageBase.cs +++ b/SGGL/FineUIPro.Web/common/PageBase.cs @@ -61,8 +61,8 @@ namespace FineUIPro.Web bool IsSafeReferer = ConstValue.drpConstItemList(ConstValue.Group_SafeReferer).FirstOrDefault(x => x.ConstValue == url) != null; if (!IsDataShowPage && !IsSafeReferer) { - // if (this.Page.Request.AppRelativeCurrentExecutionFilePath != "~/Login.aspx") - // Response.Redirect("~/Login.aspx"); + // if (this.Page.Request.AppRelativeCurrentExecutionFilePath != "~/Login.aspx") + // Response.Redirect("~/Login.aspx"); return; } @@ -1072,7 +1072,7 @@ namespace FineUIPro.Web var getCountry = Funs.DB.RealName_Country.FirstOrDefault(x => x.CountryId == countryCode); if (getCountry != null && !string.IsNullOrEmpty(getCountry.Cname)) { - strValue= getCountry.Cname; + strValue = getCountry.Cname; if (!string.IsNullOrEmpty(getPerson.ProvinceCode)) { var getProv = Funs.DB.RealName_City.FirstOrDefault(x => x.ProvinceCode == getPerson.ProvinceCode && x.CountryId == countryCode); @@ -1365,7 +1365,7 @@ namespace FineUIPro.Web string id = string.Empty; if (!string.IsNullOrEmpty(CheckAcceptType)) { - var item = GetCheckAcceptTypeList().FirstOrDefault(x=>x.Text== CheckAcceptType); + var item = GetCheckAcceptTypeList().FirstOrDefault(x => x.Text == CheckAcceptType); if (item != null) { id = item.Value; diff --git a/SGGL/FineUIPro.Web/common/main2.aspx.cs b/SGGL/FineUIPro.Web/common/main2.aspx.cs index 76ea8129..7de727ea 100644 --- a/SGGL/FineUIPro.Web/common/main2.aspx.cs +++ b/SGGL/FineUIPro.Web/common/main2.aspx.cs @@ -1,11 +1,4 @@ -using BLL; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; +using System; namespace FineUIPro.Web.common { @@ -15,7 +8,7 @@ namespace FineUIPro.Web.common { if (!IsPostBack) { - + } } } diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL.aspx.cs index 9fa6d685..e5d95fb3 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL.aspx.cs @@ -111,7 +111,7 @@ namespace FineUIPro.Web { return BLL.HJGL_WeldingReportService.GetPipeRate_finished(this.CurrUser.LoginProjectId); } - + } public decimal PipeRate2 { @@ -119,7 +119,7 @@ namespace FineUIPro.Web { return BLL.HJGL_WeldingReportService.GetPipeRate_unfinished(this.CurrUser.LoginProjectId); } - + } #endregion #region 项目焊接工程量统计 @@ -199,7 +199,7 @@ namespace FineUIPro.Web ////当日焊接 getNowJotList = (from x in getFinishedJotList join y in getWeldReportMain on x.WeldingDailyId equals y.WeldingDailyId - where y.WeldingDate.Value.Year== DateTime.Now.Year && y.WeldingDate.Value.Month == DateTime.Now.Month && y.WeldingDate.Value.Day == DateTime.Now.Day + where y.WeldingDate.Value.Year == DateTime.Now.Year && y.WeldingDate.Value.Month == DateTime.Now.Month && y.WeldingDate.Value.Day == DateTime.Now.Day select x).ToList(); ////焊接检测单明细 @@ -213,20 +213,20 @@ namespace FineUIPro.Web ProjectId = line.ProjectId, ID = x.NDEItemID, UnitId = line.UnitId, ///重定义单位 - UnitName=z.UnitName, + UnitName = z.UnitName, WorkAreaId = line.UnitId, /// 重定义区域 MaterialId = line.UnitWorkId, ///重定义材质 CHT_TotalFilm = x.TotalFilm, CHT_PassFilm = x.PassFilm, Specification = z.Specification, - WeldTypeCode=z.WeldTypeCode, - JointAttribute=z.JointAttribute, - UnitWorkName=z.UnitWorkName, - MaterialCode=z.MaterialCode + WeldTypeCode = z.WeldTypeCode, + JointAttribute = z.JointAttribute, + UnitWorkName = z.UnitWorkName, + MaterialCode = z.MaterialCode }).ToList(); ////总焊工 getAllWelderList = from x in Funs.DB.SitePerson_Person - where x.ProjectId == this.ProjectId && x.WorkPostId=="19B8F2A9-28D3-4F20-867A-1B2237C2E228" + where x.ProjectId == this.ProjectId && x.WorkPostId == "19B8F2A9-28D3-4F20-867A-1B2237C2E228" select x; this.getrate(this.ProjectId, unitId); @@ -235,8 +235,8 @@ namespace FineUIPro.Web getecharts04(); getecharts05(); getecharts06(); - this.divWelderEfficacyNum.InnerText = BLL.HJGL_WeldingReportService.GetWelderEfficacy(this.CurrUser .LoginProjectId).ToString() ; - if (PipeRate1 + PipeRate2==0) + this.divWelderEfficacyNum.InnerText = BLL.HJGL_WeldingReportService.GetWelderEfficacy(this.CurrUser.LoginProjectId).ToString(); + if (PipeRate1 + PipeRate2 == 0) { this.echarts02Value.InnerText = "0"; } @@ -255,11 +255,11 @@ namespace FineUIPro.Web this.GCRate2 = 0; this.XCRate1 = 0; this.XCRate2 = 0; - + decimal allGC = 0; decimal allXC = 0; var getWelds = Funs.DB.HJGL_WeldJoint.Where(x => x.ProjectId == projectId); - if (!string.IsNullOrEmpty(this.CurrUser.UnitId) ) + if (!string.IsNullOrEmpty(this.CurrUser.UnitId)) { //getWelds = from x in getWelds // join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId @@ -270,22 +270,22 @@ namespace FineUIPro.Web { decimal allDy = getWelds.Sum(x => x.Size ?? 0); //项目总达因数 - if (getWelds.Where(x => x.JointAttribute == "预制口").Count()>0) + if (getWelds.Where(x => x.JointAttribute == "预制口").Count() > 0) { - allGC = getWelds.Where(x => x.JointAttribute == "预制口").Sum(x => x.Size ?? 0); + allGC = getWelds.Where(x => x.JointAttribute == "预制口").Sum(x => x.Size ?? 0); } - if (getWelds.Where(x => x.JointAttribute == "安装口") .Count() > 0) + if (getWelds.Where(x => x.JointAttribute == "安装口").Count() > 0) { allXC = getWelds.Where(x => x.JointAttribute == "安装口").Sum(x => x.Size ?? 0); } var getWeldsOk = getWelds.Where(x => x.WeldingDailyId != null); - if (getWeldsOk.Count()>0) + if (getWeldsOk.Count() > 0) { var GCModel = getWeldsOk.Where(x => x.JointAttribute == "预制口"); if (GCModel.Count() > 0) { GCRate1 = GCModel.Sum(x => x.Size ?? 0); - // PipeRate1 = GCRate1; + // PipeRate1 = GCRate1; } var XCModel = getWeldsOk.Where(x => x.JointAttribute == "安装口"); @@ -297,7 +297,7 @@ namespace FineUIPro.Web } GCRate2 = allGC - GCRate1; XCRate2 = allXC - XCRate1; - // PipeRate2 = allDy - PipeRate1; + // PipeRate2 = allDy - PipeRate1; } @@ -415,9 +415,10 @@ namespace FineUIPro.Web //// 按单位 List type01List = new List(); List count011List = new List(); - var tb_type01 = getCH_CheckItemList.GroupBy(x => x.UnitName).Select(x => new { - UnitName=x.Key, - Current_pass_film=x.Sum(m => m.CHT_PassFilm) ??0, + var tb_type01 = getCH_CheckItemList.GroupBy(x => x.UnitName).Select(x => new + { + UnitName = x.Key, + Current_pass_film = x.Sum(m => m.CHT_PassFilm) ?? 0, Cht_totalfilm = x.Sum(m => m.CHT_TotalFilm) ?? 0 }); foreach (var item in tb_type01) @@ -441,7 +442,8 @@ namespace FineUIPro.Web ///按单位工程 List type02List = new List(); List count021List = new List(); - var tb_type02 = getCH_CheckItemList.GroupBy(x => x.UnitWorkName).Select(x => new { + var tb_type02 = getCH_CheckItemList.GroupBy(x => x.UnitWorkName).Select(x => new + { UnitWorkName = x.Key, Current_pass_film = x.Sum(m => m.CHT_PassFilm) ?? 0, Cht_totalfilm = x.Sum(m => m.CHT_TotalFilm) ?? 0 @@ -468,7 +470,8 @@ namespace FineUIPro.Web ///按材质类别 List type03List = new List(); List count031List = new List(); - var tb_type03 = getCH_CheckItemList.GroupBy(x => x.MaterialCode).Select(x => new { + var tb_type03 = getCH_CheckItemList.GroupBy(x => x.MaterialCode).Select(x => new + { MaterialCode = x.Key, Current_pass_film = x.Sum(m => m.CHT_PassFilm) ?? 0, Cht_totalfilm = x.Sum(m => m.CHT_TotalFilm) ?? 0 @@ -493,7 +496,8 @@ namespace FineUIPro.Web //焊缝规格 List type04List = new List(); List count041List = new List(); - var tb_type04 = getCH_CheckItemList.GroupBy(x => x.Specification).Select(x => new { + var tb_type04 = getCH_CheckItemList.GroupBy(x => x.Specification).Select(x => new + { Specification = x.Key, Current_pass_film = x.Sum(m => m.CHT_PassFilm) ?? 0, Cht_totalfilm = x.Sum(m => m.CHT_TotalFilm) ?? 0 @@ -518,7 +522,8 @@ namespace FineUIPro.Web //焊缝类型 List type05List = new List(); List count051List = new List(); - var tb_type05 = getCH_CheckItemList.GroupBy(x => x.WeldTypeCode).Select(x => new { + var tb_type05 = getCH_CheckItemList.GroupBy(x => x.WeldTypeCode).Select(x => new + { WeldTypeCode = x.Key, Current_pass_film = x.Sum(m => m.CHT_PassFilm) ?? 0, Cht_totalfilm = x.Sum(m => m.CHT_TotalFilm) ?? 0 @@ -543,7 +548,8 @@ namespace FineUIPro.Web //焊缝属性 List type06List = new List(); List count061List = new List(); - var tb_type06 = getCH_CheckItemList.GroupBy(x => x.JointAttribute).Select(x => new { + var tb_type06 = getCH_CheckItemList.GroupBy(x => x.JointAttribute).Select(x => new + { JointAttribute = x.Key, Current_pass_film = x.Sum(m => m.CHT_PassFilm) ?? 0, Cht_totalfilm = x.Sum(m => m.CHT_TotalFilm) ?? 0 @@ -580,16 +586,16 @@ namespace FineUIPro.Web protected string E05_Values04; protected void getecharts05() { - E05_Type01="[]"; - E05_Values01="[]"; - E05_Type02 = "[]"; - E05_Values02 = "[]"; - E05_Type03 = "[]"; - E05_Values03 = "[]"; - E05_Type04 = "[]"; - E05_Values04 = "[]"; + E05_Type01 = "[]"; + E05_Values01 = "[]"; + E05_Type02 = "[]"; + E05_Values02 = "[]"; + E05_Type03 = "[]"; + E05_Values03 = "[]"; + E05_Type04 = "[]"; + E05_Values04 = "[]"; - var alllist = from x in Funs.DB.HJGL_Batch_NDEItem + var alllist = from x in Funs.DB.HJGL_Batch_NDEItem join y in Funs.DB.HJGL_Batch_NDE on x.NDEID equals y.NDEID join z in Funs.DB.View_Batch_NDEItem on x.NDEID equals z.NDEID join m in Funs.DB.View_HJGL_Pipeline on z.PipelineCode equals m.PipelineCode @@ -696,20 +702,20 @@ namespace FineUIPro.Web E06_Values02 = "[]"; E06_Type03 = "[]"; E06_Values03 = "[]"; - decimal TotalDin=0; - var allwelderEfficacy= from x in Funs.DB.SitePerson_Person - join y in Funs.DB.HJGL_WeldJoint on x.PersonId equals y.CoverWelderId - join z in Funs.DB.HJGL_WeldingDaily on y.WeldingDailyId equals z.WeldingDailyId - join m in Funs.DB.HJGL_Pipeline on y.PipelineId equals m.PipelineId - where x.WorkPostId == "19B8F2A9-28D3-4F20-867A-1B2237C2E228" - group new { x,y,z,m} by new {x.UnitId,z.UnitWorkId,m.MaterialId ,y.Size} into tt - select new - { - Size =(tt.Sum(x=>x.y.Size)==null)?0: tt.Sum(x => x.y.Size), - UnitId = tt.Key.UnitId, - MaterialId = tt.Key.MaterialId, - UnitWorkId=tt.Key.UnitWorkId, - }; + decimal TotalDin = 0; + var allwelderEfficacy = from x in Funs.DB.SitePerson_Person + join y in Funs.DB.HJGL_WeldJoint on x.PersonId equals y.CoverWelderId + join z in Funs.DB.HJGL_WeldingDaily on y.WeldingDailyId equals z.WeldingDailyId + join m in Funs.DB.HJGL_Pipeline on y.PipelineId equals m.PipelineId + where x.WorkPostId == "19B8F2A9-28D3-4F20-867A-1B2237C2E228" + group new { x, y, z, m } by new { x.UnitId, z.UnitWorkId, m.MaterialId, y.Size } into tt + select new + { + Size = (tt.Sum(x => x.y.Size) == null) ? 0 : tt.Sum(x => x.y.Size), + UnitId = tt.Key.UnitId, + MaterialId = tt.Key.MaterialId, + UnitWorkId = tt.Key.UnitWorkId, + }; //// 按单位 List type01List = new List(); @@ -722,7 +728,7 @@ namespace FineUIPro.Web where x.UnitId == itemUnit.UnitId select x; TotalDin = getUJots.Sum(x => x.Size) ?? 0; - + count011List.Add(TotalDin); } if (type01List.Count() > 0) @@ -755,10 +761,10 @@ namespace FineUIPro.Web ///按材质类别 List type03List = new List(); List count031List = new List(); - var getMaterials =( from x in Funs.DB.Base_Material - join y in Funs.DB.HJGL_Pipeline on x.MaterialId equals y.MaterialId - where y.ProjectId == this.ProjectId - select x).ToList().Distinct(); + var getMaterials = (from x in Funs.DB.Base_Material + join y in Funs.DB.HJGL_Pipeline on x.MaterialId equals y.MaterialId + where y.ProjectId == this.ProjectId + select x).ToList().Distinct(); var q = (from x in getMaterials join y in allwelderEfficacy on x.MaterialId equals y.MaterialId group new { x, y } by new { x.MaterialCode, y.Size } into g @@ -771,8 +777,8 @@ namespace FineUIPro.Web new { MaterialCode = x.Key, - TotalDin=x.Sum(m=>m.TotalDin) - }) ; + TotalDin = x.Sum(m => m.TotalDin) + }); foreach (var itemMaterial in q) { string code = itemMaterial.MaterialCode; diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL2.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL2.aspx.cs index 93f3fadf..4ed852ef 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL2.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL2.aspx.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.common { diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs index 295e4271..8e5cfd25 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs @@ -1,11 +1,8 @@ using BLL; -using MiniExcelLibs; -using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; using System.Linq; namespace FineUIPro.Web.common diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL_AVEVA.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL_AVEVA.aspx.cs index 2a5fa0e1..1f19a8a5 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL_AVEVA.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL_AVEVA.aspx.cs @@ -1,5 +1,4 @@ using System; -using BLL; namespace FineUIPro.Web { public partial class mainMenu_HJGL_AVEVA : PageBase @@ -8,7 +7,7 @@ namespace FineUIPro.Web { ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId); - // PipelineService.RestPipelineAndJoints(this.CurrUser.LoginProjectId); + // PipelineService.RestPipelineAndJoints(this.CurrUser.LoginProjectId); } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HSSE2.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HSSE2.aspx.cs index 5b6a9ce2..1845dc6c 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HSSE2.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HSSE2.aspx.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.common { public partial class mainMenu_HSSE2 : PageBase diff --git a/SGGL/FineUIPro.Web/common/mainMenu_JDGL.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_JDGL.aspx.cs index 71fb9221..831c9d70 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_JDGL.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_JDGL.aspx.cs @@ -43,7 +43,7 @@ namespace FineUIPro.Web unitWorks = BLL.UnitWorkService.GetUnitWorkLists(this.CurrUser.LoginProjectId); //decimal totalUnitWorkWeights = 0; //bool noWeights = false; - // bool noProjectWeights = false; + // bool noProjectWeights = false; workPackages = BLL.WorkPackageService.GetAllWorkPackagesByProjectId(this.CurrUser.LoginProjectId); controlItemAndCycles = BLL.ControlItemAndCycleService.GetControlItemAndCyclesByProjectIdAndDate(this.CurrUser.LoginProjectId, endDate); diff --git a/SGGL/FineUIPro.Web/common/mainMenu_SYHSE.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_SYHSE.aspx.cs index a679027c..42a08d19 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_SYHSE.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_SYHSE.aspx.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.common { diff --git a/SGGL/FineUIPro.Web/common/mainMenu_SYHSEN.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_SYHSEN.aspx.cs index 5c4813ea..830adc3f 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_SYHSEN.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_SYHSEN.aspx.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; +using BLL; +using System; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.common { diff --git a/SGGL/FineUIPro.Web/index.aspx.cs b/SGGL/FineUIPro.Web/index.aspx.cs index 92e9bb9a..c2aa0c5c 100644 --- a/SGGL/FineUIPro.Web/index.aspx.cs +++ b/SGGL/FineUIPro.Web/index.aspx.cs @@ -312,7 +312,7 @@ namespace FineUIPro.Web this.MenuSwitchMethod(Request.Params["menuType"]); } - // this.MenuSwitchMethod(Request.Params["menuType"]); + // this.MenuSwitchMethod(Request.Params["menuType"]); this.InitMenuStyleButton(); this.InitMenuModeButton(); this.InitLangMenuButton(); @@ -333,7 +333,7 @@ namespace FineUIPro.Web this.Tab1.IFrameUrl = "~/common/main2.aspx"; this.hdHomePage.Text = "2"; } - + var getW = WeatherService.GetWeather(null); if (getW != null) { diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.cs b/SGGL/FineUIPro.Web/indexProject.aspx.cs index 85714c4b..4273e005 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx.cs +++ b/SGGL/FineUIPro.Web/indexProject.aspx.cs @@ -1,5 +1,4 @@ -using Aspose.Words; -using BLL; +using BLL; using System; using System.Collections.Generic; using System.IO; @@ -319,8 +318,8 @@ namespace FineUIPro.Web } this.drpProject.DataValueField = "ProjectId"; - this.drpProject.DataTextField = "ShortName"; - var projectlist =ProjectService.GetSortIndexProjectByUserIdDropDownList(this.CurrUser.PersonId); + this.drpProject.DataTextField = "ShortName"; + var projectlist = ProjectService.GetSortIndexProjectByUserIdDropDownList(this.CurrUser.PersonId); this.drpProject.DataSource = projectlist; this.drpProject.DataBind(); @@ -338,7 +337,7 @@ namespace FineUIPro.Web this.drpProject.DataBind(); } } - + this.drpProject.SelectedValue = Request.Params["projectId"]; } @@ -370,7 +369,7 @@ namespace FineUIPro.Web this.CurrUser.LoginProjectId = this.drpProject.SelectedValue; } - + this.InitMenuStyleButton(); this.InitMenuModeButton(); this.InitLangMenuButton(); @@ -583,9 +582,9 @@ namespace FineUIPro.Web } this.Tab1.RefreshIFrame(); this.CurrUser.LoginProjectId = this.drpProject.SelectedValue; - + PageContext.RegisterStartupScript("parent.removeActiveTab();"); - MenuSwitchMethod(this.CurrUser.LastMenuType); + MenuSwitchMethod(this.CurrUser.LastMenuType); } /// @@ -594,7 +593,7 @@ namespace FineUIPro.Web /// protected void MenuSwitchMethod(string type) { - // this.CurrUser.LoginProjectId = this.drpProject.SelectedValue; + // this.CurrUser.LoginProjectId = this.drpProject.SelectedValue; this.XmlDataSource1.DataFile = "common/Menu_Personal.xml"; this.leftPanel.Hidden = true; this.Tab1.IFrameUrl = "~/common/mainProject.aspx"; @@ -624,7 +623,7 @@ namespace FineUIPro.Web { this.Tab1.IFrameUrl = "~/common/mainMenu_HJGL3.aspx"; } - else if (type == Const.Menu_PZHGL) + else if (type == Const.Menu_PZHGL) { this.Tab1.IFrameUrl = "~/PZHGL/InformationProject/ConstructionPlan.aspx"; this.Tab1.Title = "总承包商施工计划"; diff --git a/SGGL/WebAPI/Controllers/HJGL/PackagingManageController.cs b/SGGL/WebAPI/Controllers/HJGL/PackagingManageController.cs index 04039b7a..00414779 100644 --- a/SGGL/WebAPI/Controllers/HJGL/PackagingManageController.cs +++ b/SGGL/WebAPI/Controllers/HJGL/PackagingManageController.cs @@ -9,33 +9,20 @@ using System.Web.Http; namespace WebAPI.Controllers { /// - /// + /// 包装管理接口 /// public class PackagingManageController : ApiController { - public Model.ResponeData GetPackagingInformationList(string projectid, int pagesize, int pageindex) - { - var responeData = new Model.ResponeData(); - try - { - var getDataList = BLL.APIPackagingManageService.GetPackagingManageList(projectid); - int pageCount = getDataList.Count(); - if ( pageCount > 0 && pageindex > 0) - { - getDataList = getDataList.Skip(pagesize * (pageindex - 1)).Take(pagesize).ToList(); - } - responeData.data = new { pageCount, getDataList }; - } - catch (Exception ex) - { - responeData.code = 0; - responeData.message = ex.Message; - } + #region Methods - return responeData; - } - - public Model.ResponeData GetPackagingInformationById(string projectId,string personId, string packagingManageId) + /// + /// 获取指定包装信息 + /// + /// 项目ID + /// 人员ID + /// 包装ID + /// 包装信息 + public Model.ResponeData GetPackagingInformationById(string projectId, string personId, string packagingManageId) { var responeData = new Model.ResponeData(); try @@ -51,9 +38,84 @@ namespace WebAPI.Controllers return responeData; } + /// + /// 获取新包装编号 + /// + /// + /// + public Model.ResponeData GetPackagingNumberByProjectId(string projectId) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = BLL.APIPackagingManageService.GetNewPackagingCode(projectId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + /// + /// 获取包装信息列表 + /// + /// 项目ID + /// 每页数量 + /// 页码(从1开始) + /// 包装信息分页列表 + public Model.ResponeData GetPackagingInformationList(string projectid, int pagesize, int pageindex) + { + var responeData = new Model.ResponeData(); + try + { + var getDataList = BLL.APIPackagingManageService.GetPackagingManageList(projectid); + int pageCount = getDataList.Count(); + if (pageCount > 0 && pageindex > 0) + { + getDataList = getDataList.Skip(pagesize * (pageindex - 1)).Take(pagesize).ToList(); + } + responeData.data = new { pageCount, getDataList }; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + /// + /// 包装到场验收 + /// + /// 包装ID + /// 人员ID + /// 操作结果 + public Model.ResponeData GetPackingInfoConfirmArrival(string packagingManageId, string PersonId) + { + var responeData = new Model.ResponeData(); + try + { + BLL.APIPackagingManageService.GetPackingInfoConfirmArrival(packagingManageId, PersonId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + + /// + /// 保存包装信息(组件明细) + /// + /// 包装ID + /// 组件ID集合 + /// 操作结果 public Model.ResponeData getSavePackagingInformationById(string packagingManageId, string PipelineComponentIds) { - var responeData = new Model.ResponeData(); try { @@ -67,42 +129,52 @@ namespace WebAPI.Controllers return responeData; } - public Model.ResponeData GetPackingInfoConfirmArrival( string packagingManageId,string PersonId) + /// + /// 新增或更新包装信息(Id为空则新增,否则更新),返回创建或更新后的Id。 + /// + /// 包装信息实体 + /// 创建或更新后的Id + [HttpPost] + public Model.ResponeData SavePackaging(Model.HJGL_PackagingManage model) { var responeData = new Model.ResponeData(); try { - BLL.APIPackagingManageService.GetPackingInfoConfirmArrival( packagingManageId, PersonId); + var id = APIPackagingManageService.AddOrUpdatePackaging(model); + responeData.data = new { id }; } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } - return responeData; } + /// + /// 车次关联包装(设置包装的TrainNumberId) + /// + /// 包装ID + /// 车次ID + /// 操作结果 [HttpGet] public Model.ResponeData SavePackingInformation(string packagingManageId, string trainNumberId) { var responeData = new Model.ResponeData(); try { - var packModel=HJGLPackagingmanageService.GetHJGL_PackagingManageById(packagingManageId); + var packModel = HJGLPackagingmanageService.GetHJGL_PackagingManageById(packagingManageId); if (packModel == null) { responeData.code = 0; responeData.message = "未找到对应的包装信息"; return responeData; - } if (packModel.State != 0) { responeData.code = 0; responeData.message = "当前包装状态不可修改车次号"; return responeData; - } packModel.TrainNumberId = trainNumberId; HJGLPackagingmanageService.UpdateHJGL_PackagingManage(packModel); @@ -114,5 +186,7 @@ namespace WebAPI.Controllers } return responeData; } + + #endregion Methods } } \ No newline at end of file diff --git a/SGGL/WebAPI/Controllers/HJGL/TrainNumberManageController.cs b/SGGL/WebAPI/Controllers/HJGL/TrainNumberManageController.cs index 0b51ce1b..7f149888 100644 --- a/SGGL/WebAPI/Controllers/HJGL/TrainNumberManageController.cs +++ b/SGGL/WebAPI/Controllers/HJGL/TrainNumberManageController.cs @@ -13,45 +13,20 @@ namespace WebAPI.Controllers /// public class TrainNumberManageController : ApiController { - /// - /// 发货验收 - /// - /// - /// - /// - public Model.ResponeData SaveTrainInfoConfirmArrival(string Id, string PersonId) - { - var responeData = new Model.ResponeData(); - try - { - BLL.APITrainNumberManagerService.SaveTrainInfoConfirmArrival(Id, PersonId); - } - catch (Exception ex) - { - responeData.code = 0; - responeData.message = ex.Message; - } + #region Methods - return responeData; - } /// - /// 获取发货列表 + /// 删除包装与车次的关联(清空 HJGL_PackagingManage.TrainNumberId) /// - /// - /// - /// + /// /// - public Model.ResponeData GetTrainNumberList(string projectId, int pagesize, int pageindex) + [HttpGet] + public Model.ResponeData DeletePackagingFromTrain(string packagingManageId) { var responeData = new Model.ResponeData(); try { - Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage(); - table.ProjectId = projectId; - var result = TrainNumberManageService.GetListByQueryModle(table, pageindex, pagesize); - var getDataList = result.Data; - int pageCount = result.Total; - responeData.data = new { pageCount, getDataList }; + APITrainNumberManagerService.RemovePackagingFromTrain(packagingManageId); } catch (Exception ex) { @@ -67,7 +42,6 @@ namespace WebAPI.Controllers /// /// [HttpGet] - public Model.ResponeData GetPackagingByTrain(string trainNumberId) { var responeData = new Model.ResponeData(); @@ -84,6 +58,33 @@ namespace WebAPI.Controllers return responeData; } + /// + /// 获取发货列表 + /// + /// + /// + /// + /// + public Model.ResponeData GetTrainNumberList(string projectId, int pagesize, int pageindex) + { + var responeData = new Model.ResponeData(); + try + { + Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage(); + table.ProjectId = projectId; + var result = TrainNumberManageService.GetListByQueryModle(table, pageindex, pagesize); + var getDataList = result.Data; + int pageCount = result.Total; + responeData.data = new { pageCount, getDataList }; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + /// /// 添加车次包装关联 /// @@ -107,17 +108,39 @@ namespace WebAPI.Controllers } /// - /// 删除包装与车次的关联(清空 HJGL_PackagingManage.TrainNumberId) + /// 发货验收 /// - /// + /// + /// /// [HttpGet] - public Model.ResponeData DeletePackagingFromTrain(string packagingManageId) + public Model.ResponeData SaveTrainInfoConfirmArrival(string Id, string PersonId) { var responeData = new Model.ResponeData(); try { - APITrainNumberManagerService.RemovePackagingFromTrain(packagingManageId); + BLL.APITrainNumberManagerService.SaveTrainInfoConfirmArrival(Id, PersonId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + + /// + /// 新增或更新车次(如果 Id 为空则新增,否则更新) + /// + [HttpPost] + public Model.ResponeData SaveTrainNumber(Model.HJGL_TrainNumberManage model) + { + var responeData = new Model.ResponeData(); + try + { + var id = APITrainNumberManagerService.AddOrUpdateTrainNumber(model); + responeData.data = new { id }; } catch (Exception ex) { @@ -127,7 +150,6 @@ namespace WebAPI.Controllers return responeData; } - //获取发货明细列表 - + #endregion Methods } } \ No newline at end of file
{0}