From 678ad047199333f438e0b1c9a4e39609538ea745 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Sun, 10 Nov 2024 20:46:14 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=2011?= =?UTF-8?q?.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/controller/ProjectController.java | 20 +++++++++++-------- .../service/impl/ProjectServiceImpl.java | 2 +- .../ProjectAnnualBudgetController.java | 6 +++--- .../system/controller/SysUserController.java | 1 + 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java index a68e2e6..d80deb5 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java @@ -124,7 +124,7 @@ public class ProjectController extends JeecgController /** * @description: 申报列表,不同角色可见数据 * @param: [project, pageNo, pageSize, req] - * @return: org.jeecg.common.api.vo.Result> + * @return: org.jeecg.common.api.vo.Result> * @author: z.h.c * @date: 24/11/7 14:56 */ @@ -303,11 +303,10 @@ public class ProjectController extends JeecgController queryWrapper.in("project_status", 12); } if ("kejiju_admin".equals(loginUser.getRoleCode())) { - queryWrapper.in("budget_status", 11,12); + queryWrapper.in("budget_status", 11, 12); } - IPage pageList = projectService.page(page, queryWrapper); return Result.OK(pageList); } @@ -357,7 +356,7 @@ public class ProjectController extends JeecgController queryWrapper.in("project_status", 13); } if ("kejiju_admin".equals(loginUser.getRoleCode())) { - queryWrapper.in("budget_status", 12,13); + queryWrapper.in("budget_status", 12, 13); } IPage pageList = projectService.page(page, queryWrapper); @@ -420,7 +419,7 @@ public class ProjectController extends JeecgController ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); project.setAnnualName(projectType.getAnnualName()); project.setProjectTypeName(projectType.getTypeName()); - SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); + SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode,project.getSysOrgCode())); project.setDepartName(sysDepart.getDepartName()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); project.setProjectCharger(sysUser.getRealname()); @@ -434,7 +433,8 @@ public class ProjectController extends JeecgController ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); project.setAnnualName(projectType.getAnnualName()); project.setProjectTypeName(projectType.getTypeName()); - SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); +// SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); + SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode,project.getSysOrgCode())); project.setDepartName(sysDepart.getDepartName()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); project.setProjectCharger(sysUser.getRealname()); @@ -522,8 +522,12 @@ public class ProjectController extends JeecgController Depadminlx depadminlx = iDepadminlxService.getOne(new LambdaQueryWrapper().eq(Depadminlx::getDepid, project.getSysOrgCode())); DepartExtDto2 dto = new DepartExtDto2(); BeanUtils.copyProperties(sysDepart, dto); - BeanUtils.copyProperties(departExt, dto); - BeanUtils.copyProperties(depadminlx, dto); + if (ObjectUtil.isNotEmpty(departExt)) { + BeanUtils.copyProperties(departExt, dto); + } + if (ObjectUtil.isNotEmpty(depadminlx)) { + BeanUtils.copyProperties(depadminlx, dto); + } ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); dto.setAnnualName(projectType.getAnnualName()); List dictModels = sysBaseApi.queryDictItemsByCode("depart_type"); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java index a41dab5..153608c 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java @@ -106,7 +106,7 @@ public class ProjectServiceImpl extends ServiceImpl impl BeanUtils.copyProperties(dto, sysDepart); BeanUtils.copyProperties(dto, userExt); BeanUtils.copyProperties(dto, project); - project.setSysOrgCode(loginUser.getOrgId()); + project.setSysOrgCode(loginUser.getOrgCode()); this.updateById(project); userExt.setUserId(loginUser.getId()); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java index edfbd16..60fd44c 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java @@ -154,9 +154,9 @@ public class ProjectAnnualBudgetController extends JeecgController queryByProjectId(@PathVariable("projectId") String projectId) { ProjectAnnualBudget projectAnnualBudget = projectAnnualBudgetService.getOne(new LambdaQueryWrapper().eq(ProjectAnnualBudget::getProjectId,projectId)); - if (projectAnnualBudget == null) { - return Result.error("未找到对应数据"); - } + /*if (projectAnnualBudget == null) { + return Result.error("暂无数据"); + }*/ return Result.OK(projectAnnualBudget); } diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java index 1c2c097..83a7360 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java @@ -2024,6 +2024,7 @@ public class SysUserController { user.setSalt(salt); user.setUsername(username); user.setWorkNo(workon); + user.setOrgCode(depart.getOrgCode()); user.setRealname(realname); user.setPassword(passwordEncode); //user.setEmail(email); From 1d615430e0a28e3bef913277c9f7d5b1f8de1262 Mon Sep 17 00:00:00 2001 From: admin <417727563@qq.com> Date: Sun, 10 Nov 2024 20:46:51 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue | 4 ++-- .../src/views/system/usersetting/BaseSetting.vue | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue b/jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue index b29caed..81d1537 100644 --- a/jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue +++ b/jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue @@ -212,8 +212,8 @@ //账号登录表单字段 const formData = reactive({ inputCode: '', - username: 'admin', - password: '123456', + username: '', + password: '', }); //手机登录表单字段 const phoneFormData = reactive({ diff --git a/jeecgboot-vue3/src/views/system/usersetting/BaseSetting.vue b/jeecgboot-vue3/src/views/system/usersetting/BaseSetting.vue index 619a538..39f9e05 100644 --- a/jeecgboot-vue3/src/views/system/usersetting/BaseSetting.vue +++ b/jeecgboot-vue3/src/views/system/usersetting/BaseSetting.vue @@ -39,10 +39,10 @@ 性别 {{ userInfo.sexText }} -
- 职位 - {{ userInfo.postText ? userInfo.postText : "未填写" }} -
+ + + +
编辑 From 8334f69584a690fd9fa639d3a0329cece60fde07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Sun, 10 Nov 2024 21:44:51 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9416b57..61be0f0 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 @@ -60,5 +60,5 @@ public interface ExpertMapper extends BaseMapper { void handlebackcount(String id); @Update("UPDATE sys_user SET sex = #{sex} , avatar = #{topPic} WHERE username = #{seusername}") - void updateuser(String topPic, Integer sex, String seusername); + void updateuser(@Param("topPic") String topPic, @Param("sex") Integer sex,@Param("seusername") String seusername); } From 31409fdfb7b56f2feb1a6e45e31371669c72b723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Mon, 11 Nov 2024 09:02:54 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DepsbnczController.java | 31 +++++++++++----- .../expert/controller/ExpertController.java | 7 +++- .../src/views/depsbncz/DepsbnczList.vue | 18 ++++++++++ .../depsbncz/components/DepsbnczForm.vue | 7 ++++ .../src/views/expert/admin/ExpertList.vue | 23 +++++------- .../src/views/expert/adminback/ExpertList.vue | 23 +++++------- .../src/views/expert/county/ExpertList.vue | 23 ++++++------ .../src/views/expert/firm/ExpertList.vue | 29 +++++---------- .../src/views/expert/self/ExpertList.vue | 35 +------------------ .../src/views/expert/selfback/ExpertList.vue | 35 +------------------ 10 files changed, 94 insertions(+), 137 deletions(-) diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java index 942098d..e741d62 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java @@ -120,16 +120,19 @@ public class DepsbnczController extends JeecgController depsbnczs=depsbnczService.query().eq("annualid",annual.getId()).eq("depid",depiid).list(); - if (depsbnczs.size()>0){ + if (depiid == null || depiid.isEmpty()){ + return Result.error("请确定自己的单位信息是否完整"); + } + List depsbnczList =depsbnczService.query().eq("annualid",depsbncz.getAnnualid()).eq("depid",depiid).list(); + int a=0; + if (depsbnczList == null || depsbnczList.isEmpty()) { + + } else { + a=depsbnczList.size(); + } + if (a>0){ return Result.error("本年度已经添加过了"); }else { - depsbncz.setAnnualid(annual.getId()); depsbncz.setDepid(depiid); depsbnczService.save(depsbncz); return Result.OK("添加成功!"); @@ -146,6 +149,18 @@ public class DepsbnczController extends JeecgController edit(@RequestBody Depsbncz depsbncz) { + + List depsbnczList =depsbnczService.query().eq("annualid",depsbncz.getAnnualid()).eq("depid",depsbncz.getDepid()).list(); + int a=0; + if (depsbnczList == null || depsbnczList.isEmpty()) { + + } else { + a=depsbnczList.size(); + } + if (a>0){ + return Result.error("每年度仅可添加一次"); + } + depsbnczService.updateById(depsbncz); return Result.OK("编辑成功!"); } 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 86d98f5..b26cfda 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 @@ -173,7 +173,12 @@ public class ExpertController extends JeecgController { //开始对比两个List获取相同部分,获取的交叉id就是需要的id List commonElements = userdepids.stream().filter(userbyrole::contains).collect(Collectors.toList()); //根据查询的userid去获取username - List sysUserList = sysUserService.query().in("id",commonElements).list(); + List sysUserList =new ArrayList<>(); + if(commonElements!=null && !commonElements.isEmpty()) { + sysUserList = sysUserService.query().in("id", commonElements).list(); + } else{ + return Result.error("目前没有专家注册。"); + } //根据查询的结果获取username的list List usernames = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); diff --git a/jeecgboot-vue3/src/views/depsbncz/DepsbnczList.vue b/jeecgboot-vue3/src/views/depsbncz/DepsbnczList.vue index a9aa5ee..3407a05 100644 --- a/jeecgboot-vue3/src/views/depsbncz/DepsbnczList.vue +++ b/jeecgboot-vue3/src/views/depsbncz/DepsbnczList.vue @@ -4,6 +4,24 @@
+ + + + + + + + + + 查询 + 重置 + + {{ toggleSearchStatus ? '收起' : '展开' }} + + + + +
diff --git a/jeecgboot-vue3/src/views/depsbncz/components/DepsbnczForm.vue b/jeecgboot-vue3/src/views/depsbncz/components/DepsbnczForm.vue index b600b31..a275b60 100644 --- a/jeecgboot-vue3/src/views/depsbncz/components/DepsbnczForm.vue +++ b/jeecgboot-vue3/src/views/depsbncz/components/DepsbnczForm.vue @@ -4,6 +4,11 @@