JayChou 4 months ago
commit 18a9a6689b
  1. 3
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/TongfenCompinfo/mapper/TongfenCompinfoMapper.java
  2. 20
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/DepartAbilityEvaluationController.java
  3. 8
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationCollectController.java
  4. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IDepartAbilityEvaluationService.java
  5. 28
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/DepartAbilityEvaluationServiceImpl.java
  6. 9
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java
  7. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java
  8. 168
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  9. 13
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java
  10. 20
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/DepartCompTotalScoreController.java
  11. 8
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompTotalScoreController.java
  12. 1
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/IDepartCompTotalScoreService.java
  13. 34
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/impl/DepartCompTotalScoreServiceImpl.java
  14. 19
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/impl/PersonalCompScoreServiceImpl.java
  15. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java
  16. 243
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java
  17. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java
  18. 78
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java
  19. 12
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/bigScreen/service/CompSystemBigScreenServiceImpl.java
  20. 65
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java
  21. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java
  22. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java
  23. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java
  24. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java
  25. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java
  26. 15
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java
  27. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java
  28. 10
      jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
  29. 22409
      jeecgboot-vue3-master/pnpm-lock.yaml
  30. 1
      jeecgboot-vue3-master/src/locales/lang/zh-CN/sys.ts
  31. 15
      jeecgboot-vue3-master/src/utils/helper/validator.ts
  32. 6
      jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.api.ts
  33. 14
      jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts
  34. 2
      jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.data.ts
  35. 14
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue
  36. 9
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.api.ts
  37. 12
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.data.ts
  38. 5
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue
  39. 5
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue
  40. 5
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue
  41. 6
      jeecgboot-vue3-master/src/views/annualScore/departCompTotalScore/DepartCompTotalScore.api.ts
  42. 16
      jeecgboot-vue3-master/src/views/annualScore/departCompTotalScore/DepartCompTotalScore.data.ts
  43. 2
      jeecgboot-vue3-master/src/views/annualcompetitionprojectregistration/student/AnnualCompetitionProjectRegistration.api.ts
  44. 130
      jeecgboot-vue3-master/src/views/awardpersion/components/AwardPersionModal.vue
  45. 12
      jeecgboot-vue3-master/src/views/system/loginmini/MiniLogin.vue
  46. 14
      jeecgboot-vue3-master/src/views/system/loginmini/MiniRegister.vue
  47. 19
      jeecgboot-vue3-master/src/views/system/user/userYX.data.ts
  48. 4
      jeecgboot-vue3-master/src/views/system/user/userZJ.data.ts
  49. 4
      jeecgboot-vue3-master/src/views/system/userZJ/user.data.ts
  50. 4
      jeecgboot-vue3-master/src/views/system/userZJ/userZJ.data.ts
  51. 4
      jeecgboot-vue3-master/src/views/system/usercompexpert/user.data.ts
  52. 4
      jeecgboot-vue3-master/src/views/system/usercompexpert/userZJ.data.ts
  53. 4
      jeecgboot-vue3-master/src/views/system/userdep/userYX.data.ts
  54. 4
      jeecgboot-vue3-master/src/views/system/userdep/userZJ.data.ts

