개정판 24c5e56c
- final pdf Font 추가
- Markus navi 속도 최적화 Key input 최적화
Change-Id: I7f2cf1933e86017d7b1df9ef4bd3048a8e80a653
ConvertService/ServiceController/StationControllerSQL/Security/SignalR.sql | ||
---|---|---|
1 | 1 |
CREATE SCHEMA [SignalR] |
2 | 2 |
AUTHORIZATION [dbo]; |
3 | 3 |
|
4 |
|
|
5 |
|
ConvertService/ServiceController/StationControllerSQL/dbo/Stored Procedures/SELECT_CONVERT_DELETE.sql | ||
---|---|---|
5 | 5 |
-- ============================================= |
6 | 6 |
CREATE PROCEDURE [dbo].[SELECT_CONVERT_DELETE] |
7 | 7 |
( |
8 |
@P_ID NVARCHAR(50) --ID
|
|
8 |
@P_ID NVARCHAR(50) = null --ID
|
|
9 | 9 |
-- @P_PROJECT_NO NVARCHAR(10), --PROJECT NO |
10 | 10 |
--@P_DOCUMENT_URL NVARCHAR(500),--DOCUMENT ID |
11 | 11 |
--@P_DOCUMENT_ID NVARCHAR(50) --DOCUMENT ID |
ConvertService/ServiceController/StationControllerSQL/dbo/Stored Procedures/SELECT_CONVERT_INSERT.sql | ||
---|---|---|
28 | 28 |
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; |
29 | 29 |
|
30 | 30 |
Begin |
31 |
INSERT INTO CONVERTER_DOC VALUES (@P_ID, @P_PROJECT_NO, @P_DOCUMENT_URL, @P_DOCUMENT_ID, GETDATE(), 0, 0, 0, null, null, null, null, 0, 0)
|
|
31 |
INSERT INTO CONVERTER_DOC VALUES (@P_ID, @P_PROJECT_NO, @P_DOCUMENT_URL, @P_DOCUMENT_ID, GETDATE(), 0, 0, 0, null, null, null, null, 0) |
|
32 | 32 |
End |
33 | 33 |
|
34 | 34 |
RETURN |
ConvertService/ServiceController/StationControllerSQL/dbo/Stored Procedures/SELECT_CONVERT_ITEM.sql | ||
---|---|---|
1 | 1 |
CREATE PROCEDURE [dbo].[SELECT_CONVERT_ITEM] |
2 | 2 |
( |
3 |
@P_ID NVARCHAR(50), |
|
4 |
@P_PROJECT_NO NVARCHAR(10),--PROJECT NO
|
|
5 |
@P_DOCUMENT_ID NVARCHAR(10),--DOCUMENT ID |
|
6 |
@P_STATUS INT = NULL, --STATUS
|
|
7 |
@P_TAKE_COUNT INT = NULL, --Select Item Count
|
|
8 |
|
|
9 |
@P_BEGIN_CREATE_DATETIME DATETIME = NULL,--CREATE DATETIME
|
|
10 |
@P_FINISH_CREATE_DATETIME DATETIME = NULL,--CREATE DATETIME
|
|
3 |
@P_ID NVARCHAR(50) = null,
|
|
4 |
@P_PROJECT_NO NVARCHAR(50) = null,--PROJECT NO
|
|
5 |
@P_DOCUMENT_ID NVARCHAR(10) = null,--DOCUMENT ID
|
|
6 |
@P_STATUS INT = 4, --STATUS
|
|
7 |
@P_TAKE_COUNT INT = 50, --Select Item Count
|
|
8 |
|
|
9 |
@P_BEGIN_CREATE_DATETIME DATETIME = null,--CREATE DATETIME
|
|
10 |
@P_FINISH_CREATE_DATETIME DATETIME = null,--CREATE DATETIME
|
|
11 | 11 |
|
12 |
@P_BEGIN_START_DATETIE DATETIME = NULL, --START DATETIME
|
|
13 |
@P_FINISH_START_DATETIME DATETIME = NULL, --START DATETIME
|
|
12 |
@P_BEGIN_START_DATETIE DATETIME = null, --START DATETIME
|
|
13 |
@P_FINISH_START_DATETIME DATETIME = null, --START DATETIME
|
|
14 | 14 |
|
15 |
@P_BEGIN_END_DATETIME DATETIME = NULL, -- END DATETIME
|
|
16 |
@P_FINISH_END_DATETIME DATETIME = NULL, --END DATETIME
|
|
15 |
@P_BEGIN_END_DATETIME DATETIME = null, -- END DATETIME
|
|
16 |
@P_FINISH_END_DATETIME DATETIME = null , --END DATETIME
|
|
17 | 17 |
|
18 |
@P_GROUP_NO NVARCHAR(10), --GROUP NO |
|
19 |
@P_DOCUMENT_NAME NVARCHAR(500),--DOCUMENT NAME |
|
20 |
@P_DOCUMENT_NO NVARCHAR(50),--DOCUMENT NO |
|
21 |
@P_REVISION NVARCHAR(10), --REVISON |
|
18 |
@P_GROUP_NO NVARCHAR(10) = null, --GROUP NO
|
|
19 |
@P_DOCUMENT_NAME NVARCHAR(500) = null,--DOCUMENT NAME
|
|
20 |
@P_DOCUMENT_NO NVARCHAR(50) = null,--DOCUMENT NO
|
|
21 |
@P_REVISION NVARCHAR(10) = null, --REVISON
|
|
22 | 22 |
|
23 |
@P_SERVICE_ID NVARCHAR(50), |
|
24 |
@P_RECONVERTER int, |
|
23 |
@P_SERVICE_ID NVARCHAR(50) = null,
|
|
24 |
@P_RECONVERTER int = null,
|
|
25 | 25 |
|
26 |
@P_DOCUMENT_URL NVARCHAR(500) |
|
26 |
@P_DOCUMENT_URL NVARCHAR(500) = null, |
|
27 |
@P_ExcptionCheck int = null --true 1 false 0 |
|
27 | 28 |
|
28 | 29 |
--@P_PROPERTIES_TYPE NVARCHAR(50), |
29 | 30 |
--@P_PROPERTIES_PROPERTY NVARCHAR(100) |
... | ... | |
59 | 60 |
|
60 | 61 |
create table #temp |
61 | 62 |
( |
62 |
ID nvarchar(50) not null,
|
|
63 |
PROJECT_NO nvarchar(10) not null,
|
|
64 |
DOCUMENT_URL nvarchar(500) not null,
|
|
65 |
DOCUMENT_ID nvarchar(50) not null,
|
|
66 |
CREATE_DATETIME datetime not null,
|
|
67 |
STATUS int not null,
|
|
68 |
TOTAL_PAGE int not null,
|
|
69 |
CURRENT_PAGE int not null,
|
|
70 |
EXCEPTION nvarchar(max) null,
|
|
71 |
END_DATETIME datetime null,
|
|
72 |
START_DATETIME datetime null,
|
|
73 |
SERVICE_ID varchar(50) null,
|
|
74 |
RECONVERTER int null,
|
|
75 |
REVISION nvarchar(50) null,
|
|
76 |
DOCUMENT_NO nvarchar(50) null,
|
|
77 |
DOCUMENT_NAME nvarchar(500) null,
|
|
78 |
GROUP_NO nvarchar(50) null,
|
|
79 |
RESULT_FILE nvarchar(500) null,
|
|
80 |
RESULT nvarchar(50) null,
|
|
63 |
ID nvarchar(50) , |
|
64 |
PROJECT_NO nvarchar(50) ,
|
|
65 |
DOCUMENT_URL nvarchar(500), |
|
66 |
DOCUMENT_ID nvarchar(50), |
|
67 |
CREATE_DATETIME datetime, |
|
68 |
STATUS int, |
|
69 |
TOTAL_PAGE int, |
|
70 |
CURRENT_PAGE int , |
|
71 |
EXCEPTION nvarchar(max) , |
|
72 |
END_DATETIME datetime , |
|
73 |
START_DATETIME datetime , |
|
74 |
SERVICE_ID varchar(50) , |
|
75 |
RECONVERTER int , |
|
76 |
REVISION nvarchar(50) , |
|
77 |
DOCUMENT_NO nvarchar(50) , |
|
78 |
DOCUMENT_NAME nvarchar(500) , |
|
79 |
GROUP_NO nvarchar(50) , |
|
80 |
RESULT_FILE nvarchar(500) , |
|
81 |
RESULT nvarchar(50) , |
|
81 | 82 |
PROPERTIES_VALUE NVARCHAR(max), |
82 |
CONVERT_PATH NVARCHAR(max), |
|
83 |
CONVERT_COUNT INT |
|
83 |
CONVERT_PATH NVARCHAR(max) |
|
84 | 84 |
) |
85 | 85 |
|
86 | 86 |
|
... | ... | |
137 | 137 |
,[DOCUMENT_ITEM].[RESULT] as RESULT |
138 | 138 |
,[PROPERTIES].[VALUE] as PROPERTIES_VALUE |
139 | 139 |
,([PROPERTIES].[VALUE] + ''\'' + [CONVERTER_DOC].[PROJECT_NO] + ''_Tile\'' + CAST([CONVERTER_DOC].[DOCUMENT_ID] / 100 AS nvarchar(50)) + ''\'' + [CONVERTER_DOC].[DOCUMENT_ID]) as CONVERT_PATH |
140 |
,[CONVERTER_DOC].[CONVERT_COUNT] as CONVERT_COUNT |
|
141 | 140 |
FROM [CONVERTER_DOC] |
142 | 141 |
LEFT OUTER JOIN [DOCUMENT_ITEM] ON [CONVERTER_DOC].[DOCUMENT_ID] = [DOCUMENT_ITEM].[DOCUMENT_ID] AND [CONVERTER_DOC].[PROJECT_NO] = [DOCUMENT_ITEM].[PROJECT_NO] |
143 |
LEFT OUTER JOIN [PROPERTIES] ON [CONVERTER_DOC].[PROJECT_NO] = [PROPERTIES].[PROPERTY] AND [PROPERTIES].[TYPE] = ''FinalPDFStorageRemote''
|
|
142 |
LEFT OUTER JOIN [PROPERTIES] ON [CONVERTER_DOC].[PROJECT_NO] = [PROPERTIES].[PROPERTY] AND [PROPERTIES].[TYPE] = ''TileSourcePath''
|
|
144 | 143 |
WHERE ' |
145 | 144 |
|
146 | 145 |
--G:\TileSource\OL1_Tile\198\19833 |
147 | 146 |
PRINT @sqlCommand; |
148 | 147 |
|
149 | 148 |
-- PROJECT NO |
150 |
IF @P_ID IS not NULL |
|
149 |
IF @P_ID IS not NULL AND @P_ID != ' '
|
|
151 | 150 |
BEGIN |
152 | 151 |
SET @WhereCommand = @WhereCommand + '[CONVERTER_DOC].[ID] = ''' + @P_ID +'''' |
153 | 152 |
END |
154 | 153 |
|
155 | 154 |
-- id |
156 |
IF @P_PROJECT_NO IS NOT NULL |
|
155 |
IF @P_PROJECT_NO IS NOT NULL And @P_PROJECT_NO != 'Selected All' and @P_PROJECT_NO != ' '
|
|
157 | 156 |
BEGIN |
158 | 157 |
IF @WhereCommand != '' |
159 | 158 |
BEGIN |
... | ... | |
163 | 162 |
END |
164 | 163 |
|
165 | 164 |
-- document id |
166 |
IF @P_DOCUMENT_ID IS NOT NULL |
|
165 |
IF @P_DOCUMENT_ID IS NOT NULL or @P_DOCUMENT_ID != ' '
|
|
167 | 166 |
BEGIN |
168 | 167 |
IF @WhereCommand != '' |
169 | 168 |
BEGIN |
... | ... | |
183 | 182 |
BEGIN |
184 | 183 |
SET @WhereCommand = @WhereCommand + '[CONVERTER_DOC].[STATUS] > 4 ' |
185 | 184 |
END |
185 |
ELSE IF @P_STATUS = 1000 |
|
186 |
BEGIN |
|
187 |
SET @WhereCommand = @WhereCommand + '[CONVERTER_DOC].[STATUS] > 0 ' |
|
188 |
END |
|
186 | 189 |
ELSE IF @P_STATUS IS NOT NULL |
187 | 190 |
BEGIN |
188 | 191 |
SET @WhereCommand = @WhereCommand + '[CONVERTER_DOC].[STATUS] = ' + CAST(@P_STATUS AS varchar(10)) |
... | ... | |
190 | 193 |
END |
191 | 194 |
|
192 | 195 |
-- start create datetime |
193 |
IF @P_BEGIN_CREATE_DATETIME IS NOT NULL |
|
196 |
IF @P_BEGIN_CREATE_DATETIME IS NOT NULL and @P_BEGIN_CREATE_DATETIME != ' '
|
|
194 | 197 |
BEGIN |
195 | 198 |
IF @WhereCommand != '' |
196 | 199 |
BEGIN |
... | ... | |
200 | 203 |
END |
201 | 204 |
|
202 | 205 |
-- end create datetime |
203 |
IF @P_FINISH_CREATE_DATETIME IS NOT NULL |
|
206 |
IF @P_FINISH_CREATE_DATETIME IS NOT NULL and @P_FINISH_CREATE_DATETIME != ' '
|
|
204 | 207 |
BEGIN |
205 | 208 |
IF @WhereCommand != '' |
206 | 209 |
BEGIN |
... | ... | |
210 | 213 |
END |
211 | 214 |
|
212 | 215 |
-- start start datetime |
213 |
IF @P_BEGIN_START_DATETIE IS NOT NULL |
|
216 |
IF @P_BEGIN_START_DATETIE IS NOT NULL and @P_BEGIN_START_DATETIE != ' '
|
|
214 | 217 |
BEGIN |
215 | 218 |
IF @WhereCommand != '' |
216 | 219 |
BEGIN |
... | ... | |
220 | 223 |
END |
221 | 224 |
|
222 | 225 |
-- end start datetime |
223 |
IF @P_FINISH_START_DATETIME IS NOT NULL |
|
226 |
IF @P_FINISH_START_DATETIME IS NOT NULL and @P_FINISH_START_DATETIME != ' '
|
|
224 | 227 |
BEGIN |
225 | 228 |
IF @WhereCommand != '' |
226 | 229 |
BEGIN |
... | ... | |
230 | 233 |
END |
231 | 234 |
|
232 | 235 |
-- start end datetime |
233 |
IF @P_BEGIN_END_DATETIME IS NOT NULL |
|
236 |
IF @P_BEGIN_END_DATETIME IS NOT NULL and @P_BEGIN_END_DATETIME != ' '
|
|
234 | 237 |
BEGIN |
235 | 238 |
IF @WhereCommand != '' |
236 | 239 |
BEGIN |
... | ... | |
240 | 243 |
END |
241 | 244 |
|
242 | 245 |
-- end end datetime |
243 |
IF @P_FINISH_END_DATETIME IS NOT NULL |
|
246 |
IF @P_FINISH_END_DATETIME IS NOT NULL and @P_FINISH_END_DATETIME != ' '
|
|
244 | 247 |
BEGIN |
245 | 248 |
IF @WhereCommand != '' |
246 | 249 |
BEGIN |
... | ... | |
250 | 253 |
END |
251 | 254 |
|
252 | 255 |
-- group no |
253 |
IF @P_GROUP_NO IS NOT NULL |
|
256 |
IF @P_GROUP_NO IS NOT NULL or @P_GROUP_NO != ' '
|
|
254 | 257 |
BEGIN |
255 | 258 |
IF @WhereCommand != '' |
256 | 259 |
BEGIN |
... | ... | |
260 | 263 |
END |
261 | 264 |
|
262 | 265 |
-- document name |
263 |
IF @P_DOCUMENT_NAME IS NOT NULL |
|
266 |
IF @P_DOCUMENT_NAME IS NOT NULL or @P_DOCUMENT_NAME != ' '
|
|
264 | 267 |
BEGIN |
265 | 268 |
IF @WhereCommand != '' |
266 | 269 |
BEGIN |
... | ... | |
270 | 273 |
END |
271 | 274 |
|
272 | 275 |
-- document no |
273 |
IF @P_DOCUMENT_NO IS NOT NULL |
|
276 |
IF @P_DOCUMENT_NO IS NOT NULL or @P_DOCUMENT_NO != ' '
|
|
274 | 277 |
BEGIN |
275 | 278 |
IF @WhereCommand != '' |
276 | 279 |
BEGIN |
... | ... | |
279 | 282 |
SET @WhereCommand = @WhereCommand + '[DOCUMENT_ITEM].[DOCUMENT_NO] like ''' + '%' + @P_DOCUMENT_NO + '%''' |
280 | 283 |
END |
281 | 284 |
|
282 |
IF @P_DOCUMENT_NAME IS NOT NULL |
|
285 |
IF @P_DOCUMENT_NAME IS NOT NULL or @P_DOCUMENT_NAME != ' '
|
|
283 | 286 |
BEGIN |
284 | 287 |
IF @WhereCommand != '' |
285 | 288 |
BEGIN |
... | ... | |
288 | 291 |
SET @WhereCommand = @WhereCommand + '[DOCUMENT_ITEM].[DOCUMENT_NAME] like ''' + '%' + @P_DOCUMENT_NAME + '%''' |
289 | 292 |
END |
290 | 293 |
|
291 |
IF @P_SERVICE_ID IS NOT NULL
|
|
294 |
IF @P_SERVICE_ID IS NOT NULL or @P_SERVICE_ID != ' '
|
|
292 | 295 |
BEGIN |
293 | 296 |
IF @WhereCommand != '' |
294 | 297 |
BEGIN |
... | ... | |
297 | 300 |
SET @WhereCommand = @WhereCommand + '[CONVERTER_DOC].[SERVICE_ID] like''' + '%' + @P_SERVICE_ID+ '%''' |
298 | 301 |
END |
299 | 302 |
|
300 |
IF @P_DOCUMENT_URL IS NOT NULL
|
|
303 |
IF @P_DOCUMENT_URL IS NOT NULL or @P_DOCUMENT_URL != ' '
|
|
301 | 304 |
BEGIN |
302 | 305 |
IF @WhereCommand != '' |
303 | 306 |
BEGIN |
... | ... | |
307 | 310 |
END |
308 | 311 |
|
309 | 312 |
|
310 |
IF @P_RECONVERTER IS NOT NULL |
|
313 |
IF @P_RECONVERTER IS NOT NULL or @P_RECONVERTER != ' '
|
|
311 | 314 |
BEGIN |
312 | 315 |
IF @WhereCommand != '' |
313 | 316 |
BEGIN |
... | ... | |
316 | 319 |
SET @WhereCommand = @WhereCommand + '[CONVERTER_DOC].[RECONVERTER] = ' + CAST(@P_RECONVERTER AS varchar(10)) |
317 | 320 |
END |
318 | 321 |
|
319 |
IF @P_REVISION IS NOT NULL |
|
322 |
IF @P_REVISION IS NOT NULL or @P_REVISION != ' '
|
|
320 | 323 |
BEGIN |
321 | 324 |
IF @WhereCommand != '' |
322 | 325 |
BEGIN |
... | ... | |
325 | 328 |
SET @WhereCommand = @WhereCommand + '[DOCUMENT_ITEM].[REVISION] = ''' + @P_REVISION + '''' |
326 | 329 |
END |
327 | 330 |
|
331 |
IF @P_ExcptionCheck IS NOT NULL and @P_ExcptionCheck != ' ' |
|
332 |
BEGIN |
|
333 |
IF @P_ExcptionCheck = 'true' |
|
334 |
BEGIN |
|
335 |
SET @WhereCommand = @WhereCommand + ' AND [CONVERTER_DOC].[EXCEPTION] is not null AND [CONVERTER_DOC].[EXCEPTION] != '''' ' |
|
336 |
end |
|
337 |
END |
|
338 |
|
|
328 | 339 |
SET @WhereCommand = @WhereCommand + ' ORDER BY [CONVERTER_DOC].[CREATE_DATETIME] DESC ' |
329 | 340 |
|
330 | 341 |
-- PROPERTIES_TYPE |
ConvertService/ServiceController/StationControllerSQL/dbo/Stored Procedures/SELECT_CONVERT_ITEM_TEST.sql | ||
---|---|---|
1 |
-- =============================================
|
|
2 |
-- Author: <KIM TAE SEONG>
|
|
3 |
-- Create date: <2020-03-31>
|
|
4 |
-- Description: <프로시저 SELECT_CONVERT_ITEM에 대한 테스트>
|
|
5 |
-- ============================================= |
|
6 |
CREATE PROCEDURE [dbo].[SELECT_CONVERT_ITEM_TEST]
|
|
7 |
AS |
|
8 |
BEGIN
|
|
9 |
SET NOCOUNT ON;
|
|
1 |
CREATE PROCEDURE [dbo].[SELECT_CONVERT_ITEM_TEST]
|
|
2 |
(
|
|
3 |
@P_STATUS INT = 4
|
|
4 |
)
|
|
5 |
|
|
6 |
/* test
|
|
7 |
|
|
8 |
USE [markus]
|
|
9 |
GO
|
|
10 | 10 |
|
11 | 11 |
DECLARE @return_value int |
12 | 12 |
|
13 | 13 |
EXEC @return_value = [dbo].[SELECT_CONVERT_ITEM] |
14 |
@P_PROJECT_NO = 000000, |
|
15 |
@P_DOCUMENT_ID = NULL, |
|
16 |
@P_STATUS = NULL, |
|
17 |
@P_TAKE_COUNT = NULL, |
|
18 |
@P_BEGIN_CREATE_DATETIME = NULL, |
|
19 |
@P_FINISH_CREATE_DATETIME = NULL, |
|
20 |
@P_BEGIN_START_DATETIE = NULL, |
|
21 |
@P_FINISH_START_DATETIME = NULL, |
|
22 |
@P_BEGIN_END_DATETIME = NULL, |
|
23 |
@P_FINISH_END_DATETIME = NULL, |
|
24 |
@P_GROUP_NO = NULL, |
|
25 |
@P_DOCUMENT_NAME = NULL, |
|
26 |
@P_DOCUMENT_NO = NULL, |
|
27 |
@P_REVISION = NULL |
|
14 |
@P_PROJECT_NO = N'000000', |
|
15 |
@P_STATUS = 1, |
|
16 |
@P_TAKE_COUNT = 12 |
|
28 | 17 |
|
29 | 18 |
SELECT 'Return Value' = @return_value |
30 | 19 |
|
20 |
GO |
|
21 |
*/ |
|
31 | 22 |
|
32 |
EXEC @return_value = [dbo].[SELECT_CONVERT_ITEM] |
|
33 |
@P_PROJECT_NO = 000000, |
|
34 |
@P_DOCUMENT_ID = 0, |
|
35 |
@P_STATUS = NULL, |
|
36 |
@P_TAKE_COUNT = 100, |
|
37 |
@P_BEGIN_CREATE_DATETIME = NULL, |
|
38 |
@P_FINISH_CREATE_DATETIME = NULL, |
|
39 |
@P_BEGIN_START_DATETIE = NULL, |
|
40 |
@P_FINISH_START_DATETIME = NULL, |
|
41 |
@P_BEGIN_END_DATETIME = NULL, |
|
42 |
@P_FINISH_END_DATETIME = NULL, |
|
43 |
@P_GROUP_NO = NULL, |
|
44 |
@P_DOCUMENT_NAME = NULL, |
|
45 |
@P_DOCUMENT_NO = NULL, |
|
46 |
@P_REVISION = NULL |
|
23 |
AS |
|
24 |
BEGIN |
|
47 | 25 |
|
48 |
SELECT 'Return Value' = @return_value |
|
26 |
SET FMTONLY OFF; |
|
27 |
SET NOCOUNT ON |
|
28 |
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; |
|
29 |
|
|
30 |
DECLARE @sqlCommand NVARCHAR(MAX) |
|
31 |
DECLARE @WhereCommand NVARCHAR(MAX) |
|
32 |
|
|
33 |
create table #temp |
|
34 |
( |
|
35 |
ID nvarchar(50) , |
|
36 |
PROJECT_NO nvarchar(50) , |
|
37 |
DOCUMENT_URL nvarchar(500), |
|
38 |
DOCUMENT_ID nvarchar(50), |
|
39 |
CREATE_DATETIME datetime, |
|
40 |
STATUS int, |
|
41 |
TOTAL_PAGE int, |
|
42 |
CURRENT_PAGE int , |
|
43 |
EXCEPTION nvarchar(max) , |
|
44 |
END_DATETIME datetime , |
|
45 |
START_DATETIME datetime , |
|
46 |
SERVICE_ID varchar(50) , |
|
47 |
RECONVERTER int , |
|
48 |
REVISION nvarchar(50) , |
|
49 |
DOCUMENT_NO nvarchar(50) , |
|
50 |
DOCUMENT_NAME nvarchar(500) , |
|
51 |
GROUP_NO nvarchar(50) , |
|
52 |
RESULT_FILE nvarchar(500) , |
|
53 |
RESULT nvarchar(50) , |
|
54 |
PROPERTIES_VALUE NVARCHAR(max), |
|
55 |
CONVERT_PATH NVARCHAR(max) |
|
56 |
) |
|
57 |
|
|
58 |
|
|
59 |
SET @sqlCommand ='' |
|
60 |
SET @WhereCommand = '' |
|
61 |
|
|
62 |
SET @sqlCommand = 'SELECT ' |
|
63 |
|
|
64 |
/* |
|
65 |
SELECT TOP (200) CONVERTER_DOC.*, DOCUMENT_ITEM.REVISION, DOCUMENT_ITEM.DOCUMENT_NO, DOCUMENT_ITEM.DOCUMENT_NAME, DOCUMENT_ITEM.GROUP_NO, |
|
66 |
DOCUMENT_ITEM.RESULT_FILE, DOCUMENT_ITEM.RESULT |
|
67 |
FROM CONVERTER_DOC LEFT OUTER JOIN |
|
68 |
DOCUMENT_ITEM ON CONVERTER_DOC.DOCUMENT_ID = DOCUMENT_ITEM.DOCUMENT_ID AND CONVERTER_DOC.PROJECT_NO = DOCUMENT_ITEM.PROJECT_NO |
|
69 |
|
|
70 |
-- 필터 조건 |
|
71 |
[CONVERTER_DOC].[PROJECT_NO] |
|
72 |
[CONVERTER_DOC].[DOCUMENT_ID] |
|
73 |
[CONVERTER_DOC].[STATUS] |
|
74 |
[CONVERTER_DOC].[CREATE_DATETIME] |
|
75 |
|
|
76 |
[DOCUMENT_ITEM].[GROUP_NO] |
|
77 |
[DOCUMENT_ITEM].[DOCUMENT_NAME] |
|
78 |
[DOCUMENT_ITEM].[DOCUMENT_NO] |
|
79 |
[DOCUMENT_ITEM].[REVISION] |
|
80 |
*/ |
|
81 |
-- 기본 쿼리 |
|
82 |
SET @sqlCommand = @sqlCommand + |
|
83 |
'[CONVERTER_DOC].[ID] as ID |
|
84 |
,[CONVERTER_DOC].[PROJECT_NO] as PROJECT_NO |
|
85 |
,[CONVERTER_DOC].[DOCUMENT_URL] as DOCUMENT_URL |
|
86 |
,[CONVERTER_DOC].[DOCUMENT_ID] as DOCUMENT_ID |
|
87 |
,[CONVERTER_DOC].[CREATE_DATETIME] as CREATE_DATETIME |
|
88 |
,[CONVERTER_DOC].[STATUS] as STATUS |
|
89 |
,[CONVERTER_DOC].[TOTAL_PAGE] as TOTAL_PAGE |
|
90 |
,[CONVERTER_DOC].[CURRENT_PAGE] as CURRENT_PAGE |
|
91 |
,[CONVERTER_DOC].[EXCEPTION] as EXCEPTION |
|
92 |
,[CONVERTER_DOC].[END_DATETIME] as END_DATETIME |
|
93 |
,[CONVERTER_DOC].[START_DATETIME] as START_DATETIME |
|
94 |
,[CONVERTER_DOC].[SERVICE_ID] as SERVICE_ID |
|
95 |
,[CONVERTER_DOC].[RECONVERTER] as RECONVERTER |
|
96 |
,[DOCUMENT_ITEM].[REVISION] as REVISION |
|
97 |
,[DOCUMENT_ITEM].[DOCUMENT_NO] as DOCUMENT_NO |
|
98 |
,[DOCUMENT_ITEM].[DOCUMENT_NAME] as DOCUMENT_NAME |
|
99 |
,[DOCUMENT_ITEM].[GROUP_NO] as GROUP_NO |
|
100 |
,[DOCUMENT_ITEM].[RESULT_FILE] as RESULT_FILE |
|
101 |
,[DOCUMENT_ITEM].[RESULT] as RESULT |
|
102 |
,[PROPERTIES].[VALUE] as PROPERTIES_VALUE |
|
103 |
,([PROPERTIES].[VALUE] + ''\'' + [CONVERTER_DOC].[PROJECT_NO] + ''_Tile\'' + CAST([CONVERTER_DOC].[DOCUMENT_ID] / 100 AS nvarchar(50)) + ''\'' + [CONVERTER_DOC].[DOCUMENT_ID]) as CONVERT_PATH |
|
104 |
FROM [CONVERTER_DOC] |
|
105 |
LEFT OUTER JOIN [DOCUMENT_ITEM] ON [CONVERTER_DOC].[DOCUMENT_ID] = [DOCUMENT_ITEM].[DOCUMENT_ID] AND [CONVERTER_DOC].[PROJECT_NO] = [DOCUMENT_ITEM].[PROJECT_NO] |
|
106 |
LEFT OUTER JOIN [PROPERTIES] ON [CONVERTER_DOC].[PROJECT_NO] = [PROPERTIES].[PROPERTY] AND [PROPERTIES].[TYPE] = ''TileSourcePath'' |
|
107 |
WHERE ' |
|
108 |
|
|
109 |
--G:\TileSource\OL1_Tile\198\19833 |
|
110 |
PRINT @sqlCommand; |
|
111 |
|
|
112 |
-- status |
|
113 |
IF @P_STATUS IS NOT NULL |
|
114 |
BEGIN |
|
115 |
IF @WhereCommand != '' |
|
116 |
BEGIN |
|
117 |
SET @WhereCommand = @WhereCommand + ' AND ' |
|
118 |
end |
|
119 |
IF @P_STATUS = 100 |
|
120 |
BEGIN |
|
121 |
SET @WhereCommand = @WhereCommand + '[CONVERTER_DOC].[STATUS] > 4 ' |
|
122 |
END |
|
123 |
ELSE IF @P_STATUS = 1000 |
|
124 |
BEGIN |
|
125 |
SET @WhereCommand = @WhereCommand + '[CONVERTER_DOC].[STATUS] > 0 ' |
|
126 |
END |
|
127 |
ELSE IF @P_STATUS IS NOT NULL |
|
128 |
BEGIN |
|
129 |
SET @WhereCommand = @WhereCommand + '[CONVERTER_DOC].[STATUS] = ' + CAST(@P_STATUS AS varchar(10)) |
|
130 |
END |
|
131 |
END |
|
132 |
|
|
133 |
SET @WhereCommand = @WhereCommand + ' ORDER BY [CONVERTER_DOC].[CREATE_DATETIME] DESC ' |
|
134 |
|
|
135 |
-- PROPERTIES_TYPE |
|
136 |
--IF @P_PROPERTIES_TYPE IS NOT NULL |
|
137 |
-- BEGIN |
|
138 |
-- IF @WhereCommand is not null |
|
139 |
-- BEGIN |
|
140 |
-- SET @WhereCommand = @WhereCommand + ' AND ' |
|
141 |
-- end |
|
142 |
-- SET @WhereCommand = @WhereCommand + '[PROPERTIES].[type] = ''' + @P_PROPERTIES_TYPE + '''' |
|
143 |
-- END |
|
144 |
|
|
145 |
-- PROPERTIES_PROPERTY |
|
146 |
--IF @P_PROPERTIES_PROPERTY IS NOT NULL |
|
147 |
-- BEGIN |
|
148 |
-- IF @WhereCommand is not null |
|
149 |
-- BEGIN |
|
150 |
-- SET @WhereCommand = @WhereCommand + ' AND ' |
|
151 |
-- end |
|
152 |
-- SET @WhereCommand = @WhereCommand + '[PROPERTIES].[PROPERTY] = ''' + @P_PROPERTIES_PROPERTY + '''' |
|
153 |
-- END |
|
154 |
|
|
155 |
PRINT @WhereCommand; |
|
156 |
|
|
157 |
if len(@WhereCommand) > 0 |
|
158 |
BEGIN |
|
159 |
SET @sqlCommand = @sqlCommand + @WhereCommand; |
|
160 |
|
|
161 |
PRINT @sqlCommand; |
|
162 |
|
|
163 |
INSERT into #temp Exec (@sqlCommand); |
|
164 |
END |
|
165 |
|
|
166 |
select * from #temp |
|
49 | 167 |
|
50 |
END |
|
168 |
SET FMTONLY ON; |
|
169 |
SET NOCOUNT OFF |
|
170 |
RETURN |
|
171 |
END; |
ConvertService/ServiceController/StationControllerSQL/dbo/Stored Procedures/SELECT_FINAL_PDF_INSERT.sql | ||
---|---|---|
8 | 8 |
@P_ID NVARCHAR(50), --ID |
9 | 9 |
@P_PROJECT_NO NVARCHAR(10), --PROJECT NO |
10 | 10 |
@P_DOCINFO_ID NVARCHAR(50), --DOCINFO ID |
11 |
@P_DOCUMENT_ID NVARCHAR(50) --DOCUMENT ID |
|
11 |
@P_DOCUMENT_ID NVARCHAR(50), --DOCUMENT ID |
|
12 |
|
|
13 |
@P_MARKUPINFO_ID NVARCHAR(50), |
|
14 |
@P_CREATE_USER_ID NVARCHAR(50), |
|
15 |
@P_TOTAL_PAGE INT, |
|
16 |
@P_STATUS INT |
|
12 | 17 |
-- @P_CREATE_USER_ID NVARCHAR(50) --CREATE USER ID |
13 | 18 |
-- @P_CREATE_DATETIME DATETIME --CREATE DATETIME |
14 | 19 |
-- @P_STATUS int --STATUS |
... | ... | |
26 | 31 |
SET NOCOUNT ON |
27 | 32 |
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; |
28 | 33 |
|
34 |
IF @P_MARKUPINFO_ID IS NULL AND @P_CREATE_USER_ID IS NULL AND @P_TOTAL_PAGE IS NULL AND @P_STATUS IS NULL |
|
35 |
Begin |
|
36 |
IF EXISTS( |
|
37 |
SELECT * FROM FINAL_PDF |
|
38 |
WHERE ID = @P_ID |
|
39 |
) |
|
40 |
BEGIN |
|
41 |
UPDATE FINAL_PDF SET PROJECT_NO = @P_PROJECT_NO, DOCINFO_ID = @P_DOCINFO_ID, DOCUMENT_ID = @P_DOCUMENT_ID |
|
42 |
WHERE ID = @P_ID |
|
43 |
END |
|
44 |
ELSE |
|
45 |
BEGIN |
|
46 |
insert into FINAL_PDF values(@P_ID, @P_PROJECT_NO, @P_DOCINFO_ID, '', '', getdate(), 0, 0, 0, NULL, NULL, NULL, @P_DOCUMENT_ID); |
|
47 |
END |
|
48 |
END |
|
49 |
ELSE |
|
29 | 50 |
Begin |
30 |
insert into FINAL_PDF values(@P_ID, @P_PROJECT_NO, @P_DOCINFO_ID, '', '', getdate(), 0, 0, 0, NULL, NULL, NULL, @P_DOCUMENT_ID); |
|
51 |
IF EXISTS( |
|
52 |
SELECT * FROM FINAL_PDF |
|
53 |
WHERE ID = @P_ID |
|
54 |
) |
|
55 |
BEGIN |
|
56 |
UPDATE FINAL_PDF SET PROJECT_NO = @P_PROJECT_NO, DOCINFO_ID = @P_DOCINFO_ID, DOCUMENT_ID = @P_DOCUMENT_ID, MARKUPINFO_ID = @P_MARKUPINFO_ID, CREATE_USER_ID = @P_CREATE_USER_ID, TOTAL_PAGE = @P_TOTAL_PAGE, STATUS = @P_STATUS |
|
57 |
WHERE ID = @P_ID |
|
58 |
END |
|
59 |
ELSE |
|
60 |
BEGIN |
|
61 |
insert into FINAL_PDF values(@P_ID, @P_PROJECT_NO, @P_DOCINFO_ID, @P_MARKUPINFO_ID, @P_CREATE_USER_ID, getdate(), @P_STATUS, @P_TOTAL_PAGE, 0, NULL, NULL, NULL, @P_DOCUMENT_ID); |
|
62 |
END |
|
31 | 63 |
End |
64 |
|
|
32 | 65 |
|
33 | 66 |
RETURN |
34 | 67 |
|
ConvertService/ServiceController/StationControllerSQL/dbo/Stored Procedures/SELECT_FINAL_PDF_ITEM.sql | ||
---|---|---|
1 | 1 |
CREATE PROCEDURE [dbo].[SELECT_FINAL_PDF_ITEM] |
2 | 2 |
( |
3 | 3 |
@P_ID NVARCHAR(50) = null, |
4 |
@P_PROJECT_NO NVARCHAR(10) = null,--PROJECT NO
|
|
4 |
@P_PROJECT_NO NVARCHAR(50)= null,--PROJECT NO
|
|
5 | 5 |
@P_DOCUMENT_ID NVARCHAR(10) = null, --DOCUMENT ID |
6 |
@P_MARKUPINFO_ID NVARCHAR(50) = null, --MARKUPINFO ID
|
|
7 |
@P_DOCINFO_ID NVARCHAR(50) = null, --DOCINFO ID
|
|
8 |
@P_DOCUMENT_NAME NVARCHAR(500) = null,--DOCUMENT NAME
|
|
6 |
@P_MARKUPINFO_ID NVARCHAR(50)= null, --MARKUPINFO ID |
|
7 |
@P_DOCINFO_ID NVARCHAR(50)= null, --DOCINFO ID |
|
8 |
@P_DOCUMENT_NAME NVARCHAR(500)= null,--DOCUMENT NAME
|
|
9 | 9 |
@P_DOCUMENT_NO NVARCHAR(50) = null,--DOCUMENT NO |
10 |
@P_CREATE_USER_ID NVARCHAR(50) = null, --CREATE USER ID
|
|
10 |
@P_CREATE_USER_ID NVARCHAR(50) = null,--CREATE USER ID |
|
11 | 11 |
|
12 |
@P_STATUS INT, --STATUS |
|
13 |
@P_TAKE_COUNT INT = NULL, --Select Item Count
|
|
12 |
@P_STATUS INT= null, --STATUS
|
|
13 |
@P_TAKE_COUNT INT= null, --Select Item Count
|
|
14 | 14 |
|
15 |
@P_GROUP_NO NVARCHAR(50) = null, --GROUP NO
|
|
16 |
@P_REVISION NVARCHAR(50), --REVISION |
|
15 |
@P_GROUP_NO NVARCHAR(50)= null, --GROUP NO |
|
16 |
@P_REVISION NVARCHAR(50)= null, --REVISION
|
|
17 | 17 |
|
18 |
@P_BEGIN_CREATE_DATETIME DATETIME = NULL,--CREATE DATETIME
|
|
19 |
@P_FINISH_CREATE_DATETIME DATETIME = NULL,--CREATE DATETIME
|
|
18 |
@P_BEGIN_CREATE_DATETIME DATETIME = null,--CREATE DATETIME
|
|
19 |
@P_FINISH_CREATE_DATETIME DATETIME= null,--CREATE DATETIME
|
|
20 | 20 |
|
21 |
@P_BEGIN_START_DATETIE DATETIME = NULL, --START DATETIME
|
|
22 |
@P_FINISH_START_DATETIME DATETIME = NULL, --START DATETIME
|
|
21 |
@P_BEGIN_START_DATETIE DATETIME = null,--START DATETIME
|
|
22 |
@P_FINISH_START_DATETIME DATETIME= null, --START DATETIME
|
|
23 | 23 |
|
24 |
@P_BEGIN_END_DATETIME DATETIME = NULL, -- END DATETIME |
|
25 |
@P_FINISH_END_DATETIME DATETIME = NULL, --END DATETIME |
|
26 |
@P_DOCUMENT_URL NVARCHAR(500) |
|
24 |
@P_BEGIN_END_DATETIME DATETIME = null, -- END DATETIME |
|
25 |
@P_FINISH_END_DATETIME DATETIME = null, --END DATETIME |
|
26 |
@P_DOCUMENT_URL NVARCHAR(500)= null, |
|
27 |
@P_ExcptionCheck int = null --true 1 false 0 |
|
27 | 28 |
) |
28 | 29 |
|
29 | 30 |
/* test |
... | ... | |
55 | 56 |
|
56 | 57 |
create table #temp |
57 | 58 |
( |
58 |
ID nvarchar(50) not null,
|
|
59 |
PROJECT_NO nvarchar(10) not null,
|
|
59 |
ID nvarchar(50), |
|
60 |
PROJECT_NO nvarchar(50),
|
|
60 | 61 |
|
61 |
ORIGINAL_FILE nvarchar(500) null,
|
|
62 |
DOCUMENT_ID nvarchar(50) not null,
|
|
63 |
MARKUPINFO_ID NVARCHAR(50) not null,
|
|
64 |
DOCINFO_ID NVARCHAR(50) not null,
|
|
62 |
ORIGINAL_FILE nvarchar(500), |
|
63 |
DOCUMENT_ID nvarchar(50), |
|
64 |
MARKUPINFO_ID NVARCHAR(50), |
|
65 |
DOCINFO_ID NVARCHAR(50), |
|
65 | 66 |
|
66 |
DOCUMENT_NAME nvarchar(500) null,
|
|
67 |
DOCUMENT_NO nvarchar(50) null,
|
|
67 |
DOCUMENT_NAME nvarchar(500), |
|
68 |
DOCUMENT_NO nvarchar(50), |
|
68 | 69 |
|
69 |
CREATE_USER_ID NVARCHAR(50) not null,
|
|
70 |
STATUS int not null,
|
|
70 |
CREATE_USER_ID NVARCHAR(50), |
|
71 |
STATUS int, |
|
71 | 72 |
|
72 |
GROUP_NO NVARCHAR(50) null,
|
|
73 |
REVISION NVARCHAR(50) null,
|
|
73 |
GROUP_NO NVARCHAR(50), |
|
74 |
REVISION NVARCHAR(50), |
|
74 | 75 |
|
75 |
CREATE_DATETIME datetime not null,
|
|
76 |
CREATE_DATETIME datetime, |
|
76 | 77 |
|
77 |
TOTAL_PAGE int not null,
|
|
78 |
CURRENT_PAGE int not null,
|
|
79 |
EXCEPTION nvarchar(max) null,
|
|
80 |
END_DATETIME datetime null,
|
|
81 |
START_DATETIME datetime null,
|
|
78 |
TOTAL_PAGE int, |
|
79 |
CURRENT_PAGE int, |
|
80 |
EXCEPTION nvarchar(max), |
|
81 |
END_DATETIME datetime, |
|
82 |
START_DATETIME datetime , |
|
82 | 83 |
|
83 |
RESULT_FILE nvarchar(500) null,
|
|
84 |
RESULT nvarchar(50) null,
|
|
84 |
RESULT_FILE nvarchar(500), |
|
85 |
RESULT nvarchar(50), |
|
85 | 86 |
|
86 | 87 |
PROPERTIES_VALUE NVARCHAR(max), |
87 | 88 |
CONVERT_PATH NVARCHAR(max) |
... | ... | |
156 | 157 |
--PRINT @sqlCommand; |
157 | 158 |
|
158 | 159 |
-- PROJECT NO |
159 |
IF @P_PROJECT_NO IS not NULL |
|
160 |
IF @P_PROJECT_NO IS not NULL AND @P_PROJECT_NO != 'Selected All'
|
|
160 | 161 |
BEGIN |
161 | 162 |
SET @WhereCommand = @WhereCommand + ' [FINAL_PDF].[PROJECT_NO] = ''' + @P_PROJECT_NO +'''' |
162 | 163 |
END |
... | ... | |
242 | 243 |
BEGIN |
243 | 244 |
SET @WhereCommand = @WhereCommand + '[FINAL_PDF].[STATUS] > 4 ' |
244 | 245 |
END |
246 |
ELSE IF @P_STATUS = 1000 |
|
247 |
BEGIN |
|
248 |
SET @WhereCommand = @WhereCommand + '[FINAL_PDF].[STATUS] > 0 ' |
|
249 |
END |
|
245 | 250 |
ELSE IF @P_STATUS IS NOT NULL |
246 | 251 |
BEGIN |
247 | 252 |
SET @WhereCommand = @WhereCommand + '[FINAL_PDF].[STATUS] = ' + CAST(@P_STATUS AS varchar(10)) |
... | ... | |
337 | 342 |
SET @WhereCommand = @WhereCommand + '( [FINAL_PDF].[END_DATETIME] < ''' + CAST( @P_FINISH_END_DATETIME AS nvarchar(20)) + ''' )' |
338 | 343 |
END |
339 | 344 |
|
345 |
IF @P_ExcptionCheck IS NOT NULL |
|
346 |
BEGIN |
|
347 |
IF @P_ExcptionCheck = 'true' |
|
348 |
BEGIN |
|
349 |
SET @WhereCommand = @WhereCommand + ' AND [FINAL_PDF].[EXCEPTION] is not null AND [FINAL_PDF].[EXCEPTION] != '''' ' |
|
350 |
end |
|
351 |
END |
|
352 |
|
|
340 | 353 |
SET @WhereCommand = @WhereCommand + ' ORDER BY [FINAL_PDF].[CREATE_DATETIME] DESC ' |
341 | 354 |
|
342 | 355 |
--PRINT @WhereCommand; |
ConvertService/ServiceController/StationControllerSQL/dbo/Stored Procedures/SELECT_RERECONVERT_ITEM.sql | ||
---|---|---|
5 | 5 |
-- ============================================= |
6 | 6 |
CREATE PROCEDURE [dbo].[SELECT_RERECONVERT_ITEM] |
7 | 7 |
( |
8 |
@P_ID NVARCHAR(50) , --ID |
|
9 |
@P_RECONVERTER int, |
|
10 |
@P_CREATE_DATETIME datetime null, |
|
11 |
@P_STATUS int null, |
|
12 |
@P_END_DATETIME datetime null
|
|
8 |
@P_ID NVARCHAR(50) = null , --ID
|
|
9 |
@P_RECONVERTER int = null,
|
|
10 |
@P_CREATE_DATETIME datetime = null,
|
|
11 |
@P_STATUS int = null,
|
|
12 |
@P_END_DATETIME datetime = null
|
|
13 | 13 |
) |
14 | 14 |
AS |
15 | 15 |
BEGIN |
... | ... | |
18 | 18 |
SET NOCOUNT ON |
19 | 19 |
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; |
20 | 20 |
|
21 |
|
|
22 | 21 |
Begin |
23 | 22 |
UPDATE [CONVERTER_DOC] |
24 |
SET [RECONVERTER] = @P_RECONVERTER , [CONVERTER_DOC].[CREATE_DATETIME] = @P_CREATE_DATETIME, [CONVERTER_DOC].[END_DATETIME] = @P_END_DATETIME , [STATUS] = @P_STATUS, [CONVERTER_DOC].[CONVERT_COUNT] = |
|
25 |
CASE |
|
26 |
WHEN [CONVERTER_DOC].[CONVERT_COUNT] IS NULL THEN 1 |
|
27 |
WHEN [CONVERTER_DOC].[CONVERT_COUNT] is not NULL THEN [CONVERTER_DOC].[CONVERT_COUNT] + 1 |
|
28 |
END |
|
23 |
SET [RECONVERTER] = @P_RECONVERTER , [CONVERTER_DOC].[CREATE_DATETIME] = @P_CREATE_DATETIME, [CONVERTER_DOC].[END_DATETIME] = @P_END_DATETIME , [STATUS] = @P_STATUS |
|
29 | 24 |
WHERE [CONVERTER_DOC].[ID] = @P_ID |
30 |
End |
|
25 |
END |
|
26 |
|
|
27 |
-- IF NOT EXISTS (SELECT * FROM CONVERTER_DOC WHERE ID = @P_ID AND STATUS < 4) |
|
28 |
-- BEGIN |
|
29 |
-- RETURN 'SELECT * FROM CONVERTER_DOC WHERE ID = @P_ID AND STATUS < 4'; |
|
30 |
-- End |
|
31 |
--ELSE |
|
32 |
-- RETURN '성공' |
|
31 | 33 |
|
32 | 34 |
SET FMTONLY ON; |
33 | 35 |
SET NOCOUNT OFF |
ConvertService/ServiceController/StationControllerSQL/dbo/Tables/CONVERTER_DOC.sql | ||
---|---|---|
12 | 12 |
[START_DATETIME] DATETIME NULL, |
13 | 13 |
[SERVICE_ID] NVARCHAR (50) NULL, |
14 | 14 |
[RECONVERTER] INT NOT NULL, |
15 |
[CONVERT_COUNT] INT NULL, |
|
16 | 15 |
CONSTRAINT [PK_CONVERTER_DOC] PRIMARY KEY CLUSTERED ([ID] ASC) |
17 | 16 |
); |
18 | 17 |
|
18 |
|
|
19 |
|
ConvertService/ServiceController/StationControllerSQL/dbo/Tables/DOCUMENT_ITEM.sql | ||
---|---|---|
10 | 10 |
[RESULT] NVARCHAR (50) NULL, |
11 | 11 |
[PROJECT_NO] NVARCHAR (10) NOT NULL, |
12 | 12 |
[Link] NVARCHAR (500) NULL, |
13 |
[CreateDate] DATETIME CONSTRAINT [DF_DOCUMENT_ITEM_CreateDate] DEFAULT (getutcdate()) NULL, |
|
13 | 14 |
CONSTRAINT [PK_DOCUMENT_ITEM] PRIMARY KEY CLUSTERED ([ID] ASC) |
14 | 15 |
); |
15 | 16 |
|
17 |
|
|
18 |
|
FinalService/KCOM_FinalService/FinalPDFClient/FinalPDFClient.csproj | ||
---|---|---|
67 | 67 |
<DependentUpon>MainWindow.xaml</DependentUpon> |
68 | 68 |
<SubType>Code</SubType> |
69 | 69 |
</Compile> |
70 |
<None Include="Themes\Generic.xaml"> |
|
71 |
<Generator>MSBuild:Compile</Generator> |
|
72 |
<SubType>Designer</SubType> |
|
73 |
</None> |
|
74 | 70 |
<None Include="Window1.xaml"> |
75 | 71 |
<SubType>Designer</SubType> |
76 | 72 |
<Generator>MSBuild:Compile</Generator> |
FinalService/KCOM_FinalService/FinalPDFClient/Themes/Generic.xaml | ||
---|---|---|
1 |
<ResourceDictionary |
|
2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
4 |
xmlns:local="clr-namespace:FinalPDFClient"> |
|
5 |
|
|
6 |
|
|
7 |
<Style TargetType="{x:Type local:CustomControl1}"> |
|
8 |
<Setter Property="Template"> |
|
9 |
<Setter.Value> |
|
10 |
<ControlTemplate TargetType="{x:Type local:CustomControl1}"> |
|
11 |
<Border Background="{TemplateBinding Background}" |
|
12 |
BorderBrush="{TemplateBinding BorderBrush}" |
|
13 |
BorderThickness="{TemplateBinding BorderThickness}"> |
|
14 |
</Border> |
|
15 |
</ControlTemplate> |
|
16 |
</Setter.Value> |
|
17 |
</Setter> |
|
18 |
</Style> |
|
19 |
</ResourceDictionary> |
FinalService/KCOM_FinalService/KCOM_FinalService.sln | ||
---|---|---|
29 | 29 |
EndProject |
30 | 30 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FinalPDFClient", "FinalPDFClient\FinalPDFClient.csproj", "{DBD7598F-130F-4605-9B11-FE955A59FD4A}" |
31 | 31 |
EndProject |
32 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Markus.Fonts", "Markus.Fonts\Markus.Fonts.csproj", "{EB1DE04A-D86E-4BF7-B095-F72207923C3B}" |
|
32 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Markus.Fonts", "..\..\Markus.Fonts\Markus.Fonts.csproj", "{EB1DE04A-D86E-4BF7-B095-F72207923C3B}"
|
|
33 | 33 |
EndProject |
34 | 34 |
Global |
35 | 35 |
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
FinalService/KCOM_FinalService/MarkupToPDF/Common/CommonFont.cs | ||
---|---|---|
20 | 20 |
|
21 | 21 |
public static BaseFont CreateBaseFont(System.Windows.Media.FontFamily fontFamily, string encoding, bool embedded, bool cached) |
22 | 22 |
{ |
23 |
var fileName = MarkusFont.FontDictionary.GetMarkusFont(fontFamily).FileName;
|
|
23 |
var fileName = MarkusFont.FontDictionary.GetMarkusFont(fontFamily).ResourceName;
|
|
24 | 24 |
|
25 | 25 |
return CreateBaseFont(fileName, encoding, embedded, cached); |
26 | 26 |
} |
FinalService/KCOM_FinalService/MarkupToPDF/Controls_PDF/PDFLib_DrawSet_Text.cs | ||
---|---|---|
81 | 81 |
//string ARIALUNI_TFF = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "Arial"); |
82 | 82 |
|
83 | 83 |
BaseFont bf = CommonFont.CreateBaseFont(Markus.Fonts.FontDictionary.FONT_ARIAL, BaseFont.WINANSI, BaseFont.EMBEDDED, BaseFont.CACHED); |
84 |
|
|
85 | 84 |
#endregion |
86 | 85 |
|
87 | 86 |
#region 박스 영역 계산 |
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs | ||
---|---|---|
472 | 472 |
} |
473 | 473 |
catch (Exception ex) |
474 | 474 |
{ |
475 |
throw ex;
|
|
475 |
throw new Exception(ex.ToString() + ex.InnerException?.ToString());
|
|
476 | 476 |
} |
477 | 477 |
} |
478 | 478 |
#endregion |
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.csproj | ||
---|---|---|
171 | 171 |
</Page> |
172 | 172 |
</ItemGroup> |
173 | 173 |
<ItemGroup> |
174 |
<ProjectReference Include="..\..\..\Markus.Fonts\Markus.Fonts.csproj"> |
|
175 |
<Project>{eb1de04a-d86e-4bf7-b095-f72207923c3b}</Project> |
|
176 |
<Name>Markus.Fonts</Name> |
|
177 |
</ProjectReference> |
|
174 | 178 |
<ProjectReference Include="..\CommonLib\CommonLib.csproj"> |
175 | 179 |
<Project>{ee9aaabc-1678-43a4-878e-cedbb577cf01}</Project> |
176 | 180 |
<Name>CommonLib</Name> |
... | ... | |
183 | 187 |
<Project>{629dc8cd-d458-47ef-8f02-cd12c7001c3e}</Project> |
184 | 188 |
<Name>KCOMDataModel</Name> |
185 | 189 |
</ProjectReference> |
186 |
<ProjectReference Include="..\Markus.Fonts\Markus.Fonts.csproj"> |
|
187 |
<Project>{eb1de04a-d86e-4bf7-b095-f72207923c3b}</Project> |
|
188 |
<Name>Markus.Fonts</Name> |
|
189 |
</ProjectReference> |
|
190 | 190 |
</ItemGroup> |
191 | 191 |
<ItemGroup> |
192 | 192 |
<None Include="App.Config"> |
FinalService/KCOM_FinalService/MarkupToPDF/Serialize/S_Control/Base/IntTodoubleJsonConvert.cs | ||
---|---|---|
1 |
using Newtonsoft.Json; |
|
2 |
using Newtonsoft.Json.Linq; |
|
3 |
using System; |
|
4 |
using System.Collections.Generic; |
|
5 |
using System.Linq; |
|
6 |
using System.Text; |
|
7 |
using System.Threading.Tasks; |
|
8 |
|
|
9 |
namespace MarkupToPDF.Serialize.Core |
|
10 |
{ |
|
11 |
public class IntTodoubleJsonConvert : JsonConverter |
|
12 |
{ |
|
13 |
public override bool CanWrite { get { return false; } } |
|
14 |
|
|
15 |
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) |
|
16 |
{ |
|
17 |
throw new NotSupportedException(); |
|
18 |
} |
|
19 |
|
|
20 |
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) |
|
21 |
{ |
|
22 |
double value = 0.0; |
|
23 |
|
|
24 |
if(reader.TokenType != JsonToken.Float) |
|
25 |
{ |
|
26 |
double.TryParse(reader.Value?.ToString(), out value); |
|
27 |
} |
|
28 |
|
|
29 |
return value; |
|
30 |
} |
|
31 |
|
|
32 |
public override bool CanConvert(Type objectType) |
|
33 |
{ |
|
34 |
return objectType == typeof(double) || objectType == typeof(decimal); |
|
35 |
} |
|
36 |
} |
|
37 |
} |
FinalService/KCOM_FinalService/MarkupToPDF/Serialize/S_Control/Base/PointJsonConvert.cs | ||
---|---|---|
1 |
using Newtonsoft.Json; |
|
2 |
using Newtonsoft.Json.Linq; |
|
3 |
using System; |
|
4 |
using System.Collections.Generic; |
|
5 |
using System.Linq; |
|
6 |
using System.Text; |
|
7 |
using System.Threading.Tasks; |
|
8 |
using System.Windows; |
|
9 |
|
|
10 |
namespace MarkupToPDF.Serialize.Core |
|
11 |
{ |
|
12 |
public class PointJsonConvert : JsonConverter |
|
13 |
{ |
|
14 |
public override void WriteJson( |
|
15 |
JsonWriter writer, object value, JsonSerializer serializer) |
|
16 |
{ |
|
17 |
var point = (Point)value; |
|
18 |
|
|
19 |
serializer.Serialize( |
|
20 |
writer, new JObject { { "_x", point.X }, { "_y", point.Y } }); |
|
21 |
} |
|
22 |
|
|
23 |
public override object ReadJson( |
|
24 |
JsonReader reader, Type objectType, object existingValue, |
|
25 |
JsonSerializer serializer) |
|
26 |
{ |
|
27 |
|
|
28 |
if (objectType == typeof(List<Point>)) |
|
29 |
{ |
|
30 |
List<Point> result = new List<Point>(); |
|
31 |
|
|
32 |
var jarray = serializer.Deserialize<JArray>(reader); |
|
33 |
|
|
34 |
foreach (var item in jarray) |
|
35 |
{ |
|
36 |
result.Add(new Point((double)item["_x"], (double)item["_y"])); |
|
37 |
} |
|
38 |
|
|
39 |
return result; |
|
40 |
} |
|
41 |
else |
|
42 |
{ |
|
43 |
var jObject = serializer.Deserialize<JObject>(reader); |
|
44 |
|
|
45 |
return new Point((double)jObject["_x"], (double)jObject["_y"]); |
|
46 |
} |
|
47 |
} |
|
48 |
|
|
49 |
public override bool CanConvert(Type objectType) |
|
50 |
{ |
|
51 |
return objectType == typeof(Point); |
|
52 |
} |
|
53 |
} |
|
54 |
} |
FinalService/KCOM_FinalService/MarkupToPDF/Serialize/S_Control/Base/S_BaseControl.cs | ||
---|---|---|
24 | 24 |
public double Opac { get; set; } |
25 | 25 |
[DataMember] |
26 | 26 |
public string UserID { get; set; } |
27 |
|
|
27 | 28 |
[DataMember] |
28 | 29 |
public Point StartPoint { get; set; } // Start Point |
30 |
|
|
29 | 31 |
[DataMember] |
30 | 32 |
public Point EndPoint { get; set; } //EndPoint |
33 |
|
|
34 |
[DataMember] |
|
35 |
public Point MidPoint { get; set; } //MidPoint |
|
36 |
|
|
31 | 37 |
[DataMember] |
32 | 38 |
public List<Point> PointSet { get; set; } |
39 |
|
|
33 | 40 |
[DataMember] |
34 | 41 |
public double Angle { get; set; } //Angle Point |
35 | 42 |
[DataMember] |
FinalService/KCOM_FinalService/Markus.Fonts/FontDictionary.cs | ||
---|---|---|
14 | 14 |
|
15 | 15 |
public const string FONT_CALIBRI_BODY = "NanumSquareRoundR.ttf"; |
16 | 16 |
|
17 |
public const string FONT_TIMES_NEW_ROMAN = "NanumMyeongjo.ttf"; |
|
17 |
public const string FONT_TIMES_NEW_ROMAN = "NanumMyeongjo-Regular.ttf";
|
|
18 | 18 |
|
19 | 19 |
public const string FONT_VERDANA = "Verdana.ttf"; |
20 | 20 |
|
21 |
|
|
22 |
public class MarkusFont |
|
23 |
{ |
|
24 |
public string FileName { get; set; } |
|
25 |
public string[] FamilyNames { get; set; } |
|
26 |
} |
|
27 |
|
|
28 | 21 |
public static List<MarkusFont> GetMarkusFonts() |
29 | 22 |
{ |
30 | 23 |
return new List<MarkusFont> |
31 | 24 |
{ |
32 | 25 |
new MarkusFont |
33 | 26 |
{ |
34 |
FileName = FONT_ARIAL, |
|
35 |
FamilyNames = new [] {"Arial"} |
|
27 |
ResourceName = FONT_ARIAL, |
|
28 |
FamilyNames = new [] {"Arial"}, |
|
29 |
IsDefault = true |
|
36 | 30 |
}, |
37 | 31 |
new MarkusFont |
38 | 32 |
{ |
39 |
FileName = FONT_CALIBRI_BODY,
|
|
33 |
ResourceName = FONT_CALIBRI_BODY,
|
|
40 | 34 |
FamilyNames = new [] {"Calibri (Body)"} |
41 | 35 |
}, |
42 | 36 |
new MarkusFont |
43 | 37 |
{ |
44 |
FileName = FONT_VERDANA,
|
|
38 |
ResourceName = FONT_VERDANA,
|
|
45 | 39 |
FamilyNames = new [] {"Verdana"} |
46 | 40 |
}, |
47 | 41 |
new MarkusFont |
48 | 42 |
{ |
49 |
FileName = FONT_TIMES_NEW_ROMAN,
|
|
43 |
ResourceName = FONT_TIMES_NEW_ROMAN,
|
|
50 | 44 |
FamilyNames = new [] { "Times New Roman" } |
51 | 45 |
} |
52 | 46 |
}; |
... | ... | |
56 | 50 |
{ |
57 | 51 |
MarkusFont result = new MarkusFont |
58 | 52 |
{ |
59 |
FileName = FONT_ARIAL,
|
|
53 |
ResourceName = FONT_ARIAL,
|
|
60 | 54 |
FamilyNames = new[] { "Arial" } |
61 | 55 |
}; |
62 | 56 |
|
FinalService/KCOM_FinalService/Markus.Fonts/Markus.Fonts.csproj | ||
---|---|---|
46 | 46 |
<ItemGroup> |
47 | 47 |
<Compile Include="FontDictionary.cs" /> |
48 | 48 |
<Compile Include="FontHelper.cs" /> |
49 |
<Compile Include="MarkusFont.cs" /> |
|
49 | 50 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
50 | 51 |
</ItemGroup> |
51 | 52 |
<ItemGroup> |
52 |
<EmbeddedResource Include="Resources\NanumGothic.ttf" /> |
|
53 |
<EmbeddedResource Include="Resources\NanumGothic.ttf"> |
|
54 |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
55 |
</EmbeddedResource> |
|
53 | 56 |
</ItemGroup> |
54 | 57 |
<ItemGroup> |
55 |
<EmbeddedResource Include="Resources\NanumMyeongjo.ttf" /> |
|
58 |
<EmbeddedResource Include="Resources\NanumSquareRoundR.ttf"> |
|
59 |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
60 |
</EmbeddedResource> |
|
56 | 61 |
</ItemGroup> |
57 | 62 |
<ItemGroup> |
58 |
<EmbeddedResource Include="Resources\NanumBarunGothic.ttf" /> |
|
59 |
<EmbeddedResource Include="Resources\NanumSquareRoundR.ttf" /> |
|
63 |
<EmbeddedResource Include="Resources\Verdana.ttf"> |
|
64 |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
65 |
</EmbeddedResource> |
|
60 | 66 |
</ItemGroup> |
61 | 67 |
<ItemGroup> |
62 |
<EmbeddedResource Include="Resources\Verdana.ttf" /> |
|
63 |
</ItemGroup> |
|
64 |
<ItemGroup> |
|
65 |
<EmbeddedResource Include="Resources\tomnr.ttf" /> |
|
68 |
<EmbeddedResource Include="Resources\NanumMyeongjo-Regular.ttf"> |
|
69 |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
70 |
</EmbeddedResource> |
|
66 | 71 |
</ItemGroup> |
67 | 72 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
68 | 73 |
</Project> |
FinalService/KCOM_FinalService/Markus.Fonts/MarkusFont.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
|
|
6 |
namespace Markus.Fonts |
|
7 |
{ |
|
8 |
public class MarkusFont |
|
9 |
{ |
|
10 |
public string ResourceName { get; set; } |
|
11 |
public string[] FamilyNames { get; set; } |
|
12 |
|
|
13 |
public bool IsDefault { get; set; } |
|
14 |
|
|
15 |
public System.Windows.Media.FontFamily FontFamily |
|
16 |
{ |
|
17 |
get { return Markus.Fonts.FontHelper.GetFontFamily(this.ResourceName); } |
|
18 |
private set { } |
|
19 |
} |
|
20 |
} |
|
21 |
|
|
22 |
} |
ImageComparer/ComparerTestWPF/ComparerTestWPF.csproj | ||
---|---|---|
66 | 66 |
<Reference Include="System.Xaml"> |
67 | 67 |
<RequiredTargetFramework>4.0</RequiredTargetFramework> |
68 | 68 |
</Reference> |
69 |
<Reference Include="Telerik.Windows.Controls, Version=2019.3.917.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" /> |
|
70 |
<Reference Include="Telerik.Windows.Controls.ImageEditor, Version=2019.3.917.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" /> |
|
71 |
<Reference Include="Telerik.Windows.Controls.Input, Version=2019.3.917.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" /> |
|
69 |
<Reference Include="Telerik.Windows.Controls, Version=2019.1.220.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL"> |
|
70 |
<SpecificVersion>False</SpecificVersion> |
|
71 |
<HintPath>..\..\lib\RCWPF\2019.1.220.40\Telerik.Windows.Controls.dll</HintPath> |
|
72 |
</Reference> |
|
73 |
<Reference Include="Telerik.Windows.Controls.ImageEditor, Version=2019.1.220.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL"> |
|
74 |
<SpecificVersion>False</SpecificVersion> |
|
75 |
<HintPath>..\..\lib\RCWPF\2019.1.220.40\Telerik.Windows.Controls.ImageEditor.dll</HintPath> |
|
76 |
</Reference> |
|
77 |
<Reference Include="Telerik.Windows.Controls.Input, Version=2019.1.220.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL"> |
|
78 |
<SpecificVersion>False</SpecificVersion> |
|
79 |
<HintPath>..\..\lib\RCWPF\2019.1.220.40\Telerik.Windows.Controls.Input.dll</HintPath> |
|
80 |
</Reference> |
|
72 | 81 |
<Reference Include="WindowsBase" /> |
73 | 82 |
<Reference Include="PresentationCore" /> |
74 | 83 |
<Reference Include="PresentationFramework" /> |
... | ... | |
131 | 140 |
<Install>false</Install> |
132 | 141 |
</BootstrapperPackage> |
133 | 142 |
</ItemGroup> |
143 |
<ItemGroup> |
|
144 |
<ProjectReference Include="..\Markus.ImageCompare\Markus.ImageCompare.csproj"> |
|
145 |
<Project>{178149d2-68ab-4e20-8678-e9fc18c20dcb}</Project> |
|
146 |
<Name>Markus.ImageCompare</Name> |
|
147 |
</ProjectReference> |
|
148 |
</ItemGroup> |
|
134 | 149 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
135 | 150 |
</Project> |
ImageComparer/Markus.Image.sln | ||
---|---|---|
3 | 3 |
# Visual Studio 15 |
4 | 4 |
VisualStudioVersion = 15.0.28307.902 |
5 | 5 |
MinimumVisualStudioVersion = 10.0.40219.1 |
6 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Markus.Image", "Markus.ImageComparer\Markus.Image.csproj", "{B3B05CED-F4EB-4F9D-B458-12FCBE48D546}" |
|
7 |
EndProject |
|
8 | 6 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComparerTestWPF", "ComparerTestWPF\ComparerTestWPF.csproj", "{154D99CA-A021-4FFD-A590-5CEBF6C99BB3}" |
9 | 7 |
EndProject |
10 | 8 |
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Nuget", "Nuget", "{101826B1-FAA0-42AE-B81E-BF0B4CAD526F}" |
... | ... | |
14 | 12 |
EndProject |
15 | 13 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Markus.Image.EMGU", "Markus.ImageComparer.EMGU\Markus.Image.EMGU.csproj", "{96437AC2-24F9-48A7-AC24-221086017BB3}" |
16 | 14 |
EndProject |
15 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Markus.ImageCompare", "Markus.ImageCompare\Markus.ImageCompare.csproj", "{178149D2-68AB-4E20-8678-E9FC18C20DCB}" |
|
16 |
EndProject |
|
17 | 17 |
Global |
18 | 18 |
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
19 | 19 |
Debug|Any CPU = Debug|Any CPU |
20 | 20 |
Release|Any CPU = Release|Any CPU |
21 | 21 |
EndGlobalSection |
22 | 22 |
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
23 |
{B3B05CED-F4EB-4F9D-B458-12FCBE48D546}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
24 |
{B3B05CED-F4EB-4F9D-B458-12FCBE48D546}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
25 |
{B3B05CED-F4EB-4F9D-B458-12FCBE48D546}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
26 |
{B3B05CED-F4EB-4F9D-B458-12FCBE48D546}.Release|Any CPU.Build.0 = Release|Any CPU |
|
27 | 23 |
{154D99CA-A021-4FFD-A590-5CEBF6C99BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
28 | 24 |
{154D99CA-A021-4FFD-A590-5CEBF6C99BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU |
29 | 25 |
{154D99CA-A021-4FFD-A590-5CEBF6C99BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU |
... | ... | |
32 | 28 |
{96437AC2-24F9-48A7-AC24-221086017BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU |
33 | 29 |
{96437AC2-24F9-48A7-AC24-221086017BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU |
34 | 30 |
{96437AC2-24F9-48A7-AC24-221086017BB3}.Release|Any CPU.Build.0 = Release|Any CPU |
31 |
{178149D2-68AB-4E20-8678-E9FC18C20DCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
32 |
{178149D2-68AB-4E20-8678-E9FC18C20DCB}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
33 |
{178149D2-68AB-4E20-8678-E9FC18C20DCB}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
34 |
{178149D2-68AB-4E20-8678-E9FC18C20DCB}.Release|Any CPU.Build.0 = Release|Any CPU |
|
35 | 35 |
EndGlobalSection |
36 | 36 |
GlobalSection(SolutionProperties) = preSolution |
37 | 37 |
HideSolutionNode = FALSE |
ImageComparer/Markus.ImageCompare/CompareStatus.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.ComponentModel; |
|
4 |
using System.Linq; |
|
5 |
using System.Runtime.CompilerServices; |
|
6 |
using System.Text; |
|
7 |
using System.Threading.Tasks; |
|
8 |
|
|
9 |
namespace Markus.Image |
|
10 |
{ |
|
11 |
public class CompareProgress : INotifyPropertyChanged |
|
12 |
{ |
|
13 |
private string message; |
|
14 |
private double percentage; |
|
15 |
private CompareStatus status; |
|
16 |
|
|
17 |
public string Message { get => message; |
|
18 |
set |
|
19 |
{ |
|
20 |
if (value != this.message) |
|
21 |
{ |
|
22 |
this.message = value; |
|
23 |
NotifyPropertyChanged(); |
|
24 |
} |
|
25 |
} |
|
26 |
} |
|
27 |
|
|
28 |
public double Percentage { get => percentage; |
|
29 |
set |
|
30 |
{ |
|
31 |
if (value != this.percentage) |
|
32 |
{ |
|
33 |
this.percentage = value; |
|
34 |
NotifyPropertyChanged(); |
|
35 |
} |
|
36 |
} |
|
37 |
} |
|
38 |
|
|
39 |
public CompareStatus Status { get => status; |
|
40 |
set |
|
41 |
{ |
|
42 |
if (value != this.status) |
|
43 |
{ |
|
44 |
this.status = value; |
|
45 |
NotifyPropertyChanged(); |
|
46 |
} |
|
47 |
} |
|
48 |
} |
|
49 |
|
|
50 |
public event PropertyChangedEventHandler PropertyChanged; |
|
51 |
|
|
52 |
// This method is called by the Set accessor of each property. |
|
53 |
// The CallerMemberName attribute that is applied to the optional propertyName |
|
54 |
// parameter causes the property name of the caller to be substituted as an argument. |
|
55 |
private void NotifyPropertyChanged([CallerMemberName] String propertyName = "") |
|
56 |
{ |
|
57 |
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
|
58 |
} |
|
59 |
} |
|
60 |
|
|
61 |
public enum CompareStatus |
|
62 |
{ |
|
63 |
Loading = 0, Comparison = 1, Detection = 2 |
|
64 |
} |
|
65 |
} |
ImageComparer/Markus.ImageCompare/ImageCompare.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Drawing; |
|
4 |
using System.Drawing.Imaging; |
|
5 |
using System.Linq; |
|
6 |
using System.Text; |
|
7 |
using System.Threading.Tasks; |
|
8 |
|
|
9 |
namespace Markus.Image |
|
10 |
{ |
|
11 |
public class ImageCompare : ImageCompareBase |
|
12 |
{ |
|
13 |
/// <summary> |
|
14 |
/// 이미지를 비교 후 원본 이미지에 Rect를 그린다. |
|
15 |
/// </summary> |
|
16 |
/// <param name="Originalbitmap">원본 이미지</param> |
|
17 |
/// <param name="TargatBitmap">비교대상 이미지</param> |
|
18 |
/// <param name="ResultRectSize">반환되는 Rect의 사이즈</param> |
|
19 |
/// <returns></returns> |
|
20 |
public Bitmap CompareDrawRects(System.Drawing.Bitmap Originalbitmap, System.Drawing.Bitmap TargatBitmap, Size ResultRectSize) |
|
21 |
{ |
|
22 |
var rects = CompareReturnRects(Originalbitmap, TargatBitmap, ResultRectSize); |
|
23 |
|
|
24 |
if (rects.Count != 0) |
|
25 |
{ |
|
26 |
using (Graphics g = Graphics.FromImage(Originalbitmap)) |
|
27 |
{ |
|
28 |
var rect = rects.Select(x => new System.Drawing.Rectangle((int)x.X, (int)x.Y, (int)x.Width, (int)x.Height)).ToList(); |
|
29 |
|
|
30 |
g.DrawRectangles(new Pen(Brushes.Red, 5f), rect.ToArray()); |
|
31 |
g.Save(); |
|
32 |
|
|
33 |
g.Dispose(); |
|
34 |
} |
|
35 |
} |
|
36 |
|
|
37 |
return Originalbitmap; |
|
38 |
} |
|
39 |
|
|
40 |
public System.Windows.Media.Imaging.BitmapSource CompareDrawRects(System.Windows.Media.Imaging.BitmapSource Originalbitmap, System.Windows.Media.Imaging.BitmapSource TargatBitmap, Size ResultRectSize) |
|
41 |
{ |
|
42 |
var _Originalbitmap = CreateBitmapFromSource(Originalbitmap); |
|
43 |
var _TargatBitmap = CreateBitmapFromSource(TargatBitmap); |
|
44 |
|
|
45 |
var rects = CompareReturnRects(_Originalbitmap, _TargatBitmap, ResultRectSize); |
|
46 |
|
|
47 |
if (rects.Count != 0) |
|
48 |
{ |
|
49 |
using (Graphics g = Graphics.FromImage(_Originalbitmap)) |
|
50 |
{ |
|
51 |
var rect = rects.Select(x => new System.Drawing.Rectangle((int)x.X, (int)x.Y, (int)x.Width, (int)x.Height)); |
|
52 |
|
|
53 |
g.DrawRectangles(new Pen(Brushes.Blue, 3f), rect.ToArray()); |
|
54 |
g.Save(); |
|
55 |
|
|
56 |
g.Dispose(); |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
return CreateBitmapSourceFromBitmap(_Originalbitmap); |
|
61 |
} |
|
62 |
|
|
63 |
public List<System.Windows.Rect> CompareReturnRects(string OriginalbitmapUri, string TargatBitmapUri, Size ResultRectSize) |
|
64 |
{ |
|
65 |
List<System.Windows.Rect> result = new List<System.Windows.Rect>(); |
|
66 |
|
|
67 |
Bitmap Originalbitmap = null; |
|
68 |
Bitmap TargatBitmap = null; |
|
69 |
|
|
70 |
try |
|
71 |
{ |
|
72 |
Originalbitmap = LoadPicture(OriginalbitmapUri); |
|
73 |
TargatBitmap = LoadPicture(TargatBitmapUri); |
|
74 |
|
|
75 |
result = CompareReturnRects(Originalbitmap, TargatBitmap, ResultRectSize); |
|
76 |
} |
|
77 |
catch (Exception) |
|
78 |
{ |
|
79 |
throw; |
|
80 |
} |
|
81 |
finally |
|
82 |
{ |
|
83 |
Originalbitmap.Dispose(); |
|
84 |
TargatBitmap.Dispose(); |
|
85 |
} |
|
86 |
|
|
87 |
return result; |
|
88 |
} |
|
89 |
|
|
90 |
/// <summary> |
|
91 |
/// 이미지를 비교 후 해당 영역을 Rect로 반환한다. |
|
92 |
/// </summary> |
|
93 |
/// <param name="Originalbitmap">원본 이미지</param> |
|
94 |
/// <param name="TargatBitmap">비교대상 이미지</param> |
|
95 |
/// <param name="ResultRectSize">반환되는 Rect의 사이즈</param> |
|
96 |
/// <returns></returns> |
|
97 |
public List<System.Windows.Rect> CompareReturnRects(System.Drawing.Bitmap Originalbitmap, System.Drawing.Bitmap TargatBitmap, Size ResultRectSize) |
|
98 |
{ |
|
99 |
List<System.Windows.Rect> result = new List<System.Windows.Rect>(); |
|
100 |
|
|
101 |
try |
|
102 |
{ |
|
103 |
List<System.Windows.Rect> rects = new List<System.Windows.Rect>(); |
|
104 |
|
|
105 |
var data = MathchesImageData(Originalbitmap, TargatBitmap); |
|
106 |
|
|
107 |
result = GetMatchPixels(data, ResultRectSize); |
|
108 |
|
|
109 |
//if (rects.Count() > 0) |
|
110 |
//{ |
|
111 |
// result = Merge(rects, ResultRectSize.Height); |
|
112 |
//} |
|
113 |
|
|
114 |
//result = JoinRectList(rects); |
|
115 |
} |
|
116 |
catch (Exception ex) |
|
117 |
{ |
|
118 |
throw ex; |
|
119 |
} |
|
120 |
finally |
|
121 |
{ |
|
122 |
|
|
123 |
} |
|
124 |
|
|
125 |
return result; |
|
126 |
} |
|
127 |
|
|
128 |
/// <summary> |
|
129 |
/// 이미지를 비교 후 원본 이미지에 Rect를 그린다. |
|
130 |
/// 메모리 문제 발생 |
내보내기 Unified diff