Browse Source

BUG调整

callm 5 years ago
parent
commit
ec9f985d0c

+ 9 - 1
UAS_MES_ODLF/FunctionCode/Make/Make_FeedingCollectionCombineFix.cs

@@ -59,7 +59,7 @@ namespace UAS_MES_NEW.Make
 
         List<string> SPID = new List<string>();
 
-        public Make_FeedingCollectionCombine()
+        public Make_FeedingCollectionCombineFix()
         {
             InitializeComponent();
         }
@@ -223,6 +223,11 @@ namespace UAS_MES_NEW.Make
                                             string sp_checksalecode = dt1.Rows[RemainIndex]["sp_checksalecode"].ToString();
                                             if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
                                             {
+                                                if (CollectData.Contains(code.Text))
+                                                {
+                                                    OperateResult.AppendText(">>条码" + code.Text + "已经上料\n", Color.Red, code);
+                                                    return;
+                                                }
                                                 CollectDataSonCode.Add(sp_soncode);
                                                 SPID.Add(sp_id);
                                                 CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
@@ -263,6 +268,9 @@ namespace UAS_MES_NEW.Make
                                         sql.Append(" and sp_mothercode = ma_prodcode left join makeserial on ms_makecode=ma_code and sp_craftcode=ms_craftcode ");
                                         sql.Append("where ma_code='" + make_code + "'and sp_id=:sp_id1 and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + sn_code.Text + "'");
                                         dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode", "sp_id", "sp_id1" }, CollectDataSonCode.ToArray(), CollectData.ToArray(), SPID.ToArray(), SPID.ToArray());
+                                        CollectDataSonCode.Clear();
+                                        CollectData.Clear();
+                                        SPID.Clear();
                                         if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
                                         {
                                             OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);

+ 9 - 0
UAS_MES_ODLF/UAS_MES_ODLF.csproj

@@ -526,6 +526,12 @@
     <Compile Include="FunctionCode\Make\Make_CollectElec.Designer.cs">
       <DependentUpon>Make_CollectElec.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_FeedingCollectionCombineFix.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_FeedingCollectionCombineFix.Designer.cs">
+      <DependentUpon>Make_FeedingCollectionCombineFix.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_FeedingCollectionCombine.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1249,6 +1255,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_CollectElec.resx">
       <DependentUpon>Make_CollectElec.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_FeedingCollectionCombineFix.resx">
+      <DependentUpon>Make_FeedingCollectionCombineFix.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_FeedingCollectionCombine.resx">
       <DependentUpon>Make_FeedingCollectionCombine.cs</DependentUpon>
     </EmbeddedResource>