| | |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | |
| | | ds = oCN.RunProcReturn("select HInterID from Sc_ProcessExchangeBillSub Where hinterid=" + HProcExchInterID + " and hprocno<" + HProcNo + " order by hprocno", "Sc_ProcessExchangeBillSub"); |
| | | if (ds == null) |
| | | { |
| | | oCN.RollBack(); |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "判断首道工序失败,不允许保存!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //若MAINDI重复则重新获取 |
| | | oCN.BeginTran(); |
| | | |
| | |
| | | |
| | | } |
| | | oCN.Commit(); |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.MES_StationInBill_SaveAutoAddnew == "Y") //系统参数 自动审核 |
| | | { |
| | | objJsonResult.Verify = "Y"; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "新增单据成功!"; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 返回委外工序接收单列表 |
| | | #region 返回工序进站接收单列表 |
| | | [Route("Cj_StationInBill/get_Display")] |
| | | [HttpGet] |
| | | public object get_Display(string sWhere) |
| | |
| | | ds1 = oCN.RunProcReturn("select HLastProc,HFstProc " + |
| | | " from Sc_ProcessExchangeBillMain a " + |
| | | " inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID " + |
| | | " Where a.HInterID=(Select HProcExchInterID from Sc_StationInBillMain Where HInterID=55) " + |
| | | " and b.HEntryID=(Select HProcExchEntryID from Sc_StationInBillMain Where HInterID=55)", "Sc_ProcessExchangeBillMain"); |
| | | " Where a.HInterID=(Select HProcExchInterID from Sc_StationInBillMain Where HInterID="+ lngBillKey + ") " + |
| | | " and b.HEntryID=(Select HProcExchEntryID from Sc_StationInBillMain Where HInterID="+ lngBillKey + ")", "Sc_ProcessExchangeBillMain"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | |
| | | ds1 = oCN.RunProcReturn("select HLastProc,HFstProc " + |
| | | " from Sc_ProcessExchangeBillMain a " + |
| | | " inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID " + |
| | | " Where a.HInterID=(Select HProcExchInterID from Sc_StationInBillMain Where HInterID=55) " + |
| | | " and b.HEntryID=(Select HProcExchEntryID from Sc_StationInBillMain Where HInterID=55)", "Sc_ProcessExchangeBillMain"); |
| | | " Where a.HInterID=(Select HProcExchInterID from Sc_StationInBillMain Where HInterID="+ lngBillKey + ") " + |
| | | " and b.HEntryID=(Select HProcExchEntryID from Sc_StationInBillMain Where HInterID="+ lngBillKey + ")", "Sc_ProcessExchangeBillMain"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 查看工序流转卡关联数量列表加载 |
| | | [Route("Cj_StationInBill/GetStationQtyList")] |
| | | [HttpGet] |
| | | public object GetStationQtyList(string HInterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("execute h_p_Sc_ProcExchBilltransRelationQty @HInterID=" + HInterID, "h_p_Sc_ProcExchBilltransRelationQty"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有你要找的记录!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "返回记录成功!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |