cnf
2025-09-10 1b3db8f5683373dd8e179b006e7314783dd1f9db
WebApi/Gs.Warehouse/Services/MesRohInManager.cs
@@ -14,21 +14,14 @@
///     采购主表,数据从erp来
/// </summary>
[ApiGroup(ApiGroupNames.PerMission)]
public class MesRohInManager : IRomteService
public class MesRohInManager :IRomteService
{
    /// <summary>
    ///     HTTP上下文
    /// </summary>
    private readonly IHttpContextAccessor _http;
    /// <summary>
    ///     用户code,用户guid,组织id列表
    /// </summary>
    private readonly string _userCode, _userGuid, _orgFids;
    public MesRohInManager(IHttpContextAccessor httpContextAccessor)
    {
        //变量附值
        _http = httpContextAccessor;
        (_userCode, _userGuid, _orgFids) =
            UtilityHelper.GetUserGuidAndOrgGuid(_http);
@@ -42,10 +35,10 @@
    [RequestMethod(RequestMethods.POST)]
    public ReturnDto<PageList<dynamic>> GetListPage([FromBody] dynamic model)
    {
        int currentPage = model.currentPage; //当前页
        int everyPageSize = model.everyPageSize; //每页大小
        string sortName = model.sortName; //排序
        string keyWhere = model.keyWhere; //查询条件
        int currentPage = model.currentPage;
        int everyPageSize = model.everyPageSize;
        string sortName = model.sortName;
        string keyWhere = model.keyWhere;
        SqlParameter[] parameters =
        {
            new("@inCurrentPage", currentPage),
@@ -73,10 +66,8 @@
            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;
@@ -91,14 +82,13 @@
        {
            LogHelper.Debug(ToString(), ex.Message);
        }
        return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist,
            ReturnCode.Success, "读取成功");
    }
    /// <summary>
    ///     读取明细
    ///     读取
    /// </summary>
    /// <param name="guid"></param>
    /// <returns></returns>
@@ -124,13 +114,11 @@
            if (dset != null && dset.Tables.Count > 0 &&
                dset.Tables[0].Rows.Count > 0)
            {
                //主体信息
                var dr = dset.Tables[0].Rows[0];
                m = dr.RowToDynamic();
                //表1
                var _tb = dset.Tables[1].TableToDynamicList();
                m.list = _tb;
                //表2
                var _tb2 = dset.Tables[2].TableToDynamicList();
                m.list2 = _tb2;
            }