2023-10-12

This commit is contained in:
李鹏飞 2023-10-12 19:33:22 +08:00
parent 7d87e48818
commit d1c7977da2
24 changed files with 688 additions and 237 deletions

Binary file not shown.

View File

@ -38,6 +38,7 @@ namespace BLL
get;
set;
}
public static Dictionary<string ,string >WebEditList= new Dictionary<string ,string >();
/// <summary>
/// 数据库连接字符串

View File

@ -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}】:自定义的工作正在执行... ...");
});
}

View File

@ -40,6 +40,8 @@ using System.Threading.Tasks;
//keyValuePairs.Add(item.InterFaceTaskId, scheduler);
//Funs.ScheduledTasks = keyValuePairs;
}
//// jobAndTriggerMapping[GetClJobDetail()] = GetClTrigger();//增加材料定时
var readOnlyjobAndTriggerMapping = new ReadOnlyDictionary<IJobDetail, IReadOnlyCollection<ITrigger>>(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<CLJob>()
.WithIdentity("CL", "group1")//给Job身份
.WithDescription("任务的描述,方便查找")
.Build();
return jobDetail1;
}
public static ReadOnlyCollection<ITrigger> GetClTrigger()
{
string cron = "0 0/1 * * * ? ";
cron = "0 0/1 * * * ? ";
//创建触发器
var trigger1 = new ReadOnlyCollection<ITrigger>(
new List<ITrigger>()
{
TriggerBuilder.Create()
.WithIdentity("CL", "group1") //给触发器身份
.WithDescription("触发器的描述,方便查找")
.StartAt(new DateTimeOffset(DateTime.Now.AddSeconds(10))) //.StartNow()都是启动触发器方式
.WithCronSchedule(cron) //定时策略Cron表达式
.Build()
});
return trigger1;
}
#endregion
}
}

View File

@ -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

View File

@ -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"];
}

View File

@ -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
{

View File

@ -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();

View File

@ -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)
{

View File

@ -42,9 +42,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
LoadAuditSelect();
this.agree.Hidden = true;
this.options.Hidden = true;
this.btnSave.Hidden = true;
this.btnSubmit.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
{

View File

@ -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() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|";
}
}

View File

@ -25,13 +25,17 @@
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right" LabelWidth="120px"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<f:FormRow ColumnWidths="50% 25% 25%">
<Items>
<f:TextBox ID="txtInspectionName" runat="server" Label="名称" MaxLength="300" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtSpecifications" runat="server" Label="规格" MaxLength="300" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtSpecifications" runat="server" Label="规格" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:DropDownList ID="drpEquipmentOrMatail" runat="server" Label="设备/材料" LabelAlign="Right" ShowRedStar="true" LabelWidth="120px">
<f:ListItem Value="设备" Text="设备" />
<f:ListItem Value="材料" Text="材料" />
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="50% 30% 20%">
<f:FormRow ColumnWidths="50% 25% 25%">
<Items>
<f:TextBox ID="txtSupplier" runat="server" Label="供货厂商" MaxLength="300" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:NumberBox ID="txtCounts" Label="本次数量" runat="server" NoDecimal="false" DecimalPrecision="3" NoNegative="true" LabelAlign="Right" LabelWidth="120px">

View File

