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
0afe9a3c
Commit
0afe9a3c
authored
Sep 07, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature-zhaji
parents
a020a84f
4ec4186c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
756 additions
and
205 deletions
+756
-205
EkpIncomeUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
+4
-4
EkpSalaryUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
+2
-2
EkpSalaryParam.java
...va/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParam.java
+4
-0
EkpSalaryParamVo.java
.../com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParamVo.java
+0
-17
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+5
-1
TInsuranceDetailService.java
...insurances/service/insurance/TInsuranceDetailService.java
+2
-2
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+39
-17
OrderConstants.java
...fu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
+4
-0
OrderController.java
.../cloud/plus/v1/yifu/order/controller/OrderController.java
+1
-1
TOrderService.java
.../yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
+2
-2
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+7
-2
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+18
-17
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+2
-2
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+2
-2
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+20
-9
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+3
-3
TSendEkpError.java
.../yifu/cloud/plus/v1/yifu/social/entity/TSendEkpError.java
+75
-0
IncomeExportVo.java
...com/yifu/cloud/plus/v1/yifu/social/vo/IncomeExportVo.java
+2
-0
TSendEkpErrorController.java
...us/v1/yifu/social/controller/TSendEkpErrorController.java
+56
-0
TSendEkpErrorMapper.java
...cloud/plus/v1/yifu/social/mapper/TSendEkpErrorMapper.java
+41
-0
TSendEkpErrorService.java
...oud/plus/v1/yifu/social/service/TSendEkpErrorService.java
+37
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+137
-47
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+82
-15
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+58
-44
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+17
-18
TSendEkpErrorServiceImpl.java
...v1/yifu/social/service/impl/TSendEkpErrorServiceImpl.java
+59
-0
TSendEkpErrorMapper.xml
...ial-biz/src/main/resources/mapper/TSendEkpErrorMapper.xml
+77
-0
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
View file @
0afe9a3c
...
...
@@ -63,14 +63,14 @@ public class EkpIncomeUtil {
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
))
{
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
return
EkpConstants
.
SEND_FAILED
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
)
{
log
.
info
(
e
.
getMessage
());
return
null
;
return
e
.
getMessage
()
;
}
}
public
String
sendToEkpRisk
(
EkpIncomeParamRisk
param
)
{
...
...
@@ -100,14 +100,14 @@ public class EkpIncomeUtil {
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
))
{
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
return
EkpConstants
.
SEND_FAILED
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
)
{
log
.
info
(
e
.
getMessage
());
return
null
;
return
e
.
getMessage
()
;
}
}
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
View file @
0afe9a3c
...
...
@@ -57,14 +57,14 @@ public class EkpSalaryUtil {
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
return
EkpConstants
.
SEND_FAILED
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
){
log
.
info
(
e
.
getMessage
());
return
null
;
return
e
.
getMessage
()
;
}
}
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParam.java
View file @
0afe9a3c
...
...
@@ -13,6 +13,10 @@ import java.io.Serializable;
@Data
public
class
EkpSalaryParam
implements
Serializable
{
/**
* 工资id
**/
private
String
fd_3b10af838eab5c
;
/**
* 项目编码
**/
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParamVo.java
deleted
100644 → 0
View file @
a020a84f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public
class
EkpSalaryParamVo
extends
EkpSalaryParam
{
/**
* 报账表id
**/
private
String
salaryAccountId
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
0afe9a3c
...
...
@@ -9,6 +9,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
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.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.Dept
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService
;
...
...
@@ -94,7 +95,7 @@ public class TInsuranceDetailController {
@PostMapping
(
"/getInsuranceList"
)
@PreAuthorize
(
"@pms.hasPermission('insurance_custserve_insure_export')"
)
public
R
<
List
<
InsuranceListVO
>>
getInsuranceList
(
@RequestBody
InsuranceListParam
param
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceList
(
param
)
);
return
tInsuranceDetailService
.
getInsuranceList
(
param
);
}
/**
...
...
@@ -255,6 +256,9 @@ public class TInsuranceDetailController {
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
if
(
param
.
size
()
>
CommonConstants
.
IMPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
IMPORT_TOO_LONG
);
}
return
tInsuranceDetailService
.
insuranceHandleImport
(
user
,
param
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceDetailService.java
View file @
0afe9a3c
...
...
@@ -54,9 +54,9 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*
* @author licancan
* @param param
* @return {@link
List<InsuranceListVO
>}
* @return {@link
R<List<InsuranceListVO>
>}
*/
List
<
InsuranceListVO
>
getInsuranceList
(
InsuranceListParam
param
);
R
<
List
<
InsuranceListVO
>
>
getInsuranceList
(
InsuranceListParam
param
);
/**
* 投保办理分页查询
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
0afe9a3c
...
...
@@ -208,16 +208,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* 投保不分页查询
*
* @param param
* @return {@link
List<InsuranceListVO
>}
* @return {@link
R<List<InsuranceListVO>
>}
* @author licancan
*/
@Override
public
List
<
InsuranceListVO
>
getInsuranceList
(
InsuranceListParam
param
)
{
public
R
<
List
<
InsuranceListVO
>
>
getInsuranceList
(
InsuranceListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptList
=
getDeptNoList
(
user
);
List
<
InsuranceListVO
>
insuranceList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
deptList
)){
return
insuranceList
;
return
R
.
ok
(
insuranceList
)
;
}
param
.
setDeptNoList
(
deptList
);
insuranceList
=
baseMapper
.
getInsuranceList
(
param
);
...
...
@@ -225,11 +225,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
setProjectNameByDeptNo
(
insuranceList
);
// 购买月数
if
(
CollectionUtils
.
isNotEmpty
(
insuranceList
)){
if
(
insuranceList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
EXPORT_TOO_LONG
);
}
insuranceList
.
stream
().
forEach
(
e
->{
e
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
e
.
getPolicyStart
().
toString
(),
e
.
getPolicyEnd
().
toString
()));
});
}
return
insuranceList
;
return
R
.
ok
(
insuranceList
)
;
}
/**
* 投保办理分页查询
...
...
@@ -277,6 +280,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isEmpty
(
paramList
)){
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
if
(
paramList
.
size
()
>
CommonConstants
.
IMPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
IMPORT_TOO_LONG
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
...
@@ -327,6 +333,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isEmpty
(
paramList
)){
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
if
(
paramList
.
size
()
>
CommonConstants
.
IMPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
IMPORT_TOO_LONG
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
...
@@ -375,6 +384,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isEmpty
(
paramList
)){
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
if
(
paramList
.
size
()
>
CommonConstants
.
IMPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
IMPORT_TOO_LONG
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
...
@@ -880,6 +892,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceExportList
=
baseMapper
.
getInsuranceExportList
(
param
);
}
if
(
CollectionUtils
.
isNotEmpty
(
insuranceExportList
)){
if
(
insuranceExportList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
EXPORT_TOO_LONG
);
}
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceExportList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
...
...
@@ -1261,8 +1276,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService
.
save
(
settle
);
detail
.
setDefaultSettleId
(
settle
.
getId
());
successList
.
add
(
detail
);
if
(
detail
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
)
{
//生成收入数据
createInsuranceInfo
(
detail
);
}
}
else
{
//按天
//计算起止时间的天数
...
...
@@ -1295,10 +1312,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService
.
save
(
settle
);
detail
.
setDefaultSettleId
(
settle
.
getId
());
successList
.
add
(
detail
);
if
(
detail
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
)
{
//生成收入数据
createInsuranceInfo
(
detail
);
}
}
}
//实缴
if
(
detail
.
getSettleType
()
==
CommonConstants
.
ONE_INT
){
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
...
...
@@ -1372,6 +1391,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isEmpty
(
paramList
)){
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
if
(
paramList
.
size
()
>
CommonConstants
.
IMPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
IMPORT_TOO_LONG
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
...
@@ -5913,7 +5935,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有商险,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
THREE_STRING
))
{
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
.
contains
(
CommonConstants
.
THREE_STRING
))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
...
...
@@ -5943,7 +5966,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
THREE_STRING
))
{
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
()
.
contains
(
CommonConstants
.
THREE_STRING
))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
...
...
@@ -6000,6 +6024,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
socialDaprUtils
.
createTIncomeDetail
(
detail
);
}
...
...
@@ -6012,14 +6037,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for
(
TIncomeDetail
detail
:
detailList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
detail1
);
socialDaprUtils
.
deleteById
(
detail
);
//已推送的数据生成红冲数据
if
(
settle
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
||
settle
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
)
{
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detail1
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
}
}
}
}
}
yifu-order/yifu-order-api/src/main/java/com/yifu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
View file @
0afe9a3c
...
...
@@ -110,4 +110,8 @@ public class OrderConstants {
* 附件超出上传上限
*/
public
static
final
String
ENCLOSURE_SIZE_ERROR
=
"附件超出上传上限"
;
/**
* 一次性导出不可超过20000条,请分批导出
*/
public
static
final
String
EXPORT_TOO_LONG
=
"一次性导出不可超过20000条,请分批导出"
;
}
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/controller/OrderController.java
View file @
0afe9a3c
...
...
@@ -60,7 +60,7 @@ public class OrderController {
@GetMapping
(
"/getOrderList"
)
@PreAuthorize
(
"@pms.hasPermission('order:order_getOrderList')"
)
public
R
<
List
<
OrderListVO
>>
getOrderList
(
OrderListParam
param
)
{
return
R
.
ok
(
tOrderService
.
getOrderList
(
param
)
);
return
tOrderService
.
getOrderList
(
param
);
}
/**
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
View file @
0afe9a3c
...
...
@@ -34,9 +34,9 @@ public interface TOrderService extends IService<TOrder> {
*
* @author licancan
* @param param
* @return {@link
List<OrderListVO
>}
* @return {@link
R<List<OrderListVO>
>}
*/
List
<
OrderListVO
>
getOrderList
(
OrderListParam
param
);
R
<
List
<
OrderListVO
>
>
getOrderList
(
OrderListParam
param
);
/**
* 变更订单状态
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
0afe9a3c
...
...
@@ -83,7 +83,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
* @author licancan
*/
@Override
public
List
<
OrderListVO
>
getOrderList
(
OrderListParam
param
)
{
public
R
<
List
<
OrderListVO
>
>
getOrderList
(
OrderListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
OrderListVO
>
list
;
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
...
...
@@ -91,7 +91,12 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
else
{
list
=
baseMapper
.
getOrderList
(
param
,
user
.
getUsername
());
}
return
list
;
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
if
(
list
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
OrderConstants
.
EXPORT_TOO_LONG
);
}
}
return
R
.
ok
(
list
);
}
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
0afe9a3c
...
...
@@ -20,7 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
Vo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo
;
...
...
@@ -40,6 +40,7 @@ import java.util.List;
public
interface
TSalaryAccountMapper
extends
BaseMapper
<
TSalaryAccount
>
{
/**
* 工资报账主表(工资条)简单分页查询
*
* @param tSalaryAccount 工资报账主表(工资条)
* @return
*/
...
...
@@ -49,14 +50,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
* @param settleId
* @param settleMonth
* @Description: 版本2.6.6判重:对同一“结算主体”、同一“结算月份”、同一“报表类型”、同一“工资月份”、同一“身份证号”、同一“应发金额”进行校验
*
*
<p>
* 校验导入数据重复的Map格式:# 身份证号_工资月份_报表类型_应发金额
*
* @Author: hgw
* @Date: 2021/9/17 18:06
* @return: java.util.List<java.lang.String>
**/
List
<
AccountCheckVo
>
getAccountCheckList
(
@Param
(
"settleId"
)
String
settleId
,
@Param
(
"settleMonth"
)
String
settleMonth
);
List
<
AccountCheckVo
>
getAccountSpecialList
(
@Param
(
"invoiceTitle"
)
String
invoiceTitle
,
@Param
(
"unitId"
)
String
unitId
,
@Param
(
"salaryMonth"
)
String
salaryMonth
);
List
<
AccountCheckVo
>
getAccountCheckListLabor
(
@Param
(
"settleId"
)
String
settleId
,
@Param
(
"settleMonth"
)
String
settleMonth
);
...
...
@@ -72,15 +73,15 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
String
getMinTaxMonthByNowYear
(
@Param
(
"empIdCard"
)
String
empIdCard
,
@Param
(
"nowYear"
)
int
nowYear
);
/**
* @return
* @Author fxj
* @Description 获取有工资无社保数据
* @Date 17:23 2022/8/16
* @Param
* @return
**/
List
<
THaveSalaryNosocial
>
getLastMonthTHaveSalaryNosocial
(
@Param
(
"month"
)
String
month
,
@Param
(
"month2"
)
String
month2
,
@Param
(
"month3"
)
String
month3
);
List
<
THaveSalaryNosocial
>
getLastMonthTHaveSalaryNosocial
(
@Param
(
"month"
)
String
month
,
@Param
(
"month2"
)
String
month2
,
@Param
(
"month3"
)
String
month3
);
/**
* @Description: 薪资类型互斥校验 获取本年度身份证号列表
...
...
@@ -97,10 +98,10 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
* @Date: 2022/8/29 16:52
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List
<
EkpSalaryParam
Vo
>
getEkpSalaryParamList
(
@Param
(
"salaryId"
)
String
salaryId
);
List
<
EkpSalaryParam
>
getEkpSalaryParamList
(
@Param
(
"salaryId"
)
String
salaryId
);
List
<
TSalaryAccount
>
noPageDiy
(
@Param
(
"searchVo"
)
TSalaryAccountSearchVo
searchVo
,
@Param
(
"idList"
)
List
<
String
>
idList
);
@Param
(
"idList"
)
List
<
String
>
idList
);
/**
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
...
...
@@ -111,5 +112,5 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List
<
TSalaryAccount
>
getListByIncome
(
@Param
(
"salaryId"
)
String
salaryId
);
int
noPageCountDiy
(
@Param
(
"searchVo"
)
TSalaryAccountSearchVo
searchVo
,
@Param
(
"idList"
)
List
<
String
>
idList
);
@Param
(
"idList"
)
List
<
String
>
idList
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
0afe9a3c
...
...
@@ -20,7 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
Vo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo
;
...
...
@@ -104,5 +104,5 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @Date: 2022/8/29 16:54
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List
<
EkpSalaryParam
Vo
>
getEkpSalaryParamList
(
String
salaryId
);
List
<
EkpSalaryParam
>
getEkpSalaryParamList
(
String
salaryId
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
0afe9a3c
...
...
@@ -26,7 +26,7 @@ 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.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
Vo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper
;
...
...
@@ -212,7 +212,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
@Override
public
List
<
EkpSalaryParam
Vo
>
getEkpSalaryParamList
(
String
salaryId
)
{
public
List
<
EkpSalaryParam
>
getEkpSalaryParamList
(
String
salaryId
)
{
return
baseMapper
.
getEkpSalaryParamList
(
salaryId
);
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
0afe9a3c
...
...
@@ -35,7 +35,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryEstimate
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
...
...
@@ -49,9 +48,9 @@ import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
...
...
@@ -314,7 +313,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
());
if
(
Common
.
isEmpty
(
value
))
{
value
=
CommonConstants
.
ZERO_INT
;
...
...
@@ -325,6 +325,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
value
--;
}
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
(),
value
);
}
...
...
@@ -513,7 +514,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
return
R
.
failed
(
"未找到工资表"
);
}
else
if
(
s
.
getStatus
()
==
SalaryConstants
.
STATUS
[
2
]
||
s
.
getStatus
()
==
SalaryConstants
.
STATUS
[
10
])
{
//报账表
List
<
EkpSalaryParam
Vo
>
ekpList
=
salaryAccountService
.
getEkpSalaryParamList
(
id
);
List
<
EkpSalaryParam
>
ekpList
=
salaryAccountService
.
getEkpSalaryParamList
(
id
);
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
ekpList
!=
null
&&
!
ekpList
.
isEmpty
())
{
boolean
sendStatus
=
true
;
...
...
@@ -522,14 +523,14 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TSalaryAccount
account
;
Date
sendTime
=
new
Date
();
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
EkpSalaryParam
sendParam
;
for
(
EkpSalaryParamVo
sendParamVo
:
ekpList
)
{
for
(
EkpSalaryParam
sendParam
:
ekpList
)
{
// 转化报账表的参数
account
=
new
TSalaryAccount
();
account
.
setId
(
sendParamVo
.
getSalaryAccountId
());
sendParam
=
new
EkpSalaryParam
();
BeanUtils
.
copyProperties
(
sendParamVo
,
sendParam
);
account
.
setId
(
sendParam
.
getFd_3b10af838eab5c
());
sendBack
=
ekpSalaryUtil
.
sendToEKP
(
sendParam
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
ekpSalaryUtil
.
sendToEKP
(
sendParam
);
}
account
.
setSendTime
(
sendTime
);
account
.
setSendUser
(
user
.
getId
());
account
.
setSendUserName
(
user
.
getNickname
());
...
...
@@ -539,6 +540,16 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
account
.
setEkpId
(
sendBack
);
}
else
{
sendStatus
=
false
;
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
ONE_STRING
);
error
.
setCreateUserName
(
s
.
getCreateName
());
error
.
setLinkId
(
account
.
getId
());
error
.
setTitle
(
sendBack
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tsendekperror/inner/saveError"
,
error
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
accountList
.
add
(
account
);
}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
0afe9a3c
...
...
@@ -81,8 +81,8 @@
</resultMap>
<!-- 对接EKP的参数 -->
<resultMap
id=
"ekpSalaryParamVoMap"
type=
"com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
Vo
"
>
<
id
property=
"salaryAccountId"
column=
"id
"
/>
<resultMap
id=
"ekpSalaryParamVoMap"
type=
"com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam"
>
<
result
property=
"fd_3b10af838eab5c"
column=
"fd_3b10af838eab5c
"
/>
<result
property=
"fd_3adfedf98ccba2"
column=
"fd_3adfedf98ccba2"
/>
<result
property=
"fd_3adfedf9d2bf1c"
column=
"fd_3adfedf9d2bf1c"
/>
<result
property=
"fd_3adfedfacd65d6"
column=
"fd_3adfedfacd65d6"
/>
...
...
@@ -444,7 +444,7 @@
<!-- 获取薪资明细 -->
<select
id=
"getEkpSalaryParamList"
resultMap=
"ekpSalaryParamVoMap"
>
select
a.id
ifnull(a.id,'') fd_3b10af838eab5c
,ifnull(a.DEPT_NO,'') fd_3adfedf98ccba2
,ifnull(a.DEPT_NAME,'') fd_3adfedf9d2bf1c
,'' fd_3adfedfa4410aa
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSendEkpError.java
0 → 100644
View file @
0afe9a3c
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 推送ekp报错的记录表
*
* @author hgw
* @date 2022-9-7 16:11:24
*/
@Data
@TableName
(
"t_send_ekp_error"
)
@Schema
(
description
=
"推送ekp报错的记录表(同类型仅1条记录,更新计数器)"
)
public
class
TSendEkpError
{
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
private
String
id
;
@ExcelAttribute
(
name
=
"内容"
)
@ExcelProperty
(
"内容"
)
private
String
title
;
@ExcelAttribute
(
name
=
"类型"
)
@ExcelProperty
(
"类型(1薪资明细2预估明细3缴费明细4实时收入5定时收入)"
)
private
String
type
;
@ExcelAttribute
(
name
=
"创建日"
)
@ExcelProperty
(
"创建日"
)
private
String
createDay
;
@ExcelAttribute
(
name
=
"关联ID"
)
@ExcelProperty
(
"关联ID"
)
private
String
linkId
;
@ExcelAttribute
(
name
=
"创建时间"
)
@ExcelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@ExcelAttribute
(
name
=
"创建人姓名"
)
@ExcelProperty
(
"创建人姓名"
)
private
String
createUserName
;
@ExcelAttribute
(
name
=
"计数器"
)
@ExcelProperty
(
"计数器"
)
private
Integer
nums
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/IncomeExportVo.java
View file @
0afe9a3c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -124,6 +125,7 @@ public class IncomeExportVo implements Serializable {
/**
* 数据生成时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@NotBlank
(
message
=
"数据生成时间 不能为空"
)
@ExcelAttribute
(
name
=
"数据生成时间"
,
isNotEmpty
=
true
,
errorInfo
=
"数据生成时间 不能为空"
,
isDate
=
true
)
@Schema
(
description
=
"数据生成时间"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSendEkpErrorController.java
0 → 100644
View file @
0afe9a3c
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 推送ekp报错的记录表
*
* @author hgw
* @date 2022-08-30 17:34:58
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tsendekperror"
)
@Tag
(
name
=
"推送ekp报错的记录表"
)
public
class
TSendEkpErrorController
{
private
final
TSendEkpErrorService
tSendEkpErrorService
;
/**
* @Description: 新增-推送ekp报错的记录表
* @Author: hgw
* @Date: 2022/8/31 16:34
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Inner
@PostMapping
(
"/inner/saveError"
)
public
Boolean
saveError
(
@RequestBody
TSendEkpError
tSendEkpError
)
{
return
tSendEkpErrorService
.
saveError
(
tSendEkpError
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TSendEkpErrorMapper.java
0 → 100644
View file @
0afe9a3c
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* error存储
*
* @author hgw
* @date 2022-9-7 16:28:46
*/
@Mapper
public
interface
TSendEkpErrorMapper
extends
BaseMapper
<
TSendEkpError
>
{
/**
* @param tSendEkpError
* @Description: 查找对应类型的1条数据来更新
* @Author: hgw
* @Date: 2022/9/7 16:56
* @return: com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
**/
TSendEkpError
getByTitleTypeDay
(
@Param
(
"tSendEkpError"
)
TSendEkpError
tSendEkpError
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSendEkpErrorService.java
0 → 100644
View file @
0afe9a3c
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
/**
* 收入明细表
*
* @author hgw
* @date 2022-08-30 17:34:58
*/
public
interface
TSendEkpErrorService
extends
IService
<
TSendEkpError
>
{
/**
* @Description: 新增-推送ekp报错的记录表;
* @Author: hgw
* @Date: 2022/8/31 16:31
* @return: boolean
**/
boolean
saveError
(
TSendEkpError
tSendEkpError
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
0afe9a3c
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
0afe9a3c
...
...
@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
...
...
@@ -1553,11 +1554,21 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
baseMapper
.
deleteById
(
library
.
getId
());
}
//删除停缴月以后的收入数据
detailService
.
remove
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
().
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
List
<
TIncomeDetail
>
updateList
=
detailService
.
list
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
library
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TIncomeDetail:
:
getPayMonth
,
library
.
getSocialPayMonth
()));
if
(
Common
.
isNotNull
(
updateList
))
{
for
(
TIncomeDetail
upd
:
updateList
)
{
TIncomeDetail
detail
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
upd
,
detail
);
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail
.
setMoney
(
detail
.
getMoney
().
negate
());
incomeService
.
saveDetail
(
detail
);
}
}
}
private
void
calculateFundType
(
BigDecimal
zero
,
TForecastLibrary
library
)
{
...
...
@@ -1581,10 +1592,21 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
//删除停缴月以后的收入数据
detailService
.
remove
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
().
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
List
<
TIncomeDetail
>
updateList
=
detailService
.
list
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
library
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
TWO_STRING
)
.
eq
(
TIncomeDetail:
:
getPayMonth
,
library
.
getSocialPayMonth
()));
if
(
Common
.
isNotNull
(
updateList
))
{
for
(
TIncomeDetail
upd
:
updateList
)
{
TIncomeDetail
detail
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
upd
,
detail
);
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail
.
setMoney
(
detail
.
getMoney
().
negate
());
incomeService
.
saveDetail
(
detail
);
}
}
}
/**
...
...
@@ -1790,7 +1812,23 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
isSaveAndUpdate
=
true
;
}
}
}
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
{
//获取所有的预估数据
List
<
TForecastLibrary
>
librarySocialInfoList
=
null
;
librarySocialInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
socialFundInfo
.
getSettleDomain
())
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
));
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
}
...
...
@@ -2114,11 +2152,27 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library
.
setCreateName
(
"定时生成"
);
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
}
isSaveAndUpdate
=
true
;
}
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
{
//获取所有的预估数据
List
<
TForecastLibrary
>
librarySocialInfoList
=
null
;
librarySocialInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
socialFundInfo
.
getSettleDomain
())
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
));
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
}
isSaveAndUpdate
=
true
;
}
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
...
...
@@ -2223,6 +2277,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getSocialType
()))
{
continue
;
}
EkpPushSocialParam
socialParam
=
new
EkpPushSocialParam
();
//员工姓名
socialParam
.
setFd_3adfe8c79989d4
(
library
.
getEmpName
());
...
...
@@ -2451,6 +2508,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getFundType
()))
{
continue
;
}
EkpPushFundParam
fundParam
=
new
EkpPushFundParam
();
//员工姓名
fundParam
.
setFd_3adfe8c79989d4
(
library
.
getEmpName
());
...
...
@@ -2469,14 +2529,14 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
fundParam
.
setFd_3adfeb52a4d2e2
(
CommonConstants
.
EMPTY_STRING
);
}
//缴纳月份
if
(
Common
.
isNotNull
(
library
.
get
Social
PayMonth
()))
{
fundParam
.
setFd_3adfe8cf632700
(
dateStringInsert
(
library
.
get
Social
PayMonth
()));
if
(
Common
.
isNotNull
(
library
.
get
Provident
PayMonth
()))
{
fundParam
.
setFd_3adfe8cf632700
(
dateStringInsert
(
library
.
get
Provident
PayMonth
()));
}
else
{
fundParam
.
setFd_3adfe8cf632700
(
CommonConstants
.
EMPTY_STRING
);
}
//生成月份
if
(
Common
.
isNotNull
(
library
.
get
Social
CreateMonth
()))
{
fundParam
.
setFd_3adfe8cb96c41e
(
dateStringInsert
(
library
.
get
Social
CreateMonth
()));
if
(
Common
.
isNotNull
(
library
.
get
Provident
CreateMonth
()))
{
fundParam
.
setFd_3adfe8cb96c41e
(
dateStringInsert
(
library
.
get
Provident
CreateMonth
()));
}
else
{
fundParam
.
setFd_3adfe8cb96c41e
(
CommonConstants
.
EMPTY_STRING
);
}
...
...
@@ -2594,16 +2654,22 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
incomeDetail
.
setSourceType
(
sourceType
);
List
<
TIncomeDetail
>
detailList
=
detailService
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
))
{
BigDecimal
sumMoney
=
BigDecimal
.
ZERO
;
for
(
TIncomeDetail
income
:
detailList
)
{
sumMoney
=
BigDecimalUtils
.
safeAdd
(
income
.
getMoney
(),
sumMoney
);
}
if
(
sumMoney
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConstants
.
ONE_INT
)
{
isExist
=
true
;
}
}
//判断是否为按人次收费
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
)))
{
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
)
)))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
...
...
@@ -2635,8 +2701,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
((
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
)))
{
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
)
)))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
...
...
@@ -2698,6 +2764,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
detail
.
setFeeMode
(
feeMode
);
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detail
.
setId
(
CommonConstants
.
NULL
);
incomeService
.
saveDetail
(
detail
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
0afe9a3c
...
...
@@ -31,14 +31,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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.EkpIncomeParam
;
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.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.IncomeExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeVo
;
...
...
@@ -66,6 +67,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
@Autowired
private
TIncomeDetailService
tIncomeDetailService
;
@Autowired
private
TSendEkpErrorService
tSendEkpErrorService
;
@Autowired
private
EkpIncomeUtil
ekpIncomeUtil
;
...
...
@@ -315,11 +319,24 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
this
.
save
(
income
);
String
sendBack
=
this
.
getSendBack
(
income
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
this
.
getSendBack
(
income
);
}
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FOUR_STRING
);
error
.
setCreateUserName
(
"收入表推送"
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
sendBack
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
return
this
.
updateById
(
income
);
}
...
...
@@ -518,21 +535,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
else
{
Integer
myNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getSourceType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
socialNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
ONE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
fundNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
TWO_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
insureNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
THREE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
salaryNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
// 红冲判断:当本类型是最大值,才可以红冲
if
(
myNum
!=
null
&&
myNum
>
ifNullToZero
(
socialNum
)
&&
myNum
>
ifNullToZero
(
fundNum
)
&&
myNum
>
ifNullToZero
(
insureNum
)
&&
myNum
>
ifNullToZero
(
salaryNum
))
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
// 商险。收费方式:2金额-人数
...
...
@@ -543,21 +547,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
else
{
Integer
myNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getSourceType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
socialNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
ONE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
fundNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
TWO_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
insureNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
THREE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
salaryNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
// 红冲判断:当本类型是最大值,才可以红冲
if
(
myNum
!=
null
&&
myNum
>
ifNullToZero
(
socialNum
)
&&
myNum
>
ifNullToZero
(
fundNum
)
&&
myNum
>
ifNullToZero
(
insureNum
)
&&
myNum
>
ifNullToZero
(
salaryNum
))
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
else
{
// 各个模式累加逻辑:
...
...
@@ -580,6 +570,43 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
true
;
}
/**
* @Description: 红冲判断
* @Author: hgw
* @Date: 2022/9/7 17:27
* @return: boolean
**/
private
boolean
redDateJudge
(
TIncomeDetail
tIncomeDetail
,
Map
<
String
,
Integer
>
numMap
)
{
Integer
socialNum
=
CommonConstants
.
ZERO_INT
;
Integer
fundNum
=
CommonConstants
.
ZERO_INT
;
Integer
insureNum
=
CommonConstants
.
ZERO_INT
;
Integer
salaryNum
=
CommonConstants
.
ZERO_INT
;
Integer
myNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getSourceType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
socialNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
ONE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
}
if
(!
CommonConstants
.
TWO_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
fundNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
TWO_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
}
if
(!
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
insureNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
THREE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
}
if
(!
CommonConstants
.
FOUR_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
salaryNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
}
// 红冲判断:当本类型是最大值,才可以红冲
if
(
myNum
!=
null
&&
myNum
>
ifNullToZero
(
socialNum
)
&&
myNum
>
ifNullToZero
(
fundNum
)
&&
myNum
>
ifNullToZero
(
insureNum
)
&&
myNum
>
ifNullToZero
(
salaryNum
))
{
return
true
;
}
return
false
;
}
private
int
ifNullToZero
(
Integer
num
)
{
if
(
num
==
null
)
{
return
CommonConstants
.
ZERO_INT
;
...
...
@@ -607,21 +634,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
else
{
Integer
myNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getSourceType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
socialNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
ONE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
fundNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
TWO_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
insureNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
THREE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
salaryNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
// 红冲判断:当本类型是最大值,才可以红冲
if
(
myNum
!=
null
&&
myNum
>
ifNullToZero
(
socialNum
)
&&
myNum
>
ifNullToZero
(
fundNum
)
&&
myNum
>
ifNullToZero
(
insureNum
)
&&
myNum
>
ifNullToZero
(
salaryNum
))
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
}
return
false
;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
0afe9a3c
...
...
@@ -28,12 +28,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
...
@@ -48,8 +45,6 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
...
...
@@ -64,7 +59,6 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentHeFeiVo;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.checkerframework.checker.units.qual.C
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -2381,8 +2375,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//订单类型
socialParam
.
setFd_3add9dd7833db8
(
SocialConstants
.
DIFF_TYPE_THR
);
//是否有预估
if
(
Common
.
isNotNull
(
settleDomain
.
get
MrSettle
Type
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
get
MrSettle
Type
()))
{
if
(
Common
.
isNotNull
(
settleDomain
.
get
Social
Type
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
get
Social
Type
()))
{
socialParam
.
setFd_3add9de0be85e4
(
CommonConstants
.
IS_TRUE
);
}
else
{
socialParam
.
setFd_3add9de0be85e4
(
CommonConstants
.
IS_FALSE
);
...
...
@@ -2598,8 +2592,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//订单类型
fundParam
.
setFd_3add9dd7833db8
(
SocialConstants
.
DIFF_TYPE_THR
);
//是否有预估
if
(
Common
.
isNotNull
(
settleDomain
.
get
MrSettle
Type
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
get
MrSettle
Type
()))
{
if
(
Common
.
isNotNull
(
settleDomain
.
get
Fund
Type
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
get
Fund
Type
()))
{
fundParam
.
setFd_3add9de0be85e4
(
CommonConstants
.
IS_TRUE
);
}
else
{
fundParam
.
setFd_3add9de0be85e4
(
CommonConstants
.
IS_FALSE
);
...
...
@@ -2693,25 +2687,29 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
Boolean
exitFlag
=
false
;
TIncomeDetail
exitIncome
=
new
TIncomeDetail
();
List
<
TIncomeDetail
>
exitIncome
=
new
ArrayList
<>
();
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
exitIncome
=
detailMapper
.
select
One
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
exitIncome
=
detailMapper
.
select
List
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
paymentInfo
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getPayMonth
,
paymentInfo
.
getSocialPayMonth
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
paymentInfo
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
ONE_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
ONE_STRING
));
}
else
{
exitIncome
=
detailMapper
.
select
One
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
exitIncome
=
detailMapper
.
select
List
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
paymentInfo
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getPayMonth
,
paymentInfo
.
getSocialPayMonth
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
paymentInfo
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
TWO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
TWO_STRING
));
}
if
(
Common
.
isNotNull
(
exitIncome
))
{
BigDecimal
sumMoney
=
BigDecimal
.
ZERO
;
for
(
TIncomeDetail
income
:
exitIncome
)
{
sumMoney
=
BigDecimalUtils
.
safeAdd
(
income
.
getMoney
(),
sumMoney
);
}
if
(
sumMoney
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConstants
.
ONE_INT
)
{
exitFlag
=
true
;
}
}
//判断是否为按人次收费
int
isSum
=
0
;
...
...
@@ -2821,6 +2819,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
incomeService
.
saveDetail
(
detail
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSendEkpErrorServiceImpl.java
0 → 100644
View file @
0afe9a3c
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
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.social.entity.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSendEkpErrorMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
/**
* 收入明细表
*
* @author hgw
* @date 2022-08-30 17:34:58
*/
@Log4j2
@Service
public
class
TSendEkpErrorServiceImpl
extends
ServiceImpl
<
TSendEkpErrorMapper
,
TSendEkpError
>
implements
TSendEkpErrorService
{
/**
* @Description: 新增-推送ekp报错的记录表;
* @Author: hgw
* @Date: 2022/8/31 16:34
* @return: boolean
**/
@Override
public
boolean
saveError
(
TSendEkpError
tSendEkpError
)
{
// 类型、创建日不可为空
if
(
Common
.
isEmpty
(
tSendEkpError
.
getType
())
||
Common
.
isEmpty
(
tSendEkpError
.
getCreateDay
()))
{
return
false
;
}
TSendEkpError
error
=
baseMapper
.
getByTitleTypeDay
(
tSendEkpError
);
if
(
error
==
null
)
{
return
this
.
save
(
tSendEkpError
);
}
else
{
error
.
setNums
(
error
.
getNums
()+
CommonConstants
.
ONE_INT
);
return
this
.
updateById
(
error
);
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TSendEkpErrorMapper.xml
0 → 100644
View file @
0afe9a3c
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.social.mapper.TSendEkpErrorMapper"
>
<resultMap
id=
"tSendEkpErrorMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"createDay"
column=
"CREATE_DAY"
/>
<result
property=
"linkId"
column=
"LINK_ID"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createUserName"
column=
"CREATE_USER_NAME"
/>
<result
property=
"nums"
column=
"NUMS"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.TITLE,
a.TYPE,
a.CREATE_DAY,
a.LINK_ID,
a.CREATE_TIME,
a.CREATE_USER_NAME,
a.NUMS
</sql>
<sql
id=
"tSendEkpError_where"
>
<if
test=
"tSendEkpError != null"
>
<if
test=
"tSendEkpError.id != null and tSendEkpError.id.trim() != ''"
>
AND a.ID = #{tSendEkpError.id}
</if>
<if
test=
"tSendEkpError.title != null and tSendEkpError.title.trim() != ''"
>
AND a.TITLE = #{tSendEkpError.title}
</if>
<if
test=
"tSendEkpError.title == null or tSendEkpError.title.trim() == ''"
>
AND a.TITLE is null
</if>
<if
test=
"tSendEkpError.type != null and tSendEkpError.type.trim() != ''"
>
AND a.TYPE = #{tSendEkpError.type}
</if>
<if
test=
"tSendEkpError.createDay != null and tSendEkpError.createDay.trim() != ''"
>
AND a.CREATE_DAY = #{tSendEkpError.createDay}
</if>
</if>
</sql>
<!-- 查找对应类型的1条数据来更新 -->
<select
id=
"getByTitleTypeDay"
resultMap=
"tSendEkpErrorMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_provident_fund a
<where>
1=1
<include
refid=
"tSendEkpError_where"
/>
</where>
limit 1
</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