| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using static Gs.Toolbox.UtilityHelper; |
| | | |
| | | namespace Gs.Sales; |
| | | |
| | | namespace Gs.Sales |
| | | { |
| | | [ApiGroup(ApiGroupNames.XS)] |
| | | public class SalesReturnManager : IRomteService |
| | | { |
| | |
| | | }; |
| | | try |
| | | { |
| | | dset = DbHelperSQL.RunProcedure("prc_salesReturn_lst", parameters, |
| | | "0"); |
| | | dset = DbHelperSQL.RunProcedure("prc_salesReturn_lst", parameters, "0"); |
| | | if (dset != null && dset.Tables.Count > 0 && |
| | | dset.Tables[0].Rows.Count > 0) //有数据 |
| | | { |
| | |
| | | var dset = new DataSet(); |
| | | try |
| | | { |
| | | dset = DbHelperSQL.RunProcedure("[prc_salesReturn_mx]", parameters, |
| | | "0"); |
| | | dset = DbHelperSQL.RunProcedure("[prc_salesReturn_mx]", parameters, "0"); |
| | | if (dset != null && dset.Tables.Count > 0 && |
| | | dset.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | { |
| | | 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 fHasLinkSource = model.fHasLinkSource; |
| | | //下面是无源的 |
| | | string salesOrg = model.salesOrg; |
| | | string inventoryOrg = model.inventoryOrg; |
| | | string returnCustomer = model.returnCustomer; |
| | | string salesDept = model.salesDept; |
| | | string FIsLink = model.FIsLink; |
| | | 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()); |
| | | + (CheckGuid(_guid) ? _guid : Guid.Empty.ToString()); |
| | | if (_sb.Length > 0) |
| | | _sb.Append("~"); |
| | | _sb.Append(_line); |
| | | } |
| | | |
| | | dynamic mObj = new ExpandoObject(); |
| | | mObj.outMsg = ""; |
| | | mObj.outSum = -1; |
| | |
| | | new("@outSum", SqlDbType.Int), |
| | | new("@outGuid", SqlDbType.UniqueIdentifier), |
| | | new("@outNo", SqlDbType.NVarChar, 300), |
| | | new("@inOrderGuid", |
| | | CheckGuid(guid) ? guid : DBNull.Value), |
| | | 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("@fHasLinkSource", fHasLinkSource), |
| | | new("@salesOrg", salesOrg), |
| | | new("@inventoryOrg", inventoryOrg), |
| | | new("@returnCustomer", returnCustomer), |
| | | new("@salesDept", salesDept), |
| | | new("@FIsLink", FIsLink), |
| | | new("@inLineList", _sb.ToString()) |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Debug(ToString(), |
| | | "prc_salesReturn_edt error:" + ex.Message); |
| | | "prc_salesDeliver_edt error:" + ex.Message); |
| | | mObj.outMsg = ex.Message; |
| | | mObj.outSum = -1; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (mObj.outSum <= 0) |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Exception, |
| | | mObj.outMsg); |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Success, |
| | | mObj.outMsg); |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Exception, mObj.outMsg); |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Success, mObj.outMsg); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Debug(ToString(), |
| | | "prc_salesDeliver_submit:" + ex.Message); |
| | | LogHelper.Debug(ToString(), "prc_salesDeliver_submit:" + ex.Message); |
| | | m.outMsg = ex.Message; |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Default, |
| | | ex.Message); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Success, "操作成功!"); |
| | | } |
| | | } |
| | | } |