diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index 9c5444f6..5e637449 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -148,17 +148,24 @@ public class AnnualCompPointController extends JeecgController queryWrapperComp = new LambdaQueryWrapper<>(); // id位数相同,可用like模糊 - queryWrapperComp.like(Comp::getCompAdmin, userId); + queryWrapperComp.eq(Comp::getCompAdmin, userId); List list = compService.list(queryWrapperComp); + if(list.isEmpty()){ + return Result.error("未绑定比赛"); + } List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); // 获取负责的年度比赛id QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); - queryWrapperAnnual.in(ids.size()!=0,"compid",ids); + /*queryWrapperAnnual.in(ids.size()!=0,"compid",ids);*/ + queryWrapperAnnual.in("compid",ids); List listAnnual = annualCompService.list(queryWrapperAnnual); + if(listAnnual.isEmpty()){ + return Result.error("未创建年度比赛"); + } List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); QueryWrapper 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 page = new Page(pageNo, pageSize); IPage pageList = annualCompPointService.page(page, queryWrapper); @@ -304,7 +311,12 @@ public class AnnualCompPointController extends JeecgController 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 +334,13 @@ public class AnnualCompPointController extends JeecgController 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("删除成功!"); } /** @@ -940,8 +958,11 @@ public class AnnualCompPointController extends JeecgController 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 qw = new QueryWrapper<>(); + qw.eq("work_no",list.get(i).getStudentcode()); + List listsys = sysUserService.list(qw); + //SysUser sysUser = sysUserService.getUserByName(list.get(i).getStudentcode()); + if(listsys.size()==0){ return Result.error("文件导入失败:第"+(i+1)+"行学生学号不存在"); } } @@ -961,7 +982,10 @@ public class AnnualCompPointController extends JeecgController qw1 = new QueryWrapper<>(); + qw1.eq("work_no",list.get(k).getStudentcode()); + List listsys1 = sysUserService.list(qw1); + tm.setUserId(listsys1.get(0).getId()); tm.setCaptain("0"); teamManagementService.save(tm); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java index 5b4ef54d..233a316d 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java @@ -83,6 +83,10 @@ public class AnnualCompPointServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java index 1ec8927e..5b2bbbc8 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java @@ -120,7 +120,7 @@ public class AwardPersionController extends JeecgController page = new Page(pageNo, pageSize); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap()); - queryWrapper.eq("studentcode",user.getUsername()); + queryWrapper.eq("studentcode",sysUserService.getById(user.getId()).getWorkNo()); IPage pageList = awardPersionService.page(page, queryWrapper); return Result.OK(pageList); }else if(sysRoleList.get(0).getId().equals("1693451972151386114")){ @@ -224,7 +224,7 @@ public class AwardPersionController extends JeecgController queryWrapper = new QueryWrapper<>(); + queryWrapper.in("work_no", workon); + List 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); diff --git a/jeecgboot-vue3-master/src/locales/lang/zh-CN/sys.ts b/jeecgboot-vue3-master/src/locales/lang/zh-CN/sys.ts index 6d020b7c..f37df5c2 100644 --- a/jeecgboot-vue3-master/src/locales/lang/zh-CN/sys.ts +++ b/jeecgboot-vue3-master/src/locales/lang/zh-CN/sys.ts @@ -60,6 +60,7 @@ export default { placeholder: '请输入锁屏密码或者用户密码', }, login: { + workno: '工号/学号', backSignIn: '返回', signInFormTitle: '登录', mobileSignInFormTitle: '手机登录', diff --git a/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts index fe950756..9e10be25 100644 --- a/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts @@ -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,7 +59,7 @@ export const formSchema: FormSchema[] = [ field: 'depetId', component: 'JDictSelectTag', componentProps: { - dictCode: "sys_depart,depart_name,id" + dictCode:"sys_depart,depart_name,id,parent_id='1693446350597038081'" }, dynamicRules: ({model, schema}) => { return [ diff --git a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue index 09260ca0..16e1676f 100644 --- a/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue +++ b/jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue @@ -402,6 +402,9 @@ }); } /** + * 个人积分汇总 + * 触发条件:评奖完成后操作,且更新项目状态为“积分已汇总”,并且不可再进行个人积分汇总 + * 是否已凭奖为1且未汇总过时,可以积分汇总操作 * 状态:0待提交、1已提交(待审核)、2已审核(已通过)、3待驳回、4已驳回、5-已报名、6-已选题、7-已上传作品、8-已评分、9-已评奖,10-积分已汇总 */ @@ -411,7 +414,12 @@ onClick: handleCollectScoreApply.bind(null, record), }); } - if (record.isPj == 1 ) { + + /** + * 个人能力量化 + * 触发条件:个人积分汇总完成后操作,可以重复进行个人能力量化操作 + */ + if (record.isPj == 1 && record.annualCompState == "10" ) { actions.unshift({ label: '个人能力量化', onClick: handlePersonalAbilityEvaluation.bind(null, record), diff --git a/jeecgboot-vue3-master/src/views/annualScore/departCompTotalScore/DepartCompTotalScore.data.ts b/jeecgboot-vue3-master/src/views/annualScore/departCompTotalScore/DepartCompTotalScore.data.ts index 48b3b3f4..eeda545d 100644 --- a/jeecgboot-vue3-master/src/views/annualScore/departCompTotalScore/DepartCompTotalScore.data.ts +++ b/jeecgboot-vue3-master/src/views/annualScore/departCompTotalScore/DepartCompTotalScore.data.ts @@ -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,7 +63,9 @@ export const formSchema: FormSchema[] = [ field: 'depet', component: 'JDictSelectTag', componentProps:{ - dictCode:"sys_depart,depart_name,id" + dictCode:"sys_depart,depart_name,id,parent_id='1693446350597038081'" + // dictCode: "sys_user,realname,id,username!='admin' order by create_time", + }, dynamicRules: ({model,schema}) => { return [ diff --git a/jeecgboot-vue3-master/src/views/system/loginmini/MiniRegister.vue b/jeecgboot-vue3-master/src/views/system/loginmini/MiniRegister.vue index ba2d25c0..6df31a98 100644 --- a/jeecgboot-vue3-master/src/views/system/loginmini/MiniRegister.vue +++ b/jeecgboot-vue3-master/src/views/system/loginmini/MiniRegister.vue @@ -27,6 +27,12 @@ + +
+ + +
+
@@ -137,6 +143,7 @@ const formRef = ref(); const formData = reactive({ username: '', + workno: '', mobile: '', smscode: '', password: '', @@ -228,6 +235,10 @@ const randCodeData = reactive({ 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({ 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({ * 初始化表单 */ 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));