提交修改
This commit is contained in:
+11
-10
@@ -40,6 +40,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Apache.NMS.ActiveMQ, Version=1.7.2.4108, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
|
||||
@@ -84,8 +85,8 @@
|
||||
<Reference Include="NPOI.OpenXmlFormats, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Quartz, Version=3.5.0.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Quartz.3.5.0\lib\netstandard2.0\Quartz.dll</HintPath>
|
||||
<Reference Include="Quartz, Version=3.7.0.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Quartz.3.7.0\lib\netstandard2.0\Quartz.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath>
|
||||
@@ -95,8 +96,8 @@
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Configuration.ConfigurationManager.4.7.0\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
|
||||
<Reference Include="System.Configuration.ConfigurationManager, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Configuration.ConfigurationManager.6.0.1\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.Linq" />
|
||||
@@ -120,14 +121,14 @@
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Security.AccessControl, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.AccessControl.4.7.0\lib\net461\System.Security.AccessControl.dll</HintPath>
|
||||
<Reference Include="System.Security.AccessControl, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Permissions, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Permissions.4.7.0\lib\net461\System.Security.Permissions.dll</HintPath>
|
||||
<Reference Include="System.Security.Permissions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Permissions.6.0.0\lib\net461\System.Security.Permissions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Principal.Windows, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Principal.Windows.4.7.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
||||
<Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
|
||||
@@ -180,113 +180,103 @@ 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
|
||||
&& x.InspectionMachineCode == pds.Rows[i][1].ToString().Trim()
|
||||
).FirstOrDefault();
|
||||
if (oldViewInfo == null)
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (string.IsNullOrEmpty(row1))
|
||||
{
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (string.IsNullOrEmpty(row1))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string row2 = pds.Rows[i][2].ToString();
|
||||
if (string.IsNullOrEmpty(row2))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "机具名称" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
string row2 = pds.Rows[i][2].ToString();
|
||||
if (string.IsNullOrEmpty(row2))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "机具名称" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string row3 = pds.Rows[i][3].ToString();
|
||||
if (!string.IsNullOrEmpty(row3))
|
||||
string row3 = pds.Rows[i][3].ToString();
|
||||
if (!string.IsNullOrEmpty(row3))
|
||||
{
|
||||
var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row4 = pds.Rows[i][4].ToString();
|
||||
if (!string.IsNullOrEmpty(row4))
|
||||
{
|
||||
if (row4 != "施工" && row4 != "计量")
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "类型" + "," + "[" + row4 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row6 = pds.Rows[i][6].ToString();
|
||||
if (!string.IsNullOrEmpty(row6))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime date = Convert.ToDateTime(row6.Trim());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "下次检验日期" + "," + "[" + row6 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row8 = pds.Rows[i][8].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(row8))
|
||||
{
|
||||
if (row8 != "是" && row8 != "否")
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "是否在校验期内" + "," + "[" + row8 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row9 = pds.Rows[i][9].ToString();
|
||||
if (!string.IsNullOrEmpty(row9))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime date = Convert.ToDateTime(row9.Trim());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "报验日期" + "," + "[" + row9 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row10 = pds.Rows[i][10].ToString();
|
||||
if (!string.IsNullOrEmpty(row10))
|
||||
{
|
||||
if (row10 != "是" && row10 != "否")
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row10 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
string row11 = pds.Rows[i][11].ToString();
|
||||
if (!string.IsNullOrEmpty(row11))
|
||||
{
|
||||
try
|
||||
{
|
||||
int unitsCount = Convert.ToInt32(row11);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "台数" + "," + "[" + row11 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
string row12 = pds.Rows[i][12].ToString();
|
||||
if (!string.IsNullOrEmpty(row12))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime leaveDate = Convert.ToDateTime(row12);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row12 + "]错误!" + "|";
|
||||
}
|
||||
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
string row4 = pds.Rows[i][4].ToString();
|
||||
if (!string.IsNullOrEmpty(row4))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位机具报验编号已存在!" + "|";
|
||||
if (row4 != "施工" && row4 != "计量")
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "类型" + "," + "[" + row4 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row6 = pds.Rows[i][6].ToString();
|
||||
if (!string.IsNullOrEmpty(row6))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime date = Convert.ToDateTime(row6.Trim());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "下次检验日期" + "," + "[" + row6 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row8 = pds.Rows[i][8].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(row8))
|
||||
{
|
||||
if (row8 != "是" && row8 != "否")
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "是否在校验期内" + "," + "[" + row8 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row9 = pds.Rows[i][9].ToString();
|
||||
if (!string.IsNullOrEmpty(row9))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime date = Convert.ToDateTime(row9.Trim());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "报验日期" + "," + "[" + row9 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row10 = pds.Rows[i][10].ToString();
|
||||
if (!string.IsNullOrEmpty(row10))
|
||||
{
|
||||
if (row10 != "是" && row10 != "否")
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row10 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
string row11 = pds.Rows[i][11].ToString();
|
||||
if (!string.IsNullOrEmpty(row11))
|
||||
{
|
||||
try
|
||||
{
|
||||
int unitsCount = Convert.ToInt32(row11);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "台数" + "," + "[" + row11 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
string row12 = pds.Rows[i][12].ToString();
|
||||
if (!string.IsNullOrEmpty(row12))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime leaveDate = Convert.ToDateTime(row12);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row12 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,65 +436,54 @@ 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
|
||||
&& x.InspectionMachineCode == pds.Rows[i][1].ToString().Trim() && x.InspectionMachineName == pds.Rows[i][2].ToString().Trim()
|
||||
).FirstOrDefault();
|
||||
if (oldViewInfo == null)
|
||||
Model.Comprehensive_InspectionMachine Ins = new Model.Comprehensive_InspectionMachine();
|
||||
Ins.ProjectId = this.CurrUser.LoginProjectId;
|
||||
Ins.UnitId = unitInfo.UnitId;
|
||||
Ins.InspectionMachineCode = pds.Rows[i][1].ToString().Trim();
|
||||
Ins.InspectionMachineName = pds.Rows[i][2].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim()))
|
||||
{
|
||||
Model.Comprehensive_InspectionMachine Ins = new Model.Comprehensive_InspectionMachine();
|
||||
Ins.ProjectId = this.CurrUser.LoginProjectId;
|
||||
Ins.UnitId = unitInfo.UnitId;
|
||||
Ins.InspectionMachineCode = pds.Rows[i][1].ToString().Trim();
|
||||
Ins.InspectionMachineName = pds.Rows[i][2].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim()))
|
||||
{
|
||||
Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim()))
|
||||
{
|
||||
Ins.InspectionType = pds.Rows[i][4].ToString().Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.InspectionType = "施工";
|
||||
}
|
||||
|
||||
Ins.SpecificationModel = pds.Rows[i][5].ToString().Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim()))
|
||||
{
|
||||
Ins.NextTestDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim());
|
||||
}
|
||||
|
||||
Ins.TestCycle = pds.Rows[i][7].ToString().Trim();
|
||||
|
||||
Ins.IsOnSite = pds.Rows[i][8].ToString().Trim() == "是" ? true : false;
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim()))
|
||||
{
|
||||
Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim());
|
||||
}
|
||||
Ins.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false;
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim()))
|
||||
{
|
||||
Ins.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim()))
|
||||
{
|
||||
Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim());
|
||||
}
|
||||
|
||||
Ins.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
BLL.InspectionMachineService.AddInspectionMachine(Ins);
|
||||
Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim()))
|
||||
{
|
||||
Ins.InspectionType = pds.Rows[i][4].ToString().Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|";
|
||||
Ins.InspectionType = "施工";
|
||||
}
|
||||
|
||||
Ins.SpecificationModel = pds.Rows[i][5].ToString().Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim()))
|
||||
{
|
||||
Ins.NextTestDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim());
|
||||
}
|
||||
|
||||
Ins.TestCycle = pds.Rows[i][7].ToString().Trim();
|
||||
|
||||
Ins.IsOnSite = pds.Rows[i][8].ToString().Trim() == "是" ? true : false;
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim()))
|
||||
{
|
||||
Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim());
|
||||
}
|
||||
Ins.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false;
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim()))
|
||||
{
|
||||
Ins.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim()))
|
||||
{
|
||||
Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim());
|
||||
}
|
||||
|
||||
Ins.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
BLL.InspectionMachineService.AddInspectionMachine(Ins);
|
||||
}
|
||||
|
||||
else
|
||||
@@ -512,7 +491,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
@@ -177,6 +177,8 @@ namespace FineUIPro.Web.JDGL.Check
|
||||
}
|
||||
ir = pds.Rows.Count;
|
||||
var units = from x in Funs.DB.Base_Unit
|
||||
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
@@ -372,6 +374,8 @@ namespace FineUIPro.Web.JDGL.Check
|
||||
Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
}
|
||||
var units = from x in Funs.DB.Base_Unit
|
||||
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
|
||||
Reference in New Issue
Block a user