Commit 7e937f12 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.5' into MVP1.7.5

parents 0766b8bb df924c09
......@@ -527,6 +527,22 @@ public class TSettleDomain extends BaseEntity {
@Schema(description = "二级指标归属", name = "secondIndicatorBelong")
private String secondIndicatorBelong ;
/**
* 是否含险金 fxj 2025-01-10 v1.7.5
*/
@Schema(description = "是否含险金",name = "hasContainRisks")
private String hasContainRisks;
/**
* 事业部条线 fxj 2025-01-10 v1.7.5
*/
@Schema(description = "事业部条线",name = "newLine")
private String newLine ;
/**
* 事业部 fxj 2025-01-10 v1.7.5
*/
@Schema(description = "事业部",name = "division")
private String division ;
/**
* 代发户状态(0否;1是代发户)
*/
......
......@@ -447,4 +447,20 @@ public class TSettleDomainEkpVo implements Serializable {
@Schema(description = "二级指标归属",name = "secondIndicatorBelong")
private String secondIndicatorBelong ;
/**
* 是否含险金
*/
@Schema(description = "是否含险金",name = "hasContainRisks")
private String hasContainRisks;
/**
* 事业部条线
*/
@Schema(description = "事业部条线",name = "newLine")
private String newLine ;
/**
* 事业部
*/
@Schema(description = "事业部",name = "division")
private String division ;
}
......@@ -94,6 +94,12 @@
<result property="firstIndicatorBelong" column="FIRST_INDICATOR_BELONG"/>
<result property="secondIndicatorBelong" column="SECOND_INDICATOR_BELONG"/>
<result property="lineType" column="LINE_TYPE"/>
<!-- 2025-01-10 FXJ V1.7.5 -->
<result property="hasContainRisks" column="HAS_CONTAIN_RISKS"/>
<result property="newLine" column="NEW_LINE"/>
<result property="division" column="DIVISION"/>
<result property="issueStatus" column="ISSUE_STATUS"/>
</resultMap>
......@@ -178,7 +184,10 @@
a.ISSUE_STATUS,
a.FIRST_INDICATOR_BELONG,
a.SECOND_INDICATOR_BELONG,
a.LINE_TYPE
a.LINE_TYPE,
a.HAS_CONTAIN_RISKS,
a.NEW_LINE,
a.DIVISION
</sql>
<resultMap id="tSettleDomainSelectVoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo">
......@@ -209,6 +218,11 @@
<result property="commitUserName" column="COMMIT_USER_NAME"/>
<result property="stopFlag" column="STOP_FLAG"/>
<result property="bpoFlag" column="BPO_FLAG"/>
<!-- 2025-01-10 FXJ V1.7.5 -->
<result property="hasContainRisks" column="HAS_CONTAIN_RISKS"/>
<result property="newLine" column="NEW_LINE"/>
<result property="division" column="DIVISION"/>
</resultMap>
<select id="getPage" resultMap="tSettleDomainMap">
......@@ -217,6 +231,15 @@
FROM t_settle_domain a
WHERE 1=1
<if test="tSettleDomain != null">
<if test="tSettleDomain.hasContainRisks != null and tSettleDomain.hasContainRisks.trim() != ''">
and a.HAS_CONTAIN_RISKS = #{tSettleDomain.hasContainRisks}
</if>
<if test="tSettleDomain.newLine != null and tSettleDomain.newLine.trim() != ''">
and a.NEW_LINE = #{tSettleDomain.newLine}
</if>
<if test="tSettleDomain.division != null and tSettleDomain.division.trim() != ''">
and a.DIVISION = #{tSettleDomain.division}
</if>
<if test="tSettleDomain.departName != null and tSettleDomain.departName.trim() != ''">
and a.DEPART_NAME like concat('%', #{tSettleDomain.departName} ,'%')
</if>
......
......@@ -18,8 +18,10 @@ package com.yifu.cloud.plus.v1.yifu.auth.config;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yifu.cloud.plus.v1.yifu.auth.filter.PasswordDecoderFilter;
import com.yifu.cloud.plus.v1.yifu.auth.filter.WxLoginAuthenticationFilter;
import com.yifu.cloud.plus.v1.yifu.auth.handler.YifuAuthenticationFailureHandlerImpl;
import com.yifu.cloud.plus.v1.yifu.auth.handler.YifuClientLoginSuccessHandler;
import com.yifu.cloud.plus.v1.yifu.auth.handler.YifuWxLoginSuccessHandler;
import com.yifu.cloud.plus.v1.yifu.common.security.component.CasAuthenticationProvider;
import com.yifu.cloud.plus.v1.yifu.common.security.component.WxAuthenticationProvider;
import com.yifu.cloud.plus.v1.yifu.common.security.component.YifuDaoAuthenticationProvider;
......@@ -88,7 +90,7 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
.failureHandler(authenticationFailureHandler()).and().logout()
.logoutSuccessHandler(logoutSuccessHandler()).deleteCookies("JSESSIONID").invalidateHttpSession(true)
.and()
.authorizeRequests().antMatchers("/**/login","/token/**", "/actuator/**", "/mobile/**", "/oauth/token","/weixin/callback","/oauth/wxLogin").permitAll()
.authorizeRequests().antMatchers("/**/login","/token/**", "/actuator/**", "/mobile/**", "/oauth/token","/weixin/callback","/oauth/**", "/wxLogin").permitAll()
.anyRequest().authenticated().and().csrf().disable();
}
......@@ -186,11 +188,38 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
return filter;
}
/**
* @param
* @Author: fxj
* @Date: 2025-01-10
* @Description: 微信登录
**/
@Bean
public WxLoginAuthenticationFilter wxLoginAuthenticationFilter() {
WxLoginAuthenticationFilter filter = new WxLoginAuthenticationFilter();
try {
filter.setAuthenticationManager(this.authenticationManagerBean());
} catch (Exception e) {
log.error("WebSecurityConfigurer>>>>",e);
}
filter.setAuthenticationSuccessHandler(authenticationSuccessHandler());
filter.setAuthenticationFailureHandler(yifuAuthenticationFailureHandler());
return filter;
}
private AuthenticationFailureHandler yifuAuthenticationFailureHandler() {
return YifuAuthenticationFailureHandlerImpl.builder()
.objectMapper(objectMapper).build();
}
private AuthenticationSuccessHandler authenticationSuccessHandler() {
return YifuWxLoginSuccessHandler.builder()
.objectMapper(objectMapper)
.clientDetailsService(clientDetailsService)
.passwordEncoder(passwordEncoder())
.cacheManager(cacheManager)
.tokenStore(tokenStore)
.defaultAuthorizationServerTokenServices(defaultAuthorizationServerTokenServices).build();
}
private AuthenticationSuccessHandler yifuClientLoginSuccessHandler() {
return YifuClientLoginSuccessHandler.builder()
.objectMapper(objectMapper)
......
......@@ -32,7 +32,7 @@ public class WxLoginAuthenticationFilter extends AbstractAuthenticationProcessin
private static final String SPRING_SECURITY_RESTFUL_LOGIN_URL = "/oauth/wxLogin";
private boolean postOnly = true;
private boolean postOnly = false;
private RestTemplate restTemplate = new RestTemplate();
......@@ -41,7 +41,7 @@ public class WxLoginAuthenticationFilter extends AbstractAuthenticationProcessin
private WxConfig wxConfig;
public WxLoginAuthenticationFilter() {
super(new AntPathRequestMatcher(SPRING_SECURITY_RESTFUL_LOGIN_URL, "POST"));
super(new AntPathRequestMatcher(SPRING_SECURITY_RESTFUL_LOGIN_URL, "GET"));
}
/**
*
......@@ -54,7 +54,7 @@ public class WxLoginAuthenticationFilter extends AbstractAuthenticationProcessin
@Override
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {
if (postOnly && !request.getMethod().equals("POST")) {
if (!postOnly && !request.getMethod().equals("GET")) {
throw new AuthenticationServiceException(
"Authentication method not supported: " + request.getMethod());
}
......@@ -128,7 +128,7 @@ public class WxLoginAuthenticationFilter extends AbstractAuthenticationProcessin
if (Common.isEmpty(UserId)) {
throw new AuthenticationServiceException("微信用户匹配失败");
}
//log.info("获取企业微信用户====UserId={}", UserId);
log.info("获取企业微信用户====UserId={}", UserId);
String principal;
String credentials = null;
String wxUserId = UserId; //企业微信账号
......
package com.yifu.cloud.plus.v1.yifu.auth.handler;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.CharsetUtil;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yifu.cloud.plus.v1.yifu.auth.constants.SecurityConstants;
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.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.WebUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.exception.InvalidException;
import com.yifu.cloud.plus.v1.yifu.common.security.util.AuthUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.vo.UserAndToke;
import lombok.Builder;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.MarkerFactory;
import org.springframework.cache.CacheManager;
import org.springframework.http.HttpHeaders;
import org.springframework.security.core.Authentication;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.common.exceptions.InvalidClientException;
import org.springframework.security.oauth2.provider.*;
import org.springframework.security.oauth2.provider.request.DefaultOAuth2RequestValidator;
import org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
/**
* @author fxj * @date 2022年05月30日 14:55 @description
*/
@Slf4j
@Builder
public class YifuWxLoginSuccessHandler implements AuthenticationSuccessHandler {
private ObjectMapper objectMapper;
private PasswordEncoder passwordEncoder;
private ClientDetailsService clientDetailsService;
private AuthorizationServerTokenServices defaultAuthorizationServerTokenServices;
private TokenStore tokenStore;
private final CacheManager cacheManager;
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
/*String header = request.getHeader(SecurityConstants.CLIENT_HEADER_KEY_NEW);
if(Common.isEmpty(header)){
header = request.getHeader(SecurityConstants.CLIENT_HEADER_KEY);
//兼容老逻辑
if(Common.isEmpty(header)){
header = request.getHeader(HttpHeaders.AUTHORIZATION);
}
}*/
YifuUser user = null;
try {
user = (YifuUser)authentication.getPrincipal();
/*if (header == null) {
throw new InvalidClientException("请求头中client信息为空");
}
String[] tokens = AuthUtils.extractAndDecodeHeader(header);
assert tokens.length == 2;
String clientId = tokens[0];
ClientDetails clientDetails = clientDetailsService.loadClientByClientId(clientId);
//校验secret
if (!passwordEncoder.matches(tokens[1], clientDetails.getClientSecret())) {
throw new InvalidClientException("请求头中client信息验证异常");
}*/
//TokenRequest tokenRequest = new TokenRequest(MapUtil.newHashMap(), clientId, clientDetails.getScope(), "password");
Collection<String> scope = new ArrayList<>();
scope.add("server");
TokenRequest tokenRequest = new TokenRequest(MapUtil.newHashMap(), "auth",scope, "password");
//校验scope
ClientDetails clientDetails = clientDetailsService.loadClientByClientId(null);
new DefaultOAuth2RequestValidator().validateScope(tokenRequest, clientDetails);
OAuth2Request oAuth2Request = tokenRequest.createOAuth2Request(clientDetails);
OAuth2Authentication oAuth2Authentication = new OAuth2Authentication(oAuth2Request, authentication);
OAuth2AccessToken oAuth2AccessToken = null;
oAuth2AccessToken = defaultAuthorizationServerTokenServices.getAccessToken(oAuth2Authentication);
if(null == oAuth2AccessToken){
oAuth2AccessToken = defaultAuthorizationServerTokenServices.createAccessToken(oAuth2Authentication);
}else{
Map<String, Object> additionalInformation = clientDetails.getAdditionalInformation();
if(null != additionalInformation && null != additionalInformation.get(SecurityConstants.MUTUALLY_EXCLUSIVE_LOGIN)){
//单点刷新老的token生成新token
tokenStore.removeAccessToken(oAuth2AccessToken);
oAuth2AccessToken = defaultAuthorizationServerTokenServices.createAccessToken(oAuth2Authentication);
}
}
log.info("获取token 成功:{}", oAuth2AccessToken.getValue());
R<UserAndToke> result = new R<>(new UserAndToke(oAuth2AccessToken,user));
backResult(response, result);
} catch (Exception e) {
if (e instanceof InvalidException){
throw (InvalidException)e ;
}else if(e instanceof InvalidClientException){
String ip = WebUtils.getIP(request);
if( null != ip && !ip.startsWith("127") && !ip.startsWith("192.168")){
log.error(MarkerFactory.getMarker("MAIL"),"{}({})登录错误(触发黑名单逻辑)ip:{},头部信息为:{}",null==user?"":user.getUsername(),null==user?"":user.getUsername(),ip, JSONObject.toJSON(WebUtils.getHeadersInfo(request)));
}else{
log.error(MarkerFactory.getMarker("MAIL"),"{}({})登录错误ip:{},头部信息为:{}",null==user?"":user.getUsername(),null==user?"":user.getUsername(),ip, JSONObject.toJSON(WebUtils.getHeadersInfo(request)));
}
throw (InvalidClientException)e;
}else{
log.error(MarkerFactory.getMarker("MAIL"),"{}({})登录错误ip:{},头部信息为:{}",null==user?"":user.getUsername(),null==user?"":user.getUsername(),WebUtils.getIP(request), JSONObject.toJSON(WebUtils.getHeadersInfo(request)));
throw new InvalidException("未知异常请联系管理员!",e);
}
}
}
private void backResult(HttpServletResponse response, R result) throws IOException {
response.setCharacterEncoding(CharsetUtil.UTF_8);
response.setContentType(CommonConstants.CONTENT_TYPE);
PrintWriter printWriter = response.getWriter();
printWriter.append(objectMapper.writeValueAsString(result));
}
}
......@@ -54,4 +54,4 @@ wx:
corpid: wwbcb090af0dfe50e5
corpsecret: 16kqEL_eU-ARwYyqLgEBWHgxm8gXVnkzv_eJMLy9NpU
agentid: 1000010
authUrl: https://test-wx.worfu.com/auth/oauth/wxLogin
\ No newline at end of file
authUrl: https://test-wx.worfu.com/yifu-auth/method/oauth/wxLogin
\ No newline at end of file
......@@ -108,7 +108,7 @@
</springProfile>
<springProfile name="test">
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="error">
<root level="debug">
<appender-ref ref="console"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
......
......@@ -48,6 +48,7 @@ public class WxAuthenticationProvider extends MyAbstractUserDetailsAuthenticatio
// }
try {
loadedUser = this.getUserDetailsService().loadUserByUsername(wxUserName);
log.error(wxUserName+":"+loadedUser.getUsername());
} catch (UsernameNotFoundException var6) {
throw var6;
} catch (Exception var7) {
......
......@@ -67,6 +67,9 @@ public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFu
//项目信息
deptInfo = map.get(fundInfo.getFd_3adfe8c70d3fd4());
if (Common.isEmpty(deptInfo)) {
continue;
}
fundInfo.setFd_3b16e37baa5650_text(deptInfo.getDeptName());
fundInfo.setFd_3b16e37baa5650(deptInfo.getFdId());
//实际结算月份
......
......@@ -38,7 +38,9 @@ public class EkpManagerInfoServiceImpl extends ServiceImpl<EkpManagerInfoMapper,
//根据项目编码获取ekp所有项目信息
EkpDeptInfoVo deptInfo = baseMapper.getEkpDeptInfoByNo(incomeParam.getFd_3adfef5e5b9d34());
if (null == deptInfo) {
return null;
}
EkpManagerInfo managerInfoCount;
try {
//去重 防止重复推送
......
......@@ -37,7 +37,9 @@ public class EkpRiskInfoServiceImpl extends ServiceImpl<EkpRiskInfoMapper, EkpRi
public EkpIncomePushInfoVo pushRiskInfoToEkp(EkpIncomeParamRisk incomeParam) {
//根据项目编码获取ekp所有项目信息
EkpDeptInfoVo deptInfo = baseMapper.getEkpDeptInfoByNo(incomeParam.getFd_3adfef5e5b9d34());
if (null == deptInfo) {
return null;
}
EkpRiskInfo riskInfoCount;
try {
//去重 防止重复推送
......
......@@ -74,6 +74,9 @@ EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, EkpSalaryInfo>
//项目信息
deptInfo = map.get(salaryInfo.getFd_3adfedf98ccba2());
if (Common.isEmpty(deptInfo)) {
continue;
}
salaryInfo.setFd_3b16e418905f52_text(deptInfo.getDeptName());
salaryInfo.setFd_3b16e418905f52(deptInfo.getFdId());
//实际结算月份
......
......@@ -68,9 +68,11 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
EkpSocialInfo socialInfo = new EkpSocialInfo();
//对象信息赋值
copySocialProperties(socialParam, socialInfo);
//项目信息
deptInfo = map.get(socialInfo.getFd_3adfe8c70d3fd4());
if (Common.isEmpty(deptInfo)) {
continue;
}
socialInfo.setFd_3b16e2f436ff98_text(deptInfo.getDeptName());
socialInfo.setFd_3b16e2f436ff98(deptInfo.getFdId());
//实际结算月份
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 含风险项目不购买申请表
*
* @author huych
* @date 2025-01-10 11:24:38
*/
@Data
@TableName("t_insurance_unpurchase_apply")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "含风险项目不购买申请表")
public class TInsuranceUnpurchaseApply extends BaseEntity {
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id")
private String id;
@Schema(description = "项目ID")
private String deptId;
@Schema(description = "项目编码")
private String deptNo;
@Schema(description = "项目名称")
private String deptName;
@Schema(description = "申请人所在部门")
private String createUserDeptId;
@Schema(description = "申请人所在部门名称")
private String createUserDeptName;
@Schema(description = "不购买原因 1 已购买社保 2 人员已离职")
private String reasonType;
@Schema(description = "原因说明")
private String reasonInfo;
@Schema(description = "申请编号")
private String applyNo;
@Schema(description = "项目是否有审批通过记录 0 是 1 否")
private String auditFlag;
@Schema(description = "申请人是否属于子分公司 0 是 1 否")
private String companyFlag;
@Schema(description = "是否删除 0未删除/1删除")
private String deleteFlag;
@Schema(description = "申请状态 0 草稿 1待提交 2 待审核 3 审核通过 4 审核不通过")
private String status;
@Schema(description ="是否含风险")
private String hasContainRisks;
@Schema(description ="事业部条线")
private String newLine;
@Schema(description ="事业部")
private String division;
@Schema(description ="服务项是否勾选商险 0 是 1 否")
private String insuranceFlag;
@Schema(description ="当前审核人")
private String auditUser;
@Schema(description ="当前审核人ID")
private String auditUserId;
@Schema(description ="明细数据集")
@TableField(exist = false)
private List<TInsuranceUnpurchasePerson> personList;
}
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 含风险项目不购买申请明细表
*
* @author huych
* @date 2025-01-10 11:23:21
*/
@Data
@TableName("t_insurance_unpurchase_person")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "含风险项目不购买申请明细表")
public class TInsuranceUnpurchasePerson extends BaseEntity {
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id")
private String id;
@Schema(description = "父级id")
private String parnetId;
@Schema(description = "姓名")
private String empName;
@Schema(description = "身份证号")
private String empIdcardNo;
@Schema(description = "就职岗位")
private String post;
@Schema(description = "明细申请编号")
private String applyNoDetail;
@Schema(description = "项目ID")
private String deptId;
@Schema(description = "项目编码")
private String deptNo;
@Schema(description = "项目名称")
private String deptName;
@Schema(description = "申请人所在部门")
private String createUserDeptId;
@Schema(description = "申请人所在部门名称")
private String createUserDeptName;
@Schema(description = "不购买原因 1 已购买社保 2 人员已离职")
private String reasonType;
@Schema(description = "原因说明")
private String reasonInfo;
@Schema(description = "主表申请编号")
private String applyNo;
@Schema(description = "社保是否在保 0 是 1 否")
private String socialStatus;
@Schema(description = "发薪次数")
private Integer salaryNum;
@Schema(description ="是否含风险")
private String hasContainRisks;
@Schema(description ="事业部条线")
private String newLine;
@Schema(description ="事业部")
private String division;
@Schema(description ="服务项是否勾选商险 0 是 1 否")
private String insuranceFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchaseApply;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 含风险项目不购买申请表
*
* @author huych
* @date 2025-01-10 11:24:38
*/
@Data
public class TInsuranceUnpurchaseApplySearchVo extends TInsuranceUnpurchaseApply {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
@Schema(description = "创建开始时间")
private LocalDateTime createTimeStart;
@Schema(description = "创建截止时间")
private LocalDateTime createTimeEnd;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 含风险项目不购买申请表
*
* @author huych
* @date 2025-01-10 11:24:38
*/
@Data
public class TInsuranceUnpurchaseApplyVo extends RowIndex implements Serializable {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "id 不能为空")
@Length(max = 36, message = "id 不能超过36 个字符")
@ExcelAttribute(name = "id", isNotEmpty = true, errorInfo = "id 不能为空", maxLength = 36)
@Schema(description = "id")
@ExcelProperty("id")
private String id;
/**
* 项目ID
*/
@Length(max = 32, message = "项目ID 不能超过32 个字符")
@ExcelAttribute(name = "项目ID", maxLength = 32)
@Schema(description = "项目ID")
@ExcelProperty("项目ID")
private String deptId;
/**
* 项目编码
*/
@Length(max = 30, message = "项目编码 不能超过30 个字符")
@ExcelAttribute(name = "项目编码", maxLength = 30)
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
/**
* 项目名称
*/
@Length(max = 50, message = "项目名称 不能超过50 个字符")
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
/**
* 申请人所在部门
*/
@Length(max = 36, message = "申请人所在部门 不能超过36 个字符")
@ExcelAttribute(name = "申请人所在部门", maxLength = 36)
@Schema(description = "申请人所在部门")
@ExcelProperty("申请人所在部门")
private String createUserDeptId;
/**
* 申请人所在部门名称
*/
@Length(max = 50, message = "申请人所在部门名称 不能超过50 个字符")
@ExcelAttribute(name = "申请人所在部门名称", maxLength = 50)
@Schema(description = "申请人所在部门名称")
@ExcelProperty("申请人所在部门名称")
private String createUserDeptName;
/**
* 不购买原因 1 已购买社保 2 人员已离职
*/
@Length(max = 1, message = "不购买原因 1 已购买社保 2 人员已离职 不能超过1 个字符")
@ExcelAttribute(name = "不购买原因 1 已购买社保 2 人员已离职", maxLength = 1)
@Schema(description = "不购买原因 1 已购买社保 2 人员已离职")
@ExcelProperty("不购买原因 1 已购买社保 2 人员已离职")
private String reasonType;
/**
* 原因说明
*/
@Length(max = 50, message = "原因说明 不能超过50 个字符")
@ExcelAttribute(name = "原因说明", maxLength = 50)
@Schema(description = "原因说明")
@ExcelProperty("原因说明")
private String reasonInfo;
/**
* 申请编号
*/
@Length(max = 20, message = "申请编号 不能超过20 个字符")
@ExcelAttribute(name = "申请编号", maxLength = 20)
@Schema(description = "申请编号")
@ExcelProperty("申请编号")
private String applyNo;
/**
* 项目是否有审批通过记录 0 是 1 否
*/
@Length(max = 1, message = "项目是否有审批通过记录 0 是 1 否 不能超过1 个字符")
@ExcelAttribute(name = "项目是否有审批通过记录 0 是 1 否", maxLength = 1)
@Schema(description = "项目是否有审批通过记录 0 是 1 否")
@ExcelProperty("项目是否有审批通过记录 0 是 1 否")
private String auditFlag;
/**
* 申请人是否属于子分公司 0 是 1 否
*/
@Length(max = 1, message = "申请人是否属于子分公司 0 是 1 否 不能超过1 个字符")
@ExcelAttribute(name = "申请人是否属于子分公司 0 是 1 否", maxLength = 1)
@Schema(description = "申请人是否属于子分公司 0 是 1 否")
@ExcelProperty("申请人是否属于子分公司 0 是 1 否")
private String companyFlag;
/**
* 是否删除 0未删除/1删除
*/
@Length(max = 1, message = "是否删除 0未删除/1删除 不能超过1 个字符")
@ExcelAttribute(name = "是否删除 0未删除/1删除", maxLength = 1)
@Schema(description = "是否删除 0未删除/1删除")
@ExcelProperty("是否删除 0未删除/1删除")
private String deleteFlag;
/**
* 申请状态 0 草稿 1待提交 2 待审核 3 审核通过 4 审核不通过
*/
@Length(max = 1, message = "申请状态 0 草稿 1待提交 2 待审核 3 审核通过 4 审核不通过 不能超过1 个字符")
@ExcelAttribute(name = "申请状态 0 草稿 1待提交 2 待审核 3 审核通过 4 审核不通过", maxLength = 1)
@Schema(description = "申请状态 0 草稿 1待提交 2 待审核 3 审核通过 4 审核不通过")
@ExcelProperty("申请状态 0 草稿 1待提交 2 待审核 3 审核通过 4 审核不通过")
private String status;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchasePerson;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 含风险项目不购买申请明细表
*
* @author huych
* @date 2025-01-10 11:23:21
*/
@Data
public class TInsuranceUnpurchasePersonSearchVo extends TInsuranceUnpurchasePerson {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
@Schema(description = "创建开始时间")
private LocalDateTime createTimeStart;
@Schema(description = "创建截止时间")
private LocalDateTime createTimeEnd;
@Schema(description = "查询limit 开始")
private int limitStart;
@Schema(description = "查询limit 数据条数")
private int limitEnd;
@Schema(description = "发薪人数区间起")
private String salaryNumStart;
@Schema(description = "发薪人数区间止")
private String salaryNumEnd;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 含风险项目不购买申请明细表
*
* @author huych
* @date 2025-01-10 11:23:21
*/
@Data
public class TInsuranceUnpurchasePersonVo extends RowIndex implements Serializable {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "id 不能为空")
@Length(max = 36, message = "id 不能超过36 个字符")
@ExcelAttribute(name = "id", isNotEmpty = true, errorInfo = "id 不能为空", maxLength = 36)
@Schema(description = "id")
@ExcelProperty("id")
private String id;
/**
* 父级id
*/
@Length(max = 36, message = "父级id 不能超过36 个字符")
@ExcelAttribute(name = "父级id", maxLength = 36)
@Schema(description = "父级id")
@ExcelProperty("父级id")
private String parnetId;
/**
* 姓名
*/
@Length(max = 32, message = "姓名 不能超过32 个字符")
@ExcelAttribute(name = "姓名", maxLength = 32)
@Schema(description = "姓名")
@ExcelProperty("姓名")
private String empName;
/**
* 身份证号
*/
@Length(max = 32, message = "身份证号 不能超过32 个字符")
@ExcelAttribute(name = "身份证号", maxLength = 32)
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcardNo;
/**
* 就职岗位
*/
@Length(max = 50, message = "就职岗位 不能超过50 个字符")
@ExcelAttribute(name = "就职岗位", maxLength = 50)
@Schema(description = "就职岗位")
@ExcelProperty("就职岗位")
private String post;
/**
* 明细申请编号
*/
@Length(max = 20, message = "明细申请编号 不能超过20 个字符")
@ExcelAttribute(name = "明细申请编号", maxLength = 20)
@Schema(description = "明细申请编号")
@ExcelProperty("明细申请编号")
private String applyNoDetail;
/**
* 项目ID
*/
@Length(max = 32, message = "项目ID 不能超过32 个字符")
@ExcelAttribute(name = "项目ID", maxLength = 32)
@Schema(description = "项目ID")
@ExcelProperty("项目ID")
private String deptId;
/**
* 项目编码
*/
@Length(max = 30, message = "项目编码 不能超过30 个字符")
@ExcelAttribute(name = "项目编码", maxLength = 30)
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
/**
* 项目名称
*/
@Length(max = 50, message = "项目名称 不能超过50 个字符")
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
/**
* 申请人所在部门
*/
@Length(max = 36, message = "申请人所在部门 不能超过36 个字符")
@ExcelAttribute(name = "申请人所在部门", maxLength = 36)
@Schema(description = "申请人所在部门")
@ExcelProperty("申请人所在部门")
private String createUserDeptId;
/**
* 申请人所在部门名称
*/
@Length(max = 50, message = "申请人所在部门名称 不能超过50 个字符")
@ExcelAttribute(name = "申请人所在部门名称", maxLength = 50)
@Schema(description = "申请人所在部门名称")
@ExcelProperty("申请人所在部门名称")
private String createUserDeptName;
/**
* 不购买原因 1 已购买社保 2 人员已离职
*/
@Length(max = 1, message = "不购买原因 1 已购买社保 2 人员已离职 不能超过1 个字符")
@ExcelAttribute(name = "不购买原因 1 已购买社保 2 人员已离职", maxLength = 1)
@Schema(description = "不购买原因 1 已购买社保 2 人员已离职")
@ExcelProperty("不购买原因 1 已购买社保 2 人员已离职")
private String reasonType;
/**
* 原因说明
*/
@Length(max = 50, message = "原因说明 不能超过50 个字符")
@ExcelAttribute(name = "原因说明", maxLength = 50)
@Schema(description = "原因说明")
@ExcelProperty("原因说明")
private String reasonInfo;
/**
* 主表申请编号
*/
@Length(max = 20, message = "主表申请编号 不能超过20 个字符")
@ExcelAttribute(name = "主表申请编号", maxLength = 20)
@Schema(description = "主表申请编号")
@ExcelProperty("主表申请编号")
private String applyNo;
/**
* 社保是否在保 0 是 1 否
*/
@Length(max = 1, message = "社保是否在保 0 是 1 否 不能超过1 个字符")
@ExcelAttribute(name = "社保是否在保 0 是 1 否", maxLength = 1)
@Schema(description = "社保是否在保 0 是 1 否")
@ExcelProperty("社保是否在保 0 是 1 否")
private String socialStatus;
/**
* 发薪次数
*/
@ExcelAttribute(name = "发薪次数")
@Schema(description = "发薪次数")
@ExcelProperty("发薪次数")
private Integer salaryNum;
}
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchaseApply;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceUnpurchaseApplyService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceUnpurchaseApplySearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* 含风险项目不购买申请表
*
* @author huych
* @date 2025-01-10 11:24:38
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tinsuranceunpurchaseapply")
@Tag(name = "含风险项目不购买申请表管理")
public class TInsuranceUnpurchaseApplyController {
private final TInsuranceUnpurchaseApplyService tInsuranceUnpurchaseApplyService;
private final MenuUtil menuUtil;
/**
* 简单分页查询
*
* @param page 分页对象
* @param searchVo 含风险项目不购买申请表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TInsuranceUnpurchaseApply>> getTInsuranceUnpurchaseApplyPage(Page<TInsuranceUnpurchaseApply> page, TInsuranceUnpurchaseApplySearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
return new R<>(tInsuranceUnpurchaseApplyService.getTInsuranceUnpurchaseApplyPage(page, searchVo));
}
/**
* 通过id查询含风险项目不购买申请表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<TInsuranceUnpurchaseApply> getById(@PathVariable("id") String id) {
return R.ok(tInsuranceUnpurchaseApplyService.getById(id));
}
/**
* 新增含风险项目不购买申请表
*
* @param tInsuranceUnpurchaseApply 含风险项目不购买申请表
* @return R
*/
@Operation(summary = "新增含风险项目不购买申请表", description = "新增含风险项目不购买申请表")
@SysLog("新增含风险项目不购买申请表")
@PostMapping("/add")
public R save(@RequestBody TInsuranceUnpurchaseApply tInsuranceUnpurchaseApply) {
return new R<>(tInsuranceUnpurchaseApplyService.save(tInsuranceUnpurchaseApply));
}
/**
* 修改含风险项目不购买申请表
*
* @param tInsuranceUnpurchaseApply 含风险项目不购买申请表
* @return R
*/
@Operation(summary = "修改含风险项目不购买申请表", description = "修改含风险项目不购买申请表:hasPermission('insurances_tinsuranceunpurchaseapply_edit')")
@SysLog("修改含风险项目不购买申请表")
@PutMapping
@PreAuthorize("@pms.hasPermission('insurances_tinsuranceunpurchaseapply_edit')")
public R<Boolean> updateById(@RequestBody TInsuranceUnpurchaseApply tInsuranceUnpurchaseApply) {
return R.ok(tInsuranceUnpurchaseApplyService.updateById(tInsuranceUnpurchaseApply));
}
/**
* 通过id删除含风险项目不购买申请表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除含风险项目不购买申请表", description = "通过id删除含风险项目不购买申请表:hasPermission('insurances_tinsuranceunpurchaseapply_del')")
@SysLog("通过id删除含风险项目不购买申请表")
@PostMapping("/id")
@PreAuthorize("@pms.hasPermission('insurances_tinsuranceunpurchaseapply_del')")
public R removeById(@RequestParam String id) {
return tInsuranceUnpurchaseApplyService.deleteById(id);
}
/**
* 含风险项目不购买申请表 批量导出
*
* @author huych
* @date 2025-01-10 11:24:38
**/
@Operation(description = "导出含风险项目不购买申请表")
@PostMapping("/export")
public void export(HttpServletResponse response, @RequestBody TInsuranceUnpurchaseApplySearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
tInsuranceUnpurchaseApplyService.listExport(response, searchVo);
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchasePerson;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceUnpurchasePersonService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceUnpurchasePersonSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* 含风险项目不购买申请明细表
*
* @author huych
* @date 2025-01-10 11:23:21
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tinsuranceunpurchaseperson" )
@Tag(name = "含风险项目不购买申请明细表管理")
public class TInsuranceUnpurchasePersonController {
private final TInsuranceUnpurchasePersonService tInsuranceUnpurchasePersonService;
private final MenuUtil menuUtil;
/**
* 简单分页查询
* @param page 分页对象
* @param searchVo 含风险项目不购买申请明细表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TInsuranceUnpurchasePerson>> getTInsuranceUnpurchasePersonPage(Page<TInsuranceUnpurchasePerson> page, TInsuranceUnpurchasePersonSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
return new R<>(tInsuranceUnpurchasePersonService.getTInsuranceUnpurchasePersonPage(page,searchVo));
}
/**
* 通过id查询含风险项目不购买申请明细表
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<TInsuranceUnpurchasePerson> getById(@PathVariable("id" ) String id) {
return R.ok(tInsuranceUnpurchasePersonService.getById(id));
}
/**
* 新增含风险项目不购买申请明细表
* @param tInsuranceUnpurchasePerson 含风险项目不购买申请明细表
* @return R
*/
@Operation(summary = "新增含风险项目不购买申请明细表", description = "新增含风险项目不购买申请明细表")
@SysLog("新增含风险项目不购买申请明细表")
@PostMapping
public R<Boolean> save(@RequestBody TInsuranceUnpurchasePerson tInsuranceUnpurchasePerson) {
return R.ok(tInsuranceUnpurchasePersonService.save(tInsuranceUnpurchasePerson));
}
/**
* 修改含风险项目不购买申请明细表
* @param tInsuranceUnpurchasePerson 含风险项目不购买申请明细表
* @return R
*/
@Operation(summary = "修改含风险项目不购买申请明细表", description = "修改含风险项目不购买申请明细表")
@SysLog("修改含风险项目不购买申请明细表")
@PutMapping
public R<Boolean> updateById(@RequestBody TInsuranceUnpurchasePerson tInsuranceUnpurchasePerson) {
return R.ok(tInsuranceUnpurchasePersonService.updateById(tInsuranceUnpurchasePerson));
}
/**
* 通过id删除含风险项目不购买申请明细表
* @param id id
* @return R
*/
@Operation(summary = "通过id删除含风险项目不购买申请明细表", description = "通过id删除含风险项目不购买申请明细表:hasPermission('insurances_tinsuranceunpurchaseperson_del')")
@SysLog("通过id删除含风险项目不购买申请明细表" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('insurances_tinsuranceunpurchaseperson_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tInsuranceUnpurchasePersonService.removeById(id));
}
/**
* 含风险项目不购买申请明细表 批量导出
* @author huych
* @date 2025-01-10 11:23:21
**/
@Operation(description = "导出含风险项目不购买申请明细表 hasPermission('insurances_tinsuranceunpurchaseperson-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('insurances_tinsuranceunpurchaseperson-export')")
public void export(HttpServletResponse response, @RequestBody TInsuranceUnpurchasePersonSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
tInsuranceUnpurchasePersonService.listExport(response,searchVo);
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchaseApply;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceUnpurchaseApplySearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 含风险项目不购买申请表
*
* @author huych
* @date 2025-01-10 11:24:38
*/
@Mapper
public interface TInsuranceUnpurchaseApplyMapper extends BaseMapper<TInsuranceUnpurchaseApply> {
/**
* 含风险项目不购买申请表简单分页查询
* @param tInsuranceUnpurchaseApply 含风险项目不购买申请表
* @return
*/
IPage<TInsuranceUnpurchaseApply> getTInsuranceUnpurchaseApplyPage(Page<TInsuranceUnpurchaseApply> page
, @Param("tInsuranceUnpurchaseApply") TInsuranceUnpurchaseApplySearchVo tInsuranceUnpurchaseApply);
/**
* 含风险项目不购买申请表简单分页查询
* @param tInsuranceUnpurchaseApply 含风险项目不购买申请表
* @return
*/
long getTInsuranceUnpurchaseApplyExportCount(@Param("tInsuranceUnpurchaseApply") TInsuranceUnpurchaseApplySearchVo tInsuranceUnpurchaseApply);
/**
* 含风险项目不购买申请表简单导出查询
* @param tInsuranceUnpurchaseApply 含风险项目不购买申请表
* @return
*/
List<TInsuranceUnpurchaseApply> getTInsuranceUnpurchaseApplyExportList(@Param("tInsuranceUnpurchaseApply") TInsuranceUnpurchaseApplySearchVo tInsuranceUnpurchaseApply);
}
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchasePerson;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceUnpurchasePersonSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 含风险项目不购买申请明细表
*
* @author huych
* @date 2025-01-10 11:23:21
*/
@Mapper
public interface TInsuranceUnpurchasePersonMapper extends BaseMapper<TInsuranceUnpurchasePerson> {
/**
* 含风险项目不购买申请明细表简单分页查询
* @param tInsuranceUnpurchasePerson 含风险项目不购买申请明细表
* @return
*/
IPage<TInsuranceUnpurchasePerson> getTInsuranceUnpurchasePersonPage(Page<TInsuranceUnpurchasePerson> page
, @Param("tInsuranceUnpurchasePerson") TInsuranceUnpurchasePersonSearchVo tInsuranceUnpurchasePerson);
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchaseApply;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceUnpurchaseApplySearchVo;
import javax.servlet.http.HttpServletResponse;
/**
* 含风险项目不购买申请表
*
* @author huych
* @date 2025-01-10 11:24:38
*/
public interface TInsuranceUnpurchaseApplyService extends IService<TInsuranceUnpurchaseApply> {
/**
* 含风险项目不购买申请表简单分页查询
* @param tInsuranceUnpurchaseApply 含风险项目不购买申请表
* @return
*/
IPage<TInsuranceUnpurchaseApply> getTInsuranceUnpurchaseApplyPage(Page<TInsuranceUnpurchaseApply> page, TInsuranceUnpurchaseApplySearchVo tInsuranceUnpurchaseApply);
R deleteById(String id);
void listExport(HttpServletResponse response, TInsuranceUnpurchaseApplySearchVo searchVo);
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchasePerson;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceUnpurchasePersonSearchVo;
import javax.servlet.http.HttpServletResponse;
/**
* 含风险项目不购买申请明细表
*
* @author huych
* @date 2025-01-10 11:23:21
*/
public interface TInsuranceUnpurchasePersonService extends IService<TInsuranceUnpurchasePerson> {
/**
* 含风险项目不购买申请明细表简单分页查询
* @param tInsuranceUnpurchasePerson 含风险项目不购买申请明细表
* @return
*/
IPage<TInsuranceUnpurchasePerson> getTInsuranceUnpurchasePersonPage(Page<TInsuranceUnpurchasePerson> page, TInsuranceUnpurchasePersonSearchVo tInsuranceUnpurchasePerson);
void listExport(HttpServletResponse response, TInsuranceUnpurchasePersonSearchVo searchVo);
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchaseApply;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceUnpurchaseApplyMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceUnpurchaseApplyService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceUnpurchaseApplySearchVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* 含风险项目不购买申请表
*
* @author huych
* @date 2025-01-10 11:24:38
*/
@Log4j2
@Service
public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsuranceUnpurchaseApplyMapper, TInsuranceUnpurchaseApply> implements TInsuranceUnpurchaseApplyService {
/**
* 含风险项目不购买申请表简单分页查询
*
* @param tInsuranceUnpurchaseApply 含风险项目不购买申请表
* @return
*/
@Override
public IPage<TInsuranceUnpurchaseApply> getTInsuranceUnpurchaseApplyPage(Page<TInsuranceUnpurchaseApply> page, TInsuranceUnpurchaseApplySearchVo tInsuranceUnpurchaseApply) {
return baseMapper.getTInsuranceUnpurchaseApplyPage(page, tInsuranceUnpurchaseApply);
}
public R deleteById(String id) {
TInsuranceUnpurchaseApply apply = baseMapper.selectById(id);
if (Common.isNotNull(apply)) {
apply.setDeleteFlag(CommonConstants.ONE_STRING);
baseMapper.updateById(apply);
return R.ok();
} else {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
}
/**
* 含风险项目不购买申请表批量导出
*
* @param searchVo 含风险项目不购买申请表
* @return
*/
@Override
public void listExport(HttpServletResponse response, TInsuranceUnpurchaseApplySearchVo searchVo) {
String fileName = "含风险项目不购买申请表批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TInsuranceUnpurchaseApply> list = new ArrayList<>();
long count = baseMapper.getTInsuranceUnpurchaseApplyExportCount(searchVo);
try(ServletOutputStream out = response.getOutputStream();) {
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TInsuranceUnpurchaseApply.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i = i + CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTInsuranceUnpurchaseApplyExportList(searchVo);
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请表" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请表" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
}
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchasePerson;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceUnpurchasePersonMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceUnpurchasePersonService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceUnpurchasePersonSearchVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* 含风险项目不购买申请明细表
*
* @author huych
* @date 2025-01-10 11:23:21
*/
@Log4j2
@Service
public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranceUnpurchasePersonMapper, TInsuranceUnpurchasePerson> implements TInsuranceUnpurchasePersonService {
/**
* 含风险项目不购买申请明细表简单分页查询
* @param tInsuranceUnpurchasePerson 含风险项目不购买申请明细表
* @return
*/
@Override
public IPage<TInsuranceUnpurchasePerson> getTInsuranceUnpurchasePersonPage(Page<TInsuranceUnpurchasePerson> page, TInsuranceUnpurchasePersonSearchVo tInsuranceUnpurchasePerson){
return baseMapper.getTInsuranceUnpurchasePersonPage(page,tInsuranceUnpurchasePerson);
}
/**
* 含风险项目不购买申请明细表批量导出
* @param searchVo 含风险项目不购买申请明细表
* @return
*/
@Override
public void listExport(HttpServletResponse response, TInsuranceUnpurchasePersonSearchVo searchVo){
String fileName = "含风险项目商险不购买导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TInsuranceUnpurchasePerson> list = new ArrayList<>();
// long count = noPageCountDiy(searchVo);
long count = 0l;
try (ServletOutputStream out = response.getOutputStream();){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TInsuranceUnpurchasePerson.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; i = i + CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
// list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请明细表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请明细表"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceUnpurchaseApplyMapper">
<resultMap id="tInsuranceUnpurchaseApplyMap"
type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchaseApply">
<id property="id" column="ID"/>
<result property="deptId" column="DEPT_ID"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="createUserDeptId" column="CREATE_USER_DEPT_ID"/>
<result property="createUserDeptName" column="CREATE_USER_DEPT_NAME"/>
<result property="reasonType" column="REASON_TYPE"/>
<result property="reasonInfo" column="REASON_INFO"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="auditFlag" column="AUDIT_FLAG"/>
<result property="companyFlag" column="COMPANY_FLAG"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="status" column="STATUS"/>
<result property="hasContainRisks" column="HAS_CONTAIN_RISKS"/>
<result property="newLine" column="NEW_LINE"/>
<result property="division" column="DIVISION"/>
<result property="insuranceFlag" column="INSURANCE_FLAG"/>
<result property="auditUser" column="AUDIT_USER"/>
<result property="auditUserId" column="AUDIT_USER_ID"/>
</resultMap>
<sql id="Base_Column_List">
a.ID, a.DEPT_ID, a.DEPT_NO, a.DEPT_NAME, a.CREATE_USER_DEPT_ID,
a.CREATE_USER_DEPT_NAME, a.REASON_TYPE, a.REASON_INFO, a.APPLY_NO,
a.AUDIT_FLAG, a.COMPANY_FLAG, a.CREATE_BY, a.CREATE_NAME, a.CREATE_TIME,
a.UPDATE_BY, a.UPDATE_TIME, a.DELETE_FLAG, a.STATUS, a.HAS_CONTAIN_RISKS,
a.NEW_LINE, a.DIVISION, a.INSURANCE_FLAG, a.AUDIT_USER, a.AUDIT_USER_ID
</sql>
<sql id="tInsuranceUnpurchaseApply_where">
<if test="tInsuranceUnpurchaseApply != null">
<if test="tInsuranceUnpurchaseApply.id != null and tInsuranceUnpurchaseApply.id.trim() != ''">
AND a.ID = #{tInsuranceUnpurchaseApply.id}
</if>
<if test="tInsuranceUnpurchaseApply.deptNo != null and tInsuranceUnpurchaseApply.deptNo.trim() != ''">
AND a.DEPT_NO = #{tInsuranceUnpurchaseApply.deptNo}
</if>
<if test="tInsuranceUnpurchaseApply.deptName != null and tInsuranceUnpurchaseApply.deptName.trim() != ''">
AND a.DEPT_NAME like concat('%',#{tInsuranceUnpurchaseApply.deptName},'%')
</if>
<if test="tInsuranceUnpurchaseApply.applyNo != null and tInsuranceUnpurchaseApply.applyNo.trim() != ''">
AND a.APPLY_NO = #{tInsuranceUnpurchaseApply.applyNo}
</if>
<if test="tInsuranceUnpurchaseApply.createBy != null and tInsuranceUnpurchaseApply.createBy.trim() != ''">
AND a.CREATE_BY = #{tInsuranceUnpurchaseApply.createBy}
</if>
<if test="tInsuranceUnpurchaseApply.createName != null and tInsuranceUnpurchaseApply.createName.trim() != ''">
AND a.CREATE_NAME = #{tInsuranceUnpurchaseApply.createName}
</if>
<if test="tInsuranceUnpurchaseApply.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{tInsuranceUnpurchaseApply.createTimeStart}
</if>
<if test="tInsuranceUnpurchaseApply.createTimeEnd != null">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{tInsuranceUnpurchaseApply.createTimeEnd}
</if>
<if test="tInsuranceUnpurchaseApply.status != null and tInsuranceUnpurchaseApply.status.trim() != ''">
AND a.STATUS = #{tInsuranceUnpurchaseApply.status}
</if>
<if test="tInsuranceUnpurchaseApply.auditUser != null and tInsuranceUnpurchaseApply.auditUser.trim() != ''">
AND a.AUDIT_USER = #{tInsuranceUnpurchaseApply.auditUser}
</if>
<if test="tInsuranceUnpurchaseApply.auditUserId != null and tInsuranceUnpurchaseApply.auditUserId.trim() != ''">
AND a.AUDIT_USER_ID = #{tInsuranceUnpurchaseApply.auditUserId}
</if>
<if test="tInsuranceUnpurchaseApply.authSql != null and tInsuranceUnpurchaseApply.authSql.trim() != ''">
${tInsuranceUnpurchaseApply.authSql}
</if>
</if>
</sql>
<!-- tInsuranceUnpurchaseApply简单分页查询 -->
<select id="getTInsuranceUnpurchaseApplyPage" resultMap="tInsuranceUnpurchaseApplyMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_insurance_unpurchase_apply a
<where>
1=1 and a.DELETE_FLAG = '0'
<include refid="tInsuranceUnpurchaseApply_where"/>
</where>
</select>
<!-- tInsuranceUnpurchaseApply简单分页查询 -->
<select id="getTInsuranceUnpurchaseApplyExportCount" resultType="java.lang.Long">
SELECT
count(1)
FROM t_insurance_unpurchase_apply a
<where>
1=1 and a.DELETE_FLAG = '0'
<include refid="tInsuranceUnpurchaseApply_where"/>
</where>
</select>
<!-- tInsuranceUnpurchaseApply简单分页查询 -->
<select id="getTInsuranceUnpurchaseApplyExportList" resultMap="tInsuranceUnpurchaseApplyMap">
SELECT
a.APPLY_NO,
a.DEPT_NAME,
a.DEPT_NO,
a.CREATE_NAME,
a.CREATE_USER_DEPT_NAME,
a.CREATE_TIME,
if(a.REASON_TYPE = '1','已购买社保','人员已离职') REASON_TYPE,
a.REASON_INFO,
CASE WHEN a.STATUS=0 THEN "草稿"
WHEN a.STATUS =1 THEN "待提交"
WHEN a.STATUS =2 THEN "待审核"
WHEN a.STATUS =3 THEN "审核通过"
WHEN a.STATUS =4 THEN "审核不通过"
ELSE a.STATUS END as "STATUS"
FROM t_insurance_unpurchase_apply a
<where>
1=1 and a.DELETE_FLAG = '0'
<include refid="tInsuranceUnpurchaseApply_where"/>
</where>
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceUnpurchasePersonMapper">
<resultMap id="tInsuranceUnpurchasePersonMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceUnpurchasePerson">
<id property="id" column="ID"/>
<result property="parnetId" column="PARNET_ID"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcardNo" column="EMP_IDCARD_NO"/>
<result property="post" column="POST"/>
<result property="applyNoDetail" column="APPLY_NO_DETAIL"/>
<result property="deptId" column="DEPT_ID"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="createUserDeptId" column="CREATE_USER_DEPT_ID"/>
<result property="createUserDeptName" column="CREATE_USER_DEPT_NAME"/>
<result property="reasonType" column="REASON_TYPE"/>
<result property="reasonInfo" column="REASON_INFO"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="socialStatus" column="SOCIAL_STATUS"/>
<result property="salaryNum" column="SALARY_NUM"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="hasContainRisks" column="HAS_CONTAIN_RISKS"/>
<result property="newLine" column="NEW_LINE"/>
<result property="division" column="DIVISION"/>
<result property="insuranceFlag" column="INSURANCE_FLAG"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.PARNET_ID,
a.EMP_NAME,
a.EMP_IDCARD_NO,
a.POST,
a.APPLY_NO_DETAIL,
a.DEPT_ID,
a.DEPT_NO,
a.DEPT_NAME,
a.CREATE_USER_DEPT_ID,
a.CREATE_USER_DEPT_NAME,
a.REASON_TYPE,
a.REASON_INFO,
a.APPLY_NO,
a.SOCIAL_STATUS,
a.SALARY_NUM,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.HAS_CONTAIN_RISKS,
a.NEW_LINE,
a.DIVISION,
a.INSURANCE_FLAG
</sql>
<sql id="tInsuranceUnpurchasePerson_where">
<if test="tInsuranceUnpurchasePerson != null">
<if test="tInsuranceUnpurchasePerson.id != null and tInsuranceUnpurchasePerson.id.trim() != ''">
AND a.ID = #{tInsuranceUnpurchasePerson.id}
</if>
<if test="tInsuranceUnpurchasePerson.empName != null and tInsuranceUnpurchasePerson.empName.trim() != ''">
AND a.EMP_NAME = #{tInsuranceUnpurchasePerson.empName}
</if>
<if test="tInsuranceUnpurchasePerson.empIdcardNo != null and tInsuranceUnpurchasePerson.empIdcardNo.trim() != ''">
AND a.EMP_IDCARD_NO = #{tInsuranceUnpurchasePerson.empIdcardNo}
</if>
<if test="tInsuranceUnpurchasePerson.applyNoDetail != null and tInsuranceUnpurchasePerson.applyNoDetail.trim() != ''">
AND a.APPLY_NO_DETAIL = #{tInsuranceUnpurchasePerson.applyNoDetail}
</if>
<if test="tInsuranceUnpurchasePerson.deptNo != null and tInsuranceUnpurchasePerson.deptNo.trim() != ''">
AND a.DEPT_NO = #{tInsuranceUnpurchasePerson.deptNo}
</if>
<if test="tInsuranceUnpurchasePerson.deptName != null and tInsuranceUnpurchasePerson.deptName.trim() != ''">
AND a.DEPT_NAME like concat('%',#{tInsuranceUnpurchasePerson.deptName},'%')
</if>
<if test="tInsuranceUnpurchasePerson.reasonType != null and tInsuranceUnpurchasePerson.reasonType.trim() != ''">
AND a.REASON_TYPE = #{tInsuranceUnpurchasePerson.reasonType}
</if>
<if test="tInsuranceUnpurchasePerson.applyNo != null and tInsuranceUnpurchasePerson.applyNo.trim() != ''">
AND a.APPLY_NO = #{tInsuranceUnpurchasePerson.applyNo}
</if>
<if test="tInsuranceUnpurchasePerson.socialStatus != null and tInsuranceUnpurchasePerson.socialStatus.trim() != ''">
AND a.SOCIAL_STATUS = #{tInsuranceUnpurchasePerson.socialStatus}
</if>
<if test="tInsuranceUnpurchasePerson.salaryNumStart != null">
AND a.SALARY_NUM <![CDATA[ >= ]]> #{tInsuranceUnpurchasePerson.salaryNumStart}
</if>
<if test="tInsuranceUnpurchasePerson.salaryNumEnd != null">
AND a.SALARY_NUM <![CDATA[ <= ]]> #{tInsuranceUnpurchasePerson.salaryNumEnd}
</if>
<if test="tInsuranceUnpurchasePerson.createBy != null and tInsuranceUnpurchasePerson.createBy.trim() != ''">
AND a.CREATE_BY = #{tInsuranceUnpurchasePerson.createBy}
</if>
<if test="tInsuranceUnpurchasePerson.createName != null and tInsuranceUnpurchasePerson.createName.trim() != ''">
AND a.CREATE_NAME = #{tInsuranceUnpurchasePerson.createName}
</if>
<if test="tInsuranceUnpurchasePerson.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{tInsuranceUnpurchasePerson.createTimeStart}
</if>
<if test="tInsuranceUnpurchasePerson.createTimeEnd != null">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{tInsuranceUnpurchasePerson.createTimeEnd}
</if>
<if test="tInsuranceUnpurchasePerson.authSql != null and tInsuranceUnpurchasePerson.authSql.trim() != ''">
${tInsuranceUnpurchasePerson.authSql}
</if>
</if>
</sql>
<!--tInsuranceUnpurchasePerson简单分页查询-->
<select id="getTInsuranceUnpurchasePersonPage" resultMap="tInsuranceUnpurchasePersonMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_insurance_unpurchase_person a
<where>
1=1
<include refid="tInsuranceUnpurchasePerson_where"/>
</where>
</select>
</mapper>
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