Commit 4d15bfdc authored by huyuchen's avatar huyuchen

法大大代码提交

parent 66e821a8
...@@ -174,6 +174,30 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM ...@@ -174,6 +174,30 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
List<TElecEmployeeInfo> infolist = new ArrayList<>(); List<TElecEmployeeInfo> infolist = new ArrayList<>();
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement();
//添加进filesName
String empInfo = entry.getName();
// 如果是文件夹,就创建个文件夹
if (!entry.isDirectory()) {
if (empInfo.length() > empInfo.lastIndexOf("/") + 1) {
String idCard = empInfo.substring(0, empInfo.indexOf("/"));
String dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/"));
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT));
if (Common.isEmpty(tEmployeeInfo)) {
return R.failed("未找到身份证对应的档案信息,身份证号:" + idCard);
}
if (Common.isNotNull(elecTypeMap)) {
if (!Common.isNotNull(elecTypeMap.get(dataType))) {
return R.failed("资料类型错误:" + dataType);
}
}
}
}
}
while (entries.hasMoreElements()) { while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement(); ZipEntry entry = (ZipEntry) entries.nextElement();
//添加进filesName //添加进filesName
...@@ -221,7 +245,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM ...@@ -221,7 +245,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
if (Common.isNotNull(elecTypeMap.get(dataType))) { if (Common.isNotNull(elecTypeMap.get(dataType))) {
tElecEmployeeInfo.setDataType(elecTypeMap.get(dataType)); tElecEmployeeInfo.setDataType(elecTypeMap.get(dataType));
} else { } else {
throw new CheckedException("资料类型错误:" + dataType); return R.failed("资料类型错误:" + dataType);
} }
} }
String id = insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType); String id = insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment