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