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
1a3a290f
Commit
1a3a290f
authored
Dec 05, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
072cf365
f7156f0e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
568 additions
and
317 deletions
+568
-317
InsuranceUpdateVO.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceUpdateVO.java
+38
-0
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+11
-2
TInsuranceOperateMapper.java
...insurances/mapper/insurances/TInsuranceOperateMapper.java
+4
-0
TInsuranceOperateService.java
...nsurances/service/insurance/TInsuranceOperateService.java
+3
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+237
-312
TInsuranceOperateServiceImpl.java
.../service/insurance/impl/TInsuranceOperateServiceImpl.java
+6
-0
DoJointInsuranceTask.java
...ud/plus/v1/yifu/insurances/util/DoJointInsuranceTask.java
+187
-0
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+19
-0
TInsuranceOperateMapper.xml
...n/resources/mapper/insurances/TInsuranceOperateMapper.xml
+18
-0
DoJointSalaryAsyncTask.java
...loud/plus/v1/yifu/salary/util/DoJointSalaryAsyncTask.java
+1
-1
TIncomeDetailMapper.java
...cloud/plus/v1/yifu/social/mapper/TIncomeDetailMapper.java
+8
-0
TIncomeDetailService.java
...oud/plus/v1/yifu/social/service/TIncomeDetailService.java
+9
-0
TIncomeDetailServiceImpl.java
...v1/yifu/social/service/impl/TIncomeDetailServiceImpl.java
+11
-0
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+4
-2
TIncomeDetailMapper.xml
...ial-biz/src/main/resources/mapper/TIncomeDetailMapper.xml
+12
-0
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceUpdateVO.java
0 → 100644
View file @
1a3a290f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author huyc
* @description 发票号更新VO
* @date 2022-11-29 10:23:17
*/
@Data
@Schema
(
description
=
"发票号更新VO"
)
public
class
InsuranceUpdateVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
628032758008497542L
;
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 发票号
*/
@Schema
(
description
=
"发票号"
)
private
String
invoiceNo
;
/**
* 保单号
*/
@Schema
(
description
=
"保单号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"保单号"
)
private
String
policyNo
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
1a3a290f
...
...
@@ -83,7 +83,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @param details
* @return void
*/
void
updatePolicyNoBatch
(
@Param
(
"details"
)
List
<
TInsuranceDetail
>
details
);
void
updatePolicyNoBatch
(
@Param
(
"details"
)
List
<
InsuranceUpdateVO
>
details
);
/**
* 批量更新发票号
...
...
@@ -92,7 +92,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @param details
* @return void
*/
void
updateInvoiceNoBatch
(
@Param
(
"details"
)
List
<
TInsuranceDetail
>
details
);
void
updateInvoiceNoBatch
(
@Param
(
"details"
)
List
<
InsuranceUpdateVO
>
details
);
/***********************减员办理********************************/
...
...
@@ -246,4 +246,13 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
List
<
TInsuranceDetail
>
selectByIdCardList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
,
@Param
(
"idList"
)
List
<
String
>
idList
);
/**
* @param ids
* @Description: 根据id查找所有商险
* @Author: huyc
* @Date: 2022/11/29 10:17
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail>
**/
List
<
InsuranceUpdateVO
>
selectByIds
(
@Param
(
"ids"
)
List
<
String
>
ids
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceOperateMapper.java
View file @
1a3a290f
...
...
@@ -4,6 +4,9 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author licancan
...
...
@@ -13,4 +16,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
TInsuranceOperateMapper
extends
BaseMapper
<
TInsuranceOperate
>
{
int
saveOperateInfo
(
@Param
(
"list"
)
List
<
TInsuranceOperate
>
list
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceOperateService.java
View file @
1a3a290f
...
...
@@ -4,6 +4,8 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
java.util.List
;
/**
* @author licancan
* @description 针对表【t_insurance_operate(商险操作表)】的数据库操作Service
...
...
@@ -11,4 +13,5 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
*/
public
interface
TInsuranceOperateService
extends
IService
<
TInsuranceOperate
>
{
int
saveOperateInfo
(
List
<
TInsuranceOperate
>
list
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
1a3a290f
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceOperateServiceImpl.java
View file @
1a3a290f
...
...
@@ -6,6 +6,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceOperat
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceOperateService
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author licancan
...
...
@@ -15,4 +17,8 @@ import org.springframework.stereotype.Service;
@Service
public
class
TInsuranceOperateServiceImpl
extends
ServiceImpl
<
TInsuranceOperateMapper
,
TInsuranceOperate
>
implements
TInsuranceOperateService
{
@Override
public
int
saveOperateInfo
(
List
<
TInsuranceOperate
>
list
)
{
return
baseMapper
.
saveOperateInfo
(
list
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/DoJointInsuranceTask.java
0 → 100644
View file @
1a3a290f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
util
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettleCancel
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleCancelService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInteractiveParam
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
/**
* 主要执行商险的异步推送
* @author huyc
* @Date 2022-11-30
* @Description 多线程的执行
*/
@Slf4j
@Component
public
class
DoJointInsuranceTask
{
@Resource
private
TInsuranceSettleService
tInsuranceSettleService
;
@Autowired
private
EkpInsuranceUtil
eKPInsuranceUtil
;
@Autowired
private
TInsuranceEkpService
tInsuranceEkpService
;
@Autowired
private
ArchivesDaprUtil
archivesDaprUtil
;
@Autowired
private
TInsuranceSettleCancelService
tInsuranceSettleCancelService
;
/**
* @Description: 商险明细推送
* @Author: huyc
* @Date: 2022-11-30
* @return: void
**/
@Async
public
void
asynchronousEkpInfo
(
TInsuranceDetail
detail
,
TInsuranceSettle
settle
,
Integer
type
)
{
log
.
info
(
"推送商险明细到EKP-线程开始"
);
try
{
String
s
=
pushEstimate
(
detail
,
type
);
if
(
StringUtils
.
isNotBlank
(
s
)){
if
(
type
==
CommonConstants
.
ONE_INT
)
{
settle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
settle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
}
else
{
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
}
tInsuranceSettleService
.
updateById
(
settle
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"推送商险明细到EKP错误"
,
e
);
}
log
.
info
(
"推送商险明细到EKP结束"
);
}
/**
* 推送EKP
*
* @author zhaji
* @param
* @return {@link String}
*/
private
String
pushEstimate
(
TInsuranceDetail
tInsuranceDetail
,
Integer
type
){
YifuUser
user
=
SecurityUtils
.
getUser
();
Integer
pushType
=
null
;
//1,推送预估保费,2,推送实际保费,3推送预估冲正保费,4更新实际保费
EkpInteractiveParam
param
=
new
EkpInteractiveParam
();
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
BeanCopyUtils
.
copyProperties
(
tInsuranceDetail
,
param
);
param
.
setDetailId
(
tInsuranceDetail
.
getId
());
Integer
settleType
=
tInsuranceDetail
.
getSettleType
();
if
(
CommonConstants
.
ZERO_INT
==
settleType
){
param
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
}
else
{
param
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
}
if
(
Common
.
isNotNull
(
tInsuranceDetail
.
getUnitName
()))
{
param
.
setCustomerName
(
tInsuranceDetail
.
getUnitName
());
}
if
(
Common
.
isNotNull
(
tInsuranceDetail
.
getUnitNo
()))
{
param
.
setCustomerCode
(
tInsuranceDetail
.
getUnitNo
());
}
//1,推送预估保费(用户办理成功,推送预估保费)
if
(
CommonConstants
.
ONE_INT
==
type
){
param
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
param
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
pushType
=
CommonConstants
.
ONE_INT
;
}
//2,推送实际保费(用于登记保单保费未推送过实缴保费)
if
(
CommonConstants
.
TWO_INT
==
type
){
param
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
param
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
pushType
=
CommonConstants
.
TWO_INT
;
}
//3推送预估冲正保费(用于投保退回场景)
if
(
CommonConstants
.
THREE_INT
==
type
){
String
defaultSettleId
=
tInsuranceDetail
.
getDefaultSettleId
();
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
//冲正取负数
if
(
null
!=
byId
.
getEstimatePremium
()){
param
.
setEstimatePremium
(
byId
.
getEstimatePremium
());
}
param
.
setInteractiveType
(
InsurancesConstants
.
CORRECT_SETTLE_BILL
);
param
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
pushType
=
CommonConstants
.
FIVE_INT
;
}
//6推送实缴红冲(用于投保退回场景)
if
(
CommonConstants
.
SIX_INT
==
type
){
String
defaultSettleId
=
tInsuranceDetail
.
getDefaultSettleId
();
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
//冲正取负数
if
(
null
!=
byId
.
getActualPremium
()){
param
.
setActualPremium
(
byId
.
getActualPremium
());
}
param
.
setInteractiveType
(
InsurancesConstants
.
CORRECT_SETTLE_BILL
);
param
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
pushType
=
CommonConstants
.
SIX_INT
;
}
//4更新实际保费(用于登记保单保费场景推送过实缴保费)
if
(
CommonConstants
.
FOUR_INT
==
type
){
param
.
setInteractiveType
(
InsurancesConstants
.
UPDATE_SETTLE_BILL
);
param
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
pushType
=
CommonConstants
.
THREE_INT
;
}
//作废
if
(
CommonConstants
.
FIVE_INT
==
type
){
cancel
.
setDeptNo
(
tInsuranceDetail
.
getDeptNo
());
cancel
.
setInsDetailId
(
tInsuranceDetail
.
getId
());
cancel
.
setSettleId
(
tInsuranceDetail
.
getDefaultSettleId
());
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
cancel
.
setDeptName
(
param
.
getDeptName
());
cancel
.
setIsCancelPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettleCancelService
.
save
(
cancel
);
param
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
param
.
setSettleType
(
CommonConstants
.
EMPTY_STRING
);
pushType
=
CommonConstants
.
FOUR_INT
;
}
String
s
=
eKPInsuranceUtil
.
sendToEkp
(
param
);
if
(
StringUtils
.
isBlank
(
s
)){
saveInsuranceEkp
(
param
,
pushType
);
return
null
;
}
else
{
return
s
;
}
}
/**
* 保存失败信息
*
* @author zhaji
* @param
* @return {@link String}
*/
private
void
saveInsuranceEkp
(
EkpInteractiveParam
param
,
Integer
pushType
){
TInsuranceEkp
ekp
=
new
TInsuranceEkp
();
BeanCopyUtils
.
copyProperties
(
param
,
ekp
);
ekp
.
setId
(
null
);
ekp
.
setCreateTime
(
LocalDateTime
.
now
());
ekp
.
setPushType
(
pushType
);
tInsuranceEkpService
.
save
(
ekp
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
1a3a290f
...
...
@@ -63,6 +63,11 @@
<result
property=
"unitName"
column=
"UNIT_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"unitNo"
column=
"UNIT_NO"
jdbcType=
"VARCHAR"
/>
</resultMap>
<resultMap
id=
"UpdateMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceUpdateVO"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"invoiceNo"
column=
"INVOICE_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"policyNo"
column=
"POLICY_NO"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,EMP_NAME,
EMP_IDCARD_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
...
...
@@ -1209,4 +1214,18 @@
</if>
</select>
<select
id=
"selectByIds"
resultMap=
"UpdateMap"
>
SELECT
a.ID,
a.INVOICE_NO,
a.POLICY_NO
FROM
t_insurance_detail a
where
a.ID in
<foreach
item=
"item"
index=
"index"
collection=
"ids"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceOperateMapper.xml
View file @
1a3a290f
...
...
@@ -19,4 +19,22 @@
ID,INSURANCE_DETAIL_ID,OPERATE_DESC,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME
</sql>
<insert
id=
"saveOperateInfo"
parameterType=
"java.util.List"
>
insert into t_insurance_operate
(ID,REMARK,DISPLAY_FLAG,CREATE_BY,CREATE_TIME,CREATE_NAME,OPERATE_DESC,INSURANCE_DETAIL_ID)
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.id,jdbcType=VARCHAR},
#{item.remark,jdbcType=VARCHAR},
#{item.displayFlag},
#{item.createBy,jdbcType=VARCHAR},
#{item.createTime},
#{item.createName,jdbcType=VARCHAR},
#{item.operateDesc,jdbcType=VARCHAR},
#{item.insuranceDetailId,jdbcType=VARCHAR},
)
</foreach>
</insert>
</mapper>
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/DoJointSalaryAsyncTask.java
View file @
1a3a290f
...
...
@@ -93,7 +93,7 @@ public class DoJointSalaryAsyncTask {
if
(
s
!=
null
&&
(
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
]
||
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
12
]))
{
tSalaryStandard
.
setIncomeEndTime
(
new
Date
());
s
.
setIncomeEndTime
(
new
Date
());
if
(
isTrue
)
{
s
.
setStatus
(
CommonConstants
.
TWO_INT
);
salaryStandardMapper
.
updateById
(
s
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TIncomeDetailMapper.java
View file @
1a3a290f
...
...
@@ -33,4 +33,12 @@ import java.util.List;
@Mapper
public
interface
TIncomeDetailMapper
extends
BaseMapper
<
TIncomeDetail
>
{
List
<
TIncomeDetail
>
getTIncomeDetailList
(
@Param
(
"tIncomeDetail"
)
TIncomeDetail
tIncomeDetail
);
/**
* @Description: 获取重复性
* @Author: hgw
* @Date: 2022/12/5 11:16
* @return: int
**/
int
getTIncomeDetailRepeat
(
@Param
(
"tIncomeDetail"
)
TIncomeDetail
detail
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TIncomeDetailService.java
View file @
1a3a290f
...
...
@@ -30,4 +30,13 @@ import java.util.List;
*/
public
interface
TIncomeDetailService
extends
IService
<
TIncomeDetail
>
{
List
<
TIncomeDetail
>
getTIncomeDetailList
(
TIncomeDetail
detail
);
/**
* @Description: 获取重复性
* @Author: hgw
* @Date: 2022/12/5 11:16
* @return: int
**/
int
getTIncomeDetailRepeat
(
TIncomeDetail
detail
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeDetailServiceImpl.java
View file @
1a3a290f
...
...
@@ -39,4 +39,15 @@ public class TIncomeDetailServiceImpl extends ServiceImpl<TIncomeDetailMapper, T
public
List
<
TIncomeDetail
>
getTIncomeDetailList
(
TIncomeDetail
detail
)
{
return
baseMapper
.
getTIncomeDetailList
(
detail
);
}
/**
* @Description: 获取重复性
* @Author: hgw
* @Date: 2022/12/5 11:16
* @return: int
**/
@Override
public
int
getTIncomeDetailRepeat
(
TIncomeDetail
detail
)
{
return
baseMapper
.
getTIncomeDetailRepeat
(
detail
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
1a3a290f
...
...
@@ -578,11 +578,13 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
tIncomeDetail
.
getSourceId
()))
{
// 如果该id、该类型的金额已存在,则不允许重复生成推送
TIncomeDetail
a
=
new
TIncomeDetail
();
a
.
setId
(
tIncomeDetail
.
getId
());
a
.
setSourceId
(
tIncomeDetail
.
getSourceId
());
a
.
setMoney
(
tIncomeDetail
.
getMoney
());
a
.
setRedData
(
tIncomeDetail
.
getRedData
());
List
<
TIncomeDetail
>
aList
=
tIncomeDetailService
.
getTIncomeDetailList
(
a
);
if
(
aList
!=
null
&&
!
aList
.
isEmpty
())
{
a
.
setFeeType
(
tIncomeDetail
.
getFeeType
());
int
repeatNums
=
tIncomeDetailService
.
getTIncomeDetailRepeat
(
a
);
if
(
repeatNums
>
CommonConstants
.
ZERO_INT
)
{
return
true
;
}
}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TIncomeDetailMapper.xml
View file @
1a3a290f
...
...
@@ -156,4 +156,16 @@
</where>
</select>
<!-- 获取重复性 -->
<select
id=
"getTIncomeDetailRepeat"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_income_detail a
where a.ID != #{tIncomeDetail.id}
AND a.SOURCE_ID = #{tIncomeDetail.sourceId}
AND a.MONEY = #{tIncomeDetail.money}
AND a.RED_DATA = #{tIncomeDetail.redData}
AND a.FEE_TYPE = #{tIncomeDetail.feeType}
</select>
</mapper>
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