| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using static Gs.Toolbox.UtilityHelper; |
| | | |
| | | namespace Gs.Warehouse.Services; |
| | | namespace Gs.Sales; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 销售出库通知 |
| | | /// 销售出库通知 |
| | | /// </summary> |
| | | [ApiGroup(ApiGroupNames.XS)] |
| | | public class SalesDeliverManager : IRomteService |
| | |
| | | }; |
| | | try |
| | | { |
| | | dset = DbHelperSQL.RunProcedure("prc_salesDeliver_lst", parameters, |
| | | "0"); |
| | | dset = DbHelperSQL.RunProcedure("prc_salesDeliver_lst", parameters, "0"); |
| | | if (dset != null && dset.Tables.Count > 0 && |
| | | dset.Tables[0].Rows.Count > 0) //有数据 |
| | | { |
| | |
| | | { |
| | | LogHelper.Debug(ToString(), ex.Message); |
| | | return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, |
| | | ReturnCode.Exception, ex.Message); |
| | | ReturnCode.Exception, ex.Message); |
| | | } |
| | | |
| | | return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, |
| | |
| | | var dset = new DataSet(); |
| | | try |
| | | { |
| | | dset = DbHelperSQL.RunProcedure("[prc_salesDeliver_mx]", parameters, |
| | | "0"); |
| | | dset = DbHelperSQL.RunProcedure("[prc_salesDeliver_mx]", parameters, "0"); |
| | | if (dset != null && dset.Tables.Count > 0 && |
| | | dset.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | public ReturnDto<ExpandoObject> EditModel([FromBody] dynamic model) |
| | | { |
| | | Guid? guid = model.guid; //主键 |
| | | string djlx = model.djlx; //单据类型 |
| | | string salesId = model.salesId; //销售单号 |
| | | string inRemark = model.inRemark; //备注 |
| | | string djlx = model.djlx;//单据类型 |
| | | string salesId = model.salesId;//销售单号 |
| | | string inRemark = model.inRemark;//备注 |
| | | var _sb = new StringBuilder(); |
| | | var _split = "|"; |
| | | foreach (var m in model.list) |
| | | { |
| | | string _guid = m.Guid.ToString(); |
| | | var _line = m.SalesDetailId + _split |
| | | + m.Sqsl + _split |
| | | + m.Bz + _split |
| | | + m.Yjsj + _split |
| | | + (CheckGuid(_guid) |
| | | ? _guid |
| | | : Guid.Empty.ToString()); |
| | | + m.Sqsl + _split |
| | | + m.Bz + _split |
| | | + m.Yjsj + _split |
| | | + (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("@inEdtUserGuid", _userGuid), |
| | | new("@inLineList", _sb.ToString()) |
| | | }; |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | | parameters[1].Direction = ParameterDirection.Output; |
| | | parameters[2].Direction = ParameterDirection.Output; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | 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); |
| | | } |
| | | |
| | | |
| | |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | SqlParameter[] parameters = |
| | | { |
| | | new("@outMsg", SqlDbType.NVarChar, 300), |
| | | new("@outMsg", SqlDbType.NVarChar, 300), |
| | | new("@outSum", SqlDbType.Int), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@inOrderGuid", _guid), |
| | |
| | | } |
| | | 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, "操作成功!"); |
| | | } |
| | | } |