查询增加字段
This commit is contained in:
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Inspection
|
||||
namespace JY.DAL
|
||||
{
|
||||
public class ConstValue
|
||||
{
|
||||
@@ -154,6 +154,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ConstValue.cs" />
|
||||
<Compile Include="IDbHelper.cs" />
|
||||
<Compile Include="IocConfig.cs" />
|
||||
<Compile Include="Service\BlankingDataService.cs" />
|
||||
|
||||
+25
-21
@@ -376,34 +376,38 @@ namespace JY.DAL
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
strSql = @" SELECT [ID] ID
|
||||
string preSql = @" SELECT [ID] ID
|
||||
,[TD] 序号
|
||||
,[WorkShift] 班次
|
||||
,[TDGroup] 主道
|
||||
,[ArrivalBarCode] 入站条码
|
||||
,[DepartureBarCode] 出站条码
|
||||
,[TMDB] 条码对比
|
||||
,CONVERT(varchar, [OutTime], 120) 出站时间
|
||||
,[CCD1] '正面(2D/3D)'
|
||||
,[CCD2] '反面(2D/3D)'
|
||||
,[CCD3] '左侧面(2D/3D)'
|
||||
,[CCD4] '右侧面(2D/3D)'
|
||||
,[CCD5] '顶面(2D/3D)'
|
||||
,[CCD6] '底面(2D/3D)'
|
||||
,[CCD7] 底WE1
|
||||
,[CCD8] 底WE2
|
||||
,[CCD9] 底WE3
|
||||
,[CCD10] 底WE4
|
||||
,[CCD11] 中ME1
|
||||
,[CCD12] 中ME2
|
||||
,[CCD13] 中ME3
|
||||
,[CCD14] 中ME4
|
||||
,[CCD15] '极柱(POS/NEG)'
|
||||
,[CCD16] '防爆阀(PRO)'
|
||||
,[Result] 综合结果
|
||||
,[Remark] 备注
|
||||
,[Flag] 状态
|
||||
,CONVERT(varchar, [OutTime], 120) 出站时间 ";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (var propName in ConstValue.CCD_SDict.Keys)
|
||||
{
|
||||
sb.Append($",[{propName}] '{ConstValue.CCD_SDict[propName]}'");
|
||||
}
|
||||
|
||||
foreach (var propName in ConstValue.CCD_FDict.Keys)
|
||||
{
|
||||
sb.Append($",[{propName}] '{ConstValue.CCD_SDict[propName]}'");
|
||||
}
|
||||
|
||||
foreach (var propName in ConstValue.CCD_IDict.Keys)
|
||||
{
|
||||
sb.Append($",[{propName}] '{ConstValue.CCD_SDict[propName]}'");
|
||||
}
|
||||
string formatSql = sb.ToString();
|
||||
|
||||
string nextSql = @",[Result] 综合结果
|
||||
,[Remark] 备注
|
||||
,[Flag] 状态
|
||||
FROM [dbo].[BlankingData] where OutTime >= '" + strDate1 + "' and OutTime <= '" + strDate2 + "' ";
|
||||
strSql = string.Concat(preSql, formatSql, nextSql);
|
||||
|
||||
if (strBarCode != "")
|
||||
{
|
||||
strSql += " and DepartureBarCode like '%" + strBarCode + "' ";
|
||||
|
||||
@@ -194,7 +194,6 @@
|
||||
<Compile Include="Common\ConnectionClient.cs" />
|
||||
<Compile Include="Common\DGShowMsg.cs" />
|
||||
<Compile Include="Common\DateTimeSynchronization.cs" />
|
||||
<Compile Include="ConstValue.cs" />
|
||||
<Compile Include="Entity\AlarmStatus.cs" />
|
||||
<Compile Include="Frm\FormMesGradingSet.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
ALTER TABLE S1270.dbo.BlankingData ADD CCDF1 float NULL;
|
||||
ALTER TABLE S1270.dbo.BlankingData ADD CCDF2 float NULL;
|
||||
ALTER TABLE S1270.dbo.BlankingData ADD CCDF3 float NULL;
|
||||
ALTER TABLE S1270.dbo.BlankingData ADD CCDI1 int NULL;
|
||||
ALTER TABLE S1270.dbo.BlankingData ADD CCDI2 int NULL;
|
||||
ALTER TABLE S1270.dbo.BlankingData ADD CCDI3 int NULL;
|
||||
ALTER TABLE S1270.dbo.BlankingData ADD CCDI4 int NULL;
|
||||
ALTER TABLE S1270.dbo.BlankingData ADD CCDI5 int NULL;
|
||||
ALTER TABLE S1270.dbo.BlankingData ADD CCDI6 int NULL;
|
||||
Reference in New Issue
Block a user