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
ae9134e1
Commit
ae9134e1
authored
Jul 19, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fdd 代码修改
parent
4f4298c5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
244 additions
and
186 deletions
+244
-186
FddContractAttachInfo.java
...d/plus/v1/yifu/archives/entity/FddContractAttachInfo.java
+9
-7
FddTemplateFieldInfo.java
...ud/plus/v1/yifu/archives/entity/FddTemplateFieldInfo.java
+2
-2
FddContractAttachInfoController.java
.../archives/controller/FddContractAttachInfoController.java
+55
-27
FddContractInfoController.java
...1/yifu/archives/controller/FddContractInfoController.java
+2
-1
FddController.java
...cloud/plus/v1/yifu/archives/controller/FddController.java
+9
-6
FddContractInfoService.java
...plus/v1/yifu/archives/service/FddContractInfoService.java
+2
-1
FddContractAttachInfoServiceImpl.java
...chives/service/impl/FddContractAttachInfoServiceImpl.java
+105
-83
FddContractInfoServiceImpl.java
...ifu/archives/service/impl/FddContractInfoServiceImpl.java
+51
-59
ErrorMessage.java
...ifu/cloud/plus/v1/yifu/common/core/util/ErrorMessage.java
+9
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/FddContractAttachInfo.java
View file @
ae9134e1
...
...
@@ -82,7 +82,7 @@ public class FddContractAttachInfo extends BaseEntity {
* 合同到期时间
*/
@Schema
(
description
=
"合同到期时间"
)
@ExcelAttribute
(
name
=
"合同到期时间"
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"合同到期时间"
,
isNotEmpty
=
true
,
errorInfo
=
"合同到期时间不能为空"
)
private
Date
contractEnd
;
/**
...
...
@@ -125,8 +125,8 @@ public class FddContractAttachInfo extends BaseEntity {
* 岗位
*/
@Schema
(
description
=
"岗位"
)
@Length
(
max
=
20
0
,
message
=
"岗位不能超过20
0个字符"
)
@ExcelAttribute
(
name
=
"岗位"
,
isNotEmpty
=
true
,
errorInfo
=
"岗位不能为空"
,
maxLength
=
20
0
,
needExport
=
true
)
@Length
(
max
=
20
,
message
=
"岗位不能超过2
0个字符"
)
@ExcelAttribute
(
name
=
"岗位"
,
isNotEmpty
=
true
,
errorInfo
=
"岗位不能为空"
,
maxLength
=
20
,
needExport
=
true
)
private
String
post
;
/**
...
...
@@ -151,13 +151,14 @@ public class FddContractAttachInfo extends BaseEntity {
* 法大大模板id
*/
@Schema
(
description
=
"法大大模板id"
)
private
String
fddTemplateId
;
@ExcelAttribute
(
name
=
"法大大模板id"
)
private
String
fddTemplateId
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"员工
合同id
姓名不能为空"
,
maxLength
=
32
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"员工姓名不能为空"
,
maxLength
=
32
,
needExport
=
true
)
private
String
empName
;
/**
...
...
@@ -171,7 +172,8 @@ public class FddContractAttachInfo extends BaseEntity {
* 手机号码
*/
@Schema
(
description
=
"手机号码"
)
private
String
empPhone
;
@ExcelAttribute
(
name
=
"手机号码"
,
isNotEmpty
=
true
,
errorInfo
=
"手机号码不能为空"
,
maxLength
=
32
,
needExport
=
true
)
private
String
empPhone
;
/**
* 结算主体编码
...
...
@@ -184,7 +186,7 @@ public class FddContractAttachInfo extends BaseEntity {
* 员工类型
*/
@Schema
(
description
=
"员工类型"
)
@ExcelAttribute
(
name
=
"员工类型"
,
is
DataId
=
true
,
errorInfo
=
"员工类型不能为空"
,
maxLength
=
20
)
@ExcelAttribute
(
name
=
"员工类型"
,
is
NotEmpty
=
true
,
errorInfo
=
"员工类型不能为空"
,
isDataId
=
true
,
dataType
=
"emp_natrue"
,
maxLength
=
20
,
needExport
=
true
)
private
String
empNatrue
;
/**
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/FddTemplateFieldInfo.java
View file @
ae9134e1
...
...
@@ -33,9 +33,9 @@ import lombok.EqualsAndHashCode;
*/
@Data
@TableName
(
"fdd_template_field_info"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
()
@Schema
(
description
=
"法大大字段对应信息表"
)
public
class
FddTemplateFieldInfo
extends
BaseEntity
{
public
class
FddTemplateFieldInfo
{
/**
* ID
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/FddContractAttachInfoController.java
View file @
ae9134e1
...
...
@@ -22,13 +22,10 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.FddContractAttachInfoService
;
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.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
...
...
@@ -41,9 +38,7 @@ import org.springframework.http.HttpHeaders;
import
org.springframework.web.bind.annotation.*
;
import
java.net.URLDecoder
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
...
...
@@ -143,21 +138,35 @@ public class FddContractAttachInfoController {
ExcelUtil
<
FddContractAttachInfo
>
util1
=
null
;
try
{
// // 调用字典服务,渲染字典值
// res = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId()
// , "/dict/inner/getDictList", null, Map.class, SecurityConstants.FROM_IN);
//
// Map<String, String> dicMap = new HashMap<>();
// if (null != res.getData().get("data")) {
// for (SysDictItem dict : res.getData().get("data")) {
// dicMap.put(dict.getType() + CommonConstants.DOWN_LINE_STRING + dict.getLabel(), dict.getValue());
// }
// }
// 渲染字典值
Map
<
String
,
String
>
dicMap
=
new
HashMap
<>();
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
()
.
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"emp_natrue"
);
if
(
Common
.
isNotNull
(
dicObj
))
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dicObj
.
entrySet
())
{
String
key
=
entry
.
getKey
();
String
Label
=
entry
.
getValue
();
dicMap
.
put
(
"emp_natrue"
+
CommonConstants
.
DOWN_LINE_STRING
+
Label
,
key
);
}
}
Map
<
String
,
String
>
dicObj1
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
()
.
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"salary_type"
);
if
(
Common
.
isNotNull
(
dicObj1
))
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dicObj1
.
entrySet
())
{
String
key1
=
entry
.
getKey
();
String
Label1
=
entry
.
getValue
();
dicMap
.
put
(
"salary_type"
+
CommonConstants
.
DOWN_LINE_STRING
+
Label1
,
key1
);
}
}
jsonString
=
URLDecoder
.
decode
(
jsonString
,
CommonConstants
.
UTF8
).
replace
(
"="
,
""
);
util1
=
new
ExcelUtil
<>(
FddContractAttachInfo
.
class
);
//传参字典数据MAP具体见方法实现
util1
.
getJsonStringToList
(
jsonString
,
null
);
util1
.
getJsonStringToList
(
jsonString
,
dicMap
);
if
(
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
())
{
return
R
.
failed
(
util1
.
getErrorInfo
(),
"数据异常"
);
}
else
{
...
...
@@ -165,7 +174,7 @@ public class FddContractAttachInfoController {
List
<
ErrorMessage
>
errorInfo
=
fddContractAttachInfoService
.
batchAdd
(
util1
.
getEntityList
());
Map
<
String
,
Object
>
variableMap
=
new
HashMap
<>();
Map
<
Integer
,
Object
>
map
=
new
HashMap
<>();
boolean
allExitContract
=
errorInfo
.
stream
().
allMatch
(
e
->
e
.
getMessage
().
equals
(
"存在“在用”的合同"
));
boolean
allExitContract
=
errorInfo
.
stream
().
allMatch
(
e
->
checkInfo
(
e
));
if
(
allExitContract
)
{
variableMap
.
put
(
"allMatch"
,
"true"
);
for
(
ErrorMessage
errorMessage
:
errorInfo
){
...
...
@@ -202,14 +211,28 @@ public class FddContractAttachInfoController {
ExcelUtil
<
FddContractAttachInfo
>
util1
=
null
;
try
{
// 调用字典服务,渲染字典值
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dict/inner/getDictList"
,
null
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
// 渲染字典值
Map
<
String
,
String
>
dicMap
=
new
HashMap
<>();
if
(
null
!=
res
.
getData
())
{
for
(
SysDictItem
dict
:
res
.
getData
())
{
dicMap
.
put
(
dict
.
getType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
dict
.
getLabel
(),
dict
.
getValue
());
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
()
.
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"emp_natrue"
);
if
(
Common
.
isNotNull
(
dicObj
))
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dicObj
.
entrySet
())
{
String
key
=
entry
.
getKey
();
String
Label
=
entry
.
getValue
();
dicMap
.
put
(
"emp_natrue"
+
CommonConstants
.
DOWN_LINE_STRING
+
Label
,
key
);
}
}
Map
<
String
,
String
>
dicObj1
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
()
.
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"salary_type"
);
if
(
Common
.
isNotNull
(
dicObj1
))
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dicObj1
.
entrySet
())
{
String
key1
=
entry
.
getKey
();
String
Label1
=
entry
.
getValue
();
dicMap
.
put
(
"salary_type"
+
CommonConstants
.
DOWN_LINE_STRING
+
Label1
,
key1
);
}
}
...
...
@@ -250,4 +273,9 @@ public class FddContractAttachInfoController {
List
<
ErrorMessage
>
errorInfo
=
fddContractAttachInfoService
.
sendTask
(
entityList
);
return
R
.
ok
(
errorInfo
);
}
public
boolean
checkInfo
(
ErrorMessage
errorMessage
)
{
Set
<
String
>
set
=
errorMessage
.
getErrors
();
return
set
.
stream
().
allMatch
(
e
->
e
.
equals
(
"存在“在用”的合同"
));
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/FddContractInfoController.java
View file @
ae9134e1
...
...
@@ -136,7 +136,8 @@ public class FddContractInfoController {
@PostMapping
(
"/send"
)
public
R
<
String
>
send
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
FddContractAttachInfo
fddContractAttachInfo
=
fddContractAttachInfoService
.
getById
(
fddContractInfo
.
getId
());
return
fddContractInfoService
.
saveEmpContract
(
fddContractAttachInfo
);
YifuUser
user
=
SecurityUtils
.
getUser
();
return
fddContractInfoService
.
saveEmpContract
(
fddContractAttachInfo
,
user
);
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/FddController.java
View file @
ae9134e1
...
...
@@ -12,6 +12,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
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.common.security.util.SecurityUtils
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -83,7 +85,7 @@ public class FddController {
fddPersonAccountService
.
updateById
(
fddPersonAccount
);
}
}
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
/**
...
...
@@ -127,7 +129,7 @@ public class FddController {
fddPersonAccount
.
setCompanyInfoId
(
companyInfo
.
getId
());
}
fddPersonAccountService
.
updateById
(
fddPersonAccount
);
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
}
}
...
...
@@ -157,6 +159,7 @@ public class FddController {
if
(
StringUtils
.
equals
(
CommonConstants
.
TWO_STRING
,
jsonObject
.
getString
(
"status"
)))
{
//成功
FddPersonAccount
entity
=
fddPersonAccountService
.
getById
(
clientId
);
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
entity
!=
null
)
{
entity
.
setRealStatus
(
CommonConstants
.
ONE_STRING
);
entity
.
setUnionid
(
unionId
);
...
...
@@ -172,7 +175,7 @@ public class FddController {
return
;
}
FddContractAttachInfo
fddContractAttachInfo
=
attachInfos
.
get
(
CommonConstants
.
ZERO_INT
);
R
<
String
>
returnR
=
fddContractInfoService
.
saveEmpContract
(
fddContractAttachInfo
);
R
<
String
>
returnR
=
fddContractInfoService
.
saveEmpContract
(
fddContractAttachInfo
,
user
);
if
(
returnR
!=
null
)
{
//记录返回信息
if
(
returnR
.
getCode
()==
CommonConstants
.
SUCCESS
){
...
...
@@ -186,7 +189,7 @@ public class FddController {
}
});
}
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
}
}
else
if
(
StringUtils
.
equals
(
fddEvent
,
"reviseTask"
))
{
...
...
@@ -218,7 +221,7 @@ public class FddController {
e
.
printStackTrace
();
}
});
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
}
}
else
if
(
StringUtils
.
equals
(
fddEvent
,
"sign"
))
{
...
...
@@ -260,7 +263,7 @@ public class FddController {
employeeContractInfoService
.
updateById
(
ec
);
}
}
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
else
if
(
StringUtils
.
equals
(
fddEvent
,
"notifyUrlVerify"
))
{
return
R
.
ok
(
null
,
"success"
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/FddContractInfoService.java
View file @
ae9134e1
...
...
@@ -23,6 +23,7 @@ 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
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
...
...
@@ -44,7 +45,7 @@ public interface FddContractInfoService extends IService<FddContractInfo> {
* @Date: 2022/6/30
* @return R
*/
R
<
String
>
saveEmpContract
(
FddContractAttachInfo
fddContractInfo
)
throws
ApiException
;
R
<
String
>
saveEmpContract
(
FddContractAttachInfo
fddContractInfo
,
YifuUser
user
)
throws
ApiException
;
/**
* 作废重签
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/FddContractAttachInfoServiceImpl.java
View file @
ae9134e1
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/FddContractInfoServiceImpl.java
View file @
ae9134e1
...
...
@@ -69,7 +69,9 @@ import org.springframework.stereotype.Service;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.BufferedOutputStream
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.time.LocalDate
;
import
java.time.ZoneId
;
...
...
@@ -107,27 +109,18 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
private
FddSealPersonAuthService
fddSealPersonAuthService
;
@Autowired
private
FddContractAttachInfoMapper
fddContractAttachInfoMapper
;
// @Autowired
// private TEmployeeContractInfoService employeeContractInfoService;
// @Autowired
// private TEmployeeInfoService employeeInfoService;
@Autowired
private
TEmployeeContractInfoService
employeeContractInfoService
;
@Autowired
private
FddTemplateFieldInfoService
fieldInfoService
;
// 阿里云文件上传服务
@Autowired
private
OSSUtil
ossUtil
;
// // 附件表
// @Autowired
// private TEmpAttaService empAttaService;
// // 附件-合同,关联表
// @Autowired
// private MEmpContractAttaService mempContractAttaService;
@Autowired
private
TSettleDomainService
tSettleDomainService
;
@Override
public
R
<
String
>
saveEmpContract
(
FddContractAttachInfo
fddContractAttachInfo
)
throws
ApiException
{
YifuUser
user
=
SecurityUtils
.
getUser
();
public
R
<
String
>
saveEmpContract
(
FddContractAttachInfo
fddContractAttachInfo
,
YifuUser
user
)
throws
ApiException
{
if
(!
user
.
getId
().
equals
(
fddContractAttachInfo
.
getCreateBy
()))
{
return
R
.
failed
(
"当前用户不是电子合同导入用户,不能操作"
);
}
...
...
@@ -560,50 +553,50 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
**/
@Override
public
R
<
String
>
moveFileToEmpConcat
(
FddContractInfo
fddContractInfo
,
HttpServletResponse
response
)
throws
ApiException
,
IOException
{
//
FddContractInfo entity = this.getById(fddContractInfo.getId());
//
if (entity == null || entity.getSignTaskId() == null) {
//
throw new CheckedException("未获取到对应签署任务");
//
}
//
TEmployeeContractInfo employeeContractInfo = employeeContractInfoService.getById(entity.getContractId());
//
if (employeeContractInfo != null) {
//
//发送请求
//
GetBySignFileIdReq req = new GetBySignFileIdReq();
//
req.setToken(fddUtil.getToken());
//
req.setTaskId(entity.getSignTaskId());
//
DocumentClient client = new DocumentClient(fddUtil.getFadadaApiClient());
//
BaseRsp<DownLoadFileRsp> rsp = client.getBySignFileId(req);
//
//校验参数
//
if (StringUtils.equals(rsp.getCode(), FddUtil.SUCCESS)) {
//
DownLoadFileRsp rspData = rsp.getData();
//
if (rspData != null) {
//
InputStream bis = null;
//
try {
//
bis = new ByteArrayInputStream(rspData.getFileBytes());
//
String name = System.currentTimeMillis() + "法大大电子签附件";
//
String key = name + ".zip";
//
ossUtil.uploadFileByStream(bis, key, null);
//
// 1:保存为
//
//
TEmpAtta empAtta = BasicServiceUtil.initTEmpAttaForInsert(name, key, (long) rspData.getFileBytes().length);
//
//
empAttaService.save(empAtta);
//
//
MEmpContractAtta contractAtta = new MEmpContractAtta();
//
//
contractAtta.setAttaId(empAtta.getId());
//
//
contractAtta.setContractId(employeeContractInfo.getId());
//
//
mempContractAttaService.save(contractAtta);
// FddContractAttachInfo fddContractAttachInfo = fddContractAttachInfoService.ge
tOne(Wrappers.<FddContractAttachInfo>query().lambda()
//
.eq(FddContractAttachInfo::getContractId,entity.getContractId()).last(CommonConstants.LAST_ONE_SQL));
//
if (fddContractAttachInfo != null) {
//
fddContractAttachInfo.setIsMove(CommonConstants.ONE_INT);
// fddContractAttachInfoService
.updateById(fddContractAttachInfo);
//
}
//
return R.ok();
//
} finally {
//
if (bis != null) {
//
bis.close();
//
}
//
}
//
}
//
}
//
}
FddContractInfo
entity
=
this
.
getById
(
fddContractInfo
.
getId
());
if
(
entity
==
null
||
entity
.
getSignTaskId
()
==
null
)
{
throw
new
CheckedException
(
"未获取到对应签署任务"
);
}
TEmployeeContractInfo
employeeContractInfo
=
employeeContractInfoService
.
getById
(
entity
.
getContractId
());
if
(
employeeContractInfo
!=
null
)
{
//发送请求
GetBySignFileIdReq
req
=
new
GetBySignFileIdReq
();
req
.
setToken
(
fddUtil
.
getToken
());
req
.
setTaskId
(
entity
.
getSignTaskId
());
DocumentClient
client
=
new
DocumentClient
(
fddUtil
.
getFadadaApiClient
());
BaseRsp
<
DownLoadFileRsp
>
rsp
=
client
.
getBySignFileId
(
req
);
//校验参数
if
(
StringUtils
.
equals
(
rsp
.
getCode
(),
FddUtil
.
SUCCESS
))
{
DownLoadFileRsp
rspData
=
rsp
.
getData
();
if
(
rspData
!=
null
)
{
InputStream
bis
=
null
;
try
{
bis
=
new
ByteArrayInputStream
(
rspData
.
getFileBytes
());
String
name
=
System
.
currentTimeMillis
()
+
"法大大电子签附件"
;
String
key
=
name
+
".zip"
;
ossUtil
.
uploadFileByStream
(
bis
,
key
,
null
);
// 1:保存为
// TEmpAtta empAtta = BasicServiceUtil.initTEmpAttaForInsert(name, key, (long) rspData.getFileBytes().length);
// empAttaService.save(empAtta);
// MEmpContractAtta contractAtta = new MEmpContractAtta();
// contractAtta.setAttaId(empAtta.getId());
// contractAtta.setContractId(employeeContractInfo.getId());
// mempContractAttaService.save(contractAtta);
FddContractAttachInfo
fddContractAttachInfo
=
fddContractAttachInfoMapper
.
selec
tOne
(
Wrappers
.<
FddContractAttachInfo
>
query
().
lambda
()
.
eq
(
FddContractAttachInfo:
:
getContractId
,
entity
.
getContractId
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
fddContractAttachInfo
!=
null
)
{
fddContractAttachInfo
.
setIsMove
(
CommonConstants
.
ONE_INT
);
fddContractAttachInfoMapper
.
updateById
(
fddContractAttachInfo
);
}
return
R
.
ok
();
}
finally
{
if
(
bis
!=
null
)
{
bis
.
close
();
}
}
}
}
}
return
R
.
failed
(
"转移失败"
);
}
...
...
@@ -878,6 +871,7 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
private
R
<
String
>
cancleReviSeTask
(
FddContractInfo
entity
)
throws
ApiException
{
YifuUser
user
=
SecurityUtils
.
getUser
();
//定稿任务状态:0 待发起 、1定稿中、2已定稿、3已撤销、4已过期
R
<
Integer
>
reviseTaskDetailR
=
reviseTaskDetail
(
entity
);
if
(
reviseTaskDetailR
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
...
...
@@ -897,9 +891,7 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
//.先复制一份合同、然后删除之前合同
entity
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
this
.
updateById
(
entity
);
// TEmployeeContractInfo employeeContractInfo = employeeContractInfoService.getById(entity.getContractId());
// TEmployeeInfo employeeInfo = employeeInfoService.getById(employeeContractInfo.getEmpId());
R
<
String
>
saveEmpContractR
=
saveEmpContract
(
attachInfo
);
R
<
String
>
saveEmpContractR
=
saveEmpContract
(
attachInfo
,
user
);
if
(
saveEmpContractR
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
throw
new
CheckedException
(
saveEmpContractR
.
getMsg
());
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/ErrorMessage.java
View file @
ae9134e1
...
...
@@ -3,6 +3,8 @@ package com.yifu.cloud.plus.v1.yifu.common.core.util;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.HashSet
;
import
java.util.Set
;
/**
* @author fang
...
...
@@ -16,6 +18,8 @@ public class ErrorMessage implements Serializable {
//默认红色 success green
private
String
color
=
"red"
;
private
Set
<
String
>
errors
=
new
HashSet
();
/**
* @param 用于展示勾选的名称
* @Author: wangan
...
...
@@ -42,4 +46,9 @@ public class ErrorMessage implements Serializable {
this
.
message
=
message
;
this
.
name
=
name
;
}
public
ErrorMessage
(
Integer
lineNum
,
Set
<
String
>
errors
)
{
this
.
lineNum
=
lineNum
;
this
.
errors
=
errors
;
}
}
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