喻忠伟 4 months ago
parent 5d15242106
commit 497dde726d
  1. 41
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotop/controller/AnnComGroTopController.java
  2. 6
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java
  3. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java

@ -1,9 +1,6 @@
package org.jeecg.modules.demo.anncomgrotop.controller;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@ -115,20 +112,30 @@ public class AnnComGroTopController extends JeecgController<AnnComGroTop, IAnnCo
QueryWrapper<Expert> queryWrapperep = QueryGenerator.initQueryWrapper(expert, req.getParameterMap());
queryWrapperep.eq("user_id",sysUser.getId());
List<Expert> listep = expertService.list(queryWrapperep);
List<ExpGroup> listeg=new ArrayList<>();
if(listep.size()>0)
{
ExpGroup expGroup = new ExpGroup();
QueryWrapper<ExpGroup> queryWrappereg = QueryGenerator.initQueryWrapper(expGroup, req.getParameterMap());
queryWrappereg.eq("grouid",listep.get(0).getId());
listeg = expGroupService.list(queryWrappereg);
}
if(listeg.size()>0)
{
AnnualCompGroup annualCompGroup = annualCompGroupService.getById(listeg.get(0).getAnnCompGroupid());
QueryWrapper<AnnComGroTop> queryWrapper = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap());
queryWrapper.eq("ann_com_p_g",listeg.get(0).getAnnCompGroupid());
queryWrapper.eq("annid",annualCompGroup.getAnnal());
queryWrapper.eq("ann_com_p",annualCompGroup.getAnnCompP());
Page<AnnComGroTop> page = new Page<AnnComGroTop>(pageNo, pageSize);
IPage<AnnComGroTop> pageList = annComGroTopService.page(page, queryWrapper);
return Result.OK(pageList);
}else
{
return Result.OK(null);
}
ExpGroup expGroup = new ExpGroup();
QueryWrapper<ExpGroup> queryWrappereg = QueryGenerator.initQueryWrapper(expGroup, req.getParameterMap());
queryWrappereg.eq("grouid",listep.get(0).getId());
List<ExpGroup> listeg = expGroupService.list(queryWrappereg);
AnnualCompGroup annualCompGroup = annualCompGroupService.getById(listeg.get(0).getAnnCompGroupid());
QueryWrapper<AnnComGroTop> queryWrapper = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap());
queryWrapper.eq("ann_com_p_g",listeg.get(0).getAnnCompGroupid());
queryWrapper.eq("annid",annualCompGroup.getAnnal());
queryWrapper.eq("ann_com_p",annualCompGroup.getAnnCompP());
Page<AnnComGroTop> page = new Page<AnnComGroTop>(pageNo, pageSize);
IPage<AnnComGroTop> pageList = annComGroTopService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**

@ -327,7 +327,7 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
//获取租户ids
String relTenantIds = jsonObject.getString("relTenantIds");
sysUserService.saveUser(user, selectedRoles, selectedDeparts, relTenantIds);
baseCommonService.addLog("添加用户,username: " +user.getUsername() ,CommonConstant.LOG_TYPE_2, 2);
baseCommonService.addLog("添加专家用户,username: " +user.getUsername() ,CommonConstant.LOG_TYPE_2, 2);
Expert expert = new Expert();
expert.setUserId(user.getId());
expert.setExpImg(user.getAvatar());
@ -339,8 +339,8 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
expert.setExpZc(expZc);//职称
expert.setExpYjfx(expYjfx);//研究方向
expert.setExpCsgz(expCsgz);//从事工作
/* expertService.save(expert);
expertService.save(expert);
/*
CompExp compExp = new CompExp();
compExp.setCompid(compid);
compExp.setCompName(compName);

@ -49,9 +49,7 @@ public class ExpertServiceImpl extends ServiceImpl<ExpertMapper, Expert> impleme
if(oConvertUtils.isNotEmpty(compid)&&oConvertUtils.isNotEmpty(compName)){
compNames = compName.split(",");
compids = compid.split(",");
stats = stat.split(",");
}
stat=stats[0];
//根据user id查询专家
LambdaQueryWrapper<Expert> query = new LambdaQueryWrapper<Expert>()
.like(Expert::getUserId, user_id);

Loading…
Cancel
Save