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 4e48d96..c01315a 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 @@ -183,6 +183,7 @@ public class ExpertController extends JeecgController { //用于查看本县区下面的专家信息无论是否审核,无论哪个部门 QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); queryWrapper.eq("isdone","Y"); + queryWrapper.eq("compopen","2"); queryWrapper.in("seusername",usernames); Page page = new Page(pageNo, pageSize); IPage pageList = expertService.page(page, queryWrapper); @@ -456,6 +457,41 @@ public class ExpertController extends JeecgController { return Result.OK("编辑成功!"); } + + /** + * 编辑 + * + * @param expert + * @return + */ + @AutoLog(value = "专家管理(市局管理员)-编辑") + @ApiOperation(value="专家管理(市局管理员)-编辑", notes="专家管理(市局管理员)-编辑") + @RequestMapping(value = "/editstatic", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result editstatic(@RequestBody Expert expert) { + if (expert.getExpsture().equals("N")) { + expert.setErrinfo(""); + } + 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("编辑成功!"); + } + /** * 编辑 * 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 index b07adf5..ac98550 100644 --- 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 @@ -143,7 +143,7 @@ public class ExpprojectController { public Result add(@RequestBody ExpprojectPage expprojectPage) { Expproject expproject = new Expproject(); BeanUtils.copyProperties(expprojectPage, expproject); - if (!expprojectPage.getExpandproList().isEmpty()) { + if ( expprojectPage.getExpandproList() != null && !expprojectPage.getExpandproList().isEmpty()) { if (expproject.getNeedexp() >= expprojectPage.getExpandproList().size()) { expprojectService.saveMain(expproject, expprojectPage.getExpandproList()); return Result.OK("添加成功!"); diff --git a/jeecgboot-vue3/src/views/expert/admin/components/ExpertForm.vue b/jeecgboot-vue3/src/views/expert/admin/components/ExpertForm.vue index b867049..b04e097 100644 --- a/jeecgboot-vue3/src/views/expert/admin/components/ExpertForm.vue +++ b/jeecgboot-vue3/src/views/expert/admin/components/ExpertForm.vue @@ -9,12 +9,12 @@ - + - + @@ -126,6 +126,8 @@