Commit 16c262ef authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

"feature-zhaJi:修复创建时间等bug"

See merge request fangxinjiang/yifu!200
parents 6c622785 c6a77358
......@@ -88,6 +88,7 @@ public class EKPUtil {
TInsuranceSettlePushParam pushParam = insuranceDetail2PushParam(param);
try{
String formValues = new ObjectMapper().writeValueAsString(pushParam);
log.info("formValues:"+formValues);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject loginName = new JSONObject();
......@@ -104,7 +105,7 @@ public class EKPUtil {
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm.add("formValues", formValues);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
System.out.println("wholeForm:"+wholeForm);
//System.out.println("wholeForm:"+wholeForm);
HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
......
......@@ -2,9 +2,12 @@ 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.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.config.MybatisPlusMetaObjectHandler;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.plugins.YifuPaginationInnerInterceptor;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.SqlSessionTemplate;
......@@ -101,7 +104,7 @@ public class EkpDataSourceConfig {
@Bean
public MybatisPlusInterceptor ekpPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
interceptor.addInnerInterceptor(new YifuPaginationInnerInterceptor());
return interceptor;
}
}
......@@ -2,9 +2,13 @@ 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.core.config.GlobalConfig;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.config.MybatisPlusMetaObjectHandler;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.plugins.YifuPaginationInnerInterceptor;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
......@@ -38,19 +42,29 @@ public class InsurancesDataSourceConfig {
}
@Bean
public SqlSessionFactory insurancesSqlSessionFactory(@Qualifier("insurancesDataSource") DataSource dataSource) throws Exception {
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
//多数据源 myMetaObjectHandler不起作用问题解决
GlobalConfig globalConfig = new GlobalConfig();
globalConfig.setMetaObjectHandler(new MybatisPlusMetaObjectHandler());
globalConfig.setDbConfig(new GlobalConfig.DbConfig());
bean.setGlobalConfig(globalConfig);
//添加XML目录
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
try {
bean.setMapperLocations(resolver.getResources("classpath:mapper/insurances/*.xml"));
//分页插件配置,不配置分页插件无效,否则会出现total为0的情况
bean.setPlugins(insurancesPlusInterceptor());
SqlSessionFactory sqlSessionFactory = bean.getObject();
assert sqlSessionFactory != null;
sqlSessionFactory.getConfiguration().setMapUnderscoreToCamelCase(true);
return bean.getObject();
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
/* MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
MybatisConfiguration configuration = new MybatisConfiguration();
......@@ -77,7 +91,7 @@ public class InsurancesDataSourceConfig {
@Bean
public MybatisPlusInterceptor insurancesPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
interceptor.addInnerInterceptor(new YifuPaginationInnerInterceptor());
return interceptor;
}
}
......@@ -3102,7 +3102,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< RefundExportListVo >}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(RefundExportListParam param){
YifuUser user = SecurityUtils.getUser();
List<RefundExportListVo> refundExportList;
......@@ -3175,7 +3175,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R updateInsuranceRefund(InsuranceRefundListParam insuranceDetail) {
Integer refundType = insuranceDetail.getRefundType();
if(CommonConstants.THREE_INT != refundType && CommonConstants.FOUR_INT != refundType){
......@@ -3252,7 +3252,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param
* @return void
*/
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
@Override
public R insuranceRefundImport(List<InsuranceHandleImportParam> insuranceRefundImportList) {
YifuUser user = SecurityUtils.getUser();
......@@ -3309,7 +3309,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param
* @return void
*/
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
@Override
public R settleMonthChange(List<SettleMonthChangeCheckParam> settleMonthCheckList) {
//初始化线程池
......@@ -3388,7 +3388,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R deptChange(List<DeptChangeCheckParam> deptChangeCheckList) {
//初始化线程池
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(50, 50, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<>(10));
......@@ -3965,7 +3965,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R updateIsUse(String id) {
YifuUser user = SecurityUtils.getUser();
TInsuranceDetail insuranceDetail = getById(id);
......
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