| | |
| | | using Masuit.Tools; |
| | | using MES.Service.Modes; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using Masuit.Tools; |
| | | using NewPdaSqlServer.DB; |
| | | using NewPdaSqlServer.Dto.service; |
| | | using NewPdaSqlServer.entity; |
| | | using NewPdaSqlServer.entity.Base; |
| | | using NewPdaSqlServer.util; |
| | | using OracleInternal.Sharding; |
| | | using SqlSugar; |
| | | using SqlSugar.Extensions; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | |
| | | namespace NewPdaSqlServer.service.Warehouse; |
| | | |
| | |
| | | /// 获取销售退货申请列表 |
| | | /// </summary> |
| | | /// <returns>销售退货申请列表</returns> |
| | | public dynamic GetXsthBillNo(WarehouseQuery query,dynamic RequestInfo) |
| | | public dynamic GetXsthBillNo(WarehouseQuery query, dynamic RequestInfo) |
| | | { |
| | | var orgId = RequestInfo.OrgId; |
| | | |
| | |
| | | // 获取未完成的退料单号列表 |
| | | var parameters = new[] |
| | | { |
| | | new SugarParameter("@pi_orgId", orgId), |
| | | new SugarParameter("@inP1", null), |
| | | new SugarParameter("@inP2", null), |
| | | new SugarParameter("@inP3", null), |
| | | new SugarParameter("@inP4", null) |
| | | new SugarParameter("@pi_orgId", orgId), |
| | | new SugarParameter("@inP1", null), |
| | | new SugarParameter("@inP2", null), |
| | | new SugarParameter("@inP3", null), |
| | | new SugarParameter("@inP4", null) |
| | | }; |
| | | try |
| | | { |
| | | // 返回单号字符串列表 |
| | | var blDetails = Db.Ado.SqlQuery<string>( |
| | | "EXEC prc_pda_xsth_list @pi_orgId,@inP1,@inP2,@inP3,@inP4", parameters); |
| | | "EXEC prc_pda_xsth_list @pi_orgId,@inP1,@inP2,@inP3,@inP4", |
| | | parameters); |
| | | return blDetails; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | |
| | | // 获取未完成的销售退货明细 |
| | | var parameters = new[] |
| | | { |
| | | new SugarParameter("@billNo", query.billNo), |
| | | new SugarParameter("@pi_orgId",orgId), |
| | | new SugarParameter("@inP1", null), |
| | | new SugarParameter("@inP2", null), |
| | | new SugarParameter("@inP3", null), |
| | | new SugarParameter("@inP4", null) |
| | | }; |
| | | { |
| | | new SugarParameter("@billNo", query.billNo), |
| | | new SugarParameter("@pi_orgId", orgId), |
| | | new SugarParameter("@inP1", null), |
| | | new SugarParameter("@inP2", null), |
| | | new SugarParameter("@inP3", null), |
| | | new SugarParameter("@inP4", null) |
| | | }; |
| | | try |
| | | { |
| | | List<dynamic>? blDetails = Db.Ado.SqlQuery<dynamic>( |
| | | "EXEC prc_pda_xsth_detailList @billNo,@pi_orgId,@inP1,@inP2,@inP3,@inP4", parameters); |
| | | var items = blDetails.Where(x => x.DSQty > 0).ToList(); // 待扫物料 |
| | | var ysitems = blDetails.Where(x => x.SQty > 0).ToList(); // 已扫物料 |
| | | var blDetails = Db.Ado.SqlQuery<dynamic>( |
| | | "EXEC prc_pda_xsth_detailList @billNo,@pi_orgId,@inP1,@inP2,@inP3,@inP4", |
| | | parameters); |
| | | var items = blDetails.Where(x => x.DSQty > 0).ToList(); // 待扫物料 |
| | | var ysitems = blDetails.Where(x => x.SQty > 0).ToList(); // 已扫物料 |
| | | return new |
| | | { |
| | | items = items, |
| | | ysitems = ysitems, |
| | | items, |
| | | ysitems, |
| | | Count = items.Count + ysitems.Count |
| | | }; |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 销售退货入库 |
| | | /// 销售退货入库 |
| | | /// </summary> |
| | | /// <param name="unity"></param> |
| | | /// <returns></returns> |
| | |
| | | using (var conn = new SqlConnection(DbHelperSQL.strConn)) |
| | | { |
| | | if (unity.userName.IsNullOrEmpty()) throw new Exception("用户名不允许为空"); |
| | | if (unity.sectionCode.IsNullOrEmpty()) throw new Exception("库位编号不允许为空"); |
| | | if (unity.sectionCode.IsNullOrEmpty()) |
| | | throw new Exception("库位编号不允许为空"); |
| | | if (unity.barcode.IsNullOrEmpty()) throw new Exception("条码不允许为空"); |
| | | if (unity.billNo.IsNullOrEmpty()) throw new Exception("申请单号不允许为空"); |
| | | |
| | |
| | | new("@pi_user", unity.userName), |
| | | new("@pi_barcode", unity.barcode), |
| | | new("@pi_sectionCode", unity.sectionCode), |
| | | new("@pi_billno", unity.billNo), |
| | | |
| | | new("@pi_billno", unity.billNo) |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | | parameters[1].Direction = ParameterDirection.Output; |
| | | // parameters[2].Direction = ParameterDirection.Output; |
| | | // parameters[2].Direction = ParameterDirection.Output; |
| | | |
| | | foreach (var parameter in parameters) |
| | | cmd.Parameters.Add(parameter); |
| | |
| | | return _strMsg; |
| | | |
| | | //return 0; |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |