0%

河北长安中车联网

前面啥也没有

通过VIN获取车型信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
private bool GetVehInfo_MES()
{
bool _return = false;
DataTable dt = DbOperation.GetVehInfo_MES(this.tB_vin.Text);//通过VIN获取车型信息
if (dt != null && dt.Rows.Count > 0)
{
VehInfo.SetVehInfo_MES(dt);//设置车型参数信息
_return = true;
}
return _return;
}

public static DataTable GetVehInfo_MES(string vin)
{
DataTable dt = null;
string sql = TransferQueryDoc.GetQueryDoc_Login("L10101", JsonHelper.JsonSerializerByArrayData<string>(new List<string>
{
vin
}.ToArray()));
/*
strSql.Append("SELECT * FROM T_CAR_BRIEF_PARAMETER_V WHERE VIN_CODE='");
strSql.Append(strInfo[0]);
strSql.Append("'");
break;
*/
if (!string.IsNullOrEmpty(sql))
{
dt = DbOperation.Query(sql, 1);
}
return dt;
}

通过MODEL_ID可以获取VSN

侧滑软件测试流程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
1等待车型 数据库查询当前工位是否有车型信息
SELECT INSP_ITEM,TASKID,VIN FROM ");
strSql.Append("CVIC_INSP_TASK_TMP WHERE CUR_WP=");
strSql.Append(strInfo[0]);
strSql.Append(" AND CHECK_STATE='G0' AND LINE_ID='");
strSql.Append(strInfo[1]);
strSql.Append("' ORDER BY PRIORITY DESC,BG_TIME ASC
2获取车型信息
SELECT * FROM ");
strSql.Append("CVIC_INSP_TASK_TMP WHERE TASKID='");
strSql.Append(strInfo[0]);
strSql.Append("' AND CHECK_STATE='G0' AND VIN='");
strSql.Append(strInfo[1]);
strSql.Append("' ORDER BY PRIORITY DESC,BG_TIME ASC

3获取标准
SELECT SVL,SVH FROM CVIC_INSP_STD_TMP WHERE TASKID=

4初始化设备等待车辆

5保存数据
strSql.Append("INSERT INTO CVIC_SS_RESULT_TMP(TASKID,VEH_NO,CHECK_DATA,JUDGE,BG_TIME,INSP_SEQ,ED_TIME)VALUES(");
protected bool SaveResult()
{
List<string> data = new List<string>();
string tmp = "";
for (int i = 0; i < 6; i++)
{
switch (i)
{
case 0:
tmp = VehInfo.TASKID;
break;
case 1:
tmp = VehInfo.VIN;
break;
case 2:
tmp = string.Format("{0:F1}", VehInfo.DATA[0]);
break;
case 3:
tmp = string.Format("{0:N0}", VehInfo.JUDGE[0]);
break;
case 4:
tmp = VehInfo.BGTIME;
break;
case 5:
tmp = VehInfo.CheckSeq.ToString();
break;
}
data.Insert(i, tmp);
}
return DbOperation.SaveResult(data);
}
foreach (string s in strInfo)
{
strSql.Append("'" + s + "'");
strSql.Append(",");
}
strSql.Append("CONVERT(VARCHAR(24), GETDATE(), 120)");
strSql.Append(")");
1
2
3
4
5
6
7
8
Process currentproc = Process.GetCurrentProcess();
Process[] processcollection = Process.GetProcessesByName(currentproc.ProcessName);
if (processcollection.Length > 1)
{
MessageBox.Show("应用程序已经在运行中。。");
Thread.Sleep(1000);
Environment.Exit(1);
}