|
@@ -39,6 +39,8 @@ import cn.com.qmth.examcloud.core.basic.dao.entity.OrgEntity;
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentEntity;
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentEntity;
|
|
import cn.com.qmth.examcloud.core.basic.service.StudentService;
|
|
import cn.com.qmth.examcloud.core.basic.service.StudentService;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.StudentInfo;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.StudentInfo;
|
|
|
|
+import cn.com.qmth.examcloud.task.api.DataSyncCloudService;
|
|
|
|
+import cn.com.qmth.examcloud.task.api.request.SyncStudentReq;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -61,6 +63,9 @@ public class StudentController extends ControllerSupport {
|
|
@Autowired
|
|
@Autowired
|
|
OrgRepo orgRepo;
|
|
OrgRepo orgRepo;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ DataSyncCloudService dataSyncCloudService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 方法注释
|
|
* 方法注释
|
|
*
|
|
*
|
|
@@ -323,6 +328,31 @@ public class StudentController extends ControllerSupport {
|
|
s.setStudentCode(null);
|
|
s.setStudentCode(null);
|
|
studentRepo.save(s);
|
|
studentRepo.save(s);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ for (Long cur : studentIds) {
|
|
|
|
+ StudentEntity saved = studentRepo.findOne(cur);
|
|
|
|
+ SyncStudentReq req = new SyncStudentReq();
|
|
|
|
+ req.setEnable(saved.getEnable());
|
|
|
|
+ req.setId(saved.getId());
|
|
|
|
+ req.setIdentityNumber(saved.getIdentityNumber());
|
|
|
|
+ req.setName(saved.getName());
|
|
|
|
+
|
|
|
|
+ req.setOrgId(saved.getOrgId());
|
|
|
|
+ OrgEntity org = orgRepo.findOne(saved.getOrgId());
|
|
|
|
+ req.setOrgCode(org.getCode());
|
|
|
|
+ req.setOrgName(org.getName());
|
|
|
|
+
|
|
|
|
+ req.setPhoneNumber(saved.getPhoneNumber());
|
|
|
|
+ req.setPhotoPath(saved.getPhotoPath());
|
|
|
|
+ req.setRootOrgId(saved.getRootOrgId());
|
|
|
|
+ req.setSecurityPhone(saved.getSecurityPhone());
|
|
|
|
+ req.setStudentCode(saved.getStudentCode());
|
|
|
|
+
|
|
|
|
+ req.setSyncType("update");
|
|
|
|
+
|
|
|
|
+ dataSyncCloudService.syncStudent(req);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "解绑安全手机", notes = "")
|
|
@ApiOperation(value = "解绑安全手机", notes = "")
|
|
@@ -340,6 +370,31 @@ public class StudentController extends ControllerSupport {
|
|
s.setSecurityPhone(null);
|
|
s.setSecurityPhone(null);
|
|
studentRepo.save(s);
|
|
studentRepo.save(s);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ for (Long cur : studentIds) {
|
|
|
|
+ StudentEntity saved = studentRepo.findOne(cur);
|
|
|
|
+ SyncStudentReq req = new SyncStudentReq();
|
|
|
|
+ req.setEnable(saved.getEnable());
|
|
|
|
+ req.setId(saved.getId());
|
|
|
|
+ req.setIdentityNumber(saved.getIdentityNumber());
|
|
|
|
+ req.setName(saved.getName());
|
|
|
|
+
|
|
|
|
+ req.setOrgId(saved.getOrgId());
|
|
|
|
+ OrgEntity org = orgRepo.findOne(saved.getOrgId());
|
|
|
|
+ req.setOrgCode(org.getCode());
|
|
|
|
+ req.setOrgName(org.getName());
|
|
|
|
+
|
|
|
|
+ req.setPhoneNumber(saved.getPhoneNumber());
|
|
|
|
+ req.setPhotoPath(saved.getPhotoPath());
|
|
|
|
+ req.setRootOrgId(saved.getRootOrgId());
|
|
|
|
+ req.setSecurityPhone(saved.getSecurityPhone());
|
|
|
|
+ req.setStudentCode(saved.getStudentCode());
|
|
|
|
+
|
|
|
|
+ req.setSyncType("update");
|
|
|
|
+
|
|
|
|
+ dataSyncCloudService.syncStudent(req);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|