@ -2,6 +2,7 @@ package org.jeecg.modules.demo.TongfenCompinfo.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.demo.TongfenCompinfo.entity.TongfenCompinfo;
@ -23,5 +24,5 @@ public interface TongfenCompinfoMapper extends BaseMapper<TongfenCompinfo> {
String geturl(String enrollCode);
@Update("UPDATE score_persion SET score=#{score} where enroll_code =#{ccode}")
Integer updateScore(String score, String ccode);
Integer updateScore(@Param("score") String score, @Param("ccode") String ccode);
}

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.abilityEvaluation.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -68,6 +69,25 @@ public class DepartAbilityEvaluationController extends JeecgController<DepartAbi
return Result.OK("添加成功!");
}
/**
* @Title: collectAllDepart
* @Description: 部门为空时汇总所有部门, 不为空时汇总该部门
* @Params: [departAbilityEvaluation]
* @Return: org.jeecg.common.api.vo.Result<java.lang.String>
* @Author: z.h.c
* @Date: 2024/7/30 23:03
*/
@ApiOperation(value = "院系年度能力评价-汇总所有部门", notes = "院系年度能力评价-汇总所有部门")
@PostMapping(value = "/collectAllDepart")
public Result<String> collectAllDepart(@RequestBody DepartAbilityEvaluation departAbilityEvaluation) {
if (StrUtil.isNotBlank(departAbilityEvaluation.getDepetId())) {//部门不为空时汇总该部门
departAbilityEvaluationService.collectAbilityEvaluation(departAbilityEvaluation);
} else {
departAbilityEvaluationService.collectAllDepart(departAbilityEvaluation);
}
return Result.OK("添加成功!");
}
@ApiOperation(value = "院系年度能力评价-重新汇算", notes = "院系年度能力评价-重新汇算")
@PostMapping(value = "/reCollectAbilityEvaluation")
public Result<String> reCollectAbilityEvaluation(@RequestBody DepartAbilityEvaluation departAbilityEvaluation) {

@ -13,6 +13,8 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluationCollect;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationCollectService;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -35,6 +37,9 @@ public class PersonalAbilityEvaluationCollectController extends JeecgController<
@Autowired
private IPersonalAbilityEvaluationCollectService personalAbilityEvaluationCollectService;
@Autowired
private ISysUserService iSysUserService;
/**
* 分页列表查询
*
@ -76,7 +81,8 @@ public class PersonalAbilityEvaluationCollectController extends JeecgController<
HttpServletRequest req) {
QueryWrapper<PersonalAbilityEvaluationCollect> queryWrapper = QueryGenerator.initQueryWrapper(personalAbilityEvaluationCollect, req.getParameterMap());
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
queryWrapper.eq("work_on",user.getUsername());
SysUser user1 = iSysUserService.getById(user.getId());
queryWrapper.eq("work_on",user1.getWorkNo());
Page<PersonalAbilityEvaluationCollect> page = new Page<PersonalAbilityEvaluationCollect>(pageNo, pageSize);
IPage<PersonalAbilityEvaluationCollect> pageList = personalAbilityEvaluationCollectService.page(page, queryWrapper);
return Result.OK(pageList);

@ -12,4 +12,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
public interface IDepartAbilityEvaluationService extends IService<DepartAbilityEvaluation> {
void collectAbilityEvaluation(DepartAbilityEvaluation departAbilityEvaluation);
void collectAllDepart(DepartAbilityEvaluation departAbilityEvaluation);
}

@ -8,14 +8,12 @@ import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation
import org.jeecg.modules.demo.abilityEvaluation.mapper.DepartAbilityEvaluationMapper;
import org.jeecg.modules.demo.abilityEvaluation.service.IDepartAbilityEvaluationService;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService;
import org.jeecg.modules.demo.basicsskill.service.IBasicsskillService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -30,6 +28,11 @@ public class DepartAbilityEvaluationServiceImpl extends ServiceImpl<DepartAbilit
@Autowired
private IPersonalAbilityEvaluationService iPersonalAbilityEvaluationService;
@Autowired
private ISysDepartService iSysDepartService;
private final static String PARENT_ID = "1693446350597038081";
@Override
public void collectAbilityEvaluation(DepartAbilityEvaluation departAbilityEvaluation) {
@ -51,7 +54,7 @@ public class DepartAbilityEvaluationServiceImpl extends ServiceImpl<DepartAbilit
.collect(Collectors.groupingBy(PersonalAbilityEvaluation::getCapacityId));
List<DepartAbilityEvaluation> saveList = new LinkedList<>();
depetListMap.keySet().stream().forEach(k -> {
Optional.ofNullable(depetListMap).orElse(new LinkedHashMap<>()).keySet().stream().forEach(k -> {
List<PersonalAbilityEvaluation> evaluationList = depetListMap.get(k);
DepartAbilityEvaluation bean = new DepartAbilityEvaluation();
bean.setAnnualId(departAbilityEvaluation.getAnnualId());
@ -64,4 +67,17 @@ public class DepartAbilityEvaluationServiceImpl extends ServiceImpl<DepartAbilit
});
this.saveBatch(saveList);
}
@Override
public void collectAllDepart(DepartAbilityEvaluation param) {
this.remove(new LambdaQueryWrapper<DepartAbilityEvaluation>().eq(DepartAbilityEvaluation::getAnnualId, param.getAnnualId()));
List<SysDepart> departList = iSysDepartService.list(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getParentId, PARENT_ID));
Optional.ofNullable(departList).orElse(new LinkedList<>()).stream().forEach(e -> {
DepartAbilityEvaluation depart = new DepartAbilityEvaluation();
depart.setAnnualId(param.getAnnualId());
depart.setDepetId(e.getId());
this.collectAbilityEvaluation(depart);
});
}
}

@ -7,7 +7,9 @@ import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation
import org.jeecg.modules.demo.abilityEvaluation.mapper.PersonalAbilityEvaluationCollectMapper;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationCollectService;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -35,6 +37,9 @@ public class PersonalAbilityEvaluationCollectServiceImpl extends ServiceImpl<Per
@Autowired
private ISysUserService iSysUserService;
@Autowired
private ISysDepartService iSysDepartService;
/**
* @Title: batchSave
* @Description:
@ -81,7 +86,9 @@ public class PersonalAbilityEvaluationCollectServiceImpl extends ServiceImpl<Per
List<PersonalAbilityEvaluation> list = capacityListMap.get(k);
PersonalAbilityEvaluationCollect person = new PersonalAbilityEvaluationCollect();
person.setAnnualCompP(projectId);
person.setDepetId(sysUser.getDepartIds());
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode,sysUser.getOrgCode()));
// bean.setDepet(sysDepart.getId());
person.setDepetId(sysDepart.getId());
person.setWorkOn(workNo);
person.setName(sysUser.getRealname());
person.setCapacityId(list.get(0).getCapacityId());

@ -127,7 +127,7 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl<PersonalAb
person.setCapacityName(basicsskill.getName());
//计算能力量化各类指标 能力量化值 = 直接按项目的能力权值和项目奖项得分算
//能力量化值 = 项目得分*项目的能力权值/100
//能力量化值 = 个人积分*项目的能力权值/100
this.convertScore(compskill.getWeight(), person, en.getScore());
saveList.add(person);
});

@ -50,6 +50,8 @@ import org.jeecg.modules.demo.expscore.service.IExpScoreService;
import org.jeecg.modules.demo.score_management.entity.ScoreManagement;
import org.jeecg.modules.demo.scorepersion.entity.ScorePersion;
import org.jeecg.modules.demo.scorepersion.service.IScorePersionService;
import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion;
import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -124,6 +126,9 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
@Resource
private JeecgBaseConfig jeecgBaseConfig;
@Autowired
private IUpfilePersionService upfilePersionService;
/**
* 分页列表查询
@ -148,17 +153,24 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
// 获取负责的比赛id
LambdaQueryWrapper<Comp> queryWrapperComp = new LambdaQueryWrapper<>();
// id位数相同,可用like模糊
queryWrapperComp.like(Comp::getCompAdmin, userId);
queryWrapperComp.eq(Comp::getCompAdmin, userId);
List<Comp> list = compService.list(queryWrapperComp);
if(list.isEmpty()){
return Result.error("未绑定比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
// 获取负责的年度比赛id
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
/*queryWrapperAnnual.in(ids.size()!=0,"compid",ids);*/
queryWrapperAnnual.in("compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.isEmpty()){
return Result.error("未创建年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<AnnualCompPoint> queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annual_comp_id",annualIds);
queryWrapper.in("annual_comp_id",annualIds);
queryWrapper.eq("annual_comp_switch","Y"); // 比赛必须是开启的
Page<AnnualCompPoint> page = new Page<AnnualCompPoint>(pageNo, pageSize);
IPage<AnnualCompPoint> pageList = annualCompPointService.page(page, queryWrapper);
@ -186,6 +198,71 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
return Result.OK(pageList);
}
/**
* 组委会 待审核
* @param annualCompPoint
* @param pageNo
* @param pageSize
* @param req
* @return {@link Result}<{@link IPage}<{@link AnnualCompPoint}>>
*/
@GetMapping(value = "/listdsh")
public Result<IPage<AnnualCompPoint>> listdsh(AnnualCompPoint annualCompPoint,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<AnnualCompPoint> queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapper.eq("annual_comp_state","1");
Page<AnnualCompPoint> page = new Page<AnnualCompPoint>(pageNo, pageSize);
IPage<AnnualCompPoint> pageList = annualCompPointService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 组委会 已审核
* @param annualCompPoint
* @param pageNo
* @param pageSize
* @param req
* @return {@link Result}<{@link IPage}<{@link AnnualCompPoint}>>
*/
@GetMapping(value = "/listysh")
public Result<IPage<AnnualCompPoint>> listysh(AnnualCompPoint annualCompPoint,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<AnnualCompPoint> queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapper.eq("annual_comp_state","2");
Page<AnnualCompPoint> page = new Page<AnnualCompPoint>(pageNo, pageSize);
IPage<AnnualCompPoint> pageList = annualCompPointService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
* 组委会 带驳回
* @param annualCompPoint
* @param pageNo
* @param pageSize
* @param req
* @return {@link Result}<{@link IPage}<{@link AnnualCompPoint}>>
*/
@GetMapping(value = "/listdbh")
public Result<IPage<AnnualCompPoint>> listdbh(AnnualCompPoint annualCompPoint,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<AnnualCompPoint> queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapper.eq("annual_comp_state","3");
Page<AnnualCompPoint> page = new Page<AnnualCompPoint>(pageNo, pageSize);
IPage<AnnualCompPoint> pageList = annualCompPointService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 专家 显示所有
@ -304,7 +381,12 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
// @RequiresPermissions("annualCompPoint:annual_comp_point:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody AnnualCompPoint annualCompPoint) {
boolean isUpdate = annualCompPointService.updateById(annualCompPoint);
boolean isUpdate ;
if(annualCompPoint.getAnnualCompState().equals("0") && annualCompPoint.getAnnualCompState().equals("4") ){
isUpdate = annualCompPointService.updateById(annualCompPoint);
} else {
return Result.error("当前状态不可修改");
}
if (!isUpdate){
return Result.error("编辑失败!");
}
@ -322,7 +404,13 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
// @RequiresPermissions("annualCompPoint:annual_comp_point:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
annualCompPointService.removeById(id);
AnnualCompPoint annualCompPoint =annualCompPointService.getById(id);
if(annualCompPoint.getAnnualCompState().equals("0") && annualCompPoint.getAnnualCompState().equals("4") ) {
System.out.println(id);
annualCompPointService.removeById(id);
}else {
return Result.error("当前状态不可删除");
}
return Result.OK("删除成功!");
}
/**
@ -337,6 +425,15 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
@GetMapping(value = "/cjhz")
public Result<String> cjhz(@RequestParam(name = "id", required = true) String id,HttpServletRequest req) {
AnnualCompPoint annualCompPoint = annualCompPointService.getById(id);
QueryWrapper<ScorePersion> queryWrappersc = new QueryWrapper<>();
queryWrappersc.eq("annual_compid",annualCompPoint.getAnnualCompId());
queryWrappersc.eq("annual_comp_p",annualCompPoint.getId());
List<ScorePersion> listsc = scorePersionService.list(queryWrappersc);
if(listsc.size()>0){
for (int k = 0 ; k < listsc.size() ; k++){
scorePersionService.removeById(listsc.get(k).getId());
}
}
QueryWrapper<ExpScore> queryWrapper = new QueryWrapper<>();
queryWrapper.select("bmcode,SUM(score) as score");
queryWrapper.eq("ann_com_p",id);
@ -385,6 +482,18 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
}
annualCompPoint.setIsCjhz(1);
annualCompPointService.updateById(annualCompPoint);
//更新作品状态为已评分
for (int b = 0 ; b < list.size() ; b++){
UpfilePersion up = new UpfilePersion();
QueryWrapper<UpfilePersion> queryWrapperup = new QueryWrapper<>();
queryWrapperup.eq("apply_code",list.get(b).getBmcode());
List<UpfilePersion> listup = upfilePersionService.list(queryWrapperup);
if(listup.size()>0){
up = listup.get(0);
up.setStatus(1);
upfilePersionService.updateById(up);
}
}
return Result.OK("成功!");
}
/**
@ -457,6 +566,18 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
}
annualCompPoint.setIsCjhz(1);
annualCompPointService.updateById(annualCompPoint);
//更新作品状态为已评分
for (int b = 0 ; b < list.size() ; b++){
UpfilePersion up = new UpfilePersion();
QueryWrapper<UpfilePersion> queryWrapperup = new QueryWrapper<>();
queryWrapperup.eq("apply_code",list.get(b).getBmcode());
List<UpfilePersion> listup = upfilePersionService.list(queryWrapperup);
if(listup.size()>0){
up = listup.get(0);
up.setStatus(1);
upfilePersionService.updateById(up);
}
}
return Result.OK("成功!");
}
@ -516,12 +637,22 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
if(list.size()==0){
return Result.error("未设置年度比赛奖项!");
}
QueryWrapper<AwardPersion> queryWrapperap = new QueryWrapper<>();
queryWrapperap.eq("annal_comp",annualCompPoint.getAnnualCompId());
queryWrapperap.eq("annual_comp_p",annualCompPoint.getId());
List<AwardPersion> listap = awardPersionService.list(queryWrapperap);
if(listap.size()>0){
for (int k = 0 ; k < listap.size() ; k++){
awardPersionService.removeById(listap.get(k).getId());
}
}
QueryWrapper<ScorePersion> queryWrappersp = new QueryWrapper<>();
queryWrappersp.eq("annualid",annualCompService.getById(annualCompPoint.getAnnualCompId()).getAnnualid());
queryWrappersp.eq("annual_compid",annualCompPoint.getAnnualCompId());
queryWrappersp.eq("annual_comp_p",id);
queryWrappersp.orderByAsc("sort");
List<ScorePersion> listsp = scorePersionService.list(queryWrappersp);
try {
for (int i = 0 ; i<list.size();i++){
if(list.get(i).getIsFirstPrize().equals("Y")){
String name1 = list.get(i).getFirstPrize();
@ -643,9 +774,12 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
awardPersionService.save(awardPersion);
}
}
annualCompPoint.setIsPj(1);
annualCompPointService.updateById(annualCompPoint);
}
}catch (Exception e){
return Result.error("参与评奖人数少于年度比赛奖项设置的数量");
}
annualCompPoint.setIsPj(1);
annualCompPointService.updateById(annualCompPoint);
return Result.OK("成功!");
}
@ -684,6 +818,7 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
queryWrappersp.eq("annual_comp_p",awardPersion.getAnnualCompP());
queryWrappersp.orderByAsc("sort");
List<ScorePersion> listsp = scorePersionService.list(queryWrappersp);
try {
for (int i = 0 ; i<list.size();i++){
if(list.get(i).getIsFirstPrize().equals("Y")){
String name1 = list.get(i).getFirstPrize();
@ -816,9 +951,12 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
}
}
}
annualCompPoint.setIsPj(1);
annualCompPointService.updateById(annualCompPoint);
}
}catch (Exception e){
return Result.error("参与评奖人数少于年度比赛奖项设置的数量");
}
annualCompPoint.setIsPj(1);
annualCompPointService.updateById(annualCompPoint);
return Result.OK("成功!");
}
@ -914,8 +1052,11 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
try {
List<AnnualCompPointMb> list = ExcelImportUtil.importExcel(file.getInputStream(), AnnualCompPointMb.class, params);
for (int i = 0 ; i < list.size();i++){
SysUser sysUser = sysUserService.getUserByName(list.get(i).getStudentcode());
if(sysUser==null){
QueryWrapper<SysUser> qw = new QueryWrapper<>();
qw.eq("work_no",list.get(i).getStudentcode());
List<SysUser> listsys = sysUserService.list(qw);
//SysUser sysUser = sysUserService.getUserByName(list.get(i).getStudentcode());
if(listsys.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行学生学号不存在");
}
}
@ -935,7 +1076,10 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
annualCompetitionProjectRegistrationService.save(ar);
TeamManagement tm = new TeamManagement();
tm.setEnrollCode(enrollCode);
tm.setUserId(sysUserService.getUserByName(list.get(k).getStudentcode()).getId());
QueryWrapper<SysUser> qw1 = new QueryWrapper<>();
qw1.eq("work_no",list.get(k).getStudentcode());
List<SysUser> listsys1 = sysUserService.list(qw1);
tm.setUserId(listsys1.get(0).getId());
tm.setCaptain("0");
teamManagementService.save(tm);
}

@ -47,6 +47,9 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
@Autowired
private AnnualCompPointMapper annualCompPointMapper;
@Autowired
private IAnnualCompPointService annualCompPointService;
//奖项
@Autowired
private AnnualCompAwardMapper annualCompAwardMapper;
@ -83,6 +86,16 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
if (annualComp == null) {
return Result.error("年度比赛错误");
}
//校验同一年度比赛下项目名称不可重复
List<AnnualCompPoint> annualCompPointListzbc = annualCompPointService.query().eq("annual_comp_id",annualCompPoint.getAnnualCompId()).eq("obj_name",annualCompPoint.getObjName()).list();
if (annualCompPointListzbc.size()>0){
return Result.error("同一年度比赛下项目名称不可重复");
}
if (annualComp.getIsopen().equals("0")) {
return Result.error("请先启动年度比赛");
}
// 校验比赛项目名称
String objName = annualCompPoint.getObjName();
LambdaQueryWrapper<AnnualCompPoint> queryWrapper = new LambdaQueryWrapper<>();

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.annualScore.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -55,6 +56,25 @@ public class DepartCompTotalScoreController extends JeecgController<DepartCompTo
return Result.OK("添加成功!");
}
/**
* @Title: add
* @Description: 部门为空时汇总所有部门, 不为空时汇总该部门
* @Params: [departCompTotalScore]
* @Return: org.jeecg.common.api.vo.Result<java.lang.String>
* @Author: z.h.c
* @Date: 2024/7/30 22:26
*/
@ApiOperation(value = "院系总积分-汇总所有部门", notes = "院系总积分-汇总所有部门")
@PostMapping(value = "/collectAllDepart")
public Result<String> collectAllDepart(@RequestBody DepartCompTotalScore departCompTotalScore) {
if (StrUtil.isNotBlank(departCompTotalScore.getDepet())) {//部门不为空时汇总该部门
departCompTotalScoreService.collectScore(departCompTotalScore);
} else {
departCompTotalScoreService.collectAllDepart(departCompTotalScore);
}
return Result.OK("添加成功!");
}
/**
* 分页列表查询
*

@ -15,6 +15,8 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.demo.annualScore.entity.PersonalCompTotalScore;
import org.jeecg.modules.demo.annualScore.service.IPersonalCompTotalScoreService;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -37,6 +39,9 @@ public class PersonalCompTotalScoreController extends JeecgController<PersonalCo
@Autowired
private IPersonalCompTotalScoreService personalCompTotalScoreService;
@Autowired
private ISysUserService iSysUserService;
/**
* 分页列表查询
*
@ -79,7 +84,8 @@ public class PersonalCompTotalScoreController extends JeecgController<PersonalCo
HttpServletRequest req) {
QueryWrapper<PersonalCompTotalScore> queryWrapper = QueryGenerator.initQueryWrapper(personalCompTotalScore, req.getParameterMap());
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
queryWrapper.eq("work_on",user.getUsername());
SysUser user1 = iSysUserService.getById(user.getId());
queryWrapper.eq("work_on",user1.getWorkNo());
Page<PersonalCompTotalScore> page = new Page<PersonalCompTotalScore>(pageNo, pageSize);
IPage<PersonalCompTotalScore> pageList = personalCompTotalScoreService.page(page, queryWrapper);
return Result.OK(pageList);

@ -13,4 +13,5 @@ public interface IDepartCompTotalScoreService extends IService<DepartCompTotalSc
void collectScore(DepartCompTotalScore departCompTotalScore);
void collectAllDepart(DepartCompTotalScore departCompTotalScore);
}

@ -1,20 +1,25 @@
package org.jeecg.modules.demo.annualScore.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.demo.annualScore.entity.DepartCompTotalScore;
import org.jeecg.modules.demo.annualScore.entity.PersonalCompScore;
import org.jeecg.modules.demo.annualScore.mapper.DepartCompTotalScoreMapper;
import org.jeecg.modules.demo.annualScore.service.IDepartCompTotalScoreService;
import org.jeecg.modules.demo.annualScore.service.IPersonalCompScoreService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.ObjectUtils;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
/**
* @Description: 院系总积分
@ -28,6 +33,12 @@ public class DepartCompTotalScoreServiceImpl extends ServiceImpl<DepartCompTotal
@Autowired
private IPersonalCompScoreService iPersonalCompScoreService;
@Autowired
private ISysDepartService iSysDepartService;
private final static String PARENT_ID = "1693446350597038081";
/**
* @description: 根据院系和年度统计个人比赛积分表数据
* @param: [departCompTotalScore]
@ -44,10 +55,14 @@ public class DepartCompTotalScoreServiceImpl extends ServiceImpl<DepartCompTotal
);
double totalScore = 0;
DecimalFormat decimalFormat = new DecimalFormat(totalScore + "");
decimalFormat.setMaximumFractionDigits(2); // 保留两位小数
decimalFormat.setRoundingMode(RoundingMode.HALF_UP); // 设置具体的进位机制
if (!ObjectUtils.isEmpty(personalCompScoreList)) {
totalScore = personalCompScoreList.stream().mapToDouble(PersonalCompScore::getScore).sum();
}
departCompTotalScore.setScore(totalScore);
departCompTotalScore.setScore(new Double(decimalFormat.format(totalScore)));
//id不为空,院系的某一年度已汇总过,重新汇算
if (StringUtils.isNotEmpty(departCompTotalScore.getId())) {
@ -60,4 +75,17 @@ public class DepartCompTotalScoreServiceImpl extends ServiceImpl<DepartCompTotal
}
}
@Override
public void collectAllDepart(DepartCompTotalScore param) {
this.remove(new LambdaQueryWrapper<DepartCompTotalScore>().eq(DepartCompTotalScore::getAnnualId, param.getAnnualId()));
List<SysDepart> departList = iSysDepartService.list(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getParentId, PARENT_ID));
Optional.ofNullable(departList).orElse(new LinkedList<>()).stream().forEach(e -> {
DepartCompTotalScore depart = new DepartCompTotalScore();
depart.setAnnualId(param.getAnnualId());
depart.setDepet(e.getId());
this.collectScore(depart);
});
}
}

@ -73,6 +73,9 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
@Autowired
private IAwardPersionService iAwardPersionService;
@Autowired
private ISysDepartService iSysDepartService;
private static final Integer ONE_HUNDRED = 100;
private static final Double ZERO_POINT_FIVE = 0.5;
private static final Double ZERO_POINT_TWO = 0.2;
@ -98,7 +101,8 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
//年度比赛项目,只有isPj为1时才能触发个人比赛积分汇总
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getOne(new LambdaQueryWrapper<AnnualCompPoint>()
.eq(AnnualCompPoint::getAnnualCompId, annualCompId)
// .eq(AnnualCompPoint::getAnnualCompId, annualCompId)
.eq(AnnualCompPoint::getId, personalCompScore.getAnnualCompP())
.eq(AnnualCompPoint::getIsPj, new Integer(1))
);
@ -149,14 +153,15 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
if (ObjectUtils.isEmpty(managementList)) return;
//modify 7.12 新需求
//3、计算积分 项目分值*项目级别权得百分比*获奖奖项权重百分比
//3、计算积分 项目分值*项目层次权得百分比*获奖奖项权重百分比
// log.info("***************年度比赛项目-{},项目分值:{},奖项权重值:{}", annualCompPoint.getObjName(), compweight_val, weightVal);
Projectlevel projectlevel = iProjectlevelService.getById(annualCompPoint.getObjLevel());
double scale_ratio = ComputeUtils.div2(new Double(projectlevel.getScale()), ONE_HUNDRED);
double baseScore = ComputeUtils.mul2(ComputeUtils.mul2(compweight_val, ComputeUtils.div2(new Double(weightVal), ONE_HUNDRED)),scale_ratio);
log.info("***************年度比赛项目-{},项目分值:{}", annualCompPoint.getObjName(), compweight_val);
log.info("***************年度比赛项目-级别权重比值:{}", scale_ratio);
log.info("***************年度比赛项目-层次权重比值:{}", scale_ratio);
log.info("***************获奖奖项权重百分比:{}", weightVal);
log.info("***************基础积分:{}", baseScore);
AtomicReference<Double> score = new AtomicReference<>((double) 0);
if (StringUtils.equals("Y", entryForm)) { //团队赛
Optional.ofNullable(managementList).orElse(new ArrayList<>()).forEach(e -> {
@ -175,8 +180,8 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
SysUser sysUser = iSysUserService.getById(e.getUserId());
bean.setWorkOn(sysUser.getWorkNo());
bean.setName(sysUser.getRealname());
// SysDepart sysDepart = iSysDepartService.getDepartByOrgCode(sysUser.getOrgCode());
bean.setDepet(sysUser.getDepartIds());
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode,sysUser.getOrgCode()));
bean.setDepet(sysDepart.getId());
bean.setScore(score.get());
saveList.add(bean);
});
@ -190,8 +195,8 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
SysUser sysUser = iSysUserService.getById(teamManagement.getUserId());
bean.setWorkOn(sysUser.getWorkNo());
bean.setName(sysUser.getRealname());
// SysDepart sysDepart = iSysDepartService.getDepartByOrgCode(sysUser.getOrgCode());
bean.setDepet(sysUser.getDepartIds());
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode,sysUser.getOrgCode()));
bean.setDepet(sysDepart.getId());
bean.setScore(score.get());
saveList.add(bean);
}

@ -369,8 +369,8 @@ public class AnnualCompController extends JeecgController<AnnualComp, IAnnualCom
if (annualCompVo.getEndtime() != null) {
end = annualCompVo.getEndtime().getTime();
}
if (start < end) {
Result.error("开始时间不能于结束时间");
if (start > end) {
return Result.error("开始时间不能于结束时间");
}
String compname = annualCompVo.getCompname();
String annualname = annualCompVo.getAnnualname();

@ -123,6 +123,35 @@ public class AnnualCompetitionProjectRegistrationController {
return Result.OK();
}
/**
* 1分页列表查询
*
* @param annualCompetitionProjectRegistration
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "年度比赛项目报名-分页列表查询")
@ApiOperation(value = "年度比赛项目报名-分页列表查询", notes = "年度比赛项目报名-分页列表查询")
@GetMapping(value = "/liststu")
public Result<IPage<AnnualCompetitionProjectRegistration>> liststu(AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//处理查询信息
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapper = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
Page<AnnualCompetitionProjectRegistration> page = new Page<AnnualCompetitionProjectRegistration>(pageNo, pageSize);
//根据用户角色决定查询信息
queryWrapperAddRoleInfo(queryWrapper);
//查询
IPage<AnnualCompetitionProjectRegistration> pageList = annualCompetitionProjectRegistrationService.page(page, queryWrapper);
//处理返回信息
processData(pageList.getRecords());
return Result.OK(pageList);
}
/**
* 1分页列表查询
@ -143,8 +172,40 @@ public class AnnualCompetitionProjectRegistrationController {
//处理查询信息
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapper = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
Page<AnnualCompetitionProjectRegistration> page = new Page<AnnualCompetitionProjectRegistration>(pageNo, pageSize);
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//根据登录信息查询负责比赛
List<Comp> compList =compService.query().eq("comp_admin",loginUser.getUsername()).list();
//判空
if (compList.isEmpty()){
return Result.error("未绑定比赛");
}
//将比赛的id放进一个list里面
List<String> compIds = compList.stream()
.map(Comp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据比赛的id查询年度比赛id,这里没有去卡年度
List<AnnualComp> annualCompList = annualCompService.query().in("compid",compIds).list();
//判空
if (annualCompList.isEmpty()){
return Result.error("未创建年度比赛");
}
//将年度比赛id存放到一个list里面
List<String> anncompIds = annualCompList.stream()
.map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
List<AnnualCompPoint> annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list();
//判空
if (annualCompPointList.isEmpty()){
return Result.error("未创建年度比赛项目");
}
//将年度比赛项目id存放到一个list里面
List<String> anncomppointIds = annualCompPointList.stream()
.map(AnnualCompPoint::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据用户角色决定查询信息
queryWrapperAddRoleInfo(queryWrapper);
queryWrapper.in("annual_compid",anncomppointIds);
/* queryWrapperAddRoleInfo(queryWrapper);*/
//查询
IPage<AnnualCompetitionProjectRegistration> pageList = annualCompetitionProjectRegistrationService.page(page, queryWrapper);
//处理返回信息
@ -163,8 +224,40 @@ public class AnnualCompetitionProjectRegistrationController {
//处理查询信息
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapper = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
Page<AnnualCompetitionProjectRegistration> page = new Page<AnnualCompetitionProjectRegistration>(pageNo, pageSize);
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//根据登录信息查询负责比赛
List<Comp> compList =compService.query().eq("comp_admin",loginUser.getUsername()).list();
//判空
if (compList.isEmpty()){
return Result.error("未绑定比赛");
}
//将比赛的id放进一个list里面
List<String> compIds = compList.stream()
.map(Comp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据比赛的id查询年度比赛id,这里没有去卡年度
List<AnnualComp> annualCompList = annualCompService.query().in("compid",compIds).list();
//判空
if (annualCompList.isEmpty()){
return Result.error("未创建年度比赛");
}
//将年度比赛id存放到一个list里面
List<String> anncompIds = annualCompList.stream()
.map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
List<AnnualCompPoint> annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list();
//判空
if (annualCompPointList.isEmpty()){
return Result.error("未创建年度比赛项目");
}
//将年度比赛项目id存放到一个list里面
List<String> anncomppointIds = annualCompPointList.stream()
.map(AnnualCompPoint::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据用户角色决定查询信息
queryWrapperAddRoleInfo(queryWrapper);
queryWrapper.in("annual_compid",anncomppointIds);
/* queryWrapperAddRoleInfo(queryWrapper);*/
queryWrapper.eq("enroll_static", "2");
//查询
IPage<AnnualCompetitionProjectRegistration> pageList = annualCompetitionProjectRegistrationService.page(page, queryWrapper);
@ -184,8 +277,41 @@ public class AnnualCompetitionProjectRegistrationController {
//处理查询信息
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapper = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
Page<AnnualCompetitionProjectRegistration> page = new Page<AnnualCompetitionProjectRegistration>(pageNo, pageSize);
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//根据登录信息查询负责比赛
List<Comp> compList =compService.query().eq("comp_admin",loginUser.getUsername()).list();
//判空
if (compList.isEmpty()){
return Result.error("未绑定比赛");
}
//将比赛的id放进一个list里面
List<String> compIds = compList.stream()
.map(Comp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据比赛的id查询年度比赛id,这里没有去卡年度
List<AnnualComp> annualCompList = annualCompService.query().in("compid",compIds).list();
//判空
if (annualCompList.isEmpty()){
return Result.error("未创建年度比赛");
}
//将年度比赛id存放到一个list里面
List<String> anncompIds = annualCompList.stream()
.map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
List<AnnualCompPoint> annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list();
//判空
if (annualCompPointList.isEmpty()){
return Result.error("未创建年度比赛项目");
}
//将年度比赛项目id存放到一个list里面
List<String> anncomppointIds = annualCompPointList.stream()
.map(AnnualCompPoint::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据用户角色决定查询信息
queryWrapperAddRoleInfo(queryWrapper);
queryWrapper.in("annual_compid",anncomppointIds);
/* queryWrapperAddRoleInfo(queryWrapper);*/
queryWrapper.eq("enroll_static", "4");
//查询
IPage<AnnualCompetitionProjectRegistration> pageList = annualCompetitionProjectRegistrationService.page(page, queryWrapper);
@ -206,8 +332,40 @@ public class AnnualCompetitionProjectRegistrationController {
//处理查询信息
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapper = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
Page<AnnualCompetitionProjectRegistration> page = new Page<AnnualCompetitionProjectRegistration>(pageNo, pageSize);
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//根据登录信息查询负责比赛
List<Comp> compList =compService.query().eq("comp_admin",loginUser.getUsername()).list();
//判空
if (compList.isEmpty()){
return Result.error("未绑定比赛");
}
//将比赛的id放进一个list里面
List<String> compIds = compList.stream()
.map(Comp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据比赛的id查询年度比赛id,这里没有去卡年度
List<AnnualComp> annualCompList = annualCompService.query().in("compid",compIds).list();
//判空
if (annualCompList.isEmpty()){
return Result.error("未创建年度比赛");
}
//将年度比赛id存放到一个list里面
List<String> anncompIds = annualCompList.stream()
.map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
List<AnnualCompPoint> annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list();
//判空
if (annualCompPointList.isEmpty()){
return Result.error("未创建年度比赛项目");
}
//将年度比赛项目id存放到一个list里面
List<String> anncomppointIds = annualCompPointList.stream()
.map(AnnualCompPoint::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据用户角色决定查询信息
queryWrapperAddRoleInfo(queryWrapper);
queryWrapper.in("annual_compid",anncomppointIds);
/* queryWrapperAddRoleInfo(queryWrapper);*/
queryWrapper.eq("enroll_static", "1");
//查询
IPage<AnnualCompetitionProjectRegistration> pageList = annualCompetitionProjectRegistrationService.page(page, queryWrapper);
@ -227,8 +385,40 @@ public class AnnualCompetitionProjectRegistrationController {
//处理查询信息
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapper = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
Page<AnnualCompetitionProjectRegistration> page = new Page<AnnualCompetitionProjectRegistration>(pageNo, pageSize);
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//根据登录信息查询负责比赛
List<Comp> compList =compService.query().eq("comp_admin",loginUser.getUsername()).list();
//判空
if (compList.isEmpty()){
return Result.error("未绑定比赛");
}
//将比赛的id放进一个list里面
List<String> compIds = compList.stream()
.map(Comp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据比赛的id查询年度比赛id,这里没有去卡年度
List<AnnualComp> annualCompList = annualCompService.query().in("compid",compIds).list();
//判空
if (annualCompList.isEmpty()){
return Result.error("未创建年度比赛");
}
//将年度比赛id存放到一个list里面
List<String> anncompIds = annualCompList.stream()
.map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
List<AnnualCompPoint> annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list();
//判空
if (annualCompPointList.isEmpty()){
return Result.error("未创建年度比赛项目");
}
//将年度比赛项目id存放到一个list里面
List<String> anncomppointIds = annualCompPointList.stream()
.map(AnnualCompPoint::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据用户角色决定查询信息
queryWrapperAddRoleInfo(queryWrapper);
queryWrapper.in("annual_compid",anncomppointIds);
/* queryWrapperAddRoleInfo(queryWrapper);*/
queryWrapper.eq("enroll_static", "0");
//查询
IPage<AnnualCompetitionProjectRegistration> pageList = annualCompetitionProjectRegistrationService.page(page, queryWrapper);
@ -248,8 +438,40 @@ public class AnnualCompetitionProjectRegistrationController {
//处理查询信息
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapper = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
Page<AnnualCompetitionProjectRegistration> page = new Page<AnnualCompetitionProjectRegistration>(pageNo, pageSize);
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//根据登录信息查询负责比赛
List<Comp> compList =compService.query().eq("comp_admin",loginUser.getUsername()).list();
//判空
if (compList.isEmpty()){
return Result.error("未绑定比赛");
}
//将比赛的id放进一个list里面
List<String> compIds = compList.stream()
.map(Comp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据比赛的id查询年度比赛id,这里没有去卡年度
List<AnnualComp> annualCompList = annualCompService.query().in("compid",compIds).list();
//判空
if (annualCompList.isEmpty()){
return Result.error("未创建年度比赛");
}
//将年度比赛id存放到一个list里面
List<String> anncompIds = annualCompList.stream()
.map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
List<AnnualCompPoint> annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list();
//判空
if (annualCompPointList.isEmpty()){
return Result.error("未创建年度比赛项目");
}
//将年度比赛项目id存放到一个list里面
List<String> anncomppointIds = annualCompPointList.stream()
.map(AnnualCompPoint::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据用户角色决定查询信息
queryWrapperAddRoleInfo(queryWrapper);
queryWrapper.in("annual_compid",anncomppointIds);
/* queryWrapperAddRoleInfo(queryWrapper);*/
queryWrapper.eq("enroll_static", "3");
//查询
IPage<AnnualCompetitionProjectRegistration> pageList = annualCompetitionProjectRegistrationService.page(page, queryWrapper);
@ -273,6 +495,9 @@ public class AnnualCompetitionProjectRegistrationController {
} else if (role.equals("committee")) {
//首先获取负责的比赛
List<Comp> compList = compService.query().eq("comp_admin",loginUser.getUsername()).list();
if(compList.isEmpty()){
return ;
}
//将比赛的id放进一个list里面
List<String> compIds = compList.stream()
.map(Comp::getId) // 使用方法引用获取每个Comp对象的id
@ -995,7 +1220,7 @@ public class AnnualCompetitionProjectRegistrationController {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin", user.getUsername());
queryWrappercomp.eq("comp_admin", user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
Map<String, Object> map = new HashMap<>();
if (list.size() > 0) {
@ -1774,7 +1999,7 @@ public class AnnualCompetitionProjectRegistrationController {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin", user.getUsername());
queryWrappercomp.eq("comp_admin", user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
Map<String, Object> map = new HashMap<>();
if (list.size() > 0) {
@ -2129,7 +2354,7 @@ public class AnnualCompetitionProjectRegistrationController {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();

@ -95,21 +95,30 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup,
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.error("未绑定比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
queryWrapperAnnual.in("compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.error("未创建年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<AnnualCompGroup> queryWrapper = QueryGenerator.initQueryWrapper(annualCompGroup, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds);
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds);
queryWrapperacp.in("annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return Result.error("未创建年度比赛项目");
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in(acpIds.size()!=0,"ann_comp_p",acpIds);
@ -190,7 +199,7 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup,
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrapper = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrapper.like("comp_admin",user.getUsername());
queryWrapper.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrapper);
String str = "";
for(int i = 0 ; i < list.size() ; i++){

@ -18,6 +18,7 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.JeecgBaseConfig;
import org.jeecg.modules.demo.annual.service.IAnnualService;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService;
import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
@ -96,6 +97,8 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
private ISysRoleService sysRoleService;
@Autowired
private ISysUserRoleService sysUserRoleService;
@Autowired
private IAnnualService annualService;
/**
* 分页列表查询
@ -120,30 +123,39 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
//学生(上传证书和查询)(根据学号查询筛选)
Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize);
QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap());
queryWrapper.eq("studentcode",user.getUsername());
queryWrapper.eq("studentcode",sysUserService.getById(user.getId()).getWorkNo());
IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper);
return Result.OK(pageList);
}else if(sysRoleList.get(0).getId().equals("1693451972151386114")){
//组委会(全部都可以)(根据比赛负责人查询比赛id筛选)
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.error("未绑定比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
queryWrapperAnnual.in("compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.error("未创建年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds);
queryWrapper.in("annal_comp",annualIds);
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds);
queryWrapperacp.in("annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return Result.error("未创建年度比赛项目");
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in(acpIds.size()!=0,"annual_comp_p",acpIds);
queryWrapper.in("annual_comp_p",acpIds);
Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize);
IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper);
@ -224,7 +236,7 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
for (int l = 0 ; l < listtm.size() ; l++){
SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId());
awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername());
awardPersion.setStudentcode(sysUser.getWorkNo());
awardPersion.setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId());
awardPersionService.save(awardPersion);
}
@ -485,6 +497,27 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
List<AwardPersion> list = ExcelImportUtil.importExcel(file.getInputStream(), AwardPersion.class, params);
List<AwardPersion> listsave = new ArrayList<>();
for(int i = 0 ; i < list.size() ; i++){
if(list.get(i).getAnnualid()==null||list.get(i).getAnnualid().equals("")){
return Result.error("文件导入失败:第"+(i+1)+"行年度为空");
}
if(list.get(i).getAnnalComp()==null||list.get(i).getAnnalComp().equals("")){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛为空");
}
if(list.get(i).getAnnualCompP()==null||list.get(i).getAnnualCompP().equals("")){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛项目为空");
}
if(list.get(i).getEnrollCode()==null||list.get(i).getEnrollCode().equals("")){
return Result.error("文件导入失败:第"+(i+1)+"行报名编号为空");
}
if(list.get(i).getAwardname()==null||list.get(i).getAwardname().equals("")){
return Result.error("文件导入失败:第"+(i+1)+"行奖项名称为空");
}
QueryWrapper<AnnualCompPoint> queryWrapperndbsxm = new QueryWrapper<>();
queryWrapperndbsxm.eq("obj_name",list.get(i).getAnnualCompP()).or().eq("id",list.get(i).getAnnualCompP());
List<AnnualCompPoint> listndbsxm = annualCompPointService.list(queryWrapperndbsxm);
if(listndbsxm.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛项目不存在");
}
AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration();
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrappera = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, request.getParameterMap());
queryWrappera.eq("annual_compid",list.get(i).getAnnualCompP());
@ -505,47 +538,68 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
QueryWrapper<AnnualCompAward> queryWrapperaca = QueryGenerator.initQueryWrapper(annualCompAward, request.getParameterMap());
queryWrapperaca.eq("annucompid",list.get(i).getAnnualCompP());
List<AnnualCompAward> listaca = annualCompAwardService.list(queryWrapperaca);
if(listaca.size()==0){
return Result.error("未设置年度比赛奖项");
}
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap());
queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
String nd = annualService.getannualthisid(list.get(i).getAnnualid());
if(nd==null){
return Result.error("文件导入失败:第"+(i+1)+"行年度不存在");
}else{
list.get(i).setAnnualid(nd);
}
QueryWrapper<AnnualComp> queryWrapperndbs = new QueryWrapper<>();
queryWrapperndbs.eq("name",list.get(i).getAnnalComp()).or().eq("id",list.get(i).getAnnalComp());
List<AnnualComp> listndbs = annualCompService.list(queryWrapperndbs);
if(listndbs.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行年度比赛不存在");
}
try {
for (int l = 0 ; l < listtm.size() ; l++){
SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId());
list.get(i).setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId());
if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(1);
list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername());
list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i));
}else if(listaca.get(0).getSecondPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(2);
list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername());
list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i));
}else if(listaca.get(0).getThirdPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(3);
list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername());
list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i));
}else if(listaca.get(0).getFourthPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(4);
list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername());
list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i));
}else if(listaca.get(0).getFifthPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(5);
list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername());
list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i));
}else {
return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在");
}
}
}catch (Exception e){
return Result.error("年度比赛奖项设置中的奖项名称为空,请先设置对应等级的奖项名称");
}
}
//update-begin-author:taoyan date:20190528 for:批量插入数据
long start = System.currentTimeMillis();

@ -489,10 +489,11 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
//比赛数
last5YearDataVo.setCompCount(1);
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getOne(new LambdaQueryWrapper<AnnualCompPoint>().eq(AnnualCompPoint::getAnnualCompId, ac.getId()));
if (!ObjectUtils.isEmpty(annualCompPoint)) {
List<AnnualCompPoint> annualCompPoints = iAnnualCompPointService.list(new LambdaQueryWrapper<AnnualCompPoint>().eq(AnnualCompPoint::getAnnualCompId, ac.getId()));
if (!ObjectUtils.isEmpty(annualCompPoints)) {
Set<String> pids = annualCompPoints.stream().map(e -> e.getId()).collect(Collectors.toSet());
long personCount4CompTemp = iAnnualCompetitionProjectRegistrationService.count(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>().
eq(AnnualCompetitionProjectRegistration::getAnnualCompid, annualCompPoint.getId()));
in(AnnualCompetitionProjectRegistration::getAnnualCompid, pids));
personCount4Comp.getAndUpdate(val -> val.add(new BigDecimal(personCount4CompTemp)));
last5YearDataVo.setPersonCount(personCount4Comp.get().intValue());
}
@ -667,6 +668,9 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
List<Map<String, Object>> last4YearData = new LinkedList<>();
List<Integer> years = DateUtils.getLastxYear(4);
List<Annual> annualList = iAnnualService.list(new LambdaQueryWrapper<Annual>().in(Annual::getAnnualName, years).orderByAsc(Annual::getAnnualName));
DecimalFormat decimalFormat = new DecimalFormat();
decimalFormat.setMaximumFractionDigits(2); // 保留两位小数
decimalFormat.setRoundingMode(RoundingMode.HALF_UP); // 设置具体的进位机制
annualList.forEach(annual -> {
AtomicReference<BigDecimal> baseScore = new AtomicReference<>(BigDecimal.ZERO);
Map<String, Object> yearData = new LinkedHashMap<>();
@ -678,7 +682,7 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
double sum = compScoreList.stream().mapToDouble(PersonalCompScore::getScore).sum();
baseScore.getAndUpdate(val -> val.add(new BigDecimal(sum)));
}
yearData.put("score", baseScore);
yearData.put("score", decimalFormat.format(baseScore.get()));
last4YearData.add(yearData);
});
studentInfoMap.put("last4YearData", last4YearData);

@ -11,16 +11,21 @@ import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.CommonAPI;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.anncomgrotop.entity.AnnComGroTop;
import org.jeecg.modules.demo.anncomgrotop.service.IAnnComGroTopService;
import org.jeecg.modules.demo.anncomgrotopp.entity.AnnComGroTopP;
import org.jeecg.modules.demo.anncomgrotopp.service.IAnnComGroTopPService;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService;
import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService;
import org.jeecg.modules.demo.chooseTopicPersion.entity.ChaoseTopicPersion;
@ -33,6 +38,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.comp.entity.Comp;
import org.jeecg.modules.demo.comp.service.ICompService;
import org.jeecg.modules.demo.topic.entity.Topic;
import org.jeecg.modules.demo.topic.service.ITopicService;
import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion;
import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService;
@ -80,6 +88,10 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
private IAnnComGroTopPService annComGroTopPService;
@Autowired
private IUpfilePersionService upfilePersionService;
@Autowired
private IAnnualCompService annualCompService;
@Autowired
private ICompService compService;
/**
* 分页列表查询
@ -98,6 +110,12 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ChaoseTopicPersion> queryWrapper = QueryGenerator.initQueryWrapper(chaoseTopicPersion, req.getParameterMap());
//根据当前登录信息查询题目id,用list去接受
List<String> topicid =gettopicid();
if (topicid.isEmpty()){
return Result.error("请检查比赛流程,未发现选题信息。");
}
queryWrapper.in("timul",topicid);
Page<ChaoseTopicPersion> page = new Page<>(pageNo, pageSize);
IPage<ChaoseTopicPersion> pageList = chaoseTopicPersionService.page(page, queryWrapper);
List<ChooseDto> chooseDtos = new ArrayList<>();
@ -131,6 +149,53 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
return Result.OK(chooseDtos);
}
//根据当前登录信息获取题目id,返回list
private List<String> gettopicid() {
List<String> topicids = new ArrayList<>();
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//根据登录信息查询负责比赛
List<Comp> compList =compService.query().eq("comp_admin",loginUser.getUsername()).list();
//判空
if (compList.isEmpty()){
return topicids;
}
//将比赛的id放进一个list里面
List<String> compIds = compList.stream()
.map(Comp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据比赛的id查询年度比赛id,这里没有去卡年度
List<AnnualComp> annualCompList = annualCompService.query().in("compid",compIds).list();
//判空
if (annualCompList.isEmpty()){
return topicids;
}
//将年度比赛id存放到一个list里面
List<String> anncompIds = annualCompList.stream()
.map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
List<AnnualCompPoint> annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list();
//判空
if (annualCompPointList.isEmpty()){
return topicids;
}
//将年度比赛项目id存放到一个list里面
List<String> anncomppointIds = annualCompPointList.stream()
.map(AnnualCompPoint::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据年度比赛项目id查询题目
List<Topic> topicList = topicService.query().in("annual_compid",anncomppointIds).list();
if (topicList.isEmpty()){
return topicids;
}
topicids =topicList.stream()
.map(Topic::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
return topicids;
}
@GetMapping(value = "/watch")
public Result<ChaoseTopicPersion> watch(String enrollCode) {
QueryWrapper<ChaoseTopicPersion> queryWrapper = new QueryWrapper<>();

@ -205,6 +205,11 @@ public class CompController extends JeecgController<Comp, ICompService> {
Integer compOrder = comp.getCompOrder();
String departIds = comp.getCompOrgan();
List<Comp> compListsss = compService.query().eq("comp_name",comp.getCompName()).list();
if (compListsss.size()>0){
return Result.error("这个比赛名称已存在,请确定比赛名称是否正确");
}
List<String> list = Arrays.asList(comp.getCompAdmin().split(","));
/* List list1 = new ArrayList<>();
@ -266,7 +271,7 @@ public class CompController extends JeecgController<Comp, ICompService> {
System.out.println(compList.get(i).getCompOrder());
int rankold = insertAndRank(parlint, String.valueOf(compList.get(i).getCompOrder()));
int scoreold = (int) (( rankold+1) * b + compTypeService.getById(comp.getCompTypeId()).getScorel());
compService.updatedate(compList.get(i).getId(),scoreold);
compService.updatedatework(compList.get(i).getId(),scoreold);
}
}
/*--------------------------王家东添加开始============================*/

@ -30,5 +30,5 @@ public interface CompMapper extends BaseMapper<Comp> {
List<Comp> getAllCompByType(String compTypeId);
@Update("UPDATE comp SET compweight = #{scoreold} WHERE id=#{id}")
void updatedate(String id, int scoreold);
void updatedatework(@Param("id") String id, @Param("scoreold") int scoreold);
}

@ -22,5 +22,5 @@ public interface ICompService extends IService<Comp> {
List<Comp> getAllCompByType(String compTypeId);
void updatedate(String id, int scoreold);
void updatedatework(String id, int scoreold);
}

@ -42,7 +42,7 @@ public class CompServiceImpl extends ServiceImpl<CompMapper, Comp> implements IC
}
@Override
public void updatedate(String id, int scoreold) {
compMapper.updatedate(id,scoreold);
public void updatedatework(String id, int scoreold) {
compMapper.updatedatework(id,scoreold);
}
}

@ -140,7 +140,7 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
ExpGroup expGroup = new ExpGroup();
QueryWrapper<ExpGroup> queryWrappereg = QueryGenerator.initQueryWrapper(expGroup, req.getParameterMap());
queryWrappereg.eq("grouid",listce.get(i).getExpid());
//queryWrappereg.eq("ann_comp_groupid",ndbsxzid);
queryWrappereg.eq("ann_comp_groupid",ndbsxzid);
List<ExpGroup> listeg = expGroupService.list(queryWrappereg);
if(listeg.size()==0){
expids = expids+listce.get(i).getExpid()+",";
@ -447,7 +447,7 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
}
return result;
}
/**
* 导出excel模板

@ -105,21 +105,30 @@ public class ScorePersionController extends JeecgController<ScorePersion, IScore
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.error("未绑定比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.error("未创建年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<ScorePersion> queryWrapper = QueryGenerator.initQueryWrapper(scorePersion, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annual_compid",annualIds);
queryWrapper.in("annual_compid",annualIds);
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds);
queryWrapperacp.in("annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return Result.error("未创建年度比赛项目");
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in(acpIds.size()!=0,"annual_comp_p",acpIds);

@ -87,23 +87,32 @@ public class ScoreStaController extends JeecgController<ScoreSta, IScoreStaServi
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.error("未绑定比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
queryWrapperAnnual.in("compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.error("未创建年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<ScoreSta> queryWrapper = QueryGenerator.initQueryWrapper(scoreSta, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds);
queryWrapper.in("annal_comp",annualIds);
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return Result.error("未创建年度比赛项目");
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in(acpIds.size()!=0,"annual_compid",acpIds);
queryWrapper.in("annual_compid",acpIds);
Page<ScoreSta> page = new Page<ScoreSta>(pageNo, pageSize);

@ -1145,6 +1145,7 @@ public class SysUserController {
String departmentid = jsonObject.getString("departmentid");
String realname = jsonObject.getString("realname");
String checkKey = jsonObject.getString("checkKey");
String workon = jsonObject.getString("workno");
if(captcha==null){
result.error500("验证码无效");
@ -1187,6 +1188,14 @@ public class SysUserController {
result.setSuccess(false);
return result;
}
QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
queryWrapper.in("work_no", workon);
List<SysUser> sysUser3 = sysUserService.list(queryWrapper);
if (sysUser3.size()>0) {
result.setMessage("该学号/工号已注册");
result.setSuccess(false);
return result;
}
if(oConvertUtils.isEmpty(realname)){
realname = username;
@ -1198,6 +1207,7 @@ public class SysUserController {
String passwordEncode = PasswordUtil.encrypt(username, password, salt);
user.setSalt(salt);
user.setUsername(username);
user.setWorkNo(workon);
user.setRealname(realname);
user.setPassword(passwordEncode);
//user.setEmail(email);

File diff suppressed because it is too large Load Diff

@ -60,6 +60,7 @@ export default {
placeholder: '请输入锁屏密码或者用户密码',
},
login: {
workno: '工号/学号',
backSignIn: '返回',
signInFormTitle: '登录',
mobileSignInFormTitle: '手机登录',

@ -49,6 +49,21 @@ export const rules = {
},
];
},
workNo(required){
return [
{
required: required,
validator: async (_, value) => {
if (required && !value) {
return Promise.reject('请输入工号/学号');
}
return Promise.resolve();
},
trigger: 'change',
},
];
},
startTime(endTime, required) {
return [
{

@ -5,7 +5,8 @@ const { createConfirm } = useMessage();
enum Api {
list = '/abilityEvaluation/departAbilityEvaluation/list',
save='/abilityEvaluation/departAbilityEvaluation/add',
// save='/abilityEvaluation/departAbilityEvaluation/add',
collectAllDepart='/abilityEvaluation/departAbilityEvaluation/collectAllDepart',
edit='/abilityEvaluation/departAbilityEvaluation/edit',
deleteOne = '/abilityEvaluation/departAbilityEvaluation/delete',
deleteBatch = '/abilityEvaluation/departAbilityEvaluation/deleteBatch',
@ -60,7 +61,8 @@ export const batchDelete = (params, handleSuccess) => {
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
// let url = isUpdate ? Api.edit : Api.save;
let url = isUpdate ? Api.edit : Api.collectAllDepart;
return defHttp.post({url: url, params});
}

@ -29,7 +29,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'depetId',
component: 'JDictSelectTag',
componentProps: {
dictCode: "sys_depart,depart_name,id"
dictCode:"sys_depart,depart_name,id,parent_id='1693446350597038081'"
},
colProps: {span: 6},
},
@ -59,13 +59,13 @@ export const formSchema: FormSchema[] = [
field: 'depetId',
component: 'JDictSelectTag',
componentProps: {
dictCode: "sys_depart,depart_name,id"
},
dynamicRules: ({model, schema}) => {
return [
{required: true, message: '请输入所属部门!'},
];
dictCode:"sys_depart,depart_name,id,parent_id='1693446350597038081'"
},
// dynamicRules: ({model, schema}) => {
// return [
// {required: true, message: '请输入所属部门!'},
// ];
// },
},
{
label: '年度',

@ -30,7 +30,7 @@ export const columns: BasicColumn[] = [
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "所属部门",
label: "院系",
field: 'depetId',
component: 'JDictSelectTag',
componentProps: {

@ -255,7 +255,7 @@
* 个人积分汇总
*/
function handleCollectScoreApply(record: Recordable) {
collectScore({id: record.id, annualCompId: record.annualCompId}, handleSuccess);
collectScore({id: record.id, annualCompId: record.annualCompId, annualCompP: record.id}, handleSuccess);
}
/**
@ -402,16 +402,24 @@
});
}
/**
* 个人积分汇总
* 触发条件评奖完成后操作且更新项目状态为积分已汇总并且不可再进行个人积分汇总
*
是否已凭奖为1且未汇总过时可以积分汇总操作
* 状态0待提交1已提交(待审核)2已审核(已通过)3待驳回4已驳回5-已报名6-已选题7-已上传作品8-已评分9-已评奖,10-积分已汇总
*/
if (record.isPj == 1 && record.annualCompState != "10") {
if (record.isPj == 1 /*&& record.annualCompState != "10"*/) {
actions.unshift({
label: '个人积分汇总',
onClick: handleCollectScoreApply.bind(null, record),
});
}
if (record.isPj == 1 ) {
/**
* 个人能力量化
* 触发条件个人积分汇总完成后操作可以重复进行个人能力量化操作
*/
if (record.isPj == 1 && record.annualCompState == "10" ) {
actions.unshift({
label: '个人能力量化',
onClick: handlePersonalAbilityEvaluation.bind(null, record),

@ -6,6 +6,9 @@ const {createConfirm} = useMessage();
enum Api {
listZJ = '/AnnualCompPoint/annualCompPoint/listZJ',
list = '/AnnualCompPoint/annualCompPoint/listAdmin',
listdsh = '/AnnualCompPoint/annualCompPoint/listdsh',
listdbh = '/AnnualCompPoint/annualCompPoint/listdbh',
listysh = '/AnnualCompPoint/annualCompPoint/listysh',
save = '/AnnualCompPoint/annualCompPoint/add',
edit = '/AnnualCompPoint/annualCompPoint/edit',
deleteOne = '/AnnualCompPoint/annualCompPoint/delete',
@ -15,6 +18,12 @@ enum Api {
updatePass = '/AnnualCompPoint/annualCompPoint/updatePass',
}
//待审核
export const listdsh = (params) => defHttp.get({ url: Api.listdsh, params });
//带驳回
export const listdbh = (params) => defHttp.get({ url: Api.listdbh, params });
//带已审核
export const listysh = (params) => defHttp.get({ url: Api.listysh, params });
/**
* api
* @param params

@ -59,6 +59,18 @@ export const columns: BasicColumn[] = [
return '待驳回';
case "4":
return '已驳回';
case "5":
return '已报名';
case "6":
return '已选题';
case "7":
return '已上传作品';
case "8":
return '已评分';
case "9":
return '已评奖';
case "10":
return '积分已汇总';
default:
return annualCompState.value;
}

@ -63,7 +63,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useListPage} from '/@/hooks/system/useListPage';
import {columns} from './AnnualCompPoint.data';
import {
list,
listdsh,
deleteOne,
batchDelete,
getImportUrl,
@ -87,7 +87,7 @@ const registerModal = ref();
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
tableProps: {
title: '年度比赛项目管理',
api: list,
api: listdsh,
columns,
canResize: false,
useSearchForm: false,
@ -96,7 +96,6 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
fixed: 'right',
},
beforeFetch: (params) => {
queryParam.annualCompState=1;
return Object.assign(params, queryParam);
},
},

@ -64,7 +64,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useListPage} from '/@/hooks/system/useListPage';
import {columns} from './AnnualCompPoint.data';
import {
list,
listdbh,
deleteOne,
batchDelete,
getImportUrl,
@ -90,7 +90,7 @@ const registerModal1 = ref();
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
tableProps: {
title: '年度比赛项目管理',
api: list,
api: listdbh,
columns,
canResize: false,
useSearchForm: false,
@ -99,7 +99,6 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
fixed: 'right',
},
beforeFetch: (params) => {
queryParam.annualCompState=3;
return Object.assign(params, queryParam);
},
},

@ -63,7 +63,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useListPage} from '/@/hooks/system/useListPage';
import {columns} from './AnnualCompPoint.data';
import {
list,
listysh,
deleteOne,
batchDelete,
getImportUrl,
@ -87,7 +87,7 @@ const registerModal = ref();
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
tableProps: {
title: '年度比赛项目管理',
api: list,
api: listysh,
// api: () => list({ ...params, compStatus: compStatus }),
columns,
canResize: false,
@ -97,7 +97,6 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
fixed: 'right',
},
beforeFetch: (params) => {
queryParam.annualCompState=2;
return Object.assign(params, queryParam);
},
},

@ -5,7 +5,8 @@ const { createConfirm } = useMessage();
enum Api {
list = '/annualScore/departCompTotalScore/list',
save='/annualScore/departCompTotalScore/add',
// save='/annualScore/departCompTotalScore/add',
collectAllDepart='/annualScore/departCompTotalScore/collectAllDepart',
edit='/annualScore/departCompTotalScore/edit',
deleteOne = '/annualScore/departCompTotalScore/delete',
deleteBatch = '/annualScore/departCompTotalScore/deleteBatch',
@ -60,7 +61,8 @@ export const batchDelete = (params, handleSuccess) => {
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
// let url = isUpdate ? Api.edit : Api.save;
let url = isUpdate ? Api.edit : Api.collectAllDepart;
return defHttp.post({url: url, params});
}

@ -42,7 +42,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'depet',
component: 'JDictSelectTag',
componentProps:{
dictCode:"sys_depart,depart_name,id"
dictCode:"sys_depart,depart_name,id,parent_id='1693446350597038081'"
},
colProps: {span: 6},
},
@ -63,13 +63,15 @@ export const formSchema: FormSchema[] = [
field: 'depet',
component: 'JDictSelectTag',
componentProps:{
dictCode:"sys_depart,depart_name,id"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入所属部门!'},
];
dictCode:"sys_depart,depart_name,id,parent_id='1693446350597038081'"
// dictCode: "sys_user,realname,id,username!='admin' order by create_time",
},
// dynamicRules: ({model,schema}) => {
// return [
// { required: true, message: '请输入所属部门!'},
// ];
// },
},
{
label: '年度',

@ -4,7 +4,7 @@ import {useMessage} from "/src/hooks/web/useMessage";
const {createConfirm} = useMessage();
enum Api {
list = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/list',
list = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/liststu',
choose = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/choose',
save = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/add',
edit = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/edit',

@ -1,76 +1,82 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<AwardPersionForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></AwardPersionForm>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<AwardPersionForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</AwardPersionForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import AwardPersionForm from './AwardPersionForm.vue'
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
import { ref, nextTick, defineExpose, watch } from 'vue';
import AwardPersionForm from './AwardPersionForm.vue'
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
registerForm.value.setIsT(true);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
watch(() => visible.value, newVal => {
if (!newVal) registerForm.value.setIsT(false);
})
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
defineExpose({
add,
edit,
disableSubmit,
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
registerForm.value.setIsT(true);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

@ -112,13 +112,13 @@
</div>
</div>
<a-form @keyup.enter.native="loginHandleClick">
<!-- <div class="aui-flex aui-third-text">
<div class="aui-flex aui-third-text">
<div class="aui-flex-box aui-third-border">
<span>{{ t('sys.login.otherSignIn') }}</span>
</div>
</div>-->
<!-- <div class="aui-flex" :class="`${prefixCls}-sign-in-way`">
<div class="aui-flex-box">
</div>
<div class="aui-flex" :class="`${prefixCls}-sign-in-way`">
<!--<div class="aui-flex-box">
<div class="aui-third-login">
<a title="github" @click="onThirdLogin('github')"><GithubFilled /></a>
</div>
@ -132,13 +132,13 @@
<div class="aui-third-login">
<a title="钉钉" @click="onThirdLogin('dingtalk')"><DingtalkCircleFilled /></a>
</div>
</div>
</div>-->
<div class="aui-flex-box">
<div class="aui-third-login">
<a title="微信" @click="onThirdLogin('wechat_open')"><WechatFilled /></a>
</div>
</div>
</div>-->
</div>
</a-form>
</div>
</div>

@ -27,6 +27,12 @@
<a-input class="fix-auto-fill" type="text" :placeholder="t('sys.login.name')" v-model:value="formData.realname" />
</div>
</a-form-item>
<a-form-item>
<div class="aui-input-line">
<Icon class="aui-icon" icon="ant-design:mobile-outlined" />
<a-input class="fix-auto-fill" type="text" :placeholder="t('sys.login.workno')" v-model:value="formData.workno" />
</div>
</a-form-item>
<a-form-item>
<div class="aui-input-line">
<!-- <Icon class="aui-icon" icon="ant-design:mobile-outlined" /> -->
@ -137,6 +143,7 @@
const formRef = ref();
const formData = reactive<any>({
username: '',
workno: '',
mobile: '',
smscode: '',
password: '',
@ -228,6 +235,10 @@ const randCodeData = reactive<any>({
createMessage.warn(t('sys.login.passwordPlaceholder'));
return;
}
if (!formData.workno) {
createMessage.warn(t('sys.login.passwordPlaceholder'));
return;
}
if (!formData.confirmPassword) {
createMessage.warn(t('sys.login.confirmPassword'));
return;
@ -250,6 +261,7 @@ const randCodeData = reactive<any>({
try {
const resultInfo = await registerStu(
toRaw({
workno: formData.workno,
username: formData.username,
departmentid: formData.department,
realname: formData.realname,
@ -286,7 +298,7 @@ const randCodeData = reactive<any>({
* 初始化表单
*/
function initForm() {
Object.assign(formData, { username: '', mobile: '', realname: '', department: '', smscode: '', password: '', confirmPassword: ''/*, policy: false*/ });
Object.assign(formData, { workno: '', username: '', mobile: '', realname: '', department: '', smscode: '', password: '', confirmPassword: ''/*, policy: false*/ });
if (!unref(timer)) {
showInterval.value = true;
clearInterval(unref(timer));

@ -21,7 +21,7 @@ export const columns: BasicColumn[] = [
width: 120,
customRender: render.renderAvatar,
},
{
/* {
title: '性别',
dataIndex: 'sex',
width: 80,
@ -34,7 +34,7 @@ export const columns: BasicColumn[] = [
title: '生日',
dataIndex: 'birthday',
width: 100,
},
},*/
{
title: '手机号',
dataIndex: 'phone',
@ -185,9 +185,8 @@ export const formSchemaYX: FormSchema[] = [
{
label: '工号/学号',
field: 'workNo',
required: true,
component: 'Input',
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'work_no', model, schema, true),
dynamicRules: ({ model, schema }) => rules.workNo('workNo'),
},
/* {
label: '职务',
@ -298,11 +297,23 @@ export const formSchemaYX: FormSchema[] = [
{
label: '邮箱',
field: 'email',
rules: [
{
required: true,
message: '请输入登录邮箱',
},
],
component: 'Input',
},
{
label: '手机号码',
field: 'phone',
rules: [
{
required: true,
message: '请输入登录手机号码',
},
],
component: 'Input',
},
/*{

@ -20,7 +20,7 @@ export const columns: BasicColumn[] = [
width: 120,
customRender: render.renderAvatar,
},
{
/*{
title: '性别',
dataIndex: 'sex',
width: 80,
@ -33,7 +33,7 @@ export const columns: BasicColumn[] = [
title: '生日',
dataIndex: 'birthday',
width: 100,
},
},*/
{
title: '手机号',
dataIndex: 'phone',

@ -20,7 +20,7 @@ export const columns: BasicColumn[] = [
width: 120,
customRender: render.renderAvatar,
},
{
/*{
title: '性别',
dataIndex: 'sex',
width: 80,
@ -33,7 +33,7 @@ export const columns: BasicColumn[] = [
title: '生日',
dataIndex: 'birthday',
width: 100,
},
},*/
{
title: '手机号',
dataIndex: 'phone',

@ -20,7 +20,7 @@ export const columns: BasicColumn[] = [
width: 120,
customRender: render.renderAvatar,
},
{
/* {
title: '性别',
dataIndex: 'sex',
width: 80,
@ -33,7 +33,7 @@ export const columns: BasicColumn[] = [
title: '生日',
dataIndex: 'birthday',
width: 100,
},
},*/
{
title: '手机号',
dataIndex: 'phone',

@ -20,7 +20,7 @@ export const columns: BasicColumn[] = [
width: 120,
customRender: render.renderAvatar,
},
{
/*{
title: '性别',
dataIndex: 'sex',
width: 80,
@ -33,7 +33,7 @@ export const columns: BasicColumn[] = [
title: '生日',
dataIndex: 'birthday',
width: 100,
},
},*/
{
title: '手机号',
dataIndex: 'phone',

@ -20,7 +20,7 @@ export const columns: BasicColumn[] = [
width: 120,
customRender: render.renderAvatar,
},
{
/*{
title: '性别',
dataIndex: 'sex',
width: 80,
@ -33,7 +33,7 @@ export const columns: BasicColumn[] = [
title: '生日',
dataIndex: 'birthday',
width: 100,
},
},*/
{
title: '手机号',
dataIndex: 'phone',

@ -22,7 +22,7 @@ export const columns: BasicColumn[] = [
width: 120,
customRender: render.renderAvatar,
},
{
/*{
title: '性别',
dataIndex: 'sex',
width: 80,
@ -35,7 +35,7 @@ export const columns: BasicColumn[] = [
title: '生日',
dataIndex: 'birthday',
width: 100,
},
},*/
{
title: '手机号',
dataIndex: 'phone',

@ -20,7 +20,7 @@ export const columns: BasicColumn[] = [
width: 120,
customRender: render.renderAvatar,
},
{
/*{
title: '性别',
dataIndex: 'sex',
width: 80,
@ -33,7 +33,7 @@ export const columns: BasicColumn[] = [
title: '生日',
dataIndex: 'birthday',
width: 100,
},
},*/
{
title: '手机号',
dataIndex: 'phone',

Loading…
Cancel
Save