河南机电职业学院-首页数据统计优化

main
zhc077 4 months ago
parent cf4d45aeb6
commit e0b0e4c586
  1. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java
  2. 13
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java

@ -37,8 +37,8 @@ public class UserHomePageController {
@ApiOperation(value = "河南机电-部门首页", notes = "河南机电-部门首页")
@GetMapping(value = "/depart")
public Result depart(String departId) {
Map<String, Object> result = homePageService.homePage4Depart(departId);
public Result depart(String orgCode) {
Map<String, Object> result = homePageService.homePage4Depart(orgCode);
return Result.ok(result);
}
}

@ -2,12 +2,11 @@ package org.jeecg.modules.demo.homepage.service;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.util.ComputeUtils;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.demo.abilityEvaluation.entity.DepartAbilityEvaluation;
import org.jeecg.modules.demo.abilityEvaluation.service.IDepartAbilityEvaluationService;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationCollectService;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService;
import org.jeecg.modules.demo.annual.entity.Annual;
import org.jeecg.modules.demo.annual.service.IAnnualService;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
@ -21,7 +20,6 @@ import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.ITeamManagementService;
import org.jeecg.modules.demo.comp.entity.Comp;
import org.jeecg.modules.demo.comp.service.ICompService;
import org.jeecg.modules.demo.homepage.vo.HomePageCompVo;
@ -101,9 +99,14 @@ public class UserHomePageServiceImpl implements UserHomePageService {
@Override
public Map<String, Object> homePage4Depart(String departId) {
public Map<String, Object> homePage4Depart(String orgCode) {
Assert.notNull(departId, "部门id不能为空");
Assert.notNull(orgCode, "部门编号不能为空");
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, orgCode));
if (ObjectUtil.isNull(sysDepart)) {
throw new JeecgBootException("部门不存在");
}
String departId = sysDepart.getId();
Map<String, Object> resultMap = new LinkedHashMap<>();
int currentYear = DateUtils.getCurrentYear();
//当前年度

Loading…
Cancel
Save