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
ae228f97
Commit
ae228f97
authored
Jan 16, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.5' into MVP1.7.5
parents
289a0504
6fead53d
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
655 additions
and
222 deletions
+655
-222
CacheConstants.java
...oud/plus/v1/yifu/common/core/constant/CacheConstants.java
+0
-2
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+2
-0
EkpDaprUtils.java
...ifu/cloud/plus/v1/yifu/common/dapr/util/EkpDaprUtils.java
+10
-0
ProcessDaprUtils.java
...cloud/plus/v1/yifu/common/dapr/util/ProcessDaprUtils.java
+0
-1
EkpDivisionInfoVo.java
...com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpDivisionInfoVo.java
+29
-0
EkpShenhepeizhi.java
...va/com/yifu/cloud/plus/v1/ekp/entity/EkpShenhepeizhi.java
+30
-0
TEkpShenhepeizhiController.java
...ud/plus/v1/ekp/controller/TEkpShenhepeizhiController.java
+48
-0
EkpShenhepeizhiMapper.java
.../yifu/cloud/plus/v1/ekp/mapper/EkpShenhepeizhiMapper.java
+29
-0
EkpShenhepeizhiService.java
...ifu/cloud/plus/v1/ekp/service/EkpShenhepeizhiService.java
+25
-0
EkpShenhepeizhiServiceImpl.java
.../plus/v1/ekp/service/impl/EkpShenhepeizhiServiceImpl.java
+64
-0
EkpShenhepeizhiMapper.xml
...p-biz/src/main/resources/mapper/EkpShenhepeizhiMapper.xml
+32
-0
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+4
-2
TInsuranceUnpurchaseApply.java
...plus/v1/yifu/salary/entity/TInsuranceUnpurchaseApply.java
+9
-0
TInsuranceUnpurchasePerson.java
...lus/v1/yifu/salary/entity/TInsuranceUnpurchasePerson.java
+6
-0
TSalaryStandard.java
...ifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
+8
-0
WxConfig.java
...a/com/yifu/cloud/plus/v1/yifu/salary/config/WxConfig.java
+2
-2
TInsuranceUnpurchaseApplyController.java
...alary/controller/TInsuranceUnpurchaseApplyController.java
+6
-63
TInsuranceUnpurchasePersonMapper.java
.../yifu/salary/mapper/TInsuranceUnpurchasePersonMapper.java
+1
-1
TInsuranceUnpurchasePersonSalaryMapper.java
...salary/mapper/TInsuranceUnpurchasePersonSalaryMapper.java
+8
-2
TInsuranceUnpurchasePersonSalaryService.java
...lary/service/TInsuranceUnpurchasePersonSalaryService.java
+18
-0
TInsuranceUnpurchasePersonService.java
...ifu/salary/service/TInsuranceUnpurchasePersonService.java
+1
-1
AbastractAuditProcess.java
...us/v1/yifu/salary/service/impl/AbastractAuditProcess.java
+103
-31
TInsuranceUnpurchaseApplyServiceImpl.java
...ry/service/impl/TInsuranceUnpurchaseApplyServiceImpl.java
+39
-47
TInsuranceUnpurchasePersonSalaryServiceImpl.java
...ice/impl/TInsuranceUnpurchasePersonSalaryServiceImpl.java
+15
-2
TInsuranceUnpurchasePersonServiceImpl.java
...y/service/impl/TInsuranceUnpurchasePersonServiceImpl.java
+74
-16
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+19
-26
TInsuranceUnpurchaseApplyAuditProcess.java
...e/impl/process/TInsuranceUnpurchaseApplyAuditProcess.java
+28
-10
application.yml
...salary/yifu-salary-biz/src/main/resources/application.yml
+0
-4
TInsuranceUnpurchaseApplyMapper.xml
...main/resources/mapper/TInsuranceUnpurchaseApplyMapper.xml
+12
-4
TInsuranceUnpurchasePersonMapper.xml
...ain/resources/mapper/TInsuranceUnpurchasePersonMapper.xml
+6
-1
TInsuranceUnpurchasePersonSalaryMapper.xml
...sources/mapper/TInsuranceUnpurchasePersonSalaryMapper.xml
+23
-5
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+3
-1
UserController.java
...u/cloud/plus/v1/yifu/admin/controller/UserController.java
+1
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CacheConstants.java
View file @
ae228f97
...
@@ -108,8 +108,6 @@ public interface CacheConstants {
...
@@ -108,8 +108,6 @@ public interface CacheConstants {
**/
**/
String
EVERYDAY_DISPATCH_CODE
=
"everyday_dispatch_code"
;
String
EVERYDAY_DISPATCH_CODE
=
"everyday_dispatch_code"
;
String
EVERYDAY_UNBUY_CODE
=
"everyday_unbuy_code"
;
/**
/**
* 区域数据--标签
* 区域数据--标签
*/
*/
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
ae228f97
...
@@ -370,6 +370,8 @@ public interface CommonConstants {
...
@@ -370,6 +370,8 @@ public interface CommonConstants {
String
ID
=
"ID"
;
String
ID
=
"ID"
;
String
PARAM_IS_NOT_ERROR
=
"传参异常,请检查参数"
;
String
PARAM_IS_NOT_ERROR
=
"传参异常,请检查参数"
;
int
EXCEL_EXPORT_LIMIT
=
60000
;
int
EXCEL_EXPORT_LIMIT
=
60000
;
int
EXCEL_EXPORT_LIMIT_NEW
=
20000
;
// 给量大的表导出使用
// 给量大的表导出使用
int
EXCEL_EXPORT_LIMIT_3
=
30000
;
int
EXCEL_EXPORT_LIMIT_3
=
30000
;
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/EkpDaprUtils.java
View file @
ae228f97
...
@@ -103,4 +103,14 @@ public class EkpDaprUtils {
...
@@ -103,4 +103,14 @@ public class EkpDaprUtils {
public
R
<
EkpSocialPushInfoVo
>
jobpushRiskInfoToEkp
(
List
<
EkpIncomeParamRisk
>
incomeParam
)
{
public
R
<
EkpSocialPushInfoVo
>
jobpushRiskInfoToEkp
(
List
<
EkpIncomeParamRisk
>
incomeParam
)
{
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/ekpriskinfo/inner/jobPushRiskInfoToEkp"
,
JSON
.
toJSONString
(
incomeParam
),
EkpSocialPushInfoVo
.
class
,
SecurityConstants
.
FROM_IN
);
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/ekpriskinfo/inner/jobPushRiskInfoToEkp"
,
JSON
.
toJSONString
(
incomeParam
),
EkpSocialPushInfoVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
/**
* 根据事业部配置条件查找用户账号
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
public
R
<
EkpDivisionInfoVo
>
getDivisionUsernameList
(
EkpDivisionInfoVo
divisionInfoVo
)
{
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/ekpShenhepeizhi/inner/getDivisionUsernameList"
,
divisionInfoVo
,
EkpDivisionInfoVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
}
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ProcessDaprUtils.java
View file @
ae228f97
...
@@ -29,7 +29,6 @@ public class ProcessDaprUtils {
...
@@ -29,7 +29,6 @@ public class ProcessDaprUtils {
* @since mvp1.7.5
* @since mvp1.7.5
**/
**/
public
R
<
ProcessVo
>
getProcessVoByType
(
String
processType
)
{
public
R
<
ProcessVo
>
getProcessVoByType
(
String
processType
)
{
log
.
error
(
"流程类型>>processType>>{}"
,
processType
);
R
<
ProcessVo
>
processVoR
=
HttpDaprUtil
.
invokeMethodPost
(
daprProcessProperties
.
getAppUrl
(),
daprProcessProperties
.
getAppId
(),
"/tprocess/inner/getProcessVoByType"
,
processType
,
ProcessVo
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
ProcessVo
>
processVoR
=
HttpDaprUtil
.
invokeMethodPost
(
daprProcessProperties
.
getAppUrl
(),
daprProcessProperties
.
getAppId
(),
"/tprocess/inner/getProcessVoByType"
,
processType
,
ProcessVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
processVoR
)){
if
(
Common
.
isEmpty
(
processVoR
)){
return
R
.
failed
(
"根据流程类型查询ProcessVo失败!"
);
return
R
.
failed
(
"根据流程类型查询ProcessVo失败!"
);
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpDivisionInfoVo.java
0 → 100644
View file @
ae228f97
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author chenyuxi
* @Date 2022-8-31 12:02:06
* @Description 事业部审批配置
* @Version 1.0
*/
@Data
public
class
EkpDivisionInfoVo
implements
Serializable
{
private
String
newLine
;
private
String
division
;
// 指定事业部配置表负责人标识:0事业部条线负责人;1事业部负责人;2分管副总
private
String
divisionIdentification
;
/**
* 查事业部审批人账号列表
**/
private
List
<
String
>
divisionUsernameList
;
}
yifu-ekp/yifu-ekp-api/src/main/java/com/yifu/cloud/plus/v1/ekp/entity/EkpShenhepeizhi.java
0 → 100644
View file @
ae228f97
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 事业部审批配置
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
@Data
@TableName
(
"ekp_shenhepeizhi_table"
)
@EqualsAndHashCode
()
@Schema
(
description
=
"事业部审批配置"
)
public
class
EkpShenhepeizhi
{
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
fdId
;
private
String
fdShiyebu
;
private
String
fdTiaoxian
;
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/TEkpShenhepeizhiController.java
0 → 100644
View file @
ae228f97
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
controller
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpSalaryInfoService
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpShenhepeizhiService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
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.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpDivisionInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.List
;
/**
* 事业部审批配置
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/ekpShenhepeizhi"
)
@Tag
(
name
=
"事业部审批配置"
)
public
class
TEkpShenhepeizhiController
{
private
final
EkpShenhepeizhiService
shenhepeizhiService
;
@Inner
@PostMapping
(
"/inner/getDivisionUsernameList"
)
public
EkpDivisionInfoVo
getDivisionUsernameList
(
@RequestBody
EkpDivisionInfoVo
divisionInfoVo
)
{
return
shenhepeizhiService
.
getDivisionUsernameList
(
divisionInfoVo
);
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/mapper/EkpShenhepeizhiMapper.java
0 → 100644
View file @
ae228f97
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpShenhepeizhi
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 事业部审批配置
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
@Mapper
public
interface
EkpShenhepeizhiMapper
extends
BaseMapper
<
EkpShenhepeizhi
>
{
// 查事业部负责人
List
<
String
>
getDivisionLoginNameList
(
@Param
(
"line"
)
String
line
,
@Param
(
"division"
)
String
division
);
// 查分管副总
List
<
String
>
getFuLoginNameList
(
@Param
(
"line"
)
String
line
,
@Param
(
"division"
)
String
division
);
// 查条线人
List
<
String
>
getLineLoginNameList
(
@Param
(
"line"
)
String
line
,
@Param
(
"division"
)
String
division
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/EkpShenhepeizhiService.java
0 → 100644
View file @
ae228f97
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpShenhepeizhi
;
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.ekp.vo.EkpDivisionInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* 事业部审批配置
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
public
interface
EkpShenhepeizhiService
extends
IService
<
EkpShenhepeizhi
>
{
EkpDivisionInfoVo
getDivisionUsernameList
(
EkpDivisionInfoVo
divisionInfoVo
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpShenhepeizhiServiceImpl.java
0 → 100644
View file @
ae228f97
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
.
impl
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpShenhepeizhi
;
import
com.yifu.cloud.plus.v1.ekp.mapper.EkpSalaryInfoMapper
;
import
com.yifu.cloud.plus.v1.ekp.mapper.EkpShenhepeizhiMapper
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpSalaryInfoService
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpShenhepeizhiService
;
import
com.yifu.cloud.plus.v1.ekp.vo.ClaimInfotVO
;
import
com.yifu.cloud.plus.v1.ekp.vo.ClaimRebackInfotVO
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpDivisionInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
//工资明细表
*
//@author huyc
//@date 2024-03-11 11:21:56
*/
@Log4j2
@Service
@RequiredArgsConstructor
public
class
EkpShenhepeizhiServiceImpl
extends
ServiceImpl
<
EkpShenhepeizhiMapper
,
EkpShenhepeizhi
>
implements
EkpShenhepeizhiService
{
@Override
public
EkpDivisionInfoVo
getDivisionUsernameList
(
EkpDivisionInfoVo
divisionInfoVo
)
{
EkpDivisionInfoVo
divisionInfoVoRes
=
new
EkpDivisionInfoVo
();
List
<
String
>
divisionUsernameList
=
new
ArrayList
<>();
// 指定事业部配置表负责人标识:0事业部条线负责人;1事业部负责人;2分管副总
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
divisionInfoVo
.
getDivisionIdentification
())){
divisionUsernameList
=
baseMapper
.
getLineLoginNameList
(
divisionInfoVo
.
getNewLine
(),
divisionInfoVo
.
getDivision
());
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
divisionInfoVo
.
getDivisionIdentification
())){
divisionUsernameList
=
baseMapper
.
getDivisionLoginNameList
(
divisionInfoVo
.
getNewLine
(),
divisionInfoVo
.
getDivision
());
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
divisionInfoVo
.
getDivisionIdentification
())){
divisionUsernameList
=
baseMapper
.
getFuLoginNameList
(
divisionInfoVo
.
getNewLine
(),
divisionInfoVo
.
getDivision
());
}
divisionInfoVoRes
.
setDivisionUsernameList
(
divisionUsernameList
);
return
divisionInfoVoRes
;
}
}
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpShenhepeizhiMapper.xml
0 → 100644
View file @
ae228f97
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.ekp.mapper.EkpShenhepeizhiMapper"
>
<!--查询项目信息-->
<select
id=
"getDivisionLoginNameList"
resultType=
"string"
>
select du.fd_login_name as loginName from ekp_shenhepeizhi_table a
LEFT JOIN ekporg_1927fe1d4d35e2548a3e d on d.fd_parent_id = a.fd_id
LEFT JOIN sys_org_person du on du.fd_id = d.sys_org_person_id
where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
</select>
<!--查询项目信息-->
<select
id=
"getFuLoginNameList"
resultType=
"string"
>
select fu.fd_login_name as loginName from ekp_shenhepeizhi_table a
LEFT JOIN ekporg_1927fe509c6554968429 f on f.fd_parent_id = a.fd_id
LEFT JOIN sys_org_person fu on fu.fd_id = f.sys_org_person_id
where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
</select>
<!--查询项目信息-->
<select
id=
"getLineLoginNameList"
resultType=
"string"
>
select lu.fd_login_name as loginName from ekp_shenhepeizhi_table a
LEFT JOIN ekporg_1927fe1d4d389080b7a7 l on l.fd_parent_id = a.fd_id
LEFT JOIN sys_org_person lu on lu.fd_id = l.sys_org_person_id
where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
</select>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
ae228f97
...
@@ -1477,8 +1477,10 @@
...
@@ -1477,8 +1477,10 @@
EMP_IDCARD_NO
EMP_IDCARD_NO
FROM t_insurance_detail d
FROM t_insurance_detail d
where DELETE_FLAG = 0
where DELETE_FLAG = 0
and (d.BUY_HANDLE_STATUS in (1,2) or (d.BUY_HANDLE_STATUS = 3 and d.IS_EFFECT = 0
))
and (d.BUY_HANDLE_STATUS in (1,2) or (d.BUY_HANDLE_STATUS = 3 and d.IS_EFFECT = 0
and d.POLICY_EFFECT
<![CDATA[ <= ]]>
NOW() and d.POLICY_END >= NOW()
and d.POLICY_EFFECT
<![CDATA[ <= ]]>
NOW() and d.POLICY_END >= NOW()
))
<if
test=
"idCardList != null and idCardList.size > 0"
>
<if
test=
"idCardList != null and idCardList.size > 0"
>
AND EMP_IDCARD_NO in
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=
")"
>
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TInsuranceUnpurchaseApply.java
View file @
ae228f97
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonAddVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonAddVo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -84,6 +86,13 @@ public class TInsuranceUnpurchaseApply extends BaseEntity {
...
@@ -84,6 +86,13 @@ public class TInsuranceUnpurchaseApply extends BaseEntity {
@Schema
(
description
=
"不购买人数"
)
@Schema
(
description
=
"不购买人数"
)
private
String
unbuyNum
;
private
String
unbuyNum
;
/**
* 创建时间 暂存不存创建时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
)
private
LocalDateTime
createTimeZc
;
@Schema
(
description
=
"明细数据集"
)
@Schema
(
description
=
"明细数据集"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
TInsuranceUnpurchasePersonAddVo
>
personList
;
private
List
<
TInsuranceUnpurchasePersonAddVo
>
personList
;
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TInsuranceUnpurchasePerson.java
View file @
ae228f97
...
@@ -87,6 +87,12 @@ public class TInsuranceUnpurchasePerson extends BaseEntity {
...
@@ -87,6 +87,12 @@ public class TInsuranceUnpurchasePerson extends BaseEntity {
@Schema
(
description
=
"申请状态 0 草稿 1待提交 2 待审核 3 审核通过 4 审核不通过"
)
@Schema
(
description
=
"申请状态 0 草稿 1待提交 2 待审核 3 审核通过 4 审核不通过"
)
private
String
status
;
private
String
status
;
/**
* 印章附件
*/
@TableField
(
exist
=
false
)
private
List
<
TSalaryAtta
>
attaInfoList
;
@Schema
(
description
=
"工资人员明细"
)
@Schema
(
description
=
"工资人员明细"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
TInsuranceUnpurchasePersonSalary
>
personInfoList
;
private
List
<
TInsuranceUnpurchasePersonSalary
>
personInfoList
;
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
View file @
ae228f97
...
@@ -506,6 +506,14 @@ public class TSalaryStandard extends BaseEntity {
...
@@ -506,6 +506,14 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty
(
"是否校验商险"
)
@ExcelProperty
(
"是否校验商险"
)
private
Integer
isCheckRisk
;
private
Integer
isCheckRisk
;
/**
* 校验商险通过的原因
*/
@ExcelAttribute
(
name
=
"校验商险通过的原因"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"校验商险通过的原因"
)
private
String
checkRiskRemark
;
/**
/**
* 工资月份-起
* 工资月份-起
*/
*/
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/config/WxConfig.java
View file @
ae228f97
...
@@ -124,11 +124,11 @@ public class WxConfig {
...
@@ -124,11 +124,11 @@ public class WxConfig {
HttpHeaders
headers
=
new
HttpHeaders
();
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON_UTF8
);
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON_UTF8
);
Gson
gson
=
new
Gson
();
Gson
gson
=
new
Gson
();
log
.
info
(
"发企业微信===请求:{}"
,
gson
.
toJson
(
requestMap
));
log
.
error
(
"发企业微信===请求:{}"
,
gson
.
toJson
(
requestMap
));
HttpEntity
<
String
>
requestEntity
=
new
HttpEntity
<>(
gson
.
toJson
(
requestMap
),
headers
);
HttpEntity
<
String
>
requestEntity
=
new
HttpEntity
<>(
gson
.
toJson
(
requestMap
),
headers
);
String
accessToken
=
getAccessToken
(
restTemplate
);
String
accessToken
=
getAccessToken
(
restTemplate
);
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
postForEntity
(
String
.
format
(
SecurityConstants
.
WX_SEND_MESSAGE
,
accessToken
),
requestEntity
,
String
.
class
);
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
postForEntity
(
String
.
format
(
SecurityConstants
.
WX_SEND_MESSAGE
,
accessToken
),
requestEntity
,
String
.
class
);
log
.
info
(
"发企业微信===返回:{}"
,
JSON
.
toJSONString
(
responseEntity
));
log
.
error
(
"发企业微信===返回:{}"
,
JSON
.
toJSONString
(
responseEntity
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
responseEntity
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
responseEntity
));
JSONObject
jsonBody
=
jsonObject
.
getJSONObject
(
"body"
);
JSONObject
jsonBody
=
jsonObject
.
getJSONObject
(
"body"
);
if
(
jsonBody
!=
null
)
{
if
(
jsonBody
!=
null
)
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TInsuranceUnpurchaseApplyController.java
View file @
ae228f97
...
@@ -145,23 +145,6 @@ public class TInsuranceUnpurchaseApplyController {
...
@@ -145,23 +145,6 @@ public class TInsuranceUnpurchaseApplyController {
return
R
.
ok
(
tInsuranceUnpurchaseApplyService
.
getAuditPage
(
page
,
unpurchaseApplySearchVo
,
userId
,
type
));
return
R
.
ok
(
tInsuranceUnpurchaseApplyService
.
getAuditPage
(
page
,
unpurchaseApplySearchVo
,
userId
,
type
));
}
}
/**
* 审核分页查询(小程序)
*
* @param page 分页对象
* @param unpurchaseApplySearchVo 不购买申请查询信息
* @param type 0待审核、1已处理、2抄送我
*
* @return R
*/
@Operation
(
description
=
"审核分页查询(小程序临时)"
)
@GetMapping
(
"/getAuditPageTemp"
)
public
R
<
IPage
<
TInsuranceUnpurchaseApply
>>
getAuditPageTemp
(
Page
<
TInsuranceUnpurchaseApply
>
page
,
TInsuranceUnpurchaseApplySearchVo
unpurchaseApplySearchVo
,
String
type
,
String
userId
)
{
return
R
.
ok
(
tInsuranceUnpurchaseApplyService
.
getAuditPage
(
page
,
unpurchaseApplySearchVo
,
userId
,
type
));
}
/**
/**
* 审核数量
* 审核数量
*
*
...
@@ -169,12 +152,12 @@ public class TInsuranceUnpurchaseApplyController {
...
@@ -169,12 +152,12 @@ public class TInsuranceUnpurchaseApplyController {
*/
*/
@Operation
(
description
=
"审核数量查询"
)
@Operation
(
description
=
"审核数量查询"
)
@GetMapping
(
"/getAuditCount"
)
@GetMapping
(
"/getAuditCount"
)
public
R
<
Map
<
String
,
Integer
>>
getAuditCount
(
String
userId
)
{
public
R
<
Map
<
String
,
Integer
>>
getAuditCount
()
{
//
YifuUser user = SecurityUtils.getUser();
YifuUser
user
=
SecurityUtils
.
getUser
();
//
if(null == user){
if
(
null
==
user
){
//
return R.failed(ResultConstants.NO_USER);
return
R
.
failed
(
ResultConstants
.
NO_USER
);
//
}
}
//
String userId = String.valueOf(user.getId());
String
userId
=
String
.
valueOf
(
user
.
getId
());
return
R
.
ok
(
tInsuranceUnpurchaseApplyService
.
getAuditCount
(
userId
));
return
R
.
ok
(
tInsuranceUnpurchaseApplyService
.
getAuditCount
(
userId
));
}
}
...
@@ -254,44 +237,4 @@ public class TInsuranceUnpurchaseApplyController {
...
@@ -254,44 +237,4 @@ public class TInsuranceUnpurchaseApplyController {
return
R
.
failed
(
ResultConstants
.
REQUEST_LOCK_FAIL
);
return
R
.
failed
(
ResultConstants
.
REQUEST_LOCK_FAIL
);
}
}
/**
* 审核(小程序临时)
* @param tAuditRecord 审批信息
* @return R<String>
**/
@Operation
(
description
=
"审核(小程序临时)"
)
@SysLog
(
"审核(小程序临时)"
)
@PostMapping
(
"/auditTemp"
)
public
R
<
String
>
auditTemp
(
@RequestBody
TAuditRecord
tAuditRecord
)
{
if
(
Common
.
isEmpty
(
tAuditRecord
.
getApprovalResult
()))
{
return
R
.
failed
(
"审核结果不能为空!"
);
}
if
(
Common
.
isNotNull
(
tAuditRecord
.
getApprovalOpinion
())
&&
tAuditRecord
.
getApprovalOpinion
().
length
()>
100
)
{
return
R
.
failed
(
"审核意见不能超过100个字"
);
}
if
(
Common
.
isEmpty
(
tAuditRecord
.
getDomainId
()))
{
return
R
.
failed
(
"id不能为空!"
);
}
// YifuUser user = SecurityUtils.getUser();
// if (Common.isEmpty(user)){
// return R.failed(CommonConstants.USER_FAIL);
// }
TInsuranceUnpurchaseApply
insuranceUnpurchaseApply
=
tInsuranceUnpurchaseApplyService
.
getById
(
tAuditRecord
.
getDomainId
());
if
(
Common
.
isEmpty
(
insuranceUnpurchaseApply
)){
return
R
.
failed
(
"该实体信息不存在!"
);
}
String
requestId
;
String
redisKey
=
CacheConstants
.
INSURANCEUNPURCHASE_PROCESS_CACHE
.
concat
(
tAuditRecord
.
getDomainId
());
try
{
requestId
=
RedisDistributedLock
.
tryLockAndTime
(
redisKey
,
"10"
);
}
catch
(
Exception
e
)
{
return
R
.
failed
(
ResultConstants
.
REQUEST_LOCK_FAIL
);
}
if
(
Common
.
isNotKong
(
requestId
))
{
return
R
.
ok
(
"审核完毕"
);
}
return
R
.
failed
(
ResultConstants
.
REQUEST_LOCK_FAIL
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TInsuranceUnpurchasePersonMapper.java
View file @
ae228f97
...
@@ -49,7 +49,7 @@ public interface TInsuranceUnpurchasePersonMapper extends BaseMapper<TInsuranceU
...
@@ -49,7 +49,7 @@ public interface TInsuranceUnpurchasePersonMapper extends BaseMapper<TInsuranceU
*/
*/
List
<
TInsuranceUnpurchasePersonAddVo
>
getTInsuranceUnpurchasePersonList
(
@Param
(
"id"
)
String
id
);
List
<
TInsuranceUnpurchasePersonAddVo
>
getTInsuranceUnpurchasePersonList
(
@Param
(
"id"
)
String
id
);
List
<
TInsuranceUnpurchasePerson
>
getBuyList
(
@Param
(
"dept
Id"
)
String
deptId
,
@Param
(
"idCardList"
)
List
<
String
>
idCardList
);
List
<
TInsuranceUnpurchasePerson
>
getBuyList
(
@Param
(
"dept
No"
)
String
deptNo
,
@Param
(
"idCardList"
)
List
<
String
>
idCardList
);
List
<
String
>
getSocialBuyList
();
List
<
String
>
getSocialBuyList
();
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TInsuranceUnpurchasePersonSalaryMapper.java
View file @
ae228f97
...
@@ -7,6 +7,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalar
...
@@ -7,6 +7,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalar
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* 含风险项目不购买申请明细表-薪资关联表
* 含风险项目不购买申请明细表-薪资关联表
*
*
...
@@ -24,9 +26,13 @@ public interface TInsuranceUnpurchasePersonSalaryMapper extends BaseMapper<TInsu
...
@@ -24,9 +26,13 @@ public interface TInsuranceUnpurchasePersonSalaryMapper extends BaseMapper<TInsu
IPage
<
TInsuranceUnpurchasePersonSalary
>
getTInsuranceUnpurchasePersonSalaryPage
(
Page
<
TInsuranceUnpurchasePersonSalary
>
page
IPage
<
TInsuranceUnpurchasePersonSalary
>
getTInsuranceUnpurchasePersonSalaryPage
(
Page
<
TInsuranceUnpurchasePersonSalary
>
page
,
@Param
(
"tInsuranceUnpurchasePersonSalary"
)
TInsuranceUnpurchasePersonSalary
tInsuranceUnpurchasePersonSalary
);
,
@Param
(
"tInsuranceUnpurchasePersonSalary"
)
TInsuranceUnpurchasePersonSalary
tInsuranceUnpurchasePersonSalary
);
// 查找薪资对用的人员表
List
<
String
>
getParentIdBySalaryId
(
@Param
(
"salaryId"
)
String
salaryId
);
// 删除关联项
// 删除关联项
void
deletePersonSalaryBySalaryId
(
@Param
(
"salaryId"
)
String
salaryId
);
void
deletePersonSalaryBySalaryId
(
@Param
(
"salaryId"
)
String
salaryId
);
// 更新次数-1
void
updatePersonSalaryNumBySalaryId
(
@Param
(
"salaryId"
)
String
salaryId
);
// 刷新次数
void
updatePersonSalaryNumByPersonIdList
(
@Param
(
"idList"
)
List
<
String
>
idList
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TInsuranceUnpurchasePersonSalaryService.java
View file @
ae228f97
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -5,6 +5,8 @@ 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.salary.entity.TInsuranceUnpurchasePersonSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalary
;
import
java.util.List
;
/**
/**
* 含风险项目不购买申请明细表-薪资关联
* 含风险项目不购买申请明细表-薪资关联
*
*
...
@@ -20,6 +22,22 @@ public interface TInsuranceUnpurchasePersonSalaryService extends IService<TInsur
...
@@ -20,6 +22,22 @@ public interface TInsuranceUnpurchasePersonSalaryService extends IService<TInsur
*/
*/
IPage
<
TInsuranceUnpurchasePersonSalary
>
getTInsuranceUnpurchasePersonSalaryPage
(
Page
<
TInsuranceUnpurchasePersonSalary
>
page
,
TInsuranceUnpurchasePersonSalary
tInsuranceUnpurchasePerson
);
IPage
<
TInsuranceUnpurchasePersonSalary
>
getTInsuranceUnpurchasePersonSalaryPage
(
Page
<
TInsuranceUnpurchasePersonSalary
>
page
,
TInsuranceUnpurchasePersonSalary
tInsuranceUnpurchasePerson
);
/**
* @param salaryId 工资id
* @Description: 删除并刷新次数
* @Author: hgw
* @Date: 2025/1/16 17:47
* @return: void
**/
void
deletePersonSalaryBySalaryId
(
String
salaryId
);
void
deletePersonSalaryBySalaryId
(
String
salaryId
);
/**
* @param parentIds 明细主表ids
* @Description: 刷新次数
* @Author: hgw
* @Date: 2025/1/16 17:47
* @return: void
**/
void
updatePersonSalaryNumByParentIds
(
List
<
String
>
parentIds
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TInsuranceUnpurchasePersonService.java
View file @
ae228f97
...
@@ -29,7 +29,7 @@ public interface TInsuranceUnpurchasePersonService extends IService<TInsuranceUn
...
@@ -29,7 +29,7 @@ public interface TInsuranceUnpurchasePersonService extends IService<TInsuranceUn
List
<
TInsuranceUnpurchasePersonAddVo
>
getTInsuranceUnpurchasePersonList
(
String
id
);
List
<
TInsuranceUnpurchasePersonAddVo
>
getTInsuranceUnpurchasePersonList
(
String
id
);
List
<
TInsuranceUnpurchasePerson
>
getBuyList
(
String
dept
Id
,
List
<
String
>
idCardList
);
List
<
TInsuranceUnpurchasePerson
>
getBuyList
(
String
dept
No
,
List
<
String
>
idCardList
);
/**
/**
* @param id 明细id
* @param id 明细id
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/AbastractAuditProcess.java
View file @
ae228f97
...
@@ -51,25 +51,25 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -51,25 +51,25 @@ public abstract class AbastractAuditProcess<T,E extends T> {
private
ProcessDaprUtils
processDaprUtils
;
private
ProcessDaprUtils
processDaprUtils
;
@Autowired
@Autowired
pr
ivate
UpmsDaprUtils
upmsDaprUtils
;
pr
otected
UpmsDaprUtils
upmsDaprUtils
;
/**
/**
* 审核成功并结束逻辑
* 审核成功并结束逻辑
* @param entity 业务实体
* @param entity 业务实体
* @param a
pproval
Record 审批记录
* @param a
udit
Record 审批记录
* @param loginUser 当前登录用户
* @param loginUser 当前登录用户
* @return R<String>
* @return R<String>
**/
**/
abstract
public
R
<
String
>
auditSuccess
(
T
entity
,
TAuditRecord
a
pproval
Record
,
YifuUser
loginUser
);
abstract
public
R
<
String
>
auditSuccess
(
T
entity
,
TAuditRecord
a
udit
Record
,
YifuUser
loginUser
);
/**
/**
* 审核成功并结束逻辑
* 审核成功并结束逻辑
* @param entity 业务实体
* @param entity 业务实体
* @param a
pproval
Record 审批记录
* @param a
udit
Record 审批记录
* @param remoteSysUserList 当前登录用户
* @param remoteSysUserList 当前登录用户
* @return R<String>
* @return R<String>
**/
**/
abstract
public
R
<
String
>
auditSuccessAndNex
(
T
entity
,
List
<
SysUser
>
remoteSysUserList
,
TAuditRecord
a
pproval
Record
);
abstract
public
R
<
String
>
auditSuccessAndNex
(
T
entity
,
List
<
SysUser
>
remoteSysUserList
,
TAuditRecord
a
udit
Record
);
/**
/**
* 审核不通过处理逻辑
* 审核不通过处理逻辑
...
@@ -116,7 +116,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -116,7 +116,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
* @return List<SysUser>
* @return List<SysUser>
**/
**/
private
List
<
SysUser
>
getAuditUseListByProcessNode
(
ProcessVo
processVo
,
TProcessNode
currentProcessNode
,
String
departId
,
String
entityId
,
String
auditType
,
private
List
<
SysUser
>
getAuditUseListByProcessNode
(
ProcessVo
processVo
,
TProcessNode
currentProcessNode
,
String
departId
,
String
entityId
,
String
auditType
,
T
entity
,
TAuditRecord
a
pproval
Record
)
{
T
entity
,
TAuditRecord
a
udit
Record
)
{
// 定义审批用户
// 定义审批用户
List
<
TNodePrimission
>
nodePrimissionList
=
null
;
List
<
TNodePrimission
>
nodePrimissionList
=
null
;
for
(
TProcessNode
processNode
:
processVo
.
getProcessNodeList
())
{
for
(
TProcessNode
processNode
:
processVo
.
getProcessNodeList
())
{
...
@@ -140,27 +140,23 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -140,27 +140,23 @@ public abstract class AbastractAuditProcess<T,E extends T> {
}
}
// 6指定事业部配置表
// 6指定事业部配置表
if
(
CommonConstants
.
SIX_INT
==
nodePrimission
.
getType
().
intValue
())
{
if
(
CommonConstants
.
SIX_INT
==
nodePrimission
.
getType
().
intValue
())
{
//
todo
根据事业部条线获取审批用户
// 根据事业部条线获取审批用户
sysUserList
=
this
.
getDivisionAuditUser
(
nodePrimission
,
entity
);
sysUserList
=
this
.
getDivisionAuditUser
(
nodePrimission
,
entity
);
}
}
if
(
Common
.
isEmpty
(
sysUserList
))
{
throw
new
CheckedException
(
"未找到审批用户,请联系管理员"
);
}
// 事业部条线没有审批人直接审核通过,配置了可以跳过
// 事业部条线没有审批人直接审核通过,配置了可以跳过
if
(
Common
.
isEmpty
(
sysUserList
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
nodePrimission
.
getIsPass
())){
// if(Common.isEmpty(sysUserList) && CommonConstants.ONE_STRING.equals(nodePrimission.getIsPass())){
// 标记节点可以跳过
//// // 标记节点可以跳过
isPass
=
CommonConstants
.
ONE_INT
;
//// isPass = CommonConstants.ONE_INT;
// todo 系统自动给当前节点完成审核,将审核通过
//// // 系统自动给当前节点完成审核,将审核通过
//sysAutoAudit(sysUserTprocessNode,entity,processVo);
//// sysAutoAudit(processVo,currentProcessNode,departId,auditType,entityId,entity);
}
else
{
//// } else {
if
(
Common
.
isEmpty
(
sysUserList
))
{
if
(
Common
.
isEmpty
(
sysUserList
))
{
throw
new
CheckedException
(
"未找到审批用户"
);
throw
new
CheckedException
(
"未找到审批用户"
);
}
}
// 微信审批通知发送
// 微信审批通知发送
// todo 发送审批消息
sendMessage
(
sysUserList
,
entity
,
CommonConstants
.
ONE_STRING
,
auditRecord
);
sendMessage
(
sysUserList
,
entity
,
CommonConstants
.
ONE_STRING
,
approvalRecord
);
for
(
SysUser
sysUser
:
sysUserList
)
{
for
(
SysUser
sysUser
:
sysUserList
)
{
// 新增指派审核流程记录
// 新增指派审核流程记录
TAuditRecord
newEntity
=
new
TAuditRecord
();
TAuditRecord
newEntity
=
new
TAuditRecord
();
...
@@ -191,7 +187,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -191,7 +187,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
auditRecordService
.
save
(
newEntity
);
auditRecordService
.
save
(
newEntity
);
}
}
}
//
}
}
}
// 事业部条线没有审批人直接审核通过,配置了可以跳过
// 事业部条线没有审批人直接审核通过,配置了可以跳过
...
@@ -274,7 +270,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -274,7 +270,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
/**
/**
* 审核并提交下一个节点:获取下一个审核人
* 审核并提交下一个节点:获取下一个审核人
* @param
i
d 实体id
* @param
entityI
d 实体id
* @param approvalResult 审核标识 0审核通过 其他审核不通过
* @param approvalResult 审核标识 0审核通过 其他审核不通过
* @param approvalOpinion 审核意见
* @param approvalOpinion 审核意见
* @param loginUser 当前登录人
* @param loginUser 当前登录人
...
@@ -282,12 +278,12 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -282,12 +278,12 @@ public abstract class AbastractAuditProcess<T,E extends T> {
* @param entity 实体类:用于审核通过逻辑
* @param entity 实体类:用于审核通过逻辑
* @return R<String>
* @return R<String>
**/
**/
public
R
<
String
>
auditUserList
(
String
i
d
,
String
approvalResult
,
String
approvalOpinion
,
YifuUser
loginUser
,
public
R
<
String
>
auditUserList
(
String
entityI
d
,
String
approvalResult
,
String
approvalOpinion
,
YifuUser
loginUser
,
String
auditType
,
T
entity
,
String
departId
)
{
String
auditType
,
T
entity
,
String
departId
)
{
String
loginUserId
=
loginUser
.
getId
();
String
loginUserId
=
loginUser
.
getId
();
// 判断当前审核是否为最新待审核记录
// 判断当前审核是否为最新待审核记录
List
<
TAuditRecord
>
auditRecordList
=
auditRecordService
.
list
List
<
TAuditRecord
>
auditRecordList
=
auditRecordService
.
list
(
Wrappers
.<
TAuditRecord
>
query
().
lambda
().
eq
(
TAuditRecord:
:
getDomainId
,
i
d
)
(
Wrappers
.<
TAuditRecord
>
query
().
lambda
().
eq
(
TAuditRecord:
:
getDomainId
,
entityI
d
)
.
eq
(
TAuditRecord:
:
getAuditType
,
auditType
)
.
eq
(
TAuditRecord:
:
getAuditType
,
auditType
)
.
eq
(
TAuditRecord:
:
getDeleteFlag
,
CommonConstants
.
NOT_DELETE_FLAG
)
.
eq
(
TAuditRecord:
:
getDeleteFlag
,
CommonConstants
.
NOT_DELETE_FLAG
)
.
eq
(
TAuditRecord:
:
getApprovalResult
,
CommonConstants
.
TWO_STRING
)
.
eq
(
TAuditRecord:
:
getApprovalResult
,
CommonConstants
.
TWO_STRING
)
...
@@ -304,7 +300,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -304,7 +300,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
auditRecordService
.
updateById
(
auditRecord
);
auditRecordService
.
updateById
(
auditRecord
);
// 移除同一个节点的另外审批人。多个节点一个人审批就够了,其他都移除
// 移除同一个节点的另外审批人。多个节点一个人审批就够了,其他都移除
auditRecordService
.
remove
(
Wrappers
.<
TAuditRecord
>
query
().
lambda
()
auditRecordService
.
remove
(
Wrappers
.<
TAuditRecord
>
query
().
lambda
()
.
eq
(
TAuditRecord:
:
getDomainId
,
i
d
)
.
eq
(
TAuditRecord:
:
getDomainId
,
entityI
d
)
.
eq
(
TAuditRecord:
:
getAuditType
,
auditType
)
.
eq
(
TAuditRecord:
:
getAuditType
,
auditType
)
.
isNull
(
TAuditRecord:
:
getApprovalTime
));
.
isNull
(
TAuditRecord:
:
getApprovalTime
));
...
@@ -313,7 +309,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -313,7 +309,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
// 获取流程,并判断是否是最后一个节点
// 获取流程,并判断是否是最后一个节点
// 获取流程的主流程
// 获取流程的主流程
TAuditNodeProcess
auditNodeProocess
=
auditNodeProcessService
.
getOne
(
Wrappers
.<
TAuditNodeProcess
>
query
().
lambda
()
TAuditNodeProcess
auditNodeProocess
=
auditNodeProcessService
.
getOne
(
Wrappers
.<
TAuditNodeProcess
>
query
().
lambda
()
.
eq
(
TAuditNodeProcess:
:
getDomainId
,
i
d
)
.
eq
(
TAuditNodeProcess:
:
getDomainId
,
entityI
d
)
.
eq
(
TAuditNodeProcess:
:
getType
,
auditType
)
.
eq
(
TAuditNodeProcess:
:
getType
,
auditType
)
.
eq
(
TAuditNodeProcess:
:
getMainType
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TAuditNodeProcess:
:
getMainType
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TAuditNodeProcess:
:
getDeleteFlag
,
CommonConstants
.
NOT_DELETE_FLAG
)
.
eq
(
TAuditNodeProcess:
:
getDeleteFlag
,
CommonConstants
.
NOT_DELETE_FLAG
)
...
@@ -338,12 +334,12 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -338,12 +334,12 @@ public abstract class AbastractAuditProcess<T,E extends T> {
return
auditSuccess
(
entity
,
auditRecord
,
loginUser
);
return
auditSuccess
(
entity
,
auditRecord
,
loginUser
);
}
else
{
}
else
{
TProcessNode
currentProcessNode
=
ProcessAuditUtil
.
getCurrentProcessNode
(
processVo
,
auditRecord
.
getNodeId
());
TProcessNode
currentProcessNode
=
ProcessAuditUtil
.
getCurrentProcessNode
(
processVo
,
auditRecord
.
getNodeId
());
TProcessNode
nextProcessNode
=
getNextNode
(
processVo
,
currentProcessNode
.
getLogoTitle
(),
i
d
,
auditType
,
entity
,
loginUser
);
TProcessNode
nextProcessNode
=
getNextNode
(
processVo
,
currentProcessNode
.
getLogoTitle
(),
entityI
d
,
auditType
,
entity
,
loginUser
);
if
(
nextProcessNode
==
null
)
{
if
(
nextProcessNode
==
null
)
{
throw
new
CheckedException
(
NEXT_AUDIT_NODE_NOT_FOUND
);
throw
new
CheckedException
(
NEXT_AUDIT_NODE_NOT_FOUND
);
}
}
auditNodeProocess
=
auditNodeProcessService
.
getOne
(
Wrappers
.<
TAuditNodeProcess
>
query
().
lambda
()
auditNodeProocess
=
auditNodeProcessService
.
getOne
(
Wrappers
.<
TAuditNodeProcess
>
query
().
lambda
()
.
eq
(
TAuditNodeProcess:
:
getDomainId
,
i
d
)
.
eq
(
TAuditNodeProcess:
:
getDomainId
,
entityI
d
)
.
eq
(
TAuditNodeProcess:
:
getType
,
auditType
)
.
eq
(
TAuditNodeProcess:
:
getType
,
auditType
)
.
eq
(
TAuditNodeProcess:
:
getMainType
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TAuditNodeProcess:
:
getMainType
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TAuditNodeProcess:
:
getDeleteFlag
,
CommonConstants
.
NOT_DELETE_FLAG
)
.
eq
(
TAuditNodeProcess:
:
getDeleteFlag
,
CommonConstants
.
NOT_DELETE_FLAG
)
...
@@ -356,7 +352,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -356,7 +352,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
return
auditSuccess
(
entity
,
auditRecord
,
loginUser
);
return
auditSuccess
(
entity
,
auditRecord
,
loginUser
);
}
}
// 获取审批用户
// 获取审批用户
List
<
SysUser
>
remoteSysUserList
=
getAuditUseListByProcessNode
(
processVo
,
nextProcessNode
,
departId
,
i
d
,
auditType
,
entity
,
auditRecord
);
List
<
SysUser
>
remoteSysUserList
=
getAuditUseListByProcessNode
(
processVo
,
nextProcessNode
,
departId
,
entityI
d
,
auditType
,
entity
,
auditRecord
);
if
(
Common
.
isEmpty
(
remoteSysUserList
))
{
if
(
Common
.
isEmpty
(
remoteSysUserList
))
{
throw
new
CheckedException
(
NEXT_NODE_USER_NULL
);
throw
new
CheckedException
(
NEXT_NODE_USER_NULL
);
}
}
...
@@ -573,9 +569,9 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -573,9 +569,9 @@ public abstract class AbastractAuditProcess<T,E extends T> {
}
}
/**
/**
* 获取
crm
部门审核人
* 获取部门审核人
* @param nodePrimission
* @param nodePrimission
审批角色
* @param departId
* @param departId
部门ID
* @return List<SysUser>
* @return List<SysUser>
**/
**/
private
List
<
SysUser
>
getDepartAuditUser
(
TNodePrimission
nodePrimission
,
String
departId
)
{
private
List
<
SysUser
>
getDepartAuditUser
(
TNodePrimission
nodePrimission
,
String
departId
)
{
...
@@ -605,4 +601,80 @@ public abstract class AbastractAuditProcess<T,E extends T> {
...
@@ -605,4 +601,80 @@ public abstract class AbastractAuditProcess<T,E extends T> {
}
}
return
remoteSysUserList
;
return
remoteSysUserList
;
}
}
/**
* 系统自动审核
* @param entityId 实体id
* @param auditType 审核类型 0不购买商险审核
* @param entity 实体类:用于审核通过逻辑
* @return R<String>
**/
private
void
sysAutoAudit
(
ProcessVo
processVo
,
TProcessNode
currentProcessNode
,
String
departId
,
String
auditType
,
String
entityId
,
T
entity
)
{
// 新增自动审核通过记录
TAuditRecord
newEntity
=
new
TAuditRecord
();
newEntity
.
setDomainId
(
entityId
);
newEntity
.
setFlowId
(
currentProcessNode
.
getProcessId
());
newEntity
.
setNodeId
(
currentProcessNode
.
getId
());
newEntity
.
setApprovalMan
(
CommonConstants
.
ONE_STRING
);
newEntity
.
setApprovalManName
(
"系统"
);
newEntity
.
setApprovalOpinion
(
"审核人为空,默认审核通过"
);
newEntity
.
setDeleteFlag
(
CommonConstants
.
NOT_DELETE_FLAG
);
newEntity
.
setPreFlag
(
CommonConstants
.
ONE_STRING
);
newEntity
.
setApprovalResult
(
CommonConstants
.
ZERO_STRING
);
newEntity
.
setNodeName
(
currentProcessNode
.
getName
());
// 获取提交人信息
TAuditRecord
tAuditRecord
=
auditRecordService
.
getOne
(
Wrappers
.<
TAuditRecord
>
query
().
lambda
()
.
eq
(
TAuditRecord:
:
getDomainId
,
entityId
)
.
eq
(
TAuditRecord:
:
getAuditType
,
auditType
)
.
eq
(
TAuditRecord:
:
getPreFlag
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TAuditRecord:
:
getApprovalResult
,
CommonConstants
.
THREE_STRING
)
.
orderByDesc
(
TAuditRecord:
:
getId
).
last
(
CommonConstants
.
SQL_LIMIT_ONE
));
if
(
Common
.
isNotNull
(
tAuditRecord
))
{
newEntity
.
setSubmitMan
(
tAuditRecord
.
getSubmitMan
());
newEntity
.
setSubmitManName
(
tAuditRecord
.
getSubmitManName
());
newEntity
.
setSubmitCreateTime
(
tAuditRecord
.
getSubmitCreateTime
());
newEntity
.
setReason
(
tAuditRecord
.
getReason
());
newEntity
.
setEntityName
(
tAuditRecord
.
getEntityName
());
newEntity
.
setAuditType
(
tAuditRecord
.
getAuditType
());
}
newEntity
.
setCreateTime
(
LocalDateTime
.
now
());
auditRecordService
.
save
(
newEntity
);
// 获取流程配置信息
TProcessNode
endProcessNode
=
ProcessAuditUtil
.
getEndProcessNode
(
processVo
);
if
(
endProcessNode
==
null
)
{
log
.
error
(
"系统自动审核,未获取到结束节点"
);
return
;
}
TProcessNode
preEndProcessNode
=
ProcessAuditUtil
.
getPreEndTProcessNode
(
processVo
,
endProcessNode
);
if
(
preEndProcessNode
==
null
)
{
log
.
error
(
"系统自动审核,未找到结束节点前一个节点"
);
return
;
}
// 当前是结束节点前的一个节点
if
(
StringUtils
.
equals
(
preEndProcessNode
.
getId
(),
newEntity
.
getNodeId
()))
{
// 直接最终审核通过
auditSuccess
(
entity
,
newEntity
,
null
);
}
else
{
TProcessNode
nextProcessNode
=
getNextNode
(
processVo
,
currentProcessNode
.
getLogoTitle
(),
entityId
,
auditType
,
entity
,
null
);
if
(
nextProcessNode
==
null
)
{
throw
new
CheckedException
(
NEXT_AUDIT_NODE_NOT_FOUND
);
}
// 如果返回的是end节点:判断是不是返回的是不是主流程结束节点
if
(
StringUtils
.
equals
(
ProcessConstants
.
PROCESS_NODE_END
,
nextProcessNode
.
getType
())
&&
StringUtils
.
equals
(
currentProcessNode
.
getProcessId
(),
nextProcessNode
.
getProcessId
()))
{
// 直接最终审核通过
auditSuccess
(
entity
,
newEntity
,
null
);
}
// 获取下个审批用户
List
<
SysUser
>
remoteSysUserList
=
getAuditUseListByProcessNode
(
processVo
,
nextProcessNode
,
departId
,
entityId
,
auditType
,
entity
,
newEntity
);
if
(
Common
.
isEmpty
(
remoteSysUserList
))
{
throw
new
CheckedException
(
NEXT_NODE_USER_NULL
);
}
// // 流程中的审核结束,继续下一个节点
// auditSuccessAndNex(entity, remoteSysUserList, newEntity);
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TInsuranceUnpurchaseApplyServiceImpl.java
View file @
ae228f97
...
@@ -3,14 +3,12 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
...
@@ -3,14 +3,12 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.lock.annotation.Lock4j
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
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
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException
;
...
@@ -37,9 +35,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonCardVo;
...
@@ -37,9 +35,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonCardVo;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.support.SimpleValueWrapper
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -73,8 +68,6 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -73,8 +68,6 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
@Resource
@Resource
private
ArchivesDaprUtil
archivesDaprUtil
;
private
ArchivesDaprUtil
archivesDaprUtil
;
@Resource
@Resource
private
CacheManager
cacheManager
;
@Resource
private
TSalaryAttaService
tSalaryAttaService
;
private
TSalaryAttaService
tSalaryAttaService
;
@Resource
@Resource
private
OSSUtil
ossUtil
;
private
OSSUtil
ossUtil
;
...
@@ -124,11 +117,12 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -124,11 +117,12 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TInsuranceUnpurchaseApplyVo
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TInsuranceUnpurchaseApplyVo
.
class
).
build
();
int
index
=
0
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
_NEW
)
{
// 获取实际记录
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
_NEW
);
list
=
baseMapper
.
getTInsuranceUnpurchaseApplyExportList
(
searchVo
);
list
=
baseMapper
.
getTInsuranceUnpurchaseApplyExportList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"含风险项目不购买申请表"
+
index
).
build
();
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"含风险项目不购买申请表"
+
index
).
build
();
...
@@ -164,25 +158,8 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -164,25 +158,8 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
String
applyNo
=
getCode
();
String
applyNo
=
getCode
();
//获取明细当日最大申请编号
//获取明细当日最大申请编号
String
applyDetail
=
baseMapper
.
getMaxInusuranceDetailCode
();
String
applyDetail
=
baseMapper
.
getMaxInusuranceDetailCode
();
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
if
(
Common
.
isNotNull
(
tInsuranceUnpurchaseApply
.
getDeptNo
()))
{
List
<
String
>
deptList
=
CommonConstants
.
deptList
;
tInsuranceUnpurchaseApply
.
setCompanyFlag
(
deptList
.
stream
().
noneMatch
(
e
->
e
.
equals
(
user
.
getDeptName
()))
?
CommonConstants
.
ZERO_STRING
:
CommonConstants
.
ONE_STRING
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tInsuranceUnpurchaseApply
.
getReasonType
()))
{
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TInsuranceUnpurchaseApply
>
query
().
lambda
()
.
eq
(
TInsuranceUnpurchaseApply:
:
getDeptNo
,
tInsuranceUnpurchaseApply
.
getDeptNo
())
.
eq
(
TInsuranceUnpurchaseApply:
:
getReasonType
,
tInsuranceUnpurchaseApply
.
getReasonType
())
.
eq
(
TInsuranceUnpurchaseApply:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
tInsuranceUnpurchaseApply
.
setAuditFlag
(
count
>
0
?
CommonConstants
.
ZERO_STRING
:
CommonConstants
.
ONE_STRING
);
tInsuranceUnpurchaseApply
.
setStatus
(
count
>
0
?
CommonConstants
.
THREE_STRING
:
tInsuranceUnpurchaseApply
.
getStatus
());
}
}
//暂存不做校验
//暂存不做校验
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tInsuranceUnpurchaseApply
.
getSaveFlag
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tInsuranceUnpurchaseApply
.
getSaveFlag
()))
{
tInsuranceUnpurchaseApply
.
setCreateTime
(
null
);
tInsuranceUnpurchaseApply
.
setUpdateTime
(
null
);
if
(
Common
.
isEmpty
(
tInsuranceUnpurchaseApply
.
getId
()))
{
if
(
Common
.
isEmpty
(
tInsuranceUnpurchaseApply
.
getId
()))
{
tInsuranceUnpurchaseApply
.
setApplyNo
(
applyNo
);
tInsuranceUnpurchaseApply
.
setApplyNo
(
applyNo
);
tInsuranceUnpurchaseApply
.
setCreateBy
(
user
.
getId
());
tInsuranceUnpurchaseApply
.
setCreateBy
(
user
.
getId
());
...
@@ -221,9 +198,13 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -221,9 +198,13 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
if
(
Common
.
isNotNull
(
personList
)
&&
!
personList
.
isEmpty
()
&&
if
(
Common
.
isNotNull
(
personList
)
&&
!
personList
.
isEmpty
()
&&
personList
.
stream
().
noneMatch
(
e
->
CommonConstants
.
ONE_STRING
.
equals
(
e
.
getCode
())))
{
personList
.
stream
().
noneMatch
(
e
->
CommonConstants
.
ONE_STRING
.
equals
(
e
.
getCode
())))
{
tInsuranceUnpurchaseApply
.
setUnbuyNum
(
String
.
valueOf
(
personList
.
size
()));
tInsuranceUnpurchaseApply
.
setUnbuyNum
(
String
.
valueOf
(
personList
.
size
()));
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
setValue
(
tInsuranceUnpurchaseApply
,
user
);
if
(
Common
.
isNotNull
(
tInsuranceUnpurchaseApply
.
getId
()))
{
if
(
Common
.
isNotNull
(
tInsuranceUnpurchaseApply
.
getId
()))
{
//同倩倩确认申请时间实时更新
if
(
Common
.
isEmpty
(
tInsuranceUnpurchaseApply
.
getApplyNo
()))
{
tInsuranceUnpurchaseApply
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceUnpurchaseApply
.
setApplyNo
(
applyNo
);
}
tInsuranceUnpurchaseApply
.
setCreateTimeZc
(
LocalDateTime
.
now
());
baseMapper
.
updateById
(
tInsuranceUnpurchaseApply
);
baseMapper
.
updateById
(
tInsuranceUnpurchaseApply
);
//更新附件
//更新附件
updateFileId
(
tInsuranceUnpurchaseApply
);
updateFileId
(
tInsuranceUnpurchaseApply
);
...
@@ -237,11 +218,13 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -237,11 +218,13 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
person
.
setEmpName
(
vo
.
getEmpName
());
person
.
setEmpName
(
vo
.
getEmpName
());
person
.
setPost
(
vo
.
getPost
());
person
.
setPost
(
vo
.
getPost
());
person
.
setApplyNoDetail
(
getDetailCode
(
applyDetail
,
vo
.
getRowIndex
()));
person
.
setApplyNoDetail
(
getDetailCode
(
applyDetail
,
vo
.
getRowIndex
()));
person
.
setCreateTime
(
tInsuranceUnpurchaseApply
.
getCreateTimeZc
());
initValue
(
tInsuranceUnpurchaseApply
,
person
);
initValue
(
tInsuranceUnpurchaseApply
,
person
);
personInfoList
.
add
(
person
);
personInfoList
.
add
(
person
);
}
}
personService
.
saveBatch
(
personInfoList
);
personService
.
saveBatch
(
personInfoList
);
}
else
{
}
else
{
tInsuranceUnpurchaseApply
.
setCreateTimeZc
(
LocalDateTime
.
now
());
tInsuranceUnpurchaseApply
.
setCreateBy
(
user
.
getId
());
tInsuranceUnpurchaseApply
.
setCreateBy
(
user
.
getId
());
tInsuranceUnpurchaseApply
.
setCreateName
(
user
.
getNickname
());
tInsuranceUnpurchaseApply
.
setCreateName
(
user
.
getNickname
());
tInsuranceUnpurchaseApply
.
setCreateUserDeptName
(
user
.
getDeptName
());
tInsuranceUnpurchaseApply
.
setCreateUserDeptName
(
user
.
getDeptName
());
...
@@ -257,6 +240,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -257,6 +240,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
person
.
setEmpName
(
vo
.
getEmpName
());
person
.
setEmpName
(
vo
.
getEmpName
());
person
.
setPost
(
vo
.
getPost
());
person
.
setPost
(
vo
.
getPost
());
person
.
setApplyNoDetail
(
getDetailCode
(
applyDetail
,
vo
.
getRowIndex
()));
person
.
setApplyNoDetail
(
getDetailCode
(
applyDetail
,
vo
.
getRowIndex
()));
person
.
setCreateTime
(
tInsuranceUnpurchaseApply
.
getCreateTimeZc
());
initValue
(
tInsuranceUnpurchaseApply
,
person
);
initValue
(
tInsuranceUnpurchaseApply
,
person
);
personInfoList
.
add
(
person
);
personInfoList
.
add
(
person
);
}
}
...
@@ -358,15 +342,34 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -358,15 +342,34 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
return
personList
;
return
personList
;
}
}
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
private
void
setValue
(
TInsuranceUnpurchaseApply
tInsuranceUnpurchaseApply
,
YifuUser
user
)
{
if
(
Common
.
isNotNull
(
tInsuranceUnpurchaseApply
.
getDeptNo
()))
{
List
<
String
>
deptList
=
CommonConstants
.
deptList
;
tInsuranceUnpurchaseApply
.
setCompanyFlag
(
deptList
.
stream
().
noneMatch
(
e
->
e
.
equals
(
user
.
getDeptName
()))
?
CommonConstants
.
ONE_STRING
:
CommonConstants
.
ZERO_STRING
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tInsuranceUnpurchaseApply
.
getReasonType
()))
{
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TInsuranceUnpurchaseApply
>
query
().
lambda
()
.
eq
(
TInsuranceUnpurchaseApply:
:
getDeptNo
,
tInsuranceUnpurchaseApply
.
getDeptNo
())
.
eq
(
TInsuranceUnpurchaseApply:
:
getReasonType
,
tInsuranceUnpurchaseApply
.
getReasonType
())
.
eq
(
TInsuranceUnpurchaseApply:
:
getStatus
,
CommonConstants
.
THREE_STRING
)
.
eq
(
TInsuranceUnpurchaseApply:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
tInsuranceUnpurchaseApply
.
setAuditFlag
(
count
>
0
?
CommonConstants
.
ZERO_STRING
:
CommonConstants
.
ONE_STRING
);
tInsuranceUnpurchaseApply
.
setStatus
(
count
>
0
?
CommonConstants
.
THREE_STRING
:
tInsuranceUnpurchaseApply
.
getStatus
());
}
}
}
private
void
initValue
(
TInsuranceUnpurchaseApply
tInsuranceUnpurchaseApply
,
TInsuranceUnpurchasePerson
person
)
{
private
void
initValue
(
TInsuranceUnpurchaseApply
tInsuranceUnpurchaseApply
,
TInsuranceUnpurchasePerson
person
)
{
person
.
setParnetId
(
tInsuranceUnpurchaseApply
.
getId
());
person
.
setParnetId
(
tInsuranceUnpurchaseApply
.
getId
());
person
.
setApplyNo
(
tInsuranceUnpurchaseApply
.
getApplyNo
());
person
.
setApplyNo
(
tInsuranceUnpurchaseApply
.
getApplyNo
());
person
.
setDeptId
(
tInsuranceUnpurchaseApply
.
getDeptId
());
person
.
setDeptId
(
tInsuranceUnpurchaseApply
.
getDeptId
());
person
.
setDeptNo
(
tInsuranceUnpurchaseApply
.
getDeptNo
());
person
.
setDeptNo
(
tInsuranceUnpurchaseApply
.
getDeptNo
());
person
.
setDeptName
(
tInsuranceUnpurchaseApply
.
getDeptName
());
person
.
setDivision
(
tInsuranceUnpurchaseApply
.
getDivision
());
person
.
setDivision
(
tInsuranceUnpurchaseApply
.
getDivision
());
person
.
setNewLine
(
tInsuranceUnpurchaseApply
.
getNewLine
());
person
.
setNewLine
(
tInsuranceUnpurchaseApply
.
getNewLine
());
person
.
setReasonType
(
tInsuranceUnpurchaseApply
.
getReasonType
());
person
.
setReasonType
(
tInsuranceUnpurchaseApply
.
getReasonType
());
person
.
setHasContainRisks
(
tInsuranceUnpurchaseApply
.
get
ReasonInfo
());
person
.
setHasContainRisks
(
tInsuranceUnpurchaseApply
.
get
HasContainRisks
());
person
.
setReasonInfo
(
tInsuranceUnpurchaseApply
.
getReasonInfo
());
person
.
setReasonInfo
(
tInsuranceUnpurchaseApply
.
getReasonInfo
());
person
.
setCreateBy
(
tInsuranceUnpurchaseApply
.
getCreateBy
());
person
.
setCreateBy
(
tInsuranceUnpurchaseApply
.
getCreateBy
());
person
.
setCreateName
(
tInsuranceUnpurchaseApply
.
getCreateName
());
person
.
setCreateName
(
tInsuranceUnpurchaseApply
.
getCreateName
());
...
@@ -391,17 +394,9 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -391,17 +394,9 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
}
}
//获取申请编码
//获取申请编码
@Lock4j
(
expire
=
60000
,
acquireTimeout
=
1000
)
public
String
getCode
()
{
public
String
getCode
()
{
String
nowDay
=
DateUtil
.
getThisDay
();
String
nowDay
=
DateUtil
.
getThisDay
();
Cache
cache
=
cacheManager
.
getCache
(
CacheConstants
.
EVERYDAY_UNBUY_CODE
);
assert
cache
!=
null
;
Object
nowNumObj
=
cache
.
get
(
nowDay
);
int
nowNums
=
1
;
int
nowNums
=
1
;
if
(
Common
.
isNotNull
(
nowNumObj
))
{
SimpleValueWrapper
value
=
(
SimpleValueWrapper
)
nowNumObj
;
nowNums
=
(
Integer
)
value
.
get
()
+
1
;
}
else
{
String
empCode
=
null
;
String
empCode
=
null
;
try
{
try
{
empCode
=
baseMapper
.
getMaxInusuranceCode
();
empCode
=
baseMapper
.
getMaxInusuranceCode
();
...
@@ -409,8 +404,6 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -409,8 +404,6 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
}
catch
(
NumberFormatException
e
)
{
}
catch
(
NumberFormatException
e
)
{
log
.
error
(
"获取含风险项目不购买商险申请时出错:"
+
empCode
);
log
.
error
(
"获取含风险项目不购买商险申请时出错:"
+
empCode
);
}
}
}
cache
.
put
(
nowDay
,
nowNums
);
return
"SXBGM"
+
nowDay
+
this
.
getThreeNum
(
String
.
valueOf
(
nowNums
));
return
"SXBGM"
+
nowDay
+
this
.
getThreeNum
(
String
.
valueOf
(
nowNums
));
}
}
...
@@ -532,7 +525,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -532,7 +525,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
if
(
Common
.
isEmpty
(
entity
.
getCreateUserDeptId
())){
if
(
Common
.
isEmpty
(
entity
.
getCreateUserDeptId
())){
return
R
.
failed
(
"申请人所属部门id不能为空"
);
return
R
.
failed
(
"申请人所属部门id不能为空"
);
}
}
// 传:流程类型 1不购买商险申请;审核类型 0不购买商险审核
//
todo
传:流程类型 1不购买商险申请;审核类型 0不购买商险审核
R
<
List
<
SysUser
>>
auditUserListR
=
tInsuranceUnpurchaseApplyAuditProcess
.
getAuditUserList
(
id
,
user
,
entity
.
getCreateUserDeptId
(),
R
<
List
<
SysUser
>>
auditUserListR
=
tInsuranceUnpurchaseApplyAuditProcess
.
getAuditUserList
(
id
,
user
,
entity
.
getCreateUserDeptId
(),
CommonConstants
.
ONE_STRING
,
CommonConstants
.
ZERO_STRING
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
ZERO_STRING
,
""
,
entity
.
getApplyNo
(),
entity
,
TInsuranceUnpurchaseApply
.
class
);
""
,
entity
.
getApplyNo
(),
entity
,
TInsuranceUnpurchaseApply
.
class
);
...
@@ -566,5 +559,4 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
...
@@ -566,5 +559,4 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
return
tInsuranceUnpurchaseApplyAuditProcess
.
auditUserList
(
insuranceUnpurchaseApply
.
getId
(),
approvalResult
,
approvalOpinion
,
user
,
CommonConstants
.
ZERO_STRING
,
return
tInsuranceUnpurchaseApplyAuditProcess
.
auditUserList
(
insuranceUnpurchaseApply
.
getId
(),
approvalResult
,
approvalOpinion
,
user
,
CommonConstants
.
ZERO_STRING
,
insuranceUnpurchaseApply
,
insuranceUnpurchaseApply
.
getCreateUserDeptId
());
insuranceUnpurchaseApply
,
insuranceUnpurchaseApply
.
getCreateUserDeptId
());
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TInsuranceUnpurchasePersonSalaryServiceImpl.java
View file @
ae228f97
...
@@ -9,6 +9,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonSala
...
@@ -9,6 +9,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonSala
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* 含风险项目不购买申请明细表
* 含风险项目不购买申请明细表
*
*
...
@@ -39,8 +41,19 @@ public class TInsuranceUnpurchasePersonSalaryServiceImpl extends ServiceImpl<TIn
...
@@ -39,8 +41,19 @@ public class TInsuranceUnpurchasePersonSalaryServiceImpl extends ServiceImpl<TIn
**/
**/
@Override
@Override
public
void
deletePersonSalaryBySalaryId
(
String
salaryId
)
{
public
void
deletePersonSalaryBySalaryId
(
String
salaryId
)
{
List
<
String
>
parentIds
=
baseMapper
.
getParentIdBySalaryId
(
salaryId
);
// 后刷新次数
if
(
parentIds
!=
null
&&
!
parentIds
.
isEmpty
())
{
// 先删除
baseMapper
.
deletePersonSalaryBySalaryId
(
salaryId
);
baseMapper
.
deletePersonSalaryBySalaryId
(
salaryId
);
baseMapper
.
updatePersonSalaryNumBySalaryId
(
salaryId
);
baseMapper
.
updatePersonSalaryNumByPersonIdList
(
parentIds
);
}
}
@Override
public
void
updatePersonSalaryNumByParentIds
(
List
<
String
>
parentIds
)
{
// 刷新次数
baseMapper
.
updatePersonSalaryNumByPersonIdList
(
parentIds
);
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TInsuranceUnpurchasePersonServiceImpl.java
View file @
ae228f97
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -10,20 +11,26 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -10,20 +11,26 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
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.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
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.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePerson
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePerson
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TInsuranceUnpurchasePersonMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TInsuranceUnpurchasePersonMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TInsuranceUnpurchasePersonSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TInsuranceUnpurchasePersonSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAttaService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.*
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -44,6 +51,11 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
...
@@ -44,6 +51,11 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
private
SocialDaprUtils
socialDaprUtil
;
private
SocialDaprUtils
socialDaprUtil
;
@Resource
@Resource
TInsuranceUnpurchasePersonSalaryMapper
salaryMapper
;
TInsuranceUnpurchasePersonSalaryMapper
salaryMapper
;
@Resource
@Lazy
private
TSalaryAttaService
tSalaryAttaService
;
@Resource
private
OSSUtil
ossUtil
;
/**
/**
* 含风险项目不购买申请明细表简单分页查询
* 含风险项目不购买申请明细表简单分页查询
...
@@ -74,20 +86,24 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
...
@@ -74,20 +86,24 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TInsuranceUnpurchasePersonVo
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TInsuranceUnpurchasePersonVo
.
class
).
build
();
int
index
=
0
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
if
(
count
>
CommonConstants
.
ZERO_INT
){
for
(
int
i
=
0
;
i
<=
count
;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
if
(
count
>
CommonConstants
.
EXCEL_EXPORT_LIMIT_NEW
)
{
exportError
(
response
,
"数据超过2万条,请联系管理员后端导出"
);
}
else
{
for
(
int
i
=
0
;
i
<=
count
;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT_NEW
)
{
// 获取实际记录
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT_NEW
);
list
=
baseMapper
.
getTInsuranceUnpurchaseInfoExportList
(
searchVo
);
list
=
baseMapper
.
getTInsuranceUnpurchaseInfoExportList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"含风险项目不购买申请明细表"
+
index
).
build
();
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"含风险项目不购买申请明细表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
index
++;
}
}
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
list
.
clear
();
}
}
}
}
}
}
else
{
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"含风险项目不购买申请明细表"
+
index
).
build
();
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"含风险项目不购买申请明细表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
excelWriter
.
write
(
list
,
writeSheet
);
...
@@ -107,8 +123,8 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
...
@@ -107,8 +123,8 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
}
}
@Override
@Override
public
List
<
TInsuranceUnpurchasePerson
>
getBuyList
(
String
dept
Id
,
List
<
String
>
idCardList
)
{
public
List
<
TInsuranceUnpurchasePerson
>
getBuyList
(
String
dept
No
,
List
<
String
>
idCardList
)
{
return
baseMapper
.
getBuyList
(
dept
Id
,
idCardList
);
return
baseMapper
.
getBuyList
(
dept
No
,
idCardList
);
}
}
/**
/**
...
@@ -149,6 +165,15 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
...
@@ -149,6 +165,15 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
}
else
{
}
else
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
}
List
<
TSalaryAtta
>
attaInfo
=
tSalaryAttaService
.
list
(
Wrappers
.<
TSalaryAtta
>
query
().
lambda
().
eq
(
TSalaryAtta:
:
getLinkId
,
person
.
getParnetId
()));
if
(
attaInfo
!=
null
&&
!
attaInfo
.
isEmpty
())
{
URL
url
;
for
(
TSalaryAtta
a:
attaInfo
)
{
url
=
ossUtil
.
getObjectUrl
(
null
,
a
.
getAttaSrc
());
a
.
setAttaUrl
(
url
.
toString
());
}
}
person
.
setAttaInfoList
(
attaInfo
);
return
R
.
ok
(
person
);
return
R
.
ok
(
person
);
}
}
...
@@ -198,5 +223,38 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
...
@@ -198,5 +223,38 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
}
}
}
}
private
void
exportError
(
HttpServletResponse
response
,
String
errorMessage
)
{
String
fileName
=
"导出异常"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
//获取要导出的列表
List
<
ExportErrorVo
>
list
=
new
ArrayList
<>();
list
.
add
(
new
ExportErrorVo
(
errorMessage
));
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
ExportErrorVo
.
class
).
build
();
int
index
=
0
;
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"异常信息"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
ae228f97
...
@@ -1130,7 +1130,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1130,7 +1130,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
idCardList
.
add
(
a
.
getEmpIdCard
());
idCardList
.
add
(
a
.
getEmpIdCard
());
}
}
// 3 判断不购买申请明细
// 3 判断不购买申请明细
List
<
TInsuranceUnpurchasePerson
>
buyList
=
tInsuranceUnpurchasePersonService
.
getBuyList
(
s
.
getDept
Id
(),
idCardList
);
List
<
TInsuranceUnpurchasePerson
>
buyList
=
tInsuranceUnpurchasePersonService
.
getBuyList
(
s
.
getDept
No
(),
idCardList
);
Map
<
String
,
TInsuranceUnpurchasePerson
>
buyMap
=
new
HashMap
<>();
Map
<
String
,
TInsuranceUnpurchasePerson
>
buyMap
=
new
HashMap
<>();
TInsuranceUnpurchasePerson
buyPerson
;
TInsuranceUnpurchasePerson
buyPerson
;
for
(
TInsuranceUnpurchasePerson
buys
:
buyList
)
{
for
(
TInsuranceUnpurchasePerson
buys
:
buyList
)
{
...
@@ -1144,8 +1144,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1144,8 +1144,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
boolean
isTrue
;
boolean
isTrue
;
List
<
SalaryRiskVo
>
returnList
=
new
ArrayList
<>();
List
<
SalaryRiskVo
>
returnList
=
new
ArrayList
<>();
List
<
TInsuranceUnpurchasePersonSalary
>
updat
ePerSonSalaryList
=
new
ArrayList
<>();
List
<
TInsuranceUnpurchasePersonSalary
>
sav
ePerSonSalaryList
=
new
ArrayList
<>();
List
<
TInsuranceUnpurchasePerson
>
updatePerSonList
=
new
ArrayList
<>();
List
<
String
>
updatePerSonList
=
new
ArrayList
<>();
for
(
SalaryRiskVo
a
:
noRisklist
)
{
for
(
SalaryRiskVo
a
:
noRisklist
)
{
isTrue
=
false
;
isTrue
=
false
;
buyPerson
=
buyMap
.
get
(
a
.
getEmpIdCard
());
buyPerson
=
buyMap
.
get
(
a
.
getEmpIdCard
());
...
@@ -1153,11 +1153,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1153,11 +1153,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
if
(
buyPerson
.
getReasonType
()
!=
null
)
{
if
(
buyPerson
.
getReasonType
()
!=
null
)
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
buyPerson
.
getReasonType
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
buyPerson
.
getReasonType
()))
{
isTrue
=
true
;
isTrue
=
true
;
setUpdateRiskInfo
(
s
,
buyPerson
,
updat
ePerSonSalaryList
,
updatePerSonList
);
setUpdateRiskInfo
(
s
,
buyPerson
,
sav
ePerSonSalaryList
,
updatePerSonList
);
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
buyPerson
.
getReasonType
()))
{
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
buyPerson
.
getReasonType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
buyPerson
.
getSocialStatus
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
buyPerson
.
getSocialStatus
()))
{
isTrue
=
true
;
isTrue
=
true
;
setUpdateRiskInfo
(
s
,
buyPerson
,
updat
ePerSonSalaryList
,
updatePerSonList
);
setUpdateRiskInfo
(
s
,
buyPerson
,
sav
ePerSonSalaryList
,
updatePerSonList
);
}
else
{
}
else
{
a
.
setMsg
(
"“不购买申请”原因为“社保已购买”,但社保不在保"
);
a
.
setMsg
(
"“不购买申请”原因为“社保已购买”,但社保不在保"
);
}
}
...
@@ -1174,25 +1174,25 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1174,25 +1174,25 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
}
// 无错误信息返回
// 无错误信息返回
if
(
returnList
.
isEmpty
())
{
if
(
returnList
.
isEmpty
())
{
if
(!
savePerSonSalaryList
.
isEmpty
())
{
tInsuranceUnpurchasePersonSalaryService
.
saveBatch
(
savePerSonSalaryList
);
if
(!
updatePerSonList
.
isEmpty
())
{
if
(!
updatePerSonList
.
isEmpty
())
{
tInsuranceUnpurchasePersonService
.
updateBatchById
(
updatePerSonList
);
tInsuranceUnpurchasePersonSalaryService
.
updatePersonSalaryNumByParentIds
(
updatePerSonList
);
}
}
if
(!
updatePerSonSalaryList
.
isEmpty
())
{
tInsuranceUnpurchasePersonSalaryService
.
saveBatch
(
updatePerSonSalaryList
);
}
}
return
getTrueR
(
s
,
"校验通过"
);
return
getTrueR
(
s
,
"校验
【商险不购买】
通过"
);
}
else
{
}
else
{
return
new
R
<>(
CommonConstants
.
TWO_INT
,
"校验
商险
不通过!"
,
returnList
);
return
new
R
<>(
CommonConstants
.
TWO_INT
,
"校验
【商险不购买】
不通过!"
,
returnList
);
}
}
}
else
{
}
else
{
return
getTrueR
(
s
,
"均已购买
商险
"
);
return
getTrueR
(
s
,
"均已购买
【商险】
"
);
}
}
}
}
}
else
{
}
else
{
return
getTrueR
(
s
,
"没有报账明细,无需拦截"
);
return
getTrueR
(
s
,
"没有报账明细,无需拦截"
);
}
}
}
else
{
}
else
{
return
getTrueR
(
s
,
"项目不含风险
或
无商险"
);
return
getTrueR
(
s
,
"项目不含风险
或
无商险"
);
}
}
}
else
{
}
else
{
return
R
.
failed
(
"获取项目信息失败,请联管理员!"
);
return
R
.
failed
(
"获取项目信息失败,请联管理员!"
);
...
@@ -1207,6 +1207,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1207,6 +1207,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
**/
**/
private
R
<
List
<
SalaryRiskVo
>>
getTrueR
(
TSalaryStandard
s
,
String
msg
)
{
private
R
<
List
<
SalaryRiskVo
>>
getTrueR
(
TSalaryStandard
s
,
String
msg
)
{
s
.
setIsCheckRisk
(
CommonConstants
.
ONE_INT
);
s
.
setIsCheckRisk
(
CommonConstants
.
ONE_INT
);
s
.
setCheckRiskRemark
(
msg
);
this
.
updateById
(
s
);
this
.
updateById
(
s
);
return
R
.
ok
(
null
,
msg
);
return
R
.
ok
(
null
,
msg
);
}
}
...
@@ -1218,24 +1219,16 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1218,24 +1219,16 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
* @return: void
* @return: void
**/
**/
private
void
setUpdateRiskInfo
(
TSalaryStandard
s
,
TInsuranceUnpurchasePerson
buyPerson
private
void
setUpdateRiskInfo
(
TSalaryStandard
s
,
TInsuranceUnpurchasePerson
buyPerson
,
List
<
TInsuranceUnpurchasePersonSalary
>
updatePerSonSalaryList
,
List
<
TInsuranceUnpurchasePersonSalary
>
savePerSonSalaryList
,
List
<
TInsuranceUnpurchasePerson
>
updatePerSonList
)
{
,
List
<
String
>
updatePerSonList
)
{
TInsuranceUnpurchasePerson
updatePerSon
=
new
TInsuranceUnpurchasePerson
();
updatePerSonList
.
add
(
buyPerson
.
getId
());
updatePerSon
.
setId
(
buyPerson
.
getId
());
if
(
Common
.
isEmpty
(
updatePerSon
.
getSalaryNum
()))
{
updatePerSon
.
setSalaryNum
(
CommonConstants
.
ONE_INT
);
}
else
{
updatePerSon
.
setSalaryNum
(
updatePerSon
.
getSalaryNum
()
+
CommonConstants
.
ONE_INT
);
}
updatePerSonList
.
add
(
updatePerSon
);
TInsuranceUnpurchasePersonSalary
updatePerSonSalary
=
new
TInsuranceUnpurchasePersonSalary
();
TInsuranceUnpurchasePersonSalary
updatePerSonSalary
=
new
TInsuranceUnpurchasePersonSalary
();
updatePerSonSalary
.
setId
(
buyPerson
.
getId
());
updatePerSonSalary
.
setSalaryId
(
s
.
getId
());
updatePerSonSalary
.
setSalaryId
(
s
.
getId
());
updatePerSonSalary
.
setApplyNo
(
s
.
getApplyNo
());
updatePerSonSalary
.
setApplyNo
(
s
.
getApplyNo
());
updatePerSonSalary
.
setParentId
(
buyPerson
.
getId
());
updatePerSonSalary
.
setParentId
(
buyPerson
.
getId
());
updatePerSonSalary
.
setSalaryMonth
(
s
.
getSalaryMonth
());
updatePerSonSalary
.
setSalaryMonth
(
s
.
getSalaryMonth
());
updat
ePerSonSalaryList
.
add
(
updatePerSonSalary
);
sav
ePerSonSalaryList
.
add
(
updatePerSonSalary
);
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/process/TInsuranceUnpurchaseApplyAuditProcess.java
View file @
ae228f97
...
@@ -12,6 +12,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
...
@@ -12,6 +12,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
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.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.util.EkpDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpDivisionInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.config.WxConfig
;
import
com.yifu.cloud.plus.v1.yifu.salary.config.WxConfig
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditNodeProcess
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditNodeProcess
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditRecord
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditRecord
;
...
@@ -56,6 +58,9 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
...
@@ -56,6 +58,9 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
@Autowired
@Autowired
private
WxConfig
wxConfig
;
private
WxConfig
wxConfig
;
@Autowired
private
EkpDaprUtils
ekpDaprUtils
;
@Override
@Override
public
R
<
String
>
auditSuccess
(
TInsuranceUnpurchaseApply
entity
,
TAuditRecord
auditRecord
,
YifuUser
loginUser
)
{
public
R
<
String
>
auditSuccess
(
TInsuranceUnpurchaseApply
entity
,
TAuditRecord
auditRecord
,
YifuUser
loginUser
)
{
// 改实体审核状态为审核通过
// 改实体审核状态为审核通过
...
@@ -86,7 +91,7 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
...
@@ -86,7 +91,7 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
}
}
@Override
@Override
public
R
<
String
>
auditSuccessAndNex
(
TInsuranceUnpurchaseApply
entity
,
List
<
SysUser
>
remoteSysUserList
,
TAuditRecord
a
pproval
Record
)
{
public
R
<
String
>
auditSuccessAndNex
(
TInsuranceUnpurchaseApply
entity
,
List
<
SysUser
>
remoteSysUserList
,
TAuditRecord
a
udit
Record
)
{
if
(
Common
.
isEmpty
(
remoteSysUserList
))
{
if
(
Common
.
isEmpty
(
remoteSysUserList
))
{
throw
new
CheckedException
(
NEXT_NODE_USER_NULL
);
throw
new
CheckedException
(
NEXT_NODE_USER_NULL
);
}
}
...
@@ -105,6 +110,8 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
...
@@ -105,6 +110,8 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
}
}
entity
.
setAuditUser
(
auditUserNameStrs
);
entity
.
setAuditUser
(
auditUserNameStrs
);
entity
.
setAuditUserId
(
auditUserIdStrs
);
entity
.
setAuditUserId
(
auditUserIdStrs
);
tInsuranceUnpurchaseApplyService
.
updateById
(
entity
);
return
R
.
ok
(
"审核通过"
);
return
R
.
ok
(
"审核通过"
);
}
}
...
@@ -170,22 +177,33 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
...
@@ -170,22 +177,33 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
**/
**/
@Override
@Override
public
List
<
SysUser
>
getDivisionAuditUser
(
TNodePrimission
nodePrimission
,
TInsuranceUnpurchaseApply
entity
)
{
public
List
<
SysUser
>
getDivisionAuditUser
(
TNodePrimission
nodePrimission
,
TInsuranceUnpurchaseApply
entity
)
{
SysUser
remoteSysUser
=
null
;
SysUser
remoteSysUser
;
List
<
SysUser
>
remoteSysUserList
=
new
ArrayList
<>();
List
<
SysUser
>
remoteSysUserList
=
new
ArrayList
<>();
if
(
CommonConstants
.
SIX_INT
==
nodePrimission
.
getType
().
intValue
())
{
if
(
CommonConstants
.
SIX_INT
==
nodePrimission
.
getType
().
intValue
())
{
// 6.指定事业部审批
// 6.指定事业部审批
if
(
Common
.
isEmpty
(
nodePrimission
.
getDivisionIdentification
()))
{
if
(
Common
.
isEmpty
(
nodePrimission
.
getDivisionIdentification
()))
{
throw
new
CheckedException
(
"未查询当前节点配置的事业部审批人标识"
);
throw
new
CheckedException
(
"未查询当前节点配置的事业部审批人标识"
);
}
}
// todo 根据配置条件查找用户
// 根据配置条件查找用户账号
//EkpDivisionInfoVo divisionInfoVo = new EkpDivisionInfoVo();
EkpDivisionInfoVo
divisionInfoVo
=
new
EkpDivisionInfoVo
();
// if(CommonConstants.ZERO_STRING.equals(nodePrimission.getDivisionIdentification())){
divisionInfoVo
.
setDivisionIdentification
(
nodePrimission
.
getDivisionIdentification
());
//
divisionInfoVo
.
setDivision
(
entity
.
getDivision
());
// }
divisionInfoVo
.
setNewLine
(
entity
.
getNewLine
());
R
<
EkpDivisionInfoVo
>
divisionInfoVoRes
=
ekpDaprUtils
.
getDivisionUsernameList
(
divisionInfoVo
);
// remoteSysUserList = RemoteRequestUtil.getUserByDivisionConfig(remoteUserService, advancePaymentEntity.getDivision(), advancePaymentEntity.getDivisionLine(), nodePrimission.getDivisionIdentification());
if
(
null
!=
divisionInfoVoRes
&&
null
!=
divisionInfoVoRes
.
getData
())
{
List
<
String
>
divisionUsernameList
=
divisionInfoVoRes
.
getData
().
getDivisionUsernameList
();
if
(
Common
.
isNotNull
(
divisionUsernameList
)){
// 根据用户账号查用户信息
for
(
String
username
:
divisionUsernameList
){
R
<
SysUser
>
remoteSysUserR
=
upmsDaprUtils
.
getSimpleUserByLoginName
(
username
);
if
(
Common
.
isNotNull
(
remoteSysUserR
)
&&
Common
.
isNotNull
(
remoteSysUserR
.
getData
())){
remoteSysUser
=
remoteSysUserR
.
getData
();
remoteSysUserList
.
add
(
remoteSysUser
);
}
}
}
}
}
}
return
remoteSysUserList
;
return
remoteSysUserList
;
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/application.yml
View file @
ae228f97
...
@@ -50,10 +50,6 @@ security:
...
@@ -50,10 +50,6 @@ security:
-
/salaryEmployeeSelect/getSalaryAccount
# 工资条查询明细通过openId控制
-
/salaryEmployeeSelect/getSalaryAccount
# 工资条查询明细通过openId控制
-
/tsalaryatta/ossUploadFile
# 工资条查询附件上传 无token
-
/tsalaryatta/ossUploadFile
# 工资条查询附件上传 无token
-
/tsalaryatta/ossFileDelete/**
# 工资条查询附件上传删除 无token
-
/tsalaryatta/ossFileDelete/**
# 工资条查询附件上传删除 无token
-
/tinsuranceunpurchaseapply/getAuditPageTemp
# 临时调试
-
/tinsuranceunpurchaseapply/getAuditCount
# 临时调试
-
/tinsuranceunpurchaseapply/auditTemp
# 临时调试
-
/tauditrecord/getAuditInfoByDomainIdAndAuditType
# 临时调试
-
/tinsuranceunpurchaseapply/temp/{id}
# 临时调试
-
/tinsuranceunpurchaseapply/temp/{id}
# 临时调试
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TInsuranceUnpurchaseApplyMapper.xml
View file @
ae228f97
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<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=
"createTimeZc"
column=
"CREATE_TIME_ZC"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
/>
...
@@ -29,6 +30,7 @@
...
@@ -29,6 +30,7 @@
<result
property=
"insuranceFlag"
column=
"INSURANCE_FLAG"
/>
<result
property=
"insuranceFlag"
column=
"INSURANCE_FLAG"
/>
<result
property=
"auditUser"
column=
"AUDIT_USER"
/>
<result
property=
"auditUser"
column=
"AUDIT_USER"
/>
<result
property=
"auditUserId"
column=
"AUDIT_USER_ID"
/>
<result
property=
"auditUserId"
column=
"AUDIT_USER_ID"
/>
<result
property=
"unbuyNum"
column=
"UNBUY_NUM"
/>
</resultMap>
</resultMap>
<resultMap
id=
"tInsuranceUnpurchaseApplyExportMap"
<resultMap
id=
"tInsuranceUnpurchaseApplyExportMap"
...
@@ -49,7 +51,7 @@
...
@@ -49,7 +51,7 @@
a.CREATE_USER_DEPT_NAME, a.REASON_TYPE, a.REASON_INFO, a.APPLY_NO,
a.CREATE_USER_DEPT_NAME, a.REASON_TYPE, a.REASON_INFO, a.APPLY_NO,
a.AUDIT_FLAG, a.COMPANY_FLAG, a.CREATE_BY, a.CREATE_NAME, a.CREATE_TIME,
a.AUDIT_FLAG, a.COMPANY_FLAG, a.CREATE_BY, a.CREATE_NAME, a.CREATE_TIME,
a.UPDATE_BY, a.UPDATE_TIME, a.DELETE_FLAG, a.STATUS, a.HAS_CONTAIN_RISKS,
a.UPDATE_BY, a.UPDATE_TIME, a.DELETE_FLAG, a.STATUS, a.HAS_CONTAIN_RISKS,
a.NEW_LINE, a.DIVISION, a.INSURANCE_FLAG, a.AUDIT_USER, a.AUDIT_USER_ID
a.NEW_LINE, a.DIVISION, a.INSURANCE_FLAG, a.AUDIT_USER, a.AUDIT_USER_ID
,a.CREATE_TIME_ZC,UNBUY_NUM
</sql>
</sql>
<sql
id=
"tInsuranceUnpurchaseApply_where"
>
<sql
id=
"tInsuranceUnpurchaseApply_where"
>
<if
test=
"tInsuranceUnpurchaseApply != null"
>
<if
test=
"tInsuranceUnpurchaseApply != null"
>
...
@@ -72,10 +74,10 @@
...
@@ -72,10 +74,10 @@
AND a.CREATE_NAME = #{tInsuranceUnpurchaseApply.createName}
AND a.CREATE_NAME = #{tInsuranceUnpurchaseApply.createName}
</if>
</if>
<if
test=
"tInsuranceUnpurchaseApply.createTimeStart != null"
>
<if
test=
"tInsuranceUnpurchaseApply.createTimeStart != null"
>
AND a.CREATE_TIME
<![CDATA[ >= ]]>
#{tInsuranceUnpurchaseApply.createTimeStart}
AND a.CREATE_TIME
_ZC
<![CDATA[ >= ]]>
#{tInsuranceUnpurchaseApply.createTimeStart}
</if>
</if>
<if
test=
"tInsuranceUnpurchaseApply.createTimeEnd != null"
>
<if
test=
"tInsuranceUnpurchaseApply.createTimeEnd != null"
>
AND a.CREATE_TIME
<![CDATA[ <= ]]>
#{tInsuranceUnpurchaseApply.createTimeEnd}
AND a.CREATE_TIME
_ZC
<![CDATA[ <= ]]>
#{tInsuranceUnpurchaseApply.createTimeEnd}
</if>
</if>
<if
test=
"tInsuranceUnpurchaseApply.status != null and tInsuranceUnpurchaseApply.status.trim() != ''"
>
<if
test=
"tInsuranceUnpurchaseApply.status != null and tInsuranceUnpurchaseApply.status.trim() != ''"
>
AND a.STATUS = #{tInsuranceUnpurchaseApply.status}
AND a.STATUS = #{tInsuranceUnpurchaseApply.status}
...
@@ -101,6 +103,8 @@
...
@@ -101,6 +103,8 @@
1=1 and a.DELETE_FLAG = '0'
1=1 and a.DELETE_FLAG = '0'
<include
refid=
"tInsuranceUnpurchaseApply_where"
/>
<include
refid=
"tInsuranceUnpurchaseApply_where"
/>
</where>
</where>
order by
ifnull(a.CREATE_TIME_ZC,'2999-12-31 00:00:00') DESC
</select>
</select>
<!-- tInsuranceUnpurchaseApply简单分页查询 -->
<!-- tInsuranceUnpurchaseApply简单分页查询 -->
...
@@ -136,6 +140,10 @@
...
@@ -136,6 +140,10 @@
a.DELETE_FLAG = '0'
a.DELETE_FLAG = '0'
<include
refid=
"tInsuranceUnpurchaseApply_where"
/>
<include
refid=
"tInsuranceUnpurchaseApply_where"
/>
</where>
</where>
order by ifnull(a.CREATE_TIME_ZC,'2999-12-31 00:00:00') DESC
<if
test=
"tInsuranceUnpurchaseApply.limitStart != null"
>
limit #{tInsuranceUnpurchaseApply.limitStart},#{tInsuranceUnpurchaseApply.limitEnd}
</if>
</select>
</select>
<select
id=
"getAuditPage"
resultMap=
"tInsuranceUnpurchaseApplyMap"
>
<select
id=
"getAuditPage"
resultMap=
"tInsuranceUnpurchaseApplyMap"
>
...
@@ -207,7 +215,7 @@
...
@@ -207,7 +215,7 @@
SELECT ifnull(max(right (e.APPLY_NO, 3)), 0) EMP_CODE
SELECT ifnull(max(right (e.APPLY_NO, 3)), 0) EMP_CODE
FROM t_insurance_unpurchase_apply e
FROM t_insurance_unpurchase_apply e
where e.DELETE_FLAG = '0'
where e.DELETE_FLAG = '0'
and e.CREATE_TIME
> DATE_FORMAT(now(), '%Y-%m-%d')
and e.CREATE_TIME_ZC
> DATE_FORMAT(now(), '%Y-%m-%d')
</select>
</select>
<!-- 获取当日最大的编码 -->
<!-- 获取当日最大的编码 -->
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TInsuranceUnpurchasePersonMapper.xml
View file @
ae228f97
...
@@ -136,6 +136,7 @@
...
@@ -136,6 +136,7 @@
1=1 and STATUS = '3'
1=1 and STATUS = '3'
<include
refid=
"tInsuranceUnpurchasePerson_where"
/>
<include
refid=
"tInsuranceUnpurchasePerson_where"
/>
</where>
</where>
order by a.CREATE_TIME desc
</select>
</select>
<!--tInsuranceUnpurchasePerson导出条数查询-->
<!--tInsuranceUnpurchasePerson导出条数查询-->
...
@@ -170,6 +171,10 @@
...
@@ -170,6 +171,10 @@
1=1 and STATUS = '3'
1=1 and STATUS = '3'
<include
refid=
"tInsuranceUnpurchasePerson_where"
/>
<include
refid=
"tInsuranceUnpurchasePerson_where"
/>
</where>
</where>
order by a.CREATE_TIME desc
<if
test=
"tInsuranceUnpurchasePerson.limitStart != null"
>
limit #{tInsuranceUnpurchasePerson.limitStart},#{tInsuranceUnpurchasePerson.limitEnd}
</if>
</select>
</select>
<select
id=
"getTInsuranceUnpurchasePersonList"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonAddVo"
>
<select
id=
"getTInsuranceUnpurchasePersonList"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonAddVo"
>
...
@@ -193,7 +198,7 @@
...
@@ -193,7 +198,7 @@
SOCIAL_STATUS,
SOCIAL_STATUS,
SALARY_NUM
SALARY_NUM
FROM t_insurance_unpurchase_person a
FROM t_insurance_unpurchase_person a
where STATUS = '3' AND (REASON_TYPE = '1' or (REASON_TYPE = '2' AND SALARY_NUM = 0) ) AND DEPT_
ID = #{deptId
} AND EMP_IDCARD_NO in
where STATUS = '3' AND (REASON_TYPE = '1' or (REASON_TYPE = '2' AND SALARY_NUM = 0) ) AND DEPT_
NO = #{deptNo
} AND EMP_IDCARD_NO in
<foreach
item=
"idStr"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"idStr"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
#{idStr}
</foreach>
</foreach>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TInsuranceUnpurchasePersonSalaryMapper.xml
View file @
ae228f97
...
@@ -58,6 +58,15 @@
...
@@ -58,6 +58,15 @@
<include
refid=
"tInsuranceUnpurchasePerson_where"
/>
<include
refid=
"tInsuranceUnpurchasePerson_where"
/>
</select>
</select>
<!-- 获取parentId -->
<select
id=
"getParentIdBySalaryId"
resultType=
"java.lang.String"
>
SELECT
a.id
FROM t_insurance_unpurchase_person a
join t_insurance_unpurchase_person_salary s on s.PARENT_ID=a.ID
where s.SALARY_ID = #{salaryId}
</select>
<!--删除关联项-->
<!--删除关联项-->
<update
id=
"deletePersonSalaryBySalaryId"
>
<update
id=
"deletePersonSalaryBySalaryId"
>
update t_insurance_unpurchase_person_salary a
update t_insurance_unpurchase_person_salary a
...
@@ -65,12 +74,21 @@
...
@@ -65,12 +74,21 @@
where a.SALARY_ID = #{salaryId}
where a.SALARY_ID = #{salaryId}
</update>
</update>
<!--
更新次数-1
-->
<!--
更新次数
-->
<update
id=
"updatePersonSalaryNumBy
SalaryId
"
>
<update
id=
"updatePersonSalaryNumBy
PersonIdList
"
>
update t_insurance_unpurchase_person a
update t_insurance_unpurchase_person a
left join t_insurance_unpurchase_person_salary b on a.id=b.PARENT_ID
JOIN (
set a.SALARY_NUM = (if(a.SALARY_NUM is null or a.SALARY_NUM = 0,1,a.SALARY_NUM) - 1)
select sum(if(c.DELETE_FLAG = 0,1,0)) num,c.PARENT_ID from t_insurance_unpurchase_person_salary c where c.PARENT_ID in
where b.SALARY_ID = #{salaryId}
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
GROUP BY c.PARENT_ID
) d on d.PARENT_ID=a.id
set a.SALARY_NUM = d.num
where a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</update>
</update>
</mapper>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
ae228f97
...
@@ -90,6 +90,7 @@
...
@@ -90,6 +90,7 @@
<result
property=
"newEmpUpdateFlag"
column=
"NEW_EMP_UPDATE_FLAG"
/>
<result
property=
"newEmpUpdateFlag"
column=
"NEW_EMP_UPDATE_FLAG"
/>
<result
property=
"isFixedColumn"
column=
"IS_FIXED_COLUMN"
/>
<result
property=
"isFixedColumn"
column=
"IS_FIXED_COLUMN"
/>
<result
property=
"isCheckRisk"
column=
"IS_CHECK_RISK"
/>
<result
property=
"isCheckRisk"
column=
"IS_CHECK_RISK"
/>
<result
property=
"checkRiskRemark"
column=
"CHECK_RISK_REMARK"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
...
@@ -157,7 +158,8 @@
...
@@ -157,7 +158,8 @@
a.ORIGINAL_SET_NAME,
a.ORIGINAL_SET_NAME,
a.NEW_EMP_UPDATE_FLAG,
a.NEW_EMP_UPDATE_FLAG,
a.IS_FIXED_COLUMN,
a.IS_FIXED_COLUMN,
a.IS_CHECK_RISK
a.IS_CHECK_RISK,
a.CHECK_RISK_REMARK
</sql>
</sql>
<sql
id=
"tSalaryStandard_where"
>
<sql
id=
"tSalaryStandard_where"
>
<if
test=
"tSalaryStandard != null"
>
<if
test=
"tSalaryStandard != null"
>
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/UserController.java
View file @
ae228f97
...
@@ -600,7 +600,7 @@ public class UserController {
...
@@ -600,7 +600,7 @@ public class UserController {
**/
**/
@Inner
@Inner
@PostMapping
(
"/inner/getUser/getUserByRoleIdForCrm"
)
@PostMapping
(
"/inner/getUser/getUserByRoleIdForCrm"
)
public
SysUserListVo
getUserByRoleIdForCrm
(
UserApprovalRoleVO
userByApprovalRole
)
{
public
SysUserListVo
getUserByRoleIdForCrm
(
@RequestBody
UserApprovalRoleVO
userByApprovalRole
)
{
SysUserListVo
naVo
=
new
SysUserListVo
();
SysUserListVo
naVo
=
new
SysUserListVo
();
if
(
Common
.
isEmpty
(
userByApprovalRole
.
getDepartId
())
||
Common
.
isEmpty
(
userByApprovalRole
.
getRoleId
()))
{
if
(
Common
.
isEmpty
(
userByApprovalRole
.
getDepartId
())
||
Common
.
isEmpty
(
userByApprovalRole
.
getRoleId
()))
{
return
naVo
;
return
naVo
;
...
...
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