20211202 与集团安全信息报表及检查对接接口实现

This commit is contained in:
2021-12-02 10:44:15 +08:00
parent 8932645f54
commit 39cd93e266
43 changed files with 3072 additions and 2026 deletions
@@ -918,7 +918,7 @@ namespace FineUIPro.Web.ZHGL.Information
}
else
{
Model.Information_SafetyQuarterlyReport oldReport = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(this.SafetyQuarterlyReportId);
var oldReport = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(this.SafetyQuarterlyReportId);
if (oldReport != null)
{
safetyQuarterlyReport.HandleMan = oldReport.HandleMan;
@@ -931,7 +931,25 @@ namespace FineUIPro.Web.ZHGL.Information
}
if (type == "updata") //保存并上报
{
Update(safetyQuarterlyReport.SafetyQuarterlyReportId);
if (safetyQuarterlyReport.UpState == BLL.Const.UpState_2)
{
string code = CNCECHSSEWebService.UpSafetyQuarterlyReport(safetyQuarterlyReport.SafetyQuarterlyReportId, this.CurrUser);
if (code == "1")
{
ShowNotify("同步成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
return;
}
else
{
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
}
}
else
{
ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning);
return;
}
}
if (type == "submit")
{
@@ -968,150 +986,7 @@ namespace FineUIPro.Web.ZHGL.Information
Save("submit");
}
#endregion
#region
private void Update(string safetyQuarterlyReportId)
{
/////创建客户端服务
//var poxy = Web.ServiceProxy.CreateServiceClient();
//poxy.DataInsertInformation_SafetyQuarterlyReportTableCompleted += new EventHandler<HSSEService.DataInsertInformation_SafetyQuarterlyReportTableCompletedEventArgs>(poxy_DataInsertInformation_SafetyQuarterlyReportTableCompleted);
//var report = from x in Funs.DB.Information_SafetyQuarterlyReport
// where x.SafetyQuarterlyReportId == safetyQuarterlyReportId && x.UpState == BLL.Const.UpState_2
// select new HSSEService.Information_SafetyQuarterlyReport
// {
// SafetyQuarterlyReportId = x.SafetyQuarterlyReportId,
// UnitId = x.UnitId,
// YearId = x.YearId,
// Quarters = x.Quarters,
// TotalInWorkHours = x.TotalInWorkHours,
// TotalInWorkHoursRemark = x.TotalInWorkHoursRemark,
// TotalOutWorkHours = x.TotalOutWorkHours,
// TotalOutWorkHoursRemark = x.TotalOutWorkHoursRemark,
// WorkHoursLossRate = x.WorkHoursLossRate,
// WorkHoursLossRateRemark = x.WorkHoursLossRateRemark,
// WorkHoursAccuracy = x.WorkHoursAccuracy,
// WorkHoursAccuracyRemark = x.WorkHoursAccuracyRemark,
// MainBusinessIncome = x.MainBusinessIncome,
// MainBusinessIncomeRemark = x.MainBusinessIncomeRemark,
// ConstructionRevenue = x.ConstructionRevenue,
// ConstructionRevenueRemark = x.ConstructionRevenueRemark,
// UnitTimeIncome = x.UnitTimeIncome,
// UnitTimeIncomeRemark = x.UnitTimeIncomeRemark,
// BillionsOutputMortality = x.BillionsOutputMortality,
// BillionsOutputMortalityRemark = x.BillionsOutputMortalityRemark,
// MajorFireAccident = x.MajorFireAccident,
// MajorFireAccidentRemark = x.MajorFireAccidentRemark,
// MajorEquipAccident = x.MajorEquipAccident,
// MajorEquipAccidentRemark = x.MajorEquipAccidentRemark,
// AccidentFrequency = x.AccidentFrequency,
// AccidentFrequencyRemark = x.AccidentFrequencyRemark,
// SeriousInjuryAccident = x.SeriousInjuryAccident,
// SeriousInjuryAccidentRemark = x.SeriousInjuryAccidentRemark,
// FireAccident = x.FireAccident,
// FireAccidentRemark = x.FireAccidentRemark,
// EquipmentAccident = x.EquipmentAccident,
// EquipmentAccidentRemark = x.EquipmentAccidentRemark,
// PoisoningAndInjuries = x.PoisoningAndInjuries,
// PoisoningAndInjuriesRemark = x.PoisoningAndInjuriesRemark,
// ProductionSafetyInTotal = x.ProductionSafetyInTotal,
// ProductionSafetyInTotalRemark = x.ProductionSafetyInTotalRemark,
// ProtectionInput = x.ProtectionInput,
// ProtectionInputRemark = x.ProtectionInputRemark,
// LaboAndHealthIn = x.LaboAndHealthIn,
// LaborAndHealthInRemark = x.LaborAndHealthInRemark,
// TechnologyProgressIn = x.TechnologyProgressIn,
// TechnologyProgressInRemark = x.TechnologyProgressInRemark,
// EducationTrainIn = x.EducationTrainIn,
// EducationTrainInRemark = x.EducationTrainInRemark,
// ProjectCostRate = x.ProjectCostRate,
// ProjectCostRateRemark = x.ProjectCostRateRemark,
// ProductionInput = x.ProductionInput,
// ProductionInputRemark = x.ProductionInputRemark,
// Revenue = x.Revenue,
// RevenueRemark = x.RevenueRemark,
// FullTimeMan = x.FullTimeMan,
// FullTimeManRemark = x.FullTimeManRemark,
// FullTimeManAttachUrl = x.FullTimeManAttachUrl,
// PMMan = x.PMMan,
// PMManRemark = x.PMManRemark,
// PMManAttachUrl = x.PMManAttachUrl,
// CorporateDirectorEdu = x.CorporateDirectorEdu,
// CorporateDirectorEduRemark = x.CorporateDirectorEduRemark,
// ProjectLeaderEdu = x.ProjectLeaderEdu,
// ProjectLeaderEduRemark = x.ProjectLeaderEduRemark,
// FullTimeEdu = x.FullTimeEdu,
// FullTimeEduRemark = x.FullTimeEduRemark,
// ThreeKidsEduRate = x.ThreeKidsEduRate,
// ThreeKidsEduRateRemark = x.ThreeKidsEduRateRemark,
// UplinReportRate = x.UplinReportRate,
// UplinReportRateRemark = x.UplinReportRateRemark,
// Remarks = x.Remarks,
// CompileMan = x.CompileMan,
// ////附件转为字节传送
// FullTimeManAttachUrlFileContext = FileStructService.GetFileStructByAttachUrl(x.FullTimeManAttachUrl),
// PMManAttachUrlFileContext = FileStructService.GetFileStructByAttachUrl(x.PMManAttachUrl),
// KeyEquipmentTotal = x.KeyEquipmentTotal,
// KeyEquipmentTotalRemark = x.KeyEquipmentTotalRemark,
// KeyEquipmentReportCount = x.KeyEquipmentReportCount,
// KeyEquipmentReportCountRemark = x.KeyEquipmentReportCountRemark,
// ChemicalAreaProjectCount = x.ChemicalAreaProjectCount,
// ChemicalAreaProjectCountRemark = x.ChemicalAreaProjectCountRemark,
// HarmfulMediumCoverCount = x.HarmfulMediumCoverCount,
// HarmfulMediumCoverCountRemark = x.HarmfulMediumCoverCountRemark,
// HarmfulMediumCoverRate = x.HarmfulMediumCoverRate,
// HarmfulMediumCoverRateRemark = x.HarmfulMediumCoverRateRemark
// };
//poxy.DataInsertInformation_SafetyQuarterlyReportTableAsync(report.ToList());
}
#region
/// <summary>
/// 安全生产数据季报
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
//private void poxy_DataInsertInformation_SafetyQuarterlyReportTableCompleted(object sender, HSSEService.DataInsertInformation_SafetyQuarterlyReportTableCompletedEventArgs e)
//{
// if (e.Error == null)
// {
// var idList = e.Result;
// foreach (var item in idList)
// {
// var report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(item);
// if (report != null)
// {
// report.UpState = BLL.Const.UpState_3;
// BLL.SafetyQuarterlyReportService.UpdateSafetyQuarterlyReport(report);
// ////更新 当前人要处理的意见
// Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.SafetyQuarterlyReportMenuId, item);
// if (updateUnFlowOperate != null)
// {
// updateUnFlowOperate.OperaterTime = System.DateTime.Now;
// updateUnFlowOperate.IsClosed = true;
// BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
// }
// ////更新催报信息
// var urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == report.UnitId && x.ReprotType == BLL.Const.ReportType_3 && x.YearId == report.YearId.ToString() && x.QuarterId == report.Quarters.ToString());
// if (urgeReport != null)
// {
// urgeReport.IsComplete = true;
// Funs.DB.SubmitChanges();
// }
// }
// }
// BLL.LogService.AddSys_Log(this.CurrUser, "【安全生产数据季报】上传到服务器" + idList.Count.ToString() + "条数据;", null, BLL.Const.SafetyQuarterlyReportMenuId, BLL.Const.BtnUploadResources);
// }
// else
// {
// BLL.LogService.AddSys_Log(this.CurrUser, "【安全生产数据季报】上传到服务器失败;", null, BLL.Const.SafetyQuarterlyReportMenuId, BLL.Const.BtnUploadResources);
// }
//}
#endregion
#endregion
#region
/// <summary>
/// 上传安全专职人员名单附件