|
|
@@ -393,7 +393,7 @@ namespace UAS_MES.PublicMethod
|
|
|
}
|
|
|
if (em_type == "admin")
|
|
|
{
|
|
|
- if (dh.CheckExist("Source", "sc_code='" + iSourceCode + "' and sc_statuscode='AUDITED'"))
|
|
|
+ if (dh.CheckExist("Source", "upper(sc_code)='" + iSourceCode.ToUpper() + "' and sc_statuscode='AUDITED'"))
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
@@ -560,7 +560,7 @@ namespace UAS_MES.PublicMethod
|
|
|
//取MakeProcess表中的执行记录ID最大的一个工单的号码
|
|
|
oMakeCode = "";
|
|
|
oErrorMessage = "";
|
|
|
- string ms_id = dh.getFieldDataByCondition("MakeSerial", "max(ms_id) ms_id", "ms_sncode='" + iSnCode + "' or ms_firstsn in (select firstsn from makesnrelation where sn='" + iSnCode + "')").ToString();
|
|
|
+ string ms_id = dh.getFieldDataByCondition("MakeSerial", "max(ms_id) ms_id", "upper(ms_sncode)='" + iSnCode.ToUpper() + "' or ms_firstsn in (select firstsn from makesnrelation where upper(sn)='" + iSnCode.ToUpper() + "')").ToString();
|
|
|
oMakeCode = dh.getFieldDataByCondition("MakeSerial", "ms_makecode", "ms_id='" + ms_id + "'").ToString();
|
|
|
if (oMakeCode != "")
|
|
|
return true;
|
|
|
@@ -769,7 +769,7 @@ namespace UAS_MES.PublicMethod
|
|
|
Form.Rows[0]["ob_projectcode"] = qualmethod;
|
|
|
pr_id = dh.getFieldDataByCondition("QUA_Project", "pr_id", "pr_code = '" + qualmethod + "'").ToString();
|
|
|
sql.Clear();
|
|
|
- sql.Append("select nvl(max(oi_id),0)oi_id, ci_kind,nvl(max(oi_sampleqty),0) oi_sampleqty from QUA_PROJECT left join ");
|
|
|
+ sql.Append("select 1 choose,nvl(max(oi_id),0)oi_id, ci_kind,nvl(max(oi_sampleqty),0) oi_sampleqty from QUA_PROJECT left join ");
|
|
|
sql.Append(" QUA_ProjectDetail on pd_prid=pr_id left join QUA_CheckItem on pd_ciid=ci_id ");
|
|
|
sql.Append("left join OQCITEMS on oi_checkno ='" + iCheckNo + "' and oi_projectcode='" + qualmethod + "' ");
|
|
|
sql.Append("and oi_projectcode = pr_code and oi_checkkind = ci_kind where pr_code='" + qualmethod + "' group by ci_kind");
|