|
|
@@ -133,7 +133,7 @@ namespace UAS_MES.Make
|
|
|
sql.Append("select sp_id,sp_tracekind,sp_barcoderule,sp_ifuseregex,sp_ifforsn,sp_length,sp_soncode,sp_repcode");
|
|
|
sql.Append(",pr_id,sp_type,sp_prefix,sp_regex from stepproduct left join product on pr_code=sp_soncode where ");
|
|
|
sql.Append("sp_bomversion='" + ma_bomversion.Text + "' and sp_craftcode='" + ma_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "'");
|
|
|
- sql.Append("And sp_mothercode ='" + pr_code.Text + "' and((sp_type = '物料' and( sp_tracekind <> 2 or sp_tracekind is null))or sp_type <> '物料')");
|
|
|
+ sql.Append("And sp_mothercode ='" + pr_code.Text + "' and((( sp_tracekind <> 2 or sp_tracekind is null))or sp_type <> '物料')");
|
|
|
sql.Append("and not exists(select 1 from craftmaterial where (cm_sncode='" + ms_firstsn + "' or cm_sncode in (select sn from makesnrelation where firstsn='" + ms_firstsn + "')) and cm_makecode='" + ma_code.Text + "' and cm_soncode=");
|
|
|
sql.Append("sp_soncode and cm_status=0) order by SP_DETNO asc");
|
|
|
ListA = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|