|
|
@@ -1385,6 +1385,31 @@ namespace UAS_MES.PublicMethod
|
|
|
error = "";
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
+ /// <summary>
|
|
|
+ /// 验证是否符合合同防呆
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="msid"></param>
|
|
|
+ /// <param name="macOrBt"></param>
|
|
|
+ /// <param name="type"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static Boolean checkMacOrBtRange(string msid,string macOrBt,string type)
|
|
|
+ {
|
|
|
+ //--判断是否有合同,是否在合同定义的范围内
|
|
|
+ string saleCode= dh.getFieldDataByCondition("makeserial", "ms_salecode", "ms_id='" + msid + "'").ToString();
|
|
|
+ if (saleCode=="")
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ //判断是否有合同范围
|
|
|
+ if (dh.CheckExist("SaleMacBTRange","Sr_Sacode = '"+saleCode+"' and sr_type = '"+type+"'"))
|
|
|
+ {
|
|
|
+ //有合同范围再判断是否在范围内
|
|
|
+ if (!dh.CheckExist("SaleMacBTRange", "Sr_Sacode = '"+saleCode+"' and sr_type = '"+type+"' and '"+macOrBt+"' between SR_STARTCODE and SR_ENDCODE"))
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|