diff --git a/DataBase/版本日志/SGGLDB_WH_2024-04-29-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-04-29-bwj.sql new file mode 100644 index 00000000..eeb911f0 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-04-29-bwj.sql @@ -0,0 +1,48 @@ +alter table Comprehensive_DataReceivingDoc alter column RemarkCode int +go + +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='ֽHRB400E' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Y200430832' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='ȡͼ' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Y1109024' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB8624-2014' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='CV' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB/T5574-2008' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='J1009194' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='B201031625' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB50264-2013' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='QC202108241813' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB8624-2016' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Q355' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='A537CL2' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='EQ001' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB/T3880-2012' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='SS2022-00150' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='F1112193' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='AFJ2207444' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='A02212507RPS1' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='ֽHPB300' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='A537CL2/A516 Cr 60/Q370/Q345' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='J1012004' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='A537 CL2/Q370/Q345' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='SANS298-2007' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='SS2022-00006' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='jc/70-2002' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='AFJ22070445' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB8624-2015' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='8900002955433' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB8624-2013' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Q370/Q345' +update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Y1201023' +go + +alter table Comprehensive_InspectionEquipment alter column RemarkCode int +go +alter table Comprehensive_InspectionPerson alter column RemarkCode int +go +alter table Comprehensive_InspectionMachine alter column RemarkCode int +go +alter table Comprehensive_TrainingRecords alter column RemarkCode int +go +alter table Comprehensive_ConTechnologyDisclosure alter column RemarkCode int +go \ No newline at end of file diff --git a/SGGL/BLL/CQMS/Comprehensive/ConTechnologyDisclosureService.cs b/SGGL/BLL/CQMS/Comprehensive/ConTechnologyDisclosureService.cs index 56bd5ce0..9a5326dc 100644 --- a/SGGL/BLL/CQMS/Comprehensive/ConTechnologyDisclosureService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/ConTechnologyDisclosureService.cs @@ -64,6 +64,7 @@ namespace BLL newCon.DisclosureDate = con.DisclosureDate; newCon.UnitWorkId = con.UnitWorkId; newCon.AttendMan = con.AttendMan; + newCon.RemarkCode = con.RemarkCode; Funs.DB.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs b/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs index 1a13a283..feb9025d 100644 --- a/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs @@ -71,6 +71,7 @@ namespace BLL newTraining.Hours = trainingRecords.Hours; newTraining.KeynoteSpeaker = trainingRecords.KeynoteSpeaker; newTraining.Remark = trainingRecords.Remark; + newTraining.RemarkCode = trainingRecords.RemarkCode; Funs.DB.SubmitChanges(); } } diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 976bce8e..762826be 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -3306,32 +3306,7 @@ namespace BLL /// 质量专项检查模板文件原始虚拟路径 /// public const string JointCheckTempUrl = "File\\Excel\\CQMS\\质量专项检查模版.xls"; - - /// - /// 设备材料报验模板文件原始虚拟路径 - /// - public const string InspectionEquipmentTempUrl = "File\\Excel\\CQMS\\设备材料报验模板.xls"; - - /// - /// 人员报验模板文件原始虚拟路径 - /// - public const string InspectionPersonTempUrl = "File\\Excel\\CQMS\\人员报验模板.xls"; - - /// - /// 机具报验模板文件原始虚拟路径 - /// - public const string InspectionMachineTempUrl = "File\\Excel\\CQMS\\机具报验模板.xls"; - - /// - /// 培训记录模板文件原始虚拟路径 - /// - public const string TrainingRecordsTempUrl = "File\\Excel\\CQMS\\培训记录模板.xls"; - - /// - /// 施工技术交底模板文件原始虚拟路径 - /// - public const string ConTechnologyDisclosureTempUrl = "File\\Excel\\CQMS\\施工技术交底管理模板.xls"; - #endregion + #endregion #endregion #region 绩效考核模板文件路径 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs index 7f8d0791..844a4050 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs @@ -239,7 +239,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive protected void btnOut_Click(object sender, EventArgs e) { string rootPath = Server.MapPath("~/"); - string initTemplatePath = Const.ConTechnologyDisclosureTempUrl; + string initTemplatePath = Const.ConTechnologyDisclosureTemUrl; string uploadfilepath = string.Empty; string newUrl = string.Empty; uploadfilepath = rootPath + initTemplatePath; @@ -259,10 +259,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive { lists = lists.Where(x => x.DisclosureCode.Contains(this.txtCode.Text.Trim())); } - lists = lists.OrderBy(x => x.UnitId); + lists = lists.OrderBy(x => x.RemarkCode); if (lists != null) { - newUrl = uploadfilepath.Replace("施工技术交底管理模板.xls", "施工技术交底管理.xls"); + string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + newUrl = uploadfilepath.Replace("施工技术交底管理导入模板", "施工技术交底管理("+projectName+DateTime.Now.ToString("yyyyMMdd")+")"); File.Copy(uploadfilepath, newUrl); // 第一步:读取文件流 NPOI.SS.UserModel.IWorkbook workbook; @@ -297,7 +298,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); NPOI.SS.UserModel.ICell cell; - int i = 1; + int i = 2; foreach (var item in lists) { // 第二步:创建新数据行 @@ -350,6 +351,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive cell = row.CreateCell(7); cell.CellStyle = cellStyle; cell.SetCellValue(item.AttendMan);//参加人员 + + cell = row.CreateCell(8); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号 i++; } // 第三步:写入文件流 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs index d043c7b8..b58b1674 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs @@ -178,7 +178,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive && x.SuperUnitWork == null select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { string row0 = pds.Rows[i][0].ToString(); if (string.IsNullOrEmpty(row0)) @@ -246,6 +246,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive { result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|"; } + else + { + try + { + int t = Convert.ToInt32(row8); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "标识编号" + "," + "[" + row8 + "]错误!" + "|"; + } + } } if (!string.IsNullOrEmpty(result)) { @@ -395,13 +406,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive && x.SuperUnitWork == null select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { Model.Comprehensive_ConTechnologyDisclosure oldViewInfo = new Model.Comprehensive_ConTechnologyDisclosure(); 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 == pds.Rows[i][8].ToString().Trim() + oldViewInfo = oldViewInfos.Where(x => x.RemarkCode ==Funs.GetNewInt( pds.Rows[i][8].ToString().Trim()) ).FirstOrDefault(); if (oldViewInfo == null) { @@ -419,7 +430,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive des.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][6].ToString().Trim()); } des.AttendMan = pds.Rows[i][7].ToString().Trim(); - des.RemarkCode = pds.Rows[i][8].ToString().Trim(); + des.RemarkCode =Funs.GetNewInt( pds.Rows[i][8].ToString().Trim()); des.CompileMan = this.CurrUser.UserId; des.CompileDate = DateTime.Now; BLL.ConTechnologyDisclosureService.AddConTechnologyDisclosure(des); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx index 7dc31553..e81ced90 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx @@ -36,6 +36,7 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs index 1e39d02c..de6eb01f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs @@ -64,6 +64,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.drpUnitWorkIds.SelectedValueArray = con.UnitWorkId.Split(','); } this.txtAttendMan.Text = con.AttendMan; + this.txtRemarkCode.Text = con.RemarkCode.HasValue ? con.RemarkCode.ToString() : ""; } else { @@ -91,6 +92,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择交底负责单位!", MessageBoxIcon.Warning); return; } + + var q = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.ConTechnologyDisclosureId != this.ConTechnologyDisclosureId || (this.ConTechnologyDisclosureId == null && x.ConTechnologyDisclosureId != null))); + if (q != null) + { + Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_ConTechnologyDisclosure newCon = new Model.Comprehensive_ConTechnologyDisclosure(); newCon.ProjectId = this.CurrUser.LoginProjectId; newCon.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; @@ -112,6 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } newCon.UnitWorkId = ids; newCon.AttendMan = this.txtAttendMan.Text.Trim(); + newCon.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); if (string.IsNullOrEmpty(this.ConTechnologyDisclosureId)) { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.designer.cs index 92dffb09..dd2561ad 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.designer.cs @@ -102,6 +102,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// protected global::FineUIPro.DropDownList drpUnitWorkIds; + /// + /// txtRemarkCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtRemarkCode; + /// /// txtAttendMan 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx index 265b8472..1a926684 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx @@ -15,7 +15,7 @@ diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs index 8c7227fe..5e1bd28c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs @@ -54,7 +54,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive doc.CompileMan, doc.CompileDate, doc.Status, - cnp.ProfessionalName " + cnp.ProfessionalName, + doc.RemarkCode " + @" FROM Comprehensive_DataReceivingDoc AS doc" + @" LEFT JOIN Base_CNProfessional AS cnp ON cnp.CNProfessionalId = doc.CNProfessionalId" + @" WHERE doc.ProjectId = @ProjectId"; @@ -514,7 +515,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive cell = row.CreateCell(19); cell.CellStyle = cellStyle; - cell.SetCellValue(item.RemarkCode);//标志编号 + cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号 i++; } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs index 443dbc9c..fbe491e8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs @@ -170,7 +170,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive where y.ProjectId == this.CurrUser.LoginProjectId select x; - var cns = from x in Funs.DB.Base_CNProfessional select x; + var cns = from x in Funs.DB.Base_CNProfessional select x; for (int i = 2; i < ir; i++) { @@ -276,7 +276,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive result += (i + 2).ToString() + "," + "上报日期" + "," + "格式错误!" + "|"; } } - + string row10 = pds.Rows[i][10].ToString().Trim(); if (!string.IsNullOrEmpty(row10)) { @@ -355,7 +355,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive string row18 = pds.Rows[i][18].ToString().Trim(); if (!string.IsNullOrEmpty(row18)) - { + { if (row18 != "是" && row18 != "否") { result += (i + 2).ToString() + "," + "是否存档" + "," + "[" + row18 + "]错误!" + "|"; @@ -367,6 +367,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive { result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|"; } + else + { + try + { + int c = Convert.ToInt32(row19); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row19 + "]错误!" + "|"; + } + } } if (!string.IsNullOrEmpty(result)) { @@ -517,7 +528,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive var cn = cns.Where(y => y.ProfessionalName == pds.Rows[i][4].ToString().Trim()).FirstOrDefault(); var unit = units.Where(y => y.UnitName == pds.Rows[i][5].ToString().Trim()).FirstOrDefault(); - oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][19].ToString().Trim() + oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][19].ToString().Trim()) ).FirstOrDefault(); if (oldViewInfo == null) { @@ -569,7 +580,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive des.IsOnFile = false; } } - des.RemarkCode = pds.Rows[i][19].ToString().Trim(); + des.RemarkCode = Funs.GetNewInt(pds.Rows[i][19].ToString().Trim()); des.CompileMan = this.CurrUser.UserId; des.CompileDate = DateTime.Now; BLL.DataReceivingDocService.AddDataReceivingDoc(des); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx index 781bbfe9..5773e88a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx @@ -117,7 +117,8 @@ - + <%----%> + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs index 578a207b..ebe28ca5 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs @@ -153,7 +153,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.rblIsOnFile.SelectedValue = "false"; } } - this.txtRemarkCode.Text = dataReceivingDoc.RemarkCode; + this.txtRemarkCode.Text = dataReceivingDoc.RemarkCode.HasValue ? dataReceivingDoc.RemarkCode.ToString() : ""; //var currApprove = DataReceivingDocApproveService.GetCurrentApprove(dataReceivingDoc.DataReceivingDocId); //if (currApprove != null) @@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.RemarkCode == this.txtRemarkCode.Text.Trim() && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null))); + var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -274,7 +274,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { dataReceivingDoc.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue); } - dataReceivingDoc.RemarkCode = this.txtRemarkCode.Text.Trim(); + dataReceivingDoc.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); //if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) //{ // dataReceivingDoc.AuditMan = drpAudit.SelectedValue; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.designer.cs index ca61470e..d14403cf 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.designer.cs @@ -271,7 +271,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtRemarkCode; + protected global::FineUIPro.NumberBox txtRemarkCode; /// /// Label1 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx index 25ed15df..86852203 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx @@ -15,7 +15,7 @@ diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs index 7046a41d..fc883381 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs @@ -282,7 +282,7 @@ namespace FineUIPro.Web.Comprehensive protected void btnOut_Click(object sender, EventArgs e) { string rootPath = Server.MapPath("~/"); - string initTemplatePath = Const.InspectionEquipmentTempUrl; + string initTemplatePath = Const.InspectionEquipmentDataInUrl; string uploadfilepath = string.Empty; string newUrl = string.Empty; uploadfilepath = rootPath + initTemplatePath; @@ -306,10 +306,11 @@ namespace FineUIPro.Web.Comprehensive { lists = lists.Where(x => x.InspectionDate <= Funs.GetNewDateTime(txtEndTime.Text.Trim())); } - lists = lists.OrderBy(x => x.UnitId); + lists = lists.OrderBy(x => x.RemarkCode); if (lists != null) { - newUrl = uploadfilepath.Replace("设备材料报验模板.xls", "设备材料报验.xls"); + var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + newUrl = uploadfilepath.Replace("设备材料报验导入模板", "设备材料报验(" + projectName + "" + DateTime.Now.ToString("yyyyMMdd") + ")"); File.Copy(uploadfilepath, newUrl); // 第一步:读取文件流 NPOI.SS.UserModel.IWorkbook workbook; @@ -344,7 +345,7 @@ namespace FineUIPro.Web.Comprehensive NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); NPOI.SS.UserModel.ICell cell; - int i = 1; + int i = 2; foreach (var item in lists) { // 第二步:创建新数据行 @@ -360,10 +361,6 @@ namespace FineUIPro.Web.Comprehensive cell = row.CreateCell(2); cell.CellStyle = cellStyle; - cell.SetCellValue(item.EquipmentNO);//设备位号 - - cell = row.CreateCell(3); - cell.CellStyle = cellStyle; var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId); if (cnp != null) { @@ -374,6 +371,10 @@ namespace FineUIPro.Web.Comprehensive cell.SetCellValue(string.Empty);//专业 } + cell = row.CreateCell(3); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.EquipmentNO);//设备位号 + cell = row.CreateCell(4); cell.CellStyle = cellStyle; cell.SetCellValue(item.InspectionName);//名称 @@ -422,6 +423,10 @@ namespace FineUIPro.Web.Comprehensive cell.CellStyle = cellStyle; cell.SetCellValue(item.UsedPlace);//拟使用部位 + cell = row.CreateCell(13); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号 + i++; } // 第三步:写入文件流 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs index 14c8aaa7..95111f50 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs @@ -126,7 +126,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 13); + AddDatasetToSQL(ds.Tables[0], 14); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -173,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive var cns = from x in Funs.DB.Base_CNProfessional select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { Model.Comprehensive_InspectionEquipment oldViewInfo = new Model.Comprehensive_InspectionEquipment(); string row0 = pds.Rows[i][0].ToString().Trim(); @@ -223,21 +223,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive } } - string row12 = pds.Rows[i][12].ToString(); - if (string.IsNullOrEmpty(row12)) + string row13 = pds.Rows[i][13].ToString(); + if (string.IsNullOrEmpty(row13)) { result += (i + 2).ToString() + "," + "标识编号" + "," + "此项为必填项!" + "|"; } - //else - //{ - // var view = oldViewInfos.FirstOrDefault(x => x.RemarkCode == row12); - // if (view != null) - // { - // result += (i + 2).ToString() + "," + "标识编号" + "," + "[" + row12 + "]已存在!" + "|"; - // } - //} + else + { + try + { + int t = Convert.ToInt32(row13); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "标识编号" + "," + "[" + row13 + "]错误!" + "|"; + } + } } - else { result += (i + 2).ToString() + "," + "报验单位" + "," + "[" + row0 + "]不存在!" + "|"; @@ -349,7 +351,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 13); + AddDatasetToSQL2(ds.Tables[0], 14); } catch (Exception ex) { @@ -388,7 +390,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive var cns = from x in Funs.DB.Base_CNProfessional select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { Model.Comprehensive_InspectionEquipment oldViewInfo = new Model.Comprehensive_InspectionEquipment(); string row0 = pds.Rows[i][0].ToString().Trim(); @@ -396,7 +398,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive if (unitInfo != null && !string.IsNullOrEmpty(row0)) { oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId - && x.RemarkCode == pds.Rows[i][12].ToString().Trim() + && x.RemarkCode ==Funs.GetNewInt(pds.Rows[i][13].ToString().Trim()) ).FirstOrDefault(); if (oldViewInfo == null)//新增 { @@ -421,11 +423,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive { Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim()); } - Ins.RemarkCode = pds.Rows[i][12].ToString().Trim(); + Ins.UsedPlace = pds.Rows[i][12].ToString().Trim(); + Ins.RemarkCode =Funs.GetNewInt(pds.Rows[i][13].ToString().Trim()); Ins.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment)); Ins.CompileMan = this.CurrUser.UserId; Ins.CompileDate = DateTime.Now.Date; - Ins.Status = BLL.Const.Comprehensive_Complete; + Ins.Status = BLL.Const.Comprehensive_Compile; BLL.InspectionEquipmentService.AddInspectionEquipment(Ins); } @@ -451,10 +454,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive { oldViewInfo.InspectionDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim()); } - oldViewInfo.RemarkCode = pds.Rows[i][12].ToString().Trim(); + oldViewInfo.UsedPlace= pds.Rows[i][12].ToString().Trim(); + oldViewInfo.RemarkCode =Funs.GetNewInt(pds.Rows[i][13].ToString().Trim()); oldViewInfo.CompileMan = this.CurrUser.UserId; oldViewInfo.CompileDate = DateTime.Now.Date; - oldViewInfo.Status = BLL.Const.Comprehensive_Complete; + oldViewInfo.Status = BLL.Const.Comprehensive_Compile; BLL.InspectionEquipmentService.UpdateInspectionEquipment(oldViewInfo); //result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|"; } @@ -476,7 +480,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive #endregion #endregion - #region 下载模板 /// /// 下载模板按钮 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx index 25506189..2e9ef024 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx @@ -65,7 +65,7 @@ - + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs index 71cd5db1..246db3d7 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs @@ -82,7 +82,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.drpSamplingResult.SelectedValue = inspectionEquipment.SamplingResult; } this.txtInspectionDate.Text = inspectionEquipment.InspectionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", inspectionEquipment.InspectionDate) : ""; - this.txtRemarkCode.Text = inspectionEquipment.RemarkCode; + this.txtRemarkCode.Text = inspectionEquipment.RemarkCode.HasValue ? inspectionEquipment.RemarkCode.ToString() : ""; this.txtEquipmentNo.Text = inspectionEquipment.EquipmentNO; this.txtUsedPlace.Text = inspectionEquipment.UsedPlace; var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(inspectionEquipment.InspectionEquipmentId); @@ -243,6 +243,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } + var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null))); + if (q != null) + { + Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); + return; + } Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment(); newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId; @@ -256,7 +262,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim(); newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim(); newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim(); - newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim(); + newInspectionEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); newInspectionEquipment.Counts = this.txtCounts.Text.Trim(); newInspectionEquipment.Unit = this.txtUnit.Text.Trim(); newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim(); @@ -324,6 +330,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } + var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null))); + if (q != null) + { + Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); + return; + } Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment(); newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId; newInspectionEquipment.UnitId = this.drpUnitId.SelectedValue; @@ -336,7 +348,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim(); newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim(); newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim(); - newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim(); + newInspectionEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); newInspectionEquipment.Counts = this.txtCounts.Text.Trim(); newInspectionEquipment.Unit = this.txtUnit.Text.Trim(); newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim(); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs index ba1f1314..3ca02d7a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive -{ - - - public partial class InspectionEquipmentEdit - { - +namespace FineUIPro.Web.CQMS.Comprehensive { + + + public partial class InspectionEquipmentEdit { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnitId 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitId; - + /// /// txtInspectionCode 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtInspectionCode; - + /// /// txtEquipmentNo 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtEquipmentNo; - + /// /// drpCNProfessionalId 控件。 /// @@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - + /// /// txtInspectionName 控件。 /// @@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtInspectionName; - + /// /// txtSpecifications 控件。 /// @@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSpecifications; - + /// /// drpEquipmentOrMatail 控件。 /// @@ -103,7 +101,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpEquipmentOrMatail; - + /// /// txtSupplier 控件。 /// @@ -112,7 +110,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSupplier; - + /// /// txtCounts 控件。 /// @@ -121,7 +119,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCounts; - + /// /// txtUnit 控件。 /// @@ -130,7 +128,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUnit; - + /// /// txtSamplingCount 控件。 /// @@ -139,7 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSamplingCount; - + /// /// drpSamplingResult 控件。 /// @@ -148,7 +146,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpSamplingResult; - + /// /// drpAttribute 控件。 /// @@ -157,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpAttribute; - + /// /// txtInspectionDate 控件。 /// @@ -166,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtInspectionDate; - + /// /// txtRemarkCode 控件。 /// @@ -174,8 +172,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtRemarkCode; - + protected global::FineUIPro.NumberBox txtRemarkCode; + /// /// txtUsedPlace 控件。 /// @@ -184,7 +182,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUsedPlace; - + /// /// Panel2 控件。 /// @@ -193,7 +191,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -202,7 +200,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -211,7 +209,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + /// /// drpAudit 控件。 /// @@ -220,7 +218,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpAudit; - + /// /// agree 控件。 /// @@ -229,7 +227,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FormRow agree; - + /// /// rblIsAgree 控件。 /// @@ -238,7 +236,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIsAgree; - + /// /// options 控件。 /// @@ -247,7 +245,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FormRow options; - + /// /// txtidea 控件。 /// @@ -256,7 +254,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtidea; - + /// /// Toolbar1 控件。 /// @@ -265,7 +263,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -274,7 +272,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -283,7 +281,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnSubmit 控件。 /// @@ -292,7 +290,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSubmit; - + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs index 20e547d6..fd56334b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs @@ -305,7 +305,7 @@ namespace FineUIPro.Web.Comprehensive protected void btnOut_Click(object sender, EventArgs e) { string rootPath = Server.MapPath("~/"); - string initTemplatePath = Const.InspectionMachineTempUrl; + string initTemplatePath = Const.InspectionMachineDataInUrl; string uploadfilepath = string.Empty; string newUrl = string.Empty; uploadfilepath = rootPath + initTemplatePath; @@ -325,10 +325,11 @@ namespace FineUIPro.Web.Comprehensive { lists = lists.Where(x => x.InspectionType == this.sdrpType.SelectedValue); } - lists = lists.OrderBy(x => x.UnitId); + lists = lists.OrderBy(x => x.RemarkCode); if (lists != null) { - newUrl = uploadfilepath.Replace("机具报验模板.xls", "机具报验.xls"); + string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + newUrl = uploadfilepath.Replace("机具报验导入模板", "机具报验("+ projectName+DateTime.Now.ToString("yyyyMMdd")+ ")"); File.Copy(uploadfilepath, newUrl); // 第一步:读取文件流 NPOI.SS.UserModel.IWorkbook workbook; @@ -363,7 +364,7 @@ namespace FineUIPro.Web.Comprehensive NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); NPOI.SS.UserModel.ICell cell; - int i = 1; + int i = 2; foreach (var item in lists) { // 第二步:创建新数据行 @@ -449,8 +450,28 @@ namespace FineUIPro.Web.Comprehensive cell = row.CreateCell(12); cell.CellStyle = cellStyle; + string isK = string.Empty; + if (item.IsCheckOK.HasValue)//校验合格 + { + if (item.IsCheckOK == true) + { + isK = "是"; + } + else if (item.IsCheckOK == false) + { + isK = "否"; + } + } + cell.SetCellValue(isK); + + cell = row.CreateCell(13); + cell.CellStyle = cellStyle; cell.SetCellValue(item.LeaveDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.LeaveDate) : "");//离场时间 + cell = row.CreateCell(14); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号 + i++; } // 第三步:写入文件流 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs index edb33d3f..06dba038 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs @@ -126,7 +126,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 14); + AddDatasetToSQL(ds.Tables[0], 15); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -173,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive var cns = from x in Funs.DB.Base_CNProfessional select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { Model.Comprehensive_InspectionMachine oldViewInfo = new Model.Comprehensive_InspectionMachine(); string row0 = pds.Rows[i][0].ToString().Trim(); @@ -269,20 +269,39 @@ namespace FineUIPro.Web.CQMS.Comprehensive string row12 = pds.Rows[i][12].ToString(); if (!string.IsNullOrEmpty(row12)) { - try + if (row12 != "是" && row12 != "否") { - DateTime leaveDate = Convert.ToDateTime(row12); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row12 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "校验合格" + "," + "[" + row12 + "]错误!" + "|"; } } string row13 = pds.Rows[i][13].ToString(); - if (string.IsNullOrEmpty(row13)) + if (!string.IsNullOrEmpty(row13)) + { + try + { + DateTime leaveDate = Convert.ToDateTime(row13); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row13 + "]错误!" + "|"; + } + } + string row14 = pds.Rows[i][14].ToString(); + if (string.IsNullOrEmpty(row14)) { result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|"; } + else + { + try + { + int t = Convert.ToInt32(row14); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row14 + "]错误!" + "|"; + } + } } else { @@ -393,7 +412,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 14); + AddDatasetToSQL2(ds.Tables[0], 15); } catch (Exception ex) { @@ -432,7 +451,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive var cns = from x in Funs.DB.Base_CNProfessional select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { string row0 = pds.Rows[i][0].ToString().Trim(); var unitInfo = units.Where(y => y.UnitName == row0).FirstOrDefault(); @@ -440,7 +459,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { Model.Comprehensive_InspectionMachine oldViewInfo = new Model.Comprehensive_InspectionMachine(); oldViewInfo = oldViewInfos.FirstOrDefault(x => x.UnitId == unitInfo.UnitId - && x.RemarkCode == pds.Rows[i][13].ToString().Trim()); + && x.RemarkCode ==Funs.GetNewInt(pds.Rows[i][13].ToString().Trim())); if (oldViewInfo==null) { Model.Comprehensive_InspectionMachine Ins = new Model.Comprehensive_InspectionMachine(); @@ -482,11 +501,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive { Ins.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim()); } - if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) + Ins.IsCheckOK = pds.Rows[i][12].ToString().Trim() == "是" ? true : false; + if (!string.IsNullOrEmpty(pds.Rows[i][13].ToString().Trim())) { - Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim()); + Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][13].ToString().Trim()); } - Ins.RemarkCode = pds.Rows[i][13].ToString().Trim(); + Ins.RemarkCode =Funs.GetNewInt(pds.Rows[i][14].ToString().Trim()); Ins.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine)); Ins.CompileMan = this.CurrUser.UserId; Ins.CompileDate = DateTime.Now.Date; @@ -533,11 +553,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive { oldViewInfo.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim()); } - if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) + oldViewInfo.IsCheckOK = pds.Rows[i][12].ToString().Trim() == "是" ? true : false; + if (!string.IsNullOrEmpty(pds.Rows[i][13].ToString().Trim())) { - oldViewInfo.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim()); + oldViewInfo.LeaveDate = Convert.ToDateTime(pds.Rows[i][13].ToString().Trim()); } - oldViewInfo.RemarkCode = pds.Rows[i][13].ToString().Trim(); + oldViewInfo.RemarkCode = Funs.GetNewInt(pds.Rows[i][14].ToString().Trim()); oldViewInfo.CompileMan = this.CurrUser.UserId; oldViewInfo.CompileDate = DateTime.Now.Date; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx index 1198ad9f..03eb4f74 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx @@ -89,6 +89,7 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs index 6887a102..b2704742 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs @@ -93,6 +93,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { drpAudit.SelectedValue = inspectionMachine.AuditMan; } + this.txtRemarkCode.Text = inspectionMachine.RemarkCode.HasValue ? inspectionMachine.RemarkCode.ToString() : ""; var currApprove = InspectionMachineApproveService.GetCurrentApprove(inspectionMachine.InspectionMachineId); if (currApprove != null) { //重新编制 编制人 可以 显示 提交 保存按钮 @@ -150,7 +151,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.txtSpecificationModel.Readonly = true; this.txtTestCycle.Readonly = true; this.txtUnitsCount.Readonly = true; - this.drpAudit.Readonly = true; + this.drpAudit.Readonly = true; + this.txtRemarkCode.Readonly = true; //this.btnAttach.Enabled = false; } @@ -191,6 +193,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } + var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); + if (q != null) + { + Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); + return; + } Model.Comprehensive_InspectionMachine inspectionMachone = new Model.Comprehensive_InspectionMachine(); inspectionMachone.ProjectId = this.CurrUser.LoginProjectId; if (this.drpUnitId.SelectedValue != BLL.Const._Null) @@ -213,6 +221,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive inspectionMachone.IsCheckOK = this.rblIsCheckOK.SelectedValue == "true" ? true : false; inspectionMachone.LeaveDate = Funs.GetNewDateTime(this.txtLeaveDate.Text); inspectionMachone.UnitsCount = Funs.GetNewInt(this.txtUnitsCount.Text.Trim()); + inspectionMachone.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) { inspectionMachone.AuditMan = drpAudit.SelectedValue; @@ -259,6 +268,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } + var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); + if (q != null) + { + Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); + return; + } Model.Comprehensive_InspectionMachine inspectionMachone = new Model.Comprehensive_InspectionMachine(); inspectionMachone.ProjectId = this.CurrUser.LoginProjectId; if (this.drpUnitId.SelectedValue != BLL.Const._Null) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.designer.cs index 95b5c957..b118bc06 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.designer.cs @@ -192,6 +192,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// protected global::FineUIPro.Button btnAttach; + /// + /// txtRemarkCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtRemarkCode; + /// /// drpAudit 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs index 7a66fa66..72302fe0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs @@ -372,7 +372,7 @@ namespace FineUIPro.Web.Comprehensive protected void btnOut_Click(object sender, EventArgs e) { string rootPath = Server.MapPath("~/"); - string initTemplatePath = Const.InspectionPersonTempUrl; + string initTemplatePath = Const.InspectionPersonDataInUrl; string uploadfilepath = string.Empty; string newUrl = string.Empty; uploadfilepath = rootPath + initTemplatePath; @@ -392,10 +392,11 @@ namespace FineUIPro.Web.Comprehensive { lists = lists.Where(x => x.PersonName.Contains(this.stxtPersonName.Text.Trim())); } - lists = lists.OrderBy(x => x.UnitId); + lists = lists.OrderBy(x => x.RemarkCode); if (lists != null) { - newUrl = uploadfilepath.Replace("人员报验模板.xls", "人员报验.xls"); + string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + newUrl = uploadfilepath.Replace("人员报验导入模板", "人员报验(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")"); File.Copy(uploadfilepath, newUrl); // 第一步:读取文件流 NPOI.SS.UserModel.IWorkbook workbook; @@ -430,7 +431,7 @@ namespace FineUIPro.Web.Comprehensive NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); NPOI.SS.UserModel.ICell cell; - int i = 1; + int i = 2; foreach (var item in lists) { // 第二步:创建新数据行 @@ -446,6 +447,10 @@ namespace FineUIPro.Web.Comprehensive cell = row.CreateCell(2); cell.CellStyle = cellStyle; + cell.SetCellValue(item.PersonName);//姓名 + + cell = row.CreateCell(3); + cell.CellStyle = cellStyle; string proName = string.Empty; var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId); if (cnp != null) @@ -454,7 +459,7 @@ namespace FineUIPro.Web.Comprehensive } cell.SetCellValue(proName);//专业 - cell = row.CreateCell(3); + cell = row.CreateCell(4); cell.CellStyle = cellStyle; string unitWork = string.Empty; if (!string.IsNullOrEmpty(item.UnitWorkId)) @@ -463,23 +468,19 @@ namespace FineUIPro.Web.Comprehensive } cell.SetCellValue(unitWork);//单位工程名称 - cell = row.CreateCell(4); + cell = row.CreateCell(5); cell.CellStyle = cellStyle; string postName = string.Empty; if (!string.IsNullOrEmpty(item.PostId)) { var post = BLL.PostService.GetPostById(item.PostId); - if (post!=null) + if (post != null) { postName = post.PostName; } } cell.SetCellValue(postName);//工种 - cell = row.CreateCell(5); - cell.CellStyle = cellStyle; - cell.SetCellValue(item.PersonName);//姓名 - cell = row.CreateCell(6); cell.CellStyle = cellStyle; cell.SetCellValue(item.CertificateNumber);//证书编号 @@ -498,8 +499,42 @@ namespace FineUIPro.Web.Comprehensive cell = row.CreateCell(10); cell.CellStyle = cellStyle; + string isO = string.Empty; + if (item.IsOnSite == true)//是否在场 + { + isO = "是"; + } + else + { + isO = "否"; + } + cell.SetCellValue(isO); + + cell = row.CreateCell(11); + cell.CellStyle = cellStyle; + string isT = string.Empty; + if (item.IsTrain == true)//是否培训 + { + isT = "是"; + } + else + { + isT = "否"; + } + cell.SetCellValue(isT); + + cell = row.CreateCell(12); + cell.CellStyle = cellStyle; cell.SetCellValue(item.DepartureTime.HasValue ? string.Format("{0:yyyy-MM-dd}", item.DepartureTime) : "");//离场时间 + cell = row.CreateCell(13); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Remark);//备注 + + cell = row.CreateCell(14); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号 + i++; } // 第三步:写入文件流 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs index 3062cee1..54d9d3d5 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs @@ -126,7 +126,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 13); + AddDatasetToSQL(ds.Tables[0], 15); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -172,28 +172,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive select x; var cns = from x in Funs.DB.Base_CNProfessional select x; + + var unitWorks = from x in Funs.DB.WBS_UnitWork + where x.ProjectId == this.CurrUser.LoginProjectId + && x.SuperUnitWork == null + select x; + var posts = from x in Funs.DB.Base_Post select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { Model.Comprehensive_InspectionPerson oldViewInfo = new Model.Comprehensive_InspectionPerson(); string row0 = pds.Rows[i][0].ToString().Trim(); var unitInfo = units.Where(y => y.UnitName == row0).FirstOrDefault(); if (unitInfo != null && !string.IsNullOrEmpty(row0)) { - /*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)) { @@ -219,23 +212,24 @@ namespace FineUIPro.Web.CQMS.Comprehensive string row4 = pds.Rows[i][4].ToString(); if (!string.IsNullOrEmpty(row4)) { - var post = posts.Where(x => x.PostName == row4.Trim()).FirstOrDefault(); - if (post == null) + string[] reunit = row4.Split(','); + foreach (string unitWork in reunit) { - result += (i + 2).ToString() + "," + "工种" + "," + "[" + row4 + "]不存在!" + "|"; + var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault(); + if (u == null) + { + result += (i + 2).ToString() + "," + "单位工程名称" + "," + "[" + unitWork.Trim() + "]不存在!" + "|"; + } } } - string row7 = pds.Rows[i][7].ToString(); - if (!string.IsNullOrEmpty(row7)) + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row5)) { - try + var post = posts.Where(x => x.PostName == row5.Trim()).FirstOrDefault(); + if (post == null) { - DateTime date = Convert.ToDateTime(row7.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row7 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "工种" + "," + "[" + row5 + "]不存在!" + "|"; } } @@ -248,36 +242,69 @@ namespace FineUIPro.Web.CQMS.Comprehensive } catch (Exception) { - result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row8 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row8 + "]错误!" + "|"; } } - string row9 = pds.Rows[i][9].ToString().Trim(); + string row9 = pds.Rows[i][9].ToString(); 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()); + DateTime date = Convert.ToDateTime(row9.Trim()); } catch (Exception) { - result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row10 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row9 + "]错误!" + "|"; } } + + string row10 = pds.Rows[i][10].ToString().Trim(); + if (!string.IsNullOrEmpty(row10)) + { + if (row10 != "是" && row10 != "否") + { + result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row10 + "]错误!" + "|"; + } + } + + string row11 = pds.Rows[i][11].ToString().Trim(); + if (!string.IsNullOrEmpty(row11)) + { + if (row11 != "是" && row11 != "否") + { + result += (i + 2).ToString() + "," + "培训" + "," + "[" + row11 + "]错误!" + "|"; + } + } + string row12 = pds.Rows[i][12].ToString(); - if (string.IsNullOrEmpty(row12)) + if (!string.IsNullOrEmpty(row12)) + { + try + { + DateTime date = Convert.ToDateTime(row12.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row12 + "]错误!" + "|"; + } + } + string row14 = pds.Rows[i][14].ToString(); + if (string.IsNullOrEmpty(row14)) { result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|"; } + else + { + try + { + int t = Convert.ToInt32(row14); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row14 + "]错误!" + "|"; + } + } } else { @@ -388,7 +415,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 13); + AddDatasetToSQL2(ds.Tables[0], 15); } catch (Exception ex) { @@ -426,9 +453,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive select x; var cns = from x in Funs.DB.Base_CNProfessional select x; + + var unitWorks = from x in Funs.DB.WBS_UnitWork + where x.ProjectId == this.CurrUser.LoginProjectId + && x.SuperUnitWork == null + select x; + var posts = from x in Funs.DB.Base_Post select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { Model.Comprehensive_InspectionPerson oldViewInfo = new Model.Comprehensive_InspectionPerson(); string row0 = pds.Rows[i][0].ToString().Trim(); @@ -436,7 +469,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive if (unitInfo != null && !string.IsNullOrEmpty(row0)) { oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId - && x.RemarkCode == pds.Rows[i][12].ToString().Trim() + && x.RemarkCode == Funs.GetNewInt(pds.Rows[i][14].ToString().Trim()) ).FirstOrDefault(); if (oldViewInfo == null) { @@ -450,37 +483,37 @@ namespace FineUIPro.Web.CQMS.Comprehensive { 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.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][4].ToString().Trim()).PostId; + Ins.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][4].ToString().Trim()); } - - Ins.CertificateNumber = pds.Rows[i][5].ToString().Trim(); - Ins.QualifiedProjectCode = pds.Rows[i][6].ToString().Trim(); - if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) + if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim())) { - Ins.ValidityDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim()); + Ins.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][5].ToString().Trim()).PostId; } - + Ins.CertificateNumber = pds.Rows[i][6].ToString().Trim(); + Ins.QualifiedProjectCode = pds.Rows[i][7].ToString().Trim(); if (!string.IsNullOrEmpty(pds.Rows[i][8].ToString().Trim())) { - Ins.ApprovalTime = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim()); + Ins.ValidityDate = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim()); } - Ins.IsOnSite = pds.Rows[i][9].ToString().Trim() == "是" ? true : false; - - if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim())) + if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim())) { - Ins.DepartureTime = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim()); + Ins.ApprovalTime = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim()); } - Ins.Remark = pds.Rows[i][11].ToString().Trim(); - Ins.RemarkCode = pds.Rows[i][12].ToString().Trim(); + Ins.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false; + Ins.IsTrain= pds.Rows[i][11].ToString().Trim() == "是" ? true : false; + if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) + { + Ins.DepartureTime = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim()); + } + Ins.Remark = pds.Rows[i][13].ToString().Trim(); + Ins.RemarkCode =Funs.GetNewInt(pds.Rows[i][14].ToString().Trim()); Ins.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); Ins.CompileMan = this.CurrUser.UserId; Ins.CompileDate = DateTime.Now.Date; Ins.Status = BLL.Const.Comprehensive_Compile; - Ins.IsTrain = true; BLL.InspectionPersonService.AddInspectionPerson(Ins); if (pds.Rows[i][4].ToString().Trim() == "焊工") { @@ -510,36 +543,37 @@ namespace FineUIPro.Web.CQMS.Comprehensive { 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.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][4].ToString().Trim()); } - - 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())) + if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim())) { - oldViewInfo.ValidityDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim()); + oldViewInfo.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][5].ToString().Trim()).PostId; } - + oldViewInfo.CertificateNumber = pds.Rows[i][6].ToString().Trim(); + oldViewInfo.QualifiedProjectCode = 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.ValidityDate = 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())) + if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim())) { - oldViewInfo.DepartureTime = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim()); + oldViewInfo.ApprovalTime = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim()); } - oldViewInfo.Remark = pds.Rows[i][11].ToString().Trim(); - oldViewInfo.RemarkCode= pds.Rows[i][12].ToString().Trim(); + oldViewInfo.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false; + oldViewInfo.IsTrain = pds.Rows[i][11].ToString().Trim() == "是" ? true : false; + if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) + { + oldViewInfo.DepartureTime = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim()); + } + oldViewInfo.Remark = pds.Rows[i][13].ToString().Trim(); + oldViewInfo.RemarkCode = Funs.GetNewInt(pds.Rows[i][14].ToString().Trim()); + oldViewInfo.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); oldViewInfo.CompileMan = this.CurrUser.UserId; oldViewInfo.CompileDate = DateTime.Now.Date; oldViewInfo.Status = BLL.Const.Comprehensive_Compile; - oldViewInfo.IsTrain = true; BLL.InspectionPersonService.UpdateInspectionPerson(oldViewInfo); if (pds.Rows[i][4].ToString().Trim() == "焊工") { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx index fa368162..26ea9876 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx @@ -72,7 +72,7 @@ - + @@ -86,6 +86,7 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs index 7e54e94c..da1ef2b6 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs @@ -106,6 +106,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.drpUnitWorkIds.SelectedValueArray = inspectionPerson.UnitWorkId.Split(','); } this.txtRemark.Text = inspectionPerson.Remark; + this.txtRemarkCode.Text = inspectionPerson.RemarkCode.HasValue ? inspectionPerson.RemarkCode.ToString() : ""; var currApprove = InspectionPersonApproveService.GetCurrentApprove(inspectionPerson.InspectionPersonId); @@ -172,7 +173,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.txtValidityDate.Readonly = true; this.drpPostId.Readonly = true; this.drpAudit.Readonly = true; - this.drpUnitWorkIds.Readonly = true; + this.drpUnitWorkIds.Readonly = true; + this.txtRemarkCode.Readonly = true; //this.btnAttach.Enabled = false; } @@ -223,6 +225,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } } + var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); + if (q != null) + { + Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); + return; + } // 焊工部分 Model.BS_Welder welder = new Model.BS_Welder(); if (this.drpUnitId.SelectedValue != BLL.Const._Null) @@ -307,6 +315,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive inspectionPerson.DepartureTime = Convert.ToDateTime(this.txtDepartureTime.Text.ToString()); } inspectionPerson.Remark = this.txtRemark.Text.Trim(); + inspectionPerson.RemarkCode =Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); string ids = string.Empty; var lists = this.drpUnitWorkIds.SelectedValueArray; foreach (var item in lists) @@ -401,6 +410,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } } + var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); + if (q != null) + { + Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); + return; + } // 焊工部分 Model.BS_Welder welder = new Model.BS_Welder(); if (this.drpUnitId.SelectedValue != BLL.Const._Null) @@ -486,6 +501,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive inspectionPerson.DepartureTime = Convert.ToDateTime(this.txtDepartureTime.Text.ToString()); } inspectionPerson.Remark = this.txtRemark.Text.Trim(); + inspectionPerson.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); string ids = string.Empty; var lists = this.drpUnitWorkIds.SelectedValueArray; foreach (var item in lists) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.designer.cs index ac1a1a4a..2a6a02b2 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.designer.cs @@ -166,13 +166,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive { protected global::FineUIPro.RadioButtonList rblIsTrain; /// - /// txtRemark 控件。 + /// txtRemarkCode 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtRemark; + protected global::FineUIPro.NumberBox txtRemarkCode; /// /// Panel2 控件。 @@ -201,6 +201,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// protected global::FineUIPro.Button btnAttach; + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + /// /// drpAudit 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs index c1afab99..c5f50b58 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs @@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive protected void btnOut_Click(object sender, EventArgs e) { string rootPath = Server.MapPath("~/"); - string initTemplatePath = Const.TrainingRecordsTempUrl; + string initTemplatePath = Const.CQMS_TrainingRecordsTemplateUrl; string uploadfilepath = string.Empty; string newUrl = string.Empty; uploadfilepath = rootPath + initTemplatePath; @@ -228,9 +228,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive { lists = lists.Where(x => x.TrainingContents.Contains(this.txtTrainingContents.Text.Trim())); } + lists = lists.OrderBy(x => x.RemarkCode); if (lists != null) { - newUrl = uploadfilepath.Replace("培训记录模板.xls", "培训记录.xls"); + string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + newUrl = uploadfilepath.Replace("培训记录导入模板", "培训记录(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")"); File.Copy(uploadfilepath, newUrl); // 第一步:读取文件流 NPOI.SS.UserModel.IWorkbook workbook; @@ -265,7 +267,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); NPOI.SS.UserModel.ICell cell; - int i = 1; + int i = 2; foreach (var item in lists) { // 第二步:创建新数据行 @@ -304,6 +306,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive cell = row.CreateCell(6); cell.CellStyle = cellStyle; cell.SetCellValue(item.Remark);//备注 + + cell = row.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号 + i++; } // 第三步:写入文件流 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataIn.aspx.cs index 5c10af82..fabcf77b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsDataIn.aspx.cs @@ -165,7 +165,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive var cns = from x in Funs.DB.Base_CNProfessional select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { string row0 = pds.Rows[i][0].ToString(); if (string.IsNullOrEmpty(row0)) @@ -217,6 +217,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive { result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|"; } + else + { + try + { + int t = Convert.ToInt32(row7); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row7 + "]错误!" + "|"; + } + } } if (!string.IsNullOrEmpty(result)) { @@ -356,13 +367,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive var cns = from x in Funs.DB.Base_CNProfessional select x; - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { Model.Comprehensive_TrainingRecords oldViewInfo = new Model.Comprehensive_TrainingRecords(); string row1 = pds.Rows[i][1].ToString().Trim(); var cn = cns.Where(y => y.ProfessionalName == row1).FirstOrDefault(); - oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][7].ToString().Trim() + oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][7].ToString().Trim()) ).FirstOrDefault(); if (oldViewInfo == null) { @@ -379,7 +390,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } des.KeynoteSpeaker = pds.Rows[i][5].ToString().Trim(); des.Remark = pds.Rows[i][6].ToString().Trim(); - des.RemarkCode = pds.Rows[i][7].ToString().Trim(); + des.RemarkCode = Funs.GetNewInt(pds.Rows[i][7].ToString().Trim()); BLL.TrainingRecordsService.AddTrainingRecords(des); } } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx index 8218aa47..c8fd2d66 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx @@ -42,6 +42,11 @@ + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs index ca55ca85..39e9e0dc 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs @@ -50,6 +50,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.txtHours.Text = trainingRecords.Hours.HasValue ? trainingRecords.Hours.ToString() : ""; this.txtKeynoteSpeaker.Text = trainingRecords.KeynoteSpeaker; this.txtRemark.Text = trainingRecords.Remark; + this.txtRemarkCode.Text = trainingRecords.RemarkCode.HasValue ? trainingRecords.RemarkCode.ToString() : ""; } } } @@ -68,6 +69,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } + var q = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.TrainingRecordsId != this.TrainingRecordsId || (this.TrainingRecordsId == null && x.TrainingRecordsId != null))); + if (q != null) + { + Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); + return; + } Model.Comprehensive_TrainingRecords trainingRecords = new Model.Comprehensive_TrainingRecords(); trainingRecords.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; trainingRecords.TrainingContents = this.txtTrainingContents.Text.Trim(); @@ -76,6 +83,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive trainingRecords.Hours = Funs.GetNewDecimal(this.txtHours.Text.Trim()); trainingRecords.KeynoteSpeaker = this.txtKeynoteSpeaker.Text.Trim(); trainingRecords.Remark = this.txtRemark.Text.Trim(); + trainingRecords.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); if (!string.IsNullOrEmpty(this.TrainingRecordsId)) { trainingRecords.TrainingRecordsId = this.TrainingRecordsId; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.designer.cs index 0ea812a2..35c6c856 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.designer.cs @@ -93,6 +93,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// protected global::FineUIPro.TextBox txtKeynoteSpeaker; + /// + /// txtRemarkCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtRemarkCode; + /// /// txtRemark 控件。 /// diff --git a/SGGL/FineUIPro.Web/File/Excel/CQMS/人员报验模板.xls b/SGGL/FineUIPro.Web/File/Excel/CQMS/人员报验模板.xls deleted file mode 100644 index 6d470aaf..00000000 Binary files a/SGGL/FineUIPro.Web/File/Excel/CQMS/人员报验模板.xls and /dev/null differ diff --git a/SGGL/FineUIPro.Web/File/Excel/CQMS/机具报验模板.xls b/SGGL/FineUIPro.Web/File/Excel/CQMS/机具报验模板.xls deleted file mode 100644 index bc98e10f..00000000 Binary files a/SGGL/FineUIPro.Web/File/Excel/CQMS/机具报验模板.xls and /dev/null differ diff --git a/SGGL/FineUIPro.Web/File/Excel/CQMS/设备材料报验模板.xls b/SGGL/FineUIPro.Web/File/Excel/CQMS/设备材料报验模板.xls deleted file mode 100644 index 4040814d..00000000 Binary files a/SGGL/FineUIPro.Web/File/Excel/CQMS/设备材料报验模板.xls and /dev/null differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/人员报验导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/人员报验导入模板.xls index 4fb6a79a..ebd30f05 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/人员报验导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/人员报验导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xls index 57e6721b..969e47a4 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/施工技术交底管理导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/施工技术交底管理导入模板.xls index a76033b3..d21489f3 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/施工技术交底管理导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/施工技术交底管理导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/机具报验导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/机具报验导入模板.xls index 8d33ec9e..57d5dc56 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/机具报验导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/机具报验导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/设备材料报验导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/设备材料报验导入模板.xls index 39a206c2..9d1883b4 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/设备材料报验导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/设备材料报验导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xls index 9646a912..b8ab3ffe 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index 63ca13cc..9e91deff 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true false diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index c7deac87..cb214cc8 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -87250,7 +87250,7 @@ namespace Model private System.Nullable _CompileDate; - private string _RemarkCode; + private System.Nullable _RemarkCode; private EntityRef _Base_CNProfessional; @@ -87288,7 +87288,7 @@ namespace Model partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); partial void OnCompileDateChanged(); - partial void OnRemarkCodeChanging(string value); + partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); #endregion @@ -87557,8 +87557,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")] - public string RemarkCode + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] + public System.Nullable RemarkCode { get { @@ -89539,7 +89539,7 @@ namespace Model private string _AuditMan; - private string _RemarkCode; + private System.Nullable _RemarkCode; private EntityRef _Base_CNProfessional; @@ -89603,7 +89603,7 @@ namespace Model partial void OnStatusChanged(); partial void OnAuditManChanging(string value); partial void OnAuditManChanged(); - partial void OnRemarkCodeChanging(string value); + partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); #endregion @@ -90128,8 +90128,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")] - public string RemarkCode + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] + public System.Nullable RemarkCode { get { @@ -93788,7 +93788,7 @@ namespace Model private string _EquipmentNO; - private string _RemarkCode; + private System.Nullable _RemarkCode; private string _UsedPlace; @@ -93844,7 +93844,7 @@ namespace Model partial void OnCompileDateChanged(); partial void OnEquipmentNOChanging(string value); partial void OnEquipmentNOChanged(); - partial void OnRemarkCodeChanging(string value); + partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); partial void OnUsedPlaceChanging(string value); partial void OnUsedPlaceChanged(); @@ -94200,8 +94200,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")] - public string RemarkCode + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] + public System.Nullable RemarkCode { get { @@ -94765,7 +94765,7 @@ namespace Model private string _AuditMan; - private string _RemarkCode; + private System.Nullable _RemarkCode; private EntityRef _Base_CNProfessional; @@ -94819,7 +94819,7 @@ namespace Model partial void OnStatusChanged(); partial void OnAuditManChanging(string value); partial void OnAuditManChanged(); - partial void OnRemarkCodeChanging(string value); + partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); #endregion @@ -95263,8 +95263,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")] - public string RemarkCode + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] + public System.Nullable RemarkCode { get { @@ -95708,7 +95708,7 @@ namespace Model private string _AuditMan; - private string _RemarkCode; + private System.Nullable _RemarkCode; private EntityRef _Base_Post; @@ -95770,7 +95770,7 @@ namespace Model partial void OnStatusChanged(); partial void OnAuditManChanging(string value); partial void OnAuditManChanged(); - partial void OnRemarkCodeChanging(string value); + partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); #endregion @@ -96222,8 +96222,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")] - public string RemarkCode + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] + public System.Nullable RemarkCode { get { @@ -102801,7 +102801,7 @@ namespace Model private string _Remark; - private string _RemarkCode; + private System.Nullable _RemarkCode; private EntityRef _Base_CNProfessional; @@ -102829,7 +102829,7 @@ namespace Model partial void OnKeynoteSpeakerChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); - partial void OnRemarkCodeChanging(string value); + partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); #endregion @@ -103028,8 +103028,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")] - public string RemarkCode + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] + public System.Nullable RemarkCode { get { diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index bd497c6b..5fe155da 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true