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 b20de69..6e82d6f 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 @@ -29,6 +29,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; +import org.jeecg.modules.demo.expproject.entity.Expandpro; +import org.jeecg.modules.demo.expproject.entity.ExpproVo; +import org.jeecg.modules.demo.expproject.entity.Expproject; +import org.jeecg.modules.demo.expproject.service.IExpandproService; +import org.jeecg.modules.demo.expproject.service.IExpprojectService; import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.service.ISysDepartService; @@ -69,6 +74,12 @@ public class ExpertController extends JeecgController { private ISysDepartService sysDepartService; @Autowired private IDisciplineFieidService disciplineFieidService; + @Autowired + private IExpprojectService expprojectService; + + @Autowired + private IExpandproService expandproService; + /** * 分页列表查询 @@ -764,6 +775,40 @@ public class ExpertController extends JeecgController { List expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("expsture","Y").list(); return Result.OK(expertList.size()); } + @ApiOperation(value="管理员专家数据---异常专家数--请假", notes="管理员专家数据---异常专家数--请假") + @GetMapping(value = "/expdatanumberycxj") + public Result expdatanumberycxj() { + List expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("expsture","Y").eq("errinfo","2").list(); + return Result.OK(expertList.size()); + } + + @ApiOperation(value="管理员专家数据---异常专家数--出差", notes="管理员专家数据---异常专家数--出差") + @GetMapping(value = "/expdatanumberyccc") + public Result expdatanumberyccc() { + List expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("expsture","Y").eq("errinfo","1").list(); + return Result.OK(expertList.size()); + } + + @ApiOperation(value="管理员专家数据---异常专家数--其他", notes="管理员专家数据---异常专家数--其他") + @GetMapping(value = "/expdatanumberycqt") + public Result expdatanumberycqt() { + List expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("expsture","Y").eq("errinfo","3").list(); + return Result.OK(expertList.size()); + } + + @ApiOperation(value="管理员专家数据---专家待提交/未审核", notes="管理员专家数据---专家待提交/未审核") + @GetMapping(value = "/expdatawtjsh") + public Result expdatawtjsh() { + List expertList = expertService.query().eq("adminopen","1").or().eq("compopen","1").or().eq("isdone","N").list(); + return Result.OK(expertList.size()); + } + + @ApiOperation(value="管理员专家数据---专家已审核", notes="管理员专家数据---专家已审核") + @GetMapping(value = "/expdatayish") + public Result expdatayish() { + List expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("isdone","Y").list(); + return Result.OK(expertList.size()); + } @ApiOperation(value="管理员专家数据---不同的领域专家数", notes="管理员专家数据---不同的领域专家数") @GetMapping(value = "/expdatanumberdiffect") @@ -780,4 +825,38 @@ public class ExpertController extends JeecgController { return Result.OK(expdefVoList); } + //统计项目的总个数 + @ApiOperation(value="管理员专家数据---查询项目个数", notes="管理员专家数据---查询项目个数") + @GetMapping(value = "/projectnumber") + public Result projectnumber() { + List expprojectList = expprojectService.list(); + return Result.OK(expprojectList.size()); + } + + @ApiOperation(value="管理员专家数据---查询项目和项目需要的专家", notes="管理员专家数据---查询项目和项目需要的专家") + @GetMapping(value = "/findprojectandnumber") + public Result> findprojectandnumber() { + List expproVos =new ArrayList<>(); + List expprojectList = expprojectService.list(); + for (Expproject expproject : expprojectList) { + ExpproVo expproVo = new ExpproVo(); + expproVo.setCreateTime(expproject.getCreateTime()); + expproVo.setProname(expproject.getProname()); + expproVo.setNeedexp(expproject.getNeedexp()); + expproVo.setExptype(disciplineFieidService.query().eq("id",expproject.getExptype()).one().getName()); + List expandpros =expandproService.query().eq("expprojectid",expproject.getId()).list(); + if (!expandpros.isEmpty()){ + expproVo.setExperts(expandpros.stream().map(Expandpro::getExpname).collect(Collectors.toList())); + } + expproVos.add(expproVo); + } + expproVos.sort(Comparator.comparing(ExpproVo::getCreateTime).reversed()); + // 截取前 6 条数据 + if (expproVos.size() > 6) { + expproVos = expproVos.subList(0, 6); + } + return Result.OK(expproVos); + } + + } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/ExpproVo.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/ExpproVo.java new file mode 100644 index 0000000..e1e00e0 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/ExpproVo.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.demo.expproject.entity; + +import lombok.Data; +import org.jeecg.modules.demo.expert.entity.Expert; + +import java.util.Date; +import java.util.List; + +@Data +public class ExpproVo { + private Date createTime; + private String proname; + private String exptype; + private Integer needexp; + private List experts; +} diff --git a/jeecgboot-vue3/src/views/dashboard/workbench/components/DynamicInfo.vue b/jeecgboot-vue3/src/views/dashboard/workbench/components/DynamicInfo.vue index eb187f2..6e6bfdc 100644 --- a/jeecgboot-vue3/src/views/dashboard/workbench/components/DynamicInfo.vue +++ b/jeecgboot-vue3/src/views/dashboard/workbench/components/DynamicInfo.vue @@ -1,5 +1,5 @@ diff --git a/jeecgboot-vue3/src/views/dashboard/workbench/components/api.ts b/jeecgboot-vue3/src/views/dashboard/workbench/components/api.ts index 0471a18..e549753 100644 --- a/jeecgboot-vue3/src/views/dashboard/workbench/components/api.ts +++ b/jeecgboot-vue3/src/views/dashboard/workbench/components/api.ts @@ -8,6 +8,13 @@ enum Api { zclist = '/expert/expert/expdatanumberzc', lyzjlist = '/expert/expert/expdatanumberdiffect', yclist= '/expert/expert/expdatanumberyc', + pronumber= '/expert/expert/projectnumber', + findprojectandnumberapi= '/expert/expert/findprojectandnumber', + expdatanumberycxjapi= '/expert/expert/expdatanumberycxj', + expdatanumberycccapi= '/expert/expert/expdatanumberyccc', + expdatanumberycqtapi= '/expert/expert/expdatanumberycqt', + expdatawtjshapi= '/expert/expert/expdatawtjsh', + expdatayishapi= '/expert/expert/expdatayish', } export function getDataListApi() { @@ -26,3 +33,28 @@ export function getDataListApiyc() { export function expdatanumberdiffect() { return defHttp.get({ url: Api.lyzjlist }); } +export function projectnumber() { + return defHttp.get({ url: Api.pronumber }); +} + +export function findprojectandnumber() { + return defHttp.get({ url: Api.findprojectandnumberapi }); +} + +export function expdatanumberycxj() { + return defHttp.get({ url: Api.expdatanumberycxjapi }); +} + +export function expdatanumberyccc() { + return defHttp.get({ url: Api.expdatanumberycccapi }); +} + +export function expdatanumberycqt() { + return defHttp.get({ url: Api.expdatanumberycqtapi }); +} +export function expdatawtjsh() { + return defHttp.get({ url: Api.expdatawtjshapi }); +} +export function expdatayish() { + return defHttp.get({ url: Api.expdatayishapi }); +} diff --git a/jeecgboot-vue3/src/views/dashboard/workbench/components/data.ts b/jeecgboot-vue3/src/views/dashboard/workbench/components/data.ts index 50a5756..0c7ec98 100644 --- a/jeecgboot-vue3/src/views/dashboard/workbench/components/data.ts +++ b/jeecgboot-vue3/src/views/dashboard/workbench/components/data.ts @@ -51,6 +51,16 @@ export const navItems: NavItem[] = [ icon: 'ion:bar-chart-outline', color: '#00d8ff', }, + { + title: '权限管理', + icon: 'ion:key-outline', + color: '#4daf1bc9', + }, + { + title: '图表', + icon: 'ion:bar-chart-outline', + color: '#00d8ff', + }, ]; export const dynamicInfoItems: DynamicInfoItem[] = [