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
273d749e
Commit
273d749e
authored
Dec 28, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算状态同步
parent
20a97615
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
128 additions
and
107 deletions
+128
-107
SalaryDaprUtil.java
...u/cloud/plus/v1/yifu/common/dapr/util/SalaryDaprUtil.java
+3
-1
SocialDaprUtils.java
.../cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
+2
-2
EkpSettleMapper.java
...d/plus/v1/yifu/insurances/mapper/ekp/EkpSettleMapper.java
+8
-6
EkpSettleService.java
...plus/v1/yifu/insurances/service/ekp/EkpSettleService.java
+8
-6
EkpSettleServiceImpl.java
...ifu/insurances/service/ekp/impl/EkpSettleServiceImpl.java
+7
-6
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+29
-31
TSalaryAccountController.java
...s/v1/yifu/salary/controller/TSalaryAccountController.java
+1
-1
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+1
-1
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+16
-11
TIncomeController.java
...oud/plus/v1/yifu/social/controller/TIncomeController.java
+2
-2
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+1
-1
TIncomeService.java
...ifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
+2
-2
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+1
-1
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+13
-8
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+34
-28
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/SalaryDaprUtil.java
View file @
273d749e
...
...
@@ -8,6 +8,8 @@ import lombok.extern.log4j.Log4j2;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2022/8/17
...
...
@@ -27,7 +29,7 @@ public class SalaryDaprUtil {
* @Param
* @return
**/
public
void
updateSalarySettleStatus
(
EkpSocialViewVo
infoVo
)
{
public
void
updateSalarySettleStatus
(
List
<
EkpSocialViewVo
>
infoVo
)
{
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/updateSalarySettleStatus"
,
JSON
.
toJSONString
(
infoVo
),
EkpSocialViewVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
View file @
273d749e
...
...
@@ -143,7 +143,7 @@ public class SocialDaprUtils {
* @Param
* @return
**/
public
void
updateSocialSettleStatus
(
EkpSocialViewVo
infoVo
)
{
public
void
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
infoVo
)
{
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/updateSocialSettleStatus"
,
JSON
.
toJSONString
(
infoVo
),
EkpSocialViewVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
...
...
@@ -154,7 +154,7 @@ public class SocialDaprUtils {
* @Param
* @return
**/
public
void
updateIncomeSettleStatus
(
EkpInsuranceViewVo
infoVo
)
{
public
void
updateIncomeSettleStatus
(
List
<
EkpInsuranceViewVo
>
infoVo
)
{
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/updateIncomeSettleStatus"
,
JSON
.
toJSONString
(
infoVo
),
EkpInsuranceViewVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/ekp/EkpSettleMapper.java
View file @
273d749e
...
...
@@ -6,6 +6,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author zhaji
* @description TODO
...
...
@@ -23,16 +25,16 @@ public interface EkpSettleMapper {
SettleVo
getSettle
(
String
id
);
EkpInsuranceViewVo
selectSettleStatusBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
,
@Param
(
"payFlag"
)
String
payFlag
);
List
<
EkpInsuranceViewVo
>
selectSettleStatusBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
,
@Param
(
"payFlag"
)
String
payFlag
);
EkpSocialViewVo
selectSocialViewStatusBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
,
@Param
(
"payFlag"
)
String
payFlag
);
List
<
EkpSocialViewVo
>
selectSocialViewStatusBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
,
@Param
(
"payFlag"
)
String
payFlag
);
EkpSocialViewVo
selectFundViewBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
,
@Param
(
"payFlag"
)
String
payFlag
);
List
<
EkpSocialViewVo
>
selectFundViewBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
,
@Param
(
"payFlag"
)
String
payFlag
);
EkpInsuranceViewVo
selectFIncomelViewBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
);
List
<
EkpInsuranceViewVo
>
selectFIncomelViewBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
);
EkpInsuranceViewVo
selectIncomeViewBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
);
List
<
EkpInsuranceViewVo
>
selectIncomeViewBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
);
EkpSocialViewVo
selectSalarylViewBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
,
@Param
(
"payFlag"
)
String
payFlag
);
List
<
EkpSocialViewVo
>
selectSalarylViewBySettleNo
(
@Param
(
"settleNo"
)
String
settleNo
,
@Param
(
"payFlag"
)
String
payFlag
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/ekp/EkpSettleService.java
View file @
273d749e
...
...
@@ -7,6 +7,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo
;
import
java.util.List
;
/**
* @author zhaji
* @description TODO
...
...
@@ -27,32 +29,32 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> {
* 根据结算单编号查询商险视图信息
*
*/
EkpInsuranceViewVo
selectViewBySettleNo
(
String
settleNo
,
String
payFlag
);
List
<
EkpInsuranceViewVo
>
selectViewBySettleNo
(
String
settleNo
,
String
payFlag
);
/**
* 根据结算单编号查询社保视图信息
*
*/
EkpSocialViewVo
selectSocialViewBySettleNo
(
String
settleNo
,
String
payFlag
);
List
<
EkpSocialViewVo
>
selectSocialViewBySettleNo
(
String
settleNo
,
String
payFlag
);
/**
* 根据结算单编号查询公积金视图信息
*
*/
EkpSocialViewVo
selectFundViewBySettleNo
(
String
settleNo
,
String
payFlag
);
List
<
EkpSocialViewVo
>
selectFundViewBySettleNo
(
String
settleNo
,
String
payFlag
);
/**
* 根据结算单编号查询管理费视图信息
*
*/
EkpInsuranceViewVo
selectIncomelViewBySettleNo
(
String
settleNo
);
List
<
EkpInsuranceViewVo
>
selectIncomelViewBySettleNo
(
String
settleNo
);
/**
* 根据结算单编号查询风险金视图信息
*
*/
EkpInsuranceViewVo
selectFIncomelViewBySettleNo
(
String
settleNo
);
List
<
EkpInsuranceViewVo
>
selectFIncomelViewBySettleNo
(
String
settleNo
);
/**
* 根据结算单编号查询薪资视图信息
*
*/
EkpSocialViewVo
selectSalarylViewBySettleNo
(
String
settleNo
,
String
payFlag
);
List
<
EkpSocialViewVo
>
selectSalarylViewBySettleNo
(
String
settleNo
,
String
payFlag
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/ekp/impl/EkpSettleServiceImpl.java
View file @
273d749e
...
...
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
...
...
@@ -31,32 +32,32 @@ public class EkpSettleServiceImpl implements EkpSettleService {
}
@Override
public
EkpInsuranceViewVo
selectViewBySettleNo
(
String
settleNo
,
String
payFlag
)
{
public
List
<
EkpInsuranceViewVo
>
selectViewBySettleNo
(
String
settleNo
,
String
payFlag
)
{
return
ekpSettleMapper
.
selectSettleStatusBySettleNo
(
settleNo
,
payFlag
);
}
@Override
public
EkpSocialViewVo
selectSocialViewBySettleNo
(
String
settleNo
,
String
payFlag
)
{
public
List
<
EkpSocialViewVo
>
selectSocialViewBySettleNo
(
String
settleNo
,
String
payFlag
)
{
return
ekpSettleMapper
.
selectSocialViewStatusBySettleNo
(
settleNo
,
payFlag
);
}
@Override
public
EkpSocialViewVo
selectFundViewBySettleNo
(
String
settleNo
,
String
payFlag
)
{
public
List
<
EkpSocialViewVo
>
selectFundViewBySettleNo
(
String
settleNo
,
String
payFlag
)
{
return
ekpSettleMapper
.
selectFundViewBySettleNo
(
settleNo
,
payFlag
);
}
@Override
public
EkpInsuranceViewVo
selectFIncomelViewBySettleNo
(
String
settleNo
)
{
public
List
<
EkpInsuranceViewVo
>
selectFIncomelViewBySettleNo
(
String
settleNo
)
{
return
ekpSettleMapper
.
selectFIncomelViewBySettleNo
(
settleNo
);
}
@Override
public
EkpInsuranceViewVo
selectIncomelViewBySettleNo
(
String
settleNo
)
{
public
List
<
EkpInsuranceViewVo
>
selectIncomelViewBySettleNo
(
String
settleNo
)
{
return
ekpSettleMapper
.
selectIncomeViewBySettleNo
(
settleNo
);
}
@Override
public
EkpSocialViewVo
selectSalarylViewBySettleNo
(
String
settleNo
,
String
payFlag
)
{
public
List
<
EkpSocialViewVo
>
selectSalarylViewBySettleNo
(
String
settleNo
,
String
payFlag
)
{
return
ekpSettleMapper
.
selectSalarylViewBySettleNo
(
settleNo
,
payFlag
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
273d749e
...
...
@@ -6501,26 +6501,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isEmpty
(
vo
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
EkpInsuranceViewVo
viewVo
;
List
<
EkpInsuranceViewVo
>
viewVoList
;
TInsuranceDetail
detail
;
try
{
//根据结算单号获取明细id和结算状态
String
payFlag
=
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getPayFlag
())
?
"0"
:
"1"
;
viewVo
=
ekpSettleService
.
selectViewBySettleNo
(
vo
.
getSettleNo
(),
payFlag
);
if
(
Common
.
isNotNull
(
viewVo
))
{
//获取所有的明细id
detail
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
detail
))
{
//判断是收入还是支出结算单号
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getPayFlag
()))
{
detail
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
detail
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
}
else
{
detail
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
detail
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
viewVoList
=
ekpSettleService
.
selectViewBySettleNo
(
vo
.
getSettleNo
(),
vo
.
getPayFlag
());
if
(!
viewVoList
.
isEmpty
())
{
for
(
EkpInsuranceViewVo
viewVo
:
viewVoList
)
{
//获取所有的明细id
detail
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
detail
))
{
//判断是收入还是支出结算单号
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getPayFlag
()))
{
detail
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
detail
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
}
else
{
detail
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
detail
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
baseMapper
.
updateById
(
detail
);
}
baseMapper
.
updateById
(
detail
);
}
}
}
catch
(
Exception
e
)
{
...
...
@@ -6534,18 +6534,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isEmpty
(
vo
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
EkpSocialViewVo
viewVo
;
List
<
EkpSocialViewVo
>
viewVo
;
try
{
//根据结算单号获取明细id和结算状态
String
payFlag
=
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getPayFlag
())
?
"0"
:
"1"
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getTypeFlag
()))
{
viewVo
=
ekpSettleService
.
selectSocialViewBySettleNo
(
vo
.
getSettleNo
(),
payFlag
);
viewVo
=
ekpSettleService
.
selectSocialViewBySettleNo
(
vo
.
getSettleNo
(),
vo
.
getPayFlag
()
);
}
else
{
viewVo
=
ekpSettleService
.
selectFundViewBySettleNo
(
vo
.
getSettleNo
(),
payFlag
);
viewVo
=
ekpSettleService
.
selectFundViewBySettleNo
(
vo
.
getSettleNo
(),
vo
.
getPayFlag
()
);
}
if
(
Common
.
isNotNull
(
viewVo
))
{
viewVo
.
setPayFlag
(
vo
.
getPayFlag
());
if
(!
viewVo
.
isEmpty
())
{
viewVo
.
forEach
(
e
->{
e
.
setPayFlag
(
vo
.
getPayFlag
());});
socialDaprUtils
.
updateSocialSettleStatus
(
viewVo
);
}
}
catch
(
Exception
e
)
{
...
...
@@ -6559,7 +6558,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isEmpty
(
vo
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
EkpInsuranceViewVo
viewVo
;
List
<
EkpInsuranceViewVo
>
viewVo
;
try
{
//根据结算单号获取明细id和结算状态;判断是管理费还是风险金
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getTypeFlag
()))
{
...
...
@@ -6567,7 +6566,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
viewVo
=
ekpSettleService
.
selectFIncomelViewBySettleNo
(
vo
.
getSettleNo
());
}
if
(
Common
.
isNotNull
(
viewVo
))
{
if
(
!
viewVo
.
isEmpty
(
))
{
socialDaprUtils
.
updateIncomeSettleStatus
(
viewVo
);
}
}
catch
(
Exception
e
)
{
...
...
@@ -6582,14 +6581,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isEmpty
(
vo
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
EkpSocialViewVo
viewVo
;
List
<
EkpSocialViewVo
>
viewVo
;
try
{
//根据结算单号获取明细id和结算状态
String
payFlag
=
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getPayFlag
())
?
"0"
:
"1"
;
viewVo
=
ekpSettleService
.
selectSalarylViewBySettleNo
(
vo
.
getSettleNo
(),
payFlag
);
if
(
Common
.
isNotNull
(
viewVo
))
{
viewVo
.
setPayFlag
(
vo
.
getPayFlag
());
viewVo
=
ekpSettleService
.
selectSalarylViewBySettleNo
(
vo
.
getSettleNo
(),
vo
.
getPayFlag
());
if
(!
viewVo
.
isEmpty
())
{
viewVo
.
forEach
(
e
->{
e
.
setPayFlag
(
vo
.
getPayFlag
());});
salaryDaprUtil
.
updateSalarySettleStatus
(
viewVo
);
}
}
catch
(
Exception
e
)
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryAccountController.java
View file @
273d749e
...
...
@@ -301,7 +301,7 @@ public class TSalaryAccountController {
**/
@Inner
@PostMapping
(
"/inner/updateSalarySettleStatus"
)
public
void
updateSalarySettleStatus
(
@RequestBody
EkpSocialViewVo
viewVo
)
{
public
void
updateSalarySettleStatus
(
@RequestBody
List
<
EkpSocialViewVo
>
viewVo
)
{
tSalaryAccountService
.
updateSalarySettleStatus
(
viewVo
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
273d749e
...
...
@@ -132,5 +132,5 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @Date: 2022/12/26 17:56
* @return: R
**/
void
updateSalarySettleStatus
(
EkpSocialViewVo
viewVo
);
void
updateSalarySettleStatus
(
List
<
EkpSocialViewVo
>
viewVo
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
273d749e
...
...
@@ -235,18 +235,23 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
@Override
public
void
updateSalarySettleStatus
(
EkpSocialViewVo
viewVo
)
{
//根据明细id更新结算状态
TSalaryAccount
account
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
account
))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
account
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
account
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
}
else
{
account
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
account
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
public
void
updateSalarySettleStatus
(
List
<
EkpSocialViewVo
>
viewVoList
)
{
TSalaryAccount
account
;
if
(!
viewVoList
.
isEmpty
())
{
for
(
EkpSocialViewVo
viewVo:
viewVoList
)
{
//根据明细id更新结算状态
account
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
account
))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
account
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
account
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
}
else
{
account
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
account
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
baseMapper
.
updateById
(
account
);
}
}
baseMapper
.
updateById
(
account
);
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TIncomeController.java
View file @
273d749e
...
...
@@ -27,7 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.Ekp
Social
ViewVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.Ekp
Insurance
ViewVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
...
...
@@ -231,7 +231,7 @@ public class TIncomeController {
**/
@Inner
@PostMapping
(
"/inner/updateIncomeSettleStatus"
)
public
void
updateSocialSettleStatus
(
@RequestBody
EkpSocialViewVo
viewVo
)
{
public
void
updateSocialSettleStatus
(
@RequestBody
List
<
EkpInsuranceViewVo
>
viewVo
)
{
tIncomeService
.
updateIncomeSettleStatus
(
viewVo
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
273d749e
...
...
@@ -456,7 +456,7 @@ public class TPaymentInfoController {
**/
@Inner
@PostMapping
(
"/inner/updateSocialSettleStatus"
)
public
void
updateSocialSettleStatus
(
@RequestBody
EkpSocialViewVo
viewVo
)
{
public
void
updateSocialSettleStatus
(
@RequestBody
List
<
EkpSocialViewVo
>
viewVo
)
{
tPaymentInfoService
.
updateSocialSettleStatus
(
viewVo
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
View file @
273d749e
...
...
@@ -23,7 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
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.insurances.vo.Ekp
Social
ViewVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.Ekp
Insurance
ViewVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo
;
...
...
@@ -98,6 +98,6 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/12/26 17:56
* @return:
**/
void
updateIncomeSettleStatus
(
EkpSocialViewVo
viewVo
);
void
updateIncomeSettleStatus
(
List
<
EkpInsuranceViewVo
>
viewVo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
273d749e
...
...
@@ -169,6 +169,6 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
**/
R
<
String
>
changeDeptByEkp
(
ChangeDeptVo
changeDeptVo
);
void
updateSocialSettleStatus
(
EkpSocialViewVo
viewVo
);
void
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
viewVo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
273d749e
...
...
@@ -34,7 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.Ekp
Social
ViewVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.Ekp
Insurance
ViewVo
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
...
...
@@ -802,13 +802,18 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
@Override
public
void
updateIncomeSettleStatus
(
EkpSocialViewVo
viewVo
)
{
//根据明细id更新结算状态
TIncome
income
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
income
))
{
income
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
income
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
baseMapper
.
updateById
(
income
);
public
void
updateIncomeSettleStatus
(
List
<
EkpInsuranceViewVo
>
viewVoList
)
{
if
(!
viewVoList
.
isEmpty
())
{
TIncome
income
;
for
(
EkpInsuranceViewVo
viewVo
:
viewVoList
)
{
//根据明细id更新结算状态
income
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
income
))
{
income
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
income
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
baseMapper
.
updateById
(
income
);
}
}
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
273d749e
...
...
@@ -3273,35 +3273,41 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
@Override
public
void
updateSocialSettleStatus
(
EkpSocialViewVo
viewVo
)
{
//判断预估还是实缴
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_THR
))
{
//根据明细id更新结算状态
TPaymentInfo
paymentInfo
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
paymentInfo
))
{
//判断是收入还是支出结算单号
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
paymentInfo
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
paymentInfo
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
}
else
{
paymentInfo
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
paymentInfo
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
baseMapper
.
updateById
(
paymentInfo
);
}
}
else
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_ONE
)){
//根据明细id更新结算状态
TForecastLibrary
library
=
tForecastLibraryMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
library
))
{
//判断是收入还是支出结算单号
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
library
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
library
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
}
else
{
library
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
library
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
public
void
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
viewVoList
)
{
if
(!
viewVoList
.
isEmpty
())
{
TPaymentInfo
paymentInfo
;
TForecastLibrary
library
;
for
(
EkpSocialViewVo
viewVo:
viewVoList
)
{
//判断预估还是实缴
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_THR
))
{
//根据明细id更新结算状态
paymentInfo
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
paymentInfo
))
{
//判断是收入还是支出结算单号
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
paymentInfo
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
paymentInfo
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
}
else
{
paymentInfo
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
paymentInfo
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
baseMapper
.
updateById
(
paymentInfo
);
}
}
else
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_ONE
))
{
//根据明细id更新结算状态
library
=
tForecastLibraryMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
library
))
{
//判断是收入还是支出结算单号
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
library
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
library
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
}
else
{
library
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
library
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
tForecastLibraryMapper
.
updateById
(
library
);
}
}
tForecastLibraryMapper
.
updateById
(
library
);
}
}
}
...
...
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