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
5645ad17
Commit
5645ad17
authored
Jun 30, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huyc 项目档案代码提交
parent
9c1f2c44
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
651 additions
and
10 deletions
+651
-10
FddContractInfoController.java
...1/yifu/archives/controller/FddContractInfoController.java
+142
-1
FddContractInfoService.java
...plus/v1/yifu/archives/service/FddContractInfoService.java
+80
-2
FddContractInfoServiceImpl.java
...ifu/archives/service/impl/FddContractInfoServiceImpl.java
+429
-7
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/FddContractInfoController.java
View file @
5645ad17
...
...
@@ -19,11 +19,18 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.fadada.api.bean.rsp.sign.SignUrlRsp
;
import
com.fadada.api.exception.ApiException
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.FddContractAttachInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.FddContractInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.utils.FddUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
...
...
@@ -32,6 +39,11 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Map
;
/**
* 法大大合同与员工合同信息
...
...
@@ -48,6 +60,8 @@ public class FddContractInfoController {
private
final
FddContractInfoService
fddContractInfoService
;
private
final
FddContractAttachInfoService
fddContractAttachInfoService
;
/**
* 分页查询
* @param page 分页对象
...
...
@@ -123,6 +137,133 @@ public class FddContractInfoController {
@SysLog
(
"发送法大大电子合同定稿任务"
)
@PostMapping
(
"/send"
)
public
R
<
String
>
send
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
return
fddContractInfoService
.
saveEmpContract
(
fddContractInfo
);
FddContractAttachInfo
fddContractAttachInfo
=
fddContractAttachInfoService
.
getById
(
fddContractInfo
.
getId
());
return
fddContractInfoService
.
saveEmpContract
(
fddContractAttachInfo
);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description:作废重签
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"作废重签"
,
description
=
"作废重签"
)
@PostMapping
(
"/invalidAndsend"
)
public
R
<
String
>
invalidAndsend
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
return
fddContractInfoService
.
invalidAndsend
(
fddContractInfo
);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description:公司获取在线定稿地址
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"公司获取在线定稿地址"
,
description
=
"公司获取在线定稿地址"
)
@PostMapping
(
"/getCompanyFillFileUrl"
)
public
R
<
String
>
getCompanyFillFileUrl
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
return
fddContractInfoService
.
getFillFileUrl
(
fddContractInfo
,
FddUtil
.
COMPANY
);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 员工获取在线定稿地址
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"员工获取在线定稿地址"
,
description
=
"员工获取在线定稿地址"
)
@PostMapping
(
"/getPersonFillFileUrl"
)
public
R
<
String
>
getPersonFillFileUrl
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
return
fddContractInfoService
.
getFillFileUrl
(
fddContractInfo
,
FddUtil
.
PERSON
);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 引用模板创建签署任务
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"引用模板创建签署任务"
,
description
=
"引用模板创建签署任务"
)
@PostMapping
(
"/createTaskByDraftId"
)
public
R
<
String
>
createTaskByDraftId
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
//获取法大大电子合同
FddContractInfo
entity
=
fddContractInfoService
.
getById
(
fddContractInfo
.
getId
());
if
(
entity
==
null
)
{
return
R
.
failed
(
"未查询到相关记录"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
FddContractAttachInfo
fddContractAttachInfo
=
fddContractAttachInfoService
.
getOne
(
Wrappers
.<
FddContractAttachInfo
>
query
().
lambda
()
.
eq
(
FddContractAttachInfo:
:
getContractId
,
entity
.
getContractId
()));
if
(!
user
.
getId
().
equals
(
fddContractAttachInfo
.
getCreateBy
()))
{
return
R
.
failed
(
"当前用户不是电子合同导入用户,不能操作"
);
}
R
<
String
>
returnR
=
fddContractInfoService
.
createTaskByDraftId
(
entity
);
if
(
returnR
!=
null
)
{
//记录返回信息
if
(
returnR
.
getCode
()==
CommonConstants
.
SUCCESS
){
fddContractInfo
.
setRemark
(
"成功"
);
}
else
{
fddContractInfo
.
setRemark
(
returnR
.
getMsg
());
}
}
fddContractInfoService
.
updateById
(
fddContractInfo
);
return
returnR
;
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 获取签署链接
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"获取签署链接"
,
description
=
"获取签署链接"
)
@PostMapping
(
"/getSignUrl"
)
public
R
<
Map
<
String
,
List
<
SignUrlRsp
>>>
getSignUrl
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
return
fddContractInfoService
.
getSignUrl
(
fddContractInfo
);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 获取签署文件预览地址
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"获取签署文件预览地址"
,
description
=
"获取签署文件预览地址"
)
@PostMapping
(
"/getSignPreviewUrl"
)
public
R
<
String
>
getSignPreviewUrl
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
return
fddContractInfoService
.
getSignPreviewUrl
(
fddContractInfo
);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 签署文件下载
**/
@Operation
(
summary
=
"签署文件下载"
,
description
=
"签署文件下载"
)
@PostMapping
(
"/getBySignFileId"
)
public
void
getBySignFileId
(
FddContractInfo
fddContractInfo
,
HttpServletResponse
response
)
throws
ApiException
,
IOException
{
fddContractInfoService
.
getBySignFileId
(
fddContractInfo
,
response
);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 签署文件转移为合同附件
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"签署文件转移为合同附件"
,
description
=
"签署文件转移为合同附件"
)
@PostMapping
(
"/moveFileToEmpConcat"
)
public
R
<
String
>
moveFileToEmpConcat
(
FddContractInfo
fddContractInfo
,
HttpServletResponse
response
)
throws
ApiException
,
IOException
{
return
fddContractInfoService
.
moveFileToEmpConcat
(
fddContractInfo
,
response
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/FddContractInfoService.java
View file @
5645ad17
...
...
@@ -17,12 +17,18 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.fadada.api.bean.rsp.sign.SignUrlRsp
;
import
com.fadada.api.exception.ApiException
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Map
;
/**
* 法大大合同与员工合同信息
*
...
...
@@ -31,5 +37,77 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
*/
public
interface
FddContractInfoService
extends
IService
<
FddContractInfo
>
{
R
<
String
>
saveEmpContract
(
FddContractInfo
fddContractInfo
)
throws
ApiException
;
/**
* 发送法大大电子合同定稿任务
* @param fddContractInfo 法大大合同信息表
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R
<
String
>
saveEmpContract
(
FddContractAttachInfo
fddContractInfo
)
throws
ApiException
;
/**
* 作废重签
* @param fddContractInfo 法大大合同信息表
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R
<
String
>
invalidAndsend
(
FddContractInfo
fddContractInfo
)
throws
ApiException
;
/**
* 获取在线定稿地址
* @param fddContractInfo
* @param roleName
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R
<
String
>
getFillFileUrl
(
FddContractInfo
fddContractInfo
,
String
roleName
)
throws
ApiException
;
/**
* 引用模板创建签署任务
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R
<
String
>
createTaskByDraftId
(
FddContractInfo
fddContractInfo
)
throws
ApiException
;
/**
* 获取签署链接
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R
<
Map
<
String
,
List
<
SignUrlRsp
>>>
getSignUrl
(
FddContractInfo
fddContractInfo
)
throws
ApiException
;
/**
* 获取签署链接
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R
<
String
>
getSignPreviewUrl
(
FddContractInfo
fddContractInfo
)
throws
ApiException
;
/**
* 获取签署链接
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @return: void
*/
void
getBySignFileId
(
FddContractInfo
fddContractInfo
,
HttpServletResponse
response
)
throws
ApiException
,
IOException
;
/**
* 签署文件转移为合同附件
* @param fddContractInfo
* @param response
* @Author: huyc
* @Date: 2022/6/30
* @return: R
**/
R
<
String
>
moveFileToEmpConcat
(
FddContractInfo
fddContractInfo
,
HttpServletResponse
response
)
throws
ApiException
,
IOException
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/FddContractInfoServiceImpl.java
View file @
5645ad17
This diff is collapsed.
Click to expand it.
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