|
@@ -171,7 +171,7 @@ public class TWorkcertificateController extends BaseController
|
|
|
// int cellNum = row.getPhysicalNumberOfCells();
|
|
|
if(row==null){
|
|
|
sheet.removeRow(row);
|
|
|
- i--;
|
|
|
+ rowNum++;
|
|
|
continue;
|
|
|
}
|
|
|
int cellNum = row.getLastCellNum();
|
|
@@ -192,6 +192,7 @@ public class TWorkcertificateController extends BaseController
|
|
|
} else if (j == 1) {
|
|
|
entity.setName(cellValue);//姓名
|
|
|
} else if (j == 2) {
|
|
|
+ cellValue=supplementZero(Integer.parseInt(cellValue));
|
|
|
entity.setEmployeeid(cellValue);//员工号
|
|
|
} else if (j == 3) {
|
|
|
for (SysDictData p : classes) {
|
|
@@ -300,4 +301,13 @@ public class TWorkcertificateController extends BaseController
|
|
|
logger.info("failRow:" +String.valueOf(failRow));
|
|
|
return AjaxResult.success(String.valueOf(successNumber), failRow);
|
|
|
}
|
|
|
+
|
|
|
+ //补全员工编号的前缀 0
|
|
|
+ public static String supplementZero(int randomNum){
|
|
|
+
|
|
|
+ String newString = String.format("%0" + 5+ "d", randomNum);
|
|
|
+
|
|
|
+ return newString;
|
|
|
+ }
|
|
|
+
|
|
|
}
|