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 45c8f30..db1ae8b 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.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -15,6 +16,7 @@ import org.jeecg.common.exception.JeecgBootException; 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.departext.entity.DepartExt; import org.jeecg.modules.demo.departext.service.IDepartExtService; import org.jeecg.modules.demo.project.dto.BasicInfoDto; @@ -30,6 +32,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.jeecg.modules.system.service.impl.SysBaseApiImpl; import org.jeewx.api.core.util.DateUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -40,6 +43,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; /** @@ -71,6 +75,9 @@ public class ProjectController extends JeecgController @Autowired private IProjectTypeService iProjectTypeService; + @Autowired + private SysBaseApiImpl sysBaseApi; + /** * 分页列表查询 * @@ -188,6 +195,22 @@ public class ProjectController extends JeecgController BeanUtils.copyProperties(departExt, 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(e->{ + if(e.getValue().equals(dto.getOrgCategory())){ + dto.setOrgCategory(e.getText()); + } + }); + } return Result.OK(dto); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/DepartExtDto.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/DepartExtDto.java index 05db0b0..daba558 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/DepartExtDto.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/DepartExtDto.java @@ -51,6 +51,7 @@ public class DepartExtDto { */ @Excel(name = "企业登记注册类型", width = 15) @ApiModelProperty(value = "企业登记注册类型") + @Dict(dicCode = "depart_type") private String type; /** * 开户银行 @@ -133,7 +134,7 @@ public class DepartExtDto { /** * 机构类型 */ - private String orgType; +// private String orgType; /** * 机构编码 */ diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/DepartBaseInfoDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/DepartBaseInfoDemo.vue index 6f0340e..a7f8abc 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/DepartBaseInfoDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/DepartBaseInfoDemo.vue @@ -89,9 +89,17 @@ const schema: any = [ field: 'departName', label: '部门名称' }, + { + field: 'departNameAbbr', + label: '统一社会信用代码' + }, + { + field: 'address', + label: '通信地址' + }, { label: '单位性质', - field: 'category', + field: 'orgCategory', }, { label: '企业登记注册类型', @@ -110,7 +118,7 @@ const schema: any = [ field: 'employeeNum', }, { - label: '上年度研发经费', + label: '上年度研发(R&D)经费(万元)', field: 'lastYearFee', }, { @@ -136,13 +144,14 @@ async function getData() { id: route.query.id, }; let obj = await getDepartByProjectId(params); - // console.log('data', JSON.stringify(obj)) + console.log('data', JSON.stringify(obj)) DepartBaseInfoData.annualName = obj.annualName; DepartBaseInfoData.departName = obj.departName; + DepartBaseInfoData.departNameAbbr = obj.departNameAbbr; DepartBaseInfoData.linkmanName = obj.linkmanName; DepartBaseInfoData.linkmanEmail = obj.linkmanEmail; DepartBaseInfoData.linkmanPhone = obj.linkmanPhone; - DepartBaseInfoData.category = obj.category; + DepartBaseInfoData.orgCategory = obj.orgCategory; DepartBaseInfoData.address = obj.address; DepartBaseInfoData.bankNo = obj.bankNo; DepartBaseInfoData.bankName = obj.bankName; diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue index 8d84e4a..217c43f 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue @@ -173,7 +173,7 @@ const schema: any = [ }, { field: 'email', - label: '项目负责人职称', + label: '项目负责人邮箱', }, { field: 'title',