身份证号查询信息
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
|
||||||
import com.cool.store.request.TempUserDetailRequest;
|
import com.cool.store.request.TempUserDetailRequest;
|
||||||
import com.cool.store.vo.TempUserDetailInfoVO;
|
import com.cool.store.vo.TempUserDetailInfoVO;
|
||||||
import com.cool.store.vo.TempUserDetailListVO;
|
import com.cool.store.vo.TempUserDetailListVO;
|
||||||
@@ -19,4 +20,6 @@ public interface TempUserDetailService {
|
|||||||
|
|
||||||
|
|
||||||
TempUserDetailInfoVO getUserInfoByIdUserDetailId(Long id);
|
TempUserDetailInfoVO getUserInfoByIdUserDetailId(Long id);
|
||||||
|
|
||||||
|
StaffBaseInfoDTO getUserInfoByIdCard(String idCard);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ public interface XfsgEhrService {
|
|||||||
*/
|
*/
|
||||||
FranchiseeInfoDTO getFranchiseeInfoByFrId(String frId);
|
FranchiseeInfoDTO getFranchiseeInfoByFrId(String frId);
|
||||||
|
|
||||||
StaffBaseInfoDTO getUserInfoByIdCard(String idCard);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,23 +3,28 @@ package com.cool.store.service.impl;
|
|||||||
import com.cool.store.dao.EnterpriseUserDAO;
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
import com.cool.store.dao.ShopInfoDAO;
|
import com.cool.store.dao.ShopInfoDAO;
|
||||||
import com.cool.store.dao.TempUserDetailDAO;
|
import com.cool.store.dao.TempUserDetailDAO;
|
||||||
|
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
|
||||||
import com.cool.store.entity.EnterpriseUserDO;
|
import com.cool.store.entity.EnterpriseUserDO;
|
||||||
import com.cool.store.entity.ShopInfoDO;
|
import com.cool.store.entity.ShopInfoDO;
|
||||||
import com.cool.store.entity.TempUserDetailDO;
|
import com.cool.store.entity.TempUserDetailDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.TempUserDetailRequest;
|
import com.cool.store.request.TempUserDetailRequest;
|
||||||
import com.cool.store.service.TempUserDetailService;
|
import com.cool.store.service.TempUserDetailService;
|
||||||
|
import com.cool.store.service.XfsgEhrService;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.vo.TempUserDetailInfoVO;
|
import com.cool.store.vo.TempUserDetailInfoVO;
|
||||||
import com.cool.store.vo.TempUserDetailListVO;
|
import com.cool.store.vo.TempUserDetailListVO;
|
||||||
import com.cool.store.vo.TempUserDetailVO;
|
import com.cool.store.vo.TempUserDetailVO;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author byd
|
* @author byd
|
||||||
@@ -37,6 +42,9 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
|||||||
@Resource
|
@Resource
|
||||||
private EnterpriseUserDAO enterpriseUserDAO;
|
private EnterpriseUserDAO enterpriseUserDAO;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private XfsgEhrService xfsgEhrService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TempUserDetailListVO userList(Long shopId) {
|
public TempUserDetailListVO userList(Long shopId) {
|
||||||
List<TempUserDetailDO> tempUserDetailDOList = tempUserDetailDAO.userList(shopId);
|
List<TempUserDetailDO> tempUserDetailDOList = tempUserDetailDAO.userList(shopId);
|
||||||
@@ -128,4 +136,19 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
|||||||
return tempUserDetailInfoVO;
|
return tempUserDetailInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StaffBaseInfoDTO getUserInfoByIdCard(String idCard) {
|
||||||
|
if (StringUtil.isBlank(idCard)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
|
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.getUserInfoByThirdOaUniqueFlag(idCard);
|
||||||
|
if(Objects.isNull(enterpriseUserDO)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.USER_NOT_EXIST);
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(enterpriseUserDO.getJobnumber())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.JOBNUMBER_NOT_EXIST);
|
||||||
|
}
|
||||||
|
return xfsgEhrService.getUserInfoByCode(enterpriseUserDO.getJobnumber());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,21 +83,6 @@ public class XfsgEhrServiceImpl implements XfsgEhrService {
|
|||||||
return franchiseeInfoDTO;
|
return franchiseeInfoDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public StaffBaseInfoDTO getUserInfoByIdCard(String idCard) {
|
|
||||||
if (StringUtil.isBlank(idCard)) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
|
||||||
}
|
|
||||||
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.getUserInfoByThirdOaUniqueFlag(idCard);
|
|
||||||
if(Objects.isNull(enterpriseUserDO)){
|
|
||||||
throw new ServiceException(ErrorCodeEnum.USER_NOT_EXIST);
|
|
||||||
}
|
|
||||||
if (StringUtil.isBlank(enterpriseUserDO.getJobnumber())) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.JOBNUMBER_NOT_EXIST);
|
|
||||||
}
|
|
||||||
return this.getUserInfoByCode(enterpriseUserDO.getJobnumber());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
||||||
long timestamp = System.currentTimeMillis();
|
long timestamp = System.currentTimeMillis();
|
||||||
String signature = SecureUtil.getSignature(timestamp);
|
String signature = SecureUtil.getSignature(timestamp);
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ public class TempUserDetailController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private TempUserDetailService tempUserDetailService;
|
private TempUserDetailService tempUserDetailService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private XfsgEhrService xfsgEhrService;
|
|
||||||
|
|
||||||
@GetMapping(path = "/getUserList")
|
@GetMapping(path = "/getUserList")
|
||||||
@ApiOperation("登记员工列表")
|
@ApiOperation("登记员工列表")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@@ -46,7 +43,7 @@ public class TempUserDetailController {
|
|||||||
})
|
})
|
||||||
@ApiOperation("培训登记-身份证号查询信息")
|
@ApiOperation("培训登记-身份证号查询信息")
|
||||||
public ResponseResult<StaffBaseInfoDTO> getUserInfoByIdCard(@RequestParam(value = "idCard") String idCard) {
|
public ResponseResult<StaffBaseInfoDTO> getUserInfoByIdCard(@RequestParam(value = "idCard") String idCard) {
|
||||||
return ResponseResult.success(xfsgEhrService.getUserInfoByIdCard((idCard)));
|
return ResponseResult.success(tempUserDetailService.getUserInfoByIdCard((idCard)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/addTempUserDetail")
|
@PostMapping(path = "/addTempUserDetail")
|
||||||
|
|||||||
@@ -32,12 +32,6 @@ public class TrainingRegistController {
|
|||||||
return ResponseResult.success(xfsgEhrService.getUserInfoByCode(staffNumber));
|
return ResponseResult.success(xfsgEhrService.getUserInfoByCode(staffNumber));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("根据身份证号获取人员主数据")
|
|
||||||
@GetMapping("/getUserInfoByIdCard")
|
|
||||||
public ResponseResult<StaffBaseInfoDTO> getUserInfoByIdCard(@RequestParam("idCard") String idCard) {
|
|
||||||
return ResponseResult.success(xfsgEhrService.getUserInfoByIdCard(idCard));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("根据加盟商编码查询加盟商信息")
|
@ApiOperation("根据加盟商编码查询加盟商信息")
|
||||||
@GetMapping("/getFranchiseeInfoByFrId")
|
@GetMapping("/getFranchiseeInfoByFrId")
|
||||||
public ResponseResult<FranchiseeInfoDTO> getFranchiseeInfoByFrId(@RequestParam("frId") String frId) {
|
public ResponseResult<FranchiseeInfoDTO> getFranchiseeInfoByFrId(@RequestParam("frId") String frId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user