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
84af33b5
Commit
84af33b5
authored
Sep 19, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
9952d89d
3631d97c
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
803 additions
and
814 deletions
+803
-814
PersonVo.java
.../yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
+1
-1
PersonAttributesMapper.java
...us/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
+0
-3
LdapUtil.java
...om/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
+11
-18
ldapConfig.properties
...yifu-common-ldap/src/main/resources/ldapConfig.properties
+1
-1
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+39
-2
InsuranceExportListParam.java
.../plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
+2
-7
InsuranceListParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
+2
-7
InsuranceRefundHandlingParam.java
...s/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
+2
-7
InsuranceRefundParam.java
...loud/plus/v1/yifu/insurances/vo/InsuranceRefundParam.java
+2
-1
InsuredParam.java
...m/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
+2
-5
RefundExportListParam.java
...oud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
+2
-7
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+0
-10
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+638
-684
TInsuranceEkpServiceImpl.java
...nces/service/insurance/impl/TInsuranceEkpServiceImpl.java
+31
-11
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+48
-25
THaveSalaryNoSocialExportVo.java
...d/plus/v1/yifu/salary/vo/THaveSalaryNoSocialExportVo.java
+4
-4
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+5
-4
SysDeptServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
+3
-3
SysUserServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
+5
-7
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+5
-7
No files found.
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
View file @
84af33b5
...
...
@@ -10,7 +10,7 @@ import java.util.Date;
@Data
@ToString
@Entry
(
objectClasses
=
{
"posixAccount"
,
"top"
,
"inetOrgPerson"
},
base
=
"ou=
安徽皖信人力资源管理有限公司
,ou=wanxin"
)
@Entry
(
objectClasses
=
{
"posixAccount"
,
"top"
,
"inetOrgPerson"
},
base
=
"ou=
皖信人力集团
,ou=wanxin"
)
public
class
PersonVo
{
/**
...
...
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
View file @
84af33b5
...
...
@@ -28,9 +28,6 @@ public class PersonAttributesMapper implements AttributesMapper<PersonVo> {
if
(
null
!=
attributes
.
get
(
"ou"
))
{
personVo
.
setDeptName
((
String
)
attributes
.
get
(
"ou"
).
get
());
}
if
(
null
!=
attributes
.
get
(
"userPassword"
))
{
personVo
.
setPassword
((
String
)
attributes
.
get
(
"userPassword"
).
get
());
}
return
personVo
;
}
}
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
View file @
84af33b5
...
...
@@ -10,7 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.ldap.core.LdapTemplate
;
import
javax.naming.AuthenticationException
;
import
javax.naming.Context
;
import
javax.naming.NamingEnumeration
;
import
javax.naming.NamingException
;
...
...
@@ -36,7 +35,7 @@ public class LdapUtil {
private
static
LdapContext
ctx
=
null
;
private
static
Control
[]
connCtls
=
null
;
private
static
final
Control
[]
connCtls
=
null
;
/**
* @return List<SearchResultEntry>
...
...
@@ -45,16 +44,14 @@ public class LdapUtil {
* @description get请求获取指定对象信息
**/
public
List
<
SearchResultEntry
>
getAllPersonNamesWithTraditionalWay
()
{
List
<
SearchResultEntry
>
result
=
new
ArrayList
<
SearchResultEntry
>();
List
<
SearchResultEntry
>
result
=
new
ArrayList
<>();
try
{
LDAPConnection
connection
=
new
LDAPConnection
(
ldapProperties
.
getUrl
(),
ldapProperties
.
getPort
(),
ldapProperties
.
getUserName
(),
ldapProperties
.
getPassword
());
SearchRequest
searchRequest
=
new
SearchRequest
(
ldapProperties
.
getBaseDn
(),
SearchScope
.
SUB
,
"(objectclass=*)"
);
searchRequest
.
addControl
(
new
SubentriesRequestControl
());
SearchResult
searchResult
=
connection
.
search
(
searchRequest
);
for
(
SearchResultEntry
entry
:
searchResult
.
getSearchEntries
())
{
result
.
add
(
entry
);
}
result
.
addAll
(
searchResult
.
getSearchEntries
());
}
catch
(
LDAPException
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -62,15 +59,14 @@ public class LdapUtil {
}
public
List
<
PersonVo
>
getAllPersons
()
{
List
<
PersonVo
>
list
=
ldapTemplate
.
search
(
query
()
return
ldapTemplate
.
search
(
query
()
.
where
(
"objectclass"
).
is
(
"posixAccount"
),
new
PersonAttributesMapper
());
return
list
;
}
// 校验用户名密码的方法
public
Boolean
authenticate
(
String
usr
,
String
pwd
)
{
boolean
valide
=
false
;
if
(
pwd
==
null
||
pwd
==
""
)
boolean
valide
;
if
(
pwd
==
null
||
""
.
equals
(
pwd
)
)
return
false
;
if
(
ctx
==
null
)
{
getCtx
();
...
...
@@ -85,9 +81,6 @@ public class LdapUtil {
ctx
.
reconnect
(
connCtls
);
valide
=
true
;
closeCtx
();
}
catch
(
AuthenticationException
e
)
{
log
.
error
(
userDN
+
" is not authenticated"
);
valide
=
false
;
}
catch
(
NamingException
e
)
{
log
.
error
(
userDN
+
" is not authenticated"
);
valide
=
false
;
...
...
@@ -99,7 +92,7 @@ public class LdapUtil {
if
(
ctx
!=
null
)
{
return
;
}
Hashtable
<
String
,
String
>
env
=
new
Hashtable
<
String
,
String
>();
Hashtable
<
String
,
String
>
env
=
new
Hashtable
<>();
env
.
put
(
Context
.
INITIAL_CONTEXT_FACTORY
,
"com.sun.jndi.ldap.LdapCtxFactory"
);
env
.
put
(
Context
.
PROVIDER_URL
,
"ldap://"
+
ldapProperties
.
getUrl
()
+
":"
+
ldapProperties
.
getPort
()
+
"/"
+
ldapProperties
.
getDn
());
...
...
@@ -120,7 +113,7 @@ public class LdapUtil {
}
public
String
getUserDN
(
String
uid
)
{
String
userDN
=
""
;
String
Builder
userDN
=
new
StringBuilder
()
;
try
{
SearchControls
constraints
=
new
SearchControls
();
constraints
.
setSearchScope
(
SearchControls
.
SUBTREE_SCOPE
);
...
...
@@ -129,13 +122,13 @@ public class LdapUtil {
Object
obj
=
en
.
nextElement
();
if
(
obj
instanceof
javax
.
naming
.
directory
.
SearchResult
)
{
javax
.
naming
.
directory
.
SearchResult
si
=
(
javax
.
naming
.
directory
.
SearchResult
)
obj
;
userDN
+=
si
.
getName
(
);
userDN
+=
","
+
ldapProperties
.
getDn
(
);
userDN
.
append
(
si
.
getName
()
);
userDN
.
append
(
","
).
append
(
ldapProperties
.
getDn
()
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
userDN
;
return
userDN
.
toString
()
;
}
}
yifu-common/yifu-common-ldap/src/main/resources/ldapConfig.properties
View file @
84af33b5
...
...
@@ -3,4 +3,4 @@ ldap.port=389
ldap.userName
=
cn=admin,dc=worfu,dc=com
ldap.password
=
yifu123456!
ldap.dn
=
dc=worfu,dc=com
ldap.baseDn
=
ou=
\u
5B89
\u
5FBD
\u7696\u
4FE1
\u
4EBA
\u
529B
\u
8D44
\u
6E90
\u
7BA1
\u7406\u6709\u9650\u
516C
\u
53F8,ou=wanxin,dc=worfu,dc=com
\ No newline at end of file
ldap.baseDn
=
ou=
\u7696\u
4FE1
\u
4EBA
\u
529B
\u
96C6
\u
56E2,ou=wanxin,dc=worfu,dc=com
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
84af33b5
...
...
@@ -1102,12 +1102,12 @@ public class InsurancesConstants {
public
static
final
String
GET_DEPT_DETAIL_ERROR
=
"获取项目信息失败:"
;
/**
*
获取项目信息失败
*
errorList
*/
public
static
final
String
ERROR_LIST
=
"errorList"
;
/**
*
获取项目信息失败
*
successList
*/
public
static
final
String
SUCCESS_LIST
=
"successList"
;
...
...
@@ -1116,6 +1116,43 @@ public class InsurancesConstants {
*/
public
static
final
String
OSS_ERROR
=
"OSS文件上传接口异常:"
;
/**EKP异常重发失败原因*/
/**
* 商险不存在或已被删除
*/
public
static
final
String
EKP_INSURANCE_IS_DELETE_OR_EMPTY
=
"商险不存在或已被删除"
;
/**
* 结算类型发生变更
*/
public
static
final
String
EKP_SETTLE_TYPE_IS_CHANGE
=
"结算类型发生变更"
;
/**
* 结算id发生变更
*/
public
static
final
String
EKP_SETTLE_ID_IS_CHANGE
=
"结算id发生变更"
;
/**
* 预估结算信息已发送
*/
public
static
final
String
EKP_ESTIMATE_IS_PUSH
=
"预估结算信息已发送"
;
/**
* 实缴结算信息已发送
*/
public
static
final
String
EKP_ACTUAL_IS_PUSH
=
"实缴结算信息已发送"
;
/**
* 预估费用已进行结算
*/
public
static
final
String
EKP_ESTIMATE_STATUS_ERROR
=
"预估费用已进行结算"
;
/**
* 实缴费用已进行结算
*/
public
static
final
String
EKP_ACTUAL_STATUS_ERROR
=
"实缴费用已进行结算"
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
View file @
84af33b5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -13,7 +14,7 @@ import java.util.List;
*/
@Data
@Schema
(
description
=
"导出办理请求参数"
)
public
class
InsuranceExportListParam
implements
Serializable
{
public
class
InsuranceExportListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
/**
...
...
@@ -46,12 +47,6 @@ public class InsuranceExportListParam implements Serializable {
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
* 购买类型, 1新增、3批增、4替换
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
View file @
84af33b5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -13,7 +14,7 @@ import java.util.List;
*/
@Data
@Schema
(
description
=
"投保列表请求参数"
)
public
class
InsuranceListParam
implements
Serializable
{
public
class
InsuranceListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4692341622141432288L
;
/**
...
...
@@ -70,12 +71,6 @@ public class InsuranceListParam implements Serializable {
@Schema
(
description
=
"项目编码列表"
)
private
List
<
String
>
deptNoList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
* 保单办理人
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
View file @
84af33b5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
...
...
@@ -13,7 +14,7 @@ import java.io.Serializable;
*/
@Data
@Tag
(
name
=
"减员办理查询条件"
)
public
class
InsuranceRefundHandlingParam
implements
Serializable
{
public
class
InsuranceRefundHandlingParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
...
...
@@ -77,12 +78,6 @@ public class InsuranceRefundHandlingParam implements Serializable {
@Schema
(
description
=
"是否过期 0未过期 1已过期"
)
private
Integer
isOverdue
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
* 办理人
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundParam.java
View file @
84af33b5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
...
...
@@ -14,7 +15,7 @@ import java.util.List;
*/
@Data
@Tag
(
name
=
"已减员查询列表参数"
)
public
class
InsuranceRefundParam
implements
Serializable
{
public
class
InsuranceRefundParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
View file @
84af33b5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
...
...
@@ -19,7 +16,7 @@ import java.util.List;
*/
@Data
@Tag
(
name
=
"已投保列表查询条件"
)
public
class
InsuredParam
implements
Serializable
{
public
class
InsuredParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
View file @
84af33b5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -13,7 +14,7 @@ import java.util.List;
*/
@Data
@Schema
(
description
=
"导出减员办理请求参数"
)
public
class
RefundExportListParam
implements
Serializable
{
public
class
RefundExportListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
/**
...
...
@@ -52,10 +53,4 @@ public class RefundExportListParam implements Serializable {
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
84af33b5
...
...
@@ -206,16 +206,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
List
<
TInsuranceDetail
>
selectListByEmpIdcardNo
(
String
empIdcardNo
);
/**
* 查数据是否存在权限范围内
*
* @author zhaji
* @param regionSql
* @param id
* @return {@link TInsuranceDetail}
*/
TInsuranceDetail
selectByRegionSql
(
@Param
(
"regionSql"
)
String
regionSql
,
@Param
(
"id"
)
String
id
);
/**
* 商险订单减员列表查询
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
84af33b5
...
...
@@ -19,6 +19,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
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.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
...
...
@@ -101,6 +102,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource
private
SocialDaprUtils
socialDaprUtils
;
@Resource
private
MenuUtil
menuUtil
;
/***********************商险办理********************************/
/**
...
...
@@ -190,6 +193,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
IPage
<
InsuranceListVO
>
getInsuranceListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
IPage
<
InsuranceListVO
>
insuranceList
=
new
Page
<>();
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
...
...
@@ -250,11 +254,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
IPage
<
InsuranceListVO
>
getInsuranceHandleListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
IPage
<
InsuranceListVO
>
iPage
=
new
Page
<>();
YifuUser
user
=
SecurityUtils
.
getUser
();
String
regionSQL
=
getRegionSQL
(
user
);
if
(
StringUtils
.
isBlank
(
regionSQL
)){
return
iPage
;
}
param
.
setRegionSql
(
regionSQL
);
menuUtil
.
setAuthSql
(
user
,
param
);
Integer
buyHandleStatus
=
param
.
getBuyHandleStatus
();
if
(
buyHandleStatus
==
CommonConstants
.
TWO_INT
||
buyHandleStatus
==
CommonConstants
.
THREE_INT
){
param
.
setUpdateBy
(
user
.
getId
());
...
...
@@ -650,13 +650,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -673,26 +673,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -877,12 +877,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
R
<
List
<
InsuranceExportListVO
>>
getInsuranceExportList
(
InsuranceExportListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
InsuranceExportListVO
>
insuranceExportList
=
new
ArrayList
<>();
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
if
(
StringUtils
.
isBlank
(
regionSQL
)){
return
R
.
ok
(
insuranceExportList
);
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
insuranceExportList
=
baseMapper
.
getInsuranceExportListBySelect
(
param
.
getIdList
());
...
...
@@ -1024,7 +1020,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
for
(
TInsuranceDetail
detail
:
detailList
)
{
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
||
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
){
||
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
){
InsuranceListVO
listVO
=
new
InsuranceListVO
();
BeanCopyUtils
.
copyProperties
(
detail
,
listVO
);
listVO
.
setErrorMessage
(
InsurancesConstants
.
REDUCE_ROLLBACK_IS_NOT_ALLOW
);
...
...
@@ -1355,23 +1351,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateBatchById
(
successList
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
threadPool
.
execute
(()
->
{
//根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
for
(
TInsuranceDetail
tInsuranceDetail
:
successList
)
{
Integer
settleType
=
tInsuranceDetail
.
getSettleType
();
//如果是合并计算则推送至EKP
if
(
CommonConstants
.
ZERO_INT
==
settleType
){
//存储成功后发送给EKP
String
s
=
pushEstimate
(
tInsuranceDetail
,
CommonConstants
.
ONE_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
LambdaUpdateWrapper
<
TInsuranceSettle
>
settleWrapper
=
new
LambdaUpdateWrapper
<>();
settleWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceDetail
.
getDefaultSettleId
())
.
set
(
TInsuranceSettle
::
getIsEstimatePush
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
());
//更新结算信息表
tInsuranceSettleService
.
update
(
settleWrapper
);
//根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
for
(
TInsuranceDetail
tInsuranceDetail
:
successList
)
{
Integer
settleType
=
tInsuranceDetail
.
getSettleType
();
//如果是合并计算则推送至EKP
if
(
CommonConstants
.
ZERO_INT
==
settleType
){
//存储成功后发送给EKP
String
s
=
pushEstimate
(
tInsuranceDetail
,
CommonConstants
.
ONE_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
LambdaUpdateWrapper
<
TInsuranceSettle
>
settleWrapper
=
new
LambdaUpdateWrapper
<>();
settleWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceDetail
.
getDefaultSettleId
())
.
set
(
TInsuranceSettle
::
getIsEstimatePush
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
());
//更新结算信息表
tInsuranceSettleService
.
update
(
settleWrapper
);
}
}
}
}
});
}
//根据项目编码获取项目名称
...
...
@@ -1912,32 +1908,32 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码查询项目是否存在
try
{
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
param
.
getDeptNo
()));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isEmpty
(
data
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
ProjectSetInfoVo
projectSetInfoVo
=
data
.
get
(
param
.
getDeptNo
());
if
(
null
==
projectSetInfoVo
){
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isEmpty
(
data
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
//结算类型,根据项目编码获取,并冗余到明细记录中
String
settleType
=
projectSetInfoVo
.
getInsuranceSettleType
();
if
(
StringUtils
.
isEmpty
(
settleType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
PROJECT_NOT_FIND_SETTLE_TYPE
);
ProjectSetInfoVo
projectSetInfoVo
=
data
.
get
(
param
.
getDeptNo
());
if
(
null
==
projectSetInfoVo
){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setBpoFlag
(
projectSetInfoVo
.
getBpoFlag
());
param
.
setSettleType
(
Integer
.
parseInt
(
settleType
));
//结算类型,根据项目编码获取,并冗余到明细记录中
String
settleType
=
projectSetInfoVo
.
getInsuranceSettleType
();
if
(
StringUtils
.
isEmpty
(
settleType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
PROJECT_NOT_FIND_SETTLE_TYPE
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setBpoFlag
(
projectSetInfoVo
.
getBpoFlag
());
param
.
setSettleType
(
Integer
.
parseInt
(
settleType
));
}
}
}
}
}
}
catch
(
Exception
e
){
log
.
error
(
InsurancesConstants
.
GET_DEPT_DETAIL_ERROR
+
e
);
param
.
setErrorMessage
(
InsurancesConstants
.
GET_DEPT_DETAIL_ERROR
);
...
...
@@ -1989,7 +1985,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
...
...
@@ -2077,13 +2073,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -2103,26 +2099,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -2368,8 +2364,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
)*/
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
...
...
@@ -2488,13 +2484,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -2801,13 +2797,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -2826,26 +2822,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -2875,7 +2871,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceRegisterParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceRegisterParam
>
listSuccess
=
new
ArrayList
<>();
String
regionSQL
=
getRegionSQL
(
user
);
for
(
InsuranceRegisterParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()))
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
...
...
@@ -2956,13 +2951,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
else
{
//查数据是否存在权限范围内
TInsuranceDetail
detailByRegionSQL
=
this
.
baseMapper
.
selectByRegionSql
(
regionSQL
,
detail
.
getId
());
if
(!
Optional
.
ofNullable
(
detailByRegionSQL
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_UPDATE_DETAIL_JURISDICTION
);
listResult
.
add
(
param
);
continue
;
}
// 如果保费不存在,保单号、保费必填
if
(
detail
.
getActualPremium
()
==
null
){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyNo
())){
...
...
@@ -3143,19 +3131,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
insuranceList
)){
List
<
String
>
collect
=
insuranceList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
try
{
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceListVO
record
:
insuranceList
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceListVO
record
:
insuranceList
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
}
}
}
}
}
catch
(
Exception
e
){
for
(
InsuranceListVO
record
:
insuranceList
)
{
record
.
setProjectName
(
CommonConstants
.
EMPTY_STRING
);
record
.
setProjectName
(
CommonConstants
.
EMPTY_STRING
);
}
}
}
...
...
@@ -3173,19 +3161,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
public
void
addOperate
(
List
<
TInsuranceDetail
>
detailList
,
YifuUser
user
,
String
operateDesc
,
String
remark
,
Integer
displayFlag
){
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
detail
:
detailList
)
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
.
setRemark
(
remark
);
operate
.
setDisplayFlag
(
displayFlag
);
operate
.
setInsuranceDetailId
(
detail
.
getId
());
operate
.
setOperateDesc
(
operateDesc
);
operate
.
setCreateBy
(
user
.
getId
());
operate
.
setCreateName
(
user
.
getNickname
());
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operateList
.
add
(
operate
);
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
detail
:
detailList
)
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
.
setRemark
(
remark
);
operate
.
setDisplayFlag
(
displayFlag
);
operate
.
setInsuranceDetailId
(
detail
.
getId
());
operate
.
setOperateDesc
(
operateDesc
);
operate
.
setCreateBy
(
user
.
getId
());
operate
.
setCreateName
(
user
.
getNickname
());
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operateList
.
add
(
operate
);
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
}
}
...
...
@@ -3347,6 +3335,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
IPage
<
InsuredListVo
>
getInsuredListPage
(
Page
<
InsuredListVo
>
page
,
InsuredParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
String
>
deptList
=
getDeptNoList
(
user
);
IPage
<
InsuredListVo
>
insuranceList
=
new
Page
<>();
if
(
CollectionUtils
.
isEmpty
(
deptList
)){
...
...
@@ -3398,18 +3387,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuredList
.
stream
().
map
(
InsuredListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
try
{
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuredListVo
record
:
insuredList
)
{
//购买月数
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
)
{
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuredListVo
record
:
insuredList
)
{
//购买月数
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
)
{
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
}
}
}
}
}
catch
(
Exception
e
){
for
(
InsuredListVo
record
:
insuredList
)
{
record
.
setProjectName
(
CommonConstants
.
EMPTY_STRING
);
...
...
@@ -3430,6 +3419,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
R
getInsuranceRefundPageList
(
Page
<
InsuranceRefundParam
>
page
,
InsuranceRefundParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
String
>
deptList
=
getDeptNoList
(
user
);
if
(
CollectionUtils
.
isEmpty
(
deptList
)){
return
R
.
ok
(
"当前登录人无任何项目权限"
);
...
...
@@ -3511,13 +3501,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
IPage
<
RefundExportListVo
>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
InsuranceRefundHandlingParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
String
id
=
user
.
getId
();
Integer
reduceHandleStatus
=
param
.
getReduceHandleStatus
();
if
(
null
!=
reduceHandleStatus
&&
reduceHandleStatus
!=
CommonConstants
.
ONE_INT
){
param
.
setUpdateBy
(
id
);
}
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
IPage
<
RefundExportListVo
>
insuranceRefundHandlingPageList
=
this
.
baseMapper
.
getInsuranceRefundHandlingPageList
(
page
,
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundHandlingPageList
.
getRecords
())){
//根据项目编码获取项目名称
...
...
@@ -3550,9 +3539,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
})
public
R
getInsuranceRefundHandlingList
(
RefundExportListParam
param
){
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
RefundExportListVo
>
refundExportList
;
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
refundExportList
=
baseMapper
.
getRefundExportListBySelect
(
param
.
getIdList
());
...
...
@@ -3837,7 +3825,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
}
});
}
//操作记录
...
...
@@ -3868,102 +3856,214 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>(
16
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
threadPool
.
execute
(()
->
{
for
(
DeptChangeCheckParam
success
:
successList
)
{
//新的结算信息
TInsuranceSettle
newInsuranceSettle
=
new
TInsuranceSettle
();
//实际保费
BigDecimal
actualPremium
=
success
.
getActualPremium
();
//预估保费
BigDecimal
estimatePremium
=
success
.
getEstimatePremium
();
//EKP推送类
EkpInteractiveParam
interactiveParam
=
new
EkpInteractiveParam
();
TInsuranceDetail
one
=
getOne
(
lambdaQuery
().
getWrapper
().
eq
(
TInsuranceDetail:
:
getId
,
success
.
getId
()));
BeanCopyUtils
.
copyProperties
(
one
,
interactiveParam
);
interactiveParam
.
setDetailId
(
success
.
getId
());
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
Integer
oldSettleType
=
success
.
getOldSettleType
();
Integer
newSettleType
=
success
.
getNewSettleType
();
//更新新的项目编码,结算方式,预估保费,实际保费
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
success
.
getId
())
for
(
DeptChangeCheckParam
success
:
successList
)
{
//新的结算信息
TInsuranceSettle
newInsuranceSettle
=
new
TInsuranceSettle
();
//实际保费
BigDecimal
actualPremium
=
success
.
getActualPremium
();
//预估保费
BigDecimal
estimatePremium
=
success
.
getEstimatePremium
();
//EKP推送类
EkpInteractiveParam
interactiveParam
=
new
EkpInteractiveParam
();
TInsuranceDetail
one
=
getOne
(
lambdaQuery
().
getWrapper
().
eq
(
TInsuranceDetail:
:
getId
,
success
.
getId
()));
BeanCopyUtils
.
copyProperties
(
one
,
interactiveParam
);
interactiveParam
.
setDetailId
(
success
.
getId
());
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
Integer
oldSettleType
=
success
.
getOldSettleType
();
Integer
newSettleType
=
success
.
getNewSettleType
();
//更新新的项目编码,结算方式,预估保费,实际保费
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
success
.
getId
())
.
set
(
TInsuranceDetail
::
getDeptNo
,
success
.
getNewDeptNo
())
.
set
(
TInsuranceDetail
::
getSettleType
,
newSettleType
)
.
set
(
TInsuranceDetail
::
getActualPremium
,
actualPremium
)
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
estimatePremium
)
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
//更新项目编码
update
(
updateWrapper
);
//更换项目更新收入
TInsuranceDetail
income
=
getOne
(
lambdaQuery
().
getWrapper
().
eq
(
TInsuranceDetail:
:
getId
,
success
.
getId
()));
if
(
Common
.
isNotNull
(
income
))
{
if
(
income
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
)
{
//判断是否存在当月的商险收入数据
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setSourceId
(
income
.
getId
());
R
<
TIncomeDetailReturnVo
>
detailList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
)
&&
detailList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
detailList
.
getData
().
getDetailList
().
size
()
>
0
)
{
//原项目生成红冲数据
for
(
TIncomeDetail
detail
:
detailList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
detail1
);
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detail
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
//更新项目编码
update
(
updateWrapper
);
//更换项目更新收入
TInsuranceDetail
income
=
getOne
(
lambdaQuery
().
getWrapper
().
eq
(
TInsuranceDetail:
:
getId
,
success
.
getId
()));
if
(
Common
.
isNotNull
(
income
))
{
if
(
income
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
)
{
//判断是否存在当月的商险收入数据
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setSourceId
(
income
.
getId
());
R
<
TIncomeDetailReturnVo
>
detailList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
)
&&
detailList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
detailList
.
getData
().
getDetailList
().
size
()
>
0
)
{
//原项目生成红冲数据
for
(
TIncomeDetail
detail
:
detailList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
detail1
);
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detail
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
}
//新项目下生成收入数据
createInsuranceInfo
(
income
);
}
//新项目下生成收入数据
createInsuranceInfo
(
income
);
}
}
}
//商险id
String
insuranceDetailId
=
success
.
getId
();
//旧结算信息id
String
oldDefaultSettleId
=
success
.
getDefaultSettleId
();
//如果变更前为单独结算
if
(
CommonConstants
.
ONE_INT
==
oldSettleType
){
//登记了保单保费
if
(!
BigDecimalUtils
.
isNullOrZero
(
actualPremium
))
{
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
actualPremium
);
newInsuranceSettle
.
setEstimatePremium
(
estimatePremium
);
//存储新的结算信息
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
updateWrapper
.
set
(
TInsuranceDetail:
:
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
//更新新的结算信息
update
(
updateWrapper
);
//根据旧的结算id获取旧的结算信息
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
oldDefaultSettleId
);
//作废旧的数据,生成作废结算信息记录
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
insuranceDetailId
);
cancel
.
setSettleId
(
oldDefaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
cancel
.
setDeptName
(
success
.
getOldDeptName
());
cancel
.
setIsCancelPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettleCancelService
.
save
(
cancel
);
//如果已经推送过实际保费,则先作废,再推送新的实际保费
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
)
{
//推送至EKP执行作废操作
interactiveParam
.
setActualPremium
(
one
.
getActualPremium
());
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getOldDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
))
{
//推送成功更新作废推送状态
cancel
.
setIsCancelPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleCancelService
.
updateById
(
cancel
);
//商险id
String
insuranceDetailId
=
success
.
getId
();
//旧结算信息id
String
oldDefaultSettleId
=
success
.
getDefaultSettleId
();
//如果变更前为单独结算
if
(
CommonConstants
.
ONE_INT
==
oldSettleType
){
//登记了保单保费
if
(!
BigDecimalUtils
.
isNullOrZero
(
actualPremium
))
{
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
actualPremium
);
newInsuranceSettle
.
setEstimatePremium
(
estimatePremium
);
//存储新的结算信息
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
updateWrapper
.
set
(
TInsuranceDetail:
:
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
//更新新的结算信息
update
(
updateWrapper
);
//根据旧的结算id获取旧的结算信息
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
oldDefaultSettleId
);
//作废旧的数据,生成作废结算信息记录
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
insuranceDetailId
);
cancel
.
setSettleId
(
oldDefaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
cancel
.
setDeptName
(
success
.
getOldDeptName
());
cancel
.
setIsCancelPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettleCancelService
.
save
(
cancel
);
//如果已经推送过实际保费,则先作废,再推送新的实际保费
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
)
{
//推送至EKP执行作废操作
interactiveParam
.
setActualPremium
(
one
.
getActualPremium
());
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getOldDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
))
{
//推送成功更新作废推送状态
cancel
.
setIsCancelPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleCancelService
.
updateById
(
cancel
);
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
String
pushResult
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
pushResult
)){
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
//推送预估单
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
))
{
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
String
actualBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
actualBody
))
{
//推送成功后更新本地推送状态
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
else
{
//保存作废信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
//保存预估信息
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
//保存实缴信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
//变更后为单独结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
//保存预估信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
//保存实缴信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
else
{
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
//推送新的结算信息至EKP
...
...
@@ -3976,9 +4076,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
String
pushResult
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
pushResult
)){
String
addBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
addBody
)){
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
...
...
@@ -4033,239 +4132,225 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
else
{
//保存作废信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
//保存预估信息
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
//保存实缴信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
//变更后为单独结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
//保存预估信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
//保存实缴信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
else
{
}
//未登记保单保费
if
(
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
String
addBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
addBody
)){
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//变更项目且不做处理
}
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//生成预估结算信息
TInsuranceSettle
tInsuranceSettle
=
new
TInsuranceSettle
();
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
tInsuranceSettle
.
setEstimatePremium
(
estimatePremium
);
tInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
tInsuranceSettle
);
//将结算id赋值给保单信息,并新增预估费用
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
tInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
//推送预估单
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
))
{
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
String
actualBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
actualBody
))
{
//推送成功后更新本地推送状态
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
if
(
StringUtils
.
isNotBlank
(
estimateBody
)){
//推送成功后更新本地推送状态
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
}
//未登记保单保费
if
(
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//变更项目且不做处理
}
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//生成预估结算信息
TInsuranceSettle
tInsuranceSettle
=
new
TInsuranceSettle
();
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
tInsuranceSettle
.
setEstimatePremium
(
estimatePremium
);
tInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
tInsuranceSettle
);
//将结算id赋值给保单信息,并新增预估费用
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
//变更前为合并结算
if
(
CommonConstants
.
ZERO_INT
==
oldSettleType
){
//作废旧的结算信息
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
success
.
getId
());
cancel
.
setSettleId
(
oldDefaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
cancel
.
setDeptName
(
success
.
getOldDeptName
());
cancel
.
setIsCancelPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettleCancelService
.
save
(
cancel
);
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
oldDefaultSettleId
);
//如果已经登记保费
if
(!
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
//新增新的结算信息
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
success
.
getActualPremium
());
newInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
tInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
)){
//推送成功后更新本地推送状态
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
}
//变更前为合并结算
if
(
CommonConstants
.
ZERO_INT
==
oldSettleType
){
//作废旧的结算信息
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
success
.
getId
());
cancel
.
setSettleId
(
oldDefaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
cancel
.
setDeptName
(
success
.
getOldDeptName
());
cancel
.
setIsCancelPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettleCancelService
.
save
(
cancel
);
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
oldDefaultSettleId
);
//如果已经登记保费
if
(!
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
//新增新的结算信息
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
success
.
getActualPremium
());
newInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//如果预估和实缴都推送了
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//推送作废结算信息至EKP
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getOldDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
one
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
one
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
)){
//推送成功更新作废推送状态
cancel
.
setIsCancelPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleCancelService
.
updateById
(
cancel
);
//变更为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//更新预估费用为0.00
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0.00"
));
update
(
updateWrapper
);
//推送新的结算信息至EKP,推实际保费
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
String
actualBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
actualBody
)){
//推送成功,更新推送状态
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
//如果预估和实缴都推送了
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//推送作废结算信息至EKP
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getOldDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
one
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
one
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
)){
//推送成功更新作废推送状态
cancel
.
setIsCancelPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleCancelService
.
updateById
(
cancel
);
//变更为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//更新预估费用为0.00
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0.00"
));
update
(
updateWrapper
);
//推送新的结算信息至EKP,推实际保费
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
String
actualBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
actualBody
)){
//推送成功,更新推送状态
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
// 推送新的结算信息
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
//推送成功,更新预估和实际保费的推送状态
if
(
StringUtils
.
isNotBlank
(
estimateBody
))
{
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
String
actualBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
actualBody
))
{
//推送成功后更新本地推送状态
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
//变更为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//推送新的结算信息至EKP,推实际保费
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
//变更为单独结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
// 推送新的结算信息
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
// 推送新的结算信息
}
//如果预估已推送和实缴未推送
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//推送作废结算信息至EKP
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getOldDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
one
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
one
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
)){
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
...
...
@@ -4273,11 +4358,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
//推送预估单
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
//推送成功,更新预估和实际保费的推送状态
if
(
StringUtils
.
isNotBlank
(
estimateBody
))
{
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
...
...
@@ -4307,28 +4392,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
//变更为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//推送新的结算信息至EKP,推实际保费
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
//变更为单独结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
// 推送新的结算信息
}
else
{
//保存预估推送失败的数据
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
...
...
@@ -4340,28 +4405,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//
推送实缴单
//
保存实缴推送失败的数据
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
//如果预估已推送和实缴未推送
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//推送作废结算信息至EKP
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getOldDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
one
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
one
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
)){
//如果预估和实缴均未推送
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
...
...
@@ -4398,14 +4450,91 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
//如果没有登记保费
if
(
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
if
(
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getOldDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
one
.
getEstimatePremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
)){
//推送成功后更新作废信息推送状态
cancel
.
setIsCancelPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleCancelService
.
updateById
(
cancel
);
//变更为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//删除预估费用和结算id
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0.00"
));
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
null
);
update
(
updateWrapper
);
}
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//新增新的结算信息
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
//更新结算信息
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
)){
//推送成功更新预估推送状态
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
else
{
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
else
{
//
保存预估推送失败的数据
//
推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
...
...
@@ -4416,170 +4545,29 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//保存实缴推送失败的数据
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
//如果预估和实缴均未推送
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
//推送预估单
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
))
{
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
String
actualBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
actualBody
))
{
//推送成功后更新本地推送状态
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
)){
//推送成功更新预估推送状态
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
//如果没有登记保费
if
(
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
if
(
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getOldDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
one
.
getEstimatePremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
)){
//推送成功后更新作废信息推送状态
cancel
.
setIsCancelPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleCancelService
.
updateById
(
cancel
);
//变更为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//删除预估费用和结算id
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0.00"
));
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
null
);
update
(
updateWrapper
);
}
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//新增新的结算信息
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
//更新结算信息
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
)){
//推送成功更新预估推送状态
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
else
{
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
else
{
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
String
estimateBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
)){
//推送成功更新预估推送状态
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
//新增操作信息
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
success
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setDisplayFlag
(
CommonConstants
.
ZERO_INT
);
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
DEPT_CHANGE
);
operateList
.
add
(
insuranceOperate
);
}
//新增操作信息
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
success
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setDisplayFlag
(
CommonConstants
.
ZERO_INT
);
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
DEPT_CHANGE
);
operateList
.
add
(
insuranceOperate
);
}
});
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
...
...
@@ -5294,14 +5282,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
String
detailId
=
insuranceDetail
.
getId
();
//查数据是否存在权限范围内
String
regionSQL
=
getRegionSQL
(
user
);
TInsuranceDetail
detailByRegionSQL
=
this
.
baseMapper
.
selectByRegionSql
(
regionSQL
,
detailId
);
if
(!
Optional
.
ofNullable
(
detailByRegionSQL
).
isPresent
()
||
!
user
.
getId
().
equals
(
detailByRegionSQL
.
getUpdateBy
())){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
errorList
.
add
(
param
);
continue
;
}
if
(
flag
){
//减员办理
//投保办理状态
...
...
@@ -5898,32 +5878,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
deptList
;
}
/**
* 获取地市权限
*
* @author zhaji
* @param user
* @return {@link String}
*/
public
String
getRegionSQL
(
YifuUser
user
){
//todo 根据登录人获取其办理地SQL
String
id
=
user
.
getId
();
String
sql
;
//user_id=14, 合肥办理1
//user_id=15,合肥办理2
//user_id=16,上海办理
if
(
CommonConstants
.
FOURTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12) and detail.INSURANCE_HANDLE_CITY in (135)"
;
}
else
if
(
CommonConstants
.
FIFTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12) and detail.INSURANCE_HANDLE_CITY in (135)"
;
}
else
if
(
CommonConstants
.
SIXTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (9) and detail.INSURANCE_HANDLE_CITY in (109)"
;
}
else
{
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12,9) and detail.INSURANCE_HANDLE_CITY in (135,109)"
;
}
return
sql
;
}
/**
* 获取项目名称,客户编码,客户名称
*
...
...
@@ -6193,16 +6147,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
if
(
Common
.
isNotNull
(
incomeDetailList
))
{
for
(
TIncomeDetail
incomeDetailSum:
incomeDetailList
)
{
if
(!(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getFeeType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getMrSettleType
())))
{
isSum
=
3
;
break
;
}
if
(
Common
.
isNotNull
(
incomeDetailList
))
{
for
(
TIncomeDetail
incomeDetailSum:
incomeDetailList
)
{
if
(!(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getFeeType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getMrSettleType
())))
{
isSum
=
3
;
break
;
}
}
}
}
if
(!
isExist
||
isSum
==
3
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceEkpServiceImpl.java
View file @
84af33b5
...
...
@@ -61,7 +61,15 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
List
<
TInsuranceEkp
>
ekpRefundList
=
this
.
baseMapper
.
getEkpRefundList
();
if
(
CollectionUtils
.
isNotEmpty
(
ekpRefundList
)){
for
(
TInsuranceEkp
tInsuranceEkp
:
ekpRefundList
)
{
LambdaUpdateWrapper
<
TInsuranceEkp
>
ekpUpdate
=
new
LambdaUpdateWrapper
<>();
ekpUpdate
.
eq
(
TInsuranceEkp
::
getId
,
tInsuranceEkp
.
getId
());
TInsuranceDetail
byId
=
tInsuranceDetailService
.
getById
(
tInsuranceEkp
.
getDetailId
());
if
(
Common
.
isEmpty
(
byId
)){
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_INSURANCE_IS_DELETE_OR_EMPTY
);
update
(
ekpUpdate
);
continue
;
}
String
defaultSettleId
=
byId
.
getDefaultSettleId
();
String
s
=
null
;
String
settleType
=
tInsuranceEkp
.
getSettleType
();
...
...
@@ -82,8 +90,6 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
settleUpdate
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceEkp
.
getDefaultSettleId
());
LambdaUpdateWrapper
<
TInsuranceDetail
>
detailUpdate
=
new
LambdaUpdateWrapper
<>();
detailUpdate
.
eq
(
TInsuranceDetail
::
getId
,
tInsuranceEkp
.
getDetailId
());
LambdaUpdateWrapper
<
TInsuranceEkp
>
ekpUpdate
=
new
LambdaUpdateWrapper
<>();
ekpUpdate
.
eq
(
TInsuranceEkp
::
getId
,
tInsuranceEkp
.
getId
());
//ekp结算信息
SettleVo
settleVo
=
tInsuranceDetailService
.
getInsuranceDetailSettleStatus
(
tInsuranceEkp
.
getDetailId
(),
tInsuranceEkp
.
getDefaultSettleId
());
if
(
settleType
.
equals
(
CommonConstants
.
ZERO_STRING
)){
...
...
@@ -96,13 +102,13 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
//如果结算类型不一致,预估已推送,结算id不一致,结算信息不为空
if
(!
settleTypeEquals
||
!
settleIdEquals
||
!
estimatePush
){
if
(!
settleTypeEquals
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
CommonConstants
.
TWO_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_SETTLE_TYPE_IS_CHANGE
);
}
if
(!
settleIdEquals
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
CommonConstants
.
TWO_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_SETTLE_ID_IS_CHANGE
);
}
if
(!
estimatePush
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
CommonConstants
.
TWO_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_ESTIMATE_IS_PUSH
);
}
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
update
(
ekpUpdate
);
...
...
@@ -132,6 +138,15 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if
(
CommonConstants
.
TWO_INT
==
pushType
){
//如果结算类型不一致,实缴已推送,结算id不一致,则不再推送
if
(!
settleTypeEquals
||
!
actualPush
||
!
settleIdEquals
){
if
(!
settleTypeEquals
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_SETTLE_TYPE_IS_CHANGE
);
}
if
(!
settleIdEquals
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_SETTLE_ID_IS_CHANGE
);
}
if
(!
actualPush
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_ACTUAL_IS_PUSH
);
}
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
update
(
ekpUpdate
);
continue
;
...
...
@@ -165,6 +180,15 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if
(
CommonConstants
.
THREE_INT
==
pushType
){
//如果结算类型不一致,结算类型不为空且已发送,结算id不一致
if
(!
settleIdEquals
||
!
eStatus
||
!
aStatus
){
if
(!
settleIdEquals
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_SETTLE_ID_IS_CHANGE
);
}
if
(!
eStatus
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_ESTIMATE_STATUS_ERROR
);
}
if
(!
aStatus
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
InsurancesConstants
.
EKP_ACTUAL_STATUS_ERROR
);
}
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
update
(
ekpUpdate
);
continue
;
...
...
@@ -225,10 +249,6 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
break
;
}
}
}
else
{
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
update
(
ekpUpdate
);
continue
;
}
}
//推送预估红冲信息
...
...
@@ -258,9 +278,9 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}
}
}
return
R
.
ok
(
"
发送
成功"
);
return
R
.
ok
(
"
EKP重发
成功"
);
}
else
{
return
R
.
failed
(
"无需要
发送的
信息"
);
return
R
.
failed
(
"无需要
重新发送的EKP结算
信息"
);
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
84af33b5
...
...
@@ -95,6 +95,9 @@
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
where detail.DELETE_FLAG = 0
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO = #{param.deptNo}
</if>
...
...
@@ -137,6 +140,10 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保不分页查询-->
...
...
@@ -218,6 +225,9 @@
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where detail.DELETE_FLAG = 0
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO = #{param.deptNo}
...
...
@@ -243,9 +253,6 @@
#{item}
</foreach>
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and detail.HANDLED_BY = #{param.updateBy}
</if>
...
...
@@ -258,6 +265,10 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--通过id查询商险信息-->
...
...
@@ -365,6 +376,9 @@
detail.POLICY_NO as policyNo,
detail.REMARK as remark
from t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
...
...
@@ -378,9 +392,6 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
...
...
@@ -390,6 +401,10 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.CREATE_TIME DESC
</select>
<!--批量更新保单号-->
...
...
@@ -428,6 +443,9 @@
detail.BUY_STANDARD as buyStandard
from
t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
detail.DELETE_FLAG = 0
and
...
...
@@ -481,6 +499,10 @@
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.CREATE_TIME DESC ,detail.ID ASC
</select>
<!-- 已投保列表不分页查询-->
...
...
@@ -587,6 +609,9 @@
from
t_insurance_detail detail,
t_insurance_refund refund
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
detail.DELETE_FLAG = 0
and
...
...
@@ -627,6 +652,10 @@
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
</select>
<!-- 已减员列表不分页查询-->
...
...
@@ -721,6 +750,9 @@
from
t_insurance_detail detail,
t_insurance_refund refund
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
detail.REFUND_ID = refund.ID
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
...
...
@@ -741,9 +773,6 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.updateBy}
</if>
...
...
@@ -756,6 +785,10 @@
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND refund.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
</select>
<!-- 查询保单列表-->
...
...
@@ -861,6 +894,9 @@
detail.REMARK as remark
from
t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
detail.DELETE_FLAG = 0 and detail.REDUCE_HANDLE_STATUS = 1
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
...
...
@@ -878,9 +914,10 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.
regionSql != null and param.region
Sql.trim() != ''"
>
and ${param.region
Sql}
<if
test=
"param.
authSql != null and param.auth
Sql.trim() != ''"
>
${param.auth
Sql}
</if>
GROUP BY detail.id
ORDER BY detail.CREATE_TIME DESC
</select>
<!-- 减员办理-->
...
...
@@ -926,20 +963,6 @@
</where>
ORDER BY CREATE_TIME desc
</select>
<!--查数据是否存在权限范围内-->
<select
id=
"selectByRegionSql"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
t_insurance_detail detail
<where>
detail.ID = #{id}
<if
test=
"regionSql != null and regionSql.trim() != ''"
>
and ${regionSql}
</if>
</where>
ORDER BY CREATE_TIME desc
</select>
<!--商险订单列表查询-->
<select
id=
"getOrderInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"
>
(
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/THaveSalaryNoSocialExportVo.java
View file @
84af33b5
...
...
@@ -40,10 +40,10 @@ public class THaveSalaryNoSocialExportVo implements Serializable {
/**
* 员工名称
*/
@Length
(
max
=
32
,
message
=
"员工
名称
不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工
名称
"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"员工
名称"
,
name
=
"employeeName
"
)
@ExcelProperty
(
value
=
"员工
名称
"
)
@Length
(
max
=
32
,
message
=
"员工
姓名
不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工
姓名
"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"员工
姓名"
,
name
=
"员工姓名
"
)
@ExcelProperty
(
value
=
"员工
姓名
"
)
private
String
employeeName
;
/**
* 身份证号
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
84af33b5
...
...
@@ -344,9 +344,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.
eq
(
TSocialFundInfo:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TSocialFundInfo:
:
getSettleDomain
,
library
.
getSettleDomainId
())
.
eq
(
TSocialFundInfo:
:
getSocialHousehold
,
library
.
getSocialHousehold
()));
if
(
Common
.
isNotNull
(
socialFundInfo
)
&&
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
if
(
Common
.
isNotNull
(
socialFundInfo
)
&&
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
{
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
...
...
@@ -358,8 +358,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.
eq
(
TSocialFundInfo:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TSocialFundInfo:
:
getSettleDomain
,
library
.
getSettleDomainId
())
.
eq
(
TSocialFundInfo:
:
getProvidentHousehold
,
library
.
getProvidentHousehold
()));
if
(
Common
.
isNotNull
(
socialFundInfoF
)
&&
Common
.
isNotNull
(
socialFundInfoF
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfoF
.
getFundStatus
()))
{
if
(
Common
.
isNotNull
(
socialFundInfoF
)
&&
(
Common
.
isNotNull
(
socialFundInfoF
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfoF
.
getFundStatus
()))
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
...
...
@@ -1645,6 +1645,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
negateLib
.
setPersonalFundSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalFundSum
()));
negateLib
.
setSumAll
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getSumAll
()));
negateLib
.
setDiffType
(
SocialConstants
.
DIFF_TYPE_TWO
);
baseMapper
.
insert
(
negateLib
);
libraryFundInfoListFund
.
add
(
negateLib
);
}
else
{
// 删除
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
View file @
84af33b5
...
...
@@ -191,7 +191,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
List
<
String
>
dnList
=
sysDeptMapper
.
selectDnList
();
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
//删除ldap中不存在的dn的数据
if
(
delList
.
size
()
>
0
)
{
if
(
!
delList
.
isEmpty
()
)
{
sysDeptMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
}
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
...
...
@@ -202,7 +202,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
userId
=
dn
.
substring
(
4
,
dn
.
indexOf
(
","
,
1
));
dn
=
dn
.
substring
(
dn
.
indexOf
(
","
,
1
)
+
1
);
}
List
<
String
>
saveDnList
=
Arrays
.
asList
(
dn
.
split
(
","
)).
stream
(
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
List
<
String
>
saveDnList
=
Arrays
.
stream
(
dn
.
split
(
","
)
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
String
deptName
=
saveDnList
.
get
(
0
).
replace
(
"ou="
,
""
);
int
size
=
saveDnList
.
size
();
if
(
size
==
1
)
{
...
...
@@ -220,7 +220,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
sysDept
.
setName
(
deptName
);
this
.
updateDeptById
(
sysDept
);
}
}
else
if
(
size
>=
2
)
{
}
else
{
try
{
SysDept
sysDept
=
this
.
getOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
())));
if
(
null
!=
sysDept
)
{
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
84af33b5
...
...
@@ -380,8 +380,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
// 根据角色名称查询角色ID
List
<
Long
>
roleIdList
=
roleCollList
.
stream
().
map
(
SysRole:
:
getRoleId
).
collect
(
Collectors
.
toList
());
userDTO
.
setRole
(
roleIdList
);
// List<Long> postIdList = postCollList.stream().map(SysPost::getPostId).collect(Collectors.toList());
// userDTO.setPost(postIdList);
// 插入用户
this
.
saveUser
(
userDTO
);
}
...
...
@@ -433,10 +431,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
insertList
.
add
(
personVo
);
}
}
if
(
updateList
.
size
()
>
0
)
{
if
(
!
updateList
.
isEmpty
()
)
{
sysUserMapper
.
batchUpdateUser
(
updateList
);
}
if
(
insertList
.
size
()
>
0
)
{
if
(
!
insertList
.
isEmpty
()
)
{
sysUserMapper
.
batchInsertUser
(
insertList
);
}
}
...
...
@@ -447,7 +445,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
List
<
String
>
dnList
=
sysDeptMapper
.
selectDnList
();
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
//删除ldap中不存在的dn的数据
if
(
delList
.
size
()
>
0
)
{
if
(
!
delList
.
isEmpty
()
)
{
sysDeptMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
}
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
...
...
@@ -458,7 +456,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
userId
=
dn
.
substring
(
4
,
dn
.
indexOf
(
","
,
1
));
dn
=
dn
.
substring
(
dn
.
indexOf
(
","
,
1
)
+
1
);
}
List
<
String
>
saveDnList
=
Arrays
.
asList
(
dn
.
split
(
","
)).
stream
(
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
List
<
String
>
saveDnList
=
Arrays
.
stream
(
dn
.
split
(
","
)
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
String
deptName
=
saveDnList
.
get
(
0
).
replace
(
"ou="
,
""
);
int
size
=
saveDnList
.
size
();
if
(
size
==
1
)
{
...
...
@@ -476,7 +474,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
sysDept
.
setName
(
deptName
);
sysDeptMapper
.
updateById
(
sysDept
);
}
}
else
if
(
size
>=
2
)
{
}
else
{
SysDept
sysDept
=
sysDeptMapper
.
selectOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
())));
if
(
null
!=
sysDept
)
{
SysDept
sysDeptCount
=
sysDeptMapper
.
selectOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
));
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
84af33b5
...
...
@@ -210,17 +210,15 @@
<insert
id=
"batchInsertUser"
parameterType=
"java.util.List"
>
insert into sys_user
(user_id,username,phone,email,
password,nickname,deptId
,create_time)
(user_id,username,phone,email,
nickname
,create_time)
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
REPLACE(UUID(),"-",""),
#{item.uid,jdbcType=VARCHAR},
#{item.telephoneNumber,jdbcType=VARCHAR},
#{item.email,jdbcType=VARCHAR},
#{item.password,jdbcType=VARCHAR},
#{item.personName,jdbcType=VARCHAR},
#{item.deptId,jdbcType=VARCHAR},
#{item.uid},
#{item.telephoneNumber},
#{item.email},
#{item.personName},
now()
)
</foreach>
...
...
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