| | |
| | | oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'"); |
| | | |
| | | //修改出站单的 不良 报废数量 |
| | | if (HResult == "不良") { |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid); |
| | | if (HResult == "不良" && (oSub.HBadTypeID == 3 || oSub.HBadTypeID == 4 || oSub.HBadTypeID == 6)) |
| | | { |
| | | //工废 |
| | | if (oSub.HBadTypeID == 3) |
| | | { |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HWasterQty_Work+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid); |
| | | }//料废 |
| | | else if (oSub.HBadTypeID == 4) |
| | | { |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HWasterQty_Mater+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid); |
| | | }//返工 |
| | | else if (oSub.HBadTypeID == 6) |
| | | { |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HBackWorkQty+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid); |
| | | } |
| | | |
| | | } |
| | | else if (HResult == "报废") |
| | | { |
| | |
| | | if (dataSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | string HOutInterID = dataSet.Tables[0].Rows[0][0].ToString(); |
| | | |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1 where HInterID='" + HOutInterID + "'"); |
| | | //斯莫尔的情况 分 工废料废 返工 |
| | | //工废 |
| | | if (subLsit[0].HBadTypeID == 3) |
| | | { |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1,HWasterQty_Work-=1 where HInterID='" + HOutInterID + "'"); |
| | | }//料废 |
| | | else if (subLsit[0].HBadTypeID == 4) |
| | | { |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1,HWasterQty_Mater-=1 where HInterID='" + HOutInterID + "'"); |
| | | }//返工 |
| | | else if (subLsit[0].HBadTypeID == 6) |
| | | { |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1,HBackWorkQty-=1 where HInterID='" + HOutInterID + "'"); |
| | | } |
| | | } |
| | | else |
| | | { |