diff --git a/.vs/SGGL_CWCEC/v17/.wsuo b/.vs/SGGL_CWCEC/v17/.wsuo index af66e84d..afe9597a 100644 Binary files a/.vs/SGGL_CWCEC/v17/.wsuo and b/.vs/SGGL_CWCEC/v17/.wsuo differ diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index 4219ac9e..d9cfa096 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -38,6 +38,7 @@ namespace BLL get; set; } + public static DictionaryWebEditList= new Dictionary(); /// /// ݿַ diff --git a/SGGL/BLL/TaskScheduling/TimerTask/TaskJob.cs b/SGGL/BLL/TaskScheduling/TimerTask/TaskJob.cs index 2b519454..ed1f8614 100644 --- a/SGGL/BLL/TaskScheduling/TimerTask/TaskJob.cs +++ b/SGGL/BLL/TaskScheduling/TimerTask/TaskJob.cs @@ -22,6 +22,27 @@ namespace BLL InterFaceTaskService.ExecuteTasks(InterFaceTaskId); + //Console.WriteLine($"{DateTime.Now}【{Thread.CurrentThread.ManagedThreadId}】:自定义的工作正在执行... ..."); + }); + } + } + public class CLJob : IJob + { + public async Task Execute(IJobExecutionContext context) + { + JobKey key = context.JobDetail.Key; + + // note: use context.MergedJobDataMap in production code + JobDataMap dataMap = context.JobDetail.JobDataMap; + string InterFaceTaskId = dataMap.GetString("InterFaceTaskId"); + + //使用异步任务来实现 + await Task.Run(() => + { + MonitorService.PipelineWeldingQuantities(); + + + //Console.WriteLine($"{DateTime.Now}【{Thread.CurrentThread.ManagedThreadId}】:自定义的工作正在执行... ..."); }); } diff --git a/SGGL/BLL/TaskScheduling/TimerTask/TimerTaskBase.cs b/SGGL/BLL/TaskScheduling/TimerTask/TimerTaskBase.cs index c4459a66..52eb8dc1 100644 --- a/SGGL/BLL/TaskScheduling/TimerTask/TimerTaskBase.cs +++ b/SGGL/BLL/TaskScheduling/TimerTask/TimerTaskBase.cs @@ -40,6 +40,8 @@ using System.Threading.Tasks; //keyValuePairs.Add(item.InterFaceTaskId, scheduler); //Funs.ScheduledTasks = keyValuePairs; } + + //// jobAndTriggerMapping[GetClJobDetail()] = GetClTrigger();//增加材料定时 var readOnlyjobAndTriggerMapping = new ReadOnlyDictionary>(jobAndTriggerMapping); await scheduler.ScheduleJobs(readOnlyjobAndTriggerMapping, true); await scheduler.Start(); //只有启动了,里面的任务才会定时触发 @@ -159,6 +161,37 @@ using System.Threading.Tasks; return trigger1; } + + #region 材料到货 + + public static IJobDetail GetClJobDetail() + { //创建Job + IJobDetail jobDetail1 = JobBuilder.Create() + .WithIdentity("CL", "group1")//给Job身份 + .WithDescription("任务的描述,方便查找") + .Build(); + return jobDetail1; + } + public static ReadOnlyCollection GetClTrigger() + { + string cron = "0 0/1 * * * ? "; + cron = "0 0/1 * * * ? "; + //创建触发器 + var trigger1 = new ReadOnlyCollection( + new List() + { + TriggerBuilder.Create() + .WithIdentity("CL", "group1") //给触发器身份 + .WithDescription("触发器的描述,方便查找") + .StartAt(new DateTimeOffset(DateTime.Now.AddSeconds(10))) //.StartNow()都是启动触发器方式 + .WithCronSchedule(cron) //定时策略,Cron表达式 + .Build() + }); + return trigger1; + + } + + #endregion } } diff --git a/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx b/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx index e412d33b..a8827aaf 100644 --- a/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx +++ b/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx @@ -244,7 +244,7 @@ editorAttrs: { //编辑器配置 editorWidth: '100%', editorHeight: '100%', - editorMode: 'edit', + editorMode: '<%=editorMode%>', editorType: 'document', //编辑器类型,可不配置,程序根据文件类型获取,结果为 document,presentation,spreadsheet platform: 'windows', //编辑器平台类型,可选windows, mobile, embedded viewLanguage: 'zh', //平台界面展示语言可选en/zh diff --git a/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx.cs index 2321a601..a421c4e2 100644 --- a/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/OnlineEditing.aspx.cs @@ -78,6 +78,17 @@ namespace FineUIPro.Web.AttachFile ViewState["PCUrl"] = value; } } + public string editorMode + { + get + { + return (string)ViewState["editorMode"]; + } + set + { + ViewState["editorMode"] = value; + } + } #endregion protected void Page_Load(object sender, EventArgs e) @@ -88,6 +99,7 @@ namespace FineUIPro.Web.AttachFile AttachFileId = Request.Params["AttachFileId"]; ReadOnly = Request.Params["ReadOnly"];*/ PCUrl = Request.Params["fileUrl"]; + editorMode = Request.Params["editorMode"]; } diff --git a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs index f0c61e08..f11a437e 100644 --- a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs @@ -84,6 +84,17 @@ namespace FineUIPro.Web.AttachFile ViewState["JointCheck"] = value; } } + public string editorMode + { + get + { + return (string)ViewState["editorMode"]; + } + set + { + ViewState["editorMode"] = value; + } + } #endregion #region 加载页面 @@ -112,6 +123,12 @@ namespace FineUIPro.Web.AttachFile this.Type = Request.Params["type"]; JointCheck = Request.Params["JointCheck"];//是否共检页面 Source = Request.QueryString["source"];//如果等于1则是文件柜 + + editorMode = Request.Params["editorMode"]; + if (string.IsNullOrEmpty(editorMode)) + { + editorMode = "edit"; + } //Request.QueryString["type"]; ////类型:0时是上传资源页面,附件权限不需要判断 -1时只查看权限 -2查看集团公司 this.GetButtonPower(); this.BindGrid(); @@ -760,7 +777,7 @@ namespace FineUIPro.Web.AttachFile if (isSupportType) { url = url.Replace(Funs.RootPath, ""); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/OnlineEditing.aspx?fileUrl={0}", url, "编辑 -"))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/OnlineEditing.aspx?fileUrl={0}&&editorMode={1}", url,editorMode, "编辑 -"))); } else { diff --git a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs index 936ad3d5..c90e9d7e 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using FineUIPro.Web.DataShow; using System; using System.Collections.Generic; using System.Data; @@ -52,7 +53,11 @@ namespace FineUIPro.Web.CQMS.Check Funs.FineUIPleaseSelect(this.dpHandelStatus); btnNew.OnClientClick = Window1.GetShowReference("ChecklistEdit.aspx") + "return false;"; ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); - + if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.CurrUser.LoginProjectId, CurrUser.UnitId)) + { + drpSponsorUnit.SelectedValue = CurrUser.UnitId; + drpSponsorUnit.Readonly = true; + } // 绑定表格 BindGrid(); diff --git a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs index ed73fedc..004128d7 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs @@ -1,5 +1,6 @@ using Apache.NMS.ActiveMQ.Threads; using BLL; +using FineUIPro.Web.DataShow; using System; using System.Collections; using System.Collections.Generic; @@ -296,7 +297,8 @@ namespace FineUIPro.Web.CQMS.Check QuestionImg = 0; CheckControlService.Init(drpHandleType, State, false); string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-06-CM03-XJ-"; - txtDocCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.Check_CheckControl", "DocCode", code); + txtDocCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Check_CheckControl", "DocCode", CurrUser.LoginProjectId, code); + var mainUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId,Const.ProjectUnitType_1)[0]; if (mainUnit != null) { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs index ee929fb9..b33a9cf0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs @@ -41,10 +41,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false); LoadAuditSelect(); this.agree.Hidden = true; - this.options.Hidden = true; - - this.btnSave.Hidden = true; - this.btnSubmit.Hidden = true; + this.options.Hidden = true; this.DesignChangeOrderId = Request.Params["DesignChangeOrderId"]; Model.Comprehensive_DesignChangeOrder designChangeOrder = BLL.DesignChangeOrderService.GetDesignChangeOrderById(this.DesignChangeOrderId); if (designChangeOrder != null) @@ -112,10 +109,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive } } - - - - } else { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs index 62063901..e97ff55f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs @@ -228,14 +228,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive { result += (i + 2).ToString() + "," + "标识编号" + "," + "此项为必填项!" + "|"; } - else - { - var view = oldViewInfos.FirstOrDefault(x => x.RemarkCode == row12); - if (view != null) - { - result += (i + 2).ToString() + "," + "标识编号" + "," + "[" + row12 + "]已存在!" + "|"; - } - } + //else + //{ + // var view = oldViewInfos.FirstOrDefault(x => x.RemarkCode == row12); + // if (view != null) + // { + // result += (i + 2).ToString() + "," + "标识编号" + "," + "[" + row12 + "]已存在!" + "|"; + // } + //} } else @@ -398,7 +398,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId && x.RemarkCode == pds.Rows[i][12].ToString().Trim() ).FirstOrDefault(); - if (oldViewInfo == null) + if (oldViewInfo == null)//新增 { Model.Comprehensive_InspectionEquipment Ins = new Model.Comprehensive_InspectionEquipment(); Ins.ProjectId = this.CurrUser.LoginProjectId; @@ -428,9 +428,33 @@ namespace FineUIPro.Web.CQMS.Comprehensive BLL.InspectionEquipmentService.AddInspectionEquipment(Ins); } - else + else //修改 { - result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|"; + oldViewInfo.ProjectId = this.CurrUser.LoginProjectId; + oldViewInfo.UnitId = unitInfo.UnitId; + oldViewInfo.InspectionCode = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim())) + { + oldViewInfo.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][2].ToString().Trim()).CNProfessionalId; + } + oldViewInfo.EquipmentNO = pds.Rows[i][3].ToString().Trim(); + oldViewInfo.InspectionName = pds.Rows[i][4].ToString().Trim(); + oldViewInfo.Specifications = pds.Rows[i][5].ToString().Trim(); + oldViewInfo.Supplier = pds.Rows[i][6].ToString().Trim(); + oldViewInfo.Counts = pds.Rows[i][7].ToString().Trim(); + oldViewInfo.Unit = pds.Rows[i][8].ToString().Trim(); + oldViewInfo.SamplingCount = pds.Rows[i][9].ToString().Trim(); + oldViewInfo.SamplingResult = pds.Rows[i][10].ToString().Trim() == "合格" ? "1" : "2"; + + if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim())) + { + oldViewInfo.InspectionDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim()); + } + oldViewInfo.RemarkCode = pds.Rows[i][12].ToString().Trim(); + oldViewInfo.CompileMan = this.CurrUser.UserId; + oldViewInfo.CompileDate = DateTime.Now.Date; + BLL.InspectionEquipmentService.UpdateInspectionEquipment(oldViewInfo); + //result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|"; } } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx index cd74971b..9bbdad44 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx @@ -25,16 +25,20 @@ - + - + + + + + - + - + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs index 47f7eb3c..5f17343d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs @@ -64,6 +64,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.txtCounts.Text = Convert.ToString(inspectionEquipment.Counts); } this.txtUnit.Text = inspectionEquipment.Unit; + if (!string.IsNullOrEmpty(inspectionEquipment.EquipmentOrMatail)) + { + this.drpEquipmentOrMatail.SelectedValue = inspectionEquipment.EquipmentOrMatail; + + } if (inspectionEquipment.SamplingCount != null) { this.txtSamplingCount.Text = Convert.ToString(inspectionEquipment.SamplingCount); @@ -256,7 +261,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive newInspectionEquipment.Unit = this.txtUnit.Text.Trim(); newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim(); newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim(); - + newInspectionEquipment.EquipmentOrMatail = drpEquipmentOrMatail.SelectedValue; if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) { newInspectionEquipment.AuditMan = drpAudit.SelectedValue; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs index 12391ea5..ba1f1314 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class InspectionEquipmentEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class InspectionEquipmentEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnitId 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitId; - + /// /// txtInspectionCode 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtInspectionCode; - + /// /// txtEquipmentNo 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtEquipmentNo; - + /// /// drpCNProfessionalId 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - + /// /// txtInspectionName 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtInspectionName; - + /// /// txtSpecifications 控件。 /// @@ -92,7 +94,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSpecifications; - + + /// + /// drpEquipmentOrMatail 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpEquipmentOrMatail; + /// /// txtSupplier 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSupplier; - + /// /// txtCounts 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCounts; - + /// /// txtUnit 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUnit; - + /// /// txtSamplingCount 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSamplingCount; - + /// /// drpSamplingResult 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpSamplingResult; - + /// /// drpAttribute 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpAttribute; - + /// /// txtInspectionDate 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtInspectionDate; - + /// /// txtRemarkCode 控件。 /// @@ -164,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtRemarkCode; - + /// /// txtUsedPlace 控件。 /// @@ -173,7 +184,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUsedPlace; - + /// /// Panel2 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -191,7 +202,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + /// /// drpAudit 控件。 /// @@ -209,7 +220,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpAudit; - + /// /// agree 控件。 /// @@ -218,7 +229,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FormRow agree; - + /// /// rblIsAgree 控件。 /// @@ -227,7 +238,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIsAgree; - + /// /// options 控件。 /// @@ -236,7 +247,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FormRow options; - + /// /// txtidea 控件。 /// @@ -245,7 +256,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtidea; - + /// /// Toolbar1 控件。 /// @@ -254,7 +265,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -263,7 +274,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -272,7 +283,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnSubmit 控件。 /// @@ -281,7 +292,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSubmit; - + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs index c4b1acac..44f45368 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs @@ -431,59 +431,115 @@ namespace FineUIPro.Web.CQMS.Comprehensive for (int i = 0; i < ir; i++) { - Model.Comprehensive_InspectionMachine oldViewInfo = new Model.Comprehensive_InspectionMachine(); string row0 = pds.Rows[i][0].ToString().Trim(); var unitInfo = units.Where(y => y.UnitName == row0).FirstOrDefault(); if (unitInfo != null && !string.IsNullOrEmpty(row0)) { - Model.Comprehensive_InspectionMachine Ins = new Model.Comprehensive_InspectionMachine(); - Ins.ProjectId = this.CurrUser.LoginProjectId; - Ins.UnitId = unitInfo.UnitId; - Ins.InspectionMachineCode = pds.Rows[i][1].ToString().Trim(); - Ins.InspectionMachineName = pds.Rows[i][2].ToString().Trim(); - if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim())) + Model.Comprehensive_InspectionMachine oldViewInfo = new Model.Comprehensive_InspectionMachine(); + oldViewInfo = oldViewInfos.FirstOrDefault(x => x.UnitId == unitInfo.UnitId + && x.InspectionMachineCode == pds.Rows[i][1].ToString().Trim()); + if (oldViewInfo==null) { - Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId; - } + Model.Comprehensive_InspectionMachine Ins = new Model.Comprehensive_InspectionMachine(); + Ins.ProjectId = this.CurrUser.LoginProjectId; + Ins.UnitId = unitInfo.UnitId; + Ins.InspectionMachineCode = pds.Rows[i][1].ToString().Trim(); + Ins.InspectionMachineName = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim())) + { + Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId; + } - if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim())) - { - Ins.InspectionType = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim())) + { + Ins.InspectionType = pds.Rows[i][4].ToString().Trim(); + } + else + { + Ins.InspectionType = "施工"; + } + + Ins.SpecificationModel = pds.Rows[i][5].ToString().Trim(); + + if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim())) + { + Ins.NextTestDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim()); + } + + Ins.TestCycle = pds.Rows[i][7].ToString().Trim(); + + Ins.IsOnSite = pds.Rows[i][8].ToString().Trim() == "是" ? true : false; + + if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim())) + { + Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim()); + } + Ins.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false; + if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim())) + { + Ins.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim()); + } + if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) + { + Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim()); + } + + Ins.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine)); + Ins.CompileMan = this.CurrUser.UserId; + Ins.CompileDate = DateTime.Now.Date; + BLL.InspectionMachineService.AddInspectionMachine(Ins); } else { - Ins.InspectionType = "施工"; + oldViewInfo.ProjectId = this.CurrUser.LoginProjectId; + oldViewInfo.UnitId = unitInfo.UnitId; + oldViewInfo.InspectionMachineCode = pds.Rows[i][1].ToString().Trim(); + oldViewInfo.InspectionMachineName = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim())) + { + oldViewInfo.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId; + } + + if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim())) + { + oldViewInfo.InspectionType = pds.Rows[i][4].ToString().Trim(); + } + else + { + oldViewInfo.InspectionType = "施工"; + } + + oldViewInfo.SpecificationModel = pds.Rows[i][5].ToString().Trim(); + + if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim())) + { + oldViewInfo.NextTestDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim()); + } + + oldViewInfo.TestCycle = pds.Rows[i][7].ToString().Trim(); + + oldViewInfo.IsOnSite = pds.Rows[i][8].ToString().Trim() == "是" ? true : false; + + if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim())) + { + oldViewInfo.InspectionDate = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim()); + } + oldViewInfo.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false; + if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim())) + { + oldViewInfo.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim()); + } + if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) + { + oldViewInfo.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim()); + } + + + oldViewInfo.CompileMan = this.CurrUser.UserId; + oldViewInfo.CompileDate = DateTime.Now.Date; + BLL.InspectionMachineService.UpdateInspectionMachine(oldViewInfo); } - - Ins.SpecificationModel = pds.Rows[i][5].ToString().Trim(); - - if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim())) - { - Ins.NextTestDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim()); - } - - Ins.TestCycle = pds.Rows[i][7].ToString().Trim(); - - Ins.IsOnSite = pds.Rows[i][8].ToString().Trim() == "是" ? true : false; - - if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim())) - { - Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim()); - } - Ins.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false; - if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim())) - { - Ins.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim()); - } - if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) - { - Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim()); - } - - Ins.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine)); - Ins.CompileMan = this.CurrUser.UserId; - Ins.CompileDate = DateTime.Now.Date; - BLL.InspectionMachineService.AddInspectionMachine(Ins); + } else diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs index bb079780..0fc1f39e 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs @@ -181,97 +181,100 @@ namespace FineUIPro.Web.CQMS.Comprehensive var unitInfo = units.Where(y => y.UnitName == row0).FirstOrDefault(); if (unitInfo != null && !string.IsNullOrEmpty(row0)) { - oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId + /*oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId && x.PersonName == pds.Rows[i][2].ToString().Trim() && x.InspectionPersonCode == pds.Rows[i][1].ToString().Trim() ).FirstOrDefault(); if (oldViewInfo == null) { - string row1 = pds.Rows[i][1].ToString(); - if (string.IsNullOrEmpty(row1)) - { - result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|"; - } - string row2 = pds.Rows[i][2].ToString(); - if (string.IsNullOrEmpty(row2)) - { - result += (i + 2).ToString() + "," + "姓名" + "," + "此项为必填项!" + "|"; - } - - string row3 = pds.Rows[i][3].ToString(); - if (!string.IsNullOrEmpty(row3)) - { - var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault(); - if (cn == null) - { - result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|"; - } - } - - string row4 = pds.Rows[i][4].ToString(); - if (!string.IsNullOrEmpty(row4)) - { - var post = posts.Where(x => x.PostName == row4.Trim()).FirstOrDefault(); - if (post == null) - { - result += (i + 2).ToString() + "," + "工种" + "," + "[" + row4 + "]不存在!" + "|"; - } - } - - string row7 = pds.Rows[i][7].ToString(); - if (!string.IsNullOrEmpty(row7)) - { - try - { - DateTime date = Convert.ToDateTime(row7.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row7 + "]错误!" + "|"; - } - } - - string row8 = pds.Rows[i][8].ToString(); - if (!string.IsNullOrEmpty(row8)) - { - try - { - DateTime date = Convert.ToDateTime(row8.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row8 + "]错误!" + "|"; - } - } - - string row9 = pds.Rows[i][9].ToString().Trim(); - if (!string.IsNullOrEmpty(row9)) - { - if (row9 != "是" && row9 != "否") - { - result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row9 + "]错误!" + "|"; - } - } - - string row10 = pds.Rows[i][10].ToString(); - if (!string.IsNullOrEmpty(row10)) - { - try - { - DateTime date = Convert.ToDateTime(row10.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row10 + "]错误!" + "|"; - } - } } else { result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位人员报验编号已存在!" + "|"; + }*/ + string row1 = pds.Rows[i][1].ToString(); + if (string.IsNullOrEmpty(row1)) + { + result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|"; } + + string row2 = pds.Rows[i][2].ToString(); + if (string.IsNullOrEmpty(row2)) + { + result += (i + 2).ToString() + "," + "姓名" + "," + "此项为必填项!" + "|"; + } + + string row3 = pds.Rows[i][3].ToString(); + if (!string.IsNullOrEmpty(row3)) + { + var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault(); + if (cn == null) + { + result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|"; + } + } + + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + var post = posts.Where(x => x.PostName == row4.Trim()).FirstOrDefault(); + if (post == null) + { + result += (i + 2).ToString() + "," + "工种" + "," + "[" + row4 + "]不存在!" + "|"; + } + } + + string row7 = pds.Rows[i][7].ToString(); + if (!string.IsNullOrEmpty(row7)) + { + try + { + DateTime date = Convert.ToDateTime(row7.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row7 + "]错误!" + "|"; + } + } + + string row8 = pds.Rows[i][8].ToString(); + if (!string.IsNullOrEmpty(row8)) + { + try + { + DateTime date = Convert.ToDateTime(row8.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row8 + "]错误!" + "|"; + } + } + + string row9 = pds.Rows[i][9].ToString().Trim(); + if (!string.IsNullOrEmpty(row9)) + { + if (row9 != "是" && row9 != "否") + { + result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row9 + "]错误!" + "|"; + } + } + + string row10 = pds.Rows[i][10].ToString(); + if (!string.IsNullOrEmpty(row10)) + { + try + { + DateTime date = Convert.ToDateTime(row10.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row10 + "]错误!" + "|"; + } + } + + } else @@ -496,7 +499,83 @@ namespace FineUIPro.Web.CQMS.Comprehensive } else { - result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位人员报验编号已存在!" + "|"; + oldViewInfo.ProjectId = this.CurrUser.LoginProjectId; + oldViewInfo.UnitId = unitInfo.UnitId; + oldViewInfo.InspectionPersonCode = pds.Rows[i][1].ToString().Trim(); + oldViewInfo.PersonName = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim())) + { + oldViewInfo.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId; + } + + if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim())) + { + oldViewInfo.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][4].ToString().Trim()).PostId; + } + + oldViewInfo.CertificateNumber = pds.Rows[i][5].ToString().Trim(); + oldViewInfo.QualifiedProjectCode = pds.Rows[i][6].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) + { + oldViewInfo.ValidityDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim()); + } + + if (!string.IsNullOrEmpty(pds.Rows[i][8].ToString().Trim())) + { + oldViewInfo.ApprovalTime = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim()); + } + oldViewInfo.IsOnSite = pds.Rows[i][9].ToString().Trim() == "是" ? true : false; + + if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim())) + { + oldViewInfo.DepartureTime = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim()); + } + oldViewInfo.Remark = pds.Rows[i][11].ToString().Trim(); + + oldViewInfo.CompileMan = this.CurrUser.UserId; + oldViewInfo.CompileDate = DateTime.Now.Date; + oldViewInfo.IsTrain = true; + BLL.InspectionPersonService.UpdateInspectionPerson(oldViewInfo); + if (pds.Rows[i][4].ToString().Trim() == "焊工") + { + var welder = PersonManageService.GetBSWelderByProjectIdUnitIdAndWED_Code(CurrUser.LoginProjectId, oldViewInfo.UnitId, pds.Rows[i][1].ToString().Trim()); + if (welder==null) + { + welder = new Model.BS_Welder(); + welder.WED_Unit = oldViewInfo.UnitId; + welder.WED_Name = oldViewInfo.PersonName; + welder.WED_Code = pds.Rows[i][1].ToString().Trim(); + welder.LimitDate = oldViewInfo.ValidityDate; + welder.LeaveDate = oldViewInfo.DepartureTime; // Convert.ToDateTime(this.txtDepartureTime.Text.ToString()); + welder.PostDate = oldViewInfo.ApprovalTime;// Convert.ToDateTime(this.txtApprovalTime.Text.ToString()); + welder.WED_WorkCode = oldViewInfo.CertificateNumber;// this.txtCertificateNumber.Text.Trim(); + welder.WED_Class = oldViewInfo.QualifiedProjectCode;// this.txtQualifiedProjectCode.Text.Trim(); + welder.WED_IfOnGuard = oldViewInfo.IsOnSite; + welder.WED_Remark = oldViewInfo.Remark; + welder.ProjectId = this.CurrUser.LoginProjectId; + // 焊工部分 + BLL.PersonManageService.AddBSWelder(welder); + } + else + { + welder.WED_Unit = oldViewInfo.UnitId; + welder.WED_Name = oldViewInfo.PersonName; + welder.WED_Code = pds.Rows[i][1].ToString().Trim(); + welder.LimitDate = oldViewInfo.ValidityDate; + welder.LeaveDate = oldViewInfo.DepartureTime; // Convert.ToDateTime(this.txtDepartureTime.Text.ToString()); + welder.PostDate = oldViewInfo.ApprovalTime;// Convert.ToDateTime(this.txtApprovalTime.Text.ToString()); + welder.WED_WorkCode = oldViewInfo.CertificateNumber;// this.txtCertificateNumber.Text.Trim(); + welder.WED_Class = oldViewInfo.QualifiedProjectCode;// this.txtQualifiedProjectCode.Text.Trim(); + welder.WED_IfOnGuard = oldViewInfo.IsOnSite; + welder.WED_Remark = oldViewInfo.Remark; + welder.ProjectId = this.CurrUser.LoginProjectId; + // 焊工部分 + BLL.PersonManageService.UpdateBSWelder(welder); + } + + + } + //result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位人员报验编号已存在!" + "|"; } } else diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs index 938c52a8..d6f4a005 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs @@ -43,8 +43,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.agree.Hidden = true; this.options.Hidden = true; - this.btnSave.Hidden = true; - this.btnSubmit.Hidden = true; this.NCRManagementId = Request.Params["NCRManagementId"]; Model.Comprehensive_NCRManagement nCRManagement = BLL.NCRManagementService.GetNCRManagementById(this.NCRManagementId); if (nCRManagement != null) diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/DesignChangeStatisc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/DesignChangeStatisc.aspx.cs index 4a23896b..2e944f5a 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/DesignChangeStatisc.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/DesignChangeStatisc.aspx.cs @@ -76,8 +76,8 @@ namespace FineUIPro.Web.CQMS.ManageReport checkStatisc.TotalCheckNum = totalManagementList.Count(); checkStatisc.OKNum = managementList.Count(x => x.ApprovalDate != null); checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ApprovalDate != null); - checkStatisc.OneOKRate = managementList.Count(x => x.HandleState == "3").ToString(); //当期完成数 - checkStatisc.TotalOneOKRate = totalManagementList.Count(x => x.HandleState == "3").ToString(); //累计完成数 + checkStatisc.OneOKRate = managementList.Count(x => x.Status == "3").ToString(); //当期完成数 + checkStatisc.TotalOneOKRate = totalManagementList.Count(x => x.Status == "3").ToString(); //累计完成数 StatisticsList.Add(checkStatisc); i++; } @@ -130,8 +130,8 @@ namespace FineUIPro.Web.CQMS.ManageReport checkStatisc.TotalCheckNum = totalManagementList.Count(); checkStatisc.OKNum = managementList.Count(x => x.ApprovalDate != null); checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ApprovalDate != null); - checkStatisc.OneOKRate = managementList.Count(x => x.HandleState == "3").ToString(); //当期完成数 - checkStatisc.TotalOneOKRate = totalManagementList.Count(x => x.HandleState == "3").ToString(); //累计完成数 + checkStatisc.OneOKRate = managementList.Count(x => x.Status == "3").ToString(); //当期完成数 + checkStatisc.TotalOneOKRate = totalManagementList.Count(x => x.Status == "3").ToString(); //累计完成数 StatisticsList.Add(checkStatisc); i++; } diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportEdit.aspx.cs index 13dd9b26..df5c6df6 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportEdit.aspx.cs @@ -882,12 +882,12 @@ namespace FineUIPro.Web.CQMS.ManageReport //当期集合 List managementList = BLL.NCRManagementService.GetNCRManagementListByUnitNameAndDate(this.CurrUser.LoginProjectId, item, startDate, endDate); //累计集合 - List sumManagementList = BLL.NCRManagementService.GetNCRManagementListByUnitNameAndDate(this.CurrUser.LoginProjectId, item, projectStartDate, endDate); + List sumManagementList = BLL.NCRManagementService.GetNCRManagementListByUnitNameAndDate(this.CurrUser.LoginProjectId, item, projectStartDate, DateTime.Now); Model.NCRReportStatisc NCRStatisc = new Model.NCRReportStatisc(); NCRStatisc.Num = i; NCRStatisc.WorkName = BLL.UnitService.getUnitNamesUnitIds(item); - NCRStatisc.CurrentPeriodOkNum = managementList.Count(x => x.CompleteDate != null); - NCRStatisc.OKNum = sumManagementList.Count(x => x.CompleteDate != null); + NCRStatisc.CurrentPeriodOkNum = managementList.Count(x => x.Status == "3"); + NCRStatisc.OKNum = sumManagementList.Count(x => x.Status == "3"); NCRStatisc.CheckNum = sumManagementList.Count; if (NCRStatisc.CheckNum != 0)//被除数不能为零 { @@ -921,6 +921,18 @@ namespace FineUIPro.Web.CQMS.ManageReport } StatisticsList.Add(StatisticsLast); } + else + { + Model.NCRReportStatisc StatisticsLast = new Model.NCRReportStatisc(); + StatisticsLast.Num = 0; + StatisticsLast.WorkName = "合计"; + StatisticsLast.CurrentPeriodOkNum = 0; + StatisticsLast.OKNum = 0; + StatisticsLast.CheckNum = 0; + StatisticsLast.OKRate = "0%"; + StatisticsList.Add(StatisticsLast); + + } this.gvNCRStatisc.DataSource = StatisticsList; this.gvNCRStatisc.DataBind(); } @@ -967,7 +979,7 @@ namespace FineUIPro.Web.CQMS.ManageReport foreach (var item in cNProfessionals) { //专业下所有集合 - List totalManagementList = BLL.DesignChangeOrderService.GetDesignChangeOrderListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, item.CNProfessionalId, projectStartDate, endDate); + List totalManagementList = BLL.DesignChangeOrderService.GetDesignChangeOrderListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, item.CNProfessionalId, projectStartDate, DateTime.Now); //专业下当期集合 List managementList = BLL.DesignChangeOrderService.GetDesignChangeOrderListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, item.CNProfessionalId, startDate, endDate); Model.CheckStatisc checkStatisc = new Model.CheckStatisc(); @@ -977,8 +989,8 @@ namespace FineUIPro.Web.CQMS.ManageReport checkStatisc.TotalCheckNum = totalManagementList.Count(); checkStatisc.OKNum = managementList.Count(x => x.ApprovalDate != null); checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ApprovalDate != null); - checkStatisc.OneOKRate = managementList.Count(x => x.HandleState == "3").ToString(); //当期完成数 - checkStatisc.TotalOneOKRate = totalManagementList.Count(x => x.HandleState == "3").ToString(); //累计完成数 + checkStatisc.OneOKRate = managementList.Count(x => x.Status == "3").ToString(); //当期完成数 + checkStatisc.TotalOneOKRate = totalManagementList.Count(x => x.Status == "3").ToString(); //累计完成数 if (checkStatisc.CheckNum > 0 || checkStatisc.TotalCheckNum > 0 || checkStatisc.OKNum > 0 || checkStatisc.TotalOKNum > 0) { StatisticsList.Add(checkStatisc); @@ -1163,24 +1175,36 @@ namespace FineUIPro.Web.CQMS.ManageReport UnitName=BLL.UnitService.GetUnitNameByUnitId(g.Key.UnitId), Count = g.Key.UnitId.Count(), }; + + var total = from x in db.Solution_CQMSConstructSolution + where x.CompileDate >= projectStartDate && x.CompileDate <= DateTime.Now + group x by new { x.UnitId, ProjectId = x.ProjectId == project.ProjectId } + into g + select new + { + UnitName = BLL.UnitService.GetUnitNameByUnitId(g.Key.UnitId), + Count = g.Key.UnitId.Count(), + }; var result = q.ToList().Select((item, index) => new { Index = index + 1, item.UnitName, - item.Count + item.Count, + AllCount= (int)total.ToList().Where(x => x.UnitName == item.UnitName).Select(x=>x.Count).FirstOrDefault() }); if (result.Count()>0) //增加总计 { int totalCount = result.Sum(item => item.Count); + int totalAllCount = result.Sum(item => item.AllCount); result = result.Concat(new[] { new { Index = result.Count() + 1, UnitName = "合计", - Count = totalCount - + Count = totalCount, + AllCount= totalAllCount } }); } @@ -1194,7 +1218,7 @@ namespace FineUIPro.Web.CQMS.ManageReport { if (e.Row.RowType == DataControlRowType.Header) { - string headerStr = "序号#报审单位#完成数量"; + string headerStr = "序号#报审单位#审批完成数量#总数量"; DynamicTHeaderHepler dHelper = new DynamicTHeaderHepler(); dHelper.SplitTableHeader(e.Row, headerStr); } diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/NCRStatisc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/NCRStatisc.aspx.cs index 780bf616..feac56fa 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/NCRStatisc.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/NCRStatisc.aspx.cs @@ -74,8 +74,8 @@ namespace FineUIPro.Web.CQMS.ManageReport NCRStatisc.Num = i; NCRStatisc.WorkName = BLL.UnitService.getUnitNamesUnitIds(item); NCRStatisc.CheckNum = managementList.Count(); - NCRStatisc.OKNum = managementList.Count(x => x.CompleteDate != null); - NCRStatisc.NotOKNum = managementList.Count(x => x.CompleteDate == null); + NCRStatisc.OKNum = managementList.Count(x => x.Status == "3"); + NCRStatisc.NotOKNum = managementList.Count(x => x.Status != "3"); NCRStatisc.Remark = ""; if (NCRStatisc.CheckNum != 0)//被除数不能为零 { @@ -100,8 +100,8 @@ namespace FineUIPro.Web.CQMS.ManageReport NCRStatisc.Num = i; NCRStatisc.WorkName = item.ProfessionalName; NCRStatisc.CheckNum = managementList.Count(); - NCRStatisc.OKNum = managementList.Count(x => x.CompleteDate != null); - NCRStatisc.NotOKNum = managementList.Count(x => x.CompleteDate == null); + NCRStatisc.OKNum = managementList.Count(x => x.Status == "3"); + NCRStatisc.NotOKNum = managementList.Count(x => x.Status != "3"); NCRStatisc.Remark = ""; if (NCRStatisc.CheckNum != 0)//被除数不能为零 { diff --git a/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs index b648c52b..85cb3dd2 100644 --- a/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs @@ -1108,10 +1108,35 @@ namespace FineUIPro.Web.CQMS.Solution { HFConstructSolutionId.Text = SQLHelper.GetNewID(typeof(Model.Solution_CQMSConstructSolution)); } + string id = HFConstructSolutionId.Text; + Model.Solution_CQMSConstructSolution constructSolution = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(id); + if (constructSolution.State == Const.CQMSConstructSolution_Audit || constructSolution.State == Const.CQMSConstructSolution_ReCompile) + { + Model.Solution_CQMSConstructSolutionApprove approve = CQMSConstructSolutionApproveService.GetConstructSolutionApproveByApproveMan(id, CurrUser.UserId); + if (approve != null || CurrUser.UserId == Const.sysglyId) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + ContactImg, HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId))); + } + else + { + if (!constructSolution.CompileMan.Equals(CurrUser.UserId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}&&editorMode={3}", + ContactImg, HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId,"view"))); + } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference( - String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", - ContactImg, HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId))); + } + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + ContactImg, HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId))); + } + } protected void btnapprove_Click(object sender, EventArgs e) diff --git a/SGGL/FineUIPro.Web/common/css/project.css b/SGGL/FineUIPro.Web/common/css/project.css index 6c3dc2c6..f50a2585 100644 --- a/SGGL/FineUIPro.Web/common/css/project.css +++ b/SGGL/FineUIPro.Web/common/css/project.css @@ -14,7 +14,22 @@ justify-content: space-between; padding: 20px 0; } +.th > p > .s1 { + width: 33.33%; + display: inline-block; + text-align: center; + height: auto; + line-height: normal; +} +.tr1 { + display: flex; + color: #FFFFFF; + font-size: .175rem; + + /* height: .425rem; +    line-height: .425rem; */ +} .y_rgs { width: 149px; height: 70px; @@ -408,12 +423,21 @@ text-align: center; height: 100%; } -.th>p{ - text-align: center; - height: 50%; - line-height: .425rem; - text-align: center; -} + .th > p { + text-align: center; + height: 50%; + line-height: .425rem; + text-align: center; + } + .th:nth-child(2) > p { + text-align: center; + height: 50%; + line-height: .425rem; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } .b-line{ border-bottom: 1px solid #1B538B; } @@ -424,16 +448,19 @@ width: 50%; display: inline-block; text-align: center; - height: 100%; - line-height: .475rem; + height: 100%; + line-height: .475rem; } .tr{ display: flex; color: #FFFFFF ; font-size: .175rem; - height: .425rem; - line-height: .425rem; + height: .425rem; + line-height: .425rem; +} +.tr>.th{ + } .tr>span{ text-align: center; @@ -498,8 +525,20 @@ overflow: hidden; } .gj{ position: absolute; - top: .125rem; - right: .25rem; + top: 0; + left: .25rem; + +} +.gj1{ + position: absolute; + top: 0; + right: 0; +} +.gj1>span{ + padding: .05rem .25rem; + font-size: .175rem; + color: #ffffff; + } .gj>span{ font-size: .175rem; @@ -507,7 +546,7 @@ overflow: hidden; } .gj>span:nth-child(2){ color: #E9E931; - font-size: .3rem; + font-size: .225rem; margin-left: .125rem; } diff --git a/SGGL/FineUIPro.Web/common/mainProject2.aspx b/SGGL/FineUIPro.Web/common/mainProject2.aspx index 5edef1fa..27bccc42 100644 --- a/SGGL/FineUIPro.Web/common/mainProject2.aspx +++ b/SGGL/FineUIPro.Web/common/mainProject2.aspx @@ -247,15 +247,55 @@ -
-
赢得值曲线 - <%--
关键事项准点率90%
--%> +
+
+ +
赢得值曲线实物工程量
+
关键事项完成率<%=gjsxRate %>
-
- <%--
- -
--%> +
+
+
+ +
质量概况
@@ -448,6 +488,21 @@ }