From 4e7007cc041de481ca3b422279437c6ea0de1206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Thu, 24 Oct 2024 16:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=93=E5=AE=B6=E6=A8=A1=E5=9D=97/=E4=B8=93?= =?UTF-8?q?=E5=AE=B6=E9=A1=B9=E7=9B=AE=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../expert/controller/ExpertController.java | 394 +++++++++++++++++- .../modules/demo/expert/entity/Expert.java | 43 +- .../demo/expert/mapper/ExpertMapper.java | 32 ++ .../demo/expert/service/IExpertService.java | 25 ++ .../service/impl/ExpertServiceImpl.java | 67 +++ .../controller/ExpprojectController.java | 336 +++++++++++++++ .../demo/expproject/entity/Expandpro.java | 81 ++++ .../demo/expproject/entity/Expproject.java | 76 ++++ .../expproject/mapper/ExpandproMapper.java | 39 ++ .../expproject/mapper/ExpprojectMapper.java | 17 + .../expproject/mapper/xml/ExpandproMapper.xml | 16 + .../mapper/xml/ExpprojectMapper.xml | 5 + .../expproject/service/IExpandproService.java | 26 ++ .../service/IExpprojectService.java | 48 +++ .../service/impl/ExpandproServiceImpl.java | 37 ++ .../service/impl/ExpprojectServiceImpl.java | 77 ++++ .../demo/expproject/vo/ExpprojectPage.java | 77 ++++ jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts | 1 + .../views/expert/{ => admin}/Expert.api.ts | 21 +- .../views/expert/{ => admin}/Expert.data.ts | 38 +- .../views/expert/{ => admin}/ExpertList.vue | 46 +- .../V20240926_1__menu_insert_Expert.sql | 0 .../V20240929_1__menu_insert_Expert.sql | 0 .../V20240930_1__menu_insert_Expert.sql | 0 .../{ => admin}/components/ExpertForm.vue | 56 ++- .../{ => admin}/components/ExpertModal.vue | 2 +- .../views/expproject/admin/Expproject.api.ts | 87 ++++ .../views/expproject/admin/Expproject.data.ts | 105 +++++ .../views/expproject/admin/ExpprojectList.vue | 277 ++++++++++++ .../V20241023_1__menu_insert_Expproject.sql | 26 ++ .../admin/components/ExpprojectForm.vue | 227 ++++++++++ .../admin/components/ExpprojectModal.vue | 67 +++ .../src/views/system/loginmini/MiniLogin.vue | 17 + .../system/loginmini/MiniRegisterexp.vue | 353 ++++++++++++++++ .../src/views/system/user/user.data.ts | 2 +- 35 files changed, 2653 insertions(+), 68 deletions(-) create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/Expandpro.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/Expproject.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/ExpandproMapper.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/ExpprojectMapper.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/xml/ExpandproMapper.xml create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/xml/ExpprojectMapper.xml create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/IExpandproService.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/IExpprojectService.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/impl/ExpandproServiceImpl.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/impl/ExpprojectServiceImpl.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/vo/ExpprojectPage.java rename jeecgboot-vue3/src/views/expert/{ => admin}/Expert.api.ts (73%) rename jeecgboot-vue3/src/views/expert/{ => admin}/Expert.data.ts (67%) rename jeecgboot-vue3/src/views/expert/{ => admin}/ExpertList.vue (85%) rename jeecgboot-vue3/src/views/expert/{ => admin}/V20240926_1__menu_insert_Expert.sql (100%) rename jeecgboot-vue3/src/views/expert/{ => admin}/V20240929_1__menu_insert_Expert.sql (100%) rename jeecgboot-vue3/src/views/expert/{ => admin}/V20240930_1__menu_insert_Expert.sql (100%) rename jeecgboot-vue3/src/views/expert/{ => admin}/components/ExpertForm.vue (79%) rename jeecgboot-vue3/src/views/expert/{ => admin}/components/ExpertModal.vue (96%) create mode 100644 jeecgboot-vue3/src/views/expproject/admin/Expproject.api.ts create mode 100644 jeecgboot-vue3/src/views/expproject/admin/Expproject.data.ts create mode 100644 jeecgboot-vue3/src/views/expproject/admin/ExpprojectList.vue create mode 100644 jeecgboot-vue3/src/views/expproject/admin/V20241023_1__menu_insert_Expproject.sql create mode 100644 jeecgboot-vue3/src/views/expproject/admin/components/ExpprojectForm.vue create mode 100644 jeecgboot-vue3/src/views/expproject/admin/components/ExpprojectModal.vue create mode 100644 jeecgboot-vue3/src/views/system/loginmini/MiniRegisterexp.vue diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java index 5e729fb..183196a 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java @@ -7,10 +7,13 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import org.apache.shiro.SecurityUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.PasswordUtil; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.demo.expert.entity.Expert; @@ -21,7 +24,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.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.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; @@ -55,6 +60,8 @@ public class ExpertController extends JeecgController { private IExpertService expertService; @Autowired private ISysUserService sysUserService; + @Autowired + private ISysDepartService sysDepartService; /** * 分页列表查询 @@ -66,26 +73,163 @@ public class ExpertController extends JeecgController { * @return */ //@AutoLog(value = "专家管理-分页列表查询") - @ApiOperation(value="专家管理-分页列表查询", notes="专家管理-分页列表查询") - @GetMapping(value = "/list") - public Result> queryPageList(Expert expert, + @ApiOperation(value="专家管理-分页列表查询/管理员角色", notes="专家管理-分页列表查询/管理员角色") + @GetMapping(value = "/listadmin") + public Result> listadmin(Expert expert, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { + //用于查看所有信息无论是否审核,无论哪个部门 QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = expertService.page(page, queryWrapper); - return Result.OK(pageList); + pageList.getRecords().forEach(experttemp -> { + //开始用于修改数据 + SysUser sysUser = sysUserService.query().eq("username",experttemp.getSeusername()).one(); + String depid = expertService.getdeps(sysUser.getId()); + SysDepart sysDepart = sysDepartService.getById(depid); + experttemp.setRealname(sysUser.getRealname()); + experttemp.setWorkon(sysUser.getWorkNo()); + experttemp.setSex(sysUser.getSex()); + experttemp.setTopPic(sysUser.getAvatar()); + experttemp.setPhone(sysUser.getPhone()); + experttemp.setEmails(sysUser.getEmail()); + experttemp.setSsdep(sysDepart.getDepartName()); + experttemp.setPsd(sysUser.getPassword()); + experttemp.setSepsd(sysUser.getPassword()); + }); + + return Result.OK(pageList); } - /** - * 添加 + @ApiOperation(value="专家管理-分页列表查询/县区管理员角色", notes="专家管理-分页列表查询/县区管理员角色") + @GetMapping(value = "/listcounty") + public Result> listcounty(Expert expert, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + //用于检测县区管理员添加的专家是否是本县区以及以下单位 + LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //根据当前登录的用户去获取所在县区的部门id + String countdepid = expertService.getcountdepid(user.getId()); + //创建一个list将县区的部门id以及下属部门的id保存起来 + List depidlist = new ArrayList<>(); + depidlist.add(countdepid); + //获取下属部门的id + List subdepidlist = expertService.getsubdepid(countdepid); + depidlist.addAll(subdepidlist); + //查询本县区下面的所有的用户的id + List userdepids = expertService.getuserbydeps(depidlist); + //根据权限去查询专家 + List userbyrole=expertService.userbyrole("1843478958968647681"); + //开始对比两个List获取相同部分,获取的交叉id就是需要的id + List commonElements = userdepids.stream().filter(userbyrole::contains).collect(Collectors.toList()); + //根据查询的userid去获取username + List sysUserList = sysUserService.query().in("id",commonElements).list(); + //根据查询的结果获取username的list + List usernames = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); + + //用于查看本县区下面的专家信息无论是否审核,无论哪个部门 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); + queryWrapper.in("seusername",usernames); + Page page = new Page(pageNo, pageSize); + IPage pageList = expertService.page(page, queryWrapper); + pageList.getRecords().forEach(experttemp -> { + //开始用于修改数据 + SysUser sysUser = sysUserService.query().eq("username",experttemp.getSeusername()).one(); + String depid = expertService.getdeps(sysUser.getId()); + SysDepart sysDepart = sysDepartService.getById(depid); + experttemp.setRealname(sysUser.getRealname()); + experttemp.setWorkon(sysUser.getWorkNo()); + experttemp.setSex(sysUser.getSex()); + experttemp.setTopPic(sysUser.getAvatar()); + experttemp.setPhone(sysUser.getPhone()); + experttemp.setEmails(sysUser.getEmail()); + experttemp.setSsdep(sysDepart.getDepartName()); + experttemp.setPsd(sysUser.getPassword()); + }); + return Result.OK(pageList); + } + + @ApiOperation(value="专家管理-分页列表查询/公司管理员角色", notes="专家管理-分页列表查询/公司管理员角色") + @GetMapping(value = "/listfirm") + public Result> listfirm(Expert expert, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //根据当前登录的用户去获取所在部门id + String countdepid = expertService.getcountdepid(user.getId()); + //根据部门id去查询userid + List idlistss = expertService.idlistss(countdepid); + //根据权限去查询专家 + List userbyrole=expertService.userbyrole("1843478958968647681"); + //开始对比两个List获取相同部分,获取的交叉id就是需要的id + List commonElements = idlistss.stream().filter(userbyrole::contains).collect(Collectors.toList()); + //根据查询的userid去获取username + List sysUserList = sysUserService.query().in("id",commonElements).list(); + //根据查询的结果获取username的list + List usernames = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); + //用于查看本公司下面的专家信息无论是否审核,无论哪个部门 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); + queryWrapper.eq("isdone","Y"); + queryWrapper.in("seusername",usernames); + Page page = new Page(pageNo, pageSize); + IPage pageList = expertService.page(page, queryWrapper); + pageList.getRecords().forEach(experttemp -> { + //开始用于修改数据 + SysUser sysUser = sysUserService.query().eq("username",experttemp.getSeusername()).one(); + String depid = expertService.getdeps(sysUser.getId()); + SysDepart sysDepart = sysDepartService.getById(depid); + experttemp.setRealname(sysUser.getRealname()); + experttemp.setWorkon(sysUser.getWorkNo()); + experttemp.setSex(sysUser.getSex()); + experttemp.setTopPic(sysUser.getAvatar()); + experttemp.setPhone(sysUser.getPhone()); + experttemp.setEmails(sysUser.getEmail()); + experttemp.setSsdep(sysDepart.getDepartName()); + experttemp.setPsd(sysUser.getPassword()); + }); + return Result.OK(pageList); + } + + @ApiOperation(value="专家管理-分页列表查询/公司管理员角色", notes="专家管理-分页列表查询/公司管理员角色") + @GetMapping(value = "/listself") + public Result> listself(Expert expert, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + LoginUser user121= (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //用于查看自己的的专家信息 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); + queryWrapper.eq("seusername",user121.getUsername()); + Page page = new Page(pageNo, pageSize); + IPage pageList = expertService.page(page, queryWrapper); + pageList.getRecords().forEach(experttemp -> { + //开始用于修改数据 + SysUser sysUser = sysUserService.query().eq("username",experttemp.getSeusername()).one(); + String depid = expertService.getdeps(sysUser.getId()); + SysDepart sysDepart = sysDepartService.getById(depid); + experttemp.setRealname(sysUser.getRealname()); + experttemp.setWorkon(sysUser.getWorkNo()); + experttemp.setSex(sysUser.getSex()); + experttemp.setTopPic(sysUser.getAvatar()); + experttemp.setPhone(sysUser.getPhone()); + experttemp.setEmails(sysUser.getEmail()); + experttemp.setSsdep(sysDepart.getDepartName()); + experttemp.setPsd(sysUser.getPassword()); + }); + return Result.OK(pageList); + } + + /** + * 市局管理员添加 * * @param expert * @return */ - @AutoLog(value = "专家管理-添加") - @ApiOperation(value="专家管理-添加", notes="专家管理-添加") + @AutoLog(value = "专家管理(市局管理员)-添加") + @ApiOperation(value="专家管理(市局管理员)-添加", notes="专家管理(市局管理员)-添加") @PostMapping(value = "/add") public Result add(@RequestBody Expert expert) { //先判断两个密码是否相同 @@ -112,6 +256,9 @@ public class ExpertController extends JeecgController { if (isemils.equals("1")){ Result.OK().error500("当前的电子邮件已经存在"); } + expert.setIsdone("Y"); + expert.setAdminopen("2"); + expert.setCompopen("2"); //开始添加到用户表 SysUser user = new SysUser(); @@ -135,17 +282,121 @@ public class ExpertController extends JeecgController { return Result.OK("添加成功!"); } - /** + /** + * 县区管理员添加 + * + * @param expert + * @return + */ + @AutoLog(value = "专家管理(县区管理)-添加") + @ApiOperation(value="专家管理(县区管理)-添加", notes="专家管理(县区管理)-添加") + @PostMapping(value = "/addcounty") + public Result addcounty(@RequestBody Expert expert) { + //先判断两个密码是否相同 + if (!expert.getPsd().equals(expert.getSepsd())){ + return Result.OK().error500("两次输入的密码不同"); + } + //判断是用户名是否存在 + String isusername = expertService.isusername(expert.getSeusername()); + if(isusername.equals("1")){ + Result.OK().error500("当前的用户名已经存在"); + } + //判断工号是否存在 + String isworkon =expertService.isworkon(expert.getWorkon()); + if (isworkon.equals("1")){ + Result.OK().error500("当前的工号已经存在"); + } + //判断电话号码是否存在 + String isphone = expertService.isphone(expert.getPhone()); + if (isphone.equals("1")){ + Result.OK().error500("当前的电话号码已经存在"); + } + //判断电子邮件是否存在 + String isemils = expertService.isemils(expert.getEmails()); + if (isemils.equals("1")){ + Result.OK().error500("当前的电子邮件已经存在"); + } + //用于检测县区管理员添加的专家是否是本县区以及以下单位 + LoginUser user12= (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //根据当前登录的用户去获取所在县区的部门id + String countdepid = expertService.getcountdepid(user12.getId()); + //创建一个list将县区的部门id以及下属部门的id保存起来 + List depidlist = new ArrayList<>(); + depidlist.add(countdepid); + //获取下属部门的id + List subdepidlist = expertService.getsubdepid(countdepid); + depidlist.addAll(subdepidlist); + //开始对比,将传入的id和查询的id对比,如果不存在就报错 + boolean contains = containsString(depidlist, expert.getSsdep()); + if (contains){ + Result.OK().error500("当前仅允许选择本县区以及属于本县区的机构"); + } + + expert.setIsdone("Y"); + expert.setAdminopen("2"); + expert.setCompopen("2"); + + //开始添加到用户表 + SysUser user = new SysUser(); + user.setAvatar(expert.getTopPic()); + user.setSex(expert.getSex()); + user.setRealname(expert.getRealname()); + user.setUsername(expert.getSeusername()); + user.setWorkNo(expert.getWorkon()); + user.setEmail(expert.getEmails()); + user.setPhone(expert.getPhone()); + user.setCreateTime(new Date());//设置创建时间 + String salt = oConvertUtils.randomGen(8); + user.setSalt(salt); + String passwordEncode = PasswordUtil.encrypt(expert.getSeusername(), expert.getPsd(), salt); + user.setPassword(passwordEncode); + user.setStatus(1); + user.setDelFlag(CommonConstant.DEL_FLAG_0); + sysUserService.saveUser(user, "1843478958968647681", expert.getSsdep(), ""); + expertService.save(expert); + // + return Result.OK("添加成功!"); + } + + // 检查List中是否包含指定的String + public static boolean containsString(List list, String str) { + for (String item : list) { + if (item.equals(str)) { + return true; + } + } + return false; + } + + + /** * 编辑 * * @param expert * @return */ - @AutoLog(value = "专家管理-编辑") - @ApiOperation(value="专家管理-编辑", notes="专家管理-编辑") + @AutoLog(value = "专家管理(市局管理员)-编辑") + @ApiOperation(value="专家管理(市局管理员)-编辑", notes="专家管理(市局管理员)-编辑") @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) public Result edit(@RequestBody Expert expert) { expertService.updateById(expert); + //开始添加到用户表 + SysUser user = new SysUser(); + user.setAvatar(expert.getTopPic()); + user.setSex(expert.getSex()); + user.setRealname(expert.getRealname()); + user.setUsername(expert.getSeusername()); + user.setWorkNo(expert.getWorkon()); + user.setEmail(expert.getEmails()); + user.setPhone(expert.getPhone()); + user.setCreateTime(new Date());//设置创建时间 + String salt = oConvertUtils.randomGen(8); + user.setSalt(salt); + String passwordEncode = PasswordUtil.encrypt(expert.getSeusername(), expert.getPsd(), salt); + user.setPassword(passwordEncode); + user.setStatus(1); + user.setDelFlag(CommonConstant.DEL_FLAG_0); + sysUserService.editUser(user,"1843478958968647681", expert.getSsdep(), "", ""); return Result.OK("编辑成功!"); } @@ -163,6 +414,29 @@ public class ExpertController extends JeecgController { return Result.OK("删除成功!"); } + + /** + * 通过id完善信息 + * + * @param id + * @return + */ + @AutoLog(value = "专家管理-完善了之后提交审核") + @ApiOperation(value="专家管理-完善了之后提交审核", notes="专家管理-完善了之后提交审核") + @GetMapping(value = "/handleup") + public Result handleup(@RequestParam(name="id",required=true) String id) { + Expert expert = expertService.getById(id); + String str =""; + if (expert.getIsdone().equals("N")) { + //修改提交审核状态 + expertService.updatetj(id); + str ="提交成功"; + } else if (expert.getIsdone().equals("Y")){ + str ="无需重复提交"; + } + return Result.OK(str); + } + /** * 批量删除 * @@ -217,4 +491,102 @@ public class ExpertController extends JeecgController { return super.importExcel(request, response, Expert.class); } + + //这个是专家的自己的公司审核 + @AutoLog(value = "专家管理-这个是专家的自己的公司审核") + @ApiOperation(value="专家管理-这个是专家的自己的公司审核", notes="专家管理-这个是专家的自己的公司审核") + @GetMapping(value = "handleupupfirm") + public Result handleupupfirm(@RequestParam(name="id",required=true) String id) { + String str =""; + Expert expert =expertService.getById(id); + if (expert.getCompopen().equals("1")) { + //修改提交审核状态 + expertService.handleupupfirm(id); + str ="通过审核"; + } else if (expert.getCompopen().equals("2")) { + str ="无需重复提交"; + } + return Result.OK(str); + } + + //这个是专家的自己的公司审核 + @AutoLog(value = "专家管理-这个是专家的自己的公司驳回") + @ApiOperation(value="专家管理-这个是专家的自己的公司审核", notes="专家管理-这个是专家的自己的公司驳回") + @GetMapping(value = "handlebackbackfirm") + public Result handlebackbackfirm(@RequestParam(name="id",required=true) String id) { + String str =""; + Expert expert =expertService.getById(id); + if (expert.getCompopen().equals("1")) { + //修改提交审核状态 + expertService.handlebackbackfirm(id); + str ="驳回审核!请到编辑页面确定问题数据并填写驳回原因"; + } else if (expert.getCompopen().equals("3") || expert.getCompopen().equals("2") ) { + str ="已驳回或者是已通过审核"; + } + return Result.OK(str); + } + + //这个是专家的上级管理员审核 + @AutoLog(value = "专家管理-这个是上级管理员的通过审核") + @ApiOperation(value="专家管理-这个是上级管理员的通过审核", notes="专家管理-这个是上级管理员的通过审核") + @GetMapping(value = "handleupcount") + public Result handleupcount(@RequestParam(name="id",required=true) String id) { + String str =""; + Expert expert =expertService.getById(id); + if (expert.getCompopen().equals("2") && expert.getAdminopen().equals("1")) { + //修改提交审核状态 + expertService.handleupcount(id); + str ="审核通过"; + } else if (expert.getCompopen().equals("1") || expert.getCompopen().equals("3") ) { + str ="只有当专家所属机构审核之后才可以审核"; + } + return Result.OK(str); + } + + @AutoLog(value = "专家管理-这个是上级管理员的通过驳回") + @ApiOperation(value="专家管理-这个是上级管理员的通过驳回", notes="专家管理-这个是上级管理员的通过驳回") + @GetMapping(value = "handlebackcoount") + public Result handlebackcoount(@RequestParam(name="id",required=true) String id) { + String str =""; + Expert expert =expertService.getById(id); + if (expert.getCompopen().equals("2") && expert.getAdminopen().equals("1")) { + //修改提交审核状态 + expertService.handlebackcount(id); + str ="驳回完成!请到编辑页面确定问题数据并填写驳回原因"; + } else if (expert.getCompopen().equals("2") || expert.getAdminopen().equals("3") ) { + str ="只有当专家所属机构审核之后且已通过不可驳回才可以驳回"; + } + return Result.OK(str); + } + + @AutoLog(value = "专家管理-这个是超级管理员审核") + @ApiOperation(value="专家管理-这个是超级管理员审核", notes="专家管理-这个是超级管理员审核") + @GetMapping(value = "handleadminup") + public Result handleadminup(@RequestParam(name="id",required=true) String id) { + Expert expert =expertService.getById(id); + String str=""; + if (expert.getIsdone().equals("Y")) { + expert.setAdminopen("2"); + expert.setCompopen("2"); + expertService.updateById(expert); + str="通过成功"; + }else { + /*return Result.OK().error500("需要专家先提交审核");*/ + str="需要专家先提交审核"; + } + return Result.OK(str); + } + + @AutoLog(value = "专家管理-这个是超级管理员驳回") + @ApiOperation(value="专家管理-这个是超级管理员驳回", notes="专家管理-这个是超级管理员驳回") + @GetMapping(value = "handleadminback") + public Result handleadminback(@RequestParam(name="id",required=true) String id) { + Expert expert =expertService.getById(id); + expert.setAdminopen("1"); + expert.setCompopen("1"); + expert.setIsdone("N"); + expertService.updateById(expert); + return Result.OK("驳回成功!请到编辑页面确定问题数据并填写驳回原因"); + } + } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/Expert.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/Expert.java index 4b8574e..73c868a 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/Expert.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/Expert.java @@ -67,10 +67,11 @@ public class Expert implements Serializable { @Excel(name = "专业", width = 15) @ApiModelProperty(value = "专业") private String major; - /**研究方向*/ - @Excel(name = "研究方向", width = 15) + /**研究方向*/ + @Excel(name = "研究方向", width = 15, dictTable = "discipline_fieid", dicText = "name", dicCode = "id") + @Dict(dictTable = "discipline_fieid", dicText = "name", dicCode = "id") @ApiModelProperty(value = "研究方向") - private String directioncal; + private java.lang.String directioncal; /**研究类型*/ @Excel(name = "研究类型", width = 15) @ApiModelProperty(value = "研究类型") @@ -83,14 +84,6 @@ public class Expert implements Serializable { @Excel(name = "专家简介", width = 15) @ApiModelProperty(value = "专家简介") private String expinfo; - /**部门审核*/ - @Excel(name = "部门审核", width = 15,replace = {"是_Y","否_N"} ) - @ApiModelProperty(value = "部门审核") - private String compopen; - /**管理员审核*/ - @Excel(name = "管理员审核", width = 15,replace = {"是_Y","否_N"} ) - @ApiModelProperty(value = "管理员审核") - private String adminopen; @TableField(exist = false) private String psd; @@ -110,4 +103,32 @@ public class Expert implements Serializable { private String emails; @TableField(exist = false) private Integer sex; + + /**提交审核*/ + // @Excel(name = "提交审核", width = 15,replace = {"是_Y","否_N"} ) + @ApiModelProperty(value = "提交审核") + private java.lang.String isdone; + + + /**专家状态*/ + @Excel(name = "专家状态", width = 15,replace = {"是_Y","否_N"} ) + @ApiModelProperty(value = "专家状态") + private java.lang.String expsture; + /**异常备注*/ + @Excel(name = "异常备注", width = 15) + @ApiModelProperty(value = "异常备注") + private java.lang.String errinfo; + + /**部门审核*/ + @Excel(name = "部门审核", width = 15, dicCode = "examstures") + @Dict(dicCode = "examstures") + @ApiModelProperty(value = "部门审核") + private java.lang.String compopen; + /**管理员审核*/ + @Excel(name = "管理员审核", width = 15, dicCode = "examstures") + @Dict(dicCode = "examstures") + @ApiModelProperty(value = "管理员审核") + private java.lang.String adminopen; + + } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java index 9cc41d1..7711d40 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java @@ -4,8 +4,10 @@ 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.expert.entity.Expert; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.system.entity.SysUser; /** * @Description: 专家管理 @@ -26,4 +28,34 @@ public interface ExpertMapper extends BaseMapper { @Select("SELECT COUNT(*) FROM sys_user WHERE email =#{emails}") String isemils(String emails); + + @Select("select dep_id from sys_user_depart where user_id =#{id}") + String getdeps(String id); + + @Select("SELECT dep_id FROM sys_user_depart WHERE user_id=#{id}") + String getcountdepid(String id); + + @Select("SELECT id FROM sys_depart WHERE parent_id =#{countdepid}") + List getsubdepid(String countdepid); + + @Select("SELECT user_id FROM sys_user_depart WHERE dep_id =#{depidlist}") + List getuserbydeps(String depidlist); + + @Select("SELECT user_id FROM sys_user_role WHERE role_id =#{number}") + List userbyrole(String number); + + @Update("UPDATE expert SET isdone = 'Y' WHERE id = #{id}") + void updatetj(String id); + + @Update("UPDATE expert SET compopen = '2' WHERE id = #{id}") + void handleupupfirm(String id); + + @Update("UPDATE expert SET compopen = '3' , isdone = 'N' WHERE id = #{id}") + void handlebackbackfirm(String id); + + @Update("UPDATE expert SET adminopen = '2' WHERE id = #{id}") + void handleupcount(String id); + + @Update("UPDATE expert SET adminopen = '3' , isdone = 'N' WHERE id = #{id}") + void handlebackcount(String id); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/IExpertService.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/IExpertService.java index 6f3b5c7..a52cb4f 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/IExpertService.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/IExpertService.java @@ -2,6 +2,9 @@ package org.jeecg.modules.demo.expert.service; import org.jeecg.modules.demo.expert.entity.Expert; import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.system.entity.SysUser; + +import java.util.List; /** * @Description: 专家管理 @@ -18,4 +21,26 @@ public interface IExpertService extends IService { String isphone(String phone); String isemils(String emails); + + String getdeps(String id); + + String getcountdepid(String id); + + List getsubdepid(String countdepid); + + List getuserbydeps(List depidlist); + + List userbyrole(String number); + + void updatetj(String id); + + List idlistss(String countdepid); + + void handleupupfirm(String id); + + void handlebackbackfirm(String id); + + void handleupcount(String id); + + void handlebackcount(String id); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java index a05588a..8076c5b 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java @@ -3,11 +3,15 @@ package org.jeecg.modules.demo.expert.service.impl; import org.jeecg.modules.demo.expert.entity.Expert; import org.jeecg.modules.demo.expert.mapper.ExpertMapper; import org.jeecg.modules.demo.expert.service.IExpertService; +import org.jeecg.modules.system.entity.SysUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import java.util.ArrayList; +import java.util.List; + /** * @Description: 专家管理 * @Author: jeecg-boot @@ -40,4 +44,67 @@ public class ExpertServiceImpl extends ServiceImpl impleme public String isemils(String emails) { return expertMapper.isemils(emails); } + + @Override + public String getdeps(String id) { + return expertMapper.getdeps(id); + } + + @Override + public String getcountdepid(String id) { + return expertMapper.getcountdepid(id); + } + + @Override + public List getsubdepid(String countdepid) { + return expertMapper.getsubdepid(countdepid); + } + + @Override + public List getuserbydeps(List depidlist) { + List userids= new ArrayList<>(); + for (int i=0;i str = expertMapper.getuserbydeps(depidlist.get(i)); + userids.addAll(str); + + } + + + return userids; + } + + @Override + public List userbyrole(String number) { + return expertMapper.userbyrole(number); + } + + @Override + public void updatetj(String id) { + expertMapper.updatetj(id); + } + + @Override + public List idlistss(String countdepid) { + return expertMapper.getuserbydeps(countdepid); + } + + @Override + public void handleupupfirm(String id) { + expertMapper.handleupupfirm(id); + } + + @Override + public void handlebackbackfirm(String id) { + expertMapper.handlebackbackfirm(id); + } + + @Override + public void handleupcount(String id) { + expertMapper.handleupcount(id); + } + + @Override + public void handlebackcount(String id) { + expertMapper.handlebackcount(id); + } } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java new file mode 100644 index 0000000..00628c0 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java @@ -0,0 +1,336 @@ +package org.jeecg.modules.demo.expproject.controller; + +import java.io.UnsupportedEncodingException; +import java.io.IOException; +import java.net.URLDecoder; +import java.util.*; +import java.util.stream.Collectors; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.aspectj.apache.bcel.classfile.Module; +import org.jeecg.modules.demo.expert.entity.Expert; +import org.jeecg.modules.demo.expert.service.IExpertService; +import org.jeecg.modules.system.entity.SysUser; +import org.jeecg.modules.system.service.ISysUserService; +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.vo.LoginUser; +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.expproject.entity.Expandpro; +import org.jeecg.modules.demo.expproject.entity.Expproject; +import org.jeecg.modules.demo.expproject.vo.ExpprojectPage; +import org.jeecg.modules.demo.expproject.service.IExpprojectService; +import org.jeecg.modules.demo.expproject.service.IExpandproService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + + /** + * @Description: 专家项目表 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +@Api(tags="专家项目表") +@RestController +@RequestMapping("/expproject/expproject") +@Slf4j +public class ExpprojectController { + @Autowired + private IExpprojectService expprojectService; + @Autowired + private IExpandproService expandproService; + @Autowired + private IExpertService expertService; + @Autowired + private ISysUserService sysUserService; + + /** + * 分页列表查询 + * + * @param expproject + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "专家项目表-分页列表查询") + @ApiOperation(value="专家项目表-分页列表查询", notes="专家项目表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Expproject expproject, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expproject, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = expprojectService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param expprojectPage + * @return + */ + @AutoLog(value = "专家项目表-添加") + @ApiOperation(value="专家项目表-添加", notes="专家项目表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody ExpprojectPage expprojectPage) { + Expproject expproject = new Expproject(); + BeanUtils.copyProperties(expprojectPage, expproject); + if (expproject.getNeedexp()>=expprojectPage.getExpandproList().size()) { + expprojectService.saveMain(expproject, expprojectPage.getExpandproList()); + return Result.OK("添加成功!"); + }else { + return Result.error("确定项目专家数量"); + } + } + + /** + * 编辑 + * + * @param expprojectPage + * @return + */ + @AutoLog(value = "专家项目表-编辑") + @ApiOperation(value="专家项目表-编辑", notes="专家项目表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody ExpprojectPage expprojectPage) { + Expproject expproject = new Expproject(); + BeanUtils.copyProperties(expprojectPage, expproject); + Expproject expprojectEntity = expprojectService.getById(expproject.getId()); + if(expprojectEntity==null) { + return Result.error("未找到对应数据"); + } + if (expproject.getNeedexp()>=expprojectPage.getExpandproList().size()) { + expprojectService.updateMain(expproject, expprojectPage.getExpandproList()); + return Result.OK("编辑成功!"); + }else { + return Result.error("确定项目专家数量"); + } + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "专家项目表-通过id删除") + @ApiOperation(value="专家项目表-通过id删除", notes="专家项目表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + expprojectService.delMain(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "专家项目表-批量删除") + @ApiOperation(value="专家项目表-批量删除", notes="专家项目表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.expprojectService.delBatchMain(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "专家项目表-通过id查询") + @ApiOperation(value="专家项目表-通过id查询", notes="专家项目表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Expproject expproject = expprojectService.getById(id); + if(expproject==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(expproject); + + } + + + /** + * 随机生成专家 + * + * @param id + * @return + */ + //@AutoLog(value = "专家项目表-随机生成专家") + @ApiOperation(value="专家项目表-随机生成专家", notes="专家项目表-随机生成专家") + @GetMapping(value = "/createexpawait") + public Result createexpawait(@RequestParam(name="id",required=true) String id) { + String str = ""; + Expproject expproject = expprojectService.getById(id); + int intce = expproject.getNeedexp(); + List expandproList = expandproService.query().eq("expprojectid",id).list(); + if (expandproList.size()==intce ){ + str="此项目专家已经足够"; + } else if (expandproList.size() usernamelist = expandproService.getusernamelist(); + Collections.shuffle(usernamelist); + List randomUsers = getRandomUsers(usernamelist, a); + Expandpro expandpro =new Expandpro(); + List expertList = expertService.query().in("seusername",randomUsers).list(); + for (int i=0;i> queryExpandproListByMainId(@RequestParam(name="id",required=true) String id) { + List expandproList = expandproService.selectByMainId(id); + return Result.OK(expandproList); + } + + /** + * 导出excel + * + * @param request + * @param expproject + */ + + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Expproject expproject) { + // Step.1 组装查询条件查询数据 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expproject, request.getParameterMap()); + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + //配置选中数据查询条件 + String selections = request.getParameter("selections"); + if(oConvertUtils.isNotEmpty(selections)) { + List selectionList = Arrays.asList(selections.split(",")); + queryWrapper.in("id",selectionList); + } + //Step.2 获取导出数据 + List expprojectList = expprojectService.list(queryWrapper); + + // Step.3 组装pageList + List pageList = new ArrayList(); + for (Expproject main : expprojectList) { + ExpprojectPage vo = new ExpprojectPage(); + BeanUtils.copyProperties(main, vo); + List expandproList = expandproService.selectByMainId(main.getId()); + vo.setExpandproList(expandproList); + pageList.add(vo); + } + + // Step.4 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + mv.addObject(NormalExcelConstants.FILE_NAME, "专家项目表列表"); + mv.addObject(NormalExcelConstants.CLASS, ExpprojectPage.class); + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("专家项目表数据", "导出人:"+sysUser.getRealname(), "专家项目表")); + mv.addObject(NormalExcelConstants.DATA_LIST, pageList); + return mv; + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + // 获取上传文件对象 + MultipartFile file = entity.getValue(); + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(1); + params.setNeedSave(true); + try { + List list = ExcelImportUtil.importExcel(file.getInputStream(), ExpprojectPage.class, params); + for (ExpprojectPage page : list) { + Expproject po = new Expproject(); + BeanUtils.copyProperties(page, po); + expprojectService.saveMain(po, page.getExpandproList()); + } + return Result.OK("文件导入成功!数据行数:" + list.size()); + } catch (Exception e) { + log.error(e.getMessage(),e); + return Result.error("文件导入失败:"+e.getMessage()); + } finally { + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return Result.OK("文件导入失败!"); + } + + + + public static List getRandomUsers(List userlist, int numberOfUsers) { + List result = new ArrayList<>(); + Random random = new Random(); + int listSize = userlist.size(); + + // 如果想要选择的用户数量超过了列表中的用户数量,就循环选择直到达到所需数量 + // 注意:这将允许结果中有重复的用户 + for (int i = 0; i < numberOfUsers; i++) { + int index = random.nextInt(listSize); // 生成一个0到listSize-1之间的随机索引 + result.add(userlist.get(index)); // 将随机选择的用户添加到结果列表中 + } + + // 如果需要,可以对结果列表进行打乱(虽然在这个特定情况下可能不是必需的) + // Collections.shuffle(result); + + return result; + } + + } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/Expandpro.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/Expandpro.java new file mode 100644 index 0000000..445cdaa --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/Expandpro.java @@ -0,0 +1,81 @@ +package org.jeecg.modules.demo.expproject.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 评审专家 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +@ApiModel(value="expandpro对象", description="评审专家") +@Data +@TableName("expandpro") +public class Expandpro implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + /**专家id*/ + @Excel(name = "专家id", width = 15) + @ApiModelProperty(value = "专家id") + private String expid; + /**外键id*/ + @ApiModelProperty(value = "外键id") + private String expprojectid; + /**专家名称*/ + @Excel(name = "专家名称", width = 15) + @ApiModelProperty(value = "专家名称") + private String expname; + /**所属领域*/ + @Excel(name = "所属领域", width = 15) + @ApiModelProperty(value = "所属领域") + private String exptype; + /**所属单位*/ + @Excel(name = "所属单位", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @ApiModelProperty(value = "所属单位") + private String ssdep; + /**专家电话*/ + @Excel(name = "专家电话", width = 15) + @ApiModelProperty(value = "专家电话") + private String phone; + /**专家邮箱*/ + @Excel(name = "专家邮箱", width = 15) + @ApiModelProperty(value = "专家邮箱") + private String emil; +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/Expproject.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/Expproject.java new file mode 100644 index 0000000..f67dfab --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/Expproject.java @@ -0,0 +1,76 @@ +package org.jeecg.modules.demo.expproject.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 专家项目表 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +@ApiModel(value="expproject对象", description="专家项目表") +@Data +@TableName("expproject") +public class Expproject implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + /**项目名称*/ + @Excel(name = "项目名称", width = 15) + @ApiModelProperty(value = "项目名称") + private String proname; + /**专家类型*/ + @Excel(name = "专家类型", width = 15, dictTable = "discipline_fieid", dicText = "name", dicCode = "id") + @Dict(dictTable = "discipline_fieid", dicText = "name", dicCode = "id") + @ApiModelProperty(value = "专家类型") + private String exptype; + /**需要专家个数*/ + @Excel(name = "需要专家个数", width = 15) + @ApiModelProperty(value = "需要专家个数") + private Integer needexp; + /**简介*/ + @Excel(name = "简介", width = 15) + @ApiModelProperty(value = "简介") + private String proinfo; + /**附件*/ + @Excel(name = "附件", width = 15) + @ApiModelProperty(value = "附件") + private String profile; +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/ExpandproMapper.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/ExpandproMapper.java new file mode 100644 index 0000000..2b2dcb9 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/ExpandproMapper.java @@ -0,0 +1,39 @@ +package org.jeecg.modules.demo.expproject.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Select; +import org.jeecg.modules.demo.expproject.entity.Expandpro; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 评审专家 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +public interface ExpandproMapper extends BaseMapper { + + /** + * 通过主表id删除子表数据 + * + * @param mainId 主表id + * @return boolean + */ + public boolean deleteByMainId(@Param("mainId") String mainId); + + /** + * 通过主表id查询子表数据 + * + * @param mainId 主表id + * @return List + */ + public List selectByMainId(@Param("mainId") String mainId); + + @Select("select seusername from expert WHERE expsture='N' AND isdone='Y' AND adminopen='2' AND compopen='2'") + List getusernamelist(); + + @Select("SELECT dep_id FROM expert AS expe LEFT JOIN sys_user AS sysu ON sysu.username = expe.seusername LEFT JOIN sys_user_depart AS sysud ON sysu.id =sysud.user_id WHERE expe.seusername =#{seusername} ") + String getdepid(String seusername); +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/ExpprojectMapper.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/ExpprojectMapper.java new file mode 100644 index 0000000..9974c12 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/ExpprojectMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.expproject.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.expproject.entity.Expproject; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 专家项目表 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +public interface ExpprojectMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/xml/ExpandproMapper.xml b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/xml/ExpandproMapper.xml new file mode 100644 index 0000000..ce20d7f --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/xml/ExpandproMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM expandpro + WHERE + expprojectid = #{mainId} + + + diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/xml/ExpprojectMapper.xml b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/xml/ExpprojectMapper.xml new file mode 100644 index 0000000..bc43231 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/mapper/xml/ExpprojectMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/IExpandproService.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/IExpandproService.java new file mode 100644 index 0000000..7b9a6c8 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/IExpandproService.java @@ -0,0 +1,26 @@ +package org.jeecg.modules.demo.expproject.service; + +import org.jeecg.modules.demo.expproject.entity.Expandpro; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 评审专家 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +public interface IExpandproService extends IService { + + /** + * 通过主表id查询子表数据 + * + * @param mainId 主表id + * @return List + */ + public List selectByMainId(String mainId); + + List getusernamelist(); + + String getdepid(String seusername); +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/IExpprojectService.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/IExpprojectService.java new file mode 100644 index 0000000..b6bea8b --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/IExpprojectService.java @@ -0,0 +1,48 @@ +package org.jeecg.modules.demo.expproject.service; + +import org.jeecg.modules.demo.expproject.entity.Expandpro; +import org.jeecg.modules.demo.expproject.entity.Expproject; +import com.baomidou.mybatisplus.extension.service.IService; +import java.io.Serializable; +import java.util.Collection; +import java.util.List; + +/** + * @Description: 专家项目表 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +public interface IExpprojectService extends IService { + + /** + * 添加一对多 + * + * @param expproject + * @param expandproList + */ + public void saveMain(Expproject expproject,List expandproList) ; + + /** + * 修改一对多 + * + * @param expproject + * @param expandproList + */ + public void updateMain(Expproject expproject,List expandproList); + + /** + * 删除一对多 + * + * @param id + */ + public void delMain (String id); + + /** + * 批量删除一对多 + * + * @param idList + */ + public void delBatchMain (Collection idList); + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/impl/ExpandproServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/impl/ExpandproServiceImpl.java new file mode 100644 index 0000000..155b7ba --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/impl/ExpandproServiceImpl.java @@ -0,0 +1,37 @@ +package org.jeecg.modules.demo.expproject.service.impl; + +import org.jeecg.modules.demo.expproject.entity.Expandpro; +import org.jeecg.modules.demo.expproject.mapper.ExpandproMapper; +import org.jeecg.modules.demo.expproject.service.IExpandproService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 评审专家 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +@Service +public class ExpandproServiceImpl extends ServiceImpl implements IExpandproService { + + @Autowired + private ExpandproMapper expandproMapper; + + @Override + public List selectByMainId(String mainId) { + return expandproMapper.selectByMainId(mainId); + } + + @Override + public List getusernamelist() { + return expandproMapper.getusernamelist(); + } + + @Override + public String getdepid(String seusername) { + return expandproMapper.getdepid(seusername); + } +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/impl/ExpprojectServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/impl/ExpprojectServiceImpl.java new file mode 100644 index 0000000..0b9ac17 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/service/impl/ExpprojectServiceImpl.java @@ -0,0 +1,77 @@ +package org.jeecg.modules.demo.expproject.service.impl; + +import org.jeecg.modules.demo.expproject.entity.Expproject; +import org.jeecg.modules.demo.expproject.entity.Expandpro; +import org.jeecg.modules.demo.expproject.mapper.ExpandproMapper; +import org.jeecg.modules.demo.expproject.mapper.ExpprojectMapper; +import org.jeecg.modules.demo.expproject.service.IExpprojectService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import java.io.Serializable; +import java.util.List; +import java.util.Collection; + +/** + * @Description: 专家项目表 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +@Service +public class ExpprojectServiceImpl extends ServiceImpl implements IExpprojectService { + + @Autowired + private ExpprojectMapper expprojectMapper; + @Autowired + private ExpandproMapper expandproMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveMain(Expproject expproject, List expandproList) { + expprojectMapper.insert(expproject); + if(expandproList!=null && expandproList.size()>0) { + for(Expandpro entity:expandproList) { + //外键设置 + entity.setExpprojectid(expproject.getId()); + expandproMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateMain(Expproject expproject,List expandproList) { + expprojectMapper.updateById(expproject); + + //1.先删除子表数据 + expandproMapper.deleteByMainId(expproject.getId()); + + //2.子表数据重新插入 + if(expandproList!=null && expandproList.size()>0) { + for(Expandpro entity:expandproList) { + //外键设置 + entity.setExpprojectid(expproject.getId()); + expandproMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delMain(String id) { + expandproMapper.deleteByMainId(id); + expprojectMapper.deleteById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delBatchMain(Collection idList) { + for(Serializable id:idList) { + expandproMapper.deleteByMainId(id.toString()); + expprojectMapper.deleteById(id); + } + } + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/vo/ExpprojectPage.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/vo/ExpprojectPage.java new file mode 100644 index 0000000..242f7d6 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/vo/ExpprojectPage.java @@ -0,0 +1,77 @@ +package org.jeecg.modules.demo.expproject.vo; + +import java.util.List; +import org.jeecg.modules.demo.expproject.entity.Expproject; +import org.jeecg.modules.demo.expproject.entity.Expandpro; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecgframework.poi.excel.annotation.ExcelEntity; +import org.jeecgframework.poi.excel.annotation.ExcelCollection; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 专家项目表 + * @Author: jeecg-boot + * @Date: 2024-10-23 + * @Version: V1.0 + */ +@Data +@ApiModel(value="expprojectPage对象", description="专家项目表") +public class ExpprojectPage { + + /**主键*/ + @ApiModelProperty(value = "主键") + private String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + /**项目名称*/ + @Excel(name = "项目名称", width = 15) + @ApiModelProperty(value = "项目名称") + private String proname; + /**专家类型*/ + @Excel(name = "专家类型", width = 15, dictTable = "discipline_fieid", dicText = "name", dicCode = "id") + @Dict(dictTable = "discipline_fieid", dicText = "name", dicCode = "id") + @ApiModelProperty(value = "专家类型") + private String exptype; + /**需要专家个数*/ + @Excel(name = "需要专家个数", width = 15) + @ApiModelProperty(value = "需要专家个数") + private Integer needexp; + /**简介*/ + @Excel(name = "简介", width = 15) + @ApiModelProperty(value = "简介") + private String proinfo; + /**附件*/ + @Excel(name = "附件", width = 15) + @ApiModelProperty(value = "附件") + private String profile; + + @ExcelCollection(name="评审专家") + @ApiModelProperty(value = "评审专家") + private List expandproList; + +} diff --git a/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts b/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts index 49f26d6..17e07a9 100644 --- a/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts +++ b/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts @@ -76,6 +76,7 @@ export default { loginButton: '登录', registerButton: '注册', registerButton4faren: '法人注册', + registerButtonexp: '专家注册', registerButton4shenbaoren: '申报人注册', rememberMe: '记住我', forgetPassword: '忘记密码?', diff --git a/jeecgboot-vue3/src/views/expert/Expert.api.ts b/jeecgboot-vue3/src/views/expert/admin/Expert.api.ts similarity index 73% rename from jeecgboot-vue3/src/views/expert/Expert.api.ts rename to jeecgboot-vue3/src/views/expert/admin/Expert.api.ts index 4df1f72..0fca733 100644 --- a/jeecgboot-vue3/src/views/expert/Expert.api.ts +++ b/jeecgboot-vue3/src/views/expert/admin/Expert.api.ts @@ -1,16 +1,18 @@ -import { defHttp } from '/@/utils/http/axios'; -import { useMessage } from "/@/hooks/web/useMessage"; +import { defHttp } from '/src/utils/http/axios'; +import { useMessage } from "/src/hooks/web/useMessage"; const { createConfirm } = useMessage(); enum Api { - list = '/expert/expert/list', + list = '/expert/expert/listadmin', save='/expert/expert/add', edit='/expert/expert/edit', deleteOne = '/expert/expert/delete', deleteBatch = '/expert/expert/deleteBatch', importExcel = '/expert/expert/importExcel', exportXls = '/expert/expert/exportXls', + handleadminback = '/expert/expert/handleadminback', + handleadminup = '/expert/expert/handleadminup', } /** @@ -28,6 +30,19 @@ export const getImportUrl = Api.importExcel; * 列表接口 * @param params */ +export const handleadminup = (params) => defHttp.get({ url: Api.handleadminup, params }); + +/** + * 管理员驳回 + * @param params + */ +export const handleadminback = (params) => defHttp.get({ url: Api.handleadminback, params }); + + +/** + * 管理员通过审核 + * @param params + */ export const list = (params) => defHttp.get({ url: Api.list, params }); /** diff --git a/jeecgboot-vue3/src/views/expert/Expert.data.ts b/jeecgboot-vue3/src/views/expert/admin/Expert.data.ts similarity index 67% rename from jeecgboot-vue3/src/views/expert/Expert.data.ts rename to jeecgboot-vue3/src/views/expert/admin/Expert.data.ts index 368c16e..9039ccf 100644 --- a/jeecgboot-vue3/src/views/expert/Expert.data.ts +++ b/jeecgboot-vue3/src/views/expert/admin/Expert.data.ts @@ -1,8 +1,8 @@ -import {BasicColumn} from '/@/components/Table'; -import {FormSchema} from '/@/components/Table'; -import { rules} from '/@/utils/helper/validator'; -import { render } from '/@/utils/common/renderUtils'; -import { getWeekMonthQuarterYear } from '/@/utils'; +import {BasicColumn} from '/src/components/Table'; +import {FormSchema} from '/src/components/Table'; +import { rules} from '/src/utils/helper/validator'; +import { render } from '/src/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/src/utils'; //列表数据 export const columns: BasicColumn[] = [ { @@ -23,7 +23,7 @@ export const columns: BasicColumn[] = [ { title: '研究方向', align: "center", - dataIndex: 'directioncal' + dataIndex: 'directioncal_dictText' }, { title: '研究类型', @@ -40,21 +40,33 @@ export const columns: BasicColumn[] = [ align: "center", dataIndex: 'expinfo' }, + { title: '部门审核', align: "center", - dataIndex: 'compopen', - customRender:({text}) => { - return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]); - }, + dataIndex: 'compopen_dictText' }, { title: '管理员审核', align: "center", - dataIndex: 'adminopen', + dataIndex: 'adminopen_dictText' + }, + { + title: '是否完善信息', + align: "center", + dataIndex: 'isdone', + customRender:({text}) => { + return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]); + }, + }, + + { + title: '专家状态', + align: "center", + dataIndex: 'expsture', customRender:({text}) => { - return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]); - }, + return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]); + }, }, ]; diff --git a/jeecgboot-vue3/src/views/expert/ExpertList.vue b/jeecgboot-vue3/src/views/expert/admin/ExpertList.vue similarity index 85% rename from jeecgboot-vue3/src/views/expert/ExpertList.vue rename to jeecgboot-vue3/src/views/expert/admin/ExpertList.vue index ca6903e..037140a 100644 --- a/jeecgboot-vue3/src/views/expert/ExpertList.vue +++ b/jeecgboot-vue3/src/views/expert/admin/ExpertList.vue @@ -76,16 +76,16 @@ + diff --git a/jeecgboot-vue3/src/views/expproject/admin/V20241023_1__menu_insert_Expproject.sql b/jeecgboot-vue3/src/views/expproject/admin/V20241023_1__menu_insert_Expproject.sql new file mode 100644 index 0000000..c109723 --- /dev/null +++ b/jeecgboot-vue3/src/views/expproject/admin/V20241023_1__menu_insert_Expproject.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/expproject文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('202410230508460320', NULL, '专家项目表', '/expproject/expprojectList', 'expproject/ExpprojectList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-10-23 17:08:32', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('202410230508460321', '202410230508460320', '添加专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('202410230508460322', '202410230508460320', '编辑专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('202410230508460323', '202410230508460320', '删除专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('202410230508460324', '202410230508460320', '批量删除专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('202410230508460325', '202410230508460320', '导出excel_专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('202410230508460326', '202410230508460320', '导入excel_专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', NULL, NULL, 0, 0, '1', 0); diff --git a/jeecgboot-vue3/src/views/expproject/admin/components/ExpprojectForm.vue b/jeecgboot-vue3/src/views/expproject/admin/components/ExpprojectForm.vue new file mode 100644 index 0000000..feff137 --- /dev/null +++ b/jeecgboot-vue3/src/views/expproject/admin/components/ExpprojectForm.vue @@ -0,0 +1,227 @@ + + + + diff --git a/jeecgboot-vue3/src/views/expproject/admin/components/ExpprojectModal.vue b/jeecgboot-vue3/src/views/expproject/admin/components/ExpprojectModal.vue new file mode 100644 index 0000000..0a73628 --- /dev/null +++ b/jeecgboot-vue3/src/views/expproject/admin/components/ExpprojectModal.vue @@ -0,0 +1,67 @@ + + + + diff --git a/jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue b/jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue index c8cb1cd..303a678 100644 --- a/jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue +++ b/jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue @@ -100,6 +100,7 @@ --> {{ t('sys.login.registerButton4faren') }} {{ t('sys.login.registerButton4shenbaoren') }} + {{ t('sys.login.registerButtonexp') }} @@ -149,6 +150,10 @@
+
+ +
+
@@ -184,6 +189,7 @@ import { ExceptionEnum } from "@/enums/exceptionEnum"; import MiniRegister4shenbaoren from "@/views/system/loginmini/MiniRegister4shenbaoren.vue"; import MiniRegister4faren from "@/views/system/loginmini/MiniRegister4faren.vue"; + import MiniRegisterexp from "@/views/system/loginmini/MiniRegisterexp.vue"; const IconFont = createFromIconfontCN({ scriptUrl: '//at.alicdn.com/t/font_2316098_umqusozousr.js', @@ -228,6 +234,7 @@ //忘记密码 const forgotRef = ref(); //注册 + const registerRef4exp = ref(); const registerRef = ref(); const registerRef4shenbaoren = ref(); const registerRef4faren = ref(); @@ -450,6 +457,16 @@ }, 300); } + /** + * 专家注册 + */ + function registerRef4expleClick() { + type.value = 'registerRef4exp'; + setTimeout(() => { + registerRef4exp.value.initForm(); + }, 300); + } + /** * 注册 */ diff --git a/jeecgboot-vue3/src/views/system/loginmini/MiniRegisterexp.vue b/jeecgboot-vue3/src/views/system/loginmini/MiniRegisterexp.vue new file mode 100644 index 0000000..a281f60 --- /dev/null +++ b/jeecgboot-vue3/src/views/system/loginmini/MiniRegisterexp.vue @@ -0,0 +1,353 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/system/user/user.data.ts b/jeecgboot-vue3/src/views/system/user/user.data.ts index 238607f..0ae6c70 100644 --- a/jeecgboot-vue3/src/views/system/user/user.data.ts +++ b/jeecgboot-vue3/src/views/system/user/user.data.ts @@ -169,7 +169,7 @@ export const formSchema: FormSchema[] = [ dynamicRules: ({ values }) => rules.confirmPassword(values, true), }, { - label: '用户姓名', + label: '用户姓名121', field: 'realname', required: true, component: 'Input',