Commit fca18b7d authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents e4e570d5 ca438a8b
......@@ -472,4 +472,5 @@ public interface CommonConstants {
**/
public static final String PARAM_INFO_ERROR = "传参有误!";
}
......@@ -985,8 +985,25 @@ public class InsurancesConstants {
*/
public static final String INSURANCE_ENCLOSURE_DELETE_ABNORMAL = "电子保单删除异常";
/**
* 未结算
*/
public static final String SETTLE_ZERO = "未结算";
/**
* 已结算
*/
public static final String SETTLE_ONE = "已结算";
/**
* 结算中
*/
public static final String SETTLE_TWO = "结算中";
/**
* 无需结算
*/
public static final String SETTLE_THREE = "无需结算";
......
......@@ -5,6 +5,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
......@@ -30,6 +32,11 @@ public class TInsuranceEkp implements Serializable {
*/
private String defaultSettleId;
/**
* 单据类型 (0、与薪资合并结算 1、单独结算)
*/
private Integer settleType;
/**
* 项目编码
*/
......@@ -88,12 +95,12 @@ public class TInsuranceEkp implements Serializable {
/**
* 保单开始时间
*/
private Date policyStart;
private LocalDate policyStart;
/**
* 保单结束时间
*/
private Date policyEnd;
private LocalDate policyEnd;
/**
* 购买标准
......@@ -113,12 +120,12 @@ public class TInsuranceEkp implements Serializable {
/**
* 实际保费
*/
private String actualPremium;
private BigDecimal actualPremium;
/**
* 预估保费
*/
private String estimatePremium;
private BigDecimal estimatePremium;
/**
* 结算月
......@@ -128,12 +135,12 @@ public class TInsuranceEkp implements Serializable {
/**
* 单据状态
*/
private String interactiveType;
private Integer interactiveType;
/**
* 重发标识
*/
private String resendFlag;
private Integer resendFlag;
/**
* 创建时间
......
......@@ -15,23 +15,28 @@ import java.io.Serializable;
@Tag(name = "EKP结算信息表")
public class SettleVo implements Serializable {
/**
* 主键id
*/
private String id;
/**
* 结算id
*/
@Schema(description = "结算id")
private String fd_3b05ba46bb042e;
private String detailId;
/**
* 预估单结算状态
*/
@Schema(description = "预估单结算状态:未结算、已结算、结算中、无需结算")
private String fd_3b05ba4808a3ca;
private String estimateStatus;
/**
* 实缴单结算状态
*/
@Schema(description = "实缴单结算状态:未结算、已结算、结算中、无需结算")
private String fd_3b05bd5ed0b976;
private String actualStatus;
}
package com.yifu.cloud.plus.v1.yifu.insurances.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.support.TransactionTemplate;
import javax.sql.DataSource;
/**
* @author zhaji
* @description TODO
* @date 2022-08-25 17:03:43
*/
@Configuration
@MapperScan(basePackages = "com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp", sqlSessionTemplateRef = "ekpSqlSessionTemplate", sqlSessionFactoryRef = "ekpSqlSessionFactory")
public class EkpDataSourceConfig {
/**
* 配置ekp的数据源
* @return
*/
@Bean(name="ekpDataSource")
@ConfigurationProperties(prefix = "spring.datasource.ekp")
public DataSource ekpDataSource() {
return DataSourceBuilder.create().build();
}
/**
* 配置该数据源的sql会话工厂
* @param dataSource
* @return
* @throws Exception
*/
@Bean
public SqlSessionFactory ekpSqlSessionFactory(@Qualifier("ekpDataSource") DataSource dataSource) throws Exception {
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
//添加XML目录
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
try {
bean.setMapperLocations(resolver.getResources("classpath:mapper/ekp/*.xml"));
//分页插件配置,不配置分页插件无效,否则会出现total为0的情况
bean.setPlugins(ekpPlusInterceptor());
return bean.getObject();
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
/* MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
MybatisConfiguration configuration = new MybatisConfiguration();
configuration.setMapUnderscoreToCamelCase(true);
bean.setConfiguration(configuration);
bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/ekp/*.xml"));
return bean.getObject();*/
}
/**
* 配置该数据源的事务管理器
* @param dataSource
* @return
*/
@Bean
public DataSourceTransactionManager ekpTransactionManager(@Qualifier("ekpDataSource") DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
/**
* 配置ekp数据源的sql会话模板
* @param sqlSessionFactory
* @return
*/
@Bean
public SqlSessionTemplate ekpSqlSessionTemplate(@Qualifier("ekpSqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
return new SqlSessionTemplate(sqlSessionFactory);
}
/**
* 配置ekp数据源的事务模板
* @param dataSourceTransactionManager
* @return
*/
@Bean
public TransactionTemplate ekpTransactionTemplate(@Qualifier("ekpTransactionManager") DataSourceTransactionManager dataSourceTransactionManager) {
return new TransactionTemplate(dataSourceTransactionManager);
}
@Bean
public MybatisPlusInterceptor ekpPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.support.TransactionTemplate;
import javax.sql.DataSource;
/**
* @author zhaji
* @description TODO
* @date 2022-08-25 16:57:06
*/
@Configuration
@MapperScan(basePackages = "com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances", sqlSessionTemplateRef = "insurancesSqlSessionTemplate", sqlSessionFactoryRef = "insurancesSqlSessionFactory")
public class InsurancesDataSourceConfig {
@Bean(name = "insurancesDataSource")
@ConfigurationProperties(prefix = "spring.datasource.insurances")
@Primary
public DataSource insurancesDataSource() {
return DataSourceBuilder.create().build();
}
@Bean
public SqlSessionFactory insurancesSqlSessionFactory(@Qualifier("insurancesDataSource") DataSource dataSource) throws Exception {
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
//添加XML目录
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
try {
bean.setMapperLocations(resolver.getResources("classpath:mapper/insurances/*.xml"));
//分页插件配置,不配置分页插件无效,否则会出现total为0的情况
bean.setPlugins(insurancesPlusInterceptor());
return bean.getObject();
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
/* MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
MybatisConfiguration configuration = new MybatisConfiguration();
configuration.setMapUnderscoreToCamelCase(true);
bean.setConfiguration(configuration);
bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/insurances/*.xml"));
return bean.getObject();*/
}
@Bean
public DataSourceTransactionManager insurancesTransactionManager(@Qualifier("insurancesDataSource") DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
@Bean
public SqlSessionTemplate insurancesSqlSessionTemplate(@Qualifier("insurancesSqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
return new SqlSessionTemplate(sqlSessionFactory);
}
@Bean
public TransactionTemplate insurancesTransactionTemplate(@Qualifier("insurancesTransactionManager") DataSourceTransactionManager dataSourceTransactionManager) {
return new TransactionTemplate(dataSourceTransactionManager);
}
@Bean
public MybatisPlusInterceptor insurancesPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}
......@@ -5,7 +5,7 @@ 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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceCompanyService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
......
......@@ -11,7 +11,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.Dept;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEkpService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
......
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
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.insurances.entity.TInsuranceEnclosure;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEnclosureService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEnclosureService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceEnclosureParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -21,7 +16,6 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.IOException;
import java.net.URL;
/**
* @author zhaji
......
......@@ -4,21 +4,17 @@ 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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingParam;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @author zhaji
......
......@@ -2,19 +2,16 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
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.insurances.entity.TInsuranceCompany;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeRateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceTypeRateService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @author zhaji
......
......@@ -2,15 +2,13 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
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.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeStandardService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceTypeStandardService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import org.apache.ibatis.annotations.Mapper;
/**
* @author zhaji
* @description TODO
* @date 2022-08-26 09:12:46
*/
@Mapper
public interface EkpSettleMapper {
/**
* 获取结算信息
*
* @author zhaji
* @param id
* @return {@link SettleVo}
*/
SettleVo getSettle(String id);
}
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettleCancel;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.ekp;
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.TInsuranceCompany;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import org.springframework.stereotype.Service;
/**
* @author zhaji
* @description TODO
* @date 2022-08-26 09:25:36
*/
public interface EkpSettleService extends IService<TInsuranceTypeRate> {
/**
* 新增保险公司
*
* @author zhaji
* @param id 新增类
* @return {@link R}
*/
SettleVo getSettle(String id);
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp.EkpSettleMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collection;
import java.util.Map;
import java.util.function.Function;
/**
* @author zhaji
* @description TODO
* @date 2022-08-26 09:25:51
*/
@Service
public class EkpSettleServiceImpl implements EkpSettleService {
@Resource
EkpSettleMapper ekpSettleMapper;
@Override
public SettleVo getSettle(String id) {
return ekpSettleMapper.getSettle(id);
}
@Override
public boolean saveBatch(Collection<TInsuranceTypeRate> entityList, int batchSize) {
return false;
}
@Override
public boolean saveOrUpdateBatch(Collection<TInsuranceTypeRate> entityList, int batchSize) {
return false;
}
@Override
public boolean updateBatchById(Collection<TInsuranceTypeRate> entityList, int batchSize) {
return false;
}
@Override
public boolean saveOrUpdate(TInsuranceTypeRate entity) {
return false;
}
@Override
public TInsuranceTypeRate getOne(Wrapper<TInsuranceTypeRate> queryWrapper, boolean throwEx) {
return null;
}
@Override
public Map<String, Object> getMap(Wrapper<TInsuranceTypeRate> queryWrapper) {
return null;
}
@Override
public <V> V getObj(Wrapper<TInsuranceTypeRate> queryWrapper, Function<? super Object, V> mapper) {
return null;
}
@Override
public BaseMapper<TInsuranceTypeRate> getBaseMapper() {
return null;
}
@Override
public Class<TInsuranceTypeRate> getEntityClass() {
return null;
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEkpMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEkpService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EKPInteractiveParam;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author Administrator
* @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Service实现
* @createDate 2022-08-23 17:02:49
*/
@Service
public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, TInsuranceEkp> implements TInsuranceEkpService {
@Override
public R resend() {
List<TInsuranceEkp> ekpRefundList = this.baseMapper.getEkpRefundList();
if (CollectionUtils.isNotEmpty(ekpRefundList)){
for (TInsuranceEkp tInsuranceEkp : ekpRefundList) {
EKPInteractiveParam ekpParam = new EKPInteractiveParam();
BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam);
String detailId = ekpParam.getDetailId();
String defaultSettleId = ekpParam.getDefaultSettleId();
//查询当前结算状态
String status = CommonConstants.ONE_STRING;
if(status.equals(CommonConstants.ONE_STRING)){
}
}
return R.ok("发送成功");
}else{
return R.failed("无需要发送的信息");
}
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.service;
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;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettleCancel;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
......@@ -14,13 +14,14 @@ import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceCompanyMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceCompanyMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceCompanyService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
......@@ -102,6 +103,7 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
* @return {@link R}
*/
@Override
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R updateInsuranceCompany(TInsuranceCompany insuranceCompany) {
YifuUser user = SecurityUtils.getUser();
String id = insuranceCompany.getId();
......@@ -164,6 +166,7 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
* @return {@link R}
*/
@Override
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R deleteById(String id) {
YifuUser user = SecurityUtils.getUser();
LambdaQueryWrapper<TInsuranceCompany> queryWrapper = new LambdaQueryWrapper<>();
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
......@@ -19,12 +19,12 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceDetailMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.*;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetailMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*;
import com.yifu.cloud.plus.v1.yifu.insurances.util.*;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import lombok.extern.slf4j.Slf4j;
......@@ -80,7 +80,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private TInsuranceRefundService tInsuranceRefundService;
@Resource
private TInsuranceEkpService tInsuranceEkpService;
@Resource
private EkpSettleService ekpSettleService;
@Resource
......@@ -265,7 +266,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @author licancan
*/
@Override
@Transactional(rollbackFor = {Exception.class})
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R<List<InsuranceAddParam>> addInsurance(List<InsuranceAddParam> paramList) {
if (CollectionUtils.isEmpty(paramList)){
return R.failed(CommonConstants.DATA_CAN_NOT_EMPTY);
......@@ -312,7 +313,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @author licancan
*/
@Override
@Transactional(rollbackFor = {Exception.class})
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R<List<InsuranceBatchParam>> batchInsurance(List<InsuranceBatchParam> paramList) {
if (CollectionUtils.isEmpty(paramList)){
return R.failed(CommonConstants.DATA_CAN_NOT_EMPTY);
......@@ -357,7 +358,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @author licancan
*/
@Override
@Transactional(rollbackFor = {Exception.class})
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R<List<InsuranceReplaceParam>> replaceInsurance(List<InsuranceReplaceParam> paramList) {
if (CollectionUtils.isEmpty(paramList)){
return R.failed(CommonConstants.DATA_CAN_NOT_EMPTY);
......@@ -5280,12 +5281,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public SettleVo getInsuranceDetailSettleStatus(String detailId,String settleId){
String id = detailId+CommonConstants.DOWN_LINE_STRING+settleId;
//获取ekp结算信息
SettleVo settleVo = new SettleVo();
//id
settleVo.setFd_3b05ba46bb042e(id);
settleVo.setFd_3b05ba4808a3ca("预估单结算状态");
settleVo.setFd_3b05bd5ed0b976("实缴单结算状态");
return settleVo;
SettleVo settle = ekpSettleService.getSettle(id);
return settle;
}
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
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.R;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEkpMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.EKPUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EKPInteractiveParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* @author Administrator
* @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Service实现
* @createDate 2022-08-23 17:02:49
*/
@Service
@Slf4j
public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, TInsuranceEkp> implements TInsuranceEkpService {
@Resource
TInsuranceSettleService tInsuranceSettleService;
@Resource
@Lazy
TInsuranceDetailService tInsuranceDetailService;
@Resource
@Lazy
EkpSettleService ekpSettleService;
@Override
public R resend() {
List<TInsuranceEkp> ekpRefundList = this.baseMapper.getEkpRefundList();
List<TInsuranceEkp> failList = new ArrayList<>();
List<TInsuranceEkp> successLit = new ArrayList<>();
SettleVo settle = ekpSettleService.getSettle("12345");
String actualStatus = settle.getActualStatus();
log.info("settle:"+settle.toString());
log.info("actualStatus:"+actualStatus);
if (CollectionUtils.isNotEmpty(ekpRefundList)){
for (TInsuranceEkp tInsuranceEkp : ekpRefundList) {
Integer pushType = tInsuranceEkp.getPushType();
LambdaQueryWrapper<TInsuranceSettle> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceSettle :: getId,tInsuranceEkp.getDefaultSettleId());
TInsuranceSettle insuranceSettle = tInsuranceSettleService.getOne(queryWrapper);
//如果当前需要重发预估保费的数据已发送,则过滤掉执行下一条数据
if(CommonConstants.ONE_INT == pushType && CommonConstants.ONE_INT == insuranceSettle.getIsEstimatePush()){
tInsuranceEkp.setResendFlag(CommonConstants.THREE_INT);
failList.add(tInsuranceEkp);
continue;
}
//如果当前需要重发实际保费的数据已发送,则过滤掉执行下一条数据
if(CommonConstants.TWO_INT == pushType && CommonConstants.ONE_INT == insuranceSettle.getIsActualPush()){
tInsuranceEkp.setResendFlag(CommonConstants.THREE_INT);
failList.add(tInsuranceEkp);
continue;
}
EKPInteractiveParam ekpParam = new EKPInteractiveParam();
BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam);
String detailId = ekpParam.getDetailId();
String defaultSettleId = ekpParam.getDefaultSettleId();
//查询当前结算状态
String status = CommonConstants.ONE_STRING;
if(actualStatus.equals(InsurancesConstants.SETTLE_ZERO)){
String s = EKPUtil.sendToEKP(ekpParam);
//如果发送成功
if (StringUtils.isNotBlank(s)){
//预估则更新预估保费
if(CommonConstants.ONE_INT == pushType){
LambdaUpdateWrapper<TInsuranceSettle> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceSettle :: getId,tInsuranceEkp.getDefaultSettleId())
.set(TInsuranceSettle :: getIsEstimatePush,CommonConstants.ONE_INT)
.set(TInsuranceSettle :: getEstimatePushTime, LocalDateTime.now());
tInsuranceSettleService.update(updateWrapper);
}
//预估则更新预估保费
if(CommonConstants.TWO_INT == pushType){
LambdaUpdateWrapper<TInsuranceSettle> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceSettle :: getId,tInsuranceEkp.getDefaultSettleId())
.set(TInsuranceSettle :: getIsActualPush,CommonConstants.ONE_INT)
.set(TInsuranceSettle :: getActualPushTime, LocalDateTime.now());
tInsuranceSettleService.update(updateWrapper);
}
//结算月则变更结算月
if(CommonConstants.THREE_INT == pushType){
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceDetail :: getId,tInsuranceEkp.getDetailId())
.set(TInsuranceDetail :: getSettleMonth,tInsuranceEkp.getSettleMonth())
.set(TInsuranceDetail :: getUpdateTime, LocalDateTime.now());
tInsuranceDetailService.update(updateWrapper);
}
tInsuranceEkp.setResendFlag(CommonConstants.ONE_INT);
successLit.add(tInsuranceEkp);
}else{
break;
}
}else{
//如果为作废信息,已结算和结算中发送红冲数据
if(CommonConstants.FOUR_INT == pushType){
//预估保费
BigDecimal estimatePremium = ekpParam.getEstimatePremium();
//实际保费
BigDecimal actualPremium = ekpParam.getActualPremium();
if(!BigDecimalUtils.isNullOrZero(estimatePremium)){
ekpParam.setEstimatePremium(estimatePremium.negate());
}
if(!BigDecimalUtils.isNullOrZero(actualPremium)){
ekpParam.setActualPremium(actualPremium.negate());
}
ekpParam.setInteractiveType(CommonConstants.ONE_INT);
String s = EKPUtil.sendToEKP(ekpParam);
if(StringUtils.isNotBlank(s)){
tInsuranceEkp.setResendFlag(CommonConstants.ONE_INT);
successLit.add(tInsuranceEkp);
}else{
break;
}
//如果为红冲数据则正常发送
}else if(CommonConstants.FIVE_INT == pushType || CommonConstants.SIX_INT == pushType){
String s = EKPUtil.sendToEKP(ekpParam);
if(StringUtils.isNotBlank(s)){
tInsuranceEkp.setResendFlag(CommonConstants.ONE_INT);
successLit.add(tInsuranceEkp);
}else{
break;
}
}else{
tInsuranceEkp.setResendFlag(CommonConstants.TWO_INT);
failList.add(tInsuranceEkp);
}
}
}
updateBatchById(successLit);
updateBatchById(failList);
return R.ok("发送成功");
}else{
return R.failed("无需要发送的信息");
}
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -7,13 +7,12 @@ 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.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEnclosureMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEnclosureService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEnclosureMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEnclosureService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceEnclosureParam;
import lombok.extern.slf4j.Slf4j;
......@@ -54,6 +53,7 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
*/
@Override
public R uploadInsuranceEnclosure(MultipartFile file, String filePath, String remark) throws IOException {
YifuUser user = SecurityUtils.getUser();
if(Common.isEmpty(file)){
return R.failed(InsurancesConstants.INSURANCE_ENCLOSURE_IS_EMPTY);
}
......@@ -85,8 +85,10 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
insuranceEnclosure.setRemark(remark);
}
}
insuranceEnclosure.setEnclosureName(enclosureName);
insuranceEnclosure.setEnclosureName(file.getOriginalFilename());
insuranceEnclosure.setEnclosureAddress(key);
insuranceEnclosure.setCreateName(user.getNickname());
insuranceEnclosure.setCreateTime(LocalDateTime.now());
try {
this.save(insuranceEnclosure);
} catch (Exception e) {
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceOperateMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceOperateMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceOperateService;
import org.springframework.stereotype.Service;
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceRefundMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceRefundService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceRefundMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceRefundService;
import org.springframework.stereotype.Service;
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceReplaceMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceReplaceService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceReplaceMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceReplaceService;
import org.springframework.stereotype.Service;
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettleCancel;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceSettleCancelMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceSettleCancelService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceSettleCancelMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleCancelService;
import org.springframework.stereotype.Service;
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceSettleMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceSettleMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService;
import org.springframework.stereotype.Service;
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.conditions.update.UpdateChainWrapper;
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;
......@@ -11,10 +10,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeRateMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeRateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceTypeRateMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceTypeRateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -67,7 +66,7 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R deleteInsuranceTypeRate(String id) {
YifuUser user = SecurityUtils.getUser();
if(Common.isEmpty(id)){
......@@ -95,7 +94,7 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R saveInsuranceTypeRate(TInsuranceTypeRate insuranceTypeRate) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(insuranceTypeRate)){
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -12,10 +12,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceTypeMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceCompanyService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo;
import org.apache.commons.lang3.StringUtils;
......@@ -61,7 +61,7 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R saveInsuranceType(TInsuranceType insuranceType) {
if(Common.isEmpty(insuranceType)){
return R.failed("新增的险种信息为空");
......@@ -136,7 +136,7 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R updateInsuranceType(TInsuranceType insuranceType) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(insuranceType.getId())){
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
......@@ -9,15 +9,13 @@ 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.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeStandardMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeStandardService;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceTypeStandardMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceTypeStandardService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
......@@ -71,7 +69,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R deleteInsuranceTypeStandard(String id) {
YifuUser user = SecurityUtils.getUser();
if(Common.isEmpty(id)){
......@@ -98,7 +96,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R saveInsuranceTypeStandard(TInsuranceTypeStandard insuranceTypeStandard) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(insuranceTypeStandard)){
......
......@@ -10,17 +10,19 @@ spring:
port: 22379
password: '@yf_2017'
datasource:
insurances:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/mvp_insurances?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
jdbc-url: jdbc:mysql://192.168.1.65:22306/mvp_insurances?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
ekp:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: hroread
password: 123456
jdbc-url: jdbc:mysql://119.96.192.73:3306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
......
<?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.ekp.EkpSettleMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo">
<id property="id" column="fd_id" jdbcType="VARCHAR"/>
<result property="detailId" column="fd_3b05ba46bb042e" jdbcType="VARCHAR"/>
<result property="estimateStatus" column="fd_3b05ba4808a3ca" jdbcType="VARCHAR"/>
<result property="actualStatus" column="fd_3b05bd5ed0b976" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
fd_id,fd_3b05ba46bb042e,fd_3b05ba4808a3ca,fd_3b05bd5ed0b976
</sql>
<select id="getSettle" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from
ekp_f80727b647a403b975ae
where
fd_3b05ba46bb042e = #{id}
</select>
</mapper>
......@@ -2,7 +2,7 @@
<!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.TInsuranceCompanyMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceCompanyMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceDetailMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetailMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceEkpMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEkpMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp">
<id property="id" column="id" jdbcType="VARCHAR"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceEnclosureMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEnclosureMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure">
<id property="id" column="ID" jdbcType="INTEGER"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceOperateMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceOperateMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceRefundMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceRefundMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund">
<id property="id" column="ID" jdbcType="BIGINT"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceReplaceMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceReplaceMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceSettleCancelMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceSettleCancelMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettleCancel">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceSettleMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceSettleMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceTypeMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceTypeMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceTypeRateMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceTypeRateMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......
......@@ -2,7 +2,7 @@
<!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.TInsuranceTypeStandardMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceTypeStandardMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......
......@@ -157,13 +157,6 @@ public class SysMessageSalary extends BaseEntity {
@ExcelAttribute(name = "应发工资")
@ExcelProperty("应发工资")
private BigDecimal relaySalary;
/**
* 反馈
*/
@ExcelAttribute(name = "反馈", maxLength = 300)
@Length(max = 300, message = "反馈不能超过300个字符")
@ExcelProperty("反馈")
private String feedback;
/**
* 有忽略提醒 0:忽略 1:不忽略
*/
......@@ -199,5 +192,5 @@ public class SysMessageSalary extends BaseEntity {
@Schema(description = "反馈原因", name = "reasonType")
@ExcelAttribute(name = "反馈原因", maxLength = 32)
@ExcelProperty(value = "反馈原因")
private Integer feedBack;
private String feedBack;
}
......@@ -46,7 +46,6 @@ public class TStatisticsDeclarer {
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("ID")
private String id;
/**
* 申报单位
......@@ -84,13 +83,6 @@ public class TStatisticsDeclarer {
@Length(max = 11, message = "手机号码不能超过11个字符")
@ExcelProperty("手机号码")
private String empPhone;
/**
* 人员状态
*/
@ExcelAttribute(name = "人员状态", maxLength = 2,readConverterExp = "0=在职,1=离职")
@Length(max = 2, message = "人员状态不能超过2个字符")
@ExcelProperty("人员状态")
private String empStatus;
/**
* 任职受雇从业类型
*/
......
......@@ -36,7 +36,7 @@ import java.time.LocalDateTime;
* @date 2022-08-05 11:40:14
*/
@Data
public class SysMessageSalaryExportVo extends SysMessageSalary {
public class SysMessageSalaryExportVo {
/**
* 客户名称
*/
......@@ -46,12 +46,12 @@ public class SysMessageSalaryExportVo extends SysMessageSalary {
@ExcelProperty("客户名称")
private String customerName;
/**
* 部门名称
* 项目名称
*/
@ExcelAttribute(name = "部门名称", isNotEmpty = true, errorInfo = "部门名称不能为空", maxLength = 50)
@NotBlank(message = "部门名称不能为空")
@Length(max = 50, message = "部门名称不能超过50个字符")
@ExcelProperty("部门名称")
@ExcelAttribute(name = "项目名称", isNotEmpty = true, errorInfo = "项目名称不能为空", maxLength = 50)
@NotBlank(message = "项目名称不能为空")
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
private String departName;
/**
* 员工姓名
......@@ -61,20 +61,26 @@ public class SysMessageSalaryExportVo extends SysMessageSalary {
@ExcelProperty("员工姓名")
private String employeeName;
/**
* employeeIdnum
* 身份证号
*/
@ExcelAttribute(name = "employeeIdnum", maxLength = 50)
@Length(max = 50, message = "employeeIdnum不能超过50个字符")
@ExcelProperty("employeeIdnum")
@ExcelAttribute(name = "身份证号", maxLength = 50)
@Length(max = 50, message = "身份证号身份证号")
@ExcelProperty("身份证号")
private String employeeIdnum;
/**
* 工资月
*/
@ExcelAttribute(name = "工资月", maxLength = 10)
@Length(max = 10, message = "工资月不能超过10个字符")
@ExcelProperty("工资月")
@ExcelProperty("工资月")
private String salaryMonth;
/**
* 应发工资
*/
@ExcelAttribute(name = "应发工资")
@ExcelProperty("应发工资")
private BigDecimal relaySalary;
/**
* 实发工资
*/
......@@ -82,30 +88,24 @@ public class SysMessageSalaryExportVo extends SysMessageSalary {
@NotBlank(message = "实发工资不能为空")
@ExcelProperty("实发工资")
private BigDecimal actualSalary;
/**
* 应发工资
*/
@ExcelAttribute(name = "应发工资")
@ExcelProperty("应发工资")
private BigDecimal relaySalary;
/**
* 省
*/
@ExcelAttribute(name = "省")
@ExcelProperty("省")
private Integer province;
@ExcelAttribute(name = "省", isArea = true)
@ExcelProperty("项目-省")
private String province;
/**
* 市
*/
@ExcelAttribute(name = "市")
@ExcelProperty("市")
private Integer city;
@ExcelAttribute(name = "市", isArea = true,parentField = "province")
@ExcelProperty("项目-市")
private String city;
/**
* 县
*/
@ExcelAttribute(name = "县")
@ExcelProperty("县")
private Integer town;
@ExcelAttribute(name = "县", isArea = true,parentField = "city")
@ExcelProperty("项目-县")
private String town;
/**
* 最低工资标准
*/
......@@ -119,22 +119,14 @@ public class SysMessageSalaryExportVo extends SysMessageSalary {
@ExcelAttribute(name = "工资制表人-创建人", maxLength = 32)
@Length(max = 32, message = "工资制表人-创建人不能超过32个字符")
@ExcelProperty("创建人")
private String salaryMakeMan;
private String createName;
/**
* 反馈
*/
@ExcelAttribute(name = "反馈", maxLength = 300)
@Length(max = 300, message = "反馈不能超过300个字符")
@ExcelProperty("反馈")
@ExcelProperty("反馈原因")
private String feedback;
/**
* 原因大类 根据数据字典来判断
*/
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "reasonType")
@ExcelAttribute(name = "原因大类", errorInfo = "原因大类不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = true)
private Integer reasonType;
}
......@@ -20,7 +20,7 @@ import java.io.Serializable;
* @Version 1.0
*/
@Data
public class THaveSalaryNoSocialExportVo extends THaveSalaryNosocial implements Serializable {
public class THaveSalaryNoSocialExportVo implements Serializable {
/**
* 客户名称
......@@ -73,6 +73,13 @@ public class THaveSalaryNoSocialExportVo extends THaveSalaryNosocial implements
@ExcelProperty(value = "应发工资")
private String relaySalary;
/**
* 创建者-姓名
*/
@Schema(description = "创建人-姓名")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建人")
private String createName;
/**
* 反馈原因
*/
......@@ -81,11 +88,4 @@ public class THaveSalaryNoSocialExportVo extends THaveSalaryNosocial implements
@ExcelProperty(value = "反馈原因")
private String feedBack;
/**
* 创建者-姓名
*/
@Schema(description = "创建人-姓名")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建人")
private String createName;
}
......@@ -33,7 +33,7 @@ import java.math.BigDecimal;
* @date 2022-08-14 21:31:15
*/
@Data
public class TStatisticsBonusImportVo extends RowIndex implements Serializable {
public class TStatisticsBonusImportVo implements Serializable {
/**
* 员工姓名
......
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -88,4 +89,9 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
**/
List<String> getAccountYearCheckList();
List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList")List<String> idList);
int noPageCountDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList")List<String> idList);
}
......@@ -963,7 +963,28 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List<TSalaryAccountItem> backList = new ArrayList<>();
if (itemList != null && !itemList.isEmpty()) {
for (TSalaryAccountItem item : itemList) {
if (("3".equals(item.getFormType()) || "4".equals(item.getFormType()))
if (("3".equals(item.getFormType()))
&& settleMonth.equals(item.getSettlementMonth())) {
backList.add(item);
}
}
}
return backList;
}
/**
* @param itemList
* @param settleMonth
* @Description: 循环获取符合条件的报账
* @Author: hgw
* @Date: 2022/1/27 17:32
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>
**/
private List<TSalaryAccountItem> getRemuAsList(List<TSalaryAccountItem> itemList, String settleMonth) {
List<TSalaryAccountItem> backList = new ArrayList<>();
if (itemList != null && !itemList.isEmpty()) {
for (TSalaryAccountItem item : itemList) {
if (("4".equals(item.getFormType()))
&& settleMonth.equals(item.getSettlementMonth())) {
backList.add(item);
}
......@@ -1871,9 +1892,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
//累计扣税list
asList = this.getLaborAsList(itemMap.get(a.getEmpIdcard()), a.getSettlementMonth());
asList = this.getRemuAsList(itemMap.get(a.getEmpIdcard()), a.getSettlementMonth());
// 实发劳务费,按月累计扣税
// 实发稿酬,按月累计扣税
this.saveNewItems(sai, saiList, SalaryConstants.SALARY_TAX,
SalaryConstants.SALARY_TAX_JAVA,
calculationRemu(saiList, asList
......@@ -1955,31 +1976,22 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
actualSalarySumNow = actualSalarySumNow.add(item.getSalaryMoney());
}
}
// 历史实发、个税
for (TSalaryAccountItem item : itemHistoryList) {
if (SalaryConstants.SALARY_TAX_JAVA.equals(item.getJavaFiedName())) {
sumTax = sumTax.add(item.getSalaryMoney());
}
}
//个人税费
BigDecimal nowTaxT = BigDecimal.ZERO;
BigDecimal relaySalary;
nowTaxT = getNowTaxRemu(actualSalarySumNow);
relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxT).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
a.setSalaryTaxUnit(nowTaxT);
a.setActualSalary(actualSalarySumNow);
a.setRelaySalaryUnit(relaySalary);
a.setSalaryTax(nowTaxT);
a.setActualSalary(relaySalary);
a.setRelaySalaryUnit(actualSalarySumNow);
a.setRelaySalary(actualSalarySumNow);
if (sumTax.compareTo(BigDecimal.ZERO) != 0) {
nowTaxT = BigDecimalUtils.safeSubtract(nowTaxT, sumTax).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
}
// 本次个人应发合计
TSalaryAccountItem sai = new TSalaryAccountItem();
sai.setCnName(SalaryConstants.RELAY_SALARY);
sai.setJavaFiedName(SalaryConstants.RELAY_SALARY_JAVA);
sai.setIsTax(CommonConstants.ZERO_INT);
sai.setSalaryMoney(relaySalary);
sai.setSalaryMoney(actualSalarySumNow);
saiList.add(sai);
return nowTaxT;
}
......
......@@ -150,7 +150,7 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
**/
@Override
public void listExport(HttpServletResponse response, SysMessageSalarySearchVo searchVo) {
String fileName = "最低工资提醒导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "最低工资提醒查询批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<SysMessageSalaryExportVo> list = new ArrayList<>();
// TODO
......@@ -246,7 +246,7 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
return R.failed("允许创建人反馈信息!");
}
entity.setReasonType(reasonType);
entity.setFeedback(feedBack);
entity.setFeedBack(feedBack);
int res = baseMapper.updateById(entity);
if (res == CommonConstants.ONE_INT_NEGATE){
return R.failed(CommonConstants.SAVE_FAILED);
......
......@@ -191,7 +191,7 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
**/
@Override
public void listExport(HttpServletResponse response, THaveSalaryNosocialSearchVo searchVo) {
String fileName = "消息提醒导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "有工资无社保查询批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<THaveSalaryNoSocialExportVo> list = new ArrayList<>();
// TODO
......
......@@ -74,7 +74,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
*/
@Override
public void listExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo) {
String fileName = "员工报账批量导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "员工报账查询批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TSalaryAccount> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
......@@ -133,28 +133,11 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
@Override
public List<TSalaryAccount> noPageDiy(TSalaryAccountSearchVo searchVo) {
LambdaQueryWrapper<TSalaryAccount> wrapper = buildQueryWrapper(searchVo);
if (Common.isNotNull(searchVo.getIdList())) {
wrapper.in(TSalaryAccount::getId, searchVo.getIdList());
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
wrapper.orderByDesc(TSalaryAccount::getSalaryMonth);
return baseMapper.selectList(wrapper);
}
private Long noPageCountDiy(TSalaryAccountSearchVo searchVo) {
LambdaQueryWrapper<TSalaryAccount> wrapper = buildQueryWrapper(searchVo);
if (Common.isNotNull(searchVo.getIdList())) {
wrapper.in(TSalaryAccount::getId, searchVo.getIdList());
}
return baseMapper.selectCount(wrapper);
return baseMapper.noPageDiy(searchVo,searchVo.getIdList());
}
private LambdaQueryWrapper buildQueryWrapper(TSalaryAccountSearchVo entity) {
LambdaQueryWrapper<TSalaryAccount> wrapper = Wrappers.lambdaQuery();
return wrapper;
private int noPageCountDiy(TSalaryAccountSearchVo searchVo) {
return baseMapper.noPageCountDiy(searchVo,searchVo.getIdList());
}
@Override
......
......@@ -91,7 +91,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
*/
@Override
public void listExport(HttpServletResponse response, TSalaryEmployeeSearchVo searchVo) {
String fileName = "薪酬人员批量导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "薪酬人员查询批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TSalaryEmployeeExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
......
......@@ -102,7 +102,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
*/
@Override
public void listExport(HttpServletResponse response, TSalaryStandardSearchVo searchVo) {
String fileName = "项目薪酬查询导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "项目薪酬查询批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TSalaryStandardExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
......@@ -161,13 +161,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Override
public List<TSalaryStandardExportVo> noPageDiy(TSalaryStandardSearchVo searchVo) {
List<String> idList = Common.getList(searchVo.getIds());
return baseMapper.getSalaryStandardExport(searchVo,idList);
return baseMapper.getSalaryStandardExport(searchVo,Common.getList(searchVo.getIds()));
}
private int noPageCountDiy(TSalaryStandardSearchVo searchVo) {
List<String> idList = Common.getList(searchVo.getIds());
return baseMapper.getSalaryStandardExportCount(searchVo,idList);
return baseMapper.getSalaryStandardExportCount(searchVo,Common.getList(searchVo.getIds()));
}
@Override
......
......@@ -186,7 +186,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsBonus.class).build();
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsBonusImportVo.class).build();
int index = 0;
//个税配置
List<TSalaryTaxConfig> personTax = tSalaryTaxConfigService.getTaxConfigByPersonList(new TSalaryTaxConfig());
......
......@@ -29,14 +29,20 @@ 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.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
......@@ -54,7 +60,12 @@ import java.util.List;
*/
@Log4j2
@Service
@EnableConfigurationProperties(DaprArchivesProperties.class)
public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDeclarerMapper, TStatisticsDeclarer> implements TStatisticsDeclarerService {
@Autowired
private DaprArchivesProperties archivesProperties;
/**
* 申报对象表简单分页查询
* @param tStatisticsDeclarer 申报对象表
......@@ -175,6 +186,18 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
String lastYear = lastMonth.substring(0,4);
List<TStatisticsDeclarer> stdvoList = baseMapper.doStatisticsTaxDeclarer(nowMonth,lastYear);
for (TStatisticsDeclarer declarer : stdvoList) {
if (Common.isNotNull(declarer.getDeclareUnit())) {
R<TSettleDomainSelectVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/tsettledomain/inner/getSettleDomainVoById", declarer.getDeclareUnit(), TSettleDomainSelectVo.class, SecurityConstants.FROM_IN);
// 结算主体
TSettleDomainSelectVo dept = null;
if (sdr != null && sdr.getData() != null) {
dept = sdr.getData();
}
if (Common.isNotNull(dept)) {
declarer.setDeclareUnit(dept.getBusinessSubjectName());
}
}
this.save(declarer);
}
return R.ok();
......@@ -264,16 +287,12 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
}
private void importTStatisticsDeclarer(List<TStatisticsDeclarerVo> excelVOList, List<ErrorMessage> errorMessageList) {
int successInt = 0;
int failuerInt = 0;
List<TStatisticsDeclarerVo> updateList = new ArrayList<>();
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
TStatisticsDeclarerVo excel = excelVOList.get(i);
if (CommonConstants.ONE_STRING.equals(excel.getIsDeclare()) && Common.isEmpty(excel.getUndeclareReason())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "本期是否申报为否时,不申报原因不可为空"));
failuerInt++;
continue;
}
......@@ -288,14 +307,10 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
tStatisticsDeclarer.setUndeclareReason(excel.getUndeclareReason());
}
baseMapper.updateById(tStatisticsDeclarer);
successInt++;
}else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到身份证和申报月份对应的申报人员信息"));
failuerInt++;
continue;
}
}
errorMessageList.add(new ErrorMessage(-1, "成功操作" + successInt +"条数据," + "失败"
+ failuerInt + "条数据"));
}
}
......@@ -254,6 +254,11 @@ public class SalaryAccountUtil implements Serializable {
cellValueBig = new BigDecimal(cellValueStr);
cellValueBig = cellValueBig.setScale(2, BigDecimal.ROUND_HALF_UP); //四舍五入
if (cellValueBig.toString().length() > 11) {
if (cellValueBig.toString().length() > 500) {
errorFlag = false;
errorList.add(new ErrorMessage((i + 2), "文本超长!"));
continue;
}
sai.setTextValue(cellValueBig.toString());
} else {
sai.setSalaryMoney(cellValueBig);
......
......@@ -21,6 +21,18 @@
<result property="customerId" column="CUSTOMER_ID"/>
<result property="customerName" column="CUSTOMER_NAME"/>
</resultMap>
<resultMap id="sysMessageSalaryExportMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryExportVo">
<result property="actualSalary" column="actual_salary"/>
<result property="salaryBase" column="salary_base"/>
<result property="salaryMonth" column="salary_month"/>
<result property="employeeName" column="employee_name"/>
<result property="employeeIdnum" column="employee_idnum"/>
<result property="province" column="province"/>
<result property="city" column="city"/>
<result property="town" column="town"/>
<result property="departName" column="DEPART_NAME"/>
<result property="customerName" column="CUSTOMER_NAME"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.actual_salary,
......@@ -39,9 +51,12 @@
a.DEPART_NAME,
a.DEPART_NO,
a.type,
a.FEEDBACK,
a.FEED_BACK,
a.CUSTOMER_NAME,
a.CUSTOMER_ID
a.CUSTOMER_ID,
a.REASON_TYPE,
a.CREATE_BY,
a.CREATE_NAME
</sql>
<sql id="sysMessageSalary_where">
<if test="sysMessageSalary != null">
......@@ -158,7 +173,7 @@
employee_id,
employee_name,
employee_idnum,
salary_make_man,
create_by,
province,
city,
town,
......@@ -180,7 +195,7 @@
a.SETTLEMENT_MONTH settle_month,
sum(i.SALARY_MONEY) AS actual_salary,
sum(l.SALARY_MONEY) AS relay_Salary,
s.CREATE_USER AS salary_make_man,
s.createBy AS create_by,
min(IFNULL(t.salary_base,c.salary_base)) AS salary_base,
a.PROVINCE,
a.CITY,
......@@ -262,7 +277,7 @@
<!--noPageDiy查询-->
<select id="noPageDiy" resultMap="sysMessageSalaryMap">
<select id="noPageDiy" resultMap="sysMessageSalaryExportMap">
SELECT
<include refid="Base_Column_List"/>,
b.*
......@@ -305,7 +320,7 @@
and 1=2
</if>
</if>
<if test="settleDomainVos == null">
<if test="settleDomainIds == null">
and 1=1
</if>
<if test='sql != null and sql != ""'>
......
......@@ -12,6 +12,7 @@
<result property="settlementOrganName" column="SETTLEMENT_ORGAN_NAME"/>
<result property="settlementOrganNo" column="SETTLEMENT_ORGAN_NO"/>
<result property="feedBack" column="FEEDBACK"/>
<result property="reasonType" column="REASON_TYPE"/>
<result property="month" column="month"/>
</resultMap>
<resultMap id="haveSalaryNoSocialExportMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNoSocialExportVo">
......@@ -39,7 +40,8 @@
a.SETTLE_MONTH,
a.relay_salary,
a.FEEDBACK,
a.CREATE_NAME
a.CREATE_NAME,
a.REASON_TYPE
</sql>
<sql id="tHaveSalaryNosocial_where">
<if test="tHaveSalaryNosocial != null">
......@@ -85,6 +87,7 @@
<!--tHaveSalaryNosocial简单分页查询-->
<select id="getTHaveSalaryNosocialPage" resultMap="tHaveSalaryNosocialMap">
SELECT
a.id,
a.employee_name,
a.employee_id_card,
a.CUSTOMER_NAME,
......@@ -209,8 +212,11 @@
<include refid="Base_Column_List"/>
,b.*
FROM t_have_salary_nosocial a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<include refid="export_where"/>
</where>
</select>
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
......@@ -242,7 +248,7 @@
and 1=2
</if>
</if>
<if test="settleDomainVos == null">
<if test="settleDomainIds == null">
and 1=1
</if>
<if test='sql != null and sql != ""'>
......
......@@ -255,8 +255,9 @@
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="tSalaryAccount_where"/>
</where>
order by a.CREATE_TIME desc
......@@ -352,4 +353,165 @@
from t_salary_account a
where a.DELETE_FLAG = 0 and a.FORM_TYPE = '0' and a.SALARY_MONTH like concat(DATE_FORMAT(NOW(), '%Y'), '%')
</select>
<select id="noPageDiy" resultMap="tSalaryAccountMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount">
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="where_export"/>
ORDER BY a.CREATE_TIME desc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
</if>
</if>
</where>
</select>
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="where_export"/>
</where>
</select>
<sql id="where_export">
<if test="idList != null and idList.size>0">
AND a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="searchVo != null">
<if test="searchVo.id != null and searchVo.id.trim() != ''">
AND a.ID = #{searchVo.id}
</if>
<if test="searchVo.invoiceTitle != null and searchVo.invoiceTitle.trim() != ''">
AND a.INVOICE_TITLE = #{searchVo.invoiceTitle}
</if>
<if test="searchVo.salaryFormId != null and searchVo.salaryFormId.trim() != ''">
AND a.SALARY_FORM_ID = #{searchVo.salaryFormId}
</if>
<if test="searchVo.salaryMonth != null and searchVo.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{searchVo.salaryMonth}
</if>
<if test="searchVo.empId != null and searchVo.empId.trim() != ''">
AND a.EMP_ID = #{searchVo.empId}
</if>
<if test="searchVo.empName != null and searchVo.empName.trim() != ''">
AND a.EMP_NAME = #{searchVo.empName}
</if>
<if test="searchVo.empIdcard != null and searchVo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{searchVo.empIdcard}
</if>
<if test="searchVo.bankNo != null and searchVo.bankNo.trim() != ''">
AND a.BANK_NO = #{searchVo.bankNo}
</if>
<if test="searchVo.bankName != null and searchVo.bankName.trim() != ''">
AND a.BANK_NAME = #{searchVo.bankName}
</if>
<if test="searchVo.deptId != null and searchVo.deptId.trim() != ''">
AND a.DEPT_ID = #{searchVo.deptId}
</if>
<if test="searchVo.deptNo != null and searchVo.deptNo.trim() != ''">
AND a.DEPT_NO = #{searchVo.deptNo}
</if>
<if test="searchVo.deptName != null and searchVo.deptName.trim() != ''">
AND a.DEPT_NAME = #{searchVo.deptName}
</if>
<if test="searchVo.salaryStyle != null and searchVo.salaryStyle.trim() != ''">
AND a.SALARY_STYLE = #{searchVo.salaryStyle}
</if>
<if test="searchVo.salaryGiveTime != null and searchVo.salaryGiveTime.trim() != ''">
AND a.SALARY_GIVE_TIME = #{searchVo.salaryGiveTime}
</if>
<if test="searchVo.distributionFlag != null and searchVo.distributionFlag.trim() != ''">
AND a.DISTRIBUTION_FLAG = #{searchVo.distributionFlag}
</if>
<if test="searchVo.deduSocialMonth != null and searchVo.deduSocialMonth.trim() != ''">
AND a.DEDU_SOCIAL_MONTH = #{searchVo.deduSocialMonth}
</if>
<if test="searchVo.deduProvidentMonth != null and searchVo.deduProvidentMonth.trim() != ''">
AND a.DEDU_PROVIDENT_MONTH = #{searchVo.deduProvidentMonth}
</if>
<if test="searchVo.formType != null and searchVo.formType.trim() != ''">
AND a.FORM_TYPE = #{searchVo.formType}
</if>
<if test="searchVo.settlementMonth != null and searchVo.settlementMonth.trim() != ''">
AND a.SETTLEMENT_MONTH = #{searchVo.settlementMonth}
</if>
<if test="searchVo.deleteFlag != null">
AND a.DELETE_FLAG = #{searchVo.deleteFlag}
</if>
<if test="searchVo.socialPriority != null and searchVo.socialPriority.trim() != ''">
AND a.SOCIAL_PRIORITY = #{searchVo.socialPriority}
</if>
<if test="searchVo.fundPriority != null and searchVo.fundPriority.trim() != ''">
AND a.FUND_PRIORITY = #{searchVo.fundPriority}
</if>
<if test="searchVo.annualBonusType != null and searchVo.annualBonusType.trim() != ''">
AND a.ANNUAL_BONUS_TYPE = #{searchVo.annualBonusType}
</if>
<if test="searchVo.taxMonth != null and searchVo.taxMonth.trim() != ''">
AND a.TAX_MONTH = #{searchVo.taxMonth}
</if>
<if test="searchVo.isDeductSocial != null and searchVo.isDeductSocial.trim() != ''">
AND a.IS_DEDUCT_SOCIAL = #{searchVo.isDeductSocial}
</if>
<if test="searchVo.isDeductFund != null and searchVo.isDeductFund.trim() != ''">
AND a.IS_DEDUCT_FUND = #{searchVo.isDeductFund}
</if>
<if test="searchVo.province != null">
AND a.PROVINCE = #{searchVo.province}
</if>
<if test="searchVo.city != null">
AND a.CITY = #{searchVo.city}
</if>
<if test="searchVo.town != null">
AND a.TOWN = #{searchVo.town}
</if>
<if test="searchVo.empPhone != null and searchVo.empPhone.trim() != ''">
AND a.EMP_PHONE = #{searchVo.empPhone}
</if>
<if test="searchVo.ownFlag != null">
AND a.OWN_FLAG = #{searchVo.ownFlag}
</if>
<if test="searchVo.isRepeat != null">
AND a.IS_REPEAT = #{searchVo.isRepeat}
</if>
<if test="searchVo.bankSubName != null and searchVo.bankSubName.trim() != ''">
AND a.BANK_SUB_NAME = #{searchVo.bankSubName}
</if>
<if test="searchVo.bankProvince != null">
AND a.BANK_PROVINCE = #{searchVo.bankProvince}
</if>
<if test="searchVo.bankCity != null">
AND a.BANK_CITY = #{searchVo.bankCity}
</if>
<if test="searchVo.isPersonTax != null and searchVo.isPersonTax.trim() != ''">
AND a.IS_PERSON_TAX = #{searchVo.isPersonTax}
</if>
<if test="searchVo.relaySalary != null">
AND a.RELAY_SALARY = #{searchVo.relaySalary}
</if>
<if test="searchVo.actualSalary != null">
AND a.ACTUAL_SALARY = #{searchVo.actualSalary}
</if>
<if test="searchVo.salaryTax != null">
AND a.SALARY_TAX = #{searchVo.salaryTax}
</if>
<if test="searchVo.relaySalaryUnit != null">
AND a.RELAY_SALARY_UNIT = #{searchVo.relaySalaryUnit}
</if>
<if test="searchVo.salaryTaxUnit != null">
AND a.SALARY_TAX_UNIT = #{searchVo.salaryTaxUnit}
</if>
</if>
</sql>
</mapper>
......@@ -260,7 +260,7 @@
<where>
a.DELETE_FLAG = 0
<!-- 薪资是否可查看 0 是 1否-->
and d.CAN_SEE= 0
and (d.CAN_SEE = 0 OR d.id is null)
<include refid="tSalaryStandard_where"/>
</where>
ORDER BY a.CREATE_TIME desc
......@@ -271,10 +271,26 @@
<include refid="Base_Column_List"/>
FROM t_salary_standard a
<where>
a.DELETE_FLAG = 0
<include refid="where_page"/>
1=1
AND a.DELETE_FLAG = 0
<if test="tSalaryStandard != null">
<if test="tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''">
AND a.DEPT_NAME = #{tSalaryStandard.deptName}
</if>
<if test="tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''">
AND a.DEPT_NO = #{tSalaryStandard.deptNo}
</if>
<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if test="tSalaryStandard.status == null">
AND a.STATUS = 1 OR a.STATUS = 2 or a.STATUS = 5
</if>
<if test="tSalaryStandard.status != null">
AND a.STATUS = #{tSalaryStandard.status}
</if>
</if>
</where>
ORDER BY a.CREATE_TIME desc
</select>
<resultMap id="salaryStandardExportMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo">
<result property="status" column="STATUS"/>
......@@ -309,15 +325,15 @@
FROM t_salary_standard a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND d.CAN_SEE = 0
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="where_export"/>
</where>
ORDER BY a.CREATE_TIME desc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
</if>
</if>
</where>
</select>
<!--tSalaryStandard简单分页查询-->
<select id="getSalaryStandardExportCount" resultType="java.lang.Integer">
......@@ -326,7 +342,7 @@
FROM t_salary_standard a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND d.CAN_SEE = 0
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="where_export"/>
</where>
</select>
......
......@@ -30,7 +30,6 @@
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empPhone" column="EMP_PHONE"/>
<result property="empStatus" column="EMP_STATUS"/>
<result property="occupationType" column="OCCUPATION_TYPE"/>
<result property="occupationMonth" column="OCCUPATION_MONTH"/>
<result property="isDeclare" column="IS_DECLARE"/>
......@@ -43,7 +42,6 @@
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_PHONE,
a.EMP_STATUS,
a.OCCUPATION_TYPE,
a.OCCUPATION_MONTH,
a.IS_DECLARE,
......@@ -69,9 +67,6 @@
<if test="tStatisticsDeclarer.empPhone != null and tStatisticsDeclarer.empPhone.trim() != ''">
AND a.EMP_PHONE = #{tStatisticsDeclarer.empPhone}
</if>
<if test="tStatisticsDeclarer.empStatus != null and tStatisticsDeclarer.empStatus.trim() != ''">
AND a.EMP_STATUS = #{tStatisticsDeclarer.empStatus}
</if>
<if test="tStatisticsDeclarer.occupationType != null and tStatisticsDeclarer.occupationType.trim() != ''">
AND a.OCCUPATION_TYPE = #{tStatisticsDeclarer.occupationType}
</if>
......@@ -101,11 +96,11 @@
<!--统计-->
<select id="doStatisticsTaxDeclarer" resultMap="tStatisticsDeclarerMap">
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,b.FILE_STATUS EMP_STATUS,
b.UNIT_NAME DECLARE_UNIT,'雇员' OCCUPATION_TYPE
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,b.UNIT_ID DECLARE_UNIT,
if(a.FORM_TYPE=0,'雇员',if(a.FORM_TYPE=3 or a.FORM_TYPE=4,'其他','-')) OCCUPATION_TYPE
from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID
where a.DELETE_FLAG = '0' and a.SETTLEMENT_MONTH like '${lastYear}%'
GROUP BY a.EMP_IDCARD
GROUP BY a.EMP_IDCARD,OCCUPATION_TYPE,b.UNIT_ID,a.SETTLEMENT_MONTH
</select>
</mapper>
......@@ -200,8 +200,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return R.failed("已推送至结算平台禁止删除!");
}
if (CommonConstants.TWO_STRING.equals(paymentInfo.getSalaryFundFlag()) ||
CommonConstants.TWO_STRING.equals(paymentInfo.getSalarySocialFlag())) {
if (CommonConstants.ONE_STRING.equals(paymentInfo.getSalaryFundFlag()) ||
CommonConstants.ONE_STRING.equals(paymentInfo.getSalarySocialFlag())) {
return R.failed("该数据已与薪资结算,禁止删除");
}
baseMapper.deleteById(id);
......@@ -225,8 +225,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
CommonConstants.ZERO_STRING.equals(paymentInfo.getPushStatus())) {
return R.failed("存在不符合条件的数据(已推送至结算平台或非本人创建),禁止删除!");
}
if (CommonConstants.TWO_STRING.equals(paymentInfo.getSalaryFundFlag()) ||
CommonConstants.TWO_STRING.equals(paymentInfo.getSalarySocialFlag())) {
if (CommonConstants.ONE_STRING.equals(paymentInfo.getSalaryFundFlag()) ||
CommonConstants.ONE_STRING.equals(paymentInfo.getSalarySocialFlag())) {
return R.failed("存在不符合条件的数据(已与薪资结算),禁止删除");
}
baseMapper.deleteById(id);
......
......@@ -2258,6 +2258,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
importVo.setWorkingHours(preInfo.getWorkingHoursAdd());
importVo.setEmpNational(CommonConstants.ONE_STRING);
importVo.setEducationName(CommonConstants.FIVE_STRING);
importVo.setTrustRemark("预派单");
if (null != preInfo.getPensionBase()){
importVo.setRecordBase(preInfo.getPensionBase());
}
......
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