Browse Source

BUG修改

callm 4 weeks ago
parent
commit
8e1f5fa2c7

+ 3 - 0
UAS_MES_YDCY/FunctionCode/OQC/OQC_PlanMaintain_Cust.cs

@@ -216,7 +216,10 @@ namespace UAS_MES_NEW.OQC
                     else
                     {
                         dh.ExecuteSql("delete from makeserial where ms_id='" + oMSID + "'", "delete");
+                        dh.ExecuteSql("update make set ma_inqty=ma_inqty-1 where ma_code='" + oMakeCode + "'", "update");
+                        dh.ExecuteSql("update craftmaterial set cm_status=-1 where cm_sncode='" + ms_sncode.Text + "' and cm_makecode='" + oMakeCode + "'", "update");
                         dh.ExecuteSql("delete from steppassed where sp_sncode='" + ms_sncode.Text + "' and sp_makecode='" + oMakeCode + "'", "delete");
+                        dh.ExecuteSql("update makecraftdetail set mcd_inqty=mcd_inqty-1,mcd_outqty=mcd_outqty-1,mcd_okqty=mcd_okqty-1 where mcd_macode='" + oMakeCode + "' and instr((select ms_paststep from makeserial where ms_id='" + oMSID + "'),mcd_stepcode)>0 ", "update");
                         dt = (DataTable)dh.ExecuteSql("select ms_id,ms_craftcode,ms_prodcode,ms_makecode from makeserial where ms_sncode='" + ms_sncode.Text + "' order by ms_id", "select");
                         if (dt.Rows.Count > 0)
                         {

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Packing/Packing_PalletWightCollection.cs

@@ -150,7 +150,7 @@ namespace UAS_MES_NEW.Packing
                     }
                     //根据箱号查询表单数据
                     sql.Clear();
-                    sql.Append("select pr_palletminweight,pr_palletmaxweight,pa_totalqty,ma_code,ma_qty,ma_salecode,pa_prodcode,PA_STANDARDQTY PA_STANDARDQTYCARTON,PA_CURRENTQTY,pr_detail,pr_cartonunit,pr_code,pr_palletweight,");
+                    sql.Append("select pr_palletminweight,pr_palletmaxweight,pa_totalqty,ma_code pa_makecode,ma_qty,ma_salecode,pa_prodcode,PA_STANDARDQTY PA_STANDARDQTYCARTON,PA_CURRENTQTY,pr_detail,pr_cartonunit,pr_code,pr_palletweight,");
                     sql.Append("pr_cartonmaxw,pr_cartonminw,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype from package left join packagedetail ");
                     sql.Append("on pa_id=pd_paid left join makeserial on ms_sncode=pd_barcode and ms_makecode=pa_makecode left join product on pr_code=pd_prodcode left join make on ma_code=pd_makecode ");
                     sql.Append(" where pa_outboxcode='" + outboxcode.Text + "' and pa_nextstep='" + User.CurrentStepCode + "'");