callm 11 órája
szülő
commit
d3cb299fe2

+ 1 - 1
UAS_MES_HYSX/FunctionCode/Make/Make_RePrintLabel.cs

@@ -164,7 +164,7 @@ namespace UAS_MES_NEW.Make
                     //}
                     //界面赋值
                     formValue = (DataTable)dh.ExecuteSql("select ms_prodcode,ms_sncode,ms_makecode,pr_code,pr_detail from makeserial left join product on MS_PRODCODE=pr_code where ms_id='" + ms_id + "'", "select");
-                    if (dh.getRowCount("label", "la_prodcode='" + formValue.Rows[0]["ms_prodcode"].ToString() + "'") == 0)
+                    if (!fuselagel.Checked && dh.getRowCount("label", "la_prodcode='" + formValue.Rows[0]["ms_prodcode"].ToString() + "'") == 0)
                     {
                         OperateResult.AppendText(">>序列号对" + formValue.Rows[0]["ms_prodcode"].ToString() + "应产品未维护标签\n", Color.Red);
                         return;

+ 13 - 11
UAS_MES_HYSX/FunctionCode/Make/Make_SeqTransform.Designer.cs

@@ -126,6 +126,8 @@
             // afterTransSNLength_checkBox
             // 
             this.afterTransSNLength_checkBox.AutoSize = true;
+            this.afterTransSNLength_checkBox.Checked = true;
+            this.afterTransSNLength_checkBox.CheckState = System.Windows.Forms.CheckState.Checked;
             this.afterTransSNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.afterTransSNLength_checkBox.Location = new System.Drawing.Point(38, 226);
             this.afterTransSNLength_checkBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
@@ -231,7 +233,7 @@
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.ClearSn_code.Location = new System.Drawing.Point(560, 798);
-            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6);
             this.ClearSn_code.Name = "ClearSn_code";
             this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
             this.ClearSn_code.TabIndex = 141;
@@ -283,7 +285,7 @@
             this.show_sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.show_sncode.ID = null;
             this.show_sncode.Location = new System.Drawing.Point(194, 792);
-            this.show_sncode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.show_sncode.Margin = new System.Windows.Forms.Padding(6);
             this.show_sncode.Name = "show_sncode";
             this.show_sncode.Power = null;
             this.show_sncode.Size = new System.Drawing.Size(316, 43);
@@ -324,7 +326,7 @@
             this.afterTransSNLength.Name = "afterTransSNLength";
             this.afterTransSNLength.Size = new System.Drawing.Size(332, 43);
             this.afterTransSNLength.TabIndex = 90;
-            this.afterTransSNLength.Text = "0";
+            this.afterTransSNLength.Text = "15";
             // 
             // beforeTransSNLength
             // 
@@ -372,7 +374,7 @@
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 15F);
             this.OperateResult.Location = new System.Drawing.Point(38, 294);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(1620, 458);
             this.OperateResult.TabIndex = 78;
@@ -385,7 +387,7 @@
             this.sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.sncode.ID = null;
             this.sncode.Location = new System.Drawing.Point(194, 858);
-            this.sncode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.sncode.Margin = new System.Windows.Forms.Padding(6);
             this.sncode.Name = "sncode";
             this.sncode.Power = "ifread";
             this.sncode.Size = new System.Drawing.Size(316, 43);
@@ -402,7 +404,7 @@
             this.Remark.BackColor = System.Drawing.Color.White;
             this.Remark.ID = null;
             this.Remark.Location = new System.Drawing.Point(928, 768);
-            this.Remark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Remark.Margin = new System.Windows.Forms.Padding(6);
             this.Remark.Multiline = true;
             this.Remark.Name = "Remark";
             this.Remark.Power = null;
@@ -421,7 +423,7 @@
             this.Seq_Remark_PreFix.BackColor = System.Drawing.Color.White;
             this.Seq_Remark_PreFix.ID = null;
             this.Seq_Remark_PreFix.Location = new System.Drawing.Point(828, 816);
