| | |
| | | { |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | DataSet ds; |
| | | |
| | | #region 工序单品不良采集 用户查询关联字段 |
| | |
| | | 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 == "不良") |
| | | { |
| | | LogService.Write("类型:" + oSub.HBadTypeID); |
| | | //工废 |
| | | 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 == "报废") |
| | | { |
| | |
| | | HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString(); |
| | | } |
| | | |
| | | //判断当前流转卡是否是开工 |
| | | ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0'", "Sc_ICMOBillStatus_Tmp"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | |
| | | |
| | | //客户制定 |
| | | string sErr = ""; |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "卡号:" + HBarCode + ",流转卡未开工!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") |
| | | { |
| | | //判断当前流转卡是否是开工 |
| | | ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0'", "Sc_ICMOBillStatus_Tmp"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "卡号:" + HBarCode + ",流转卡未开工!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | ds = oCN.RunProcReturn(@"exec h_p_Gy_BarCodeBillBomList '" + HBarCode + "'," + HProcID, "h_p_Gy_BarCodeBillBomList"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | |
| | | 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 |
| | | { |