Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
c6a77358
Commit
c6a77358
authored
Aug 26, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:修复创建时间等bug"
parent
6c622785
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
9 deletions
+27
-9
EKPUtil.java
.../com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
+2
-1
EkpDataSourceConfig.java
...d/plus/v1/yifu/insurances/config/EkpDataSourceConfig.java
+4
-1
InsurancesDataSourceConfig.java
...v1/yifu/insurances/config/InsurancesDataSourceConfig.java
+15
-1
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+6
-6
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
View file @
c6a77358
...
@@ -88,6 +88,7 @@ public class EKPUtil {
...
@@ -88,6 +88,7 @@ public class EKPUtil {
TInsuranceSettlePushParam
pushParam
=
insuranceDetail2PushParam
(
param
);
TInsuranceSettlePushParam
pushParam
=
insuranceDetail2PushParam
(
param
);
try
{
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
pushParam
);
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
pushParam
);
log
.
info
(
"formValues:"
+
formValues
);
//指向EKP的接口url
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject
loginName
=
new
JSONObject
();
JSONObject
loginName
=
new
JSONObject
();
...
@@ -104,7 +105,7 @@ public class EKPUtil {
...
@@ -104,7 +105,7 @@ public class EKPUtil {
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm
.
add
(
"formValues"
,
formValues
);
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
//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
();
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/config/EkpDataSourceConfig.java
View file @
c6a77358
...
@@ -2,9 +2,12 @@ package com.yifu.cloud.plus.v1.yifu.insurances.config;
...
@@ -2,9 +2,12 @@ package com.yifu.cloud.plus.v1.yifu.insurances.config;
import
com.baomidou.mybatisplus.annotation.DbType
;
import
com.baomidou.mybatisplus.annotation.DbType
;
import
com.baomidou.mybatisplus.core.MybatisConfiguration
;
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.MybatisPlusInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
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.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.mybatis.spring.SqlSessionTemplate
;
...
@@ -101,7 +104,7 @@ public class EkpDataSourceConfig {
...
@@ -101,7 +104,7 @@ public class EkpDataSourceConfig {
@Bean
@Bean
public
MybatisPlusInterceptor
ekpPlusInterceptor
()
{
public
MybatisPlusInterceptor
ekpPlusInterceptor
()
{
MybatisPlusInterceptor
interceptor
=
new
MybatisPlusInterceptor
();
MybatisPlusInterceptor
interceptor
=
new
MybatisPlusInterceptor
();
interceptor
.
addInnerInterceptor
(
new
PaginationInnerInterceptor
(
DbType
.
MYSQL
));
interceptor
.
addInnerInterceptor
(
new
YifuPaginationInnerInterceptor
(
));
return
interceptor
;
return
interceptor
;
}
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/config/InsurancesDataSourceConfig.java
View file @
c6a77358
...
@@ -2,9 +2,13 @@ package com.yifu.cloud.plus.v1.yifu.insurances.config;
...
@@ -2,9 +2,13 @@ package com.yifu.cloud.plus.v1.yifu.insurances.config;
import
com.baomidou.mybatisplus.annotation.DbType
;
import
com.baomidou.mybatisplus.annotation.DbType
;
import
com.baomidou.mybatisplus.core.MybatisConfiguration
;
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.MybatisPlusInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
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.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
...
@@ -38,19 +42,29 @@ public class InsurancesDataSourceConfig {
...
@@ -38,19 +42,29 @@ public class InsurancesDataSourceConfig {
}
}
@Bean
@Bean
public
SqlSessionFactory
insurancesSqlSessionFactory
(
@Qualifier
(
"insurancesDataSource"
)
DataSource
dataSource
)
throws
Exception
{
public
SqlSessionFactory
insurancesSqlSessionFactory
(
@Qualifier
(
"insurancesDataSource"
)
DataSource
dataSource
)
throws
Exception
{
MybatisSqlSessionFactoryBean
bean
=
new
MybatisSqlSessionFactoryBean
();
MybatisSqlSessionFactoryBean
bean
=
new
MybatisSqlSessionFactoryBean
();
bean
.
setDataSource
(
dataSource
);
bean
.
setDataSource
(
dataSource
);
//多数据源 myMetaObjectHandler不起作用问题解决
GlobalConfig
globalConfig
=
new
GlobalConfig
();
globalConfig
.
setMetaObjectHandler
(
new
MybatisPlusMetaObjectHandler
());
globalConfig
.
setDbConfig
(
new
GlobalConfig
.
DbConfig
());
bean
.
setGlobalConfig
(
globalConfig
);
//添加XML目录
//添加XML目录
ResourcePatternResolver
resolver
=
new
PathMatchingResourcePatternResolver
();
ResourcePatternResolver
resolver
=
new
PathMatchingResourcePatternResolver
();
try
{
try
{
bean
.
setMapperLocations
(
resolver
.
getResources
(
"classpath:mapper/insurances/*.xml"
));
bean
.
setMapperLocations
(
resolver
.
getResources
(
"classpath:mapper/insurances/*.xml"
));
//分页插件配置,不配置分页插件无效,否则会出现total为0的情况
//分页插件配置,不配置分页插件无效,否则会出现total为0的情况
bean
.
setPlugins
(
insurancesPlusInterceptor
());
bean
.
setPlugins
(
insurancesPlusInterceptor
());
SqlSessionFactory
sqlSessionFactory
=
bean
.
getObject
();
assert
sqlSessionFactory
!=
null
;
sqlSessionFactory
.
getConfiguration
().
setMapUnderscoreToCamelCase
(
true
);
return
bean
.
getObject
();
return
bean
.
getObject
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
/* MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
/* MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
bean.setDataSource(dataSource);
MybatisConfiguration configuration = new MybatisConfiguration();
MybatisConfiguration configuration = new MybatisConfiguration();
...
@@ -77,7 +91,7 @@ public class InsurancesDataSourceConfig {
...
@@ -77,7 +91,7 @@ public class InsurancesDataSourceConfig {
@Bean
@Bean
public
MybatisPlusInterceptor
insurancesPlusInterceptor
()
{
public
MybatisPlusInterceptor
insurancesPlusInterceptor
()
{
MybatisPlusInterceptor
interceptor
=
new
MybatisPlusInterceptor
();
MybatisPlusInterceptor
interceptor
=
new
MybatisPlusInterceptor
();
interceptor
.
addInnerInterceptor
(
new
PaginationInnerInterceptor
(
DbType
.
MYSQL
));
interceptor
.
addInnerInterceptor
(
new
YifuPaginationInnerInterceptor
(
));
return
interceptor
;
return
interceptor
;
}
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
c6a77358
...
@@ -3102,7 +3102,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3102,7 +3102,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< RefundExportListVo >}
* @return {@link List< RefundExportListVo >}
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
public
R
<
List
<
RefundExportListVo
>>
getInsuranceRefundHandlingList
(
RefundExportListParam
param
){
public
R
<
List
<
RefundExportListVo
>>
getInsuranceRefundHandlingList
(
RefundExportListParam
param
){
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
RefundExportListVo
>
refundExportList
;
List
<
RefundExportListVo
>
refundExportList
;
...
@@ -3175,7 +3175,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3175,7 +3175,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
* @return {@link R}
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
public
R
updateInsuranceRefund
(
InsuranceRefundListParam
insuranceDetail
)
{
public
R
updateInsuranceRefund
(
InsuranceRefundListParam
insuranceDetail
)
{
Integer
refundType
=
insuranceDetail
.
getRefundType
();
Integer
refundType
=
insuranceDetail
.
getRefundType
();
if
(
CommonConstants
.
THREE_INT
!=
refundType
&&
CommonConstants
.
FOUR_INT
!=
refundType
){
if
(
CommonConstants
.
THREE_INT
!=
refundType
&&
CommonConstants
.
FOUR_INT
!=
refundType
){
...
@@ -3252,7 +3252,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3252,7 +3252,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param
* @param
* @return void
* @return void
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
@Override
@Override
public
R
insuranceRefundImport
(
List
<
InsuranceHandleImportParam
>
insuranceRefundImportList
)
{
public
R
insuranceRefundImport
(
List
<
InsuranceHandleImportParam
>
insuranceRefundImportList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
...
@@ -3309,7 +3309,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3309,7 +3309,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param
* @param
* @return void
* @return void
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
@Override
@Override
public
R
settleMonthChange
(
List
<
SettleMonthChangeCheckParam
>
settleMonthCheckList
)
{
public
R
settleMonthChange
(
List
<
SettleMonthChangeCheckParam
>
settleMonthCheckList
)
{
//初始化线程池
//初始化线程池
...
@@ -3388,7 +3388,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3388,7 +3388,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
* @return {@link R}
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
public
R
deptChange
(
List
<
DeptChangeCheckParam
>
deptChangeCheckList
)
{
public
R
deptChange
(
List
<
DeptChangeCheckParam
>
deptChangeCheckList
)
{
//初始化线程池
//初始化线程池
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
50
,
50
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
50
,
50
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
...
@@ -3965,7 +3965,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3965,7 +3965,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
* @return {@link R}
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
public
R
updateIsUse
(
String
id
)
{
public
R
updateIsUse
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
TInsuranceDetail
insuranceDetail
=
getById
(
id
);
TInsuranceDetail
insuranceDetail
=
getById
(
id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment