|
|
|
@ -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<Expert, IExpertService> { |
|
|
|
|
private ISysDepartService sysDepartService; |
|
|
|
|
@Autowired |
|
|
|
|
private IDisciplineFieidService disciplineFieidService; |
|
|
|
|
@Autowired |
|
|
|
|
private IExpprojectService expprojectService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private IExpandproService expandproService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
@ -88,6 +99,7 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
//用于查看所有信息无论是否审核,无论哪个部门
|
|
|
|
|
QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); |
|
|
|
|
queryWrapper.eq("isdone","Y"); |
|
|
|
|
Page<Expert> page = new Page<Expert>(pageNo, pageSize); |
|
|
|
|
IPage<Expert> pageList = expertService.page(page, queryWrapper); |
|
|
|
|
pageList.getRecords().forEach(experttemp -> { |
|
|
|
@ -109,6 +121,38 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value="专家管理-分页列表查询/管理员角色", notes="专家管理-分页列表查询/管理员角色") |
|
|
|
|
@GetMapping(value = "/listadminstatic") |
|
|
|
|
public Result<IPage<Expert>> listadminstatic(Expert expert, |
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
//用于查看所有信息无论是否审核,无论哪个部门
|
|
|
|
|
QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); |
|
|
|
|
queryWrapper.eq("isdone","Y"); |
|
|
|
|
queryWrapper.eq("adminopen","2"); |
|
|
|
|
queryWrapper.eq("compopen","2"); |
|
|
|
|
Page<Expert> page = new Page<Expert>(pageNo, pageSize); |
|
|
|
|
IPage<Expert> pageList = expertService.page(page, queryWrapper); |
|
|
|
|
pageList.getRecords().forEach(experttemp -> { |
|
|
|
|
//开始用于修改数据
|
|
|
|
|
SysUser sysUser = sysUserService.query().eq("username",experttemp.getSeusername()).one(); |
|
|
|
|
String depid = expertService.getdeps(sysUser.getId()); |
|
|
|
|
SysDepart sysDepart = sysDepartService.getById(depid); |
|
|
|
|
experttemp.setRealname(sysUser.getRealname()); |
|
|
|
|
experttemp.setWorkon(sysUser.getWorkNo()); |
|
|
|
|
experttemp.setSex(sysUser.getSex()); |
|
|
|
|
experttemp.setTopPic(sysUser.getAvatar()); |
|
|
|
|
experttemp.setPhone(sysUser.getPhone()); |
|
|
|
|
experttemp.setEmails(sysUser.getEmail()); |
|
|
|
|
experttemp.setSsdep(sysDepart.getDepartName()); |
|
|
|
|
experttemp.setPsd(sysUser.getPassword()); |
|
|
|
|
experttemp.setSepsd(sysUser.getPassword()); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value="专家管理-分页列表查询/县区管理员角色", notes="专家管理-分页列表查询/县区管理员角色") |
|
|
|
|
@GetMapping(value = "/listcounty") |
|
|
|
|
public Result<IPage<Expert>> listcounty(Expert expert, |
|
|
|
@ -138,6 +182,7 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
|
|
|
|
|
|
//用于查看本县区下面的专家信息无论是否审核,无论哪个部门
|
|
|
|
|
QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); |
|
|
|
|
queryWrapper.eq("isdone","Y"); |
|
|
|
|
queryWrapper.in("seusername",usernames); |
|
|
|
|
Page<Expert> page = new Page<Expert>(pageNo, pageSize); |
|
|
|
|
IPage<Expert> pageList = expertService.page(page, queryWrapper); |
|
|
|
@ -687,6 +732,8 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
|
user.setDelFlag(CommonConstant.DEL_FLAG_0); |
|
|
|
|
sysUserService.saveUser(user, "1843478958968647681", ssdep, ""); |
|
|
|
|
Expert expert = new Expert(); |
|
|
|
|
expert.setAdminopen("1"); |
|
|
|
|
expert.setCompopen("1"); |
|
|
|
|
expert.setSeusername(username); |
|
|
|
|
expertService.save(expert); |
|
|
|
|
return Result.OK("注册成功"); |
|
|
|
@ -764,6 +811,40 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
|
List<Expert> 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<Integer> expdatanumberycxj() { |
|
|
|
|
List<Expert> 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<Integer> expdatanumberyccc() { |
|
|
|
|
List<Expert> 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<Integer> expdatanumberycqt() { |
|
|
|
|
List<Expert> 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<Integer> expdatawtjsh() { |
|
|
|
|
List<Expert> 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<Integer> expdatayish() { |
|
|
|
|
List<Expert> 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 +861,38 @@ public class ExpertController extends JeecgController<Expert, IExpertService> { |
|
|
|
|
return Result.OK(expdefVoList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//统计项目的总个数
|
|
|
|
|
@ApiOperation(value="管理员专家数据---查询项目个数", notes="管理员专家数据---查询项目个数") |
|
|
|
|
@GetMapping(value = "/projectnumber") |
|
|
|
|
public Result<?> projectnumber() { |
|
|
|
|
List<Expproject> expprojectList = expprojectService.list(); |
|
|
|
|
return Result.OK(expprojectList.size()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value="管理员专家数据---查询项目和项目需要的专家", notes="管理员专家数据---查询项目和项目需要的专家") |
|
|
|
|
@GetMapping(value = "/findprojectandnumber") |
|
|
|
|
public Result<List<ExpproVo>> findprojectandnumber() { |
|
|
|
|
List<ExpproVo> expproVos =new ArrayList<>(); |
|
|
|
|
List<Expproject> 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<Expandpro> 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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|