-            this.Seq_Remark_PreFix.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Seq_Remark_PreFix.Margin = new System.Windows.Forms.Padding(6);
             this.Seq_Remark_PreFix.Name = "Seq_Remark_PreFix";
             this.Seq_Remark_PreFix.Power = null;
             this.Seq_Remark_PreFix.Size = new System.Drawing.Size(84, 35);
@@ -435,7 +437,7 @@
             // 
             this.SameReamrk.AutoSize = true;
             this.SameReamrk.Location = new System.Drawing.Point(928, 880);
-            this.SameReamrk.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.SameReamrk.Margin = new System.Windows.Forms.Padding(6);
             this.SameReamrk.Name = "SameReamrk";
             this.SameReamrk.Size = new System.Drawing.Size(186, 28);
             this.SameReamrk.TabIndex = 224;
@@ -458,7 +460,7 @@
             // 
             this.IFONLY.AutoSize = true;
             this.IFONLY.Location = new System.Drawing.Point(748, 880);
-            this.IFONLY.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.IFONLY.Margin = new System.Windows.Forms.Padding(6);
             this.IFONLY.Name = "IFONLY";
             this.IFONLY.Size = new System.Drawing.Size(162, 28);
             this.IFONLY.TabIndex = 222;
@@ -471,7 +473,7 @@
             this.CollectRemark.AutoSize = true;
             this.CollectRemark.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectRemark.Location = new System.Drawing.Point(1132, 880);
-            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
             this.CollectRemark.Name = "CollectRemark";
             this.CollectRemark.Size = new System.Drawing.Size(138, 28);
             this.CollectRemark.TabIndex = 221;
@@ -564,7 +566,7 @@
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Make_SeqTransform";
             this.Tag = "Make!SeqTransform";
             this.Text = " ";

+ 3 - 0
UAS_MES_HYSX/FunctionCode/Packing/Packing_PackageCollectionZX.cs

@@ -813,6 +813,9 @@ namespace UAS_MES_NEW.Packing
             {
                 maxnum = int.Parse(maxbox.Substring(maxbox.Length - 4));
             }
+            else {
+                maxnum = 0;
+            }
             //当前序列号的流水
             currentnum = int.Parse(sncode.Substring(sncode.Length - 5));
             //当前序列号在下箱流水范围内的话,允许采集

+ 15 - 7
UAS_MES_HYSX/PublicMethod/HttpServer.cs

@@ -491,6 +491,10 @@ namespace UAS_MES_NEW.PublicMethod
             };
 
             DeviceInfo deviceInfo = JsonConvert.DeserializeObject<DeviceInfo>(returnstr, settings);
+            if (deviceInfo.DSN.Count == 0)
+            {
+                BaseUtil.ShowError("获取数据异常,不允许执行该操作");
+            }
 
             //将返回的信息存入数据库
             for (int i = 0; i < deviceInfo.DSN.Count; i++)
@@ -520,7 +524,7 @@ namespace UAS_MES_NEW.PublicMethod
             DataTable dt = (DataTable)dh.ExecuteSql("select nvl(NOTYPE,0)NOTYPE,po_sn,ma_custpo,pd_barcode,pd_makecode,ZD_D_SN from packagedetail left join ZTEDATA on zd_makecode=pd_makecode and pd_barcode=zd_sn left join make on ma_code=pd_makecode left join ZTE_ORDER on ma_custpo=BATCH_NO  where pd_outboxcode='" + iBox + "' and  RESERVE9='" + User.UserLineCode + "'", "select");
             string makecode = "";
             string po = "";
-            int notype =0;
+            int notype = 0;
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 string enNoKey = $"en_no{i}";
@@ -528,7 +532,7 @@ namespace UAS_MES_NEW.PublicMethod
                 expandoDict[enNoKey] = enNoValue;
                 makecode = dt.Rows[i]["pd_makecode"].ToString();
                 po = dt.Rows[i]["po_sn"].ToString();
