2024年10月31日 修复清洗照片会造成清洗2023年的问题
This commit is contained in:
parent
7d7a2c706c
commit
f3dd522749
|
@ -207,20 +207,28 @@ public class TGkPicinfoController extends JeecgController<TGkPicinfo, ITGkPicinf
|
||||||
//int yearI = Integer.parseInt(year);
|
//int yearI = Integer.parseInt(year);
|
||||||
|
|
||||||
//核心学生信息
|
//核心学生信息
|
||||||
List<TFreshman> freshmanList = tFreshmanService.query().list();
|
QueryWrapper<TFreshman> tfqw = new QueryWrapper<>();
|
||||||
Map<String, TFreshman> freshmanMap = freshmanList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getSfzh()),(a) -> a, (a,b) -> a));
|
tfqw.lambda().eq(TFreshman::getNj, year);
|
||||||
Map<String, TFreshman> freshmanMap2 = freshmanList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getKsh()),(a) -> a, (a,b) -> a));
|
List<TFreshman> freshmanList = tFreshmanService.list(tfqw);
|
||||||
Map<String, TFreshman> freshmanMap3 = freshmanList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getXh()),(a) -> a, (a,b) -> a));
|
Map<String, TFreshman> freshmanMap = freshmanList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getSfzh() + "-" + x.getNj()),(a) -> a, (a,b) -> a));
|
||||||
|
Map<String, TFreshman> freshmanMap2 = freshmanList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getKsh() + "-" + x.getNj()),(a) -> a, (a,b) -> a));
|
||||||
|
Map<String, TFreshman> freshmanMap3 = freshmanList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getXh() + "-" + x.getNj()),(a) -> a, (a,b) -> a));
|
||||||
|
|
||||||
//高考信息
|
//高考信息
|
||||||
List<TGkPicinfo> gkPicinfoList = tGkPicinfoService.query().list();
|
QueryWrapper<TGkPicinfo> tgqw = new QueryWrapper<>();
|
||||||
Map<String, TGkPicinfo> gkPicinfoMap = gkPicinfoList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getSfzh()),(a) -> a, (a,b) -> a));
|
tgqw.lambda().eq(TGkPicinfo::getNj, year);
|
||||||
|
List<TGkPicinfo> gkPicinfoList = tGkPicinfoService.list(tgqw);
|
||||||
|
Map<String, TGkPicinfo> gkPicinfoMap = gkPicinfoList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getSfzh() + "-" + x.getNj()),(a) -> a, (a,b) -> a));
|
||||||
//身份证信息
|
//身份证信息
|
||||||
List<TSfzPicinfo> sfzPicinfoList = tSfzPicinfoService.query().list();
|
QueryWrapper<TSfzPicinfo> tsqw = new QueryWrapper<>();
|
||||||
Map<String, TSfzPicinfo> sfzPicinfoMap = sfzPicinfoList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getSfzh()),(a) -> a, (a,b) -> a));
|
tsqw.lambda().eq(TSfzPicinfo::getNj, year);
|
||||||
|
List<TSfzPicinfo> sfzPicinfoList = tSfzPicinfoService.list(tsqw);
|
||||||
|
Map<String, TSfzPicinfo> sfzPicinfoMap = sfzPicinfoList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getSfzh() + "-" + x.getNj()),(a) -> a, (a,b) -> a));
|
||||||
//学籍信息
|
//学籍信息
|
||||||
List<TXjPicinfo> xjPicinfoList = tXjPicinfoService.query().list();
|
QueryWrapper<TXjPicinfo> txqw = new QueryWrapper<>();
|
||||||
Map<String, TXjPicinfo> xjPicinfoMap = xjPicinfoList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getSfzh()),(a) -> a, (a,b) -> a));
|
txqw.lambda().eq(TXjPicinfo::getNj, year);
|
||||||
|
List<TXjPicinfo> xjPicinfoList = tXjPicinfoService.list(txqw);
|
||||||
|
Map<String, TXjPicinfo> xjPicinfoMap = xjPicinfoList.stream().collect(Collectors.toMap((x) -> StringUtils.upperCase(x.getSfzh() + "-" + x.getNj()),(a) -> a, (a,b) -> a));
|
||||||
|
|
||||||
//获取文件列表(身份证列表)
|
//获取文件列表(身份证列表)
|
||||||
//[/opt/upFiles/2023/东北师大/]
|
//[/opt/upFiles/2023/东北师大/]
|
||||||
|
@ -244,12 +252,12 @@ public class TGkPicinfoController extends JeecgController<TGkPicinfo, ITGkPicinf
|
||||||
|
|
||||||
gkFileMap.forEach((k,sourceFile) -> {
|
gkFileMap.forEach((k,sourceFile) -> {
|
||||||
TFreshman freshman = null;
|
TFreshman freshman = null;
|
||||||
if(freshmanMap.containsKey(k)){
|
if(freshmanMap.containsKey(k + "-" + year)){
|
||||||
freshman = freshmanMap.get(k);
|
freshman = freshmanMap.get(k + "-" + year);
|
||||||
} else if(freshmanMap2.containsKey(k)){
|
} else if(freshmanMap2.containsKey(k + "-" + year)){
|
||||||
freshman = freshmanMap2.get(k);
|
freshman = freshmanMap2.get(k + "-" + year);
|
||||||
} else if(freshmanMap3.containsKey(k)){
|
} else if(freshmanMap3.containsKey(k + "-" + year)){
|
||||||
freshman = freshmanMap3.get(k);
|
freshman = freshmanMap3.get(k + "-" + year);
|
||||||
}
|
}
|
||||||
if(freshman != null){
|
if(freshman != null){
|
||||||
//TFreshman freshman = freshmanMap.get(k);
|
//TFreshman freshman = freshmanMap.get(k);
|
||||||
|
@ -265,8 +273,8 @@ public class TGkPicinfoController extends JeecgController<TGkPicinfo, ITGkPicinf
|
||||||
FileUtil.touch(toFile);
|
FileUtil.touch(toFile);
|
||||||
FileUtil.copyFile(sourceFile,toFile, StandardCopyOption.REPLACE_EXISTING);
|
FileUtil.copyFile(sourceFile,toFile, StandardCopyOption.REPLACE_EXISTING);
|
||||||
//查询身份证信息
|
//查询身份证信息
|
||||||
if(gkPicinfoMap.containsKey(freshman.getSfzh())){
|
if(gkPicinfoMap.containsKey(freshman.getSfzh() + "-" + year)){
|
||||||
TGkPicinfo gkPicinfo = gkPicinfoMap.get(freshman.getSfzh());
|
TGkPicinfo gkPicinfo = gkPicinfoMap.get(freshman.getSfzh() + "-" + year);
|
||||||
gkPicinfo.setGkurl(toFilePath);
|
gkPicinfo.setGkurl(toFilePath);
|
||||||
updateTGkPicinfoList.add(gkPicinfo);
|
updateTGkPicinfoList.add(gkPicinfo);
|
||||||
}else {
|
}else {
|
||||||
|
@ -277,6 +285,7 @@ public class TGkPicinfoController extends JeecgController<TGkPicinfo, ITGkPicinf
|
||||||
gkPicinfo.setZymc(freshman.getZymc());
|
gkPicinfo.setZymc(freshman.getZymc());
|
||||||
gkPicinfo.setGkurl(toFilePath);
|
gkPicinfo.setGkurl(toFilePath);
|
||||||
gkPicinfo.setGkflag("0");
|
gkPicinfo.setGkflag("0");
|
||||||
|
gkPicinfo.setNj(year);
|
||||||
addTGkPicinfoList.add(gkPicinfo);
|
addTGkPicinfoList.add(gkPicinfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -284,12 +293,12 @@ public class TGkPicinfoController extends JeecgController<TGkPicinfo, ITGkPicinf
|
||||||
|
|
||||||
idCardFileMap.forEach((k,sourceFile) -> {
|
idCardFileMap.forEach((k,sourceFile) -> {
|
||||||
TFreshman freshman = null;
|
TFreshman freshman = null;
|
||||||
if(freshmanMap.containsKey(k)){
|
if(freshmanMap.containsKey(k + "-" + year)){
|
||||||
freshman = freshmanMap.get(k);
|
freshman = freshmanMap.get(k + "-" + year);
|
||||||
} else if(freshmanMap2.containsKey(k)){
|
} else if(freshmanMap2.containsKey(k + "-" + year)){
|
||||||
freshman = freshmanMap2.get(k);
|
freshman = freshmanMap2.get(k + "-" + year);
|
||||||
} else if(freshmanMap3.containsKey(k)){
|
} else if(freshmanMap3.containsKey(k + "-" + year)){
|
||||||
freshman = freshmanMap3.get(k);
|
freshman = freshmanMap3.get(k + "-" + year);
|
||||||
}
|
}
|
||||||
if(freshman != null){
|
if(freshman != null){
|
||||||
//TFreshman freshman = freshmanMap.get(k);
|
//TFreshman freshman = freshmanMap.get(k);
|
||||||
|
@ -305,8 +314,8 @@ public class TGkPicinfoController extends JeecgController<TGkPicinfo, ITGkPicinf
|
||||||
FileUtil.touch(toFile);
|
FileUtil.touch(toFile);
|
||||||
FileUtil.copyFile(sourceFile,toFile, StandardCopyOption.REPLACE_EXISTING);
|
FileUtil.copyFile(sourceFile,toFile, StandardCopyOption.REPLACE_EXISTING);
|
||||||
//查询身份证信息
|
//查询身份证信息
|
||||||
if(sfzPicinfoMap.containsKey(freshman.getSfzh())){
|
if(sfzPicinfoMap.containsKey(freshman.getSfzh() + "-" + year)){
|
||||||
TSfzPicinfo sfzPicinfo = sfzPicinfoMap.get(freshman.getSfzh());
|
TSfzPicinfo sfzPicinfo = sfzPicinfoMap.get(freshman.getSfzh() + "-" + year);
|
||||||
sfzPicinfo.setSfzurl(toFilePath);
|
sfzPicinfo.setSfzurl(toFilePath);
|
||||||
updateSfzPicinfoList.add(sfzPicinfo);
|
updateSfzPicinfoList.add(sfzPicinfo);
|
||||||
}else {
|
}else {
|
||||||
|
@ -324,12 +333,12 @@ public class TGkPicinfoController extends JeecgController<TGkPicinfo, ITGkPicinf
|
||||||
|
|
||||||
xjFileMap.forEach((k,sourceFile) -> {
|
xjFileMap.forEach((k,sourceFile) -> {
|
||||||
TFreshman freshman = null;
|
TFreshman freshman = null;
|
||||||
if(freshmanMap.containsKey(k)){
|
if(freshmanMap.containsKey(k + "-" + year)){
|
||||||
freshman = freshmanMap.get(k);
|
freshman = freshmanMap.get(k + "-" + year);
|
||||||
} else if(freshmanMap2.containsKey(k)){
|
} else if(freshmanMap2.containsKey(k + "-" + year)){
|
||||||
freshman = freshmanMap2.get(k);
|
freshman = freshmanMap2.get(k + "-" + year);
|
||||||
} else if(freshmanMap3.containsKey(k)){
|
} else if(freshmanMap3.containsKey(k + "-" + year)){
|
||||||
freshman = freshmanMap3.get(k);
|
freshman = freshmanMap3.get(k + "-" + year);
|
||||||
}
|
}
|
||||||
if(freshman != null){
|
if(freshman != null){
|
||||||
//TFreshman freshman = freshmanMap.get(k);
|
//TFreshman freshman = freshmanMap.get(k);
|
||||||
|
@ -345,8 +354,8 @@ public class TGkPicinfoController extends JeecgController<TGkPicinfo, ITGkPicinf
|
||||||
FileUtil.touch(toFile);
|
FileUtil.touch(toFile);
|
||||||
FileUtil.copyFile(sourceFile,toFile, StandardCopyOption.REPLACE_EXISTING);
|
FileUtil.copyFile(sourceFile,toFile, StandardCopyOption.REPLACE_EXISTING);
|
||||||
//查询身份证信息
|
//查询身份证信息
|
||||||
if(xjPicinfoMap.containsKey(freshman.getSfzh())){
|
if(xjPicinfoMap.containsKey(freshman.getSfzh() + "-" + year)){
|
||||||
TXjPicinfo xjPicinfo = xjPicinfoMap.get(freshman.getSfzh());
|
TXjPicinfo xjPicinfo = xjPicinfoMap.get(freshman.getSfzh() + "-" + year);
|
||||||
xjPicinfo.setXjurl(toFilePath);
|
xjPicinfo.setXjurl(toFilePath);
|
||||||
updateXjPicinfoList.add(xjPicinfo);
|
updateXjPicinfoList.add(xjPicinfo);
|
||||||
}else {
|
}else {
|
||||||
|
@ -357,6 +366,7 @@ public class TGkPicinfoController extends JeecgController<TGkPicinfo, ITGkPicinf
|
||||||
xjPicinfo.setZymc(freshman.getZymc());
|
xjPicinfo.setZymc(freshman.getZymc());
|
||||||
xjPicinfo.setXjurl(toFilePath);
|
xjPicinfo.setXjurl(toFilePath);
|
||||||
xjPicinfo.setXjflag("0");
|
xjPicinfo.setXjflag("0");
|
||||||
|
xjPicinfo.setNj(year);
|
||||||
addXjPicinfoList.add(xjPicinfo);
|
addXjPicinfoList.add(xjPicinfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue