Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 years ago
parent
commit
d71859fab1

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -278,7 +278,9 @@ namespace UAS_MES.Make
             {
                 OperateResult.AppendText(">>" + bigoutboxcode.Text + "装箱成功\n", Color.Green);
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserSourceCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "大箱采集", "装箱" + bigoutboxcode.Text + "成功", outboxcode.Text, "");
+                dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + bigoutboxcode.Text + "'", "update");
                 bigoutboxcode.Text = LogicHandler.GetOutBoxCode("BIGBOX", "", pa_prodcode.Text, User.UserCode);
+                //更新箱号已封箱
                 sql.Clear();
                 sql.Append("insert into package (pa_id,pa_outboxcode,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS,pa_standardqty,pa_sccode,pa_currentstep)values");
                 sql.Append("(package_seq.nextval,'" + bigoutboxcode.Text + "','" + pa_makecode.Text + "',sysdate,'0',2,'" + pa_prodcode.Text + "',0,'','" + pa_standardqty.Text + "','" + User.UserSourceCode + "','" + User.CurrentStepCode + "')");

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -279,7 +279,7 @@ namespace UAS_MES.Make
                         sql.Clear();
                         sql.Append("select ma_code,ma_prodcode,pr_detail,ma_qty from makeserial left join product ");
                         sql.Append(" on ms_prodcode=pr_code left join make on ms_makecode=ma_code left join ");
-                        sql.Append("makecraftdetail on mcd_macode=ms_makecode where ms_sncode='" + sn_code.Text + "'");
+                        sql.Append("makecraftdetail on mcd_macode=ms_makecode where ms_id='" + oMsid + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         BaseUtil.SetFormValue(this.Controls, dt);
                         OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);

+ 3 - 2
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -149,8 +149,8 @@ namespace UAS_MES.Make
                                     dh.ExecuteSql("update package set pa_makecode='" + carton_macode + "' where pa_outboxcode='" + palletcode.Text + "'", "update");
                                 }
                                 //已箱号过站
-                                LogicHandler.OutBoxStepPass(outboxcode.Text, pa_makecode.Text, User.UserSourceCode,User.UserSourceCode,"栈板采集成功,栈板号:"+palletcode.Text,"栈板采集");
-                                LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,"",User.UserLineCode,User.UserSourceCode,"栈板采集","栈板采集成功",palletcode.Text,"");
+                                LogicHandler.OutBoxStepPass(outboxcode.Text, pa_makecode.Text, User.UserSourceCode, User.UserCode, "栈板采集成功,栈板号:" + palletcode.Text, "栈板采集");
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "栈板采集", "栈板采集成功", palletcode.Text, "");
                                 OperateResult.AppendText(">>箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
                                 LoadGridData();
                             }
@@ -245,6 +245,7 @@ namespace UAS_MES.Make
             if (pa_prodcode.Text != "" && palletcode.Text != "")
             {
                 OperateResult.AppendText(">>" + palletcode.Text + "装栈板成功\n", Color.Black);
+                dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + palletcode.Text + "'", "update");
                 palletcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pa_prodcode.Text, User.UserCode);
                 sql.Clear();
                 sql.Append("insert into package (pa_id,pa_outboxcode,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS,pa_standardqty,pa_sccode,pa_currentstep)values");

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -446,9 +446,9 @@ namespace UAS_MES.Make
                             return;
                         }
                         if (ms_ifrework == "0")
-                            dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep ||'," + User.CurrentStepCode + "',ms_nextstepcode='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_status=1", "ms_id='" + msid + "'");
+                            dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep || case when instr(','||ms_paststep||',','" + User.CurrentStepCode + "')=0 then ','||'" + User.CurrentStepCode + "' end , ms_nextstepcode ='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_status=1", "ms_id='" + msid + "'");
                         else
-                            dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep ||'," + User.CurrentStepCode + "',ms_nextstepcode='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_reworkstatus=1", "ms_id='" + msid + "'");
+                            dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep || case when instr(','||ms_paststep||',','" + User.CurrentStepCode + "')=0 then ','||'" + User.CurrentStepCode + "' end , ms_nextstepcode ='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_reworkstatus=1", "ms_id='" + msid + "'");
                     }
                     dh.UpdateByCondition("makebad", "mb_status=-1", "mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "'");
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ms_makecode.Text, User.UserSourceCode, "回流工序", "完成维修回流", User.UserCode);