Quellcode durchsuchen

创建Excel解析时间格式的工具类,创建解析数字类型的工具类,并根据测试不断修改代码

胡北宽 vor 1 Woche
Ursprung
Commit
bc9b8cab86

+ 6
- 4
src/main/java/com/example/backend/service/contract/impl/SalesContractServiceImpl.java Datei anzeigen

258
                                 errors.add("主表(Sheet1) 第 " + currentRow + " 行:我方名称有误!");
258
                                 errors.add("主表(Sheet1) 第 " + currentRow + " 行:我方名称有误!");
259
                                 currentRowValid = false;
259
                                 currentRowValid = false;
260
                             }
260
                             }
261
-                            if (foursnameList != null && !foursnameList.get(0).getFno().isEmpty()) {
262
-                                if(!entity.getFours().equals(foursnameList.get(0).getFno())){
263
-                                    errors.add("主表(Sheet1) 第 " + currentRow + " 行:我方编号与匹配到的不符合!");
264
-                                }
261
+
262
+                            if(foursnameList != null && foursnameList.get(0).getFno().isEmpty()){
263
+                                errors.add("主表(Sheet1) 第 " + currentRow + " 行:我方编号不能为空!");
265
                                 currentRowValid = false;
264
                                 currentRowValid = false;
266
                             }
265
                             }
266
+                            if (foursnameList != null && !foursnameList.get(0).getFno().isEmpty()) {
267
+                                entity.setFours(foursnameList.get(0).getFno());
268
+                            }
267
 
269
 
268
                             if (foursnameList != null && !foursnameList.get(0).getOurBankNm().isEmpty()) {
270
                             if (foursnameList != null && !foursnameList.get(0).getOurBankNm().isEmpty()) {
269
                                 entity.setOurBankNm(foursnameList.get(0).getOurBankNm());
271
                                 entity.setOurBankNm(foursnameList.get(0).getOurBankNm());

Laden…
Abbrechen
Speichern