|  |  |  | 
|---|
|  |  |  | //反序列化传递的值 | 
|---|
|  |  |  | ComplementGoods com = JsonConvert.DeserializeObject<ComplementGoods>(sWhere.ToString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoodsBillList_Query '{com.MaterialNumber}','{com.MaterialName}','{com.MaterialModel}','{com.HGD}'," + | 
|---|
|  |  |  | $"'{com.HWHName}','{com.HDeptName}','{com.Organization}','{com.user}','{com.HJLStatus}','{com.HBeginDate}','{com.HEndDate}'" ,"h_p_JIT_ComplementGoodsBillList_Query"); | 
|---|
|  |  |  | $"'{com.HWHName}','{com.HDeptName}','{com.Organization}','{com.user}','{com.HJLStatus}','{com.HBeginDate}','{com.HEndDate}'", "h_p_JIT_ComplementGoodsBillList_Query"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult.code = "1"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | 
|---|
|  |  |  | #region 拣料配送单 删除 | 
|---|
|  |  |  | [Route("Sc_ComplementGoods/DelComplementGoodsList")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object DelComplementGoodsList(string HInterID, string HEntryID,string HOrgID, string user) | 
|---|
|  |  |  | public object DelComplementGoodsList(string HInterID, string HEntryID, string HOrgID, string user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn($"select HISCheck from JIT_SendGoodsBillMain where HMainSourceInterID={HInterID} ", "JIT_SendGoodsBillMain"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (ds.Tables[0].Rows.Count>0) | 
|---|
|  |  |  | if (ds.Tables[0].Rows.Count > 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #region 仓库发料 | 
|---|
|  |  |  | //参数 | 
|---|
|  |  |  | public class SendGoodsBill { | 
|---|
|  |  |  | public class SendGoodsBill | 
|---|
|  |  |  | { | 
|---|
|  |  |  | public int? 未拣料数量 = 0; | 
|---|
|  |  |  | public int? 最大拣料数量 = 0; | 
|---|
|  |  |  | public int? 本次拣料数量 = 0; | 
|---|
|  |  |  | 
|---|
|  |  |  | public int? HMaterID = 0; | 
|---|
|  |  |  | public int? HWHID = 0; | 
|---|
|  |  |  | public int? HSPID = 0; | 
|---|
|  |  |  | public int? HStockOutOrgID = 0; | 
|---|
|  |  |  | public int? HStockInOrgID = 0; | 
|---|
|  |  |  | public int? HSCWHID = 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | [Route("Sc_ComplementGoods/JIT_SendGoodsBill")] | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | bool flag = false; | 
|---|
|  |  |  | flag = AddSendGoodsBill(listCa, SourceInterID, SourceBillNo, user, ref DBUtility.ClsPub.sExeReturnInfo); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult = AddSendGoodsBill(listCa, SourceInterID, SourceBillNo, user); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (flag) | 
|---|
|  |  |  | if (objJsonResult.count==1) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "1"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = "配送成功!"; | 
|---|
|  |  |  | objJsonResult.Message = "调拨单生成成功!"; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "配送失败!"; | 
|---|
|  |  |  | objJsonResult.Message = objJsonResult.Message; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //新增 | 
|---|
|  |  |  | public bool AddSendGoodsBill(List<SendGoodsBill> listCa, string SourceInterID, string SourceBillNo, string user, ref string sReturn) | 
|---|
|  |  |  | public json AddSendGoodsBill(List<SendGoodsBill> listCa, string SourceInterID, string SourceBillNo, string user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | oCN.BeginTran(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | oCN.RunProc($"delete from JIT_SendGoodsBillMain where HMainSourceInterID={SourceInterID} and HMainSourceBillNo='{SourceBillNo}'"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | oCN.RunProc($"delete from JIT_SendGoodsBillSub where HInterID in (select HInterID from JIT_SendGoodsBillMain where HMainSourceInterID={SourceInterID} and HMainSourceBillNo='{SourceBillNo}')"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | long InterID = 0; | 
|---|
|  |  |  | string HBillNo = ""; | 
|---|
|  |  |  | for (int i = 0; i < listCa.Count; i++) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | long InterID = DBUtility.ClsPub.CreateBillID_Prod("460201", ref DBUtility.ClsPub.sExeReturnInfo); | 
|---|
|  |  |  | string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("460201", ref DBUtility.ClsPub.sExeReturnInfo, true); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (i == 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | InterID = DBUtility.ClsPub.CreateBillID_Prod("460201", ref DBUtility.ClsPub.sExeReturnInfo); | 
|---|
|  |  |  | HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("460201", ref DBUtility.ClsPub.sExeReturnInfo, true); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //添加主表数据 | 
|---|
|  |  |  | oCN.RunProc("insert into JIT_SendGoodsBillMain(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate" + | 
|---|
|  |  |  | ",HBillNo,HBillStatus,HMaker,HMakeDate,HISCheck, HMainSourceInterID, HMainSourceEntryID" + | 
|---|
|  |  |  | ", HMainSourceBillNo, HMainSourceBillType)" + | 
|---|
|  |  |  | $"values({DateTime.Now.Year},{DateTime.Now.Month},'460201','460201',{InterID}, GETDATE(), '{HBillNo}'," + | 
|---|
|  |  |  | $" 0,'{user}', GETDATE(), 0, {SourceInterID}, {listCa[i].HEntryID}, '{SourceBillNo}', '4602')"); | 
|---|
|  |  |  | //添加主表数据 | 
|---|
|  |  |  | oCN.RunProc("insert into JIT_SendGoodsBillMain(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate" + | 
|---|
|  |  |  | ",HBillNo,HBillStatus,HMaker,HMakeDate,HISCheck, HMainSourceInterID, HMainSourceEntryID" + | 
|---|
|  |  |  | ", HMainSourceBillNo, HMainSourceBillType)" + | 
|---|
|  |  |  | $"values({DateTime.Now.Year},{DateTime.Now.Month},'460201','460201',{InterID}, GETDATE(), '{HBillNo}'," + | 
|---|
|  |  |  | $" 1,'{user}', GETDATE(), 0, {SourceInterID}, {listCa[i].HEntryID}, '{SourceBillNo}', '4602')"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //添加子表数据 | 
|---|
|  |  |  | oCN.RunProc("insert into JIT_SendGoodsBillSub(HInterID,HBillNo_bak,HEntryID" + | 
|---|
|  |  |  | ",HMaterID,HQty,HWHID,HSPID,HISCheck,HCheckSubMan,HCheckSubDate)" + | 
|---|
|  |  |  | $"values({InterID},'{HBillNo}',{i}, {listCa[i].HMaterID},{listCa[i].本次拣料数量}," + | 
|---|
|  |  |  | $" {listCa[i].HWHID},{listCa[i].HSPID},0,'{user}', GETDATE())"); | 
|---|
|  |  |  | //添加子表数据 | 
|---|
|  |  |  | oCN.RunProc("insert into JIT_SendGoodsBillSub(HInterID,HBillNo_bak,HEntryID" + | 
|---|
|  |  |  | ",HMaterID,HQty,HWHID,HSPID,HISCheck,HCheckSubMan,HCheckSubDate,HStockOutOrgID,HStockInOrgID,HSCWHID)" + | 
|---|
|  |  |  | $"values({InterID},'{HBillNo}',{i + 1}, {listCa[i].HMaterID},{listCa[i].本次拣料数量}," + | 
|---|
|  |  |  | $" {listCa[i].HWHID},{listCa[i].HSPID},0,'{user}', GETDATE(),{listCa[i].HStockOutOrgID},{listCa[i].HStockInOrgID},{listCa[i].HSCWHID})"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //修改调拨数量 | 
|---|
|  |  |  | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY={listCa[i].本次拣料数量} where HMaterID={listCa[i].HMaterID} " + | 
|---|
|  |  |  | $" and HSourceInterID=(select top 1 HSourceInterID from JIT_ComplementGoodsBillSub_LK " + | 
|---|
|  |  |  | $"where HMaterID={listCa[i].HMaterID} order by HSourceInterID ) and HInterID={SourceInterID}"); | 
|---|
|  |  |  | DataSet dsTable = new DataSet(); | 
|---|
|  |  |  | //查询JIT_ComplementGoodsBillSub_LK | 
|---|
|  |  |  | dsTable = oCN.RunProcReturn($"select  * from JIT_ComplementGoodsBillSub_LK where HMaterID={listCa[i].HMaterID}  and HInterID={SourceInterID} order by HSourceInterID ", "JIT_ComplementGoodsBillSub_LK"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (int j = 0; j < dsTable.Tables[0].Rows.Count; j++) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) != double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString())) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()) + listCa[i].本次拣料数量 > double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString())) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | var HCallQTY = double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) - double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()); | 
|---|
|  |  |  | //修改调拨数量 超出部分给予下一列数据 | 
|---|
|  |  |  | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{HCallQTY} where HMaterID={listCa[i].HMaterID} " + | 
|---|
|  |  |  | $" and HSourceInterID={double.Parse(dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString())} and HInterID={SourceInterID} "); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{(listCa[i].本次拣料数量 - HCallQTY)} where HMaterID={listCa[i].HMaterID} " + | 
|---|
|  |  |  | $" and HSourceInterID={dsTable.Tables[0].Rows[j + 1]["HSourceInterID"].ToString()} and HInterID={SourceInterID} "); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //修改调拨数量 | 
|---|
|  |  |  | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{listCa[i].本次拣料数量} where HMaterID={listCa[i].HMaterID} " + | 
|---|
|  |  |  | $" and HSourceInterID={dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString()} and HInterID={SourceInterID} "); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | sReturn = "新增单据成功!"; | 
|---|
|  |  |  | //同步金蝶直接调拨单 | 
|---|
|  |  |  | objJsonResult = AddSendGoodsBillSynChronizAtion(HBillNo); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | oCN.Commit(); | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (objJsonResult.count == 1) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "1"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = null; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = objJsonResult.Message; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | catch (Exception e) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | sReturn = e.Message; | 
|---|
|  |  |  | oCN.RollBack(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = e.Message; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | throw (e); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //同步金蝶直接调拨单 | 
|---|
|  |  |  | public json AddSendGoodsBillSynChronizAtion(string HBillNo) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | ds = oCN.RunProcReturn("exec JIT_SendGoodsBillSynChronizAtion '" + HBillNo + "'", "JIT_SendGoodsBillSynChronizAtion"); | 
|---|
|  |  |  | if (ds.Tables[0].Rows.Count != 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | foreach (DataRow dr in ds.Tables[0].Rows) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | JObject model = new JObject(); | 
|---|
|  |  |  | model.Add("FBillTypeID", new JObject() { ["Fnumber"] = dr["FBillTypeID"].ToString() }); //单据类型 | 
|---|
|  |  |  | model.Add("FDate", dr["FDate"].ToString()); | 
|---|
|  |  |  | model.Add("FBILLNO", dr["FBILLNO"].ToString()); | 
|---|
|  |  |  | model.Add("FStockOrgId", new JObject() { ["Fnumber"] = ds.Tables[1].Rows[0]["FStockOrgId"].ToString() }); | 
|---|
|  |  |  | model.Add("FOwnerTypeIdHead", dr["FOwnerTypeIdHead"].ToString()); | 
|---|
|  |  |  | model.Add("FTransferBizType", ds.Tables[1].Rows[0]["FTransferBizType"].ToString()); | 
|---|
|  |  |  | model.Add("FOwnerTypeOutIdHead", dr["FOwnerTypeOutIdHead"].ToString()); | 
|---|
|  |  |  | model.Add("FTransferDirect", dr["FTransferDirect"].ToString()); | 
|---|
|  |  |  | model.Add("FStockOutOrgId", new JObject() { ["Fnumber"] = ds.Tables[1].Rows[0]["FStockOutOrgId"].ToString() }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | JArray Fentity = new JArray(); | 
|---|
|  |  |  | foreach (DataRow item in ds.Tables[1].Rows) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | JObject FentityModel = new JObject(); | 
|---|
|  |  |  | FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = item["FMaterialId"].ToString() }); | 
|---|
|  |  |  | FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = item["FUnitID"].ToString() }); | 
|---|
|  |  |  | FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = item["FBaseUnitId"].ToString() }); | 
|---|
|  |  |  | FentityModel.Add("FOwnerTypeId", item["FOwnerTypeId"].ToString()); | 
|---|
|  |  |  | FentityModel.Add("FOwnerId", new JObject() { ["Fnumber"] = item["FOwnerId"].ToString() }); | 
|---|
|  |  |  | FentityModel.Add("FOwnerTypeOutId", item["FOwnerTypeOutId"].ToString()); | 
|---|
|  |  |  | FentityModel.Add("FOwnerOutId", new JObject() { ["Fnumber"] = item["FOwnerOutId"].ToString() }); | 
|---|
|  |  |  | FentityModel.Add("FKeeperTypeId", item["FKeeperTypeId"].ToString()); | 
|---|
|  |  |  | FentityModel.Add("FKeeperId", new JObject() { ["Fnumber"] = item["FKeeperId"].ToString() }); | 
|---|
|  |  |  | FentityModel.Add("FKeeperTypeOutId", item["FKeeperTypeOutId"].ToString()); | 
|---|
|  |  |  | FentityModel.Add("FKeeperOutId", new JObject() { ["Fnumber"] = item["FKeeperOutId"].ToString() }); | 
|---|
|  |  |  | FentityModel.Add("FDestStockId", new JObject() { ["Fnumber"] = item["FDestStockId"].ToString() }); | 
|---|
|  |  |  | FentityModel.Add("FSrcStockId", new JObject() { ["Fnumber"] = item["FSrcStockId"].ToString() }); | 
|---|
|  |  |  | FentityModel.Add("FQty", item["FQty"].ToString()); | 
|---|
|  |  |  | Fentity.Add(FentityModel); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | model.Add("FBillEntry", Fentity); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | JObject jsonRoot = new JObject() | 
|---|
|  |  |  | { | 
|---|
|  |  |  | ["Creator"] = "", | 
|---|
|  |  |  | ["NeedUpDateFields"] = new JArray(), | 
|---|
|  |  |  | ["NeedReturnFields"] = new JArray(), | 
|---|
|  |  |  | ["IsDeleteEntry"] = "false", | 
|---|
|  |  |  | ["SubSystemId"] = "", | 
|---|
|  |  |  | ["IsVerifyBaseDataField"] = "false", | 
|---|
|  |  |  | ["Model"] = model | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | var loginRet = InvokeHelper.Login(); | 
|---|
|  |  |  | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); | 
|---|
|  |  |  | if (isSuccess < 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = loginRet; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var result = InvokeHelper.Save("STK_TransferDirect", jsonRoot.ToString()); | 
|---|
|  |  |  | if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "1"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = null; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = result; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "调拨单已经存在,无法生成!"; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = null; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #endregion | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #region 上查 | 
|---|
|  |  |  | [Route("Sc_ComplementGoods/ComplementGoodsList_Sc")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object ComplementGoodsList_Sc(string HInterID,string HEntryID) | 
|---|
|  |  |  | public object ComplementGoodsList_Sc(string HInterID, string HMaterID) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoodsBillList_UpQuery '{HInterID}',{HEntryID}", "h_p_JIT_ComplementGoodsBillList_UpQuery"); | 
|---|
|  |  |  | ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoodsBillList_UpQuery '{HInterID}',{HMaterID}", "h_p_JIT_ComplementGoodsBillList_UpQuery"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult.code = "1"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = "Sucess!"; | 
|---|
|  |  |  | objJsonResult.data = ds.Tables[0]; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | catch (Exception e) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "Exception!" + e.ToString(); | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #endregion | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #region 下查 | 
|---|
|  |  |  | [Route("Sc_ComplementGoods/JIT_SendGoodsBillList_Xc")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object JIT_SendGoodsBillList_Xc(string HInterID, string HMaterID) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoodsBillList_DownQuery '{HInterID}',{HMaterID}", "h_p_JIT_ComplementGoodsBillList_DownQuery"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult.code = "1"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|