From 00fcc1ee9c065d60f5e3c25995cf577ce73d3ede Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Sun, 27 Oct 2024 16:22:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=AE=97=E4=B9=A6-=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E6=83=85=E5=86=B5=E8=A1=A8=20=E5=8A=9F=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=2010.27?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/controller/ProjectController.java | 37 ++++- .../demo/project/dto/BasicInfoDto.java | 25 +++ .../src/main/resources/application-dev.yml | 2 +- .../src/main/resources/application-test.yml | 2 +- .../CooperationDepart.api.ts | 4 + .../CooperationDepart.data.ts | 57 +++++++ .../yusuanshu/ProjectBaseInfoDemo.vue | 152 +++++++++--------- .../projectObjective/ProjectObjective.api.ts | 5 + 8 files changed, 202 insertions(+), 82 deletions(-) create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/BasicInfoDto.java 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 507dc10..7133fc9 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 @@ -1,5 +1,6 @@ package org.jeecg.modules.demo.project.controller; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -16,6 +17,7 @@ import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryRuleEnum; import org.jeecg.modules.demo.departext.entity.DepartExt; import org.jeecg.modules.demo.departext.service.IDepartExtService; +import org.jeecg.modules.demo.project.dto.BasicInfoDto; import org.jeecg.modules.demo.project.dto.DepartExtDto; import org.jeecg.modules.demo.project.dto.ProjectShenBaoDto; import org.jeecg.modules.demo.project.entity.Project; @@ -28,6 +30,7 @@ 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.jeewx.api.core.util.DateUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -115,13 +118,43 @@ 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()); + project.setDepartName(sysDepart.getDepartName()); + SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); + project.setProjectCharger(sysUser.getRealname()); + return Result.OK(project); + } + + @ApiOperation(value = "预算书-获取预算基本信息", notes = "预算书-获取预算基本信息") + @GetMapping(value = "/getBaseInfo") + public Result getBaseInfo(Project param, HttpServletRequest req) { + Project project = projectService.getById(param.getId()); + ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); project.setAnnualName(projectType.getAnnualName()); project.setProjectTypeName(projectType.getTypeName()); SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); project.setDepartName(sysDepart.getDepartName()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); project.setProjectCharger(sysUser.getRealname()); - return Result.OK(project); + + UserExt userExt = iUserExtService.getOne(new LambdaQueryWrapper() + .eq(UserExt::getUserId, sysUser.getId()) + .eq(UserExt::getProjectId, param.getId()) + ); + + if (StrUtil.isNotBlank(sysUser.getPhone())) { + userExt.setPhone(sysUser.getPhone()); + } + if (StrUtil.isNotBlank(sysUser.getEmail())) { + userExt.setEmail(sysUser.getEmail()); + } + + BasicInfoDto basicInfoDto = new BasicInfoDto(); + BeanUtils.copyProperties(userExt, basicInfoDto); + BeanUtils.copyProperties(project, basicInfoDto); + basicInfoDto.setRealName(sysUser.getRealname()); + basicInfoDto.setProjectTime(DateUtils.formatDate(project.getStartTime()) +"——"+DateUtils.formatDate(project.getEndTime())); + return Result.OK(basicInfoDto); } @ApiOperation(value = "获取项目负责人信息", notes = "获取项目负责人信息") @@ -134,7 +167,7 @@ public class ProjectController extends JeecgController .eq(UserExt::getUserId, project.getProjectCharger()) .eq(UserExt::getProjectId, para.getId()) ); - userExt.setIdNO(sysUser.getId()); + userExt.setIdNO(sysUser.getIdNo()); userExt.setPhone(sysUser.getPhone()); userExt.setEmail(sysUser.getEmail()); return Result.OK(userExt); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/BasicInfoDto.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/BasicInfoDto.java new file mode 100644 index 0000000..a8d8eaf --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/BasicInfoDto.java @@ -0,0 +1,25 @@ +package org.jeecg.modules.demo.project.dto; + +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Description: TODO + * @Author: Z.H.C + * @CreateTime: 2024-10-27 11:56 + * @Version: 1.0 + */ +@Data +public class BasicInfoDto { + + private String projectName; +// private String projectCharger; + private String projectTime; + private String idNO; + private String phone; + private String realName; + private String email; + private String title;; + +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml index a86fb49..44cd665 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml +++ b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml @@ -173,7 +173,7 @@ spring: #driver-class-name: com.mysql.cj.jdbc.Driver #redis 配置 redis: - database: 5 + database: 7 host: 182.92.169.222 port: 6379 password: 'redis@ycwl2022.' diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml index c71c11b..dc8bba8 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml +++ b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml @@ -173,7 +173,7 @@ spring: #driver-class-name: com.mysql.cj.jdbc.Driver #redis 配置 redis: - database: 5 + database: 7 host: 182.92.169.222 port: 6379 password: 'redis@ycwl2022.' diff --git a/jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.api.ts b/jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.api.ts index 32df771..c1e9236 100644 --- a/jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.api.ts +++ b/jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.api.ts @@ -28,6 +28,10 @@ export const getImportUrl = Api.importExcel; export const list = (params) => defHttp.get({url: Api.list, params}); + +export const list2 = (params) => + defHttp.get({url: Api.list, params}); + /** * 删除单个 */ diff --git a/jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.data.ts b/jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.data.ts index 6366a46..02a4894 100644 --- a/jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.data.ts +++ b/jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.data.ts @@ -56,6 +56,63 @@ export const columns: BasicColumn[] = [ dataIndex: 'linkmanEmail' },*/ ]; + +export const columns2: BasicColumn[] = [ + { + title: '单位名称 ', + align: "center", + dataIndex: 'cooperationDepartName' + }, + { + title: '主管部门', + align: "center", + dataIndex: 'competentDepartName' + }, + { + title: '所属区域', + align: "center", + dataIndex: 'area_dictText' + }, + { + title: '单位性质', + align:"center", + dataIndex: 'category_dictText' + }, + { + title: '企业登记注册类型', + align:"center", + dataIndex: 'departType_dictText', + }, + { + title: '统一社会信用代码', + align: "center", + dataIndex: 'creditCode', + }, + { + title: '注册时间', + align:"center", + dataIndex: 'registerDate', + customRender:({text}) =>{ + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + return text; + }, + }, + { + title: '联系人', + align: "center", + dataIndex: 'linkmanName' + }, + { + title: '手机', + align: "center", + dataIndex: 'linkmanPhone' + }, + /* { + title: '电子邮箱', + align:"center", + dataIndex: 'linkmanEmail' + },*/ +]; //查询数据 export const searchFormSchema: FormSchema[] = []; //表单数据 diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue index e7a9ab0..f70d0f3 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue @@ -1,26 +1,15 @@ - diff --git a/jeecgboot-vue3/src/views/projectObjective/ProjectObjective.api.ts b/jeecgboot-vue3/src/views/projectObjective/ProjectObjective.api.ts index 6607c12..debf6bc 100644 --- a/jeecgboot-vue3/src/views/projectObjective/ProjectObjective.api.ts +++ b/jeecgboot-vue3/src/views/projectObjective/ProjectObjective.api.ts @@ -5,6 +5,7 @@ const {createConfirm} = useMessage(); enum Api { list = '/projectObjective/projectObjective/list', + baseInfo = '/project/project/getBaseInfo', save = '/projectObjective/projectObjective/add', edit = '/projectObjective/projectObjective/edit', deleteOne = '/projectObjective/projectObjective/delete', @@ -29,6 +30,10 @@ export const getImportUrl = Api.importExcel; export const list = (params) => defHttp.get({url: Api.list, params}); + +export const getBaseInfo = (params) => + defHttp.get({url: Api.baseInfo, params}); + /** * 删除单个 */