Commit 85da8e24 authored by zhaji's avatar zhaji

"feature-zhaJi:ekp数据源增加,调整各个环节代码的包路径"

parent ef20be85
......@@ -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:
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
insurances:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
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"/>
......
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