wankeda
2025-04-07 4da42c12efde190b208f18b7dd51d3e89986837d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Basic;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
 
namespace WIDESEA_BasicRepository
{
    public class CachePointRepository : RepositoryBase<Dt_CachePoint>, ICachePointRepository
    {
        public CachePointRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
 
        //public List<CachePointGroupDTO> GetCachePointGroups(int areaId, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus)
        //{
        //   return Db.Queryable<Dt_CachePoint>().Where(a => a.Depth == 1 && a.PointStatus == locationAStatus.ObjToInt() && a.PointStatus == locationAStatus.ObjToInt()).InnerJoin(Db.Queryable<Dt_CachePoint>().Where(b => b.Depth == 2 && b.AreaId == areaId && b.PointStatus == locationBStatus.ObjToInt() && b.PointStatus == locationBStatus.ObjToInt()).Select((a, b) => new CachePointGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, PointCodeA = a.PointCode, PointCodeB = b.PointCode, PointStatusA = a.PointStatus, PointStatusB = b.PointStatus }).ToList();
        //}
    }
}