개정판 473ee829
issue #0000
Project 정보 수정
ID2 Project DB의 정보를 ID2 Manager와 매핑
Change-Id: Idcc82a34b8027032529cbc43a62757ea6d48f586
ID2.Manager/ID2.Manager.Dapper/Repository/ID2Repository.cs | ||
---|---|---|
21 | 21 |
try |
22 | 22 |
{ |
23 | 23 |
string query = $@" |
24 |
SELECT p.* |
|
25 |
FROM Projects p |
|
26 |
INNER JOIN ( |
|
27 |
SELECT Min(Id) AS Id, Name |
|
28 |
FROM Projects pg |
|
29 |
WHERE ifnull(Name, '') <> '' |
|
30 |
GROUP BY Name |
|
31 |
) pg ON p.ID=pg.Id |
|
32 |
ORDER BY p.Id;"; |
|
24 |
select pj.Id, pj.ProjectID, pj.ProjectNo, pj.Name, pj.Desc, pj.Unit, pj.NPSUnit, pj.Path, pj.AreaName, pj.PlantName, pj.CreatedDate, pj.UpdatedDate |
|
25 |
,ty.UID as DBTypeID ,ty.Name as DBTypeName |
|
26 |
,db.Host, db.User, db.Password, db.FilePath as DBPath |
|
27 |
from ( |
|
28 |
select p.* |
|
29 |
from Projects p |
|
30 |
inner join |
|
31 |
( |
|
32 |
select Min(Id) as Id, Name |
|
33 |
from Projects |
|
34 |
where ifnull(Name, '') <> '' |
|
35 |
group by Name |
|
36 |
) g on p.Id=g.Id |
|
37 |
) pj |
|
38 |
inner join DBSettings db on pj.Id=db.Projects_UID |
|
39 |
inner join DBTypes ty on db.DBTypes_UID=ty.UID |
|
40 |
order by pj.Id;"; |
|
33 | 41 |
|
34 | 42 |
results = Query<ID2ProjectInfo>(query); |
35 | 43 |
} |
내보내기 Unified diff