Commit cff2366e authored by hongguangwu's avatar hongguangwu

档案,获取社保,公积金

parent 5f253ce2
...@@ -18,7 +18,10 @@ ...@@ -18,7 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.social.controller; package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
...@@ -26,11 +29,9 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund; ...@@ -26,11 +29,9 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund;
import com.yifu.cloud.plus.v1.yifu.social.service.TProvidentFundService; import com.yifu.cloud.plus.v1.yifu.social.service.TProvidentFundService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TProvidentFundSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TProvidentFundSearchVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -154,4 +155,30 @@ public class TProvidentFundController { ...@@ -154,4 +155,30 @@ public class TProvidentFundController {
public void export(HttpServletResponse response, @RequestBody TProvidentFundSearchVo searchVo) { public void export(HttpServletResponse response, @RequestBody TProvidentFundSearchVo searchVo) {
tProvidentFundService.listExport(response,searchVo); tProvidentFundService.listExport(response,searchVo);
} }
/**
* @Description: 获取公积金,根据身份证与项目ID
* @Author: hgw
* @Date: 2022/8/1 11:27
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund>
**/
@Operation(summary = "获取公积金,根据身份证与项目ID", description = "获取公积金,根据身份证与项目ID")
@GetMapping("/getFundByIdCardAndDeptId" )
public R<TProvidentFund> getSocialByIdCardAndDeptId(@RequestParam String idCard
, @RequestParam(required = false) String deptId) {
TProvidentFund fund;
if (Common.isNotNull(deptId)) {
fund = tProvidentFundService.getOne(Wrappers.<TProvidentFund>query().lambda()
.eq(TProvidentFund::getEmpIdcard, idCard)
.eq(TProvidentFund::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TProvidentFund::getSettleDomain, deptId)
.orderByDesc(TProvidentFund::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
} else {
fund = tProvidentFundService.getOne(Wrappers.<TProvidentFund>query().lambda()
.eq(TProvidentFund::getEmpIdcard, idCard)
.eq(TProvidentFund::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.orderByDesc(TProvidentFund::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
}
return R.ok(fund);
}
} }
...@@ -18,7 +18,10 @@ ...@@ -18,7 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.social.controller; package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
...@@ -26,11 +29,9 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo; ...@@ -26,11 +29,9 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService; import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -154,4 +155,30 @@ public class TSocialInfoController { ...@@ -154,4 +155,30 @@ public class TSocialInfoController {
public void export(HttpServletResponse response, @RequestBody TSocialInfoSearchVo searchVo) { public void export(HttpServletResponse response, @RequestBody TSocialInfoSearchVo searchVo) {
tSocialInfoService.listExport(response,searchVo); tSocialInfoService.listExport(response,searchVo);
} }
/**
* @Description: 获取社保,根据身份证与项目ID
* @Author: hgw
* @Date: 2022/8/1 11:27
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo>
**/
@Operation(summary = "获取社保,根据身份证与项目ID", description = "获取社保,根据身份证与项目ID")
@GetMapping("/getSocialByIdCardAndDeptId" )
public R<TSocialInfo> getSocialByIdCardAndDeptId(@RequestParam String idCard
, @RequestParam(required = false) String deptId) {
TSocialInfo socialInfo;
if (Common.isNotNull(deptId)) {
socialInfo = tSocialInfoService.getOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, idCard)
.eq(TSocialInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSocialInfo::getSettleDomain, deptId)
.orderByDesc(TSocialInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
} else {
socialInfo = tSocialInfoService.getOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, idCard)
.eq(TSocialInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.orderByDesc(TSocialInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
}
return R.ok(socialInfo);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment