奖项管理增加学生所属学院

main
Gitea 5 months ago
parent 80cd979624
commit 93cb20dd90
  1. 31
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java
  2. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java

@ -41,6 +41,9 @@ import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.comp.entity.Comp; import org.jeecg.modules.demo.comp.entity.Comp;
import org.jeecg.modules.demo.comp.service.ICompService; import org.jeecg.modules.demo.comp.service.ICompService;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.entity.SysUserDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserDepartService;
import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.system.service.ISysUserService;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@ -88,6 +91,10 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
private ISysUserService sysUserService; private ISysUserService sysUserService;
@Resource @Resource
private JeecgBaseConfig jeecgBaseConfig; private JeecgBaseConfig jeecgBaseConfig;
@Autowired
private ISysUserDepartService sysUserDepartService;
@Autowired
private ISysDepartService sysDepartService;
/** /**
* 分页列表查询 * 分页列表查询
@ -197,6 +204,10 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId()); SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId());
awardPersion.setStudentname(sysUser.getRealname()); awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername()); awardPersion.setStudentcode(sysUser.getUsername());
SysUserDepart sysUserDepart = new SysUserDepart(null,null);
QueryWrapper<SysUserDepart> queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, req.getParameterMap());
queryWrappersud.eq("user_id",sysUser.getId());
awardPersion.setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode());
awardPersionService.save(awardPersion); awardPersionService.save(awardPersion);
AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP()); AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP());
annualCompPoint.setIsPj(1); annualCompPoint.setIsPj(1);
@ -206,6 +217,10 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion.setStudentname(sysUser.getRealname()); awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername()); awardPersion.setStudentcode(sysUser.getUsername());
SysUserDepart sysUserDepart = new SysUserDepart(null,null);
QueryWrapper<SysUserDepart> queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, req.getParameterMap());
queryWrappersud.eq("user_id",sysUser.getId());
awardPersion.setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode());
awardPersionService.save(awardPersion); awardPersionService.save(awardPersion);
AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP()); AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP());
annualCompPoint.setIsPj(1); annualCompPoint.setIsPj(1);
@ -255,12 +270,20 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId()); SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId());
awardPersion.setStudentname(sysUser.getRealname()); awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername()); awardPersion.setStudentcode(sysUser.getUsername());
SysUserDepart sysUserDepart = new SysUserDepart(null,null);
QueryWrapper<SysUserDepart> queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, req.getParameterMap());
queryWrappersud.eq("user_id",sysUser.getId());
awardPersion.setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode());
awardPersionService.updateById(awardPersion); awardPersionService.updateById(awardPersion);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
}else { }else {
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion.setStudentname(sysUser.getRealname()); awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername()); awardPersion.setStudentcode(sysUser.getUsername());
SysUserDepart sysUserDepart = new SysUserDepart(null,null);
QueryWrapper<SysUserDepart> queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, req.getParameterMap());
queryWrappersud.eq("user_id",sysUser.getId());
awardPersion.setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode());
awardPersionService.updateById(awardPersion); awardPersionService.updateById(awardPersion);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
@ -459,6 +482,10 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
queryWrappertm1.eq("captain","1"); queryWrappertm1.eq("captain","1");
List<TeamManagement> listtm1 = teamManagementService.list(queryWrappertm1); List<TeamManagement> listtm1 = teamManagementService.list(queryWrappertm1);
SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId()); SysUser sysUser = sysUserService.getById(listtm1.get(0).getUserId());
SysUserDepart sysUserDepart = new SysUserDepart(null,null);
QueryWrapper<SysUserDepart> queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, request.getParameterMap());
queryWrappersud.eq("user_id",sysUser.getId());
list.get(i).setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode());
if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(1); list.get(i).setAwardsort(1);
list.get(i).setAwardid(listaca.get(0).getId()); list.get(i).setAwardid(listaca.get(0).getId());
@ -490,6 +517,10 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
}else { }else {
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId()); SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
SysUserDepart sysUserDepart = new SysUserDepart(null,null);
QueryWrapper<SysUserDepart> queryWrappersud = QueryGenerator.initQueryWrapper(sysUserDepart, request.getParameterMap());
queryWrappersud.eq("user_id",sysUser.getId());
list.get(i).setStudentorg(sysDepartService.getById(sysUserDepartService.getOne(queryWrappersud).getDepId()).getOrgCode());
if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(1); list.get(i).setAwardsort(1);
list.get(i).setAwardid(listaca.get(0).getId()); list.get(i).setAwardid(listaca.get(0).getId());

@ -109,4 +109,8 @@ public class AwardPersion implements Serializable {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "角色标识") @ApiModelProperty(value = "角色标识")
private String rolename; private String rolename;
/**学生所属学院*/
@ApiModelProperty(value = "学生所属学院")
private String studentorg;
} }

Loading…
Cancel
Save