프로젝트

일반

사용자정보

개정판 422f620d

ID422f620dfef31b78a41b1b1570eb3a3d91d508d2
상위 295ce375
하위 367fc955

김태성이(가) 일년 이상 전에 추가함

issue #00000 ID2Excel - attfiles 추가 수정

Change-Id: I738eab2091c6a4b013c2d2e7eb055002e6509704

차이점 보기:

ID2.Manager/ID2.Manager.Common/Helpers/ID2Excel.cs
80 80
            return result;
81 81
        }
82 82

  
83
        private byte[] ExcelToImageData(string base64String)
84
        {
85
            var str = CompressHelper.DecompressString(base64String);
86

  
87
            return Convert.FromBase64String(str);
88
        }
89

  
83 90

  
84 91
        public ImportResult ExcelDataImport(List<ExcelData> ExcelData)
85 92
        {
......
158 165
                foreach (var row in ExcelData.Where(row => row.ROW_INDEX > exRow).GroupBy(x => x.ROW_INDEX))
159 166
                {
160 167
                    var document = new Documents();
168
                    document.DocID = Guid.NewGuid().ToString();
161 169

  
162
                    foreach (var cell in row)
170
                    foreach (var cell in row.OrderBy(x=>x.COUMMN_INDEX))
163 171
                    {
164 172
                        var value = cell.VALUE.DefalutValue();
165 173

  
......
194 202
                                document.ToCreator = this.GetUser(value).ID;
195 203
                                break;
196 204
                            case 15:
197
                                result.Images.Add(GetImage(value));
205
                                if (value != null)
206
                                {
207
                                    if (document.AttFiles == null)
208
                                    {
209
                                        document.AttFiles = new List<AttFileInfo>();
210
                                    }
211

  
212
                                    document.AttFiles.Add(new AttFileInfo
213
                                    {
214
                                        FileID = Guid.NewGuid().ToString(),
215
                                        RefID = document.DocID,
216
                                        Category = "toreview",
217
                                        FileType = "image/png",
218
                                        FileName = "ClipBoard",
219
                                        FilePath = "ClipBoard",
220
                                        FileExtension = ".png",
221
                                        CreatedDate = DateTime.Now,
222
                                        Creator = document.ToCreator,
223
                                        FileData = ExcelToImageData(value)
224

  
225
                                    });
226
                                }
198 227
                                break;
199 228
                            case 17:
200 229
                                document.FrReviewStatus = value;
......
205 234
                            case 19:
206 235
                                document.FrCreator = this.GetUser(value).ID;
207 236
                                break;
237
                            case 20:
238
                                if (value != null)
239
                                {
240
                                    if (document.AttFiles == null)
241
                                    {
242
                                        document.AttFiles = new List<AttFileInfo>();
243
                                    }
244

  
245
                                    document.AttFiles.Add(new AttFileInfo
246
                                    {
247
                                        FileID = Guid.NewGuid().ToString(),
248
                                        RefID = document.DocID,
249
                                        Category = "frreview",
250
                                        FileType = "image/png",
251
                                        FileName = "ClipBoard",
252
                                        FilePath = "ClipBoard",
253
                                        FileExtension = ".png",
254
                                        CreatedDate = DateTime.Now,
255
                                        Creator = document.FrCreator,
256
                                        FileData = ExcelToImageData(value)
257

  
258
                                    });
259
                                }
260
                                break;
208 261
                            case 22:
209 262
                                document.IsID2Work = value;
210 263
                                break;

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)