callm 6 месяцев назад
Родитель
Сommit
5e4468ff50

+ 6 - 6
UAS_MES_HGS/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -126,12 +126,12 @@ namespace UAS_MES_NEW.Make
                     string oMsID = "";
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                     {
-                        //string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
-                        //if (nextstepcode != User.CurrentStepCode)
-                        //{
-                        //    OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + nextstepcode + ",不是当前岗位的工序\n", Color.Red, sncode);
-                        //    return;
-                        //}
+                        string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
+                        if (nextstepcode != User.CurrentStepCode)
+                        {
+                            OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + nextstepcode + ",不是当前岗位的工序\n", Color.Red, sncode);
+                            return;
+                        }
                         sql.Clear();
                         sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,pr_detail pr_spec,pr_colorboxunit,pr_code,pr_colorboxgw,");
                         sql.Append("pr_colorboxunit,pr_colorboxmaxw,pr_colorboxminw,nvl(PR_CHECKCOLORBOXW,'0') PR_CHECKCOLORBOXW,nvl(pr_sendchecktype,'LineCode')");

+ 6 - 0
UAS_MES_HGS/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -127,6 +127,12 @@ namespace UAS_MES_NEW.Make
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out oErrorMessage);
                     if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
                     {
+                        string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsId + "'").ToString();
+                        if (nextstepcode != User.CurrentStepCode)
+                        {
+                            OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + nextstepcode + ",不是当前岗位的工序\n", Color.Red, sncode);
+                            return;
+                        }
                         //IF (如果ma_code 为空)THEN
                         if (ma_code.Text == "" || ma_code.Text != oMakeCode)
                         {

+ 17 - 12
UAS_MES_HGS/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -304,20 +304,25 @@ namespace UAS_MES_NEW.Packing
                         if (pa_outboxcode.Text == "")
                         {
                             string boxcode_notsealed = dh.getFieldDataByCondition("package", "max(pa_outboxcode)", "pa_makecode='" + ms_makecode + "' and nvl(pa_status,0)=0").ToString();
-
-                            string boxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_id='" + oMsID + "'").ToString();
-                            if (boxcode_notsealed != boxcode)
-                            {
-                                OperateResult.AppendText(">>" + boxcode_notsealed + "未封箱,不允许采集当前箱号" + boxcode + "\n", Color.Red, sn_code);
-                                return;
-                            }
-                            //序列号存在箱号的情况下获取所有的装箱数据
-                            if (boxcode != "")
+                            if (boxcode_notsealed != "")
                             {
-                                pa_outboxcode.Text = boxcode;
+                                pa_outboxcode.Text = boxcode_notsealed;
                                 pa_makecode.Text = "";
                                 LoadGridData();
                             }
+                            //string boxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_id='" + oMsID + "'").ToString();
+                            //if (boxcode_notsealed != boxcode)
+                            //{
+                            //    OperateResult.AppendText(">>" + boxcode_notsealed + "未封箱,不允许采集当前箱号" + boxcode + "\n", Color.Red, sn_code);
+                            //    return;
+                            //}
+                            ////序列号存在箱号的情况下获取所有的装箱数据
+                            //if (boxcode != "")
+                            //{
+                            //    pa_outboxcode.Text = boxcode;
+                            //    pa_makecode.Text = "";
+                            //    LoadGridData();
+                            //}
                             else
                             {
                                 //如果勾选了自动生成箱号,在封箱或者首次
@@ -893,11 +898,11 @@ namespace UAS_MES_NEW.Packing
                                 if (standqty != "")
                                 {
                                     //置空原箱
-                                    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                                    dh.ExecuteSql("update package set pa_checkno='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                 }
                                 else
                                     //置空原箱
-                                    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                                    dh.ExecuteSql("update package set pa_checkno='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                 pa_status.Text = "0";
                                 //删除箱的明细
                                 dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");