@ -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;

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Comprehensive {
namespace FineUIPro.Web.CQMS.Comprehensive
{
public partial class InspectionEquipmentEdit {
public partial class InspectionEquipmentEdit
{
/// <summary>
/// form1 控件。
@ -93,6 +95,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks>
protected global::FineUIPro.TextBox txtSpecifications;
/// <summary>
/// drpEquipmentOrMatail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpEquipmentOrMatail;
/// <summary>
/// txtSupplier 控件。
/// </summary>

View File

@ -431,10 +431,14 @@ 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 oldViewInfo = new Model.Comprehensive_InspectionMachine();
oldViewInfo = oldViewInfos.FirstOrDefault(x => x.UnitId == unitInfo.UnitId
&& x.InspectionMachineCode == pds.Rows[i][1].ToString().Trim());
if (oldViewInfo==null)
{
Model.Comprehensive_InspectionMachine Ins = new Model.Comprehensive_InspectionMachine();
Ins.ProjectId = this.CurrUser.LoginProjectId;
@ -485,6 +489,58 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Ins.CompileDate = DateTime.Now.Date;
BLL.InspectionMachineService.AddInspectionMachine(Ins);
}
else
{
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);
}
}
else
{

View File

@ -181,12 +181,19 @@ 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)
{
}
else
{
result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位人员报验编号已存在!" + "|";
}*/
string row1 = pds.Rows[i][1].ToString();
if (string.IsNullOrEmpty(row1))
{
@ -267,11 +274,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
}
}
else
{
result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位人员报验编号已存在!" + "|";
}
}
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

View File

@ -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)

View File

@ -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++;
}

View File

@ -882,12 +882,12 @@ namespace FineUIPro.Web.CQMS.ManageReport
//当期集合
List<Model.Comprehensive_NCRManagement> managementList = BLL.NCRManagementService.GetNCRManagementListByUnitNameAndDate(this.CurrUser.LoginProjectId, item, startDate, endDate);
//累计集合
List<Model.Comprehensive_NCRManagement> sumManagementList = BLL.NCRManagementService.GetNCRManagementListByUnitNameAndDate(this.CurrUser.LoginProjectId, item, projectStartDate, endDate);
List<Model.Comprehensive_NCRManagement> 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<Model.Comprehensive_DesignChangeOrder> totalManagementList = BLL.DesignChangeOrderService.GetDesignChangeOrderListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, item.CNProfessionalId, projectStartDate, endDate);
List<Model.Comprehensive_DesignChangeOrder> totalManagementList = BLL.DesignChangeOrderService.GetDesignChangeOrderListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, item.CNProfessionalId, projectStartDate, DateTime.Now);
//专业下当期集合
List<Model.Comprehensive_DesignChangeOrder> 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);
}

View File

@ -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)//被除数不能为零
{

View File

@ -1108,11 +1108,36 @@ 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")));
}
}
}
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)
{

View File

@ -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;
@ -414,6 +429,15 @@
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;
}
@ -434,6 +458,9 @@
font-size: .175rem;
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;
}

View File

