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
4f997c00
Commit
4f997c00
authored
Jan 14, 2025
by
chenyuxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 移代码到薪资服务里
parent
cade189a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
424 additions
and
188 deletions
+424
-188
application-test.yml
...fu-insurances-biz/src/main/resources/application-test.yml
+0
-15
TProcessMapper.xml
...-process-biz/src/main/resources/mapper/TProcessMapper.xml
+0
-6
TAuditCopyInfo.java
...yifu/cloud/plus/v1/yifu/salary/entity/TAuditCopyInfo.java
+1
-1
TAuditNodeProocess.java
.../cloud/plus/v1/yifu/salary/entity/TAuditNodeProocess.java
+1
-1
TAuditRecord.java
...m/yifu/cloud/plus/v1/yifu/salary/entity/TAuditRecord.java
+3
-3
TAuditRecordSearchVo.java
...fu/cloud/plus/v1/yifu/salary/vo/TAuditRecordSearchVo.java
+3
-3
TAuditCopyInfoController.java
...s/v1/yifu/salary/controller/TAuditCopyInfoController.java
+3
-3
TAuditNodeProocessController.java
.../yifu/salary/controller/TAuditNodeProocessController.java
+3
-3
TAuditRecordController.java
...lus/v1/yifu/salary/controller/TAuditRecordController.java
+60
-0
TInsuranceUnpurchaseApplyController.java
...alary/controller/TInsuranceUnpurchaseApplyController.java
+10
-10
TAuditCopyInfoMapper.java
...loud/plus/v1/yifu/salary/mapper/TAuditCopyInfoMapper.java
+17
-0
TAuditNodeProocessMapper.java
.../plus/v1/yifu/salary/mapper/TAuditNodeProocessMapper.java
+2
-5
TAuditRecordMapper.java
.../cloud/plus/v1/yifu/salary/mapper/TAuditRecordMapper.java
+7
-7
TAuditCopyInfoService.java
...ud/plus/v1/yifu/salary/service/TAuditCopyInfoService.java
+2
-2
TAuditNodeProocessService.java
...lus/v1/yifu/salary/service/TAuditNodeProocessService.java
+2
-4
TAuditRecordService.java
...loud/plus/v1/yifu/salary/service/TAuditRecordService.java
+6
-10
AbastractAuditProcess.java
...us/v1/yifu/salary/service/impl/AbastractAuditProcess.java
+55
-55
TAuditCopyInfoServiceImpl.java
...1/yifu/salary/service/impl/TAuditCopyInfoServiceImpl.java
+4
-4
TAuditNodeProocessServiceImpl.java
...fu/salary/service/impl/TAuditNodeProocessServiceImpl.java
+21
-0
TAuditRecordServiceImpl.java
.../v1/yifu/salary/service/impl/TAuditRecordServiceImpl.java
+9
-9
TInsuranceUnpurchaseApplyServiceImpl.java
...ry/service/impl/TInsuranceUnpurchaseApplyServiceImpl.java
+8
-6
TInsuranceUnpurchaseApplyAuditProcess.java
...e/impl/process/TInsuranceUnpurchaseApplyAuditProcess.java
+32
-32
TAuditCopyInfoMapper.xml
...ry-biz/src/main/resources/mapper/TAuditCopyInfoMapper.xml
+2
-2
TAuditNodeProocessMapper.xml
...iz/src/main/resources/mapper/TAuditNodeProocessMapper.xml
+2
-2
TAuditRecordMapper.xml
...lary-biz/src/main/resources/mapper/TAuditRecordMapper.xml
+166
-0
TInsuranceUnpurchaseApplyMapper.xml
...main/resources/mapper/TInsuranceUnpurchaseApplyMapper.xml
+5
-5
No files found.
yifu-insurances/yifu-insurances-biz/src/main/resources/application-test.yml
View file @
4f997c00
...
...
@@ -36,19 +36,4 @@ ekp:
LoginName
:
'
admin'
docSubject
:
'
接口发起流程'
# spring security 配置
security
:
oauth2
:
resource
:
loadBalanced
:
true
token-info-uri
:
http://yifu-auth/oauth/check_token
ignore
:
# 通用放行URL,服务个性化,请在对应配置文件覆盖
urls
:
-
/v3/api-docs
-
/swagger-ui/**
-
/tapprovalrecord/getAuditInfoByDomainIdAndAuditType
-
/tinsuranceunpurchaseapply/getAuditPage
-
/tinsuranceunpurchaseapply/getAuditCount
-
/tinsuranceunpurchaseapply/commitOne
-
/tinsuranceunpurchaseapply/audit
yifu-process/yifu-process-biz/src/main/resources/mapper/TProcessMapper.xml
View file @
4f997c00
...
...
@@ -59,12 +59,6 @@
<if
test=
"tProcess.processIsUse != null and tProcess.processIsUse.trim() != ''"
>
AND a.process_is_use = #{tProcess.processIsUse}
</if>
<if
test=
"tProcess.processIds != null and tProcess.processIds.size()>0"
>
AND a.ID IN
<foreach
collection=
"tProcess.processIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
</if>
</sql>
<!--tProcess简单分页查询-->
...
...
yifu-
insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances
/entity/TAuditCopyInfo.java
→
yifu-
salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary
/entity/TAuditCopyInfo.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
...
...
yifu-
insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances
/entity/TAuditNodeProocess.java
→
yifu-
salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary
/entity/TAuditNodeProocess.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
...
...
yifu-
insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TApproval
Record.java
→
yifu-
salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TAudit
Record.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
...
...
@@ -21,10 +21,10 @@ import java.time.LocalDateTime;
* @since 1.7.5
*/
@Data
@TableName
(
"t_a
pproval
_record"
)
@TableName
(
"t_a
udit
_record"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"审批记录表"
)
public
class
TA
pproval
Record
extends
BaseEntity
{
public
class
TA
udit
Record
extends
BaseEntity
{
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
...
...
yifu-
insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/TApproval
RecordSearchVo.java
→
yifu-
salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TAudit
RecordSearchVo.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditRecord
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TApprovalRecord
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
...
...
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
* @date 2025-01-10 17:47:32
*/
@Data
public
class
TA
pprovalRecordSearchVo
extends
TApproval
Record
{
public
class
TA
uditRecordSearchVo
extends
TAudit
Record
{
/**
* 多选导出或删除等操作
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances
/controller/TAuditCopyInfoController.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary
/controller/TAuditCopyInfoController.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.
insurances
.entity.TAuditCopyInfo
;
import
com.yifu.cloud.plus.v1.yifu.
insurances.service.insuran
ce.TAuditCopyInfoService
;
import
com.yifu.cloud.plus.v1.yifu.
salary
.entity.TAuditCopyInfo
;
import
com.yifu.cloud.plus.v1.yifu.
salary.servi
ce.TAuditCopyInfoService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances
/controller/TAuditNodeProocessController.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary
/controller/TAuditNodeProocessController.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.
insurances
.entity.TAuditNodeProocess
;
import
com.yifu.cloud.plus.v1.yifu.
insurances.service.insuran
ce.TAuditNodeProocessService
;
import
com.yifu.cloud.plus.v1.yifu.
salary
.entity.TAuditNodeProocess
;
import
com.yifu.cloud.plus.v1.yifu.
salary.servi
ce.TAuditNodeProocessService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TApproval
RecordController.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TAudit
RecordController.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.ResultConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock
;
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.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TApprovalRecord
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TApprovalRecordService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TApprovalRecordSearchVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditRecord
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TAuditRecordService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TAuditRecordSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -33,12 +24,11 @@ import java.util.Map;
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/ta
pproval
record"
)
@RequestMapping
(
"/ta
udit
record"
)
@Tag
(
name
=
"审批记录表管理"
)
public
class
TApprovalRecordController
{
private
final
TApprovalRecordService
tApprovalRecordService
;
public
class
TAuditRecordController
{
private
final
TAuditRecordService
tAuditRecordService
;
/**
* 简单分页查询
...
...
@@ -48,8 +38,8 @@ public class TApprovalRecordController {
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TA
pprovalRecord
>>
getTApprovalRecordPage
(
Page
<
TApprovalRecord
>
page
,
TApproval
RecordSearchVo
tApprovalRecord
)
{
return
new
R
<>(
tA
pproval
RecordService
.
getTApprovalRecordPage
(
page
,
tApprovalRecord
));
public
R
<
IPage
<
TA
uditRecord
>>
getTApprovalRecordPage
(
Page
<
TAuditRecord
>
page
,
TAudit
RecordSearchVo
tApprovalRecord
)
{
return
new
R
<>(
tA
udit
RecordService
.
getTApprovalRecordPage
(
page
,
tApprovalRecord
));
}
/**
...
...
@@ -64,58 +54,7 @@ public class TApprovalRecordController {
if
(
Common
.
isEmpty
(
domainId
)
||
Common
.
isEmpty
(
auditType
))
{
return
R
.
failed
(
"实体id或审核类型不能为空"
);
}
return
tA
pproval
RecordService
.
getAuditInfoByDomainIdAndAuditType
(
domainId
,
auditType
);
return
tA
udit
RecordService
.
getAuditInfoByDomainIdAndAuditType
(
domainId
,
auditType
);
}
/**
* 通过id查询审批记录表
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('insurances_tapprovalrecord_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('insurances_tapprovalrecord_get')"
)
public
R
<
TApprovalRecord
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tApprovalRecordService
.
getById
(
id
));
}
/**
* 新增审批记录表
* @param tApprovalRecord 审批记录表
* @return R
*/
@Operation
(
summary
=
"新增审批记录表"
,
description
=
"新增审批记录表:hasPermission('insurances_tapprovalrecord_add')"
)
@SysLog
(
"新增审批记录表"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('insurances_tapprovalrecord_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TApprovalRecord
tApprovalRecord
)
{
return
R
.
ok
(
tApprovalRecordService
.
save
(
tApprovalRecord
));
}
/**
* 修改审批记录表
* @param tApprovalRecord 审批记录表
* @return R
*/
@Operation
(
summary
=
"修改审批记录表"
,
description
=
"修改审批记录表:hasPermission('insurances_tapprovalrecord_edit')"
)
@SysLog
(
"修改审批记录表"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('insurances_tapprovalrecord_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TApprovalRecord
tApprovalRecord
)
{
return
R
.
ok
(
tApprovalRecordService
.
updateById
(
tApprovalRecord
));
}
/**
* 通过id删除审批记录表
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除审批记录表"
,
description
=
"通过id删除审批记录表:hasPermission('insurances_tapprovalrecord_del')"
)
@SysLog
(
"通过id删除审批记录表"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('insurances_tapprovalrecord_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tApprovalRecordService
.
removeById
(
id
));
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TInsuranceUnpurchaseApplyController.java
View file @
4f997c00
...
...
@@ -12,7 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.
insurances.entity.TApproval
Record
;
import
com.yifu.cloud.plus.v1.yifu.
salary.entity.TAudit
Record
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchaseApply
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchaseApplyService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchaseApplySearchVo
;
...
...
@@ -200,41 +200,41 @@ public class TInsuranceUnpurchaseApplyController {
/**
* 审核
* @param tA
pproval
Record 审批信息
* @param tA
udit
Record 审批信息
* @return R<String>
**/
@Operation
(
description
=
"审核"
)
@SysLog
(
"审核"
)
@PostMapping
(
"/audit"
)
public
R
<
String
>
audit
(
@RequestBody
TA
pprovalRecord
tApproval
Record
)
{
if
(
Common
.
isEmpty
(
tA
pproval
Record
.
getApprovalResult
()))
{
public
R
<
String
>
audit
(
@RequestBody
TA
uditRecord
tAudit
Record
)
{
if
(
Common
.
isEmpty
(
tA
udit
Record
.
getApprovalResult
()))
{
return
R
.
failed
(
"审核结果不能为空!"
);
}
if
(
Common
.
isNotNull
(
tA
pprovalRecord
.
getApprovalOpinion
())
&&
tApproval
Record
.
getApprovalOpinion
().
length
()>
100
)
{
if
(
Common
.
isNotNull
(
tA
uditRecord
.
getApprovalOpinion
())
&&
tAudit
Record
.
getApprovalOpinion
().
length
()>
100
)
{
return
R
.
failed
(
"审核意见不能超过100个字"
);
}
if
(
Common
.
isEmpty
(
tA
pproval
Record
.
getDomainId
()))
{
if
(
Common
.
isEmpty
(
tA
udit
Record
.
getDomainId
()))
{
return
R
.
failed
(
"id不能为空!"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
TInsuranceUnpurchaseApply
insuranceUnpurchaseApply
=
tInsuranceUnpurchaseApplyService
.
getById
(
tA
pproval
Record
.
getDomainId
());
TInsuranceUnpurchaseApply
insuranceUnpurchaseApply
=
tInsuranceUnpurchaseApplyService
.
getById
(
tA
udit
Record
.
getDomainId
());
if
(
Common
.
isEmpty
(
insuranceUnpurchaseApply
)){
return
R
.
failed
(
"该实体信息不存在!"
);
}
String
requestId
;
String
redisKey
=
CacheConstants
.
INSURANCEUNPURCHASE_PROCESS_CACHE
.
concat
(
tA
pproval
Record
.
getDomainId
());
String
redisKey
=
CacheConstants
.
INSURANCEUNPURCHASE_PROCESS_CACHE
.
concat
(
tA
udit
Record
.
getDomainId
());
try
{
requestId
=
RedisDistributedLock
.
tryLockAndTime
(
redisKey
,
"10"
);
}
catch
(
Exception
e
)
{
return
R
.
failed
(
ResultConstants
.
REQUEST_LOCK_FAIL
);
}
if
(
Common
.
isNotKong
(
requestId
))
{
return
tInsuranceUnpurchaseApplyService
.
auditAndCommit
(
insuranceUnpurchaseApply
,
tA
pproval
Record
.
getApprovalResult
(),
tA
pproval
Record
.
getApprovalOpinion
(),
user
);
return
tInsuranceUnpurchaseApplyService
.
auditAndCommit
(
insuranceUnpurchaseApply
,
tA
udit
Record
.
getApprovalResult
(),
tA
udit
Record
.
getApprovalOpinion
(),
user
);
}
return
R
.
failed
(
ResultConstants
.
REQUEST_LOCK_FAIL
);
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances
/TAuditCopyInfoMapper.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper
/TAuditCopyInfoMapper.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TAuditCopyInfo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditCopyInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 审批抄送记录信息表
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances
/TAuditNodeProocessMapper.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper
/TAuditNodeProocessMapper.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TAuditNodeProocess
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditNodeProocess
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 审批主流程记录表节点表
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TApproval
RecordMapper.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TAudit
RecordMapper.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.
insurances.entity.TApproval
Record
;
import
com.yifu.cloud.plus.v1.yifu.
salary.entity.TAudit
Record
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -17,20 +17,20 @@ import java.util.List;
* @since 1.7.5
*/
@Mapper
public
interface
TA
pprovalRecordMapper
extends
BaseMapper
<
TApproval
Record
>
{
public
interface
TA
uditRecordMapper
extends
BaseMapper
<
TAudit
Record
>
{
/**
* 审批记录表简单分页查询
* @param tA
pproval
Record 审批记录表
* @param tA
udit
Record 审批记录表
* @return
*/
IPage
<
TA
pprovalRecord
>
getTApprovalRecordPage
(
Page
<
TApprovalRecord
>
page
,
@Param
(
"tApprovalRecord"
)
TApprovalRecord
tApproval
Record
);
IPage
<
TA
uditRecord
>
getTAuditRecordPage
(
Page
<
TAuditRecord
>
page
,
@Param
(
"tAuditRecord"
)
TAuditRecord
tAudit
Record
);
/**
* 通过实体id和审核类型查询所有的审核记录
*
* @param domainId 实体id
* @param auditType 审核类型 0不购买商险审核
* @return List<TA
pproval
Record>
* @return List<TA
udit
Record>
**/
List
<
TA
pprovalRecord
>
getApproval
RecordList
(
@Param
(
"domainId"
)
String
domainId
,
@Param
(
"auditType"
)
String
auditType
);
List
<
TA
uditRecord
>
getAudit
RecordList
(
@Param
(
"domainId"
)
String
domainId
,
@Param
(
"auditType"
)
String
auditType
);
}
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insuran
ce/TAuditCopyInfoService.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/servi
ce/TAuditCopyInfoService.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insuran
ce
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
servi
ce
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.
insurances
.entity.TAuditCopyInfo
;
import
com.yifu.cloud.plus.v1.yifu.
salary
.entity.TAuditCopyInfo
;
/**
* 审批抄送记录信息表
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insuran
ce/TAuditNodeProocessService.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/servi
ce/TAuditNodeProocessService.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insuran
ce
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
servi
ce
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TAuditNodeProocess
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditNodeProocess
;
/**
* 审批主流程记录表节点表
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TApproval
RecordService.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TAudit
RecordService.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insuran
ce
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
servi
ce
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TApprovalRecord
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditRecord
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TApprovalRecordSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TAuditRecordSearchVo
;
import
java.util.Map
;
/**
...
...
@@ -20,13 +16,13 @@ import java.util.Map;
* @date 2025-01-10 17:47:32
* @since 1.7.5
*/
public
interface
TA
pprovalRecordService
extends
IService
<
TApproval
Record
>
{
public
interface
TA
uditRecordService
extends
IService
<
TAudit
Record
>
{
/**
* 审批记录表简单分页查询
* @param tApprovalRecord 审批记录表
* @return
*/
IPage
<
TA
pprovalRecord
>
getTApprovalRecordPage
(
Page
<
TApprovalRecord
>
page
,
TApproval
RecordSearchVo
tApprovalRecord
);
IPage
<
TA
uditRecord
>
getTApprovalRecordPage
(
Page
<
TAuditRecord
>
page
,
TAudit
RecordSearchVo
tApprovalRecord
);
/**
* 通过实体id和审核类型查询所有的审核记录
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insuran
ce/impl/AbastractAuditProcess.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/servi
ce/impl/AbastractAuditProcess.java
View file @
4f997c00
This diff is collapsed.
Click to expand it.
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insuran
ce/impl/TAuditCopyInfoServiceImpl.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/servi
ce/impl/TAuditCopyInfoServiceImpl.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insuran
ce
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
servi
ce
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.
insurances
.entity.TAuditCopyInfo
;
import
com.yifu.cloud.plus.v1.yifu.
insurances.mapper.insurances
.TAuditCopyInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.
insurances.service.insuran
ce.TAuditCopyInfoService
;
import
com.yifu.cloud.plus.v1.yifu.
salary
.entity.TAuditCopyInfo
;
import
com.yifu.cloud.plus.v1.yifu.
salary.mapper
.TAuditCopyInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.
salary.servi
ce.TAuditCopyInfoService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insuran
ce/impl/TAuditNodeProocessServiceImpl.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/servi
ce/impl/TAuditNodeProocessServiceImpl.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insuran
ce
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
servi
ce
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.
insurances
.entity.TAuditNodeProocess
;
import
com.yifu.cloud.plus.v1.yifu.
insurances.mapper.insurances
.TAuditNodeProocessMapper
;
import
com.yifu.cloud.plus.v1.yifu.
insurances.service.insuran
ce.TAuditNodeProocessService
;
import
com.yifu.cloud.plus.v1.yifu.
salary
.entity.TAuditNodeProocess
;
import
com.yifu.cloud.plus.v1.yifu.
salary.mapper
.TAuditNodeProocessMapper
;
import
com.yifu.cloud.plus.v1.yifu.
salary.servi
ce.TAuditNodeProocessService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
/**
* 审批主流程记录表节点表
*
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TApproval
RecordServiceImpl.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TAudit
RecordServiceImpl.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insuran
ce
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
servi
ce
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.common.collect.Maps
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TApprovalRecord
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TApprovalRecordMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TApprovalRecordService
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditRecord
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TAuditRecordMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TAuditRecordService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TAuditRecordSearchVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TApprovalRecordSearchVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -24,15 +24,15 @@ import java.util.Map;
*/
@Log4j2
@Service
public
class
TA
pprovalRecordServiceImpl
extends
ServiceImpl
<
TApprovalRecordMapper
,
TApprovalRecord
>
implements
TApproval
RecordService
{
public
class
TA
uditRecordServiceImpl
extends
ServiceImpl
<
TAuditRecordMapper
,
TAuditRecord
>
implements
TAudit
RecordService
{
/**
* 审批记录表简单分页查询
* @param tApprovalRecord 审批记录表
* @return
*/
@Override
public
IPage
<
TA
pprovalRecord
>
getTApprovalRecordPage
(
Page
<
TApprovalRecord
>
page
,
TApproval
RecordSearchVo
tApprovalRecord
){
return
baseMapper
.
getTA
pproval
RecordPage
(
page
,
tApprovalRecord
);
public
IPage
<
TA
uditRecord
>
getTApprovalRecordPage
(
Page
<
TAuditRecord
>
page
,
TAudit
RecordSearchVo
tApprovalRecord
){
return
baseMapper
.
getTA
udit
RecordPage
(
page
,
tApprovalRecord
);
}
/**
...
...
@@ -46,7 +46,7 @@ public class TApprovalRecordServiceImpl extends ServiceImpl<TApprovalRecordMappe
public
R
<
Map
<
String
,
Object
>>
getAuditInfoByDomainIdAndAuditType
(
String
domainId
,
String
auditType
)
{
Map
<
String
,
Object
>
resultMap
=
Maps
.
newHashMap
();
// 获取审批列表
List
<
TA
pprovalRecord
>
auditInfoList
=
baseMapper
.
getApproval
RecordList
(
domainId
,
auditType
);
List
<
TA
uditRecord
>
auditInfoList
=
baseMapper
.
getAudit
RecordList
(
domainId
,
auditType
);
resultMap
.
put
(
"auditInfo"
,
auditInfoList
);
return
new
R
<>(
resultMap
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TInsuranceUnpurchaseApplyServiceImpl.java
View file @
4f997c00
...
...
@@ -22,6 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePerson;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TInsuranceUnpurchaseApplyMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchaseApplyService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.impl.process.TInsuranceUnpurchaseApplyAuditProcess
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchaseApplySearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchaseApplyVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonAddVo
;
...
...
@@ -32,6 +33,7 @@ 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.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -64,10 +66,9 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
@Resource
private
CacheManager
cacheManager
;
// @Resource
// @Lazy
// private TInsuranceUnpurchaseApplyAuditProcess tInsuranceUnpurchaseApplyAuditProcess;
@Resource
@Lazy
private
TInsuranceUnpurchaseApplyAuditProcess
tInsuranceUnpurchaseApplyAuditProcess
;
/**
* 含风险项目不购买申请表简单分页查询
...
...
@@ -80,6 +81,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
return
baseMapper
.
getTInsuranceUnpurchaseApplyPage
(
page
,
tInsuranceUnpurchaseApply
);
}
@Override
public
R
deleteById
(
String
id
)
{
TInsuranceUnpurchaseApply
apply
=
baseMapper
.
selectById
(
id
);
if
(
Common
.
isNotNull
(
apply
))
{
...
...
@@ -394,8 +396,8 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
/**
* 审核数量
*
* @param userId
登录用户id
* @return
IPage
* @param userId 登录用户id
* @return
Map<String, Integer>
*/
@Override
public
Map
<
String
,
Integer
>
getAuditCount
(
String
userId
)
{
...
...
yifu-
insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insuran
ce/impl/process/TInsuranceUnpurchaseApplyAuditProcess.java
→
yifu-
salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/servi
ce/impl/process/TInsuranceUnpurchaseApplyAuditProcess.java
View file @
4f997c00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insuran
ce
.
impl
.
process
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
servi
ce
.
impl
.
process
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
...
...
@@ -8,9 +8,10 @@ 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.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TApprovalRecord
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TAuditNodeProocess
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl.AbastractAuditProcess
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditRecord
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditNodeProocess
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchaseApplyService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.impl.AbastractAuditProcess
;
import
com.yifu.cloud.plus.v1.yifu.process.constant.ProcessConstants
;
import
com.yifu.cloud.plus.v1.yifu.process.entity.TNodePrimission
;
import
com.yifu.cloud.plus.v1.yifu.process.entity.TNodeRoute
;
...
...
@@ -24,6 +25,7 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -37,44 +39,45 @@ import java.util.Map;
@Component
public
class
TInsuranceUnpurchaseApplyAuditProcess
extends
AbastractAuditProcess
<
TInsuranceUnpurchaseApply
,
TInsuranceUnpurchaseApplySearchVo
>
{
//
@Resource
//
private TInsuranceUnpurchaseApplyService tInsuranceUnpurchaseApplyService;
@Resource
private
TInsuranceUnpurchaseApplyService
tInsuranceUnpurchaseApplyService
;
@Override
public
R
<
String
>
auditSuccess
(
TInsuranceUnpurchaseApply
entity
,
TA
pproval
Record
approvalRecord
,
YifuUser
loginUser
)
{
public
R
<
String
>
auditSuccess
(
TInsuranceUnpurchaseApply
entity
,
TA
udit
Record
approvalRecord
,
YifuUser
loginUser
)
{
// 改实体审核状态为审核通过
entity
.
setAuditFlag
(
CommonConstants
.
THREE_STRING
);
// boolean res = tInsuranceUnpurchaseApplyService.updateById(entity);
// if (res) {
// // todo 删除当前实体所有的流程节点,数据量太大影响审批效率
// // 防止死锁,先查询再删除
// TAuditNodeProocess auditNodeProocessInfo = auditNodeProocessService.getOne(Wrappers.<TAuditNodeProocess>query().lambda()
// .eq(TAuditNodeProocess::getDomainId, entity.getId())
// .in(TAuditNodeProocess::getType, approvalRecord.getAuditType())
// .last(CommonConstants.SQL_LIMIT_ONE));
// if(Common.isNotKong(auditNodeProocessInfo)) {
// auditNodeProocessService.remove(Wrappers.<TAuditNodeProocess>query().lambda().eq(TAuditNodeProocess::getDomainId, entity.getId())
// .in(TAuditNodeProocess::getType, approvalRecord.getAuditType()));
// }
// //记录末尾节点审核
// //sysMessageInfoService.saveApprovalLastAgree(CrmConstants.OPPORTUNITY_MODUL_TYPE, approvalRecord);
//
// }
entity
.
setAuditUser
(
""
);
entity
.
setAuditUserId
(
""
);
boolean
res
=
tInsuranceUnpurchaseApplyService
.
updateById
(
entity
);
if
(
res
)
{
// todo 删除当前实体所有的流程节点,数据量太大影响审批效率
// 防止死锁,先查询再删除
TAuditNodeProocess
auditNodeProocessInfo
=
auditNodeProocessService
.
getOne
(
Wrappers
.<
TAuditNodeProocess
>
query
().
lambda
()
.
eq
(
TAuditNodeProocess:
:
getDomainId
,
entity
.
getId
())
.
in
(
TAuditNodeProocess:
:
getType
,
approvalRecord
.
getAuditType
())
.
last
(
CommonConstants
.
SQL_LIMIT_ONE
));
if
(
Common
.
isNotKong
(
auditNodeProocessInfo
))
{
auditNodeProocessService
.
remove
(
Wrappers
.<
TAuditNodeProocess
>
query
().
lambda
().
eq
(
TAuditNodeProocess:
:
getDomainId
,
entity
.
getId
())
.
in
(
TAuditNodeProocess:
:
getType
,
approvalRecord
.
getAuditType
()));
}
}
return
R
.
ok
(
"审核通过"
);
}
@Override
public
R
<
String
>
auditSuccessAndNex
(
TInsuranceUnpurchaseApply
entity
,
List
<
SysUser
>
remoteSysUserList
,
TA
pproval
Record
approvalRecord
)
{
public
R
<
String
>
auditSuccessAndNex
(
TInsuranceUnpurchaseApply
entity
,
List
<
SysUser
>
remoteSysUserList
,
TA
udit
Record
approvalRecord
)
{
return
R
.
ok
(
"审核通过"
);
}
@Override
public
R
<
String
>
auditFail
(
TInsuranceUnpurchaseApply
entity
,
TA
pproval
Record
approvalRecord
)
{
public
R
<
String
>
auditFail
(
TInsuranceUnpurchaseApply
entity
,
TA
udit
Record
approvalRecord
)
{
// 以后有抄送再加逻辑:参照crm-更改之前抄送记录状态为0
// 改实体审核状态为审核不通过
entity
.
setAuditFlag
(
CommonConstants
.
FOUR_STRING
);
// tInsuranceUnpurchaseApplyService.updateById(entity);
entity
.
setAuditUser
(
""
);
entity
.
setAuditUserId
(
""
);
tInsuranceUnpurchaseApplyService
.
updateById
(
entity
);
// todo 删除当前实体所有的流程节点,数据量太大影响审批效率
// 防止死锁,先查询再删除
...
...
@@ -88,8 +91,6 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
.
in
(
TAuditNodeProocess:
:
getType
,
approvalRecord
.
getAuditType
()));
}
//记录末尾节点审核
//sysMessageInfoService.saveApprovalRejectToSubmit(CrmConstants.OPPORTUNITY_MODUL_TYPE, approvalRecord);
return
R
.
ok
(
"审核成功"
);
}
...
...
@@ -114,7 +115,7 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
}
@Override
public
R
<
String
>
sendMessage
(
List
<
SysUser
>
users
,
TInsuranceUnpurchaseApply
entity
,
String
type
,
TA
pproval
Record
approvalRecord
)
{
public
R
<
String
>
sendMessage
(
List
<
SysUser
>
users
,
TInsuranceUnpurchaseApply
entity
,
String
type
,
TA
udit
Record
approvalRecord
)
{
sendMessageToWx
(
users
,
entity
,
type
,
approvalRecord
);
return
R
.
ok
(
null
,
ResultConstants
.
SUCCESS_INFO
);
}
...
...
@@ -144,7 +145,7 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
* 功能描述: 企业微信发送通知
* @Param: [users, customerContract, type 发送提示类型 1审批 2抄送]
*/
private
void
sendMessageToWx
(
List
<
SysUser
>
users
,
TInsuranceUnpurchaseApply
insuranceUnpurchaseApply
,
String
type
,
TA
pproval
Record
approvalRecord
)
{
private
void
sendMessageToWx
(
List
<
SysUser
>
users
,
TInsuranceUnpurchaseApply
insuranceUnpurchaseApply
,
String
type
,
TA
udit
Record
approvalRecord
)
{
StringBuilder
sendUser
=
null
;
for
(
SysUser
user
:
users
)
{
...
...
@@ -197,8 +198,7 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
contentItemMap
=
new
HashMap
<>();
contentItemMap
.
put
(
"key"
,
"不购买人数:"
);
// todo 等雨辰的字段
contentItemMap
.
put
(
"value"
,
insuranceUnpurchaseApply
.
getDeptNo
());
contentItemMap
.
put
(
"value"
,
insuranceUnpurchaseApply
.
getUnbuyNum
());
contentItemList
.
add
(
contentItemMap
);
textcard
.
put
(
"content_item"
,
contentItemList
);
...
...
yifu-
insurances/yifu-insurances-biz/src/main/resources/mapper/insurances
/TAuditCopyInfoMapper.xml
→
yifu-
salary/yifu-salary-biz/src/main/resources/mapper
/TAuditCopyInfoMapper.xml
View file @
4f997c00
<?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.yifu.
insurances.mapper.insurances
.TAuditCopyInfoMapper"
>
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.
salary.mapper
.TAuditCopyInfoMapper"
>
<resultMap
id=
"tAuditCopyInfoMap"
type=
"com.yifu.cloud.plus.v1.yifu.
insurances
.entity.TAuditCopyInfo"
>
<resultMap
id=
"tAuditCopyInfoMap"
type=
"com.yifu.cloud.plus.v1.yifu.
salary
.entity.TAuditCopyInfo"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"auditUserId"
column=
"audit_user_id"
/>
<result
property=
"auditUser"
column=
"audit_user"
/>
...
...
yifu-
insurances/yifu-insurances-biz/src/main/resources/mapper/insurances
/TAuditNodeProocessMapper.xml
→
yifu-
salary/yifu-salary-biz/src/main/resources/mapper
/TAuditNodeProocessMapper.xml
View file @
4f997c00
<?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.yifu.
insurances.mapper.insurances
.TAuditNodeProocessMapper"
>
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.
salary.mapper
.TAuditNodeProocessMapper"
>
<resultMap
id=
"tAuditNodeProocessMap"
type=
"com.yifu.cloud.plus.v1.yifu.
insurances
.entity.TAuditNodeProocess"
>
<resultMap
id=
"tAuditNodeProocessMap"
type=
"com.yifu.cloud.plus.v1.yifu.
salary
.entity.TAuditNodeProocess"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"processId"
column=
"process_id"
/>
<result
property=
"nodeId"
column=
"node_id"
/>
...
...
yifu-
insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TApproval
RecordMapper.xml
→
yifu-
salary/yifu-salary-biz/src/main/resources/mapper/TAudit
RecordMapper.xml
View file @
4f997c00
<?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.yifu.
insurances.mapper.insurances.TApproval
RecordMapper"
>
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.
salary.mapper.TAudit
RecordMapper"
>
<resultMap
id=
"tA
pprovalRecordMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TApproval
Record"
>
<resultMap
id=
"tA
uditRecordMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TAudit
Record"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"flowId"
column=
"flow_id"
/>
<result
property=
"domainId"
column=
"domain_id"
/>
...
...
@@ -53,92 +53,92 @@
a.back_node_id,
a.add_sign_node_id
</sql>
<sql
id=
"tA
pproval
Record_where"
>
<if
test=
"tA
pproval
Record != null"
>
<if
test=
"tA
pprovalRecord.id != null and tApproval
Record.id.trim() != ''"
>
AND a.id = #{tA
pproval
Record.id}
<sql
id=
"tA
udit
Record_where"
>
<if
test=
"tA
udit
Record != null"
>
<if
test=
"tA
uditRecord.id != null and tAudit
Record.id.trim() != ''"
>
AND a.id = #{tA
udit
Record.id}
</if>
<if
test=
"tA
pprovalRecord.flowId != null and tApproval
Record.flowId.trim() != ''"
>
AND a.flow_id = #{tA
pproval
Record.flowId}
<if
test=
"tA
uditRecord.flowId != null and tAudit
Record.flowId.trim() != ''"
>
AND a.flow_id = #{tA
udit
Record.flowId}
</if>
<if
test=
"tA
pprovalRecord.domainId != null and tApproval
Record.domainId.trim() != ''"
>
AND a.domain_id = #{tA
pproval
Record.domainId}
<if
test=
"tA
uditRecord.domainId != null and tAudit
Record.domainId.trim() != ''"
>
AND a.domain_id = #{tA
udit
Record.domainId}
</if>
<if
test=
"tA
pprovalRecord.nodeId != null and tApproval
Record.nodeId.trim() != ''"
>
AND a.node_id = #{tA
pproval
Record.nodeId}
<if
test=
"tA
uditRecord.nodeId != null and tAudit
Record.nodeId.trim() != ''"
>
AND a.node_id = #{tA
udit
Record.nodeId}
</if>
<if
test=
"tA
pprovalRecord.approvalMan != null and tApproval
Record.approvalMan.trim() != ''"
>
AND a.approval_man = #{tA
pproval
Record.approvalMan}
<if
test=
"tA
uditRecord.approvalMan != null and tAudit
Record.approvalMan.trim() != ''"
>
AND a.approval_man = #{tA
udit
Record.approvalMan}
</if>
<if
test=
"tA
pprovalRecord.approvalManName != null and tApproval
Record.approvalManName.trim() != ''"
>
AND a.approval_man_name = #{tA
pproval
Record.approvalManName}
<if
test=
"tA
uditRecord.approvalManName != null and tAudit
Record.approvalManName.trim() != ''"
>
AND a.approval_man_name = #{tA
udit
Record.approvalManName}
</if>
<if
test=
"tA
pproval
Record.approvalTime != null"
>
AND a.approval_time = #{tA
pproval
Record.approvalTime}
<if
test=
"tA
udit
Record.approvalTime != null"
>
AND a.approval_time = #{tA
udit
Record.approvalTime}
</if>
<if
test=
"tA
pprovalRecord.approvalResult != null and tApproval
Record.approvalResult.trim() != ''"
>
AND a.approval_result = #{tA
pproval
Record.approvalResult}
<if
test=
"tA
uditRecord.approvalResult != null and tAudit
Record.approvalResult.trim() != ''"
>
AND a.approval_result = #{tA
udit
Record.approvalResult}
</if>
<if
test=
"tA
pprovalRecord.approvalOpinion != null and tApproval
Record.approvalOpinion.trim() != ''"
>
AND a.approval_opinion = #{tA
pproval
Record.approvalOpinion}
<if
test=
"tA
uditRecord.approvalOpinion != null and tAudit
Record.approvalOpinion.trim() != ''"
>
AND a.approval_opinion = #{tA
udit
Record.approvalOpinion}
</if>
<if
test=
"tA
pprovalRecord.deleteFlag != null and tApproval
Record.deleteFlag.trim() != ''"
>
AND a.delete_flag = #{tA
pproval
Record.deleteFlag}
<if
test=
"tA
uditRecord.deleteFlag != null and tAudit
Record.deleteFlag.trim() != ''"
>
AND a.delete_flag = #{tA
udit
Record.deleteFlag}
</if>
<if
test=
"tA
pprovalRecord.preFlag != null and tApproval
Record.preFlag.trim() != ''"
>
AND a.pre_flag = #{tA
pproval
Record.preFlag}
<if
test=
"tA
uditRecord.preFlag != null and tAudit
Record.preFlag.trim() != ''"
>
AND a.pre_flag = #{tA
udit
Record.preFlag}
</if>
<if
test=
"tA
pprovalRecord.submitMan != null and tApproval
Record.submitMan.trim() != ''"
>
AND a.submit_man = #{tA
pproval
Record.submitMan}
<if
test=
"tA
uditRecord.submitMan != null and tAudit
Record.submitMan.trim() != ''"
>
AND a.submit_man = #{tA
udit
Record.submitMan}
</if>
<if
test=
"tA
pprovalRecord.submitManName != null and tApproval
Record.submitManName.trim() != ''"
>
AND a.submit_man_name = #{tA
pproval
Record.submitManName}
<if
test=
"tA
uditRecord.submitManName != null and tAudit
Record.submitManName.trim() != ''"
>
AND a.submit_man_name = #{tA
udit
Record.submitManName}
</if>
<if
test=
"tA
pprovalRecord.reason != null and tApproval
Record.reason.trim() != ''"
>
AND a.reason = #{tA
pproval
Record.reason}
<if
test=
"tA
uditRecord.reason != null and tAudit
Record.reason.trim() != ''"
>
AND a.reason = #{tA
udit
Record.reason}
</if>
<if
test=
"tA
pprovalRecord.auditType != null and tApproval
Record.auditType.trim() != ''"
>
AND a.audit_type = #{tA
pproval
Record.auditType}
<if
test=
"tA
uditRecord.auditType != null and tAudit
Record.auditType.trim() != ''"
>
AND a.audit_type = #{tA
udit
Record.auditType}
</if>
<if
test=
"tA
pproval
Record.createTime != null"
>
AND a.create_time = #{tA
pproval
Record.createTime}
<if
test=
"tA
udit
Record.createTime != null"
>
AND a.create_time = #{tA
udit
Record.createTime}
</if>
<if
test=
"tA
pprovalRecord.nodeName != null and tApproval
Record.nodeName.trim() != ''"
>
AND a.node_name = #{tA
pproval
Record.nodeName}
<if
test=
"tA
uditRecord.nodeName != null and tAudit
Record.nodeName.trim() != ''"
>
AND a.node_name = #{tA
udit
Record.nodeName}
</if>
<if
test=
"tA
pprovalRecord.entityName != null and tApproval
Record.entityName.trim() != ''"
>
AND a.entity_name = #{tA
pproval
Record.entityName}
<if
test=
"tA
uditRecord.entityName != null and tAudit
Record.entityName.trim() != ''"
>
AND a.entity_name = #{tA
udit
Record.entityName}
</if>
<if
test=
"tA
pproval
Record.submitCreateTime != null"
>
AND a.submit_create_time = #{tA
pproval
Record.submitCreateTime}
<if
test=
"tA
udit
Record.submitCreateTime != null"
>
AND a.submit_create_time = #{tA
udit
Record.submitCreateTime}
</if>
<if
test=
"tA
pprovalRecord.backFlag != null and tApproval
Record.backFlag.trim() != ''"
>
AND a.back_flag = #{tA
pproval
Record.backFlag}
<if
test=
"tA
uditRecord.backFlag != null and tAudit
Record.backFlag.trim() != ''"
>
AND a.back_flag = #{tA
udit
Record.backFlag}
</if>
<if
test=
"tA
pprovalRecord.backNodeName != null and tApproval
Record.backNodeName.trim() != ''"
>
AND a.back_node_name = #{tA
pproval
Record.backNodeName}
<if
test=
"tA
uditRecord.backNodeName != null and tAudit
Record.backNodeName.trim() != ''"
>
AND a.back_node_name = #{tA
udit
Record.backNodeName}
</if>
<if
test=
"tA
pprovalRecord.backNodeId != null and tApproval
Record.backNodeId.trim() != ''"
>
AND a.back_node_id = #{tA
pproval
Record.backNodeId}
<if
test=
"tA
uditRecord.backNodeId != null and tAudit
Record.backNodeId.trim() != ''"
>
AND a.back_node_id = #{tA
udit
Record.backNodeId}
</if>
<if
test=
"tA
pprovalRecord.addSignNodeId != null and tApproval
Record.addSignNodeId.trim() != ''"
>
AND a.add_sign_node_id = #{tA
pproval
Record.addSignNodeId}
<if
test=
"tA
uditRecord.addSignNodeId != null and tAudit
Record.addSignNodeId.trim() != ''"
>
AND a.add_sign_node_id = #{tA
udit
Record.addSignNodeId}
</if>
</if>
</sql>
<!--tA
pproval
Record简单分页查询-->
<select
id=
"getTA
pprovalRecordPage"
resultMap=
"tApproval
RecordMap"
>
<!--tA
udit
Record简单分页查询-->
<select
id=
"getTA
uditRecordPage"
resultMap=
"tAudit
RecordMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_a
pproval
_record a
FROM t_a
udit
_record a
<where>
1=1
<include
refid=
"tA
pproval
Record_where"
/>
<include
refid=
"tA
udit
Record_where"
/>
</where>
</select>
<!--查询审核记录数据-->
<select
id=
"getA
pprovalRecordList"
resultMap=
"tApproval
RecordMap"
>
<select
id=
"getA
uditRecordList"
resultMap=
"tAudit
RecordMap"
>
SELECT
a.id,
a.flow_id,
...
...
@@ -156,7 +156,7 @@
a.node_name,
a.entity_name,
a.submit_create_time
FROM t_a
pproval
_record a
FROM t_a
udit
_record a
<where>
a.domain_id = #{domainId} AND a.audit_type = #{auditType}
AND a.delete_flag = '0'
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TInsuranceUnpurchaseApplyMapper.xml
View file @
4f997c00
...
...
@@ -142,7 +142,7 @@
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_insurance_unpurchase_apply a
left join t_a
pproval
_record r on a.id=r.domain_id
left join t_a
udit
_record r on a.id=r.domain_id
<where>
a.DELETE_FLAG='0' and r.approval_man= #{userId} and r.audit_type='0' and r.approval_result = '2' and r.delete_flag='0'
<include
refid=
"tInsuranceUnpurchaseApply_where"
/>
...
...
@@ -155,7 +155,7 @@
<include
refid=
"Base_Column_List"
/>
FROM t_insurance_unpurchase_apply a
left join (
select min(approval_time) approval_time,domain_id,approval_man from t_a
pproval
_record
select min(approval_time) approval_time,domain_id,approval_man from t_a
udit
_record
where approval_result in('0','1') and audit_type = '0' and delete_flag='0'
group by domain_id,approval_man
) r on a.id=r.domain_id
...
...
@@ -163,12 +163,12 @@
a.DELETE_FLAG='0' and r.approval_man= #{userId}
<include
refid=
"tInsuranceUnpurchaseApply_where"
/>
</where>
order by
r.approval_time desc
order by r.approval_time desc
</select>
<select
id=
"getAuditCount"
resultType=
"integer"
>
SELECT count(1) FROM t_insurance_unpurchase_apply a
left join t_a
pproval
_record r on a.id=r.domain_id
left join t_a
udit
_record r on a.id=r.domain_id
<where>
a.DELETE_FLAG='0' and r.approval_man= #{userId} and r.audit_type='0' and r.approval_result = '2' and r.delete_flag='0'
</where>
...
...
@@ -177,7 +177,7 @@
<select
id=
"getHistoryHandleCount"
resultType=
"integer"
>
SELECT count(1) FROM t_insurance_unpurchase_apply a
left join (
select min(approval_time) approval_time,domain_id,approval_man from t_a
pproval
_record
select min(approval_time) approval_time,domain_id,approval_man from t_a
udit
_record
where approval_result in('0','1') and audit_type = '0' and delete_flag='0'
group by domain_id,approval_man
) r on a.id=r.domain_id
...
...
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