|
|
@@ -170,6 +170,13 @@ namespace UAS_MES.Make
|
|
|
string cm_status = dt.Rows[0]["cm_status"].ToString();
|
|
|
string cm_makecode = dt.Rows[0]["cm_makecode"].ToString();
|
|
|
string cm_craftcode = dt.Rows[0]["cm_craftcode"].ToString();
|
|
|
+
|
|
|
+ //清除已被使用的序列号
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("update makeserial set ms_nextmacode='' where ms_sncode in(select cm_barcode from craftmaterial where ");
|
|
|
+ sql.Append("cm_makecode='" + cm_makecode + "' and cm_sncode='" + code.Text + "' and cm_stepcode='" + cm_stepcode + "' and cm_craftcode='" + cm_craftcode + "' ");
|
|
|
+ sql.Append("and cm_materialtype=1 and nvl(cm_status,0) =0) and ms_nextmacode='" + oMakeCode + "'");
|
|
|
+ dh.ExecuteSql(sql.GetString(), "update");
|
|
|
//进行下料
|
|
|
sql.Clear();
|
|
|
sql.Append("delete from craftmaterial where (cm_sncode in (select sn from makesnrelation where firstsn");
|
|
|
@@ -177,12 +184,6 @@ namespace UAS_MES.Make
|
|
|
sql.Append("and cm_status = 0 and cm_stepcode='" + User.CurrentStepCode + "' and cm_materialtype=1");
|
|
|
dh.ExecuteSql(sql.GetString(), "delete");
|
|
|
LogicHandler.InsertMakeProcess(ms_macode, code.Text, User.UserSourceCode, "上料采集操作", "下料成功", User.UserCode);
|
|
|
- //清除已被使用的序列号
|
|
|
- sql.Clear();
|
|
|
- sql.Append("update makeserial set ms_nextmacode='' where ms_sncode in(select cm_barcode from craftmaterial where ");
|
|
|
- sql.Append("cm_makecode='" + cm_makecode + "' and cm_stepcode='" + cm_stepcode + "' and cm_craftcode='" + cm_craftcode + "' ");
|
|
|
- sql.Append("and cm_materialtype=1 and nvl(cm_status,0) =0) and ms_nextmacode='" + oMakeCode + "'");
|
|
|
- dh.ExecuteSql(sql.GetString(), "update");
|
|
|
//刷新界面值
|
|
|
sql.Clear();
|
|
|
sql.Append("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty ");
|
|
|
@@ -328,9 +329,10 @@ namespace UAS_MES.Make
|
|
|
string fsoncode = dt1.Rows[i]["sp_fsoncode"].ToString();
|
|
|
string soncode = dt1.Rows[i]["sp_soncode"].ToString();
|
|
|
if (fsoncode == soncode)
|
|
|
- RemainList[i] = fsoncode + "或" + soncode;
|
|
|
- else
|
|
|
RemainList[i] = fsoncode;
|
|
|
+ else
|
|
|
+ RemainList[i] = fsoncode + "或" + soncode;
|
|
|
+
|
|
|
}
|
|
|
if (dt1.Rows.Count > 0)
|
|
|
{
|