修改bug

This commit is contained in:
yangjun 2024-11-11 08:37:48 +08:00
parent ddb6b32165
commit 0f7e6fdabc
3 changed files with 24 additions and 23 deletions

View File

@ -41,16 +41,16 @@ public class SyncZyCcjg extends BaseSync {
* @param param * @param param
*/ */
public void run(Map<String, Object> param){ public void run(Map<String, Object> param){
// try { try {
// zyCcjgService.getCcjg(); zyCcjgService.getCcjg();
// } catch (Exception e) { } catch (Exception e) {
// e.printStackTrace(); e.printStackTrace();
// } }
// try { try {
// zyInfoService.updateInfoZyStatus(); zyInfoService.updateInfoZyStatus();
// } catch (Exception e) { } catch (Exception e) {
// e.printStackTrace(); e.printStackTrace();
// } }
try { try {
wjxWjxxService.updateCeyanStatus(); wjxWjxxService.updateCeyanStatus();

View File

@ -707,6 +707,7 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
wjxWjxx.setTeacherNo(user.getUsername());
Page<WjxWjxx> pageList = wjxWjxxService.listOther(wjxWjxx, new Page<>(pageNo, pageSize)); Page<WjxWjxx> pageList = wjxWjxxService.listOther(wjxWjxx, new Page<>(pageNo, pageSize));
return Result.OK(pageList); return Result.OK(pageList);
} }

View File

@ -686,19 +686,19 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId()); ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
if(stuPar==null) { if(stuPar==null) {
//20241107新增判断看原来是否有数据防止重复添加
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<ZyInfoStudent> zyInfoStudentQueryWrapper = new QueryWrapper<>(); //20241107新增判断看原来是否有数据防止重复添加
zyInfoStudentQueryWrapper.eq("create_by",user.getUsername()); // QueryWrapper<ZyInfoStudent> zyInfoStudentQueryWrapper = new QueryWrapper<>();
zyInfoStudentQueryWrapper.eq("main_id",zyInfoStudent.getMainId()); // zyInfoStudentQueryWrapper.eq("create_by",user.getUsername());
zyInfoStudentQueryWrapper.last("limit 1"); // zyInfoStudentQueryWrapper.eq("main_id",zyInfoStudent.getMainId());
ZyInfoStudent zyInfoStudent2 = zyInfoStudentService.getOne(zyInfoStudentQueryWrapper); // zyInfoStudentQueryWrapper.last("limit 1");
if(zyInfoStudent2!=null){ // ZyInfoStudent zyInfoStudent2 = zyInfoStudentService.getOne(zyInfoStudentQueryWrapper);
//20241107新增判断看原来是否有数据防止重复添加将原来的id赋值到请求数据里 // if(zyInfoStudent2!=null){
zyInfoStudent.setId(zyInfoStudent2.getId()); // //20241107新增判断看原来是否有数据防止重复添加将原来的id赋值到请求数据里
stuPar.setFilePath(zyInfoStudent.getFilePath()); // zyInfoStudent.setId(zyInfoStudent2.getId());
zyInfoStudent =stuPar; // stuPar.setFilePath(zyInfoStudent.getFilePath());
}else{ // zyInfoStudent =stuPar;
// }else{
ZyInfoStudent zyInfoStudent1 = new ZyInfoStudent(); ZyInfoStudent zyInfoStudent1 = new ZyInfoStudent();
zyInfoStudent1.setMainId(zyInfo.getId()); zyInfoStudent1.setMainId(zyInfo.getId());
zyInfoStudent1.setCreateBy(user.getUsername()); zyInfoStudent1.setCreateBy(user.getUsername());
@ -708,7 +708,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
zyInfoStudentService.save(zyInfoStudent1); zyInfoStudentService.save(zyInfoStudent1);
stuPar =zyInfoStudent1; stuPar =zyInfoStudent1;
zyInfoStudent =zyInfoStudent1; zyInfoStudent =zyInfoStudent1;
} // }
}else{ }else{
stuPar.setFilePath(zyInfoStudent.getFilePath()); stuPar.setFilePath(zyInfoStudent.getFilePath());