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
c6549c13
Commit
c6549c13
authored
Sep 17, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险自动化限制:新增、批增、替换-fxj
parent
7d948adb
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
128 additions
and
1 deletion
+128
-1
TAutoInsurRuleInfoController.java
...ifu/archives/controller/TAutoInsurRuleInfoController.java
+13
-0
TAutoInsurRuleInfoService.java
...s/v1/yifu/archives/service/TAutoInsurRuleInfoService.java
+3
-0
TAutoInsurRuleInfoServiceImpl.java
.../archives/service/impl/TAutoInsurRuleInfoServiceImpl.java
+23
-1
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+14
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+2
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+73
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TAutoInsurRuleInfoController.java
View file @
c6549c13
...
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TAutoInsurRuleInfoSearchVo;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -35,6 +36,7 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -152,4 +154,15 @@ public class TAutoInsurRuleInfoController {
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TAutoInsurRuleInfoSearchVo
searchVo
)
{
tAutoInsurRuleInfoService
.
listExport
(
response
,
searchVo
);
}
/**
* @Author fxj
* @Description 远程接口获取项目对应商险的自动化配置信息,有商险自动化且配置为启用的
* @Date 11:20 2025/9/17
**/
@Inner
@PostMapping
(
"/inner/getInsuranceAutoSetMap"
)
public
Map
<
String
,
String
>
getInsuranceAutoSetMap
(
@RequestBody
List
<
String
>
departNos
)
{
return
tAutoInsurRuleInfoService
.
getInsuranceAutoSetMap
(
departNos
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TAutoInsurRuleInfoService.java
View file @
c6549c13
...
...
@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.Map
;
/**
* 商险购买规则配置表
...
...
@@ -48,4 +49,6 @@ public interface TAutoInsurRuleInfoService extends IService<TAutoInsurRuleInfo>
void
listExport
(
HttpServletResponse
response
,
TAutoInsurRuleInfoSearchVo
searchVo
);
List
<
TAutoInsurRuleInfo
>
noPageDiy
(
TAutoInsurRuleInfoSearchVo
searchVo
);
Map
<
String
,
String
>
getInsuranceAutoSetMap
(
List
<
String
>
departNos
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TAutoInsurRuleInfoServiceImpl.java
View file @
c6549c13
...
...
@@ -33,6 +33,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TAutoInsurRuleInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TAutoInsurRuleInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TAutoInsurRuleInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.MSetttleCustomerUserVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TAutoInsurRuleInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TAutoInsurRuleInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
...
@@ -47,7 +48,10 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 商险购买规则配置表
*
...
...
@@ -244,4 +248,22 @@ public class TAutoInsurRuleInfoServiceImpl extends ServiceImpl<TAutoInsurRuleInf
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
}
/**
* @Author fxj
* @Description 远程接口获取项目对应商险的自动化配置信息,有商险自动化且配置为启用的
* @Date 11:26 2025/9/17
**/
@Override
public
Map
<
String
,
String
>
getInsuranceAutoSetMap
(
List
<
String
>
departNos
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
List
<
TAutoInsurRuleInfo
>
list
=
baseMapper
.
selectList
(
Wrappers
.<
TAutoInsurRuleInfo
>
query
().
lambda
()
.
eq
(
TAutoInsurRuleInfo:
:
getAutoFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isNotNull
(
list
)){
for
(
TAutoInsurRuleInfo
vo
:
list
){
map
.
put
(
vo
.
getDeptNo
(),
vo
.
getDeptNo
());
}
}
return
map
;
}
}
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
c6549c13
...
...
@@ -36,6 +36,20 @@ public class ArchivesDaprUtil {
@Autowired
private
DaprArchivesProperties
daprArchivesProperties
;
/**
* @Author fxj
* @Description 获取项目自动化设置信息,只返回配置了自动化且商险自动化为是的信息
* @Date 11:16 2025/9/17
**/
public
R
<
Map
<
String
,
String
>>
getInsuranceAutoSetMap
(
List
<
String
>
departNos
){
R
<
Map
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tautoinsurruleinfo/inner/getInsuranceAutoSetMap"
,
JSON
.
toJSONString
(
departNos
),
Map
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取项目商险自动化信息失败!"
);
}
Map
<
String
,
String
>
map
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
res
.
getData
()),
new
TypeReference
<
HashMap
<
String
,
String
>>(){});
return
R
.
ok
(
map
);
}
public
R
<
Map
<
String
,
String
>>
getCustomerUserMap
(
List
<
String
>
userList
){
R
<
Map
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/msetttlecustomeruser/inner/getCustomerUserMap"
,
JSON
.
toJSONString
(
userList
),
Map
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
c6549c13
...
...
@@ -1341,4 +1341,6 @@ public class InsurancesConstants {
*
*/
public
static
final
String
IMPORT_POLICY_REMARK
=
"保单号维护模版导入"
;
public
static
final
String
INSURANCE_AUTO_FLAG_IS_ENABLE
=
"该项目已纳入自动化,请至作业自动化模块入职登记-接收确认后自动派单"
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
c6549c13
...
...
@@ -2675,6 +2675,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceAddParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceAddParam
>
listSuccess
=
new
ArrayList
<>();
List
<
InsuranceAddParam
>
distinctList
=
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
// 查询是否配置了自动化配置,如果有项目权限 有自动化配置就限制提交
Map
<
String
,
String
>
insurAutoMap
=
getInsurAutoMap
(
paramList
);
//派单前系统已有在途/在保数据的人员明细
// List<InsuredListVo> listInProgress = new ArrayList<>();
//定义外层循环标识,方便去重的时候跳出
...
...
@@ -2780,6 +2782,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
}
// 存在自动化配置且是启用的直接限制MVPV1.7.15 fxj 2025-09-17
if
(
null
!=
insurAutoMap
.
get
(
param
.
getDeptNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_AUTO_FLAG_IS_ENABLE
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
...
...
@@ -3066,6 +3074,55 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
map
;
}
private
Map
<
String
,
String
>
getInsurAutoMap
(
List
<
InsuranceAddParam
>
paramList
)
{
Map
<
String
,
String
>
insurAutoMap
=
null
;
List
<
String
>
departNos
=
null
;
if
(
Common
.
isNotNull
(
paramList
)){
departNos
=
paramList
.
stream
().
map
(
InsuranceAddParam:
:
getDeptNo
).
collect
(
Collectors
.
toList
());
}
if
(
Common
.
isNotNull
(
departNos
)){
R
<
Map
<
String
,
String
>>
resR
=
archivesDaprUtil
.
getCustomerUserMap
(
departNos
);
if
(
Common
.
isNotNull
(
resR
)
&&
Common
.
isNotNull
(
resR
.
getData
())){
insurAutoMap
=
resR
.
getData
();
}
else
{
throw
new
RuntimeException
(
"获取商险自动化配置失败"
);
}
}
return
null
==
insurAutoMap
?
new
HashMap
<>():
insurAutoMap
;
}
private
Map
<
String
,
String
>
getBatchInsurAutoMap
(
List
<
InsuranceBatchParam
>
paramList
)
{
Map
<
String
,
String
>
insurAutoMap
=
null
;
List
<
String
>
departNos
=
null
;
if
(
Common
.
isNotNull
(
paramList
)){
departNos
=
paramList
.
stream
().
map
(
InsuranceBatchParam:
:
getDeptNo
).
collect
(
Collectors
.
toList
());
}
if
(
Common
.
isNotNull
(
departNos
)){
R
<
Map
<
String
,
String
>>
resR
=
archivesDaprUtil
.
getCustomerUserMap
(
departNos
);
if
(
Common
.
isNotNull
(
resR
)
&&
Common
.
isNotNull
(
resR
.
getData
())){
insurAutoMap
=
resR
.
getData
();
}
else
{
throw
new
RuntimeException
(
"获取商险自动化配置失败"
);
}
}
return
null
==
insurAutoMap
?
new
HashMap
<>():
insurAutoMap
;
}
private
Map
<
String
,
String
>
getReplaceInsurAutoMap
(
List
<
InsuranceReplaceParam
>
paramList
)
{
Map
<
String
,
String
>
insurAutoMap
=
null
;
List
<
String
>
departNos
=
null
;
if
(
Common
.
isNotNull
(
paramList
)){
departNos
=
paramList
.
stream
().
map
(
InsuranceReplaceParam:
:
getReplaceDeptNo
).
collect
(
Collectors
.
toList
());
}
if
(
Common
.
isNotNull
(
departNos
)){
R
<
Map
<
String
,
String
>>
resR
=
archivesDaprUtil
.
getCustomerUserMap
(
departNos
);
if
(
Common
.
isNotNull
(
resR
)
&&
Common
.
isNotNull
(
resR
.
getData
())){
insurAutoMap
=
resR
.
getData
();
}
else
{
throw
new
RuntimeException
(
"获取商险自动化配置失败"
);
}
}
return
null
==
insurAutoMap
?
new
HashMap
<>():
insurAutoMap
;
}
/**
* 商险批增校验
*
...
...
@@ -3083,6 +3140,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceBatchParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceBatchParam
>
listSuccess
=
new
ArrayList
<>();
List
<
InsuranceBatchParam
>
distinctList
=
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
// 查询是否配置了自动化配置,如果有项目权限 有自动化配置就限制提交
Map
<
String
,
String
>
insurAutoMap
=
getBatchInsurAutoMap
(
paramList
);
//定义外层循环标识,方便去重的时候跳出
outer:
for
(
int
i
=
0
;
i
<
distinctList
.
size
();
i
++)
{
...
...
@@ -3169,6 +3228,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
}
// 存在自动化配置且是启用的直接限制MVPV1.7.15 fxj 2025-09-17
if
(
null
!=
insurAutoMap
.
get
(
param
.
getDeptNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_AUTO_FLAG_IS_ENABLE
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
...
...
@@ -3494,6 +3559,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceReplaceParam
>
distinctList
=
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
TInsuranceType
insuranceType
;
TInsuranceCompany
insuranceCompany
;
// 查询是否配置了自动化配置,如果有项目权限 有自动化配置就限制提交
Map
<
String
,
String
>
insurAutoMap
=
getReplaceInsurAutoMap
(
paramList
);
//定义外层循环标识,方便去重的时候跳出
outer:
for
(
int
i
=
0
;
i
<
distinctList
.
size
();
i
++)
{
...
...
@@ -3770,6 +3837,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
}
// 存在自动化配置且是启用的直接限制MVPV1.7.15 fxj 2025-09-17
if
(
null
!=
insurAutoMap
.
get
(
param
.
getReplaceDeptNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_AUTO_FLAG_IS_ENABLE
);
listResult
.
add
(
param
);
continue
;
}
// 投保状态 待投保 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
ONE_REPLACE_IS_NOT_ALLOW
);
...
...
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