瀏覽代碼

标签核对BUG修改

callm 2 天之前
父節點
當前提交
f8c9d1c15f

+ 7 - 2
UAS_MES_YDCY/FunctionCode/Make/Make_SNLabelCheckMidBox.cs

@@ -278,7 +278,7 @@ namespace UAS_MES_NEW.Make
                                     return;
                                 }
                                 //如果称重到了50个,则重量信息重新自动设置到产品信息
-                                int weight_count = dh.getRowCount("makeserail", " ms_makecode='" + ma_code.Text + "' and ms_midboxweight is not null");
+                                int weight_count = dh.getRowCount("makeserial", " ms_makecode='" + ma_code.Text + "' and ms_midboxweight is not null");
                                 if (weight_count == 50)
                                 {
                                     double pr_miderror = double.Parse(dh.getFieldDataByCondition("product", "nvl(pr_miderror,0)", "pr_code='" + ma_prodcode.Text + "'").ToString());
@@ -339,6 +339,7 @@ namespace UAS_MES_NEW.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 ");
@@ -390,12 +391,14 @@ namespace UAS_MES_NEW.Make
                 sn_code.Text = code.Text;
                 code.Str = "";
                 sql.Clear();
-                sql.Append("select ma_prodcode,ma_ecncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_spec,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
+                sql.Append("select PR_MIDBOXMINWEIGHT, PR_MIDBOXMAXWEIGHT,ma_prodcode,ma_ecncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_spec,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
                 sql.Append(",ms_prodcode,ms_makecode,ms_code,ms_stepname  from makeserial left join make on ma_code=ms_makecode ");
                 sql.Append("left join product on ms_prodcode=pr_code where ms_sncode='" + code.Text + "' order by ms_id desc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
                 {
+                    string _maxweight = dt.Rows[0]["PR_MIDBOXMAXWEIGHT"].ToString();
+                    string _minweight = dt.Rows[0]["PR_MIDBOXMINWEIGHT"].ToString();
                     ms_id = dt.Rows[0]["ms_id"].ToString();
                     make_code = dt.Rows[0]["ma_code"].ToString();
                     mabomversion = dt.Rows[0]["ma_bomversion"].ToString();
@@ -403,6 +406,8 @@ namespace UAS_MES_NEW.Make
                     nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
                     ms_status = dt.Rows[0]["ms_status"].ToString();
                     ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
+                    MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
+                    MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
                     BaseUtil.SetFormValue(this.Controls, dt);
                     LockMakeCode.Checked = true;
                     //勾选了前一工单

+ 1 - 1
UAS_MES_YDCY/FunctionCode/OQC/OQC_PlanMaintain_NEW.cs

@@ -169,7 +169,7 @@ namespace UAS_MES_NEW.OQC
                 sql.Append("where not exists (select ois_id from OQCItemSamples where OIS_SNCODE='" + ms_sncode.Text + "' and ois_itemcode =:ois_itemcode)");
                 dh.BatchInsert(sql.GetString(), new string[] { "ois_itemcode", "ois_ifng", "ois_itemcode" },
                     oi_itemcode_insert.ToArray(), ois_ifng_insert.ToArray(), oi_itemcode_insert.ToArray());
-                dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0 where ms_id='" + oMSID + "'", "select");
+                dh.ExecuteSql("update makeserial set MS_IFQCCHECK=0,ms_status=3,ms_nextstepcode='' where ms_id='" + oMSID + "'", "select");
                 OperateResult.AppendText(">>" + ms_sncode.Text + "不良品采集成功\n", Color.Green, ms_sncode);
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "采集不良品", "采集不良品成功", ms_sncode.Text, "");
                 //}