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
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 {
...
@@ -122,6 +122,20 @@ public class TEmployeeInfo extends BaseEntity {
@Max
(
value
=
200
,
message
=
"年龄不可超过200"
)
@Max
(
value
=
200
,
message
=
"年龄不可超过200"
)
private
Integer
empAge
;
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 {
...
@@ -71,6 +71,11 @@ public class EmployeeExportVO extends BaseEntity {
@DateTimeFormat
(
"yyyy-MM-dd"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
LocalDateTime
validityEnd
;
private
LocalDateTime
validityEnd
;
@ExcelProperty
(
value
=
"年龄"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelAttribute
(
name
=
"年龄"
)
private
Integer
empAge
;
@ExcelAttribute
(
name
=
"婚姻状况"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_MARRIED
)
@ExcelAttribute
(
name
=
"婚姻状况"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_MARRIED
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"婚姻状况"
)
@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
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
...
@@ -14,6 +15,9 @@ public class TSettleDomainListVo {
...
@@ -14,6 +15,9 @@ public class TSettleDomainListVo {
private
List
<
TSettleDomainSelectVo
>
listSelectVO
;
private
List
<
TSettleDomainSelectVo
>
listSelectVO
;
private
Map
<
String
,
TSettleDomainSelectVo
>
mapSlectVo
;
private
Map
<
String
,
TSettleDomainSelectVo
>
mapSlectVo
;
private
Map
<
String
,
TSettleDomain
>
mapVO
;
/**
/**
* 合同主体IDS
* 合同主体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;
...
@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.TDepartSettlementInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService
;
...
@@ -42,7 +41,6 @@ import org.springframework.web.bind.annotation.*;
...
@@ -42,7 +41,6 @@ import org.springframework.web.bind.annotation.*;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.net.URLDecoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -241,6 +239,21 @@ public class TSettleDomainController {
...
@@ -241,6 +239,21 @@ public class TSettleDomainController {
return
tSettleDomainService
.
getSetInfoByCodes
(
codes
);
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 项目主键
* @param id 项目主键
* @Description: 通过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> {
...
@@ -76,4 +76,6 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
* @return
* @return
**/
**/
List
<
ProjectSetInfoVo
>
getSetInfoByCodes
(
@Param
(
value
=
"codes"
)
List
<
String
>
codes
);
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;
...
@@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
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.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
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.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
...
@@ -81,6 +78,8 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
...
@@ -81,6 +78,8 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
SetInfoVo
getSetInfoByCodes
(
List
<
String
>
codes
);
SetInfoVo
getSetInfoByCodes
(
List
<
String
>
codes
);
TSettleDomainListVo
getSettleInfoByCodes
(
List
<
String
>
codes
);
/**
/**
* 通过id获取项目及单位部分信息
* 通过id获取项目及单位部分信息
* @param
* @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
...
@@ -328,6 +328,16 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return
setMap
;
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
* @Author fxj
* @Description 更新EKP对应MVP 项目权限,已有权限不做删除处理
* @Description 更新EKP对应MVP 项目权限,已有权限不做删除处理
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
02ad1b5e
...
@@ -82,6 +82,7 @@
...
@@ -82,6 +82,7 @@
<result
property=
"empNatrue"
column=
"EMP_NATRUE"
/>
<result
property=
"empNatrue"
column=
"EMP_NATRUE"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empAge"
column=
"EMP_AGE"
/>
<result
property=
"validityStart"
column=
"VALIDITY_START"
/>
<result
property=
"validityStart"
column=
"VALIDITY_START"
/>
<result
property=
"validityEnd"
column=
"VALIDITY_END"
/>
<result
property=
"validityEnd"
column=
"VALIDITY_END"
/>
<result
property=
"empMarriStatus"
column=
"EMP_MARRI_STATUS"
/>
<result
property=
"empMarriStatus"
column=
"EMP_MARRI_STATUS"
/>
...
@@ -329,8 +330,11 @@
...
@@ -329,8 +330,11 @@
<if
test=
"tEmployeeInfo.empBirthday != null"
>
<if
test=
"tEmployeeInfo.empBirthday != null"
>
AND a.EMP_BIRTHDAY = #{tEmployeeInfo.empBirthday}
AND a.EMP_BIRTHDAY = #{tEmployeeInfo.empBirthday}
</if>
</if>
<if
test=
"tEmployeeInfo.empAge != null"
>
<if
test=
"tEmployeeInfo.empAgeStart >0"
>
AND a.EMP_AGE = #{tEmployeeInfo.empAge}
AND a.EMP_AGE >= #{tEmployeeInfo.empAgeStart}
</if>
<if
test=
"tEmployeeInfo.empAgeEnd >0"
>
AND a.EMP_AGE
<![CDATA[ <= ]]>
#{tEmployeeInfo.empAgeEnd}
</if>
</if>
<if
test=
"tEmployeeInfo.empMarriStatus != null and tEmployeeInfo.empMarriStatus.trim() != ''"
>
<if
test=
"tEmployeeInfo.empMarriStatus != null and tEmployeeInfo.empMarriStatus.trim() != ''"
>
AND a.EMP_MARRI_STATUS = #{tEmployeeInfo.empMarriStatus}
AND a.EMP_MARRI_STATUS = #{tEmployeeInfo.empMarriStatus}
...
@@ -952,6 +956,7 @@
...
@@ -952,6 +956,7 @@
a.EMP_NATRUE,
a.EMP_NATRUE,
a.EMP_NAME,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_IDCARD,
a.EMP_AGE,
a.VALIDITY_START,
a.VALIDITY_START,
a.VALIDITY_END,
a.VALIDITY_END,
a.EMP_MARRI_STATUS,
a.EMP_MARRI_STATUS,
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
02ad1b5e
...
@@ -297,4 +297,18 @@
...
@@ -297,4 +297,18 @@
</if>
</if>
</select>
</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>
</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 {
...
@@ -41,17 +41,17 @@ public class AsyncConfig implements AsyncConfigurer {
* <!-- 允许的空闲时间,当线程空闲时间达到keepAliveTime时,线程会退出,直到线程数量=corePoolSize -->
* <!-- 允许的空闲时间,当线程空闲时间达到keepAliveTime时,线程会退出,直到线程数量=corePoolSize -->
* <!-- 如果allowCoreThreadTimeout=true,则会直到线程数量=0 -->
* <!-- 如果allowCoreThreadTimeout=true,则会直到线程数量=0 -->
*/
*/
taskExecutor
.
setKeepAliveSeconds
(
20
0
);
taskExecutor
.
setKeepAliveSeconds
(
6
0
);
/**
/**
* <!-- 线程池维护线程的最大数量 -->
* <!-- 线程池维护线程的最大数量 -->
* <!-- 当线程数>=corePoolSize,且任务队列已满时。线程池会创建新线程来处理任务 -->
* <!-- 当线程数>=corePoolSize,且任务队列已满时。线程池会创建新线程来处理任务 -->
* <!-- 当线程数=maxPoolSize,且任务队列已满时,线程池会拒绝处理任务而抛出异常,异常见下
* <!-- 当线程数=maxPoolSize,且任务队列已满时,线程池会拒绝处理任务而抛出异常,异常见下
*/
*/
taskExecutor
.
setMaxPoolSize
(
5
0
);
taskExecutor
.
setMaxPoolSize
(
10
0
);
/**
/**
* <!-- 缓存队列(阻塞队列)当核心线程数达到最大时,新任务会放在队列中排队等待执行 -->
* <!-- 缓存队列(阻塞队列)当核心线程数达到最大时,新任务会放在队列中排队等待执行 -->
*/
*/
taskExecutor
.
setQueueCapacity
(
1
00
);
taskExecutor
.
setQueueCapacity
(
6
00
);
/**
/**
* 建议配置threadNamePrefix属性,出问题时可以更方便的进行排查。
* 建议配置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 {
...
@@ -156,6 +156,10 @@ public interface CommonConstants {
* number 5000
* number 5000
*/
*/
int
FIVES_INT
=
5000
;
int
FIVES_INT
=
5000
;
/**
* number 5000
*/
int
TEN_THOUSAND_INT
=
10000
;
/**
/**
* number 1
* number 1
...
@@ -200,7 +204,7 @@ public interface CommonConstants {
...
@@ -200,7 +204,7 @@ public interface CommonConstants {
* @Author pwang
* @Author pwang
* @Date 2019-08-02 16:39
* @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
* @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 {
...
@@ -514,6 +514,10 @@ public interface ErrorCodes {
*/
*/
String
EMP_DISPATCH_SOCIAL_PAYMENT_TYPE_NOT_SAME
=
"emp.dispatch.social.payment.type.same"
;
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"
;
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 {
...
@@ -723,7 +723,7 @@ public class ExcelUtil <T> implements Serializable {
}
else
{
}
else
{
return
errorInfo
(
attr
,
"_必须为数字且最多两位小数"
,
i
);
return
errorInfo
(
attr
,
"_必须为数字且最多两位小数"
,
i
);
}
}
}
else
if
(
attr
.
min
()
==
0
)
{
}
/*
else if (attr.min() == 0) {
if (Common.isNumber(c)) {
if (Common.isNumber(c)) {
if (attr.isFloat()){
if (attr.isFloat()){
if (Float.valueOf(c).compareTo(attr.min()) < CommonConstants.ZERO_INT) {
if (Float.valueOf(c).compareTo(attr.min()) < CommonConstants.ZERO_INT) {
...
@@ -731,7 +731,7 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -731,7 +731,7 @@ public class ExcelUtil <T> implements Serializable {
}
}
}
}
}
}
}
}
*/
}
}
return
null
;
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
...
@@ -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
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 {
...
@@ -59,7 +59,20 @@ public class ArchivesDaprUtil {
}
}
return
res
;
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
* @Author fxj
* @Description 获取派单校验需要的档案信息
* @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> {
...
@@ -83,7 +83,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @param details
* @param details
* @return void
* @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> {
...
@@ -92,7 +92,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @param details
* @param details
* @return void
* @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> {
...
@@ -246,4 +246,13 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
List
<
TInsuranceDetail
>
selectByIdCardList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
List
<
TInsuranceDetail
>
selectByIdCardList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
,
@Param
(
"idList"
)
List
<
String
>
idList
);
,
@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;
...
@@ -4,6 +4,9 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* @author licancan
* @author licancan
...
@@ -13,4 +16,5 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -13,4 +16,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
@Mapper
public
interface
TInsuranceOperateMapper
extends
BaseMapper
<
TInsuranceOperate
>
{
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;
...
@@ -4,6 +4,8 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
java.util.List
;
/**
/**
* @author licancan
* @author licancan
* @description 针对表【t_insurance_operate(商险操作表)】的数据库操作Service
* @description 针对表【t_insurance_operate(商险操作表)】的数据库操作Service
...
@@ -11,4 +13,5 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
...
@@ -11,4 +13,5 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
*/
*/
public
interface
TInsuranceOperateService
extends
IService
<
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
...
@@ -28,10 +28,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
...
@@ -28,10 +28,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo
;
...
@@ -43,7 +41,6 @@ import org.apache.commons.collections.MapUtils;
...
@@ -43,7 +41,6 @@ import org.apache.commons.collections.MapUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.security.web.jaasapi.JaasApiIntegrationFilter
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -113,6 +110,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -113,6 +110,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private
MenuUtil
menuUtil
;
private
MenuUtil
menuUtil
;
@Resource
@Resource
private
DaprArchivesProperties
daprArchivesProperties
;
private
DaprArchivesProperties
daprArchivesProperties
;
@Resource
@Lazy
private
DoJointInsuranceTask
doJointInsuranceTask
;
/***********************商险办理********************************/
/***********************商险办理********************************/
/**
/**
...
@@ -1355,6 +1355,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1355,6 +1355,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
this
.
rollBackInsurance
(
user
,
list
);
this
.
rollBackInsurance
(
user
,
list
);
}
}
}
}
if
(
operateList
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
operateList
=
null
;
}
return
R
.
ok
(
operateList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
return
R
.
ok
(
operateList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
}
}
...
@@ -1457,7 +1460,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1457,7 +1460,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setDefaultSettleId
(
settle
.
getId
());
detail
.
setDefaultSettleId
(
settle
.
getId
());
successList
.
add
(
detail
);
successList
.
add
(
detail
);
//生成收入数据
//生成收入数据
createInsuranceInfo
(
detail
);
createInsuranceInfo
(
detail
,
null
);
}
else
{
}
else
{
//按天
//按天
//计算起止时间的天数
//计算起止时间的天数
...
@@ -1492,7 +1495,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1492,7 +1495,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setDefaultSettleId
(
settle
.
getId
());
detail
.
setDefaultSettleId
(
settle
.
getId
());
successList
.
add
(
detail
);
successList
.
add
(
detail
);
//生成收入数据
//生成收入数据
createInsuranceInfo
(
detail
);
createInsuranceInfo
(
detail
,
null
);
}
}
}
}
//实缴
//实缴
...
@@ -1569,7 +1572,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1569,7 +1572,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return: void
* @return: void
**/
**/
private
void
doFailInfo
(
List
<
TInsuranceDetail
>
sourceList
,
List
<
String
>
sourceIdCardList
,
List
<
String
>
replaceIdList
,
String
toStatus
)
{
private
void
doFailInfo
(
List
<
TInsuranceDetail
>
sourceList
,
List
<
String
>
sourceIdCardList
,
List
<
String
>
replaceIdList
,
String
toStatus
)
{
List
<
TInsuranceDetail
>
sourceEmpList
=
baseMapper
.
selectByIdCardList
(
sourceIdCardList
,
replaceIdList
);
List
<
TInsuranceDetail
>
sourceEmpList
=
null
;
if
(
sourceIdCardList
!=
null
&&
!
sourceIdCardList
.
isEmpty
())
{
sourceEmpList
=
baseMapper
.
selectByIdCardList
(
sourceIdCardList
,
replaceIdList
);
}
if
(
sourceEmpList
!=
null
&&
!
sourceEmpList
.
isEmpty
())
{
if
(
sourceEmpList
!=
null
&&
!
sourceEmpList
.
isEmpty
())
{
// 项目档案状态
// 项目档案状态
Map
<
String
,
Integer
>
proStatusMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
proStatusMap
=
new
HashMap
<>();
...
@@ -1592,9 +1598,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1592,9 +1598,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
proStatus
!=
null
)
{
if
(
proStatus
!=
null
)
{
if
(
proStatus
!=
CommonConstants
.
TWO_INT
&&
(
status
==
CommonConstants
.
TWO_INT
if
(
proStatus
!=
CommonConstants
.
TWO_INT
&&
(
status
==
CommonConstants
.
TWO_INT
||
status
==
CommonConstants
.
FOUR_INT
||
status
==
CommonConstants
.
FOUR_INT
||
(
status
==
CommonConstants
.
THREE_INT
&&
proStatus
!=
CommonConstants
.
FOUR_INT
)))
{
||
(
status
==
CommonConstants
.
THREE_INT
&&
proStatus
!=
CommonConstants
.
FOUR_INT
)))
{
proStatus
=
status
;
proStatus
=
status
;
}
}
}
else
{
}
else
{
proStatus
=
status
;
proStatus
=
status
;
...
@@ -1708,7 +1714,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1708,7 +1714,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
*/
@Override
@Override
public
R
<
List
<
InsuranceRegisterParam
>>
registeredPolicyPremium
(
List
<
InsuranceRegisterParam
>
paramList
)
{
public
R
<
List
<
InsuranceRegisterParam
>>
registeredPolicyPremium
(
List
<
InsuranceRegisterParam
>
paramList
)
{
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
50
,
50
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
if
(
CollectionUtils
.
isEmpty
(
paramList
)){
if
(
CollectionUtils
.
isEmpty
(
paramList
)){
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
}
...
@@ -1719,17 +1724,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1719,17 +1724,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
}
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
registeredPolicyPremiumCheck
(
paramList
,
user
);
List
<
InsuranceRegisterParam
>
operatList
=
registeredPolicyPremiumCheck
(
paramList
);
//返回给前端的结果
List
<
InsuranceRegisterParam
>
listResult
=
map
.
get
(
"listResult"
);
//保存到数据库中的结果
//保存到数据库中的结果
List
<
InsuranceRegisterParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
List
<
InsuranceRegisterParam
>
listSuccess
=
operatList
.
stream
().
filter
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)).
collect
(
Collectors
.
toList
()
);
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TSettleDomainSelectVo
>
settleDomainR
;
R
<
TSettleDomainListVo
>
listVo
;
BigDecimal
actualMoney
;
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
//登记保单保费
//登记保单保费
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
detail
=
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
success
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
success
.
getInsuranceCompanyName
())
...
@@ -1741,7 +1748,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1741,7 +1748,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
BigDecimal
actualMoney
;
actualMoney
=
detail
.
getActualPremium
();
actualMoney
=
detail
.
getActualPremium
();
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
...
@@ -1750,9 +1756,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1750,9 +1756,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceReplace:
:
getOriginInsuranceDetailId
,
detail
.
getId
()));
.
eq
(
TInsuranceReplace:
:
getOriginInsuranceDetailId
,
detail
.
getId
()));
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
List
<
String
>
collect
=
list
.
stream
().
map
(
TInsuranceReplace:
:
getToInsuranceDetailId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
list
.
stream
().
map
(
TInsuranceReplace:
:
getToInsuranceDetailId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
TInsuranceDetail
>
details
=
this
.
baseMapper
.
selectBatch
Ids
(
collect
);
List
<
InsuranceUpdateVO
>
details
=
baseMapper
.
selectBy
Ids
(
collect
);
if
(
CollectionUtils
.
isNotEmpty
(
details
)){
if
(
CollectionUtils
.
isNotEmpty
(
details
)){
details
.
stream
().
forEach
(
e
->
e
.
setInvoiceNo
(
success
.
getInvoiceNo
()));
details
.
forEach
(
e
->
e
.
setInvoiceNo
(
success
.
getInvoiceNo
()));
//这里自己写sql更新发票号,防止用mybatisPlus批量更新,把updateTime更新了(updateTime不能更新)
//这里自己写sql更新发票号,防止用mybatisPlus批量更新,把updateTime更新了(updateTime不能更新)
baseMapper
.
updateInvoiceNoBatch
(
details
);
baseMapper
.
updateInvoiceNoBatch
(
details
);
}
}
...
@@ -1763,17 +1769,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1763,17 +1769,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//如果当前为合并结算,判断预估是否已发送
//如果当前为合并结算,判断预估是否已发送
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())
&&
detail
.
getSettleType
()
==
CommonConstants
.
ZERO_INT
){
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())
&&
detail
.
getSettleType
()
==
CommonConstants
.
ZERO_INT
){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
Integer
isEstimatePush
=
settle
.
getIsEstimatePush
();
//如果未推送则推送预估新增
//如果未推送则推送预估新增
if
(
isEstimatePush
==
CommonConstants
.
ZERO_INT
){
if
(
CommonConstants
.
ZERO_INT
==
settle
.
getIsEstimatePush
()){
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
ONE_INT
);
doJointInsuranceTask
.
asynchronousEkpInfo
(
detail
,
settle
,
CommonConstants
.
ONE_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
settle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
}
}
}
}
}
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyNo
())){
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyNo
())){
detail
.
setPolicyNo
(
success
.
getPolicyNo
());
detail
.
setPolicyNo
(
success
.
getPolicyNo
());
...
@@ -1782,9 +1781,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1782,9 +1781,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceReplace:
:
getOriginInsuranceDetailId
,
detail
.
getId
()));
.
eq
(
TInsuranceReplace:
:
getOriginInsuranceDetailId
,
detail
.
getId
()));
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
List
<
String
>
collect
=
list
.
stream
().
map
(
TInsuranceReplace:
:
getToInsuranceDetailId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
list
.
stream
().
map
(
TInsuranceReplace:
:
getToInsuranceDetailId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
TInsuranceDetail
>
details
=
this
.
baseMapper
.
selectBatch
Ids
(
collect
);
List
<
InsuranceUpdateVO
>
details
=
baseMapper
.
selectBy
Ids
(
collect
);
if
(
CollectionUtils
.
isNotEmpty
(
details
)){
if
(
CollectionUtils
.
isNotEmpty
(
details
)){
details
.
stream
().
forEach
(
e
->
e
.
setPolicyNo
(
success
.
getPolicyNo
()));
details
.
forEach
(
e
->
e
.
setPolicyNo
(
success
.
getPolicyNo
()));
//这里自己写sql更新保单号,防止用mybatisPlus批量更新,把updateTime更新了(updateTime不能更新)
//这里自己写sql更新保单号,防止用mybatisPlus批量更新,把updateTime更新了(updateTime不能更新)
baseMapper
.
updatePolicyNoBatch
(
details
);
baseMapper
.
updatePolicyNoBatch
(
details
);
}
}
...
@@ -1792,119 +1791,68 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1792,119 +1791,68 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//如果保费不为空
//如果保费不为空
if
(
StringUtils
.
isNotBlank
(
success
.
getActualPremium
())){
if
(
StringUtils
.
isNotBlank
(
success
.
getActualPremium
())){
BigDecimal
bigDecimalAct
=
new
BigDecimal
(
success
.
getActualPremium
());
Integer
settleType
=
detail
.
getSettleType
();
Integer
settleType
=
detail
.
getSettleType
();
String
defaultSettleId
=
detail
.
getDefaultSettleId
();
String
defaultSettleId
=
detail
.
getDefaultSettleId
();
//如果当前保单为合并结算
//如果当前保单为合并结算
if
(
settleType
==
CommonConstants
.
ZERO_INT
){
if
(
settleType
==
CommonConstants
.
ZERO_INT
&&
StringUtils
.
isNotBlank
(
defaultSettleId
))
{
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
())
{
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
Integer
isActualPush
=
settle
.
getIsActualPush
();
Integer
isActualPush
=
settle
.
getIsActualPush
();
//如果当前实缴信息未推送,则新增实缴单推送
//如果当前实缴信息未推送,则新增实缴单推送
if
(
CommonConstants
.
ZERO_INT
==
isActualPush
)
{
if
(
CommonConstants
.
ZERO_INT
==
isActualPush
){
//保费存储
//保费存储
settle
.
setActualPremium
(
bigDecimalAct
);
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
tInsuranceSettleService
.
updateById
(
settle
);
//调EKP新增实际保费
//调EKP新增实际保费
detail
.
setActualPremium
(
bigDecimalAct
);
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
doJointInsuranceTask
.
asynchronousEkpInfo
(
detail
,
settle
,
CommonConstants
.
TWO_INT
);
threadPool
.
execute
(()
->{
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
TWO_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
//如果当前实缴信息已推送,且金额与本次不一致,则推送实缴更新
//如果当前实缴信息已推送,且金额与本次不一致,则推送实缴更新
BigDecimal
bigDecimal
=
new
BigDecimal
(
success
.
getActualPremium
());
}
else
if
(
detail
.
getActualPremium
().
compareTo
(
bigDecimalAct
)
!=
0
)
{
boolean
c
=
!
Common
.
isNotNull
(
detail
.
getActualPremium
())
||
//推送保费更新
bigDecimal
.
compareTo
(
detail
.
getActualPremium
())
!=
0
;
settle
.
setActualPremium
(
bigDecimalAct
);
if
(
CommonConstants
.
ONE_INT
==
isActualPush
&&
c
){
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
//推送保费更新
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
settle
.
setActualPremium
(
bigDecimal
);
tInsuranceSettleService
.
updateById
(
settle
);
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
//调EKP更新实际保费
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
detail
.
setActualPremium
(
bigDecimalAct
);
tInsuranceSettleService
.
updateById
(
settle
);
doJointInsuranceTask
.
asynchronousEkpInfo
(
detail
,
settle
,
CommonConstants
.
FOUR_INT
);
//调EKP更新实际保费
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
threadPool
.
execute
(()
->{
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
else
{
//推送保费更新
settle
.
setActualPremium
(
bigDecimal
);
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
//调EKP更新实际保费
detail
.
setActualPremium
(
bigDecimal
);
threadPool
.
execute
(()
->{
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}});
}
}
}
}
}
}
//如果当前保单为单独结算
//如果当前保单为单独结算
}
else
if
(
settleType
==
CommonConstants
.
ONE_INT
){
if
(
settleType
==
CommonConstants
.
ONE_INT
){
//推送过实缴信息且金额与本次不一致,则推送更新
//推送过实缴信息且金额与本次不一致,则推送更新
boolean
c
=
!
Common
.
isNotNull
(
detail
.
getActualPremium
())
||
boolean
c
=
!
Common
.
isNotNull
(
detail
.
getActualPremium
())
||
new
BigDecimal
(
success
.
getActualPremium
())
.
compareTo
(
detail
.
getActualPremium
())
!=
0
;
bigDecimalAct
.
compareTo
(
detail
.
getActualPremium
())
!=
0
;
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)
&&
c
){
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)
&&
c
){
//推送保费更新
//推送保费更新
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
())
);
settle
.
setActualPremium
(
bigDecimalAct
);
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
tInsuranceSettleService
.
updateById
(
settle
);
//调EKP更新实际保费
//调EKP更新实际保费
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
detail
.
setActualPremium
(
bigDecimalAct
);
threadPool
.
execute
(()
->{
doJointInsuranceTask
.
asynchronousEkpInfo
(
detail
,
settle
,
CommonConstants
.
FOUR_INT
);
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
//未推送过实缴信息,则推送新增
if
(
StringUtils
.
isNotBlank
(
s
)){
}
else
if
(
StringUtils
.
isBlank
(
defaultSettleId
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
//未推送过实缴信息,则推送新增
if
(
StringUtils
.
isBlank
(
defaultSettleId
)){
//保费存储
//保费存储
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
settle
.
setInsDetailId
(
detail
.
getId
());
settle
.
setInsDetailId
(
detail
.
getId
());
settle
.
setSettleType
(
detail
.
getSettleType
());
settle
.
setSettleType
(
detail
.
getSettleType
());
settle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
settle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
())
);
settle
.
setActualPremium
(
bigDecimalAct
);
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
//调完ekp接口才会是1
//调完ekp接口才会是1
settle
.
setCreateTime
(
LocalDateTime
.
now
());
settle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
settle
);
tInsuranceSettleService
.
save
(
settle
);
detail
.
setDefaultSettleId
(
settle
.
getId
());
detail
.
setDefaultSettleId
(
settle
.
getId
());
//调EKP新增实际保费
//调EKP新增实际保费
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
detail
.
setActualPremium
(
bigDecimalAct
);
threadPool
.
execute
(()
->{
doJointInsuranceTask
.
asynchronousEkpInfo
(
detail
,
settle
,
CommonConstants
.
TWO_INT
);
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
TWO_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
}
}
}
}
}
...
@@ -1914,125 +1862,112 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1914,125 +1862,112 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
boolean
booleanPolicyNo
=
StringUtils
.
isNotBlank
(
policyNo
)
&&
!
policyNo
.
equals
(
detail
.
getPolicyNo
());
boolean
booleanPolicyNo
=
StringUtils
.
isNotBlank
(
policyNo
)
&&
!
policyNo
.
equals
(
detail
.
getPolicyNo
());
boolean
isEquals
=
Common
.
isNotNull
(
detail
.
getActualPremium
())
&&
Common
.
isNotNull
(
success
.
getActualPremium
())
&&
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
==
0
;
boolean
isEquals
=
Common
.
isNotNull
(
detail
.
getActualPremium
())
&&
Common
.
isNotNull
(
success
.
getActualPremium
())
&&
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
==
0
;
//如果当前保费为空,且保单号或发票号不一样
//如果当前保费为空,且保单号或发票号不一样
if
((
StringUtils
.
isBlank
(
success
.
getActualPremium
())
||
isEquals
)
&&
(
booleanInvoiceNo
||
booleanPolicyNo
)){
if
((
StringUtils
.
isBlank
(
success
.
getActualPremium
())
||
isEquals
)
&&
(
booleanInvoiceNo
||
booleanPolicyNo
)
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
&&
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
()))
{
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
if
(
Optional
.
ofNullable
(
settle
).
isPresent
())
{
//如果当前实缴信息未推送,则新增实缴单推送
//如果当前实缴信息未推送,则新增实缴单推送
threadPool
.
execute
(()
->{
if
(
StringUtils
.
isNotBlank
(
invoiceNo
))
{
if
(
StringUtils
.
isNotBlank
(
invoiceNo
)){
detail
.
setInvoiceNo
(
invoiceNo
);
detail
.
setInvoiceNo
(
invoiceNo
);
}
}
if
(
StringUtils
.
isNotBlank
(
policyNo
))
{
if
(
StringUtils
.
isNotBlank
(
policyNo
)){
detail
.
setPolicyNo
(
policyNo
);
detail
.
setPolicyNo
(
policyNo
);
}
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
}
doJointInsuranceTask
.
asynchronousEkpInfo
(
detail
,
settle
,
CommonConstants
.
FOUR_INT
);
}
}
}
}
//可以改成批量更新
//可以改成批量更新
this
.
updateById
(
detail
);
this
.
updateById
(
detail
);
detailList
.
add
(
detail
);
detailList
.
add
(
detail
);
try
{
try
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoByNo
(
detail
.
getDeptNo
());
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
);
}
}
}
if
(
detail
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
&&
if
(
detail
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
&&
CommonConstants
.
ONE_INT
==
detail
.
getSettleType
()
&&
CommonConstants
.
ONE_INT
==
detail
.
getSettleType
()
&&
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
actualMoney
)
!=
0
)
{
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
actualMoney
)
!=
0
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
=
null
;
R
<
TSettleDomainListVo
>
listVo
=
null
;
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoByNo
(
detail
.
getDeptNo
());
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
);
}
}
}
BigDecimal
gMoney
=
BigDecimal
.
ZERO
;
BigDecimal
gMoney
=
BigDecimal
.
ZERO
;
boolean
isBl
=
false
;
boolean
isBl
=
false
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
if
(
Common
.
isNotNull
(
settleDomain
)
&&
settleDomain
.
getMrSettleType
().
equals
(
CommonConstants
.
TWO_STRING
)
)
{
// 含有商险,则计算收入
// 含有商险,则计算收入
if
(
settleDomain
.
getMrSettleType
().
equals
(
CommonConstants
.
TWO_STRING
))
{
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
.
contains
(
CommonConstants
.
THREE_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
.
contains
(
CommonConstants
.
THREE_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
BigDecimalUtils
.
safeMultiply
(
actualMoney
,
gMoney
=
BigDecimalUtils
.
safeMultiply
(
actualMoney
,
settleDomain
.
getManagementFee
().
divide
(
new
BigDecimal
(
"100"
),
settleDomain
.
getManagementFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
));
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
));
isBl
=
true
;
isBl
=
true
;
}
//判断是否存在当月的商险收入数据
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setSourceId
(
detail
.
getId
());
if
(
isBl
)
{
incomeDetail
.
setMoney
(
gMoney
);
}
else
{
incomeDetail
.
setMoney
(
actualMoney
);
}
incomeDetail
.
setFeeType
(
CommonConstants
.
ONE_STRING
);
//判断是否存在当月的商险收入数据
R
<
TIncomeDetailReturnVo
>
detailInfoList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailInfoList
)
&&
detailInfoList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
!
detailInfoList
.
getData
().
getDetailList
().
isEmpty
())
{
//生成红冲数据
for
(
TIncomeDetail
detailInfo
:
detailInfoList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detailInfo
,
detail1
);
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detailInfo
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
break
;
}
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
()
//判断是否存在当月的商险收入数据
.
contains
(
CommonConstants
.
THREE_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
incomeDetail
.
setSourceId
(
detail
.
getId
());
gMoney
=
BigDecimalUtils
.
safeMultiply
(
actualMoney
,
if
(
isBl
)
{
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
incomeDetail
.
setMoney
(
gMoney
);
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
));
}
else
{
isBl
=
true
;
incomeDetail
.
setMoney
(
actualMoney
);
}
}
//判断是否存在当月的商险收入数据
incomeDetail
.
setFeeType
(
CommonConstants
.
ONE_STRING
);
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
//判断是否存在当月的商险收入数据
incomeDetail
.
setSourceId
(
detail
.
getId
());
R
<
TIncomeDetailReturnVo
>
detailInfoList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
incomeDetail
.
setFeeType
(
CommonConstants
.
TWO_STRING
);
if
(
Common
.
isNotNull
(
detailInfoList
)
&&
detailInfoList
.
getCode
()
==
CommonConstants
.
SUCCESS
if
(
isBl
)
{
&&
!
detailInfoList
.
getData
().
getDetailList
().
isEmpty
())
{
incomeDetail
.
setMoney
(
gMoney
);
//生成红冲数据
}
else
{
for
(
TIncomeDetail
detailInfo
:
detailInfoList
.
getData
().
getDetailList
())
{
incomeDetail
.
setMoney
(
actualMoney
);
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detailInfo
,
detail1
);
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detailInfo
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
break
;
}
}
//判断是否存在当月的商险收入数据
}
R
<
TIncomeDetailReturnVo
>
detailInfoList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
}
if
(
Common
.
isNotNull
(
detailInfoList
)
&&
detailInfoList
.
getCode
()
==
CommonConstants
.
SUCCESS
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
()
&&
!
detailInfoList
.
getData
().
getDetailList
().
isEmpty
())
{
.
contains
(
CommonConstants
.
THREE_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
//生成红冲数据
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
for
(
TIncomeDetail
detailInfo
:
detailInfoList
.
getData
().
getDetailList
())
{
gMoney
=
BigDecimalUtils
.
safeMultiply
(
actualMoney
,
TIncomeDetail
detail1
=
new
TIncomeDetail
();
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
BeanCopyUtils
.
copyProperties
(
detailInfo
,
detail1
);
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
));
detail1
.
setId
(
CommonConstants
.
NULL
);
isBl
=
true
;
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
}
detail1
.
setMoney
(
detailInfo
.
getMoney
().
negate
());
//判断是否存在当月的商险收入数据
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
break
;
incomeDetail
.
setSourceId
(
detail
.
getId
());
}
incomeDetail
.
setFeeType
(
CommonConstants
.
TWO_STRING
);
if
(
isBl
)
{
incomeDetail
.
setMoney
(
gMoney
);
}
else
{
incomeDetail
.
setMoney
(
actualMoney
);
}
//判断是否存在当月的商险收入数据
R
<
TIncomeDetailReturnVo
>
detailInfoList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailInfoList
)
&&
detailInfoList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
!
detailInfoList
.
getData
().
getDetailList
().
isEmpty
())
{
//生成红冲数据
for
(
TIncomeDetail
detailInfo
:
detailInfoList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detailInfo
,
detail1
);
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detailInfo
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
break
;
}
}
}
}
}
}
}
}
//生成收入数据
//生成收入数据
createInsuranceInfo
(
detail
);
createInsuranceInfo
(
detail
,
settleDomain
);
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
"收入数据同步处理失败:"
+
e
);
log
.
error
(
"收入数据同步处理失败:"
+
e
);
...
@@ -2041,7 +1976,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2041,7 +1976,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//操作记录
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REGISTERED
,
null
,
CommonConstants
.
ONE_INT
);
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REGISTERED
,
null
,
CommonConstants
.
ONE_INT
);
return
R
.
ok
(
listResult
,
InsurancesConstants
.
OPERATE_SUCCESS
);
if
(
operatList
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
operatList
=
null
;
}
return
R
.
ok
(
operatList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
}
/**
/**
...
@@ -3099,75 +3037,60 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3099,75 +3037,60 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param paramList
* @param paramList
* @return {@link Map<String, List<InsuranceRegisterParam>>}
* @return {@link Map<String, List<InsuranceRegisterParam>>}
*/
*/
private
Map
<
String
,
List
<
InsuranceRegisterParam
>>
registeredPolicyPremiumCheck
(
List
<
InsuranceRegisterParam
>
paramList
,
YifuUser
user
){
private
List
<
InsuranceRegisterParam
>
registeredPolicyPremiumCheck
(
List
<
InsuranceRegisterParam
>
paramList
){
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceRegisterParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceRegisterParam
>
listSuccess
=
new
ArrayList
<>();
for
(
InsuranceRegisterParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()))
{
for
(
InsuranceRegisterParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()))
{
// 必填校验
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
())){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
())){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_MORE_THAN_50
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_MORE_THAN_50
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getActualPremium
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getActualPremium
())){
if
(!
ValidityUtil
.
validateMoney
(
param
.
getActualPremium
())){
if
(!
ValidityUtil
.
validateMoney
(
param
.
getActualPremium
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getInvoiceNo
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getInvoiceNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getInvoiceNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getInvoiceNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INVOICE_NO_MORE_THAN_50
);
param
.
setErrorMessage
(
InsurancesConstants
.
INVOICE_NO_MORE_THAN_50
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3186,7 +3109,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3186,7 +3109,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
);
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
DATA_IS_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
DATA_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
continue
;
}
else
{
}
else
{
LambdaQueryWrapper
<
TInsuranceEkp
>
ekpLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TInsuranceEkp
>
ekpLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
...
@@ -3194,19 +3116,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3194,19 +3116,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceEkp
>
ekpList
=
tInsuranceEkpService
.
list
(
ekpLambdaQueryWrapper
);
List
<
TInsuranceEkp
>
ekpList
=
tInsuranceEkpService
.
list
(
ekpLambdaQueryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
ekpList
)){
if
(
CollectionUtils
.
isNotEmpty
(
ekpList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EKP_SEND_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
EKP_SEND_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
// 如果保费不存在,保单号、保费必填
// 如果保费不存在,保单号、保费必填
if
(
detail
.
getActualPremium
()
==
null
){
if
(
detail
.
getActualPremium
()
==
null
){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyNo
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getActualPremium
())){
if
(
StringUtils
.
isBlank
(
param
.
getActualPremium
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3222,13 +3141,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3222,13 +3141,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
);
);
if
(!
Optional
.
ofNullable
(
batchPolicyNo
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
batchPolicyNo
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
continue
;
}
else
{
}
else
{
//批增类型,保单号已存在但是和派单时填写的不一致
//批增类型,保单号已存在但是和派单时填写的不一致
if
(!
detail
.
getPolicyNo
().
equals
(
param
.
getPolicyNo
())){
if
(!
detail
.
getPolicyNo
().
equals
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3247,12 +3164,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3247,12 +3164,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Optional
.
ofNullable
(
addPolicyNo
).
isPresent
()){
if
(
Optional
.
ofNullable
(
addPolicyNo
).
isPresent
()){
if
(!
addPolicyNo
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())){
if
(!
addPolicyNo
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
addPolicyNo
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())){
if
(!
addPolicyNo
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3261,22 +3176,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3261,22 +3176,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
detail
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
if
(
detail
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_TYPE_FOUR_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_TYPE_FOUR_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
ONE_INT
){
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_ONE_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_ONE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
TWO_INT
){
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
TWO_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_TWO_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
){
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_FOUR_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_FOUR_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
//保单号是否更新
//保单号是否更新
...
@@ -3300,12 +3211,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3300,12 +3211,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3313,12 +3222,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3313,12 +3222,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(!
booleanPolicyNo
||
!
booleanInvoiceNo
){
if
(!
booleanPolicyNo
||
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3337,25 +3244,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3337,25 +3244,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
}
}
}
}
}
}
}
}
listSuccess
.
add
(
param
);
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
}
}
map
.
put
(
"listResult"
,
listResult
);
return
paramList
;
map
.
put
(
"listSuccess"
,
listSuccess
);
return
map
;
}
}
/**
/**
...
@@ -3384,6 +3286,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3384,6 +3286,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
detail
:
detailList
)
{
for
(
TInsuranceDetail
detail
:
detailList
)
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
.
setId
(
String
.
valueOf
(
UUID
.
randomUUID
()).
replaceAll
(
"-"
,
""
));
operate
.
setRemark
(
remark
);
operate
.
setRemark
(
remark
);
operate
.
setDisplayFlag
(
displayFlag
);
operate
.
setDisplayFlag
(
displayFlag
);
operate
.
setInsuranceDetailId
(
detail
.
getId
());
operate
.
setInsuranceDetailId
(
detail
.
getId
());
...
@@ -3393,7 +3296,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3393,7 +3296,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operateList
.
add
(
operate
);
operateList
.
add
(
operate
);
}
}
tInsuranceOperateService
.
save
Batch
(
operateList
);
tInsuranceOperateService
.
save
OperateInfo
(
operateList
);
}
}
}
}
...
@@ -3801,6 +3704,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3801,6 +3704,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setMId
(
mId
);
param
.
setMId
(
mId
);
}
}
param
.
setCreateBy
(
user
.
getId
());
param
.
setCreateBy
(
user
.
getId
());
//设置updateBy字段是给导出使用的
param
.
setUpdateBy
(
user
.
getId
());
menuUtil
.
setAuthSql
(
user
,
param
);
menuUtil
.
setAuthSql
(
user
,
param
);
if
(
Common
.
isNotNull
(
param
.
getAuthSql
())
&&
param
.
getAuthSql
().
contains
(
"1=2 CONCAT"
))
{
if
(
Common
.
isNotNull
(
param
.
getAuthSql
())
&&
param
.
getAuthSql
().
contains
(
"1=2 CONCAT"
))
{
param
.
setAuthSql
(
param
.
getAuthSql
().
replace
(
"1=2 CONCAT"
,
"CONCAT"
));
param
.
setAuthSql
(
param
.
getAuthSql
().
replace
(
"1=2 CONCAT"
,
"CONCAT"
));
...
@@ -3808,7 +3713,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3808,7 +3713,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
RefundExportListVo
>
refundExportList
;
List
<
RefundExportListVo
>
refundExportList
;
//如果是待减员状态,sql中UPDATE_BY过滤条件不需要,这里强制变为null
//如果是待减员状态,sql中UPDATE_BY过滤条件不需要,这里强制变为null
if
(
param
.
getReduceHandleStatus
()
==
CommonConstants
.
ONE_INT
){
if
(
param
.
getReduceHandleStatus
()
==
CommonConstants
.
ONE_INT
){
param
.
set
Cre
ateBy
(
null
);
param
.
set
Upd
ateBy
(
null
);
}
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
...
@@ -4043,6 +3948,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4043,6 +3948,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceOperateService
.
saveBatch
(
operateList
);
tInsuranceOperateService
.
saveBatch
(
operateList
);
// 减员失效
// 减员失效
this
.
doFailInfo
(
sourceList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
THREE_STRING
);
this
.
doFailInfo
(
sourceList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
THREE_STRING
);
if
(
list
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
list
=
null
;
}
return
R
.
ok
(
list
,
InsurancesConstants
.
IMPORT_SUCCESS
);
return
R
.
ok
(
list
,
InsurancesConstants
.
IMPORT_SUCCESS
);
}
}
...
@@ -4203,7 +4111,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4203,7 +4111,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
}
}
//新项目下生成收入数据
//新项目下生成收入数据
createInsuranceInfo
(
income
);
createInsuranceInfo
(
income
,
null
);
}
}
}
}
}
}
...
@@ -5730,7 +5638,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5730,7 +5638,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String
policyStart
=
param
.
getPolicyStart
();
String
policyStart
=
param
.
getPolicyStart
();
if
(
StringUtils
.
isBlank
(
policyStart
)){
if
(
StringUtils
.
isBlank
(
policyStart
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//保单结束日期
//保单结束日期
...
@@ -5756,7 +5663,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5756,7 +5663,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 保单开始日期格式校验
// 保单开始日期格式校验
if
(!
LocalDateUtil
.
isDate
(
policyStart
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
policyStart
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
// 保单结束日期格式校验
// 保单结束日期格式校验
...
@@ -6351,18 +6257,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -6351,18 +6257,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//商险预估
//商险预估
public
void
createInsuranceInfo
(
TInsuranceDetail
insuranceDetail
)
{
public
void
createInsuranceInfo
(
TInsuranceDetail
insuranceDetail
,
TSettleDomain
settleDomain
)
{
//获取项目信息
if
(
Common
.
isEmpty
(
settleDomain
))
{
TSettleDomain
settleDomain
=
new
TSettleDomain
();
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
;
//获取项目信息
R
<
TSettleDomainListVo
>
listVo
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoByNo
(
insuranceDetail
.
getDeptNo
());
R
<
TSettleDomainListVo
>
listVo
;
if
(
Common
.
isNotNull
(
listVo
))
{
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoByNo
(
insuranceDetail
.
getDeptNo
());
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
listVo
))
{
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
}
}
}
}
}
}
}
...
@@ -6400,110 +6308,104 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -6400,110 +6308,104 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isNotNull
(
settleDomain
))
{
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有商险,则计算收入
// 含有商险,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
.
contains
(
CommonConstants
.
THREE_STRING
))
{
.
contains
(
CommonConstants
.
THREE_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
())
)
{
//预估模式
//预估模式
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
//预估模式只有按人次和人数收费
//预估模式只有按人次和人数收费
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
())
&&
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
Common
.
isNotNull
(
incomeDetailList
))
{
if
(
Common
.
isNotNull
(
incomeDetailList
))
{
for
(
TIncomeDetail
incomeDetailSum
:
incomeDetailList
)
{
for
(
TIncomeDetail
incomeDetailSum:
incomeDetailList
)
{
if
(!(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
if
(!(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getFeeType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getFeeType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getMrSettleType
())))
{
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getMrSettleType
())))
{
isSum
=
1
;
isSum
=
1
;
break
;
break
;
}
}
}
}
}
}
if
(!
isExist
||
isSum
==
1
)
{
}
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
if
(!
isExist
||
isSum
==
1
)
{
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
()
,
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
());
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
}
settleDomain
.
getManagementFee
());
}
else
{
}
BigDecimal
gMoney
;
}
else
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
BigDecimal
gMoney
;
gMoney
=
settleDomain
.
getManagementFee
();
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
gMoney
=
settleDomain
.
getManagementFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
if
(
Common
.
isNotNull
(
incomeDetailList
))
{
gMoney
=
settleDomain
.
getManagementFee
();
for
(
TIncomeDetail
incomeDetailSum:
incomeDetailList
)
{
if
(
Common
.
isNotNull
(
incomeDetailList
)
)
{
if
(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
for
(
TIncomeDetail
incomeDetailSum
:
incomeDetailList
)
{
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getFeeType
())
&&
if
(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getMrSettl
eType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getFe
eType
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
incomeDetailSum
.
getFeeMode
()))
{
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getMrSettleType
())
&&
isSum
=
6
;
CommonConstants
.
THREE_STRING
.
equals
(
incomeDetailSum
.
getFeeMode
()))
{
break
;
isSum
=
6
;
}
else
{
break
;
isSum
=
2
;
}
else
{
}
isSum
=
2
;
}
}
}
}
}
else
{
isSum
=
2
;
gMoney
=
BigDecimalUtils
.
safeMultiply
(
fee
,
settleDomain
.
getManagementFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
FIVE_INT
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(!
isExist
||
isSum
==
2
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
);
}
}
}
else
{
isSum
=
2
;
gMoney
=
BigDecimalUtils
.
safeMultiply
(
fee
,
settleDomain
.
getManagementFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
));
}
if
(!
isExist
||
isSum
==
2
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
);
}
}
}
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
()
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
()
.
contains
(
CommonConstants
.
THREE_STRING
))
{
.
contains
(
CommonConstants
.
THREE_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
())
)
{
//预估模式
//预估模式
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
())
&&
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
Common
.
isNotNull
(
incomeDetailList
))
{
for
(
TIncomeDetail
incomeDetailSum
:
incomeDetailList
)
{
if
(!(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getFeeType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getMrSettleType
())))
{
isSum
=
3
;
break
;
}
}
}
if
(!
isExist
||
isSum
==
3
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
());
}
}
else
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
BigDecimal
money
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
if
(
Common
.
isNotNull
(
incomeDetailList
))
{
if
(
Common
.
isNotNull
(
incomeDetailList
))
{
for
(
TIncomeDetail
incomeDetailSum:
incomeDetailList
)
{
for
(
TIncomeDetail
incomeDetailSum
:
incomeDetailList
)
{
if
(
!(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
if
(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getFeeType
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getFeeType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
incomeDetailSum
.
getMrSettleType
())))
{
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getMrSettleType
())
&&
isSum
=
3
;
CommonConstants
.
THREE_STRING
.
equals
(
incomeDetailSum
.
getFeeMode
()))
{
isSum
=
5
;
break
;
break
;
}
else
{
isSum
=
4
;
}
}
}
}
}
}
}
else
{
isSum
=
4
;
money
=
BigDecimalUtils
.
safeMultiply
(
fee
,
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
));
}
}
if
(!
isExist
||
isSum
==
3
)
{
if
(!
isExist
||
isSum
==
4
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
);
settleDomain
.
getRiskFundFee
());
}
}
else
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
BigDecimal
money
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
if
(
Common
.
isNotNull
(
incomeDetailList
))
{
for
(
TIncomeDetail
incomeDetailSum:
incomeDetailList
)
{
if
(
incomeDetailSum
.
getSourceId
().
equals
(
insuranceDetail
.
getId
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getFeeType
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
incomeDetailSum
.
getMrSettleType
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
incomeDetailSum
.
getFeeMode
()))
{
isSum
=
5
;
break
;
}
else
{
isSum
=
4
;
}
}
}
}
else
{
isSum
=
4
;
money
=
BigDecimalUtils
.
safeMultiply
(
fee
,
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
FIVE_INT
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(!
isExist
||
isSum
==
4
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
);
}
}
}
}
}
}
}
...
...
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
...
@@ -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
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceOperateService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* @author licancan
* @author licancan
...
@@ -15,4 +17,8 @@ import org.springframework.stereotype.Service;
...
@@ -15,4 +17,8 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
TInsuranceOperateServiceImpl
extends
ServiceImpl
<
TInsuranceOperateMapper
,
TInsuranceOperate
>
implements
TInsuranceOperateService
{
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 @@
...
@@ -63,6 +63,11 @@
<result
property=
"unitName"
column=
"UNIT_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"unitName"
column=
"UNIT_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"unitNo"
column=
"UNIT_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"unitNo"
column=
"UNIT_NO"
jdbcType=
"VARCHAR"
/>
</resultMap>
</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"
>
<sql
id=
"Base_Column_List"
>
ID,EMP_NAME,
ID,EMP_NAME,
EMP_IDCARD_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
EMP_IDCARD_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
...
@@ -1020,8 +1025,8 @@
...
@@ -1020,8 +1025,8 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
</if>
<if
test=
"param.
createBy != null and param.cre
ateBy.trim() != ''"
>
<if
test=
"param.
updateBy != null and param.upd
ateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.
cre
ateBy}
and refund.UPDATE_BY = #{param.
upd
ateBy}
</if>
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
${param.authSql}
...
@@ -1194,11 +1199,14 @@
...
@@ -1194,11 +1199,14 @@
FROM
FROM
t_insurance_detail
t_insurance_detail
where
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=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
<if
test=
"idList != null"
>
</if>
<if
test=
"idList != null and idList.size > 0"
>
AND id not in
AND id not in
<foreach
item=
"item"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
...
@@ -1206,4 +1214,18 @@
...
@@ -1206,4 +1214,18 @@
</if>
</if>
</select>
</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>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceOperateMapper.xml
View file @
02ad1b5e
...
@@ -19,4 +19,22 @@
...
@@ -19,4 +19,22 @@
ID,INSURANCE_DETAIL_ID,OPERATE_DESC,REMARK,
ID,INSURANCE_DETAIL_ID,OPERATE_DESC,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME
CREATE_BY,CREATE_NAME,CREATE_TIME
</sql>
</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>
</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 {
...
@@ -132,4 +132,17 @@ public class SocialTask {
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/pushDetail"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/pushDetail"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时任务生成统计表数据-定时任务结束------------"
);
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 {
...
@@ -148,12 +148,12 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty
(
"款项来源(0客户到款/1垫付)"
)
@ExcelProperty
(
"款项来源(0客户到款/1垫付)"
)
private
Integer
moneyFrom
;
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: 结算单调整待打印)不能为空"
)
@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 推送
失败)不能为空"
)
@NotBlank
(
message
=
"状态(0待提交1待审核2:待推送
明细3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印10 推送失败 11 已审核生成收入中12已审核生成收入
失败)不能为空"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@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
;
private
Integer
status
;
/**
/**
* 提交时间
* 提交时间
...
@@ -415,6 +415,22 @@ public class TSalaryStandard extends BaseEntity {
...
@@ -415,6 +415,22 @@ public class TSalaryStandard extends BaseEntity {
@ExcelIgnore
@ExcelIgnore
private
String
bpoFlag
;
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;
...
@@ -21,6 +21,7 @@ import com.alibaba.excel.annotation.ExcelIgnore;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
...
@@ -120,5 +121,18 @@ public class TStatisticsDeclarer {
...
@@ -120,5 +121,18 @@ public class TStatisticsDeclarer {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"不申报原因"
)
@ExcelProperty
(
"不申报原因"
)
private
String
undeclareReason
;
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 {
...
@@ -26,7 +26,7 @@ public class TSalaryStandardExportVo implements Serializable {
/**
/**
* 状态0待提交 1待审核 2审核通过 3发送成功 5审核不通过 10 发送失败
* 状态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 发送失败)不能为空"
)
@NotBlank
(
message
=
"状态(0待提交 1待审核 2审核通过 3发送成功 5审核不通过 10 发送失败)不能为空"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"薪酬状态"
)
@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 {
...
@@ -74,5 +74,11 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"不申报原因"
)
@ExcelProperty
(
"不申报原因"
)
private
String
undeclareReason
;
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 {
...
@@ -229,4 +229,14 @@ public class TSalaryStandardController {
public
R
<
String
>
backSalaryByApplyNo
(
@RequestParam
String
applyNo
)
{
public
R
<
String
>
backSalaryByApplyNo
(
@RequestParam
String
applyNo
)
{
return
tSalaryStandardService
.
backSalaryByApplyNo
(
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
...
@@ -47,4 +47,11 @@ public interface TStatisticsDeclarerMapper extends BaseMapper<TStatisticsDeclare
* @return:
* @return:
**/
**/
List
<
TStatisticsDeclarer
>
doStatisticsTaxDeclarer
(
@Param
(
"nowMonth"
)
String
nowMonth
,
@Param
(
"lastMonth"
)
String
lastYear
);
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> {
...
@@ -63,6 +63,15 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
*/
*/
R
<
String
>
salaryStandardAudit
(
String
auditFlag
,
String
auditRemark
,
String
id
);
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: 删除工资表
* @Description: 删除工资表
* @Author: hgw
* @Author: hgw
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
02ad1b5e
...
@@ -31,7 +31,10 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
...
@@ -31,7 +31,10 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
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.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
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.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
...
@@ -50,25 +53,26 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.MSalaryEstimateService;
...
@@ -50,25 +53,26 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.MSalaryEstimateService;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.DoJointSalaryAsyncTask
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants
;
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.TSalaryStandardExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
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.entity.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 标准薪酬工资表
* 标准薪酬工资表
...
@@ -78,32 +82,21 @@ import java.util.*;
...
@@ -78,32 +82,21 @@ import java.util.*;
*/
*/
@Log4j2
@Log4j2
@Service
@Service
@AllArgsConstructor
@EnableConfigurationProperties
({
DaprArchivesProperties
.
class
,
DaprSocialProperties
.
class
})
@EnableConfigurationProperties
({
DaprArchivesProperties
.
class
,
DaprSocialProperties
.
class
})
public
class
TSalaryStandardServiceImpl
extends
ServiceImpl
<
TSalaryStandardMapper
,
TSalaryStandard
>
implements
TSalaryStandardService
{
public
class
TSalaryStandardServiceImpl
extends
ServiceImpl
<
TSalaryStandardMapper
,
TSalaryStandard
>
implements
TSalaryStandardService
{
@Autowired
private
final
TApprovalRecordService
approvalRecordService
;
private
TApprovalRecordService
approvalRecordService
;
private
final
TSalaryAccountService
salaryAccountService
;
private
final
MSalaryEstimateService
mSalaryEstimateService
;
@Autowired
private
final
DaprSocialProperties
socialProperties
;
private
TSalaryAccountService
salaryAccountService
;
private
final
DaprArchivesProperties
archivesProperties
;
private
final
EkpSalaryUtil
ekpSalaryUtil
;
@Autowired
private
final
EkpSocialUtil
ekpSocialUtil
;
private
MSalaryEstimateService
mSalaryEstimateService
;
private
final
EkpFundUtil
ekpFundUtil
;
private
final
TApprovalRecordService
auditLogService
;
@Autowired
@Lazy
private
DaprSocialProperties
socialProperties
;
private
final
DoJointSalaryAsyncTask
doSalaryAsync
;
@Autowired
private
DaprArchivesProperties
archivesProperties
;
@Autowired
private
EkpSalaryUtil
ekpSalaryUtil
;
@Autowired
private
EkpSocialUtil
ekpSocialUtil
;
@Autowired
private
EkpFundUtil
ekpFundUtil
;
@Autowired
private
TApprovalRecordService
auditLogService
;
/**
/**
* 标准薪酬工资表简单分页查询
* 标准薪酬工资表简单分页查询
...
@@ -213,12 +206,30 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -213,12 +206,30 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TApprovalRecord
tApprovalRecord
=
new
TApprovalRecord
();
TApprovalRecord
tApprovalRecord
=
new
TApprovalRecord
();
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
auditFlag
))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
auditFlag
))
{
tSalaryStandard
.
setStatus
(
CommonConstants
.
TWO_INT
);
tSalaryStandard
.
setStatus
(
CommonConstants
.
TWO_INT
);
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
ZERO_STRING
);
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
ZERO_STRING
);
tApprovalRecord
.
setNodeId
(
"审核通过"
);
tApprovalRecord
.
setNodeId
(
"审核通过"
);
// 收入相关
R
<
String
>
failed
=
doIncomeDetail
(
id
,
tSalaryStandard
);
R
<
TSettleDomainSelectVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
if
(
failed
!=
null
)
return
failed
;
,
"/tsettledomain/inner/getSettleDomainVoById"
,
tSalaryStandard
.
getDeptId
()
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
// 结算主体
TSettleDomainSelectVo
dept
;
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
dept
=
sdr
.
getData
();
}
else
{
return
R
.
failed
(
"获取项目信息失败,请联管理员!"
);
}
List
<
TSalaryAccount
>
salaryAccountList
=
salaryAccountService
.
getListByIncome
(
id
);
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
// 将审核状态变为中间态
tSalaryStandard
.
setStatus
(
CommonConstants
.
dingleDigitIntArray
[
11
]);
tSalaryStandard
.
setIncomeStartTime
(
new
Date
());
baseMapper
.
updateById
(
tSalaryStandard
);
// 异步-收入相关
doSalaryAsync
.
doIncomeDetail
(
dept
,
salaryAccountList
,
id
,
tSalaryStandard
);
}
}
else
{
}
else
{
tSalaryStandard
.
setStatus
(
CommonConstants
.
FIVE_INT
);
tSalaryStandard
.
setStatus
(
CommonConstants
.
FIVE_INT
);
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
ONE_STRING
);
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
ONE_STRING
);
...
@@ -242,170 +253,6 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -242,170 +253,6 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
}
/**
* @param id
* @param tSalaryStandard
* @Description: 处理收入明细
* @Author: hgw
* @Date: 2022/9/2 17:35
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
R
<
String
>
doIncomeDetail
(
String
id
,
TSalaryStandard
tSalaryStandard
)
{
R
<
TSettleDomainSelectVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getSettleDomainVoById"
,
tSalaryStandard
.
getDeptId
()
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
// 结算主体
TSettleDomainSelectVo
dept
;
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
dept
=
sdr
.
getData
();
}
else
{
return
R
.
failed
(
"获取项目信息失败,请联管理员!"
);
}
List
<
TSalaryAccount
>
salaryAccountList
=
salaryAccountService
.
getListByIncome
(
id
);
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
List
<
String
>
idCardList
=
new
ArrayList
<>();
for
(
TSalaryAccount
account
:
salaryAccountList
)
{
idCardList
.
add
(
account
.
getEmpIdcard
());
}
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
// 收入相关
R
<
String
>
failed1
=
getIncomeDetailMap
(
tSalaryStandard
,
dept
,
idCardList
,
detailMap
);
if
(
failed1
!=
null
)
return
failed1
;
// 含有薪资,则计算收入
// 管理费
if
(
Common
.
isNotNull
(
dept
.
getManageServerItem
())
&&
dept
.
getManageServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getManagementTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getManagementType
()))
{
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
else
{
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
}
// 风险金
if
(
Common
.
isNotNull
(
dept
.
getRiskServerItem
())
&&
dept
.
getRiskServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getRiskFundTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getRiskFundType
()))
{
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
else
{
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
}
}
return
null
;
}
/**
* @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
R
<
String
>
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/saveDetail"
,
detail
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
saveR
==
null
||
saveR
.
getCode
()
==
CommonConstants
.
ONE_INT
||
Boolean
.
FALSE
.
equals
(
saveR
.
getData
()))
{
return
R
.
failed
(
"保存收入明细以及统计出错!"
);
}
}
}
return
null
;
}
/**
/**
* @Description: 删除
* @Description: 删除
* @Author: hgw
* @Author: hgw
...
@@ -973,7 +820,53 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -973,7 +820,53 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
}
}
}
return
R
.
failed
(
"未找到工资表"
);
return
R
.
failed
(
"未找到工资表"
);
}
/**
* @param id
* @Description: 重新生成收入
* @Author: hgw
* @Date: 2022/11/29 17:58
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
salaryDoIncome
(
String
id
)
{
TSalaryStandard
tSalaryStandard
=
this
.
getById
(
id
);
if
(
tSalaryStandard
!=
null
&&
(
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
]
||
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
12
])
&&
tSalaryStandard
.
getIncomeStartTime
()
!=
null
)
{
if
(
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
])
{
long
start
=
tSalaryStandard
.
getIncomeStartTime
().
getTime
()
+
1800000
;
long
end
=
new
Date
().
getTime
();
if
(
start
>
end
)
{
return
R
.
failed
(
"上次生成时间:"
+
DateUtil
.
formatDatePatten
(
tSalaryStandard
.
getIncomeStartTime
(),
DateUtil
.
DATETIME_PATTERN_SECOND
)
+
",请稍等30分钟"
);
}
}
R
<
TSettleDomainSelectVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getSettleDomainVoById"
,
tSalaryStandard
.
getDeptId
()
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
// 结算主体
TSettleDomainSelectVo
dept
;
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
dept
=
sdr
.
getData
();
}
else
{
return
R
.
failed
(
"获取项目信息失败,请联管理员!"
);
}
List
<
TSalaryAccount
>
salaryAccountList
=
salaryAccountService
.
getListByIncome
(
id
);
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
// 将重置生成推送时间
tSalaryStandard
.
setStatus
(
CommonConstants
.
dingleDigitIntArray
[
11
]);
tSalaryStandard
.
setIncomeStartTime
(
new
Date
());
tSalaryStandard
.
setIncomeEndTime
(
null
);
this
.
updateById
(
tSalaryStandard
);
// 异步-收入相关
doSalaryAsync
.
doIncomeDetail
(
dept
,
salaryAccountList
,
id
,
tSalaryStandard
);
return
R
.
ok
(
null
,
"生成收入并推送中,请耐心等待!"
);
}
return
R
.
failed
(
"未获取到报账明细,请重试"
);
}
else
{
return
R
.
failed
(
"请耐心等待!"
);
}
}
}
}
}
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;
...
@@ -29,13 +29,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
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.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
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.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper
;
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.service.TStatisticsDeclarerService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -46,6 +49,7 @@ import java.io.InputStream;
...
@@ -46,6 +49,7 @@ import java.io.InputStream;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 申报对象表
* 申报对象表
*
*
...
@@ -53,9 +57,12 @@ import java.util.List;
...
@@ -53,9 +57,12 @@ import java.util.List;
* @date 2022-08-11 10:56:10
* @date 2022-08-11 10:56:10
*/
*/
@Log4j2
@Log4j2
@RequiredArgsConstructor
@Service
@Service
public
class
TStatisticsDeclarerServiceImpl
extends
ServiceImpl
<
TStatisticsDeclarerMapper
,
TStatisticsDeclarer
>
implements
TStatisticsDeclarerService
{
public
class
TStatisticsDeclarerServiceImpl
extends
ServiceImpl
<
TStatisticsDeclarerMapper
,
TStatisticsDeclarer
>
implements
TStatisticsDeclarerService
{
private
final
ArchivesDaprUtil
archivesDaprUtil
;
/**
/**
* 申报对象表简单分页查询
* 申报对象表简单分页查询
* @param tStatisticsDeclarer 申报对象表
* @param tStatisticsDeclarer 申报对象表
...
@@ -176,10 +183,31 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
...
@@ -176,10 +183,31 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
if
(
num
>
0
)
{
if
(
num
>
0
)
{
return
R
.
failed
(
"上月数据已生成,不可重复生成!"
);
return
R
.
failed
(
"上月数据已生成,不可重复生成!"
);
}
else
{
}
else
{
String
lastMonth
=
DateUtil
.
addMonth
(-
1
);
//上月
String
lastMonth
=
DateUtil
.
addMonth
(-
1
);
//上月
List
<
TStatisticsDeclarer
>
stdvoList
=
baseMapper
.
doStatisticsTaxDeclarer
(
nowMonth
,
lastMonth
);
List
<
TStatisticsDeclarer
>
stdvoList
=
baseMapper
.
doStatisticsTaxDeclarer
(
nowMonth
,
lastMonth
);
for
(
TStatisticsDeclarer
declarer
:
stdvoList
)
{
if
(
Common
.
isNotNull
(
stdvoList
))
{
this
.
save
(
declarer
);
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
();
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 @@
...
@@ -75,6 +75,8 @@
<result
property=
"orderId"
column=
"ORDER_ID"
/>
<result
property=
"orderId"
column=
"ORDER_ID"
/>
<result
property=
"bpoFlag"
column=
"BPO_FLAG"
/>
<result
property=
"bpoFlag"
column=
"BPO_FLAG"
/>
<result
property=
"applyNo"
column=
"APPLY_NO"
/>
<result
property=
"applyNo"
column=
"APPLY_NO"
/>
<result
property=
"incomeStartTime"
column=
"INCOME_START_TIME"
/>
<result
property=
"incomeEndTime"
column=
"INCOME_END_TIME"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
...
@@ -128,7 +130,9 @@
...
@@ -128,7 +130,9 @@
a.INVOICE_TITLE,
a.INVOICE_TITLE,
a.ORDER_ID,
a.ORDER_ID,
a.BPO_FLAG,
a.BPO_FLAG,
a.APPLY_NO
a.APPLY_NO,
a.INCOME_START_TIME,
a.INCOME_END_TIME
</sql>
</sql>
<sql
id=
"tSalaryStandard_where"
>
<sql
id=
"tSalaryStandard_where"
>
<if
test=
"tSalaryStandard != null"
>
<if
test=
"tSalaryStandard != null"
>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsDeclarerMapper.xml
View file @
02ad1b5e
...
@@ -32,8 +32,10 @@
...
@@ -32,8 +32,10 @@
<result
property=
"empPhone"
column=
"EMP_PHONE"
/>
<result
property=
"empPhone"
column=
"EMP_PHONE"
/>
<result
property=
"occupationType"
column=
"OCCUPATION_TYPE"
/>
<result
property=
"occupationType"
column=
"OCCUPATION_TYPE"
/>
<result
property=
"occupationMonth"
column=
"OCCUPATION_MONTH"
/>
<result
property=
"occupationMonth"
column=
"OCCUPATION_MONTH"
/>
<result
property=
"isZeroDeclare"
column=
"IS_ZERO_DECLARE"
/>
<result
property=
"isDeclare"
column=
"IS_DECLARE"
/>
<result
property=
"isDeclare"
column=
"IS_DECLARE"
/>
<result
property=
"undeclareReason"
column=
"UNDECLARE_REASON"
/>
<result
property=
"undeclareReason"
column=
"UNDECLARE_REASON"
/>
<result
property=
"isZeroFlag"
column=
"IS_ZERO_FLAG"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
...
@@ -44,6 +46,7 @@
...
@@ -44,6 +46,7 @@
a.EMP_PHONE,
a.EMP_PHONE,
a.OCCUPATION_TYPE,
a.OCCUPATION_TYPE,
a.OCCUPATION_MONTH,
a.OCCUPATION_MONTH,
a.IS_ZERO_DECLARE,
a.IS_DECLARE,
a.IS_DECLARE,
a.UNDECLARE_REASON
a.UNDECLARE_REASON
</sql>
</sql>
...
@@ -73,8 +76,11 @@
...
@@ -73,8 +76,11 @@
<if
test=
"tStatisticsDeclarer.occupationMonth != null and tStatisticsDeclarer.occupationMonth.trim() != ''"
>
<if
test=
"tStatisticsDeclarer.occupationMonth != null and tStatisticsDeclarer.occupationMonth.trim() != ''"
>
AND a.OCCUPATION_MONTH = #{tStatisticsDeclarer.occupationMonth}
AND a.OCCUPATION_MONTH = #{tStatisticsDeclarer.occupationMonth}
</if>
</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() != ''"
>
<if
test=
"tStatisticsDeclarer.isDeclare != null and tStatisticsDeclarer.isDeclare.trim() != ''"
>
AND a.IS_DECLARE = #{tStatisticsDeclarer.isDeclare}
AND a.IS_DECLARE = #{tStatisticsDeclarer.isDeclare}
</if>
</if>
<if
test=
"tStatisticsDeclarer.undeclareReason != null and tStatisticsDeclarer.undeclareReason.trim() != ''"
>
<if
test=
"tStatisticsDeclarer.undeclareReason != null and tStatisticsDeclarer.undeclareReason.trim() != ''"
>
AND a.UNDECLARE_REASON = #{tStatisticsDeclarer.undeclareReason}
AND a.UNDECLARE_REASON = #{tStatisticsDeclarer.undeclareReason}
...
@@ -97,15 +103,34 @@
...
@@ -97,15 +103,34 @@
<select
id=
"doStatisticsTaxDeclarer"
resultMap=
"tStatisticsDeclarerMap"
>
<select
id=
"doStatisticsTaxDeclarer"
resultMap=
"tStatisticsDeclarerMap"
>
SELECT
SELECT
#{nowMonth} DECLARE_MONTH,c.EMP_NAME,c.EMP_IDCARD,c.EMP_PHONE,c.INVOICE_TITLE DECLARE_UNIT,
#{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 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,
(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
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}
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
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
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.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH) c
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH) c
GROUP BY c.EMP_IDCARD,c.INVOICE_TITLE,c.SETTLEMENT_MONTH
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>
</select>
</mapper>
</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 {
...
@@ -632,6 +632,13 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty
(
"工资公积金结算状态"
)
@ExcelProperty
(
"工资公积金结算状态"
)
private
String
salaryFundFlag
;
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 {
...
@@ -51,7 +51,7 @@ public class TPreDispatchInfo extends BaseEntity {
*/
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"id"
)
@Schema
(
description
=
"id"
)
private
String
id
;
private
String
id
;
/**
/**
* 0 派增 1 派减
* 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;
...
@@ -17,6 +17,7 @@ import java.time.LocalDateTime;
public
class
TPreDispatchExportVo
implements
Serializable
{
public
class
TPreDispatchExportVo
implements
Serializable
{
@ExcelAttribute
(
name
=
"主键"
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"主键"
,
needExport
=
true
)
@ExcelProperty
(
"主键"
)
private
String
id
;
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 {
...
@@ -168,7 +168,19 @@ public class TIncomeController {
@Inner
@Inner
@PostMapping
(
"/inner/saveDetail"
)
@PostMapping
(
"/inner/saveDetail"
)
public
Boolean
saveDetail
(
@RequestBody
TIncomeDetail
tIncomeDetail
)
{
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;
...
@@ -19,7 +19,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.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.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
@@ -381,6 +380,20 @@ public class TPaymentInfoController {
...
@@ -381,6 +380,20 @@ public class TPaymentInfoController {
tPaymentInfoService
.
createPaymentFundIncome
();
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
* @param info
* @Description: 查询缴费库
* @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;
...
@@ -33,4 +33,12 @@ import java.util.List;
@Mapper
@Mapper
public
interface
TIncomeDetailMapper
extends
BaseMapper
<
TIncomeDetail
>
{
public
interface
TIncomeDetailMapper
extends
BaseMapper
<
TIncomeDetail
>
{
List
<
TIncomeDetail
>
getTIncomeDetailList
(
@Param
(
"tIncomeDetail"
)
TIncomeDetail
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> {
...
@@ -169,31 +169,68 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* @param searchVo 缴费库
* @param searchVo 缴费库
* @return
* @return
*/
*/
List
<
TPaymentInfo
>
getTPaymentSocialPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentSocialPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
/**
* 缴费库公积金推送查询
* 缴费库公积金推送查询
* @param searchVo 缴费库
* @param searchVo 缴费库
* @return
* @return
*/
*/
List
<
TPaymentInfo
>
getTPaymentFundPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentFundPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
/**
* 缴费库社保收入推送查询
* 缴费库社保收入推送查询
* @param searchVo 缴费库
* @param searchVo 缴费库
* @return
* @return
*/
*/
List
<
TPaymentInfo
>
getTPaymentSocialIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentSocialIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
/**
* 缴费库公积金收入推送查询
* 缴费库公积金收入推送查询
* @param searchVo 缴费库
* @param searchVo 缴费库
* @return
* @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
updateBySocialPayment
(
@Param
(
"id"
)
String
id
);
void
updateBySocialIncomePayment
(
@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> {
...
@@ -128,8 +128,8 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
void
createForecastInfo
();
void
createForecastInfo
();
void
createForecastFundInfo
();
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;
...
@@ -30,4 +30,13 @@ import java.util.List;
*/
*/
public
interface
TIncomeDetailService
extends
IService
<
TIncomeDetail
>
{
public
interface
TIncomeDetailService
extends
IService
<
TIncomeDetail
>
{
List
<
TIncomeDetail
>
getTIncomeDetailList
(
TIncomeDetail
detail
);
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> {
...
@@ -58,7 +58,7 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/8/31 16:31
* @Date: 2022/8/31 16:31
* @return: boolean
* @return: boolean
**/
**/
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
);
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
,
boolean
synFlag
);
/**
/**
* @Description: 新增收入明细-详情表,同时统计;
* @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> {
...
@@ -146,6 +146,8 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
void
createPaymentInfoIncome
();
void
createPaymentInfoIncome
();
void
createPaymentFundIncome
();
void
createPaymentFundIncome
();
void
signPaymentNoIncomeFlag
();
TPaymentVo
getPaymentSocialAndFound
(
TPaymentInfo
info
);
TPaymentVo
getPaymentSocialAndFound
(
TPaymentInfo
info
);
void
pushPaymentSocialFundInfo
(
TPaymentInfoSearchVo
searchVo
);
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
...
@@ -33,7 +33,6 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
...
@@ -33,7 +33,6 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
@@ -53,13 +52,13 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
...
@@ -53,13 +52,13 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import
com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService
;
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.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.util.DoSocialTask
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.shardingsphere.transaction.annotation.ShardingTransactionType
;
import
org.apache.shardingsphere.transaction.annotation.ShardingTransactionType
;
import
org.apache.shardingsphere.transaction.core.TransactionType
;
import
org.apache.shardingsphere.transaction.core.TransactionType
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.CacheManager
;
...
@@ -117,6 +116,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -117,6 +116,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ExcelUtil
<
Object
>
excelUtil
=
new
ExcelUtil
<>(
Object
.
class
);
ExcelUtil
<
Object
>
excelUtil
=
new
ExcelUtil
<>(
Object
.
class
);
@Autowired
private
DoSocialTask
socialTask
;
/**
/**
* 派单信息记录表简单分页查询
* 派单信息记录表简单分页查询
*
*
...
@@ -504,6 +507,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -504,6 +507,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelVOTemp
.
put
(
excel
.
getRowIndex
().
toString
(),
excel
.
getEmpIdcard
());
excelVOTemp
.
put
(
excel
.
getRowIndex
().
toString
(),
excel
.
getEmpIdcard
());
continue
;
continue
;
}
}
}
else
{
if
(
Common
.
isNotNull
(
excel
.
getRecordBase
())
||
Common
.
isNotNull
(
excel
.
getPensionStart
())
||
Common
.
isNotNull
(
excel
.
getMedicalStart
())
||
Common
.
isNotNull
(
excel
.
getBirthStart
())
||
Common
.
isNotNull
(
excel
.
getBigailmentStart
())
||
Common
.
isNotNull
(
excel
.
getUnemployStart
())
||
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
())
||
Common
.
isNotNull
(
excel
.
getPaymentType
())
||
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
||
Common
.
isNotNull
(
excel
.
getBirthCardinal
())
||
Common
.
isNotNull
(
excel
.
getBigailmentCardinal
())
||
Common
.
isNotNull
(
excel
.
getMedicalCardinal
())
||
Common
.
isNotNull
(
excel
.
getUnemploymentCardinal
())
||
Common
.
isNotNull
(
excel
.
getWorkInjuryCardinal
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIAL_HOLD_IS_EMPTY
)));
excelVOTemp
.
put
(
excel
.
getRowIndex
().
toString
(),
excel
.
getEmpIdcard
());
}
}
}
if
(
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())){
if
(
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())){
if
(
Common
.
isEmpty
(
fundSet
)){
if
(
Common
.
isEmpty
(
fundSet
)){
...
@@ -511,6 +525,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -511,6 +525,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelVOTemp
.
put
(
excel
.
getRowIndex
().
toString
(),
excel
.
getEmpIdcard
());
excelVOTemp
.
put
(
excel
.
getRowIndex
().
toString
(),
excel
.
getEmpIdcard
());
continue
;
continue
;
}
}
}
else
{
if
(
Common
.
isNotNull
(
excel
.
getProvidentStart
())
||
Common
.
isNotNull
(
excel
.
getProvidentCardinal
())
||
Common
.
isNotNull
(
excel
.
getProvidentPer
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
FUND_HOLD_IS_EMPTY
)));
excelVOTemp
.
put
(
excel
.
getRowIndex
().
toString
(),
excel
.
getEmpIdcard
());
}
}
}
if
(
Common
.
isNotNull
(
dispatchMap
)
&&
Common
.
isNotNull
(
dispatchMap
.
get
(
excel
.
getEmpIdcard
()))){
if
(
Common
.
isNotNull
(
dispatchMap
)
&&
Common
.
isNotNull
(
dispatchMap
.
get
(
excel
.
getEmpIdcard
()))){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EXIST
)));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EXIST
)));
...
@@ -675,7 +695,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -675,7 +695,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
dispatch
)){
if
(
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
dispatch
)){
socialFund
.
setDispatchId
(
dispatch
.
getId
());
socialFund
.
setDispatchId
(
dispatch
.
getId
());
}
}
initSocialFundAndInsert
(
emp
,
social
,
fund
,
socialFund
,
project
,
dispatchPart
,
injury
);
initSocialFundAndInsert
(
emp
,
social
,
fund
,
socialFund
,
project
,
dispatchPart
,
injury
);
}
}
// 生成预付数据
// 生成预付数据
if
(
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
socialFund
.
getId
())){
if
(
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
socialFund
.
getId
())){
...
@@ -1462,7 +1482,26 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -1462,7 +1482,26 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
social
.
setHandleStatus
(
CommonConstants
.
ZERO_STRING
);
social
.
setHandleStatus
(
CommonConstants
.
ZERO_STRING
);
social
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
social
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
social
.
setTrustRemark
(
excel
.
getTrustRemark
());
social
.
setTrustRemark
(
excel
.
getTrustRemark
());
social
.
setSocialStartDate
(
excel
.
getPensionStart
());
List
<
Date
>
lstDate
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
excel
.
getPensionStart
()))
{
lstDate
.
add
(
excel
.
getPensionStart
());
}
if
(
Common
.
isNotNull
(
excel
.
getUnemployStart
()))
{
lstDate
.
add
(
excel
.
getUnemployStart
());
}
if
(
Common
.
isNotNull
(
excel
.
getBigailmentStart
()))
{
lstDate
.
add
(
excel
.
getBigailmentStart
());
}
if
(
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
()))
{
lstDate
.
add
(
excel
.
getWorkInjuryStart
());
}
if
(
Common
.
isNotNull
(
excel
.
getMedicalStart
()))
{
lstDate
.
add
(
excel
.
getMedicalStart
());
}
if
(
Common
.
isNotNull
(
excel
.
getBirthStart
()))
{
lstDate
.
add
(
excel
.
getBirthStart
());
}
social
.
setSocialStartDate
(
Collections
.
min
(
lstDate
));
// 封装单位信息 结算信息
// 封装单位信息 结算信息
social
.
setBelongUnit
(
excel
.
getCustomerId
());
social
.
setBelongUnit
(
excel
.
getCustomerId
());
social
.
setSettleDomain
(
excel
.
getSettleDomainId
());
social
.
setSettleDomain
(
excel
.
getSettleDomainId
());
...
@@ -3135,7 +3174,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -3135,7 +3174,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&&
CommonConstants
.
ONE_INT
==
flag
){
&&
CommonConstants
.
ONE_INT
==
flag
){
// 更新预估数据 -- 失败项重新派单审核不通过不处理预估
// 更新预估数据 -- 失败项重新派单审核不通过不处理预估
if
(!
flagTemp
){
if
(!
flagTemp
){
forecastLibraryService
.
updateForecastLibaryByDispatchReduce
(
sf
,
forecastFlag
);
socialTask
.
asynchronousDisPatchHandle
(
sf
,
forecastFlag
,
null
,
null
,
CommonConstants
.
ZERO_INT
);
}
}
// 更新人员档案和项目档案的社保公积金状态
// 更新人员档案和项目档案的社保公积金状态
UpProjectSocialFundVo
vo
=
new
UpProjectSocialFundVo
();
UpProjectSocialFundVo
vo
=
new
UpProjectSocialFundVo
();
...
@@ -3281,6 +3320,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -3281,6 +3320,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
int
forecastFlag
=
CommonConstants
.
ZERO_INT
;
int
forecastFlag
=
CommonConstants
.
ZERO_INT
;
// auditFlag 表示社保办理无办理项是不保存
// auditFlag 表示社保办理无办理项是不保存
boolean
auditFlag
=
true
;
boolean
auditFlag
=
true
;
boolean
partSuccess
=
false
;
for
(
TDispatchInfo
dis
:
disList
)
{
for
(
TDispatchInfo
dis
:
disList
)
{
auditFlag
=
true
;
auditFlag
=
true
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
typeSub
))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
typeSub
))
{
...
@@ -3296,6 +3336,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -3296,6 +3336,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工社保公积金查询数据:"
+
dis
.
getEmpName
()));
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工社保公积金查询数据:"
+
dis
.
getEmpName
()));
continue
;
continue
;
}
}
partSuccess
=
Common
.
isNotNull
(
sf
)
&&
Common
.
isNotNull
(
dis
.
getSocialId
())
&&
(
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getPensionHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getMedicalHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getWorkInjuryHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getBirthHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getUnemployHandle
())
||
(
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getBigailmentHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
sf
.
getIsIllness
())))
&&
!(
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getPensionHandle
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getMedicalHandle
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getWorkInjuryHandle
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getBirthHandle
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getUnemployHandle
())
&&
(
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getBigailmentHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
sf
.
getIsIllness
())));
if
(!
CommonConstants
.
TWO_STRING
.
equals
(
dis
.
getStatus
()))
{
if
(!
CommonConstants
.
TWO_STRING
.
equals
(
dis
.
getStatus
()))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"派单审核通过后才可以办理:"
+
dis
.
getEmpName
()));
errorList
.
add
(
new
ErrorMessage
(-
1
,
"派单审核通过后才可以办理:"
+
dis
.
getEmpName
()));
continue
;
continue
;
...
@@ -3395,13 +3450,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -3395,13 +3450,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
libraryFundInfoList
))
{
if
(
Common
.
isNotNull
(
libraryFundInfoList
))
{
for
(
TForecastLibrary
library
:
libraryFundInfoList
)
{
for
(
TForecastLibrary
library
:
libraryFundInfoList
)
{
//办理成功生成收入
//办理成功生成收入
createIncomeInfo
(
library
);
socialTask
.
asynchronousDisPatchHandle
(
null
,
0
,
null
,
library
,
CommonConstants
.
THREE_INT
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoList1
.
add
(
library
);
libraryFundInfoList1
.
add
(
library
);
}
}
}
}
if
(
Common
.
isNotNull
(
libraryFundInfoList1
))
{
if
(
Common
.
isNotNull
(
libraryFundInfoList1
))
{
forecastLibraryService
.
pushForecastFundInfo
(
libraryFundInfoList1
);
socialTask
.
asynchronousDisPatchHandle
(
null
,
0
,
libraryFundInfoList1
,
null
,
CommonConstants
.
TWO_INT
);
}
}
}
}
}
}
...
@@ -3580,21 +3635,25 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -3580,21 +3635,25 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&&
(
CommonConstants
.
FIVE_STRING
.
equals
(
sf
.
getSocialStatus
())
&&
(
CommonConstants
.
FIVE_STRING
.
equals
(
sf
.
getSocialStatus
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
sf
.
getFundStatus
()))){
||
CommonConstants
.
FOUR_STRING
.
equals
(
sf
.
getFundStatus
()))){
// 派增办理,全部失败 同步预估库数据
// 派增办理,全部失败 同步预估库数据
forecastLibraryService
.
updateForecastLibaryByDispatchReduce
(
sf
,
forecastFlag
);
socialTask
.
asynchronousDisPatchHandle
(
sf
,
forecastFlag
,
null
,
null
,
CommonConstants
.
ZERO_INT
);
}
}
// 社保办理只要办理成功就刷新预估数据 公积金办理不用处理
// 社保办理只要办理成功就刷新预估数据 公积金办理不用处理
if
(
Common
.
isNotNull
(
dis
.
getSocialId
())
if
(
Common
.
isNotNull
(
dis
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
sf
.
getSocialStatus
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
sf
.
getSocialStatus
())
||
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getSocialStatus
())
||
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getSocialStatus
())){
||
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getSocialStatus
())){
forecastLibraryService
.
updateForecastLibaryByDispatch
(
sf
);
if
(
partSuccess
){
forecastLibraryService
.
updateForecastLibaryByDispatch
(
sf
);
}
else
{
socialTask
.
asynchronousDisPatchHandle
(
sf
,
0
,
null
,
null
,
CommonConstants
.
ONE_INT
);
}
}
}
}
}
// 2.派减办理成功 处理预估 (不管社保还是公积金办理失败)
// 2.派减办理成功 处理预估 (不管社保还是公积金办理失败)
if
(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
())
if
(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
())
&&
CommonConstants
.
ZERO_INT
==
flag
){
&&
CommonConstants
.
ZERO_INT
==
flag
){
// 同步预估库数据
// 同步预估库数据
forecastLibraryService
.
updateForecastLibaryByDispatchReduce
(
sf
,
forecastFlag
);
socialTask
.
asynchronousDisPatchHandle
(
sf
,
forecastFlag
,
null
,
null
,
CommonConstants
.
ZERO_INT
);
}
}
// 派减办理失败不同步档案的相关字段信息
// 派减办理失败不同步档案的相关字段信息
if
(!(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
())
&&
CommonConstants
.
ONE_INT
==
flag
)){
if
(!(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
())
&&
CommonConstants
.
ONE_INT
==
flag
)){
...
@@ -4260,90 +4319,4 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -4260,90 +4319,4 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
return
minStartDate
;
return
minStartDate
;
}
}
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
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
02ad1b5e
...
@@ -352,7 +352,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -352,7 +352,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())))
{
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())))
{
//办理成功生成收入
//办理成功生成收入
createIncomeInfo
(
library
);
createIncomeInfo
(
library
,
true
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListSocial
.
add
(
library
);
libraryFundInfoListSocial
.
add
(
library
);
}
}
...
@@ -365,7 +365,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -365,7 +365,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
socialFundInfoF
)
&&
(
Common
.
isNotNull
(
socialFundInfoF
.
getFundId
())
if
(
Common
.
isNotNull
(
socialFundInfoF
)
&&
(
Common
.
isNotNull
(
socialFundInfoF
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfoF
.
getFundStatus
())))
{
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfoF
.
getFundStatus
())))
{
//办理成功生成收入
//办理成功生成收入
createIncomeInfo
(
library
);
createIncomeInfo
(
library
,
true
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListFund
.
add
(
library
);
libraryFundInfoListFund
.
add
(
library
);
}
}
...
@@ -373,11 +373,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -373,11 +373,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
//推送社保明细
//推送社保明细
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
pushForecastInfo
(
libraryFundInfoListSocial
);
pushForecastInfo
(
libraryFundInfoListSocial
,
true
);
}
}
//推送公积金明细
//推送公积金明细
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
pushForecastFundInfo
(
libraryFundInfoListFund
);
pushForecastFundInfo
(
libraryFundInfoListFund
,
true
);
}
}
if
(
isSaveAndUpdate
)
{
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
return
R
.
ok
(
null
,
"执行成功!"
);
...
@@ -1482,7 +1482,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1482,7 +1482,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
sysBaseSetInfoMapper
.
updateById
(
sysBaseSetInfo
);
sysBaseSetInfoMapper
.
updateById
(
sysBaseSetInfo
);
}
}
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoMap
.
values
())
{
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoMap
.
values
())
{
this
.
updateForecastLibaryCore
(
socialFundInfo
,
socialFundInfo
.
getDoMonth
(),
true
,
false
);
this
.
updateForecastLibaryCore
(
socialFundInfo
,
socialFundInfo
.
getDoMonth
(),
true
,
false
,
true
);
socialFundInfoMapper
.
updateById
(
socialFundInfo
);
socialFundInfoMapper
.
updateById
(
socialFundInfo
);
}
}
}
}
...
@@ -1497,7 +1497,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1497,7 +1497,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
**/
**/
@Override
@Override
public
R
<
String
>
updateToneForecastLibary
(
TSocialFundInfo
socialFundInfo
,
String
doMonth
)
{
public
R
<
String
>
updateToneForecastLibary
(
TSocialFundInfo
socialFundInfo
,
String
doMonth
)
{
return
this
.
updateForecastLibaryCore
(
socialFundInfo
,
doMonth
,
false
,
false
);
return
this
.
updateForecastLibaryCore
(
socialFundInfo
,
doMonth
,
false
,
false
,
true
);
}
}
/**
/**
...
@@ -1509,7 +1509,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1509,7 +1509,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
**/
**/
@Override
@Override
public
R
<
String
>
updateForecastLibaryByDispatch
(
TSocialFundInfo
socialFundInfo
)
{
public
R
<
String
>
updateForecastLibaryByDispatch
(
TSocialFundInfo
socialFundInfo
)
{
return
this
.
updateForecastLibaryCore
(
socialFundInfo
,
null
,
false
,
true
);
return
this
.
updateForecastLibaryCore
(
socialFundInfo
,
null
,
false
,
true
,
false
);
}
}
/**
/**
...
@@ -1577,11 +1577,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1577,11 +1577,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
//推送社保明细
//推送社保明细
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
pushForecastInfo
(
libraryFundInfoListSocial
);
pushForecastInfo
(
libraryFundInfoListSocial
,
false
);
}
}
//推送公积金明细
//推送公积金明细
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
pushForecastFundInfo
(
libraryFundInfoListFund
);
pushForecastFundInfo
(
libraryFundInfoListFund
,
false
);
}
}
}
}
return
R
.
ok
();
return
R
.
ok
();
...
@@ -1632,7 +1632,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1632,7 +1632,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail
.
setMoney
(
detail
.
getMoney
().
negate
());
detail
.
setMoney
(
detail
.
getMoney
().
negate
());
incomeService
.
saveDetail
(
detail
);
incomeService
.
saveDetail
(
detail
,
false
);
}
}
}
}
}
}
...
@@ -1672,7 +1672,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1672,7 +1672,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail
.
setMoney
(
detail
.
getMoney
().
negate
());
detail
.
setMoney
(
detail
.
getMoney
().
negate
());
incomeService
.
saveDetail
(
detail
);
incomeService
.
saveDetail
(
detail
,
false
);
}
}
}
}
}
}
...
@@ -1686,7 +1686,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1686,7 +1686,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @Date: 2022/7/26 19:01
* @Date: 2022/7/26 19:01
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
**/
private
R
<
String
>
updateForecastLibaryCore
(
TSocialFundInfo
socialFundInfo
,
String
doMonth
,
boolean
isOnly
,
boolean
isDispatch
)
{
private
R
<
String
>
updateForecastLibaryCore
(
TSocialFundInfo
socialFundInfo
,
String
doMonth
,
boolean
isOnly
,
boolean
isDispatch
,
boolean
synFlag
)
{
String
empIdCard
=
socialFundInfo
.
getEmpIdcard
();
String
empIdCard
=
socialFundInfo
.
getEmpIdcard
();
//定义未推送的按条件查询得到的预估数据
//定义未推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
librarySocialList
=
null
;
List
<
TForecastLibrary
>
librarySocialList
=
null
;
...
@@ -1899,13 +1899,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1899,13 +1899,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
//办理成功生成收入
//办理成功生成收入
createIncomeInfo
(
library
);
createIncomeInfo
(
library
,
synFlag
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
librarySocialInfoList1
.
add
(
library
);
librarySocialInfoList1
.
add
(
library
);
}
}
}
}
if
(
Common
.
isNotNull
(
librarySocialInfoList1
))
{
if
(
Common
.
isNotNull
(
librarySocialInfoList1
))
{
this
.
pushForecastInfo
(
librarySocialInfoList1
);
this
.
pushForecastInfo
(
librarySocialInfoList1
,
synFlag
);
}
}
}
}
}
}
...
@@ -2244,7 +2244,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2244,7 +2244,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
//办理成功生成收入
//办理成功生成收入
createIncomeInfo
(
library
);
createIncomeInfo
(
library
,
true
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListSocial
.
add
(
library
);
libraryFundInfoListSocial
.
add
(
library
);
}
}
...
@@ -2266,7 +2266,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2266,7 +2266,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
libraryFundInfoList
))
{
if
(
Common
.
isNotNull
(
libraryFundInfoList
))
{
for
(
TForecastLibrary
library
:
libraryFundInfoList
)
{
for
(
TForecastLibrary
library
:
libraryFundInfoList
)
{
//办理成功生成收入
//办理成功生成收入
createIncomeInfo
(
library
);
createIncomeInfo
(
library
,
true
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListFund
.
add
(
library
);
libraryFundInfoListFund
.
add
(
library
);
}
}
...
@@ -2275,11 +2275,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2275,11 +2275,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
//推送社保明细
//推送社保明细
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
pushForecastInfo
(
libraryFundInfoListSocial
);
pushForecastInfo
(
libraryFundInfoListSocial
,
true
);
}
}
//推送公积金明细
//推送公积金明细
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
pushForecastFundInfo
(
libraryFundInfoListFund
);
pushForecastFundInfo
(
libraryFundInfoListFund
,
true
);
}
}
if
(
isSaveAndUpdate
)
{
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
return
R
.
ok
(
null
,
"执行成功!"
);
...
@@ -2343,7 +2343,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2343,7 +2343,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
//推送数据封装并推送
initEkpPushSocialParam
(
unPushInfo
);
initEkpPushSocialParam
(
unPushInfo
,
true
);
}
}
}
}
...
@@ -2355,27 +2355,27 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2355,27 +2355,27 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
));
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
));
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
//推送数据封装并推送
initEkpPushFundParam
(
unPushInfo
);
initEkpPushFundParam
(
unPushInfo
,
true
);
}
}
}
}
@Override
@Override
public
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
)
{
public
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
)
{
if
(
Common
.
isNotNull
(
library
))
{
if
(
Common
.
isNotNull
(
library
))
{
//推送数据封装并推送
//推送数据封装并推送
initEkpPushSocialParam
(
library
);
initEkpPushSocialParam
(
library
,
synFlag
);
}
}
}
}
@Override
@Override
public
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
)
{
public
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
)
{
if
(
Common
.
isNotNull
(
library
))
{
if
(
Common
.
isNotNull
(
library
))
{
//推送数据封装并推送
//推送数据封装并推送
initEkpPushFundParam
(
library
);
initEkpPushFundParam
(
library
,
synFlag
);
}
}
}
}
public
void
initEkpPushSocialParam
(
List
<
TForecastLibrary
>
unPushInfo
)
{
public
void
initEkpPushSocialParam
(
List
<
TForecastLibrary
>
unPushInfo
,
boolean
synFlag
)
{
R
<
TSettleDomainListVo
>
listVo
;
R
<
TSettleDomainListVo
>
listVo
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
for
(
TForecastLibrary
library
:
unPushInfo
)
{
for
(
TForecastLibrary
library
:
unPushInfo
)
{
...
@@ -2391,6 +2391,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2391,6 +2391,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
}
}
}
if
(
Common
.
isEmpty
(
listVo
)
||
CommonConstants
.
SUCCESS
!=
listVo
.
getCode
()){
ServiceUtil
.
runTimeExceptionDiy
(
"获取结算主体异常,请检查传参和档案服务状态!"
);
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getSocialType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getSocialType
()))
{
continue
;
continue
;
}
}
...
@@ -2607,11 +2610,16 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2607,11 +2610,16 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialParam
.
setFd_3b0afbe1f94a08
(
library
.
getId
());
socialParam
.
setFd_3b0afbe1f94a08
(
library
.
getId
());
// 薪酬申请编号
// 薪酬申请编号
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
doJointSocialTask
.
asynchronousEkpForecastSocial
(
socialParam
,
library
);
// synFlag=true 异步推送 synFlag=false 非异步推送 兼容批量办理处理 fxj
if
(
synFlag
){
doJointSocialTask
.
asynchronousEkpForecastSocial
(
socialParam
,
library
);
}
else
{
doJointSocialTask
.
asynchronousEkpForecastSocialAsso
(
socialParam
,
library
);
}
}
}
}
}
public
void
initEkpPushFundParam
(
List
<
TForecastLibrary
>
unPushInfo
)
{
public
void
initEkpPushFundParam
(
List
<
TForecastLibrary
>
unPushInfo
,
boolean
synFlag
)
{
R
<
TSettleDomainListVo
>
listVo
;
R
<
TSettleDomainListVo
>
listVo
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
for
(
TForecastLibrary
library
:
unPushInfo
)
{
for
(
TForecastLibrary
library
:
unPushInfo
)
{
...
@@ -2741,11 +2749,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2741,11 +2749,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
fundParam
.
setFd_3b0afbaf10df2c
(
library
.
getId
());
fundParam
.
setFd_3b0afbaf10df2c
(
library
.
getId
());
// 薪酬申请编号
// 薪酬申请编号
fundParam
.
setFd_3b3cabde83d1d0
(
CommonConstants
.
EMPTY_STRING
);
fundParam
.
setFd_3b3cabde83d1d0
(
CommonConstants
.
EMPTY_STRING
);
doJointSocialTask
.
asynchronousEkpForecastFund
(
fundParam
,
library
);
if
(
synFlag
){
doJointSocialTask
.
asynchronousEkpForecastFund
(
fundParam
,
library
);
}
else
{
doJointSocialTask
.
asynchronousEkpForecastFundAsso
(
fundParam
,
library
);
}
}
}
}
}
public
void
createIncomeInfo
(
TForecastLibrary
library
)
{
public
void
createIncomeInfo
(
TForecastLibrary
library
,
boolean
synFlag
)
{
//获取项目信息
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
TSettleDomain
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
...
@@ -2800,7 +2812,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2800,7 +2812,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
!
isExist
)
{
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
!
isExist
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
(),
sourceType
);
settleDomain
.
getManagementFee
(),
sourceType
,
synFlag
);
}
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
((
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
((
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
...
@@ -2811,14 +2823,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2811,14 +2823,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
!
isExist
)
{
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
!
isExist
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
(),
sourceType
);
settleDomain
.
getRiskFundFee
(),
sourceType
,
synFlag
);
}
}
}
}
}
}
}
}
public
void
createIncomeInsurance
(
TForecastLibrary
library
,
TSettleDomain
settleDomain
,
String
feeType
,
public
void
createIncomeInsurance
(
TForecastLibrary
library
,
TSettleDomain
settleDomain
,
String
feeType
,
String
charges
,
String
feeMode
,
BigDecimal
money
,
String
sourceType
)
{
String
charges
,
String
feeMode
,
BigDecimal
money
,
String
sourceType
,
boolean
synFlag
)
{
//生成收入数据
//生成收入数据
TIncomeDetail
detail
=
new
TIncomeDetail
();
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
...
@@ -2847,7 +2860,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2847,7 +2860,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setId
(
CommonConstants
.
NULL
);
incomeService
.
saveDetail
(
detail
);
incomeService
.
saveDetail
(
detail
,
synFlag
);
}
}
public
String
dateStringInsert
(
String
month
)
{
public
String
dateStringInsert
(
String
month
)
{
...
...
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
...
@@ -39,4 +39,15 @@ public class TIncomeDetailServiceImpl extends ServiceImpl<TIncomeDetailMapper, T
public
List
<
TIncomeDetail
>
getTIncomeDetailList
(
TIncomeDetail
detail
)
{
public
List
<
TIncomeDetail
>
getTIncomeDetailList
(
TIncomeDetail
detail
)
{
return
baseMapper
.
getTIncomeDetailList
(
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
...
@@ -251,8 +251,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @Date: 2022/8/31 16:34
* @Date: 2022/8/31 16:34
* @return: boolean
* @return: boolean
**/
**/
@Override
public
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
,
boolean
synFlag
)
{
public
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
)
{
if
(
Common
.
isEmpty
(
tIncomeDetail
.
getEmpIdcard
())
if
(
Common
.
isEmpty
(
tIncomeDetail
.
getEmpIdcard
())
||
Common
.
isEmpty
(
tIncomeDetail
.
getDeptId
())
||
Common
.
isEmpty
(
tIncomeDetail
.
getDeptId
())
||
Common
.
isEmpty
(
tIncomeDetail
.
getPayMonth
()))
{
||
Common
.
isEmpty
(
tIncomeDetail
.
getPayMonth
()))
{
...
@@ -274,10 +273,10 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -274,10 +273,10 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
tIncomeDetailService
.
save
(
tIncomeDetail
);
tIncomeDetailService
.
save
(
tIncomeDetail
);
// 不存在,直接新增
// 不存在,直接新增
if
(
incomeList
==
null
||
incomeList
.
isEmpty
())
{
if
(
incomeList
==
null
||
incomeList
.
isEmpty
())
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
else
{
}
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
...
@@ -313,7 +312,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
}
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
...
@@ -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
();
TIncome
income
=
new
TIncome
();
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
income
.
setApplyNo
(
tIncomeDetail
.
getApplyNo
());
income
.
setApplyNo
(
tIncomeDetail
.
getApplyNo
());
this
.
save
(
income
);
this
.
save
(
income
);
long
start
=
System
.
currentTimeMillis
();
long
start
=
System
.
currentTimeMillis
();
doJointSocialTask
.
asynchronousEkpIncome
(
income
);
if
(
synFlag
){
doJointSocialTask
.
asynchronousEkpIncome
(
income
);
}
else
{
doJointSocialTask
.
asynchronousEkpIncomeAsso
(
income
);
}
log
.
error
(
"线程执行耗时:"
+
(
System
.
currentTimeMillis
()-
start
));
log
.
error
(
"线程执行耗时:"
+
(
System
.
currentTimeMillis
()-
start
));
return
true
;
return
true
;
}
}
...
@@ -571,13 +574,26 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -571,13 +574,26 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @return: boolean
* @return: boolean
**/
**/
private
boolean
copyCore
(
TIncomeDetail
tIncomeDetail
,
List
<
TIncome
>
incomeList
,
List
<
TIncomeDetail
>
detailList
,
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
(
CommonConstants
.
ONE_STRING
.
equals
(
tIncomeDetail
.
getFeeMode
()))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
else
{
}
else
{
Map
<
String
,
Integer
>
numMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
numMap
=
new
HashMap
<>();
...
@@ -633,7 +649,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -633,7 +649,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
}
}
else
{
}
else
{
...
@@ -642,7 +658,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -642,7 +658,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
}
}
}
...
@@ -655,7 +671,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -655,7 +671,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
}
}
else
{
}
else
{
...
@@ -663,13 +679,13 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -663,13 +679,13 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
}
}
}
}
else
{
}
else
{
// 各个模式累加逻辑:
// 各个模式累加逻辑:
return
this
.
judgeMixModel
(
tIncomeDetail
,
numMap
,
incomeMap
);
return
this
.
judgeMixModel
(
tIncomeDetail
,
numMap
,
incomeMap
,
synFlag
);
}
}
}
else
{
}
else
{
// 薪资。收费方式:2金额-人数
// 薪资。收费方式:2金额-人数
...
@@ -679,13 +695,13 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -679,13 +695,13 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
Common
.
isNotNull
(
paymentInfo
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
}
}
else
{
}
else
{
// 3金额-人次
// 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
...
@@ -742,7 +758,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @Date: 2022/9/1 18:17
* @Date: 2022/9/1 18:17
* @return: boolean
* @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
();
String
month
=
tIncomeDetail
.
getPayMonth
();
if
(
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
month
=
tIncomeDetail
.
getDataCreateMonth
();
month
=
tIncomeDetail
.
getDataCreateMonth
();
...
@@ -753,11 +769,11 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -753,11 +769,11 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
Integer
maxNum
=
incomeMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
maxNum
=
incomeMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
// 当明细的次数大于总次数,才可以新增统计
// 当明细的次数大于总次数,才可以新增统计
if
(
Common
.
isEmpty
(
maxNum
)
||
ifNullToZero
(
nums
)
>=
maxNum
)
{
if
(
Common
.
isEmpty
(
maxNum
)
||
ifNullToZero
(
nums
)
>=
maxNum
)
{
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
}
else
{
}
else
{
// 红冲判断:当本类型是最大值,才可以红冲
// 红冲判断:当本类型是最大值,才可以红冲
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
,
synFlag
);
}
}
return
true
;
return
true
;
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
02ad1b5e
...
@@ -2513,26 +2513,50 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2513,26 +2513,50 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
@Override
public
void
createPaymentSocialInfo
()
{
public
void
createPaymentSocialInfo
()
{
//获取所有未推送的社保实缴明细数据
//获取所有未推送的社保实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectLis
t
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
long
count
=
baseMapper
.
selectCoun
t
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
count
>
0
){
//推送数据封装并推送
List
<
TPaymentInfo
>
unPushs
;
initEkpPushSocialParam
(
unPushInfo
);
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++){
unPushs
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
).
last
(
" limit 0,10000"
));
synchronized
(
this
){
if
(
Common
.
isNotNull
(
unPushs
))
{
//推送数据封装并推送
initEkpPushSocialParam
(
unPushs
);
}
}
}
}
}
}
}
@Override
@Override
public
void
createPaymentFundInfo
()
{
public
void
createPaymentFundInfo
()
{
//获取所有未推送的公积金实缴明细数据
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
count
>
0
)
{
//推送数据封装并推送
List
<
TPaymentInfo
>
unPushInfo
;
initEkpPushFundParam
(
unPushInfo
);
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
//获取所有未推送的公积金实缴明细数据
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
).
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
initEkpPushFundParam
(
unPushInfo
);
}
}
}
}
}
}
}
...
@@ -2574,75 +2598,149 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2574,75 +2598,149 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
@Override
public
void
createPaymentInfoIncome
()
{
public
void
createPaymentInfoIncome
()
{
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getIsIncomeStatus
,
CommonConstants
.
ZERO_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
if
(
Common
.
isNotNull
(
sumList
))
{
if
(
count
>
0
)
{
//生成收入
List
<
TPaymentInfo
>
sumList
;
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
).
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成收入
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
}
}
}
}
}
}
}
@Override
@Override
public
void
createPaymentFundIncome
()
{
public
void
createPaymentFundIncome
()
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectLis
t
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
long
count
=
baseMapper
.
selectCoun
t
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getIsIncomeStatus
,
CommonConstants
.
ZERO_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
if
(
Common
.
isNotNull
(
sumList
))
{
if
(
count
>
0
)
{
//生成公积金收入
List
<
TPaymentInfo
>
sumList
;
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
).
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成公积金收入
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
}
}
}
}
}
@Override
public
void
signPaymentNoIncomeFlag
()
{
//标识根据项目不需要生成收入的数据
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
));
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
unPushInfo
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//判断是否需要生成收入并标识
signIncomeFlag
(
unPushInfo
);
}
}
}
}
}
}
}
public
void
createPaymentSocialInfoReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
public
void
createPaymentSocialInfoReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
//获取所有未推送的社保实缴明细数据
//获取所有未推送的社保实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
getTPaymentSocialPushInfo
(
searchVo
);
searchVo
.
setLockStatus
(
CommonConstants
.
ONE_STRING
);
if
(
Common
.
isNotNull
(
unPushInfo
))
{
long
count
=
baseMapper
.
getTPaymentSocialPushCount
(
searchVo
,
user
.
getId
());
List
<
TPaymentInfo
>
list
=
unPushInfo
.
stream
().
filter
(
e
->
findList
(
e
,
user
)).
collect
(
Collectors
.
toList
());
if
(
count
>
0
)
{
unPushInfo
.
clear
();
List
<
TPaymentInfo
>
unPushInfo
;
if
(
Common
.
isNotNull
(
list
))
{
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
//推送数据封装并推送
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
initEkpPushSocialParam
(
list
);
unPushInfo
=
baseMapper
.
getTPaymentSocialPushInfo
(
searchVo
,
user
.
getId
());
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
initEkpPushSocialParam
(
unPushInfo
);
}
}
}
}
}
}
}
}
public
void
createPaymentFundInfoReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
public
void
createPaymentFundInfoReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
//获取所有未推送的公积金实缴明细数据
//获取所有未推送的公积金实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
getTPaymentFundPushInfo
(
searchVo
);
searchVo
.
setLockStatus
(
CommonConstants
.
ONE_STRING
);
if
(
Common
.
isNotNull
(
unPushInfo
))
{
long
count
=
baseMapper
.
getTPaymentFundPushCount
(
searchVo
,
user
.
getId
());
List
<
TPaymentInfo
>
list
=
unPushInfo
.
stream
().
filter
(
e
->
findList
(
e
,
user
)).
collect
(
Collectors
.
toList
());
if
(
count
>
0
)
{
unPushInfo
.
clear
();
List
<
TPaymentInfo
>
unPushInfo
;
if
(
Common
.
isNotNull
(
list
))
{
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
//推送数据封装并推送
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
initEkpPushFundParam
(
list
);
unPushInfo
=
baseMapper
.
getTPaymentFundPushInfo
(
searchVo
,
user
.
getId
());
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
initEkpPushFundParam
(
unPushInfo
);
}
}
}
}
}
}
}
}
public
void
createPaymentInfoIncomeReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
public
void
createPaymentInfoIncomeReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
getTPaymentSocialIncomeInfo
(
searchVo
);
searchVo
.
setLockStatus
(
CommonConstants
.
ONE_STRING
);
if
(
Common
.
isNotNull
(
sumList
))
{
long
count
=
baseMapper
.
getTPaymentSocialIncomeCount
(
searchVo
,
user
.
getId
());
List
<
TPaymentInfo
>
list
=
sumList
.
stream
().
filter
(
e
->
findList
(
e
,
user
)).
collect
(
Collectors
.
toList
());
if
(
count
>
0
)
{
sumList
.
clear
();
List
<
TPaymentInfo
>
sumList
;
if
(
Common
.
isNotNull
(
list
))
{
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
//生成收入
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
createIncomeInfo
(
list
,
CommonConstants
.
ONE_STRING
);
sumList
=
baseMapper
.
getTPaymentSocialIncomeInfo
(
searchVo
,
user
.
getId
());
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成收入
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
}
}
}
}
}
}
}
}
public
void
createPaymentFundIncomeReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
public
void
createPaymentFundIncomeReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
getTPaymentFundIncomeInfo
(
searchVo
);
searchVo
.
setLockStatus
(
CommonConstants
.
ONE_STRING
);
if
(
Common
.
isNotNull
(
sumList
))
{
long
count
=
baseMapper
.
getTPaymentFundIncomeCount
(
searchVo
,
user
.
getId
());
List
<
TPaymentInfo
>
list
=
sumList
.
stream
().
filter
(
e
->
findList
(
e
,
user
)).
collect
(
Collectors
.
toList
());
if
(
count
>
0
)
{
sumList
.
clear
();
List
<
TPaymentInfo
>
sumList
;
if
(
Common
.
isNotNull
(
list
))
{
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
//生成公积金收入
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
createIncomeInfo
(
list
,
CommonConstants
.
TWO_STRING
);
sumList
=
baseMapper
.
getTPaymentFundIncomeInfo
(
searchVo
,
user
.
getId
());
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成公积金收入
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
}
}
}
}
}
}
}
}
...
@@ -3027,10 +3125,51 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3027,10 +3125,51 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}
public
void
signIncomeFlag
(
List
<
TPaymentInfo
>
updateList
)
{
//获取所有的项目编码
List
<
String
>
deptNoList
=
updateList
.
stream
().
map
(
TPaymentInfo:
:
getSettleDomainCode
).
collect
(
Collectors
.
toList
());
//获取对应项目信息
Map
<
String
,
TSettleDomain
>
data
=
new
HashMap
<>();
TSettleDomain
settleDomain
;
try
{
R
<
TSettleDomainListVo
>
infoByCodes
=
archivesDaprUtil
.
getSettleInfoByCodes
(
deptNoList
);
if
(
null
!=
infoByCodes
&&
Common
.
isNotNull
(
infoByCodes
.
getData
())
&&
Common
.
isNotNull
(
infoByCodes
.
getData
().
getMapVO
()))
{
data
=
infoByCodes
.
getData
().
getMapVO
();
}
if
(
Common
.
isNotNull
(
data
))
{
for
(
TPaymentInfo
paymentInfo
:
updateList
)
{
settleDomain
=
data
.
get
(
paymentInfo
.
getSettleDomainCode
());
boolean
isIncomeFlag
=
false
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
Common
.
isNotNull
(
paymentInfo
.
getSocialId
()))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
Common
.
isNotNull
(
paymentInfo
.
getFundId
())))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
//实缴模式
isIncomeFlag
=
true
;
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
((
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
Common
.
isNotNull
(
paymentInfo
.
getSocialId
()))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
Common
.
isNotNull
(
paymentInfo
.
getFundId
())))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
//实缴模式
isIncomeFlag
=
true
;
}
}
if
(!
isIncomeFlag
)
{
baseMapper
.
updateBySocialIncomeFlag
(
paymentInfo
.
getId
());
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"标识是否需要生成收入异常"
,
e
);
}
}
public
void
createIncomeInfo
(
List
<
TPaymentInfo
>
updateList
,
String
socialFundFlag
)
{
public
void
createIncomeInfo
(
List
<
TPaymentInfo
>
updateList
,
String
socialFundFlag
)
{
List
<
TIncomeDetail
>
exitIncome
;
for
(
TPaymentInfo
paymentInfo
:
updateList
)
{
for
(
TPaymentInfo
paymentInfo
:
updateList
)
{
boolean
exitFlag
=
false
;
boolean
exitFlag
=
false
;
List
<
TIncomeDetail
>
exitIncome
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
exitIncome
=
detailMapper
.
selectList
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
exitIncome
=
detailMapper
.
selectList
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
paymentInfo
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
paymentInfo
.
getEmpIdcard
())
...
@@ -3077,6 +3216,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3077,6 +3216,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int
isSum
=
0
;
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
if
(
Common
.
isNotNull
(
settleDomain
))
{
boolean
isIncomeFlag
=
false
;
// 含有社保,则计算收入
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
...
@@ -3101,6 +3241,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3101,6 +3241,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}
if
(!
exitFlag
||
isSum
==
1
)
{
if
(!
exitFlag
||
isSum
==
1
)
{
isIncomeFlag
=
true
;
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
,
socialFundFlag
);
gMoney
,
socialFundFlag
);
...
@@ -3131,12 +3272,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3131,12 +3272,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}
if
(!
exitFlag
||
isSum
==
2
)
{
if
(!
exitFlag
||
isSum
==
2
)
{
isIncomeFlag
=
true
;
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
,
socialFundFlag
);
money
,
socialFundFlag
);
}
}
}
}
}
}
if
(!
isIncomeFlag
)
{
baseMapper
.
updateBySocialIncomeFlag
(
paymentInfo
.
getId
());
}
}
}
}
}
}
}
...
...
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
...
@@ -2347,7 +2347,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
importVo
.
setPost
(
preInfo
.
getPositionAdd
());
importVo
.
setPost
(
preInfo
.
getPositionAdd
());
importVo
.
setWorkingHours
(
preInfo
.
getWorkingHoursAdd
());
importVo
.
setWorkingHours
(
preInfo
.
getWorkingHoursAdd
());
importVo
.
setEmpNational
(
CommonConstants
.
ONE_STRING
);
importVo
.
setEmpNational
(
CommonConstants
.
ONE_STRING
);
importVo
.
setEducationName
(
CommonConstants
.
FIVE_STRING
);
importVo
.
setEducationName
(
"大专"
);
importVo
.
setTrustRemark
(
"预派单"
);
importVo
.
setTrustRemark
(
"预派单"
);
if
(
null
!=
preInfo
.
getPensionBase
()){
if
(
null
!=
preInfo
.
getPensionBase
()){
importVo
.
setRecordBase
(
preInfo
.
getPensionBase
());
importVo
.
setRecordBase
(
preInfo
.
getPensionBase
());
...
@@ -2406,7 +2406,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
...
@@ -2406,7 +2406,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
**/
**/
private
void
initDispatchContractVo
(
TPreDispatchInfo
preInfo
,
TDispatchImportVo
importVo
)
{
private
void
initDispatchContractVo
(
TPreDispatchInfo
preInfo
,
TDispatchImportVo
importVo
)
{
if
(
Common
.
isNotNull
(
preInfo
.
getContractNameAdd
())){
if
(
Common
.
isNotNull
(
preInfo
.
getContractNameAdd
())){
importVo
.
setContractName
(
preInfo
.
getContractTypeAdd
()
);
importVo
.
setContractName
(
"其他"
);
if
(
Common
.
isNotNull
(
preInfo
.
getContractStartAdd
())){
if
(
Common
.
isNotNull
(
preInfo
.
getContractStartAdd
())){
importVo
.
setContractStart
(
DateUtil
.
stringToDate
(
ServiceUtil
.
importVo
.
setContractStart
(
DateUtil
.
stringToDate
(
ServiceUtil
.
replaceSeparator
(
preInfo
.
getContractStartAdd
(),
CommonConstants
.
CENTER_SPLIT_LINE_STRING
,
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 {
...
@@ -102,6 +102,44 @@ public class DoJointSocialTask {
}
}
log
.
info
(
"推送收入到EKP结束"
);
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: 合同-批量更换负责人
* @Description: 合同-批量更换负责人
...
@@ -401,6 +439,13 @@ public class DoJointSocialTask {
...
@@ -401,6 +439,13 @@ public class DoJointSocialTask {
**/
**/
@Async
@Async
public
void
asynchronousEkpForecastSocial
(
EkpPushSocialParam
socialParam
,
TForecastLibrary
library
)
{
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-线程开始"
);
log
.
info
(
"推送社保预估费用到EKP-线程开始"
);
try
{
try
{
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
...
@@ -444,6 +489,11 @@ public class DoJointSocialTask {
...
@@ -444,6 +489,11 @@ public class DoJointSocialTask {
**/
**/
@Async
@Async
public
void
asynchronousEkpForecastFund
(
EkpPushFundParam
fundParam
,
TForecastLibrary
library
)
{
public
void
asynchronousEkpForecastFund
(
EkpPushFundParam
fundParam
,
TForecastLibrary
library
)
{
initEkpForecastFund
(
fundParam
,
library
);
}
private
void
initEkpForecastFund
(
EkpPushFundParam
fundParam
,
TForecastLibrary
library
)
{
initEkpForecastFund
(
fundParam
,
library
);
log
.
info
(
"推送公积金预估费用到EKP-线程开始"
);
log
.
info
(
"推送公积金预估费用到EKP-线程开始"
);
try
{
try
{
String
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
String
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
...
@@ -478,4 +528,8 @@ public class DoJointSocialTask {
...
@@ -478,4 +528,8 @@ public class DoJointSocialTask {
}
}
log
.
info
(
"推送公积金预估费用到EKP结束"
);
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 @@
...
@@ -156,4 +156,16 @@
</where>
</where>
</select>
</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>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
02ad1b5e
...
@@ -100,6 +100,7 @@
...
@@ -100,6 +100,7 @@
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"incomeStatus"
column=
"INCOME_STATUS"
/>
<result
property=
"incomeStatus"
column=
"INCOME_STATUS"
/>
<result
property=
"isIncomeStatus"
column=
"IS_INCOME_STATUS"
/>
</resultMap>
</resultMap>
<resultMap
id=
"tPaymentInfoSumMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo"
>
<resultMap
id=
"tPaymentInfoSumMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo"
>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
...
@@ -1242,9 +1243,10 @@
...
@@ -1242,9 +1243,10 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
FROM t_payment_info a
<where>
<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"
/>
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</where>
limit 0,10000
</select>
</select>
<!--tPaymentInfo公积金推送查询-->
<!--tPaymentInfo公积金推送查询-->
...
@@ -1253,9 +1255,10 @@
...
@@ -1253,9 +1255,10 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
FROM t_payment_info a
<where>
<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"
/>
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</where>
limit 0,10000
</select>
</select>
<!--tPaymentInfo社保收入推送查询-->
<!--tPaymentInfo社保收入推送查询-->
...
@@ -1264,9 +1267,10 @@
...
@@ -1264,9 +1267,10 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
FROM t_payment_info a
<where>
<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"
/>
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</where>
limit 0,10000
</select>
</select>
<!--tPaymentInfo公积金收入推送查询-->
<!--tPaymentInfo公积金收入推送查询-->
...
@@ -1275,9 +1279,10 @@
...
@@ -1275,9 +1279,10 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
FROM t_payment_info a
<where>
<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"
/>
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</where>
limit 0,10000
</select>
</select>
<!-- 更改社保公积金推送状态 -->
<!-- 更改社保公积金推送状态 -->
...
@@ -1295,4 +1300,54 @@
...
@@ -1295,4 +1300,54 @@
where
where
ID = #{id}
ID = #{id}
</update>
</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>
</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