@ -248,14 +248,54 @@
</div>
<div class="y_box" style="width: 100%;">
<div class="y_box_label y_image_default">赢得值曲线
<%--<div class="gj"><span>关键事项准点率</span><span>90%</span></div>--%>
<div class="y_box_label y_image_default" style="background-image: none;">
<!-- <div class="y_tabs y_row"><span class="y_image_default y_tab-action">赢得值曲线</span><span
class="y_image_default">设备材料</span></div> -->
<div class="gj1"><span class="y_image_default y_tab-action" data-type="1">赢得值曲线</span><span
data-type="2">实物工程量</span></div>
<div class="gj"><span style="margin-right: .125rem;">关键事项完成率</span><span><%=gjsxRate %></span></div>
</div>
<div class="y_box_main" id='left_one' style="width: 100%; height: 90%;"></div>
<%--<div class="y_box_main" id="jdmap">
<div class="y_box_main" id="jdmap" >
<div id='left_one' style="width: 100%; height: 100%;"></div>
</div>--%>
</div>
<div class="y_box_main" id="jdmap1" style="display: none;">
<div class="table" style="width: 100%;">
<div class="thead">
<div class="trth" style="background: rgba(33, 55, 113, .4);">
<div class="th r-line" style="width: .625rem;">
<p>序号</p>
</div>
<div class="th r-line" style="width: 1rem;">
<p>类型</p>
</div>
<div class="th r-line" style="width: .8375rem;">
<p>单位</p>
</div>
<div class="th r-line" style="width: .8375rem;">
<p>设计数量</p>
</div>
<div class="th r-line" style="width: 2.325rem;">
<p class="b-line">本期</p>
<p><span class="r-line s1">计划完成</span><span class="r-line s1">实际完成</span><span
class="r-line s1" style="border: none;">完成率</span></p>
</div>
<div class="th r-line" style="width: 2.325rem;">
<p class="b-line">累计</p>
<p><span class="r-line s1">计划完成</span><span class="r-line s1">实际完成</span><span
class="r-line s1" style="border: none;">完成率</span></p>
</div>
<div class="th r-line" style="width: .8375rem;">
<p>完成率</p>
</div>
</div>
</div>
<div class="tbody">
<%=swgclHtml %>
</div>
</div>
</div>
</div>
<div class="y_box" style="width: 100%;">
<div class="y_box_label y_image_default">质量概况</div>
@ -448,6 +488,21 @@
}
</script>
<script>
$('.gj1>span').click(function () {
console.log($(this).data('type'))
let type = $(this).data('type')
$('.gj1>span').removeClass('y_image_default y_tab-action')
$(this).addClass('y_image_default y_tab-action')
if (type == 1) {
// 赢得值曲线
$("#jdmap1").hide()
$("#jdmap").show()
} else if (type == 2) {
// 实物工程量
$("#jdmap").hide()
$("#jdmap1").show()
}
})
// 焊接一次合格率
hjmap()
function hjmap() {

View File

@ -1,4 +1,8 @@
using BLL;
using FineUIPro.Web.BaseInfo;
using FineUIPro.Web.DataShow;
using FineUIPro.Web.SysManage;
using Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@ -99,7 +103,7 @@ namespace FineUIPro.Web.common
//施工审批量
int sgspl = Funs.DB.Solution_CQMSConstructSolution.Where(x => x.ProjectId == ProjectId && x.State == "1").Count();
div_sgfaSpl.InnerHtml = sgspl.ToString();
GetJD();
//质量共检
getZlgj();
@ -303,6 +307,7 @@ namespace FineUIPro.Web.common
{
string url = getImag.AttachUrl.Replace('\\', '/');
var UrlList = Funs.GetStrListByStr(url, ',');
bool isHiddDefaultImg = false;
foreach (var item in UrlList)
{
if (!string.IsNullOrEmpty(item))
@ -312,13 +317,15 @@ namespace FineUIPro.Web.common
if (File.Exists(atturl) && allowExtensions.Contains(fileType))
{
isHiddDefaultImg=true;
divProjectImg += string.Format(" <div class=\"swiper-slide\"><img src=\"{0}\"></div>", atturl.Replace(Funs.RootPath,"/"));
//this.divProjectImgs.Src = divProjectImg;
}
}
}
divProjectImg= divProjectImg.Replace("<div class=\"swiper-slide\"><img src=\"./imags/16.png\"></div>", "");
/*string firtstUrl = Funs.GetStrListByStr(url, ',').FirstOrDefault();
if (!string.IsNullOrEmpty(firtstUrl))
{
@ -487,7 +494,7 @@ namespace FineUIPro.Web.common
#region
protected int getTodayCount()
{
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.CompileDate.Value.Date == DateTime.Now.Date).ToList().Count;
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.WorkStatesStr == "作业中").ToList().Count;
return result;
}
protected int getAllCount()
@ -501,26 +508,26 @@ namespace FineUIPro.Web.common
/// <returns></returns>
protected int getWrokCount0()
{
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "动火作业许可证").ToList().Count;
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "动火作业许可证" &&x.WorkStatesStr=="作业中").ToList().Count;
return result;
}
protected int getWrokCount1()
{
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "高处作业许可证").ToList().Count;
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "高处作业许可证" && x.WorkStatesStr == "作业中").ToList().Count;
return result;
}
protected int getWrokCount2()
{
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "吊装作业许可证").ToList().Count;
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "吊装作业许可证" && x.WorkStatesStr == "作业中").ToList().Count;
return result;
}
protected int getWrokCount3()
{
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId
&& x.LicenseTypeName != "动火作业许可证" && x.LicenseTypeName != "高处作业许可证" && x.LicenseTypeName != "吊装作业许可证").ToList().Count;
&& x.LicenseTypeName != "动火作业许可证" && x.LicenseTypeName != "高处作业许可证" && x.LicenseTypeName != "吊装作业许可证" && x.WorkStatesStr == "作业中").ToList().Count;
return result;
}
#endregion
@ -548,7 +555,7 @@ namespace FineUIPro.Web.common
select x).Count();
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
zlzgl = zgl.ToString();
zlzgl = zgl.ToString().Replace("NaN", "0") ;
zgzglDataValue = (100 - (100.0 * num2 / (num2 + num3))).ToString();
}
#endregion
@ -639,6 +646,31 @@ namespace FineUIPro.Web.common
#endregion
#region 线
protected string swgclHtml;
protected void GetJD()
{
int index = 0;
var result = Funs.DB.View_JDGL_QuantityCompletion
.Where(qc => qc.ProjectId == this.CurrUser.LoginProjectId)
.OrderBy(qc => qc.SortIndex)
.ThenBy(qc => qc.Name)
.ToList();
foreach (var item in result)
{
swgclHtml += "<div class=\"tr1\">";
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: .625rem;\"><p>{0}</p></div>",index);
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: 1rem;\"><p>{0}</p> </div>",item.Name);
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: .8375rem;\"><p>{0}</p> </div>",item.Unit);
swgclHtml += string.Format(" <div class=\"th r-line\" style=\"width: .8375rem;\"><p>{0}</p> </div>",item.DesignNum);
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: 2.325rem;\"><p><span class=\"r-line s1\">{0}</span><span class=\"r-line s1\">{1}</span><span class=\"r-line s1\" style=\"border: none;\">{2}</span></p> </div>",item.PlanNum,item.RealNum,item.Rate);
swgclHtml += string.Format(" <div class=\"th r-line \" style=\"width: 2.325rem;\"><p><span class=\"r-line s1\">{0}</span><span class=\"r-line s1\">{1}</span><span class=\"r-line s1\" style=\"border: none;\">{2}</span></p> </div>",item.TotalPlanNum,item.TotalRealNum,item.TotalRate);
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: .8375rem;\"><p>{0}</p> </div>",item.SumRate);
swgclHtml += " </div>";
}
}
protected string Two
{
get
@ -866,6 +898,7 @@ namespace FineUIPro.Web.common
#region
protected string gjsxRate = "0";
protected void getGztm()
{
//div_dbsxlist.InnerHtml = "";
@ -961,8 +994,22 @@ namespace FineUIPro.Web.common
}
this.div_gjsxlist.InnerHtml = returnDbHtml;
List<SqlParameter> listStaticListStr = new List<SqlParameter>();
listStaticListStr.Add(new SqlParameter("@UserID", null));
listStaticListStr.Add(new SqlParameter("@unit", null));
listStaticListStr.Add(new SqlParameter("@projectid", this.CurrUser.LoginProjectId));
listStaticListStr.Add(new SqlParameter("@CNProfessional_ID", null));
listStaticListStr.Add(new SqlParameter("@questionType", null));
listStaticListStr.Add(new SqlParameter("@processMan", null)); listStaticListStr.Add(new SqlParameter("@User_Acceptance", null));
SqlParameter[] Staticparameter = listStaticListStr.ToArray();
DataTable statcitbDataTable = SQLHelper.GetDataTableRunProc("Sp_GJSXStatistic", Staticparameter);
var allcount = Funs.GetNewIntOrZero(statcitbDataTable.Rows[0]["allcount"].ToString()) ;
var closecount = Funs.GetNewIntOrZero(statcitbDataTable.Rows[0]["closecount"].ToString());
gjsxRate = String.Format("{0:N2}", 100.0 * closecount / allcount);
gjsxRate = gjsxRate.ToString().Replace("NaN", "0")+"%";
}
#endregion