|
@@ -408,13 +408,18 @@ namespace UAS_AutoPass
|
|
|
|
|
|
private void RecordBadInfo(string sncode, string makecode, string filename, string combine, string[] badcode, string[] badlocation)
|
|
|
{
|
|
|
+ string[] ID = dh.GetSEQ("makebad_seq", badcode.Length);
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
|
|
|
- sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_status,mb_badremark) select makebad_seq.nextval");
|
|
|
+ sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_status,mb_badremark) select :ID");
|
|
|
sql.Append(",ma_code,ms_code,ms_sncode,'" + iusercode + "',sysdate,'" + istepcode + "','" + isource + "',");
|
|
|
sql.Append(":bc_code,'" + ibadgroup + "','','0',:location from make left join makeSerial on ms_makecode=ma_code ");
|
|
|
sql.Append("where ms_sncode='" + sncode + "' and ms_makecode='" + makecode + "'");
|
|
|
- dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "location" }, badcode, badlocation);
|
|
|
+ dh.BatchInsert(sql.ToString(), new string[] {"ID", "bc_code", "location" }, ID, badcode, badlocation);
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("update makebad set mb_badname=(select DISTINCT bc_name from badcode where bc_code=mb_badcode),mb_bgname=(select DISTINCT bg_name from badgroup where bg_code=mb_bgcode) ");
|
|
|
+ sql.Append("where mb_id=:ID");
|
|
|
+ dh.BatchInsert(sql.ToString(), new string[] { "ID" }, ID);
|
|
|
//记录判断日志
|
|
|
if (dh.getFieldDataByCondition("source", "sc_scantype", "sc_code='" + isource + "'").ToString() == "REJUCE")
|
|
|
{
|