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 b6fb8c4..18e22d7 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 @@ -17,10 +17,13 @@ import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryRuleEnum; import org.jeecg.common.system.vo.DictModel; +import org.jeecg.modules.demo.depadminlx.entity.Depadminlx; +import org.jeecg.modules.demo.depadminlx.service.IDepadminlxService; 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.DepartExtDto2; import org.jeecg.modules.demo.project.dto.ProjectShenBaoDto; import org.jeecg.modules.demo.project.entity.Project; import org.jeecg.modules.demo.project.service.IProjectService; @@ -78,6 +81,9 @@ public class ProjectController extends JeecgController @Autowired private SysBaseApiImpl sysBaseApi; + @Autowired + private IDepadminlxService iDepadminlxService; + /** * 分页列表查询 * @@ -214,6 +220,42 @@ public class ProjectController extends JeecgController return Result.OK(dto); } + @ApiOperation(value = "预算书-部门基本情况-部门信息", notes = "预算书-部门基本情况-部门信息") + @GetMapping(value = "/getDepartDtoInfo") + public Result getDepartDtoInfo(Project para, HttpServletRequest req) { + Project project = projectService.getById(para.getId()); + SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); + SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode, sysUser.getOrgCode())); + DepartExt departExt = iDepartExtService.getOne(new LambdaQueryWrapper() + .eq(DepartExt::getDepartId, sysDepart.getId()) + .eq(DepartExt::getProjectId, para.getId()) + ); + 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); + ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); + dto.setAnnualName(projectType.getAnnualName()); + List dictModels = sysBaseApi.queryDictItemsByCode("depart_type"); + if(ObjectUtil.isNotEmpty(dictModels)){ + dictModels.forEach(e->{ + if(e.getValue().equals(dto.getType())){ + dto.setType(e.getText()); + } + }); + } + List dictModels2 = sysBaseApi.queryDictItemsByCode("depart_category"); + if(ObjectUtil.isNotEmpty(dictModels2)){ + dictModels2.forEach(d->{ + if(d.getValue().equals(dto.getOrgCategory())){ + dto.setOrgCategory(d.getText()); + } + }); + } + return Result.OK(dto); + } + /** * 添加 * diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/DepartExtDto2.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/DepartExtDto2.java new file mode 100644 index 0000000..26d2a8e --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/DepartExtDto2.java @@ -0,0 +1,70 @@ +package org.jeecg.modules.demo.project.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; + +/** + * @Description: TODO + * @Author: Z.H.C + * @CreateTime: 2024-10-24 11:09 + * @Version: 1.0 + */ +@Data +public class DepartExtDto2 extends DepartExtDto { + + + @Excel(name = "编制数", width = 15) + @ApiModelProperty(value = "编制数") + private String bzs; + /** + * 在职职工人数: + */ + @Excel(name = "在职职工人数:", width = 15) + @ApiModelProperty(value = "在职职工人数:") + private String zzzgrs; + /** + * 中级职称以上研究人员数 + */ + @Excel(name = "中级职称以上研究人员数", width = 15) + @ApiModelProperty(value = "中级职称以上研究人员数") + private String zjzcysyjrys; + /** + * 单位联系人姓名 + */ + @Excel(name = "单位联系人姓名", width = 15) + @ApiModelProperty(value = "单位联系人姓名") + private String dwlxrxm; + /** + * 单位联系人职称 + */ + @Excel(name = "单位联系人职称", width = 15) + @ApiModelProperty(value = "单位联系人职称") + private String dwlxrzc; + /** + * 单位联系人职务 + */ + @Excel(name = "单位联系人职务", width = 15) + @ApiModelProperty(value = "单位联系人职务") + private String dwlxrzw; + /** + * 单位联系人电话 + */ + @Excel(name = "单位联系人电话", width = 15) + @ApiModelProperty(value = "单位联系人电话") + private String dwlxrdh; + /** + * 单位联系人手机 + */ + @Excel(name = "单位联系人手机", width = 15) + @ApiModelProperty(value = "单位联系人手机") + private String dwlxrsj; + /** + * 单位联系人邮箱 + */ + @Excel(name = "单位联系人邮箱", width = 15) + @ApiModelProperty(value = "单位联系人邮箱") + private String dwlxryx; + + +} diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/DepartBaseInfoDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/DepartBaseInfoDemo.vue index b03f458..66b3d77 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/DepartBaseInfoDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/DepartBaseInfoDemo.vue @@ -2,7 +2,7 @@
+ defHttp.get({url: Api.departDtoInfo, params}); + + /** * 导出api * @param params