|
@@ -289,25 +289,25 @@ export default {
|
|
// };
|
|
// };
|
|
// await this.saveStudentFaceInfoByPut(photoInfo);
|
|
// await this.saveStudentFaceInfoByPut(photoInfo);
|
|
|
|
|
|
- let alreadyHavePhoto = false;
|
|
|
|
|
|
+ let studentInfo = await this.getStudentInfo(rootOrgId, identityNumber);
|
|
|
|
+ let alreadyHavePhoto = studentInfo.photoPath ? true : false;
|
|
|
|
+ let shouldUpload = false;
|
|
|
|
+
|
|
|
|
+ let resStr = "";
|
|
if (this.overridePhoto) {
|
|
if (this.overridePhoto) {
|
|
- let studentInfo = await this.getStudentInfo(
|
|
|
|
- rootOrgId,
|
|
|
|
- identityNumber
|
|
|
|
- );
|
|
|
|
- alreadyHavePhoto = studentInfo.photoPath ? true : false;
|
|
|
|
|
|
+ resStr = alreadyHavePhoto ? "--覆盖更新" : "--保存";
|
|
|
|
+ shouldUpload = true;
|
|
|
|
+ } else {
|
|
|
|
+ resStr = alreadyHavePhoto ? "--已有底照-跳过" : "--保存";
|
|
|
|
+ shouldUpload = !alreadyHavePhoto;
|
|
}
|
|
}
|
|
|
|
|
|
- if (this.overridePhoto || (!this.overridePhoto && !alreadyHavePhoto)) {
|
|
|
|
- // 如果选择覆盖,或者不覆盖,但是没有底照,就保存底照
|
|
|
|
|
|
+ if (shouldUpload) {
|
|
|
|
+ // 如果选择覆盖,或者(不覆盖,但是没有底照),就保存底照
|
|
await this.saveStudentBasePhoto(photoFile, photoFileName);
|
|
await this.saveStudentBasePhoto(photoFile, photoFileName);
|
|
}
|
|
}
|
|
- const notOverride = this.overridePhoto && alreadyHavePhoto;
|
|
|
|
|
|
|
|
- this.finishOnePhotoSuccess(
|
|
|
|
- "处理成功" + (this.overridePhoto && notOverride ? "--不覆盖" : ""),
|
|
|
|
- studentPhotoPath
|
|
|
|
- );
|
|
|
|
|
|
+ this.finishOnePhotoSuccess("处理成功" + resStr, studentPhotoPath);
|
|
|
|
|
|
{
|
|
{
|
|
// 执行过程中的元信息
|
|
// 执行过程中的元信息
|