| | |
| | | /WebApi/.idea/.idea.GsMesSolution/.idea |
| | | /WebApi/.vs/GsMesSolution/v17 |
| | | /.vs |
| | | /WebApi/.vs/GsMesSolution/CopilotIndices/17.14.1091.29919 |
| | |
| | | m = dr.RowToDynamic(); |
| | | var _tb = dset.Tables[1].TableToDynamicList(); |
| | | m.list = _tb; |
| | | |
| | | |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 选择弹窗 |
| | | /// 销售出库时,选择销售订单 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 读取列表,支持分页 |
| | | /// 选择销售退货申请明细,有源单据,销售出库单 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | |
| | | int everyPageSize = model.everyPageSize; |
| | | string sortName = model.sortName; |
| | | string keyWhere = model.keyWhere; |
| | | string keyType = model.keyType;//这是销售订单号 |
| | | string inP1 = model.inP1;//这是客户id |
| | | string inP2 = model.inP2;//这是销售组织id |
| | | var dset = new DataSet(); |
| | | try |
| | | { |
| | |
| | | new("@inSortName", sortName), |
| | | new("@inSortOrder", ""), |
| | | new("@inQueryWhere", keyWhere), |
| | | new("@inP1",keyType),//这是销售订单号 |
| | | new("@inP2", "") |
| | | new("@inP1",inP1), |
| | | new("@inP2", inP2) |
| | | }; |
| | | foreach (var parameter in parameters) |
| | | cmd.Parameters.Add(parameter); |
| | |
| | | return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, |
| | | ReturnCode.Success, "读取成功"); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 选择销售退货申请明细,有源单据,销售单 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<PageList<dynamic>> SelectFormFhMxSales([FromBody] dynamic model) |
| | | { |
| | | int currentPage = model.currentPage; |
| | | int everyPageSize = model.everyPageSize; |
| | | string sortName = model.sortName; |
| | | string keyWhere = model.keyWhere; |
| | | string inP1 = model.inP1;//这是客户id |
| | | string inP2 = model.inP2;//这是销售组织id |
| | | var dset = new DataSet(); |
| | | try |
| | | { |
| | | using (var conn = new SqlConnection(DbHelperSQL.strConn)) |
| | | { |
| | | using (var cmd = new SqlCommand("[select_salesFhMxSales]", conn)) |
| | | { |
| | | conn.Open(); |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | SqlParameter[] parameters = |
| | | { |
| | | new("@inCurrentPage", currentPage), |
| | | new("@inEveryPageSize", everyPageSize), |
| | | new("@inSortName", sortName), |
| | | new("@inSortOrder", ""), |
| | | new("@inQueryWhere", keyWhere), |
| | | new("@inP1",inP1), |
| | | new("@inP2", inP2) |
| | | }; |
| | | foreach (var parameter in parameters) |
| | | cmd.Parameters.Add(parameter); |
| | | using (var dt = new SqlDataAdapter(cmd)) |
| | | { |
| | | dt.Fill(dset, "0"); |
| | | } |
| | | } |
| | | conn.Close(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Debug(ToString(), "select_salesFhMxSales error:" + ex.Message); |
| | | return ReturnDto<PageList<dynamic>>.QuickReturn(default(PageList<dynamic>), ReturnCode.Exception, "读取失败"); |
| | | } |
| | | |
| | | var _pglist = new PageList<dynamic> |
| | | { |
| | | total = 0, |
| | | everyPageSize = 0, |
| | | pages = 0, |
| | | list = new List<dynamic>() |
| | | }; |
| | | if (dset != null && dset.Tables.Count > 0 && |
| | | dset.Tables[0].Rows.Count > 0) //有数据 |
| | | { |
| | | var intTotal = |
| | | int.Parse(dset.Tables[1].Rows[0]["intTotal"].ToString()); |
| | | var pages = intTotal % everyPageSize != 0 |
| | | ? intTotal / everyPageSize + 1 |
| | | : intTotal / everyPageSize; |
| | | _pglist.total = intTotal; |
| | | _pglist.everyPageSize = everyPageSize; |
| | | _pglist.pages = pages; |
| | | var _dy = dset.Tables[0].TableToDynamicList(); |
| | | _pglist.list = _dy; |
| | | } |
| | | |
| | | return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, |
| | | ReturnCode.Success, "读取成功"); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | Guid? guid = model.guid; //主键 |
| | | string djlx = model.djlx;//单据类型 |
| | | string salesId = model.salesId;//销售单号 |
| | | string inRemark = model.inRemark;//备注 |
| | | string ckId = model.ckId; |
| | | string FIsLink = model.FIsLink; |
| | | string fIsLink = model.fIsLink; |
| | | string fHasLinkSource=model.fHasLinkSource; |
| | | //下面是无源的 |
| | | string salesOrg = model.salesOrg; |
| | | string inventoryOrg = model.inventoryOrg; |
| | | string returnCustomer = model.returnCustomer; |
| | | string salesDept = model.salesDept; |
| | | var _sb = new StringBuilder(); |
| | | var _split = "|"; |
| | | foreach (var m in model.list) |
| | |
| | | + m.Bz + _split |
| | | + m.Thlx + _split |
| | | + m.Thrq + _split |
| | | + m.ItemId + _split |
| | | + (CheckGuid(_guid) ? _guid : Guid.Empty.ToString()); |
| | | if (_sb.Length > 0) |
| | | _sb.Append("~"); |
| | |
| | | new("@outNo", SqlDbType.NVarChar, 300), |
| | | new("@inOrderGuid",UtilityHelper.CheckGuid(guid)? guid : DBNull.Value), |
| | | new("@djlx", djlx), |
| | | new("@salesId", salesId), |
| | | new("@inRemark", inRemark), |
| | | new("@ckId", ckId), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@FIsLink", FIsLink), |
| | | new("@fIsLink", fIsLink), |
| | | new("@fHasLinkSource", fHasLinkSource), |
| | | new("@salesOrg", salesOrg), |
| | | new("@inventoryOrg", inventoryOrg), |
| | | new("@returnCustomer", returnCustomer), |
| | | new("@salesDept", salesDept), |
| | | new("@inLineList", _sb.ToString()) |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Debug(ToString(), |
| | | "prc_salesDeliver_edt error:" + ex.Message); |
| | | "prc_salesReturn_edt error:" + ex.Message); |
| | | mObj.outMsg = ex.Message; |
| | | mObj.outSum = -1; |
| | | } |