|
|
@@ -1354,10 +1354,10 @@ namespace UAS_MES_NEW.PublicMethod
|
|
|
{
|
|
|
double precent = double.Parse(kind[i].Split('#')[1]);
|
|
|
string subfix = (kind[i].Split('#')[0]);
|
|
|
- if (iSN.Substring(iSN.Length - 1) == subfix)
|
|
|
+ if (iSN.Substring(iSN.Length - subfix.Length) == subfix)
|
|
|
{
|
|
|
double total = ma_qty * precent;
|
|
|
- int count = dh.getRowCount("craftmaterial", "cm_makecode='" + iMakeCode + "' and cm_fsoncode='" + iFSonCode + "' and cm_status=0 and substr(cm_barcode,-1)='" + subfix + "'");
|
|
|
+ int count = dh.getRowCount("craftmaterial", "cm_makecode='" + iMakeCode + "' and cm_fsoncode='" + iFSonCode + "' and cm_status=0 and substr(cm_barcode,-" + subfix.Length + ")='" + subfix + "'");
|
|
|
if (count >= total)
|
|
|
{
|
|
|
ErrMessage = "条码" + iSN + "比例不允许超过工单设置比例,已上料" + count + "工单设置数量" + total;
|