mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
Merge branch 'dev0731'
This commit is contained in:
@@ -8,6 +8,7 @@ import com.xboe.system.organization.entity.Organization;
|
||||
/**
|
||||
* 调用旧系统的外部接口
|
||||
*/
|
||||
@Deprecated
|
||||
public interface IFwOrganizationService {
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.List;
|
||||
/**
|
||||
* 调用旧系统的外部接口
|
||||
*/
|
||||
@Deprecated
|
||||
public interface IFwUserService {
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.xboe.module.teacher.vo.TeacherVo;
|
||||
/**
|
||||
* 调用旧系统的外部接口
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ILnTeacherService {
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.xboe.externalinterface.system.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public interface IManagerRefService {
|
||||
|
||||
List<String> getCompanyIdsByUserId(String uid);
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -19,7 +20,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xboe.account.entity.Account;
|
||||
import com.xboe.common.PageList;
|
||||
import com.xboe.common.Pagination;
|
||||
import com.xboe.core.CurrentUser;
|
||||
@@ -28,7 +28,7 @@ import com.xboe.core.api.ApiBaseController;
|
||||
import com.xboe.core.log.AutoLog;
|
||||
import com.xboe.data.dto.UserOrgIds;
|
||||
import com.xboe.data.outside.IOutSideDataService;
|
||||
import com.xboe.externalinterface.system.service.IFwUserService;
|
||||
import com.xboe.data.service.IDataUserSyncService;
|
||||
import com.xboe.module.assistance.service.IEmailService;
|
||||
import com.xboe.module.course.dto.CourseExportDto;
|
||||
import com.xboe.module.course.dto.CourseFullDto;
|
||||
@@ -51,11 +51,9 @@ import com.xboe.module.course.service.ICourseTeacherService;
|
||||
import com.xboe.module.excel.ExportsExcelSenderUtil;
|
||||
import com.xboe.standard.enums.BoedxContentType;
|
||||
import com.xboe.standard.enums.BoedxCourseType;
|
||||
import com.xboe.system.organization.entity.Organization;
|
||||
import com.xboe.system.organization.service.IOrganizationService;
|
||||
import com.xboe.system.user.entity.User;
|
||||
import com.xboe.system.user.service.IUserService;
|
||||
import com.xboe.system.user.vo.UserVo;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -73,8 +71,9 @@ public class CourseManageApi extends ApiBaseController{
|
||||
@Resource
|
||||
private ICourseService courseService;
|
||||
|
||||
@Autowired
|
||||
IFwUserService fwUserService;
|
||||
@Autowired
|
||||
IOutSideDataService outsideService;
|
||||
|
||||
|
||||
@Resource
|
||||
IEmailService service;
|
||||
@@ -103,6 +102,9 @@ public class CourseManageApi extends ApiBaseController{
|
||||
@Resource
|
||||
IOutSideDataService outSideDataService;
|
||||
|
||||
@Autowired
|
||||
IDataUserSyncService userSyncService;
|
||||
|
||||
/**
|
||||
* 管理列表的查询
|
||||
* @param pager
|
||||
@@ -480,16 +482,18 @@ public class CourseManageApi extends ApiBaseController{
|
||||
}
|
||||
if(!isLocalDevelopment()) {
|
||||
if(StringUtils.isBlank(dto.getAuditUser().getAid())) {
|
||||
if(StringUtils.isBlank(dto.getAuditUser().getKid())) {
|
||||
return badRequest("HRBP审核信息人员错误");
|
||||
}
|
||||
// if(StringUtils.isBlank(dto.getAuditUser().getKid())) {
|
||||
// return badRequest("HRBP审核信息人员错误");
|
||||
// }
|
||||
//转化用户id
|
||||
User u = userService.getByUserNo(dto.getAuditUser().getCode());
|
||||
if(u==null) { //本地没有,需要同步
|
||||
if(u==null) { //本地没有,需要同步、
|
||||
//20230815 直接返回错误,这个时候传的用户,在新系统中没有,需要用户登录一下,或着用户中心推送
|
||||
return badRequest("无关联HRBP审核人员,请先同步用户");
|
||||
//Organization org = orgService.getBySysId(dto.getAuditUser().getOrgkid());
|
||||
UserVo fwUser = fwUserService.getById(dto.getAuditUser().getKid());
|
||||
Account a =userService.syncAccountUser(fwUser);
|
||||
dto.getAuditUser().setAid(a.getId());
|
||||
// UserVo fwUser = fwUserService.getById(dto.getAuditUser().getKid());
|
||||
// Account a =userService.syncAccountUser(fwUser);
|
||||
// dto.getAuditUser().setAid(a.getId());
|
||||
}else {
|
||||
dto.getAuditUser().setAid(u.getId());
|
||||
}
|
||||
@@ -566,7 +570,7 @@ public class CourseManageApi extends ApiBaseController{
|
||||
}
|
||||
|
||||
@PostMapping("/sumbits")
|
||||
public JsonResponse<Boolean> sumbitId(CourseHRBPAudit audit,String ucode,String ukid,String email,String orgName){
|
||||
public JsonResponse<Boolean> sumbitId(HttpServletRequest request,CourseHRBPAudit audit,String ucode,String ukid,String email,String orgName){
|
||||
if(StringUtils.isBlank(audit.getCourseId())){
|
||||
return badRequest("参数错误");
|
||||
}
|
||||
@@ -596,16 +600,31 @@ public class CourseManageApi extends ApiBaseController{
|
||||
|
||||
if(!isLocalDevelopment()) {
|
||||
if(StringUtils.isBlank(audit.getAid())) {
|
||||
if(StringUtils.isBlank(ukid)){
|
||||
return badRequest("未关联HRBP审核人员");
|
||||
}
|
||||
|
||||
// if(StringUtils.isBlank(ukid)){
|
||||
// return badRequest("未关联HRBP审核人员");
|
||||
// }
|
||||
//转化用户id
|
||||
User u = userService.getByUserNo(ucode);
|
||||
if(u==null) { //本地没有,需要同步
|
||||
return badRequest("无关联HRBP审核人员,请先同步用户");
|
||||
//Organization org = orgService.getBySysId(dto.getAuditUser().getOrgkid());
|
||||
UserVo fwUser = fwUserService.getById(ukid);
|
||||
Account a =userService.syncAccountUser(fwUser);
|
||||
audit.setAid(a.getId());
|
||||
//20230815 已经不再使用直接查老系统,采用接口同步的方式
|
||||
// UserVo fwUser = fwUserService.getById(ukid);
|
||||
// Account a =userService.syncAccountUser(fwUser);
|
||||
// audit.setAid(a.getId());
|
||||
// String token = TokenProxy.getBoeToken(request);
|
||||
// UserData udata=outsideService.getUserInfoByToken(token);
|
||||
// if(udata==null) {
|
||||
// log.error("未获取当前登录人的用户信息");
|
||||
// return wrap(JsonResponseStatus.TOKEN_NOPASS, "用户信息查询失败");
|
||||
// }
|
||||
// //检查本地是否存在,如果存在就更新,不存在就添加
|
||||
// try {
|
||||
// userSyncService.syncUserFull(udata);
|
||||
// }catch(Exception exp) {
|
||||
// log.error("登录同步用户错误",exp);
|
||||
// }
|
||||
}else {
|
||||
audit.setAid(u.getId());
|
||||
}
|
||||
|
||||
@@ -60,8 +60,13 @@ public class ExamQuestionApi extends ApiBaseController {
|
||||
@PostMapping("/page")
|
||||
public JsonResponse<PageList<ExamQuestion>> page(Pagination pager,
|
||||
ExamQuestion examQuestion,String orderField,Boolean orderAsc) {
|
||||
PageList<ExamQuestion> list = service.query(pager.getPageIndex(), pager.getPageSize(), examQuestion,orderField,orderAsc);
|
||||
return success(list);
|
||||
try {
|
||||
PageList<ExamQuestion> list = service.query(pager.getPageIndex(), pager.getPageSize(), examQuestion,orderField,orderAsc);
|
||||
return success(list);
|
||||
}catch(Exception e) {
|
||||
log.error("分页查询试题错误",e);
|
||||
return error("查询试题错误",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -101,10 +101,10 @@ public class TeacherServiceImpl implements ITeacherService {
|
||||
@Override
|
||||
public List<Teacher> findByName(String name) {
|
||||
String hql="Select t.id,t.name,u.userNo from "+Teacher.class.getSimpleName()+" t,"+User.class.getSimpleName()+" u ";
|
||||
hql+=" where t.id=u.id and t.name like '%"+name+"%'";
|
||||
hql+=" where t.id=u.id and (t.name like '%"+name+"%' or u.userNo=?1)";
|
||||
List<Teacher> teachers=new ArrayList<Teacher>();
|
||||
try {
|
||||
List<Object[]> list =dao.findListFields(hql);
|
||||
List<Object[]> list =dao.findListFields(hql,name);
|
||||
for(Object[] objs :list) {
|
||||
Teacher t=new Teacher();
|
||||
t.setId((String)objs[0]);
|
||||
|
||||
Reference in New Issue
Block a user