| | |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | |
| | | //oCn.BeginTran(); //开始事物 |
| | | oCn.BeginTran(); //开始事物 |
| | | |
| | | if (HOpType.ToString() == "edit"/*oBill.omodel.HInterID != 0 && oBill.omodel.HInterID.ToString() != null && oBill.omodel.HInterID.ToString() != "undefined"*/) |
| | | { |
| | |
| | | } |
| | | if (bResult) |
| | | { |
| | | //oCn.Commit(); //提交事物 |
| | | oCn.Commit(); //提交事物 |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | else |
| | | { |
| | | //oCn.RollBack(); //回滚事物 |
| | | oCn.RollBack(); //回滚事物 |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | //oCn.RollBack(); //回滚事物 |
| | | oCn.RollBack(); //回滚事物 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + e.ToString(); |
| | |
| | | /// <returns></returns> |
| | | public object TestSaverPOInStock(string ids, string entryids) |
| | | { |
| | | //List<string> mylist = new List<string>(ids.Split(','));//.Distinct() |
| | | //List<string> entryList = new List<string>(entryids.Split(','));//.Distinct() |
| | | List<string> mylist = new List<string>(ids.Split(',').Distinct()); |
| | | List<string> entryList = new List<string>(entryids.Split(',').Distinct()); |
| | | List<string> mylist = new List<string>(ids.Split(','));//.Distinct() |
| | | List<string> entryList = new List<string>(entryids.Split(','));//.Distinct() |
| | | //List<string> mylist = new List<string>(ids.Split(',').Distinct()); |
| | | //List<string> entryList = new List<string>(entryids.Split(',').Distinct()); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (FCusName == "夏宝电器" && mylist.Count > 1) |
| | |
| | | objJsonResult = TestPOOrder(entryids); |
| | | if (objJsonResult.code == "0") |
| | | return objJsonResult; |
| | | |
| | | //if (mylist.Count != entryList.Count) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "主内码与子内码数量不一致!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | if (mylist.Count != entryList.Count) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "主内码与子内码数量不一致!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | for (int i = 0;i < mylist.Count;i++) |
| | | { |
| | | //采购订单下推生成送货单前控制 |
| | |
| | | |
| | | //判断未关联数量是否为0 |
| | | //安瑞:AIS20220914133941 瑞与琪:AIS20220308151944 本地:AIS20210811135644 夏宝:srv_lnk.AIS20211130140219.dbo. 凯贝:AIS20210820164804 添康:AIS20240809105013 |
| | | DataSet ds = oCn.RunProcReturn($"select T1.hqty-T1.hrelationqty+q.FMRBQTY as hqty,q.FRemainReceiveQty as 剩余收料数量,T1.hrelationqty as 已发货数量,T1.hqty as 订单数量,单据号,物料编码 from H_v_SRM_POOrderBillList t1 left join srv_lnk.AIS20211130140219.dbo.T_PUR_POORDERENTRY_R q on q.FENTRYID=t1.HEntryID where hentryid in ({string.Join(", ", entryList)})", "H_v_SRM_POOrderBillList"); |
| | | //DataSet ds = oCn.RunProcReturn($"select T1.hqty-T1.hrelationqty+q.FMRBQTY as hqty,q.FRemainReceiveQty as 剩余收料数量,T1.hrelationqty as 已发货数量,T1.hqty as 订单数量,单据号,物料编码 from H_v_SRM_POOrderBillList t1 left join AIS20210811135644..T_PUR_POORDERENTRY_R q on q.FENTRYID=t1.HEntryID where hentryid in ({string.Join(", ", entryList)})", "H_v_SRM_POOrderBillList"); |
| | | |
| | | var kdTbaleName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DataBaseName"); |
| | | |
| | | string sql2 = string.Format(@"select T1.hqty - T1.hrelationqty + q.FMRBQTY as hqty, q.FRemainReceiveQty as 剩余收料数量, T1.hrelationqty as 已发货数量, T1.hqty as 订单数量, 单据号, 物料编码 from H_v_SRM_POOrderBillList t1 left join {0}..T_PUR_POORDERENTRY_R q on q.FENTRYID = t1.HEntryID where hentryid in ({1})", kdTbaleName, string.Join(", ", entryList)); |
| | | |
| | | DataSet ds = oCn.RunProcReturn(sql2, "H_v_SRM_POOrderBillList"); |
| | | |
| | | DataTable dt = ds.Tables[0]; |
| | | if (dt.Rows.Count > 0) |
| | | { |