| | |
| | | double HMoney = 0; |
| | | double HBadCount = list[0].HBadCount;//不良数量 |
| | | long HCenterID = list[0].HCenterID;//工作中心ID |
| | | long HProcNo = list[0].HProcNo;//流水号 |
| | | string HProcNo = list[0].HProcNo;//流水号 |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订单跟踪号 |
| | | string HSourceNameList = list[0].HSourceNameList;//设备清单 |
| | | long HMainSourceInterID = list[0].HInterID;//递入type得到的单据ID |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcNo <= 0) |
| | | if (HProcNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //if (HWorkTimes <= 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | var num = 0; |
| | | |
| | | //若MAINDI重复则重新获取 |
| | | oCN.BeginTran(); |
| | | if ("Add".Equals(eventType)) |
| | | { |
| | | num = 1; |
| | | if (!AllowbillNo(HBillNo)) |
| | | { |
| | | oCN.RollBack(); |
| | |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | | { |
| | | num = 2; |
| | | oCN.RunProc("UpDate Sc_StationOutBillMain set " + |
| | | "HUpDater='" + HMaker + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID + ",1"); |
| | | oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID + ","+ num + ""); |
| | | oCN.RunProc("exec h_p_Mes_ProcessExchangeChangeStatus " + HInterID + " "); |
| | | oCN.RunProc("exec h_p_Mes_StationOutBillBackBarCode " + HInterID + " "); |
| | | //判断是否是 末道工序 |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | |
| | | bool bResult; |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.RunProc($"update Sc_StationOutBillMain set HMaker='{msg4}' where HInterID={oBill.omodel.HInterID}"); |
| | | i++; |
| | | //if (bResult) |
| | | //{ |