-                notype =int.Parse( dt.Rows[i]["NOTYPE"].ToString());
+                notype = int.Parse(dt.Rows[i]["NOTYPE"].ToString());
             }
             obj.request = "Q_wai_xiang";
             obj.packing_num = dt.Rows.Count;
@@ -590,7 +594,11 @@ namespace UAS_MES_NEW.PublicMethod
                 expandoDict[enNoKey] = enNoValue;
                 po = dt.Rows[i]["po_sn"].ToString();
                 makecode = dt.Rows[i]["pa_makecode"].ToString();
-                linecode = dt.Rows[i]["sc_linecode"].ToString();
+                linecode = User.UserLineCode;
+            }
+            if (po == "")
+            {
+                BaseUtil.ShowError("工单未维护客户PO号,不允许执行该操作");
             }
             obj.request = "pallet";
             obj.packing_num = dt.Rows.Count;
@@ -621,7 +629,7 @@ namespace UAS_MES_NEW.PublicMethod
         public static void SendPowerCode(string iSN)
         {
             // 同步版本可以直接调用异步方法并等待
-            SendPowerCodeAsync(iSN).GetAwaiter().GetResult();
+            SendPowerCodeAsync(iSN);
         }
 
         public static async Task SendPowerCodeAsync(string iSN)
@@ -934,7 +942,7 @@ namespace UAS_MES_NEW.PublicMethod
             obj.User = "1453";
             obj.password = "12345678";
             obj.po_sn = po;
-            obj.product_id = iSN.Substring(4,16);
+            obj.product_id = iSN.Substring(4, 16);
             if (po == "")
             {
                 BaseUtil.ShowError("工单未维护客户PO号,不允许执行该操作");
@@ -1009,8 +1017,8 @@ namespace UAS_MES_NEW.PublicMethod
             }
             dh.ExecuteSql("insert into ZTEDATA(ZD_ID,ZD_VENDOR,ZD_D_SN,ZD_DEV_EN_NO,ZD_SN, ZD_MAKECODE, ZD_TYPE, ZD_VALUE,zd_mac,zd_enno,ZD_PRODUCTNAME," +
                 "ZD_ESIMICCID, ZD_EXSIM_ICCID, ZD_4G_VER, ZD_4G_TYPE)" +
-            "values(ZTEDATA_seq.nextval,'"+ vendor + "','" + sn + "','" + product_id + "','" + iSN + "','" + makecode + "','彩盒标','','" + wifi_mac + "'" +
-            ",'" + en + "','"+ product_name + "','"+ esim_iccid + "','"+ exsim_iccid + "','"+ fg_ver + "','"+ fg_type + "')", "insert");
+            "values(ZTEDATA_seq.nextval,'" + vendor + "','" + sn + "','" + product_id + "','" + iSN + "','" + makecode + "','彩盒标','','" + wifi_mac + "'" +
+            ",'" + en + "','" + product_name + "','" + esim_iccid + "','" + exsim_iccid + "','" + fg_ver + "','" + fg_type + "')", "insert");
             dh.ExecuteSql("insert into EISDATA(ED_ID, ED_DATA, ED_INDATE, ED_TYPE)values(EISDATA_seq.nextval,'" + returnstr + "',sysdate,'GETEN_THA')", "insert");
             return sn;
         }

+ 4 - 4
UAS_MES_HYSX/PublicMethod/Print.cs

@@ -261,8 +261,8 @@ namespace UAS_MES_NEW.PublicMethod
                     dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "'", "select");
                     if (dt.Rows.Count == 0)
                     {
-                        ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
-                        return false;
+                        //ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
+                        //return false;
                     }
                 }
             }
@@ -496,8 +496,8 @@ namespace UAS_MES_NEW.PublicMethod
                     dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "'", "select");
                     if (dt.Rows.Count == 0)
                     {
-                        ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
-                        return false;
+                        //ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
+                        //return false;
                     }
                 }
             }