同步学生信息
This commit is contained in:
@@ -72,9 +72,10 @@ public class SyncDataController extends BaseController {
|
||||
@RequestMapping("/getStudentInfo")
|
||||
public AjaxResult getStudentInfoList(@RequestParam("pageNum")Integer pageNum,
|
||||
@RequestParam("pageSize") Integer pageSize,
|
||||
@RequestParam(value = "stuNo", required = false)String stuNo){
|
||||
int studentInfoNumber = syncDataService.getStudentInfoNumber(null);
|
||||
List<Map> list=syncDataService.getStudentInfoList(pageNum,pageSize,stuNo,null);
|
||||
@RequestParam(value = "stuNo", required = false)String stuNo,
|
||||
@RequestParam(value = "gradeCode", required = false)String gradeCode){
|
||||
int studentInfoNumber = syncDataService.getStudentInfoNumber(gradeCode);
|
||||
List<Map> list=syncDataService.getStudentInfoList(pageNum,pageSize,stuNo,gradeCode);
|
||||
return success(list).put("total", studentInfoNumber);
|
||||
}
|
||||
//同步学生
|
||||
@@ -92,8 +93,8 @@ public class SyncDataController extends BaseController {
|
||||
stuNoList.addAll(maps);
|
||||
list.clear();
|
||||
}
|
||||
//iSrsStudentService.addStudentData(stuNoList);//添加到学生表
|
||||
//iSrsStudentService.Usertb();//同步到用户表
|
||||
iSrsStudentService.addStudentData(stuNoList);//添加到学生表
|
||||
iSrsStudentService.Usertb();//同步到用户表
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ public interface SrsStudentMapper extends EasyBaseMapper<SrsStudent>
|
||||
*/
|
||||
public List<SrsStudent> selectSrsStudentList(SrsStudent srsStudent);
|
||||
|
||||
|
||||
/**
|
||||
* 通过班级id查询学生名字列表
|
||||
* @param id
|
||||
|
||||
@@ -950,20 +950,21 @@ public class SrsStudentServiceImpl extends ServiceImpl<SrsStudentMapper, SrsStud
|
||||
}
|
||||
Object sfzxobj=map.get("sfzx");
|
||||
if (sfzxobj!=null) {
|
||||
if(Objects.equals(sfzxobj.toString(), "1"))
|
||||
{
|
||||
srsStudent.setStatus("01");//在校状态
|
||||
}else
|
||||
if(Objects.equals(sfzxobj.toString(), "2"))
|
||||
{
|
||||
srsStudent.setStatus("02");//在校状态
|
||||
}else
|
||||
if(Objects.equals(sfzxobj.toString(), "3"))
|
||||
{
|
||||
srsStudent.setStatus("03");//在校状态
|
||||
}else {
|
||||
srsStudent.setStatus(sfzxobj.toString());//在校状态
|
||||
}
|
||||
// if(Objects.equals(sfzxobj.toString(), "1"))
|
||||
// {
|
||||
// srsStudent.setStatus("01");//在校状态
|
||||
// }else
|
||||
// if(Objects.equals(sfzxobj.toString(), "2"))
|
||||
// {
|
||||
// srsStudent.setStatus("02");//在校状态
|
||||
// }else
|
||||
// if(Objects.equals(sfzxobj.toString(), "3"))
|
||||
// {
|
||||
// srsStudent.setStatus("03");//在校状态
|
||||
// }else {
|
||||
// srsStudent.setStatus(sfzxobj.toString());//在校状态
|
||||
// }
|
||||
srsStudent.setStatus(sfzxobj.toString());
|
||||
}
|
||||
srsStudent.setDelFlag("0");
|
||||
srsStudent.setCreateTime(DateUtils.getNowDate());
|
||||
@@ -982,11 +983,10 @@ public class SrsStudentServiceImpl extends ServiceImpl<SrsStudentMapper, SrsStud
|
||||
TransactionDefinition def = new DefaultTransactionDefinition();
|
||||
TransactionStatus status = transactionManager.getTransaction(def);
|
||||
try {
|
||||
// 查询所有在校学生
|
||||
// 查询所有在校学生(查询各年级的学生)
|
||||
SrsStudent param = new SrsStudent();
|
||||
param.setStatus("01");
|
||||
List<SrsStudent> studentList = srsStudentMapper.selectSrsStudentList(param);
|
||||
|
||||
if (studentList.isEmpty()) {
|
||||
throw new Exception("没有在校生数据");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user