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
02ad1b5e
Commit
02ad1b5e
authored
Dec 09, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/MVP1.0
parents
cedbdd12
f7435bd3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
58 changed files
with
1912 additions
and
806 deletions
+1912
-806
TEmployeeInfo.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
+14
-0
EmployeeExportVO.java
...yifu/cloud/plus/v1/yifu/archives/vo/EmployeeExportVO.java
+5
-0
TSettleDomainListVo.java
...u/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
+4
-0
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+15
-2
TSettleDomainMapper.java
...oud/plus/v1/yifu/archives/mapper/TSettleDomainMapper.java
+2
-0
TSettleDomainService.java
...d/plus/v1/yifu/archives/service/TSettleDomainService.java
+3
-4
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+10
-0
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+7
-2
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+14
-0
AsyncConfig.java
...fu/cloud/plus/v1/yifu/common/core/config/AsyncConfig.java
+3
-3
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+5
-1
ErrorCodes.java
.../cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
+4
-0
ExcelUtil.java
...m/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
+2
-2
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+4
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+14
-1
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
+260
-358
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
+26
-4
TInsuranceOperateMapper.xml
...n/resources/mapper/insurances/TInsuranceOperateMapper.xml
+18
-0
SocialTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
+13
-0
TSalaryStandard.java
...ifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
+20
-4
TStatisticsDeclarer.java
...cloud/plus/v1/yifu/salary/entity/TStatisticsDeclarer.java
+15
-1
TSalaryStandardExportVo.java
...cloud/plus/v1/yifu/salary/vo/TSalaryStandardExportVo.java
+1
-1
TStatisticsDeclarerVo.java
...u/cloud/plus/v1/yifu/salary/vo/TStatisticsDeclarerVo.java
+7
-1
TSalaryStandardController.java
.../v1/yifu/salary/controller/TSalaryStandardController.java
+10
-0
TStatisticsDeclarerMapper.java
...plus/v1/yifu/salary/mapper/TStatisticsDeclarerMapper.java
+7
-0
TSalaryStandardService.java
...d/plus/v1/yifu/salary/service/TSalaryStandardService.java
+9
-0
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+90
-197
TStatisticsDeclarerServiceImpl.java
...u/salary/service/impl/TStatisticsDeclarerServiceImpl.java
+32
-4
DoJointSalaryAsyncTask.java
...loud/plus/v1/yifu/salary/util/DoJointSalaryAsyncTask.java
+212
-0
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+5
-1
TStatisticsDeclarerMapper.xml
...z/src/main/resources/mapper/TStatisticsDeclarerMapper.xml
+32
-7
TPaymentInfo.java
...m/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
+7
-0
TPreDispatchInfo.java
...fu/cloud/plus/v1/yifu/social/entity/TPreDispatchInfo.java
+1
-1
TPreDispatchExportVo.java
...fu/cloud/plus/v1/yifu/social/vo/TPreDispatchExportVo.java
+1
-0
TIncomeController.java
...oud/plus/v1/yifu/social/controller/TIncomeController.java
+13
-1
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+14
-1
TIncomeDetailMapper.java
...cloud/plus/v1/yifu/social/mapper/TIncomeDetailMapper.java
+8
-0
TPaymentInfoMapper.java
.../cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
+41
-4
TForecastLibraryService.java
.../plus/v1/yifu/social/service/TForecastLibraryService.java
+2
-2
TIncomeDetailService.java
...oud/plus/v1/yifu/social/service/TIncomeDetailService.java
+9
-0
TIncomeService.java
...ifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
+1
-1
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+2
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+69
-96
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+46
-33
TIncomeDetailServiceImpl.java
...v1/yifu/social/service/impl/TIncomeDetailServiceImpl.java
+11
-0
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+35
-19
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+192
-47
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+2
-2
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+54
-0
DoSocialTask.java
...com/yifu/cloud/plus/v1/yifu/social/util/DoSocialTask.java
+221
-0
TIncomeDetailMapper.xml
...ial-biz/src/main/resources/mapper/TIncomeDetailMapper.xml
+12
-0
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+59
-4
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
View file @
02ad1b5e
...
...
@@ -122,6 +122,20 @@ public class TEmployeeInfo extends BaseEntity {
@Max
(
value
=
200
,
message
=
"年龄不可超过200"
)
private
Integer
empAge
;
/**
* 年龄查询开始
*/
@Schema
(
description
=
"年龄查询开始"
)
@TableField
(
exist
=
false
)
private
int
empAgeStart
;
/**
* 年龄查询结束
*/
@Schema
(
description
=
"年龄查询结束"
)
@TableField
(
exist
=
false
)
private
int
empAgeEnd
;
/**
* 婚姻状态
*/
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeExportVO.java
View file @
02ad1b5e
...
...
@@ -71,6 +71,11 @@ public class EmployeeExportVO extends BaseEntity {
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
LocalDateTime
validityEnd
;
@ExcelProperty
(
value
=
"年龄"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelAttribute
(
name
=
"年龄"
)
private
Integer
empAge
;
@ExcelAttribute
(
name
=
"婚姻状况"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_MARRIED
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"婚姻状况"
)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
View file @
02ad1b5e
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
lombok.Data
;
import
java.util.List
;
...
...
@@ -14,6 +15,9 @@ public class TSettleDomainListVo {
private
List
<
TSettleDomainSelectVo
>
listSelectVO
;
private
Map
<
String
,
TSettleDomainSelectVo
>
mapSlectVo
;
private
Map
<
String
,
TSettleDomain
>
mapVO
;
/**
* 合同主体IDS
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
02ad1b5e
...
...
@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService
;
...
...
@@ -42,7 +41,6 @@ import org.springframework.web.bind.annotation.*;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -241,6 +239,21 @@ public class TSettleDomainController {
return
tSettleDomainService
.
getSetInfoByCodes
(
codes
);
}
/**
* @Author fxj
* @Description 通过项目编码获取项目及客户信息
* @Date 10:49 2022/7/20
* @Param
* @return
**/
@Operation
(
description
=
"通过项目编码获取项目及客户信息"
)
@SysLog
(
"通过项目编码获取项目及客户信息"
)
@Inner
@PostMapping
(
"/getSettleInfoByCodes"
)
public
TSettleDomainListVo
getSettleInfoByCodes
(
@RequestBody
List
<
String
>
codes
)
{
return
tSettleDomainService
.
getSettleInfoByCodes
(
codes
);
}
/**
* @param id 项目主键
* @Description: 通过id获取结算主体及单位部分信息
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TSettleDomainMapper.java
View file @
02ad1b5e
...
...
@@ -76,4 +76,6 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
* @return
**/
List
<
ProjectSetInfoVo
>
getSetInfoByCodes
(
@Param
(
value
=
"codes"
)
List
<
String
>
codes
);
List
<
TSettleDomain
>
getSettleInfoByCodes
(
@Param
(
value
=
"codes"
)
List
<
String
>
codes
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TSettleDomainService.java
View file @
02ad1b5e
...
...
@@ -21,10 +21,7 @@ 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.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainEkpVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
...
...
@@ -81,6 +78,8 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
SetInfoVo
getSetInfoByCodes
(
List
<
String
>
codes
);
TSettleDomainListVo
getSettleInfoByCodes
(
List
<
String
>
codes
);
/**
* 通过id获取项目及单位部分信息
* @param
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
02ad1b5e
...
...
@@ -328,6 +328,16 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return
setMap
;
}
@Override
public
TSettleDomainListVo
getSettleInfoByCodes
(
List
<
String
>
codes
)
{
List
<
TSettleDomain
>
voList
=
baseMapper
.
getSettleInfoByCodes
(
codes
);
TSettleDomainListVo
setMap
=
new
TSettleDomainListVo
();
if
(
Common
.
isNotNull
(
voList
)){
setMap
.
setMapVO
(
voList
.
stream
().
collect
(
Collectors
.
toMap
(
TSettleDomain:
:
getDepartNo
,
k
->
k
)));
}
return
setMap
;
}
/**
* @Author fxj
* @Description 更新EKP对应MVP 项目权限,已有权限不做删除处理
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
02ad1b5e
...
...
@@ -82,6 +82,7 @@
<result
property=
"empNatrue"
column=
"EMP_NATRUE"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empAge"
column=
"EMP_AGE"
/>
<result
property=
"validityStart"
column=
"VALIDITY_START"
/>
<result
property=
"validityEnd"
column=
"VALIDITY_END"
/>
<result
property=
"empMarriStatus"
column=
"EMP_MARRI_STATUS"
/>
...
...
@@ -329,8 +330,11 @@
<if
test=
"tEmployeeInfo.empBirthday != null"
>
AND a.EMP_BIRTHDAY = #{tEmployeeInfo.empBirthday}
</if>
<if
test=
"tEmployeeInfo.empAge != null"
>
AND a.EMP_AGE = #{tEmployeeInfo.empAge}
<if
test=
"tEmployeeInfo.empAgeStart >0"
>
AND a.EMP_AGE >= #{tEmployeeInfo.empAgeStart}
</if>
<if
test=
"tEmployeeInfo.empAgeEnd >0"
>
AND a.EMP_AGE
<![CDATA[ <= ]]>
#{tEmployeeInfo.empAgeEnd}
</if>
<if
test=
"tEmployeeInfo.empMarriStatus != null and tEmployeeInfo.empMarriStatus.trim() != ''"
>
AND a.EMP_MARRI_STATUS = #{tEmployeeInfo.empMarriStatus}
...
...
@@ -952,6 +956,7 @@
a.EMP_NATRUE,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_AGE,
a.VALIDITY_START,
a.VALIDITY_END,
a.EMP_MARRI_STATUS,
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
02ad1b5e
...
...
@@ -297,4 +297,18 @@
</if>
</select>
<select
id=
"getSettleInfoByCodes"
resultMap=
"tSettleDomainMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_settle_domain a
where 1=1
and a.DELETE_FLAG = '0'
<if
test=
"codes != null and codes.size() > 0"
>
and a.DEPART_NO in
<foreach
collection=
"codes"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
</select>
</mapper>
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/config/AsyncConfig.java
View file @
02ad1b5e
...
...
@@ -41,17 +41,17 @@ public class AsyncConfig implements AsyncConfigurer {
* <!-- 允许的空闲时间,当线程空闲时间达到keepAliveTime时,线程会退出,直到线程数量=corePoolSize -->
* <!-- 如果allowCoreThreadTimeout=true,则会直到线程数量=0 -->
*/
taskExecutor
.
setKeepAliveSeconds
(
20
0
);
taskExecutor
.
setKeepAliveSeconds
(
6
0
);
/**
* <!-- 线程池维护线程的最大数量 -->
* <!-- 当线程数>=corePoolSize,且任务队列已满时。线程池会创建新线程来处理任务 -->
* <!-- 当线程数=maxPoolSize,且任务队列已满时,线程池会拒绝处理任务而抛出异常,异常见下
*/
taskExecutor
.
setMaxPoolSize
(
5
0
);
taskExecutor
.
setMaxPoolSize
(
10
0
);
/**
* <!-- 缓存队列(阻塞队列)当核心线程数达到最大时,新任务会放在队列中排队等待执行 -->
*/
taskExecutor
.
setQueueCapacity
(
1
00
);
taskExecutor
.
setQueueCapacity
(
6
00
);
/**
* 建议配置threadNamePrefix属性,出问题时可以更方便的进行排查。
**/
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
02ad1b5e
...
...
@@ -156,6 +156,10 @@ public interface CommonConstants {
* number 5000
*/
int
FIVES_INT
=
5000
;
/**
* number 5000
*/
int
TEN_THOUSAND_INT
=
10000
;
/**
* number 1
...
...
@@ -200,7 +204,7 @@ public interface CommonConstants {
* @Author pwang
* @Date 2019-08-02 16:39
**/
int
[]
dingleDigitIntArray
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
int
[]
dingleDigitIntArray
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
};
/**
* 个位数字串(阿里编码规约不允许直接使用‘魔法值’)
* @Author pwang
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
View file @
02ad1b5e
...
...
@@ -514,6 +514,10 @@ public interface ErrorCodes {
*/
String
EMP_DISPATCH_SOCIAL_PAYMENT_TYPE_NOT_SAME
=
"emp.dispatch.social.payment.type.same"
;
String
SOCIAL_HOLD_IS_EMPTY
=
"social.hold.is.empty"
;
String
FUND_HOLD_IS_EMPTY
=
"fund.hold.is.empty"
;
String
ARCHIVES_IMPORT_EMP_TRUE
=
"archives.import.emp.true"
;
/**
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
View file @
02ad1b5e
...
...
@@ -723,7 +723,7 @@ public class ExcelUtil <T> implements Serializable {
}
else
{
return
errorInfo
(
attr
,
"_必须为数字且最多两位小数"
,
i
);
}
}
else
if
(
attr
.
min
()
==
0
)
{
}
/*
else if (attr.min() == 0) {
if (Common.isNumber(c)) {
if (attr.isFloat()){
if (Float.valueOf(c).compareTo(attr.min()) < CommonConstants.ZERO_INT) {
...
...
@@ -731,7 +731,7 @@ public class ExcelUtil <T> implements Serializable {
}
}
}
}
}
*/
}
return
null
;
}
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
02ad1b5e
...
...
@@ -205,6 +205,10 @@ emp.dispatch.emp.contract.sub.name.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u54
emp.dispatch.social.record.base.not.exist
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u5907\u6848\u
57FA
\u6570\u
4E0D
\u
53EF
\u
4E3A
\u
7A7A
social.hold.is.empty
=
\u
793E
\u
4FDD
\u6237\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
fund.hold.is.empty
=
\u
516C
\u
79EF
\u
91D1
\u6237\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
02ad1b5e
...
...
@@ -59,7 +59,20 @@ public class ArchivesDaprUtil {
}
return
res
;
}
/**
* @Author huyc
* @Description 通过项目编码获取项目及客户信息
* @Date 21:18 2022/7/20
* @Param
* @return
**/
public
R
<
TSettleDomainListVo
>
getSettleInfoByCodes
(
List
<
String
>
codes
){
R
<
TSettleDomainListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/getSettleInfoByCodes"
,
JSON
.
toJSONString
(
codes
),
TSettleDomainListVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"通过项目编码获取项目及客户信息失败!"
);
}
return
res
;
}
/**
* @Author fxj
* @Description 获取派单校验需要的档案信息
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceUpdateVO.java
0 → 100644
View file @
02ad1b5e
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 @
02ad1b5e
...
...
@@ -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 @
02ad1b5e
...
...
@@ -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 @
02ad1b5e
...
...
@@ -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 @
02ad1b5e
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 @
02ad1b5e
...
...
@@ -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 @
02ad1b5e
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 @
02ad1b5e
...
...
@@ -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,
...
...
@@ -1020,8 +1025,8 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.
createBy != null and param.cre
ateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.
cre
ateBy}
<if
test=
"param.
updateBy != null and param.upd
ateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.
upd
ateBy}
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
...
...
@@ -1194,11 +1199,14 @@
FROM
t_insurance_detail
where
DELETE_FLAG = 0 AND EMP_IDCARD_NO in
DELETE_FLAG = 0
<if
test=
"idCardList != null and idCardList.size > 0"
>
AND EMP_IDCARD_NO in
<foreach
item=
"item"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
<if
test=
"idList != null"
>
</if>
<if
test=
"idList != null and idList.size > 0"
>
AND id not in
<foreach
item=
"item"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{item}
...
...
@@ -1206,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 @
02ad1b5e
...
...
@@ -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},
#{item.remark},
#{item.displayFlag},
#{item.createBy},
#{item.createTime},
#{item.createName},
#{item.operateDesc},
#{item.insuranceDetailId}
)
</foreach>
</insert>
</mapper>
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
View file @
02ad1b5e
...
...
@@ -132,4 +132,17 @@ public class SocialTask {
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/pushDetail"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时任务生成统计表数据-定时任务结束------------"
);
}
/**
* @Description: 定时任务标识根据项目不需要生成收入的数据
* @Author: huyc
* @Date: 2022/8/30
* @return: void
**/
public
void
signPaymentNoIncomeFlag
()
{
log
.
info
(
"------------定时任务标识根据项目不需要生成收入的数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/signPaymentNoIncomeFlag"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时任务标识根据项目不需要生成收入的数据-定时任务结束------------"
);
}
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
View file @
02ad1b5e
...
...
@@ -148,12 +148,12 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty
(
"款项来源(0客户到款/1垫付)"
)
private
Integer
moneyFrom
;
/**
* 状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)
* 状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印
10 推送失败 11 推送收入中12推送收入失败
)
*/
@ExcelAttribute
(
name
=
"状态(0待提交1待审核2:待推送
3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印10 推送
失败)"
,
isNotEmpty
=
true
,
errorInfo
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空"
)
@NotBlank
(
message
=
"状态(0待提交1待审核2:待推送
3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印10 推送
失败)不能为空"
)
@ExcelAttribute
(
name
=
"状态(0待提交1待审核2:待推送
明细3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印10 推送失败 11 已审核生成收入中12已审核生成收入
失败)"
,
isNotEmpty
=
true
,
errorInfo
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空"
)
@NotBlank
(
message
=
"状态(0待提交1待审核2:待推送
明细3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印10 推送失败 11 已审核生成收入中12已审核生成收入
失败)不能为空"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"状态(0待提交1待审核2:待推送
3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印 10 推送
失败)"
)
@ExcelProperty
(
"状态(0待提交1待审核2:待推送
明细3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印 10 推送失败 11 已审核生成收入中12已审核生成收入
失败)"
)
private
Integer
status
;
/**
* 提交时间
...
...
@@ -415,6 +415,22 @@ public class TSalaryStandard extends BaseEntity {
@ExcelIgnore
private
String
bpoFlag
;
/**
* 生成、推送收入的开始时间
*/
@ExcelAttribute
(
name
=
"生成、推送收入的开始时间"
,
isDate
=
true
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"生成、推送收入的开始时间"
)
private
Date
incomeStartTime
;
/**
* 生成、推送收入的完成时间
*/
@ExcelAttribute
(
name
=
"生成、推送收入的完成时间"
,
isDate
=
true
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"生成、推送收入的完成时间"
)
private
Date
incomeEndTime
;
/**
* 工资月份-起
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TStatisticsDeclarer.java
View file @
02ad1b5e
...
...
@@ -21,6 +21,7 @@ import com.alibaba.excel.annotation.ExcelIgnore;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
...
...
@@ -120,5 +121,18 @@ public class TStatisticsDeclarer {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"不申报原因"
)
private
String
undeclareReason
;
/**
* 是否0申报人员 0 是 1 否
*/
@ExcelAttribute
(
name
=
"是否0申报人员"
,
maxLength
=
1
,
readConverterExp
=
"0=是,1=否"
)
@Length
(
max
=
1
,
message
=
"是否0申报人员不能超过1个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否0申报人员"
)
private
String
isZeroDeclare
;
/**
* 是否0申报人员 0 是 1 否
*/
@TableField
(
exist
=
false
)
@ExcelIgnore
private
String
isZeroFlag
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryStandardExportVo.java
View file @
02ad1b5e
...
...
@@ -26,7 +26,7 @@ public class TSalaryStandardExportVo implements Serializable {
/**
* 状态0待提交 1待审核 2审核通过 3发送成功 5审核不通过 10 发送失败
*/
@ExcelAttribute
(
name
=
"状态"
,
isDataId
=
true
,
readConverterExp
=
"0=待提交,1=待审核,2=
审核通过,3=发送成功,5=审核不通过,6=确认不通过,10=发送
失败"
)
@ExcelAttribute
(
name
=
"状态"
,
isDataId
=
true
,
readConverterExp
=
"0=待提交,1=待审核,2=
待推送明细,3=发送成功,5=审核不通过,6=确认不通过,10=发送失败,11=已审核生成收入中,12=已审核生成收入
失败"
)
@NotBlank
(
message
=
"状态(0待提交 1待审核 2审核通过 3发送成功 5审核不通过 10 发送失败)不能为空"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"薪酬状态"
)
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TStatisticsDeclarerVo.java
View file @
02ad1b5e
...
...
@@ -74,5 +74,11 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"不申报原因"
)
private
String
undeclareReason
;
/**
* 是否0申报人员 0 是 1 否
*/
@ExcelAttribute
(
name
=
"是否0申报人员"
,
maxLength
=
1
,
readConverterExp
=
"0=是,1=否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否0申报人员"
)
private
String
isZeroDeclare
;
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardController.java
View file @
02ad1b5e
...
...
@@ -229,4 +229,14 @@ public class TSalaryStandardController {
public
R
<
String
>
backSalaryByApplyNo
(
@RequestParam
String
applyNo
)
{
return
tSalaryStandardService
.
backSalaryByApplyNo
(
applyNo
);
}
/**
* @param id
* @return
*/
@Operation
(
description
=
"重新生成收入"
)
@GetMapping
(
"/salaryDoIncome"
)
public
R
<
String
>
salaryDoIncome
(
@RequestParam
String
id
)
{
return
tSalaryStandardService
.
salaryDoIncome
(
id
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TStatisticsDeclarerMapper.java
View file @
02ad1b5e
...
...
@@ -47,4 +47,11 @@ public interface TStatisticsDeclarerMapper extends BaseMapper<TStatisticsDeclare
* @return:
**/
List
<
TStatisticsDeclarer
>
doStatisticsTaxDeclarer
(
@Param
(
"nowMonth"
)
String
nowMonth
,
@Param
(
"lastMonth"
)
String
lastYear
);
/**
* @param
* @Description: 统计
* @return:
**/
List
<
TStatisticsDeclarer
>
doStatisticsTaxDeclarerYear
(
@Param
(
"nowMonth"
)
String
nowMonth
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryStandardService.java
View file @
02ad1b5e
...
...
@@ -63,6 +63,15 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
*/
R
<
String
>
salaryStandardAudit
(
String
auditFlag
,
String
auditRemark
,
String
id
);
/**
* @param id 工资表id
* @Description: 重新生成收入
* @Author: hgw
* @Date: 2022/11/29 17:49
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
salaryDoIncome
(
String
id
);
/**
* @Description: 删除工资表
* @Author: hgw
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
02ad1b5e
This diff is collapsed.
Click to expand it.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsDeclarerServiceImpl.java
View file @
02ad1b5e
...
...
@@ -29,13 +29,16 @@ 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.yifu.archives.entity.TEmployeeInfo
;
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.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
...
...
@@ -46,6 +49,7 @@ import java.io.InputStream;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 申报对象表
*
...
...
@@ -53,9 +57,12 @@ import java.util.List;
* @date 2022-08-11 10:56:10
*/
@Log4j2
@RequiredArgsConstructor
@Service
public
class
TStatisticsDeclarerServiceImpl
extends
ServiceImpl
<
TStatisticsDeclarerMapper
,
TStatisticsDeclarer
>
implements
TStatisticsDeclarerService
{
private
final
ArchivesDaprUtil
archivesDaprUtil
;
/**
* 申报对象表简单分页查询
* @param tStatisticsDeclarer 申报对象表
...
...
@@ -176,10 +183,31 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
if
(
num
>
0
)
{
return
R
.
failed
(
"上月数据已生成,不可重复生成!"
);
}
else
{
String
lastMonth
=
DateUtil
.
addMonth
(-
1
);
//上月
List
<
TStatisticsDeclarer
>
stdvoList
=
baseMapper
.
doStatisticsTaxDeclarer
(
nowMonth
,
lastMonth
);
for
(
TStatisticsDeclarer
declarer
:
stdvoList
)
{
this
.
save
(
declarer
);
String
lastMonth
=
DateUtil
.
addMonth
(-
1
);
//上月
List
<
TStatisticsDeclarer
>
stdvoList
=
baseMapper
.
doStatisticsTaxDeclarer
(
nowMonth
,
lastMonth
);
if
(
Common
.
isNotNull
(
stdvoList
))
{
for
(
TStatisticsDeclarer
declarer
:
stdvoList
)
{
this
.
save
(
declarer
);
}
}
List
<
TStatisticsDeclarer
>
stdvoYearList
=
baseMapper
.
doStatisticsTaxDeclarerYear
(
nowMonth
);
if
(
Common
.
isNotNull
(
stdvoYearList
))
{
R
<
TEmployeeInfo
>
res
;
for
(
TStatisticsDeclarer
declarer
:
stdvoYearList
)
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
declarer
.
getIsZeroDeclare
()))
{
res
=
archivesDaprUtil
.
getTEmployeeInfoByIdcard
(
declarer
.
getEmpIdcard
());
if
(
Common
.
isNotNull
(
res
)
&&
Common
.
isNotNull
(
res
.
getData
())
&&
(
CommonConstants
.
ZERO_INT
==
res
.
getData
().
getFileStatus
()))
{
declarer
.
setIsZeroDeclare
(
CommonConstants
.
ZERO_STRING
);
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
declarer
.
getIsZeroFlag
()))
{
declarer
.
setIsZeroDeclare
(
CommonConstants
.
ZERO_STRING
);
}
else
{
declarer
.
setIsZeroDeclare
(
CommonConstants
.
ONE_STRING
);
}
}
this
.
save
(
declarer
);
}
}
return
R
.
ok
();
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/DoJointSalaryAsyncTask.java
0 → 100644
View file @
02ad1b5e
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
util
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
java.math.BigDecimal
;
import
java.util.*
;
/**
* @author hgw
* @Date 2022-11-29 16:31:09
* @Description 异步执行薪资
*/
@Slf4j
@Component
@AllArgsConstructor
@EnableConfigurationProperties
({
DaprSocialProperties
.
class
})
public
class
DoJointSalaryAsyncTask
{
private
final
DaprSocialProperties
socialProperties
;
private
final
TSalaryStandardMapper
salaryStandardMapper
;
/**
* @Description: 收入
* @Author: hgw
* @Date: 2022-11-29 17:28:494
**/
@Async
public
void
doIncomeDetail
(
TSettleDomainSelectVo
dept
,
List
<
TSalaryAccount
>
salaryAccountList
,
String
id
,
TSalaryStandard
tSalaryStandard
)
{
log
.
info
(
"推送收入到EKP-线程开始"
);
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
List
<
String
>
idCardList
=
new
ArrayList
<>();
for
(
TSalaryAccount
account
:
salaryAccountList
)
{
idCardList
.
add
(
account
.
getEmpIdcard
());
}
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
boolean
isTrue
=
true
;
TSalaryStandard
s
=
salaryStandardMapper
.
selectById
(
id
);
try
{
// 收入相关
R
<
String
>
failed1
=
getIncomeDetailMap
(
tSalaryStandard
,
dept
,
idCardList
,
detailMap
);
if
(
failed1
!=
null
)
{
isTrue
=
false
;
}
else
{
// 含有薪资,则计算收入
// 管理费
if
(
Common
.
isNotNull
(
dept
.
getManageServerItem
())
&&
dept
.
getManageServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getManagementTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getManagementType
()))
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
}
else
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
}
}
// 风险金
if
(
isTrue
&&
Common
.
isNotNull
(
dept
.
getRiskServerItem
())
&&
dept
.
getRiskServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getRiskFundTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getRiskFundType
()))
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
}
else
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
}
}
}
}
catch
(
Exception
e
)
{
isTrue
=
false
;
log
.
error
(
e
.
getMessage
());
}
if
(
s
!=
null
&&
(
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
]
||
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
12
]))
{
s
.
setIncomeEndTime
(
new
Date
());
if
(
isTrue
)
{
s
.
setStatus
(
CommonConstants
.
TWO_INT
);
salaryStandardMapper
.
updateById
(
s
);
}
else
{
s
.
setStatus
(
CommonConstants
.
dingleDigitIntArray
[
12
]);
salaryStandardMapper
.
updateById
(
s
);
}
}
}
log
.
info
(
"推送收入到EKP结束"
);
}
/**
* @Description: 获取收入信息
* @Author: hgw
* @Date: 2022/9/6 10:39
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
R
<
String
>
getIncomeDetailMap
(
TSalaryStandard
tSalaryStandard
,
TSettleDomainSelectVo
dept
,
List
<
String
>
idCardList
,
Map
<
String
,
Integer
>
detailMap
)
{
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setApplyNo
(
tSalaryStandard
.
getApplyNo
());
detail
.
setPayMonth
(
tSalaryStandard
.
getSalaryMonth
());
detail
.
setIdCardList
(
idCardList
);
detail
.
setDeptId
(
dept
.
getId
());
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincomedetail/inner/getTIncomeDetailList"
,
detail
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
Integer
value
;
if
(
detailR
!=
null
)
{
if
(
detailR
.
getData
()
!=
null
&&
detailR
.
getData
().
getDetailList
()
!=
null
&&
!
detailR
.
getData
().
getDetailList
().
isEmpty
())
{
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
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
;
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
incomeDetail
.
getRedData
()))
{
value
++;
}
else
{
value
--;
}
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
(),
value
);
}
}
}
else
{
return
R
.
failed
(
"获取收入明细的详情出错,请联系管理员!"
);
}
return
null
;
}
/**
* @param feeType 1按比例2金额-人数3金额-人次
* @param isManage 1 管理费2 风险金
* @Description: 保存明细
* @Author: hgw
* @Date: 2022/9/2 17:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
boolean
saveIncomeDetail
(
List
<
TSalaryAccount
>
salaryAccountList
,
TSalaryStandard
tSalaryStandard
,
TSettleDomainSelectVo
dept
,
Map
<
String
,
Integer
>
detailMap
,
String
feeType
,
String
isManage
)
{
TIncomeDetail
detail
;
Integer
value
;
BigDecimal
money
;
for
(
TSalaryAccount
account
:
salaryAccountList
)
{
value
=
detailMap
.
get
(
account
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
account
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
isManage
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
);
if
(
Common
.
isEmpty
(
value
)
||
value
==
0
)
{
detail
=
new
TIncomeDetail
();
detail
.
setPayMonth
(
account
.
getSalaryMonth
());
detail
.
setDeptId
(
account
.
getDeptId
());
detail
.
setDeptName
(
account
.
getDeptName
());
detail
.
setDeptNo
(
account
.
getDeptNo
());
detail
.
setUnitId
(
tSalaryStandard
.
getUnitId
());
detail
.
setUnitName
(
tSalaryStandard
.
getUnitName
());
detail
.
setUnitNo
(
tSalaryStandard
.
getUnitNo
());
detail
.
setCreateMonth
(
account
.
getSalaryMonth
());
detail
.
setEmpIdcard
(
account
.
getEmpIdcard
());
detail
.
setEmpName
(
account
.
getEmpName
());
detail
.
setFeeMode
(
dept
.
getManagementType
());
detail
.
setFeeType
(
isManage
);
detail
.
setCharges
(
String
.
valueOf
(
dept
.
getManagementFee
()));
money
=
dept
.
getManagementFee
();
if
(
CommonConstants
.
TWO_STRING
.
equals
(
isManage
))
{
money
=
dept
.
getRiskFundFee
();
detail
.
setCharges
(
String
.
valueOf
(
dept
.
getRiskFundFee
()));
detail
.
setFeeMode
(
dept
.
getRiskFundType
());
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
feeType
))
{
money
=
BigDecimalUtils
.
safeMultiply
(
account
.
getRelaySalary
(),
money
,
CommonConstants
.
ONE_OF_PERCENT
);
}
detail
.
setMoney
(
money
);
detail
.
setMrSettleType
(
dept
.
getMrSettleType
());
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detail
.
setSourceId
(
account
.
getId
());
detail
.
setSourceType
(
CommonConstants
.
FOUR_STRING
);
detail
.
setApplyNo
(
tSalaryStandard
.
getApplyNo
());
R
<
Boolean
>
saveR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincome/inner/saveSalaryDetail"
,
detail
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
saveR
==
null
||
saveR
.
getCode
()
==
CommonConstants
.
ONE_INT
||
Boolean
.
FALSE
.
equals
(
saveR
.
getData
()))
{
return
false
;
}
}
}
return
true
;
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
02ad1b5e
...
...
@@ -75,6 +75,8 @@
<result
property=
"orderId"
column=
"ORDER_ID"
/>
<result
property=
"bpoFlag"
column=
"BPO_FLAG"
/>
<result
property=
"applyNo"
column=
"APPLY_NO"
/>
<result
property=
"incomeStartTime"
column=
"INCOME_START_TIME"
/>
<result
property=
"incomeEndTime"
column=
"INCOME_END_TIME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -128,7 +130,9 @@
a.INVOICE_TITLE,
a.ORDER_ID,
a.BPO_FLAG,
a.APPLY_NO
a.APPLY_NO,
a.INCOME_START_TIME,
a.INCOME_END_TIME
</sql>
<sql
id=
"tSalaryStandard_where"
>
<if
test=
"tSalaryStandard != null"
>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsDeclarerMapper.xml
View file @
02ad1b5e
...
...
@@ -32,8 +32,10 @@
<result
property=
"empPhone"
column=
"EMP_PHONE"
/>
<result
property=
"occupationType"
column=
"OCCUPATION_TYPE"
/>
<result
property=
"occupationMonth"
column=
"OCCUPATION_MONTH"
/>
<result
property=
"isZeroDeclare"
column=
"IS_ZERO_DECLARE"
/>
<result
property=
"isDeclare"
column=
"IS_DECLARE"
/>
<result
property=
"undeclareReason"
column=
"UNDECLARE_REASON"
/>
<result
property=
"isZeroFlag"
column=
"IS_ZERO_FLAG"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -44,6 +46,7 @@
a.EMP_PHONE,
a.OCCUPATION_TYPE,
a.OCCUPATION_MONTH,
a.IS_ZERO_DECLARE,
a.IS_DECLARE,
a.UNDECLARE_REASON
</sql>
...
...
@@ -73,8 +76,11 @@
<if
test=
"tStatisticsDeclarer.occupationMonth != null and tStatisticsDeclarer.occupationMonth.trim() != ''"
>
AND a.OCCUPATION_MONTH = #{tStatisticsDeclarer.occupationMonth}
</if>
<if
test=
"tStatisticsDeclarer.isZeroDeclare != null and tStatisticsDeclarer.isZeroDeclare.trim() != ''"
>
AND a.IS_ZERO_DECLARE = #{tStatisticsDeclarer.isZeroDeclare}
</if>
<if
test=
"tStatisticsDeclarer.isDeclare != null and tStatisticsDeclarer.isDeclare.trim() != ''"
>
AND a.IS_DECLARE = #{tStatisticsDeclarer.isDeclare}
AND a.IS_DECLARE = #{tStatisticsDeclarer.isDeclare}
</if>
<if
test=
"tStatisticsDeclarer.undeclareReason != null and tStatisticsDeclarer.undeclareReason.trim() != ''"
>
AND a.UNDECLARE_REASON = #{tStatisticsDeclarer.undeclareReason}
...
...
@@ -97,15 +103,34 @@
<select
id=
"doStatisticsTaxDeclarer"
resultMap=
"tStatisticsDeclarerMap"
>
SELECT
#{nowMonth} DECLARE_MONTH,c.EMP_NAME,c.EMP_IDCARD,c.EMP_PHONE,c.INVOICE_TITLE DECLARE_UNIT,
if(c.FORM_TYPE=0,'0',if(c.FORM_TYPE=3 or c.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE FROM
if(c.FORM_TYPE=0,'0',if(c.FORM_TYPE=3 or c.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE,
'1' IS_ZERO_DECLARE,
'0' IS_ZERO_FLAG
FROM
(SELECT s.* FROM t_salary_account s,
(SELECT a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.INVOICE_TITLE,a.FORM_TYPE,MAX(CREATE_TIME) max_day,a.SETTLEMENT_MONTH,
if(a.FORM_TYPE=0,'0',if(a.FORM_TYPE=3 or a.FORM_TYPE=4,'1','-')) CUPATION_TYPE
FROM t_salary_account a WHERE a.DELETE_FLAG = '0' AND a.SETTLEMENT_MONTH = #{lastMonth}
GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE,CUPATION_TYPE,a.SETTLEMENT_MONTH) b
WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH) c
GROUP BY c.EMP_IDCARD,c.INVOICE_TITLE,c.SETTLEMENT_MONTH
GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE,CUPATION_TYPE,a.SETTLEMENT_MONTH) b
WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH) c
GROUP BY c.EMP_IDCARD,c.INVOICE_TITLE,c.SETTLEMENT_MONTH,OCCUPATION_TYPE
</select>
<select
id=
"doStatisticsTaxDeclarerYear"
resultMap=
"tStatisticsDeclarerMap"
>
select b.DECLARE_MONTH,b.EMP_NAME,b.EMP_IDCARD,b.EMP_PHONE,b.DECLARE_UNIT,
b.OCCUPATION_TYPE,
b.IS_ZERO_DECLARE,
b.IS_ZERO_FLAG from (
SELECT
#{nowMonth} DECLARE_MONTH,c.EMP_NAME,c.EMP_IDCARD,c.EMP_PHONE,c.INVOICE_TITLE DECLARE_UNIT,
if(c.FORM_TYPE=0 or c.FORM_TYPE=1 or c.FORM_TYPE=2,'0',if(c.FORM_TYPE=3 or c.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE,
'2' IS_ZERO_DECLARE,
if(DATE_FORMAT(max(c.CREATE_TIME),"%Y%m")>=DATE_FORMAT(DATE_SUB(CURDATE(),INTERVAL 3 MONTH),"%Y%m"),'1','0') IS_ZERO_FLAG
FROM t_salary_account c WHERE c.DELETE_FLAG = '0' and c.SETTLEMENT_MONTH like concat(DATE_FORMAT(NOW(), '%Y'), '%')
GROUP BY c.EMP_IDCARD
having DATE_FORMAT(DATE_SUB(CURDATE(),INTERVAL 1 MONTH),"%Y%m")
>DATE_FORMAT(max(c.CREATE_TIME),"%Y%m")) b
group by b.EMP_IDCARD,b.DECLARE_UNIT,b.OCCUPATION_TYPE
</select>
</mapper>
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
View file @
02ad1b5e
...
...
@@ -632,6 +632,13 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty
(
"工资公积金结算状态"
)
private
String
salaryFundFlag
;
/**
* 是否需要生成收入
*/
@Schema
(
description
=
"是否需要生成收入 0需要 1不需要"
)
@ExcelIgnore
private
String
isIncomeStatus
;
/**
* 是否导入重复标识
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TPreDispatchInfo.java
View file @
02ad1b5e
...
...
@@ -51,7 +51,7 @@ public class TPreDispatchInfo extends BaseEntity {
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"id"
)
private
String
id
;
private
String
id
;
/**
* 0 派增 1 派减
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPreDispatchExportVo.java
View file @
02ad1b5e
...
...
@@ -17,6 +17,7 @@ import java.time.LocalDateTime;
public
class
TPreDispatchExportVo
implements
Serializable
{
@ExcelAttribute
(
name
=
"主键"
,
needExport
=
true
)
@ExcelProperty
(
"主键"
)
private
String
id
;
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TIncomeController.java
View file @
02ad1b5e
...
...
@@ -168,7 +168,19 @@ public class TIncomeController {
@Inner
@PostMapping
(
"/inner/saveDetail"
)
public
Boolean
saveDetail
(
@RequestBody
TIncomeDetail
tIncomeDetail
)
{
return
tIncomeService
.
saveDetail
(
tIncomeDetail
);
return
tIncomeService
.
saveDetail
(
tIncomeDetail
,
true
);
}
/**
* @Description: 薪资新增收入明细-详情表,同时统计;采用同步操作,因为薪资本身就是异步
* @Author: hgw
* @Date: 2022-11-29 17:29:29
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Inner
@PostMapping
(
"/inner/saveSalaryDetail"
)
public
Boolean
saveSalaryDetail
(
@RequestBody
TIncomeDetail
tIncomeDetail
)
{
return
tIncomeService
.
saveDetail
(
tIncomeDetail
,
false
);
}
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
02ad1b5e
...
...
@@ -19,7 +19,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
...
@@ -381,6 +380,20 @@ public class TPaymentInfoController {
tPaymentInfoService
.
createPaymentFundIncome
();
}
/**
* @Description: 定时任务标识根据项目不需要生成收入的数据
* @Author: huyc
* @Date: 2022/8/30
* @return: void
**/
@Operation
(
summary
=
"定时任务标识根据项目不需要生成收入的数据"
,
description
=
"定时任务标识根据项目不需要生成收入的数据"
)
@SysLog
(
"定时任务标识根据项目不需要生成收入的数据"
)
@Inner
@PostMapping
(
"/inner/signPaymentNoIncomeFlag"
)
public
void
signPaymentNoIncomeFlag
()
{
tPaymentInfoService
.
signPaymentNoIncomeFlag
();
}
/**
* @param info
* @Description: 查询缴费库
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TIncomeDetailMapper.java
View file @
02ad1b5e
...
...
@@ -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/mapper/TPaymentInfoMapper.java
View file @
02ad1b5e
...
...
@@ -169,31 +169,68 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfo
>
getTPaymentSocialPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentSocialPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库公积金推送查询
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfo
>
getTPaymentFundPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentFundPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库社保收入推送查询
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfo
>
getTPaymentSocialIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentSocialIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库公积金收入推送查询
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfo
>
getTPaymentFundIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentFundIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
void
updateBySocialPayment
(
@Param
(
"id"
)
String
id
);
void
updateBySocialIncomePayment
(
@Param
(
"id"
)
String
id
);
void
updateBySocialIncomeFlag
(
@Param
(
"id"
)
String
id
);
/**
* 缴费库社保推送查询
* @param searchVo 缴费库
* @return
*/
long
getTPaymentSocialPushCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库公积金推送查询
* @param searchVo 缴费库
* @return
*/
long
getTPaymentFundPushCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库社保收入推送查询
* @param searchVo 缴费库
* @return
*/
long
getTPaymentSocialIncomeCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库公积金收入推送查询
* @param searchVo 缴费库
* @return
*/
long
getTPaymentFundIncomeCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TForecastLibraryService.java
View file @
02ad1b5e
...
...
@@ -128,8 +128,8 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
void
createForecastInfo
();
void
createForecastFundInfo
();
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
);
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
);
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
);
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TIncomeDetailService.java
View file @
02ad1b5e
...
...
@@ -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/TIncomeService.java
View file @
02ad1b5e
...
...
@@ -58,7 +58,7 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/8/31 16:31
* @return: boolean
**/
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
);
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
,
boolean
synFlag
);
/**
* @Description: 新增收入明细-详情表,同时统计;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
02ad1b5e
...
...
@@ -146,6 +146,8 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
void
createPaymentInfoIncome
();
void
createPaymentFundIncome
();
void
signPaymentNoIncomeFlag
();
TPaymentVo
getPaymentSocialAndFound
(
TPaymentInfo
info
);
void
pushPaymentSocialFundInfo
(
TPaymentInfoSearchVo
searchVo
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
02ad1b5e
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 @
02ad1b5e
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/TIncomeDetailServiceImpl.java
View file @
02ad1b5e
...
...
@@ -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 @
02ad1b5e
...
...
@@ -251,8 +251,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @Date: 2022/8/31 16:34
* @return: boolean
**/
@Override
public
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
)
{
public
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
,
boolean
synFlag
)
{
if
(
Common
.
isEmpty
(
tIncomeDetail
.
getEmpIdcard
())
||
Common
.
isEmpty
(
tIncomeDetail
.
getDeptId
())
||
Common
.
isEmpty
(
tIncomeDetail
.
getPayMonth
()))
{
...
...
@@ -274,10 +273,10 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
tIncomeDetailService
.
save
(
tIncomeDetail
);
// 不存在,直接新增
if
(
incomeList
==
null
||
incomeList
.
isEmpty
())
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
else
{
// 核心判断
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
,
null
);
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
,
null
,
synFlag
);
}
}
...
...
@@ -313,7 +312,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
// 核心判断
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
,
paymentInfo
);
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
,
paymentInfo
,
true
);
}
}
...
...
@@ -401,14 +400,18 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
// 复制并保存
private
boolean
saveIncome
(
TIncomeDetail
tIncomeDetail
)
{
private
boolean
saveIncome
(
TIncomeDetail
tIncomeDetail
,
boolean
synFlag
)
{
TIncome
income
=
new
TIncome
();
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
income
.
setApplyNo
(
tIncomeDetail
.
getApplyNo
());
this
.
save
(
income
);
long
start
=
System
.
currentTimeMillis
();
doJointSocialTask
.
asynchronousEkpIncome
(
income
);
if
(
synFlag
){
doJointSocialTask
.
asynchronousEkpIncome
(
income
);
}
else
{
doJointSocialTask
.
asynchronousEkpIncomeAsso
(
income
);
}
log
.
error
(
"线程执行耗时:"
+
(
System
.
currentTimeMillis
()-
start
));
return
true
;
}
...
...
@@ -571,13 +574,26 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @return: boolean
**/
private
boolean
copyCore
(
TIncomeDetail
tIncomeDetail
,
List
<
TIncome
>
incomeList
,
List
<
TIncomeDetail
>
detailList
,
TPaymentInfo
paymentInfo
)
{
TPaymentInfo
paymentInfo
,
boolean
synFlag
)
{
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
());
a
.
setFeeType
(
tIncomeDetail
.
getFeeType
());
int
repeatNums
=
tIncomeDetailService
.
getTIncomeDetailRepeat
(
a
);
if
(
repeatNums
>
CommonConstants
.
ZERO_INT
)
{
return
true
;
}
}
// 判断,比例,直接加
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tIncomeDetail
.
getFeeMode
()))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
else
{
Map
<
String
,
Integer
>
numMap
=
new
HashMap
<>();
...
...
@@ -633,7 +649,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
else
{
...
...
@@ -642,7 +658,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
...
...
@@ -655,7 +671,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
else
{
...
...
@@ -663,13 +679,13 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
}
else
{
// 各个模式累加逻辑:
return
this
.
judgeMixModel
(
tIncomeDetail
,
numMap
,
incomeMap
);
return
this
.
judgeMixModel
(
tIncomeDetail
,
numMap
,
incomeMap
,
synFlag
);
}
}
else
{
// 薪资。收费方式:2金额-人数
...
...
@@ -679,13 +695,13 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
else
{
// 3金额-人次
// 各个模式累加逻辑:
return
this
.
judgeMixModel
(
tIncomeDetail
,
numMap
,
incomeMap
);
return
this
.
judgeMixModel
(
tIncomeDetail
,
numMap
,
incomeMap
,
synFlag
);
}
}
}
...
...
@@ -742,7 +758,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @Date: 2022/9/1 18:17
* @return: boolean
**/
private
boolean
judgeMixModel
(
TIncomeDetail
tIncomeDetail
,
Map
<
String
,
Integer
>
numMap
,
Map
<
String
,
Integer
>
incomeMap
)
{
private
boolean
judgeMixModel
(
TIncomeDetail
tIncomeDetail
,
Map
<
String
,
Integer
>
numMap
,
Map
<
String
,
Integer
>
incomeMap
,
boolean
synFlag
)
{
String
month
=
tIncomeDetail
.
getPayMonth
();
if
(
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
month
=
tIncomeDetail
.
getDataCreateMonth
();
...
...
@@ -753,11 +769,11 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
Integer
maxNum
=
incomeMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
// 当明细的次数大于总次数,才可以新增统计
if
(
Common
.
isEmpty
(
maxNum
)
||
ifNullToZero
(
nums
)
>=
maxNum
)
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
else
{
// 红冲判断:当本类型是最大值,才可以红冲
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
return
true
;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
02ad1b5e
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/TPreDispatchInfoServiceImpl.java
View file @
02ad1b5e
...
...
@@ -2347,7 +2347,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
importVo
.
setPost
(
preInfo
.
getPositionAdd
());
importVo
.
setWorkingHours
(
preInfo
.
getWorkingHoursAdd
());
importVo
.
setEmpNational
(
CommonConstants
.
ONE_STRING
);
importVo
.
setEducationName
(
CommonConstants
.
FIVE_STRING
);
importVo
.
setEducationName
(
"大专"
);
importVo
.
setTrustRemark
(
"预派单"
);
if
(
null
!=
preInfo
.
getPensionBase
()){
importVo
.
setRecordBase
(
preInfo
.
getPensionBase
());
...
...
@@ -2406,7 +2406,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
**/
private
void
initDispatchContractVo
(
TPreDispatchInfo
preInfo
,
TDispatchImportVo
importVo
)
{
if
(
Common
.
isNotNull
(
preInfo
.
getContractNameAdd
())){
importVo
.
setContractName
(
preInfo
.
getContractTypeAdd
()
);
importVo
.
setContractName
(
"其他"
);
if
(
Common
.
isNotNull
(
preInfo
.
getContractStartAdd
())){
importVo
.
setContractStart
(
DateUtil
.
stringToDate
(
ServiceUtil
.
replaceSeparator
(
preInfo
.
getContractStartAdd
(),
CommonConstants
.
CENTER_SPLIT_LINE_STRING
,
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
02ad1b5e
...
...
@@ -102,6 +102,44 @@ public class DoJointSocialTask {
}
log
.
info
(
"推送收入到EKP结束"
);
}
public
void
asynchronousEkpIncomeAsso
(
TIncome
income
)
{
log
.
info
(
"推送收入到EKP-线程开始"
);
try
{
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
);
incomeMapper
.
updateById
(
income
);
}
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
);
}
}
catch
(
Exception
e
)
{
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
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送收入到EKP错误"
,
e
);
}
log
.
info
(
"推送收入到EKP结束"
);
}
/**
* @Description: 合同-批量更换负责人
...
...
@@ -401,6 +439,13 @@ public class DoJointSocialTask {
**/
@Async
public
void
asynchronousEkpForecastSocial
(
EkpPushSocialParam
socialParam
,
TForecastLibrary
library
)
{
ekpForecastSocial
(
socialParam
,
library
);
}
public
void
asynchronousEkpForecastSocialAsso
(
EkpPushSocialParam
socialParam
,
TForecastLibrary
library
)
{
ekpForecastSocial
(
socialParam
,
library
);
}
private
void
ekpForecastSocial
(
EkpPushSocialParam
socialParam
,
TForecastLibrary
library
)
{
log
.
info
(
"推送社保预估费用到EKP-线程开始"
);
try
{
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
...
...
@@ -444,6 +489,11 @@ public class DoJointSocialTask {
**/
@Async
public
void
asynchronousEkpForecastFund
(
EkpPushFundParam
fundParam
,
TForecastLibrary
library
)
{
initEkpForecastFund
(
fundParam
,
library
);
}
private
void
initEkpForecastFund
(
EkpPushFundParam
fundParam
,
TForecastLibrary
library
)
{
initEkpForecastFund
(
fundParam
,
library
);
log
.
info
(
"推送公积金预估费用到EKP-线程开始"
);
try
{
String
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
...
...
@@ -478,4 +528,8 @@ public class DoJointSocialTask {
}
log
.
info
(
"推送公积金预估费用到EKP结束"
);
}
public
void
asynchronousEkpForecastFundAsso
(
EkpPushFundParam
fundParam
,
TForecastLibrary
library
)
{
initEkpForecastFund
(
fundParam
,
library
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoSocialTask.java
0 → 100644
View file @
02ad1b5e
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
util
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
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
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils
;
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.R
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary
;
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.entity.TSocialFundInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSendEkpErrorMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2022/11/28
* @Description 批量办理异步处理
* @Version 1.0
*/
@Slf4j
@Component
public
class
DoSocialTask
{
@Autowired
private
TForecastLibraryService
forecastLibraryService
;
@Autowired
private
TIncomeDetailService
detailService
;
@Autowired
private
ArchivesDaprUtil
archivesDaprUtil
;
@Autowired
private
TIncomeService
incomeService
;
@Autowired
private
TSendEkpErrorMapper
sendEkpErrorMapper
;
/**
* @Author fxj
* @Description 异步处理相关信息
* @Date 11:23 2022/11/28
* @param type=0 updateForecastLibaryByDispatchReduce type=1 updateForecastLibaryByDispatch type=2 pushForecastFundInfo createIncomeInfo(library);
**/
@Async
public
void
asynchronousDisPatchHandle
(
TSocialFundInfo
sf
,
int
forecastFlag
,
List
<
TForecastLibrary
>
libs
,
TForecastLibrary
library
,
int
type
)
{
synchronized
(
this
){
R
<
String
>
res
;
String
linkId
=
null
;
try
{
// 派单减少变更预估库-派减
if
(
type
==
CommonConstants
.
ZERO_INT
){
linkId
=
sf
.
getId
();
res
=
forecastLibraryService
.
updateForecastLibaryByDispatchReduce
(
sf
,
forecastFlag
);
if
(
Common
.
isEmpty
(
res
)
||
CommonConstants
.
SUCCESS
!=
res
.
getCode
()){
initSendError
(
library
.
getId
(),
res
.
getMsg
(),
"updateForecastLibaryByDispatchReduce:"
);
}
}
// 派单变更预估库
if
(
type
==
CommonConstants
.
ONE_INT
){
linkId
=
sf
.
getId
();
res
=
forecastLibraryService
.
updateForecastLibaryByDispatch
(
sf
);
if
(
Common
.
isEmpty
(
res
)
||
CommonConstants
.
SUCCESS
!=
res
.
getCode
()){
initSendError
(
sf
.
getId
(),
res
.
getMsg
(),
"updateForecastLibaryByDispatch:"
);
}
}
// 获取预估库数据并推送
if
(
type
==
CommonConstants
.
TWO_INT
){
if
(
Common
.
isNotNull
(
libs
)){
for
(
TForecastLibrary
lib:
libs
){
if
(
Common
.
isEmpty
(
linkId
)){
linkId
=
lib
.
getId
();
}
else
{
linkId
=
linkId
+
CommonConstants
.
COMMA_CHAR
+
lib
.
getId
();
}
}
}
forecastLibraryService
.
pushForecastFundInfo
(
libs
,
false
);
}
// 获取预估库数据并推送
if
(
type
==
CommonConstants
.
THREE_INT
){
linkId
=
library
.
getId
();
createIncomeInfo
(
library
);
}
}
catch
(
Exception
e
){
initSendError
(
linkId
,
e
.
getMessage
(),
"asynchronousDisPatchHandle:"
);
}
}
}
private
void
initSendError
(
String
linkId
,
String
msg
,
String
title
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
linkId
);
error
.
setTitle
(
title
+
msg
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
this
.
saveError
(
error
);
log
.
error
(
"推送社保预估费用到EKP错误"
,
msg
);
}
private
boolean
saveError
(
TSendEkpError
tSendEkpError
)
{
// 类型、创建日不可为空
if
(
Common
.
isEmpty
(
tSendEkpError
.
getType
())
||
Common
.
isEmpty
(
tSendEkpError
.
getCreateDay
()))
{
return
false
;
}
TSendEkpError
error
=
sendEkpErrorMapper
.
getByTitleTypeDay
(
tSendEkpError
);
if
(
error
==
null
)
{
return
sendEkpErrorMapper
.
insert
(
tSendEkpError
)
>
0
;
}
else
{
if
(
Common
.
isEmpty
(
tSendEkpError
.
getNums
()))
{
tSendEkpError
.
setNums
(
CommonConstants
.
ONE_INT
);
}
error
.
setNums
(
error
.
getNums
()
+
tSendEkpError
.
getNums
());
return
sendEkpErrorMapper
.
updateById
(
error
)
>=
0
;
}
}
public
void
createIncomeInfo
(
TForecastLibrary
library
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
=
null
;
R
<
TSettleDomainListVo
>
listVo
=
null
;
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
library
.
getSettleDomainId
());
if
(
Common
.
isNotNull
(
listVo
))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
}
}
}
//判断是否存在当月的公积金收入数据
boolean
isExist
=
false
;
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
incomeDetail
.
setPayMonth
(
library
.
getProvidentPayMonth
());
incomeDetail
.
setDeptNo
(
library
.
getDeptNo
());
incomeDetail
.
setSourceType
(
CommonConstants
.
TWO_STRING
);
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
)
>
0
)
{
isExist
=
true
;
}
}
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
.
contains
(
CommonConstants
.
TWO_STRING
)
&&
!
isExist
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
//预估模式
//预估模式只有按人次和人数收费
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
());
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
()
.
contains
(
CommonConstants
.
TWO_STRING
)
&&
!
isExist
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
//预估模式
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
());
}
}
}
public
void
createIncomeInsurance
(
TForecastLibrary
library
,
TSettleDomain
settleDomain
,
String
feeType
,
String
charges
,
String
feeMode
,
BigDecimal
money
)
{
//生成收入数据
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
detail
.
setDeptName
(
settleDomain
.
getDepartName
());
detail
.
setDeptNo
(
settleDomain
.
getDepartNo
());
detail
.
setDeptId
(
settleDomain
.
getId
());
detail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
detail
.
setEmpName
(
library
.
getEmpName
());
detail
.
setUnitNo
(
settleDomain
.
getCustomerNo
());
detail
.
setUnitId
(
settleDomain
.
getCustomerId
());
detail
.
setUnitName
(
settleDomain
.
getCustomerName
());
detail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
detail
.
setSourceId
(
library
.
getId
());
detail
.
setSourceType
(
CommonConstants
.
TWO_STRING
);
detail
.
setCreateMonth
(
library
.
getProvidentCreateMonth
());
detail
.
setPayMonth
(
library
.
getProvidentPayMonth
());
detail
.
setMoney
(
money
);
detail
.
setFeeType
(
feeType
);
detail
.
setFeeMode
(
feeMode
);
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detail
.
setId
(
CommonConstants
.
NULL
);
// 批量办理成功 收入不异步推送
incomeService
.
saveDetail
(
detail
,
false
);
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TIncomeDetailMapper.xml
View file @
02ad1b5e
...
...
@@ -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>
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
02ad1b5e
...
...
@@ -100,6 +100,7 @@
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"incomeStatus"
column=
"INCOME_STATUS"
/>
<result
property=
"isIncomeStatus"
column=
"IS_INCOME_STATUS"
/>
</resultMap>
<resultMap
id=
"tPaymentInfoSumMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo"
>
<result
property=
"empName"
column=
"EMP_NAME"
/>
...
...
@@ -1242,9 +1243,10 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.PUSH_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
a.PUSH_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
</select>
<!--tPaymentInfo公积金推送查询-->
...
...
@@ -1253,9 +1255,10 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.PUSH_STATUS = '1' AND a.FUND_ID IS NOT NULL
a.PUSH_STATUS = '1' AND a.FUND_ID IS NOT NULL
AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
</select>
<!--tPaymentInfo社保收入推送查询-->
...
...
@@ -1264,9 +1267,10 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
AND a.CREATE_BY = #{userId} AND a.IS_INCOME_STATUS = '0'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
</select>
<!--tPaymentInfo公积金收入推送查询-->
...
...
@@ -1275,9 +1279,10 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL
AND a.CREATE_BY = #{userId} AND a.IS_INCOME_STATUS = '0'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
</select>
<!-- 更改社保公积金推送状态 -->
...
...
@@ -1295,4 +1300,54 @@
where
ID = #{id}
</update>
<update
id=
"updateBySocialIncomeFlag"
>
update t_payment_info
set IS_INCOME_STATUS = '1'
where
ID = #{id}
</update>
<select
id=
"getTPaymentSocialPushCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_payment_info a
<where>
a.PUSH_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
<!--tPaymentInfo公积金推送查询-->
<select
id=
"getTPaymentFundPushCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_payment_info a
<where>
a.PUSH_STATUS = '1' AND a.FUND_ID IS NOT NULL AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
<!--tPaymentInfo社保收入推送查询-->
<select
id=
"getTPaymentSocialIncomeCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL AND a.CREATE_BY = #{userId} AND a.IS_INCOME_STATUS = '0'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
<!--tPaymentInfo公积金收入推送查询-->
<select
id=
"getTPaymentFundIncomeCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL AND a.CREATE_BY = #{userId} AND a.IS_INCOME_STATUS = '0'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</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