/// <summary> /// 获取盘点项详情,包含资产的部分参数 /// </summary> /// <param name="assetId">资产id</param> /// <param name="stockId">盘点id</param> /// <returns></returns> public Result LoadDto(int assetId, int stockId) { var entity = _db.LoadBySql <StockItemDto>(@" SELECT * FROM StockItemView WHERE AssetId=@AssetId AND StockId=@StockId AND IsDel=0", new { AssetId = assetId, StockId = stockId }); return(entity == null?ResultUtil.Do <StockItemDto>(ResultCodes.数据不存在, null) : ResultUtil.Success(entity)); }