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
6d6f200a
You need to sign in or sign up before continuing.
Commit
6d6f200a
authored
Jul 19, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature-licancan
parents
2d7d3191
7cff9391
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1041 additions
and
392 deletions
+1041
-392
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
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+8
-1
ErrorMessage.java
...ifu/cloud/plus/v1/yifu/common/core/util/ErrorMessage.java
+9
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+7
-0
daprConfig.properties
...yifu-common-dapr/src/main/resources/daprConfig.properties
+7
-14
TInsuranceCompanyController.java
...fu/insurances/controller/TInsuranceCompanyController.java
+54
-2
TInsuranceTypeController.java
.../yifu/insurances/controller/TInsuranceTypeController.java
+52
-2
TInsuranceTypeRateController.java
...u/insurances/controller/TInsuranceTypeRateController.java
+6
-0
TInsuranceTypeStandardController.java
...surances/controller/TInsuranceTypeStandardController.java
+6
-0
TInsuranceCompanyService.java
.../v1/yifu/insurances/service/TInsuranceCompanyService.java
+3
-0
TInsuranceTypeService.java
...lus/v1/yifu/insurances/service/TInsuranceTypeService.java
+4
-0
TInsuranceCompanyServiceImpl.java
...insurances/service/impl/TInsuranceCompanyServiceImpl.java
+9
-0
TInsuranceTypeServiceImpl.java
...fu/insurances/service/impl/TInsuranceTypeServiceImpl.java
+9
-0
TDispatchImportVo.java
.../yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
+405
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+227
-187
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/FddContractAttachInfo.java
View file @
6d6f200a
...
@@ -82,7 +82,7 @@ public class FddContractAttachInfo extends BaseEntity {
...
@@ -82,7 +82,7 @@ public class FddContractAttachInfo extends BaseEntity {
* 合同到期时间
* 合同到期时间
*/
*/
@Schema
(
description
=
"合同到期时间"
)
@Schema
(
description
=
"合同到期时间"
)
@ExcelAttribute
(
name
=
"合同到期时间"
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"合同到期时间"
,
isNotEmpty
=
true
,
errorInfo
=
"合同到期时间不能为空"
)
private
Date
contractEnd
;
private
Date
contractEnd
;
/**
/**
...
@@ -125,8 +125,8 @@ public class FddContractAttachInfo extends BaseEntity {
...
@@ -125,8 +125,8 @@ public class FddContractAttachInfo extends BaseEntity {
* 岗位
* 岗位
*/
*/
@Schema
(
description
=
"岗位"
)
@Schema
(
description
=
"岗位"
)
@Length
(
max
=
20
0
,
message
=
"岗位不能超过20
0个字符"
)
@Length
(
max
=
20
,
message
=
"岗位不能超过2
0个字符"
)
@ExcelAttribute
(
name
=
"岗位"
,
isNotEmpty
=
true
,
errorInfo
=
"岗位不能为空"
,
maxLength
=
20
0
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"岗位"
,
isNotEmpty
=
true
,
errorInfo
=
"岗位不能为空"
,
maxLength
=
20
,
needExport
=
true
)
private
String
post
;
private
String
post
;
/**
/**
...
@@ -151,13 +151,14 @@ public class FddContractAttachInfo extends BaseEntity {
...
@@ -151,13 +151,14 @@ public class FddContractAttachInfo extends BaseEntity {
* 法大大模板id
* 法大大模板id
*/
*/
@Schema
(
description
=
"法大大模板id"
)
@Schema
(
description
=
"法大大模板id"
)
@ExcelAttribute
(
name
=
"法大大模板id"
)
private
String
fddTemplateId
;
private
String
fddTemplateId
;
/**
/**
* 员工姓名
* 员工姓名
*/
*/
@Schema
(
description
=
"员工姓名"
)
@Schema
(
description
=
"员工姓名"
)
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"员工
合同id
姓名不能为空"
,
maxLength
=
32
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"员工姓名不能为空"
,
maxLength
=
32
,
needExport
=
true
)
private
String
empName
;
private
String
empName
;
/**
/**
...
@@ -171,6 +172,7 @@ public class FddContractAttachInfo extends BaseEntity {
...
@@ -171,6 +172,7 @@ public class FddContractAttachInfo extends BaseEntity {
* 手机号码
* 手机号码
*/
*/
@Schema
(
description
=
"手机号码"
)
@Schema
(
description
=
"手机号码"
)
@ExcelAttribute
(
name
=
"手机号码"
,
isNotEmpty
=
true
,
errorInfo
=
"手机号码不能为空"
,
maxLength
=
32
,
needExport
=
true
)
private
String
empPhone
;
private
String
empPhone
;
/**
/**
...
@@ -184,7 +186,7 @@ public class FddContractAttachInfo extends BaseEntity {
...
@@ -184,7 +186,7 @@ public class FddContractAttachInfo extends BaseEntity {
* 员工类型
* 员工类型
*/
*/
@Schema
(
description
=
"员工类型"
)
@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
;
private
String
empNatrue
;
/**
/**
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/FddTemplateFieldInfo.java
View file @
6d6f200a
...
@@ -33,9 +33,9 @@ import lombok.EqualsAndHashCode;
...
@@ -33,9 +33,9 @@ import lombok.EqualsAndHashCode;
*/
*/
@Data
@Data
@TableName
(
"fdd_template_field_info"
)
@TableName
(
"fdd_template_field_info"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
()
@Schema
(
description
=
"法大大字段对应信息表"
)
@Schema
(
description
=
"法大大字段对应信息表"
)
public
class
FddTemplateFieldInfo
extends
BaseEntity
{
public
class
FddTemplateFieldInfo
{
/**
/**
* ID
* ID
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/FddContractAttachInfoController.java
View file @
6d6f200a
...
@@ -22,13 +22,10 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem;
...
@@ -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.constants.EmployeeConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo
;
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.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.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.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.dapr.config.DaprUpmsProperties
;
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
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
...
@@ -41,9 +38,7 @@ import org.springframework.http.HttpHeaders;
...
@@ -41,9 +38,7 @@ import org.springframework.http.HttpHeaders;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.net.URLDecoder
;
import
java.net.URLDecoder
;
import
java.util.HashMap
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
...
@@ -143,21 +138,35 @@ public class FddContractAttachInfoController {
...
@@ -143,21 +138,35 @@ public class FddContractAttachInfoController {
ExcelUtil
<
FddContractAttachInfo
>
util1
=
null
;
ExcelUtil
<
FddContractAttachInfo
>
util1
=
null
;
try
{
try
{
// // 调用字典服务,渲染字典值
// 渲染字典值
// res = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId()
Map
<
String
,
String
>
dicMap
=
new
HashMap
<>();
// , "/dict/inner/getDictList", null, Map.class, SecurityConstants.FROM_IN);
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
()
//
.
get
(
CacheConstants
.
DICT_DETAILS
// Map<String, String> dicMap = new HashMap<>();
+
CommonConstants
.
COLON_STRING
// if (null != res.getData().get("data")) {
+
"emp_natrue"
);
// for (SysDictItem dict : res.getData().get("data")) {
if
(
Common
.
isNotNull
(
dicObj
))
{
// dicMap.put(dict.getType() + CommonConstants.DOWN_LINE_STRING + dict.getLabel(), dict.getValue());
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
(
"="
,
""
);
jsonString
=
URLDecoder
.
decode
(
jsonString
,
CommonConstants
.
UTF8
).
replace
(
"="
,
""
);
util1
=
new
ExcelUtil
<>(
FddContractAttachInfo
.
class
);
util1
=
new
ExcelUtil
<>(
FddContractAttachInfo
.
class
);
//传参字典数据MAP具体见方法实现
//传参字典数据MAP具体见方法实现
util1
.
getJsonStringToList
(
jsonString
,
null
);
util1
.
getJsonStringToList
(
jsonString
,
dicMap
);
if
(
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
())
{
if
(
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
())
{
return
R
.
failed
(
util1
.
getErrorInfo
(),
"数据异常"
);
return
R
.
failed
(
util1
.
getErrorInfo
(),
"数据异常"
);
}
else
{
}
else
{
...
@@ -165,7 +174,7 @@ public class FddContractAttachInfoController {
...
@@ -165,7 +174,7 @@ public class FddContractAttachInfoController {
List
<
ErrorMessage
>
errorInfo
=
fddContractAttachInfoService
.
batchAdd
(
util1
.
getEntityList
());
List
<
ErrorMessage
>
errorInfo
=
fddContractAttachInfoService
.
batchAdd
(
util1
.
getEntityList
());
Map
<
String
,
Object
>
variableMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
variableMap
=
new
HashMap
<>();
Map
<
Integer
,
Object
>
map
=
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
)
{
if
(
allExitContract
)
{
variableMap
.
put
(
"allMatch"
,
"true"
);
variableMap
.
put
(
"allMatch"
,
"true"
);
for
(
ErrorMessage
errorMessage
:
errorInfo
){
for
(
ErrorMessage
errorMessage
:
errorInfo
){
...
@@ -202,14 +211,28 @@ public class FddContractAttachInfoController {
...
@@ -202,14 +211,28 @@ public class FddContractAttachInfoController {
ExcelUtil
<
FddContractAttachInfo
>
util1
=
null
;
ExcelUtil
<
FddContractAttachInfo
>
util1
=
null
;
try
{
try
{
// 调用字典服务,渲染字典值
// 渲染字典值
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dict/inner/getDictList"
,
null
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
String
>
dicMap
=
new
HashMap
<>();
Map
<
String
,
String
>
dicMap
=
new
HashMap
<>();
if
(
null
!=
res
.
getData
())
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
()
for
(
SysDictItem
dict
:
res
.
getData
())
{
.
get
(
CacheConstants
.
DICT_DETAILS
dicMap
.
put
(
dict
.
getType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
dict
.
getLabel
(),
dict
.
getValue
());
+
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 {
...
@@ -250,4 +273,9 @@ public class FddContractAttachInfoController {
List
<
ErrorMessage
>
errorInfo
=
fddContractAttachInfoService
.
sendTask
(
entityList
);
List
<
ErrorMessage
>
errorInfo
=
fddContractAttachInfoService
.
sendTask
(
entityList
);
return
R
.
ok
(
errorInfo
);
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 @
6d6f200a
...
@@ -136,7 +136,8 @@ public class FddContractInfoController {
...
@@ -136,7 +136,8 @@ public class FddContractInfoController {
@PostMapping
(
"/send"
)
@PostMapping
(
"/send"
)
public
R
<
String
>
send
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
public
R
<
String
>
send
(
FddContractInfo
fddContractInfo
)
throws
ApiException
{
FddContractAttachInfo
fddContractAttachInfo
=
fddContractAttachInfoService
.
getById
(
fddContractInfo
.
getId
());
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 @
6d6f200a
...
@@ -12,6 +12,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...
@@ -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.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.security.util.SecurityUtils
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -83,7 +85,7 @@ public class FddController {
...
@@ -83,7 +85,7 @@ public class FddController {
fddPersonAccountService
.
updateById
(
fddPersonAccount
);
fddPersonAccountService
.
updateById
(
fddPersonAccount
);
}
}
}
}
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
}
/**
/**
...
@@ -127,7 +129,7 @@ public class FddController {
...
@@ -127,7 +129,7 @@ public class FddController {
fddPersonAccount
.
setCompanyInfoId
(
companyInfo
.
getId
());
fddPersonAccount
.
setCompanyInfoId
(
companyInfo
.
getId
());
}
}
fddPersonAccountService
.
updateById
(
fddPersonAccount
);
fddPersonAccountService
.
updateById
(
fddPersonAccount
);
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
}
}
}
}
}
...
@@ -157,6 +159,7 @@ public class FddController {
...
@@ -157,6 +159,7 @@ public class FddController {
if
(
StringUtils
.
equals
(
CommonConstants
.
TWO_STRING
,
jsonObject
.
getString
(
"status"
)))
{
if
(
StringUtils
.
equals
(
CommonConstants
.
TWO_STRING
,
jsonObject
.
getString
(
"status"
)))
{
//成功
//成功
FddPersonAccount
entity
=
fddPersonAccountService
.
getById
(
clientId
);
FddPersonAccount
entity
=
fddPersonAccountService
.
getById
(
clientId
);
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
entity
!=
null
)
{
if
(
entity
!=
null
)
{
entity
.
setRealStatus
(
CommonConstants
.
ONE_STRING
);
entity
.
setRealStatus
(
CommonConstants
.
ONE_STRING
);
entity
.
setUnionid
(
unionId
);
entity
.
setUnionid
(
unionId
);
...
@@ -172,7 +175,7 @@ public class FddController {
...
@@ -172,7 +175,7 @@ public class FddController {
return
;
return
;
}
}
FddContractAttachInfo
fddContractAttachInfo
=
attachInfos
.
get
(
CommonConstants
.
ZERO_INT
);
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
!=
null
)
{
//记录返回信息
//记录返回信息
if
(
returnR
.
getCode
()==
CommonConstants
.
SUCCESS
){
if
(
returnR
.
getCode
()==
CommonConstants
.
SUCCESS
){
...
@@ -186,7 +189,7 @@ public class FddController {
...
@@ -186,7 +189,7 @@ public class FddController {
}
}
});
});
}
}
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
}
}
}
}
else
if
(
StringUtils
.
equals
(
fddEvent
,
"reviseTask"
))
{
}
else
if
(
StringUtils
.
equals
(
fddEvent
,
"reviseTask"
))
{
...
@@ -218,7 +221,7 @@ public class FddController {
...
@@ -218,7 +221,7 @@ public class FddController {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
});
});
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
}
}
}
}
else
if
(
StringUtils
.
equals
(
fddEvent
,
"sign"
))
{
}
else
if
(
StringUtils
.
equals
(
fddEvent
,
"sign"
))
{
...
@@ -260,7 +263,7 @@ public class FddController {
...
@@ -260,7 +263,7 @@ public class FddController {
employeeContractInfoService
.
updateById
(
ec
);
employeeContractInfoService
.
updateById
(
ec
);
}
}
}
}
return
R
.
ok
(
null
,
"
成功
"
);
return
R
.
ok
(
null
,
"
success
"
);
}
else
if
(
StringUtils
.
equals
(
fddEvent
,
"notifyUrlVerify"
))
{
}
else
if
(
StringUtils
.
equals
(
fddEvent
,
"notifyUrlVerify"
))
{
return
R
.
ok
(
null
,
"success"
);
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 @
6d6f200a
...
@@ -23,6 +23,7 @@ import com.fadada.api.exception.ApiException;
...
@@ -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.FddContractAttachInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractInfo
;
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.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -44,7 +45,7 @@ public interface FddContractInfoService extends IService<FddContractInfo> {
...
@@ -44,7 +45,7 @@ public interface FddContractInfoService extends IService<FddContractInfo> {
* @Date: 2022/6/30
* @Date: 2022/6/30
* @return R
* @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 @
6d6f200a
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
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
;
...
@@ -32,8 +33,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
...
@@ -32,8 +33,10 @@ 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.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
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.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -48,11 +51,7 @@ import org.springframework.stereotype.Service;
...
@@ -48,11 +51,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Executors
;
...
@@ -136,6 +135,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
...
@@ -136,6 +135,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
public
List
<
ErrorMessage
>
sendTask
(
List
<
FddContractAttachInfo
>
entityList
)
{
public
List
<
ErrorMessage
>
sendTask
(
List
<
FddContractAttachInfo
>
entityList
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
int
i
=
1
;
int
i
=
1
;
YifuUser
user
=
SecurityUtils
.
getUser
();
for
(
FddContractAttachInfo
attachInfo
:
entityList
)
{
for
(
FddContractAttachInfo
attachInfo
:
entityList
)
{
//保存合同数据
//保存合同数据
attachInfo
.
setContractId
(
CommonConstants
.
EMPTY_STRING
);
attachInfo
.
setContractId
(
CommonConstants
.
EMPTY_STRING
);
...
@@ -175,7 +175,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
...
@@ -175,7 +175,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
try
{
try
{
//如果已经实名发送电子合同
//如果已经实名发送电子合同
FddContractAttachInfo
fddContractAttachInfo
=
this
.
getById
(
attachInfo
.
getId
());
FddContractAttachInfo
fddContractAttachInfo
=
this
.
getById
(
attachInfo
.
getId
());
R
<
String
>
returnR
=
fddContractInfoService
.
saveEmpContract
(
fddContractAttachInfo
);
R
<
String
>
returnR
=
fddContractInfoService
.
saveEmpContract
(
fddContractAttachInfo
,
user
);
if
(
returnR
!=
null
)
{
if
(
returnR
!=
null
)
{
//记录返回信息
//记录返回信息
if
(
returnR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
if
(
returnR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
...
@@ -333,26 +333,46 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
...
@@ -333,26 +333,46 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
@Override
@Override
public
List
<
ErrorMessage
>
batchAdd
(
List
<
FddContractAttachInfo
>
entityList
)
{
public
List
<
ErrorMessage
>
batchAdd
(
List
<
FddContractAttachInfo
>
entityList
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
Set
<
String
>
errorMsg
;
YifuUser
user
=
SecurityUtils
.
getUser
();
Map
<
String
,
Integer
>
sameCheck
=
new
HashMap
<>();
int
i
=
1
;
int
i
=
1
;
try
{
try
{
if
(
null
!=
entityList
&&
!
entityList
.
isEmpty
())
{
if
(
null
!=
entityList
&&
!
entityList
.
isEmpty
())
{
for
(
FddContractAttachInfo
attachInfo
:
entityList
)
{
for
(
FddContractAttachInfo
attachInfo
:
entityList
)
{
errorMsg
=
new
HashSet
<>();
i
++;
i
++;
String
sameInfo
=
attachInfo
.
getEmpNatrue
()
+
"_"
+
attachInfo
.
getDepartNo
()
+
"_"
+
attachInfo
.
getFddTemplateId
()
+
"_"
+
attachInfo
.
getContractStart
()
+
"_"
+
attachInfo
.
getContractEnd
();
if
(
sameCheck
.
get
(
sameInfo
)
!=
null
)
{
errorMsg
.
add
(
"第"
+
(
i
)
+
"行与第"
+
sameCheck
.
get
(
sameInfo
)
+
"行重复!"
);
}
else
{
sameCheck
.
put
(
sameInfo
,
i
);
}
//判断计时计件工资必填
if
(
CommonConstants
.
ONE_STRING
.
equals
(
attachInfo
.
getSalaryType
())
&&
Common
.
isEmpty
(
attachInfo
.
getSalaryStandardPerHour
()))
{
errorMsg
.
add
(
"计时工资不能为空"
);
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
attachInfo
.
getSalaryType
())
&&
Common
.
isEmpty
(
attachInfo
.
getSalaryStandardPerPiece
()))
{
errorMsg
.
add
(
"计件工资不能为空"
);
}
//结算主体编码是否准确
//结算主体编码是否准确
TSettleDomain
settleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
().
eq
(
TSettleDomain:
:
getDepartNo
,
attachInfo
.
getDepartNo
()));
TSettleDomain
settleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
().
eq
(
TSettleDomain:
:
getDepartNo
,
attachInfo
.
getDepartNo
())
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
).
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isEmpty
(
settleDomain
))
{
if
(
Common
.
isEmpty
(
settleDomain
))
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"结算主体编码有误"
,
CommonConstants
.
RED
));
errorMsg
.
add
(
"项目编码有误"
);
continue
;
}
else
{
}
//查询员工合同
//查询员工合同
TEmployeeContractInfo
employeeContractInfo
=
employeeContractInfoService
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
TEmployeeContractInfo
employeeContractInfo
=
employeeContractInfoService
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
attachInfo
.
getEmpIdcard
()).
eq
(
TEmployeeContractInfo:
:
getSettleDomain
,
settleDomain
.
getId
())
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
attachInfo
.
getEmpIdcard
()).
eq
(
TEmployeeContractInfo:
:
getSettleDomain
,
settleDomain
.
getId
())
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_STRING
).
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
employeeContractInfo
!=
null
)
{
if
(
employeeContractInfo
!=
null
)
{
long
count
=
this
.
count
(
Wrappers
.<
FddContractAttachInfo
>
query
().
lambda
().
eq
(
FddContractAttachInfo:
:
getContractId
,
employeeContractInfo
.
getId
()));
long
count
=
this
.
count
(
Wrappers
.<
FddContractAttachInfo
>
query
().
lambda
().
eq
(
FddContractAttachInfo:
:
getContractId
,
employeeContractInfo
.
getId
()));
if
(
count
>
CommonConstants
.
ZERO_INT
&&
attachInfo
.
getContractStart
().
before
(
employeeContractInfo
.
getContractEnd
()))
{
if
(
count
>
CommonConstants
.
ZERO_INT
&&
attachInfo
.
getContractStart
().
before
(
employeeContractInfo
.
getContractEnd
()))
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"已导入合同相关基础数据"
,
CommonConstants
.
RED
));
errorMsg
.
add
(
"已导入合同相关基础数据"
);
continue
;
}
}
List
<
FddContractTemplate
>
fddContractTemplateList
=
fddContractTemplateService
.
list
(
Wrappers
.<
FddContractTemplate
>
query
().
lambda
()
List
<
FddContractTemplate
>
fddContractTemplateList
=
fddContractTemplateService
.
list
(
Wrappers
.<
FddContractTemplate
>
query
().
lambda
()
...
@@ -360,30 +380,32 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
...
@@ -360,30 +380,32 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
.
eq
(
FddContractTemplate:
:
getModifyUploadStatus
,
CommonConstants
.
dingleDigitStrArray
[
1
]));
.
eq
(
FddContractTemplate:
:
getModifyUploadStatus
,
CommonConstants
.
dingleDigitStrArray
[
1
]));
//如果模板存在则生成法大大电子合同数据
//如果模板存在则生成法大大电子合同数据
if
(
fddContractTemplateList
.
size
()
==
CommonConstants
.
ZERO_INT
)
{
if
(
fddContractTemplateList
.
size
()
==
CommonConstants
.
ZERO_INT
)
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"未获取到有效的合同模板"
,
CommonConstants
.
RED
));
errorMsg
.
add
(
"未获取到有效的合同模板"
);
continue
;
}
}
if
(
fddContractTemplateList
.
size
()
!=
CommonConstants
.
ONE_INT
)
{
if
(
fddContractTemplateList
.
size
()
!=
CommonConstants
.
ONE_INT
)
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"法大大合同有效合同模板存在多条"
,
CommonConstants
.
RED
));
errorMsg
.
add
(
"法大大合同有效合同模板存在多条"
);
continue
;
}
else
{
}
else
{
errorMsg
.
add
(
"存在“在用”的合同"
);
errorList
.
add
(
new
ErrorMessage
(
i
,
"存在“在用”的合同"
,
CommonConstants
.
RED
));
}
continue
;
}
}
}
}
//保存合同数据
attachInfo
.
setContractId
(
CommonConstants
.
EMPTY_STRING
);
attachInfo
.
setCreateTime
(
LocalDateTime
.
now
());
//校验数据
//校验数据
R
<
String
>
employeeParamR
;
R
<
String
>
employeeParamR
;
//新签
//新签
employeeParamR
=
fddContractInfoService
.
generalEmployeeParam
(
attachInfo
,
false
);
employeeParamR
=
fddContractInfoService
.
generalEmployeeParam
(
attachInfo
,
false
);
if
(
CommonConstants
.
FAIL
==
employeeParamR
.
getCode
())
{
if
(
CommonConstants
.
FAIL
==
employeeParamR
.
getCode
())
{
errorList
.
add
(
new
ErrorMessage
(
i
,
employeeParamR
.
getMsg
(),
CommonConstants
.
RED
));
errorMsg
.
add
(
employeeParamR
.
getMsg
());
continue
;
}
}
// 数据合法情况
if
(!
CollUtil
.
isEmpty
(
errorMsg
))
{
// 数据不合法
errorList
.
add
(
new
ErrorMessage
(
i
,
errorMsg
));
}
else
{
//保存合同数据
attachInfo
.
setContractId
(
CommonConstants
.
EMPTY_STRING
);
attachInfo
.
setCreateTime
(
LocalDateTime
.
now
());
//保存数据
//保存数据
this
.
save
(
attachInfo
);
this
.
save
(
attachInfo
);
attachInfo
.
setContractId
(
attachInfo
.
getId
());
attachInfo
.
setContractId
(
attachInfo
.
getId
());
...
@@ -404,7 +426,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
...
@@ -404,7 +426,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
try
{
try
{
fddPersonAccountService
.
sendAuthMessage
(
fddPersonAccount
.
getId
());
fddPersonAccountService
.
sendAuthMessage
(
fddPersonAccount
.
getId
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
log
.
error
(
"执行异常"
,
e
);
}
}
});
});
}
else
{
}
else
{
...
@@ -412,12 +434,12 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
...
@@ -412,12 +434,12 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
try
{
try
{
//如果已经实名发送电子合同
//如果已经实名发送电子合同
FddContractAttachInfo
fddContractAttachInfo
=
this
.
getById
(
attachInfo
.
getId
());
FddContractAttachInfo
fddContractAttachInfo
=
this
.
getById
(
attachInfo
.
getId
());
R
<
String
>
returnR
=
fddContractInfoService
.
saveEmpContract
(
fddContractAttachInfo
);
R
<
String
>
returnR
=
fddContractInfoService
.
saveEmpContract
(
fddContractAttachInfo
,
user
);
if
(
returnR
!=
null
)
{
if
(
returnR
!=
null
)
{
//记录返回信息
//记录返回信息
if
(
returnR
.
getCode
()==
CommonConstants
.
SUCCESS
)
{
if
(
returnR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
fddContractAttachInfo
.
setRemark
(
"成功"
);
fddContractAttachInfo
.
setRemark
(
"成功"
);
}
else
{
}
else
{
fddContractAttachInfo
.
setRemark
(
returnR
.
getMsg
());
fddContractAttachInfo
.
setRemark
(
returnR
.
getMsg
());
}
}
this
.
updateById
(
fddContractAttachInfo
);
this
.
updateById
(
fddContractAttachInfo
);
...
@@ -429,12 +451,12 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
...
@@ -429,12 +451,12 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
}
}
errorList
.
add
(
new
ErrorMessage
(
i
,
"保存成功"
,
CommonConstants
.
GREEN
));
errorList
.
add
(
new
ErrorMessage
(
i
,
"保存成功"
,
CommonConstants
.
GREEN
));
}
}
}
}
else
{
}
else
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"无数据保存"
));
errorList
.
add
(
new
ErrorMessage
(
i
,
"无数据保存"
));
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"合同数据批量新增异常"
+
e
.
getMessage
());
log
.
error
(
"合同数据批量新增异常"
+
e
.
getMessage
());
errorList
.
add
(
new
ErrorMessage
(
i
,
"合同数据批量新增异常:"
+
e
.
getMessage
()));
return
errorList
;
return
errorList
;
}
}
return
errorList
;
return
errorList
;
...
@@ -490,7 +512,6 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
...
@@ -490,7 +512,6 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"合同数据批量新增异常"
+
e
.
getMessage
());
log
.
error
(
"合同数据批量新增异常"
+
e
.
getMessage
());
errorList
.
add
(
new
ErrorMessage
(
i
,
"合同数据批量新增异常:"
+
e
.
getMessage
()));
return
errorList
;
return
errorList
;
}
}
return
errorList
;
return
errorList
;
...
@@ -577,7 +598,8 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
...
@@ -577,7 +598,8 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
* @param settleDomain
* @param settleDomain
* @param fddContractTemplate
* @param fddContractTemplate
* @param newEmployeeInfo
* @param newEmployeeInfo
* @param tEmployeeProject
* @param tCustomerInfo
* @param newTEmpProject
* @Author: huyc
* @Author: huyc
* @Date: 2022/06/01
* @Date: 2022/06/01
* @Description: 新增项目档案
* @Description: 新增项目档案
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/FddContractInfoServiceImpl.java
View file @
6d6f200a
...
@@ -69,7 +69,9 @@ import org.springframework.stereotype.Service;
...
@@ -69,7 +69,9 @@ import org.springframework.stereotype.Service;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.BufferedOutputStream
;
import
java.io.BufferedOutputStream
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.ZoneId
;
import
java.time.ZoneId
;
...
@@ -107,27 +109,18 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
...
@@ -107,27 +109,18 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
private
FddSealPersonAuthService
fddSealPersonAuthService
;
private
FddSealPersonAuthService
fddSealPersonAuthService
;
@Autowired
@Autowired
private
FddContractAttachInfoMapper
fddContractAttachInfoMapper
;
private
FddContractAttachInfoMapper
fddContractAttachInfoMapper
;
// @Autowired
@Autowired
// private TEmployeeContractInfoService employeeContractInfoService;
private
TEmployeeContractInfoService
employeeContractInfoService
;
// @Autowired
// private TEmployeeInfoService employeeInfoService;
@Autowired
@Autowired
private
FddTemplateFieldInfoService
fieldInfoService
;
private
FddTemplateFieldInfoService
fieldInfoService
;
// 阿里云文件上传服务
// 阿里云文件上传服务
@Autowired
@Autowired
private
OSSUtil
ossUtil
;
private
OSSUtil
ossUtil
;
// // 附件表
// @Autowired
// private TEmpAttaService empAttaService;
// // 附件-合同,关联表
// @Autowired
// private MEmpContractAttaService mempContractAttaService;
@Autowired
@Autowired
private
TSettleDomainService
tSettleDomainService
;
private
TSettleDomainService
tSettleDomainService
;
@Override
@Override
public
R
<
String
>
saveEmpContract
(
FddContractAttachInfo
fddContractAttachInfo
)
throws
ApiException
{
public
R
<
String
>
saveEmpContract
(
FddContractAttachInfo
fddContractAttachInfo
,
YifuUser
user
)
throws
ApiException
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(!
user
.
getId
().
equals
(
fddContractAttachInfo
.
getCreateBy
()))
{
if
(!
user
.
getId
().
equals
(
fddContractAttachInfo
.
getCreateBy
()))
{
return
R
.
failed
(
"当前用户不是电子合同导入用户,不能操作"
);
return
R
.
failed
(
"当前用户不是电子合同导入用户,不能操作"
);
}
}
...
@@ -560,50 +553,50 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
...
@@ -560,50 +553,50 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
**/
**/
@Override
@Override
public
R
<
String
>
moveFileToEmpConcat
(
FddContractInfo
fddContractInfo
,
HttpServletResponse
response
)
throws
ApiException
,
IOException
{
public
R
<
String
>
moveFileToEmpConcat
(
FddContractInfo
fddContractInfo
,
HttpServletResponse
response
)
throws
ApiException
,
IOException
{
//
FddContractInfo entity = this.getById(fddContractInfo.getId());
FddContractInfo
entity
=
this
.
getById
(
fddContractInfo
.
getId
());
//
if (entity == null || entity.getSignTaskId() == null) {
if
(
entity
==
null
||
entity
.
getSignTaskId
()
==
null
)
{
//
throw new CheckedException("未获取到对应签署任务");
throw
new
CheckedException
(
"未获取到对应签署任务"
);
//
}
}
//
TEmployeeContractInfo employeeContractInfo = employeeContractInfoService.getById(entity.getContractId());
TEmployeeContractInfo
employeeContractInfo
=
employeeContractInfoService
.
getById
(
entity
.
getContractId
());
//
if (employeeContractInfo != null) {
if
(
employeeContractInfo
!=
null
)
{
//
//发送请求
//发送请求
//
GetBySignFileIdReq req = new GetBySignFileIdReq();
GetBySignFileIdReq
req
=
new
GetBySignFileIdReq
();
//
req.setToken(fddUtil.getToken());
req
.
setToken
(
fddUtil
.
getToken
());
//
req.setTaskId(entity.getSignTaskId());
req
.
setTaskId
(
entity
.
getSignTaskId
());
//
DocumentClient client = new DocumentClient(fddUtil.getFadadaApiClient());
DocumentClient
client
=
new
DocumentClient
(
fddUtil
.
getFadadaApiClient
());
//
BaseRsp<DownLoadFileRsp> rsp = client.getBySignFileId(req);
BaseRsp
<
DownLoadFileRsp
>
rsp
=
client
.
getBySignFileId
(
req
);
//
//校验参数
//校验参数
//
if (StringUtils.equals(rsp.getCode(), FddUtil.SUCCESS)) {
if
(
StringUtils
.
equals
(
rsp
.
getCode
(),
FddUtil
.
SUCCESS
))
{
//
DownLoadFileRsp rspData = rsp.getData();
DownLoadFileRsp
rspData
=
rsp
.
getData
();
//
if (rspData != null) {
if
(
rspData
!=
null
)
{
//
InputStream bis = null;
InputStream
bis
=
null
;
//
try {
try
{
//
bis = new ByteArrayInputStream(rspData.getFileBytes());
bis
=
new
ByteArrayInputStream
(
rspData
.
getFileBytes
());
//
String name = System.currentTimeMillis() + "法大大电子签附件";
String
name
=
System
.
currentTimeMillis
()
+
"法大大电子签附件"
;
//
String key = name + ".zip";
String
key
=
name
+
".zip"
;
//
ossUtil.uploadFileByStream(bis, key, null);
ossUtil
.
uploadFileByStream
(
bis
,
key
,
null
);
//
// 1:保存为
// 1:保存为
//
//
TEmpAtta empAtta = BasicServiceUtil.initTEmpAttaForInsert(name, key, (long) rspData.getFileBytes().length);
// TEmpAtta empAtta = BasicServiceUtil.initTEmpAttaForInsert(name, key, (long) rspData.getFileBytes().length);
//
//
empAttaService.save(empAtta);
// empAttaService.save(empAtta);
//
//
MEmpContractAtta contractAtta = new MEmpContractAtta();
// MEmpContractAtta contractAtta = new MEmpContractAtta();
//
//
contractAtta.setAttaId(empAtta.getId());
// contractAtta.setAttaId(empAtta.getId());
//
//
contractAtta.setContractId(employeeContractInfo.getId());
// contractAtta.setContractId(employeeContractInfo.getId());
//
//
mempContractAttaService.save(contractAtta);
// mempContractAttaService.save(contractAtta);
// FddContractAttachInfo fddContractAttachInfo = fddContractAttachInfoService.ge
tOne(Wrappers.<FddContractAttachInfo>query().lambda()
FddContractAttachInfo
fddContractAttachInfo
=
fddContractAttachInfoMapper
.
selec
tOne
(
Wrappers
.<
FddContractAttachInfo
>
query
().
lambda
()
//
.eq(FddContractAttachInfo::getContractId,entity.getContractId()).last(CommonConstants.LAST_ONE_SQL));
.
eq
(
FddContractAttachInfo:
:
getContractId
,
entity
.
getContractId
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
//
if (fddContractAttachInfo != null) {
if
(
fddContractAttachInfo
!=
null
)
{
//
fddContractAttachInfo.setIsMove(CommonConstants.ONE_INT);
fddContractAttachInfo
.
setIsMove
(
CommonConstants
.
ONE_INT
);
// fddContractAttachInfoService
.updateById(fddContractAttachInfo);
fddContractAttachInfoMapper
.
updateById
(
fddContractAttachInfo
);
//
}
}
//
return R.ok();
return
R
.
ok
();
//
} finally {
}
finally
{
//
if (bis != null) {
if
(
bis
!=
null
)
{
//
bis.close();
bis
.
close
();
//
}
}
//
}
}
//
}
}
//
}
}
//
}
}
return
R
.
failed
(
"转移失败"
);
return
R
.
failed
(
"转移失败"
);
}
}
...
@@ -878,6 +871,7 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
...
@@ -878,6 +871,7 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
**/
private
R
<
String
>
cancleReviSeTask
(
FddContractInfo
entity
)
throws
ApiException
{
private
R
<
String
>
cancleReviSeTask
(
FddContractInfo
entity
)
throws
ApiException
{
YifuUser
user
=
SecurityUtils
.
getUser
();
//定稿任务状态:0 待发起 、1定稿中、2已定稿、3已撤销、4已过期
//定稿任务状态:0 待发起 、1定稿中、2已定稿、3已撤销、4已过期
R
<
Integer
>
reviseTaskDetailR
=
reviseTaskDetail
(
entity
);
R
<
Integer
>
reviseTaskDetailR
=
reviseTaskDetail
(
entity
);
if
(
reviseTaskDetailR
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
if
(
reviseTaskDetailR
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
...
@@ -897,9 +891,7 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
...
@@ -897,9 +891,7 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
//.先复制一份合同、然后删除之前合同
//.先复制一份合同、然后删除之前合同
entity
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
entity
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
this
.
updateById
(
entity
);
this
.
updateById
(
entity
);
// TEmployeeContractInfo employeeContractInfo = employeeContractInfoService.getById(entity.getContractId());
R
<
String
>
saveEmpContractR
=
saveEmpContract
(
attachInfo
,
user
);
// TEmployeeInfo employeeInfo = employeeInfoService.getById(employeeContractInfo.getEmpId());
R
<
String
>
saveEmpContractR
=
saveEmpContract
(
attachInfo
);
if
(
saveEmpContractR
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
if
(
saveEmpContractR
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
throw
new
CheckedException
(
saveEmpContractR
.
getMsg
());
throw
new
CheckedException
(
saveEmpContractR
.
getMsg
());
}
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
6d6f200a
...
@@ -327,5 +327,12 @@ public interface ErrorCodes {
...
@@ -327,5 +327,12 @@ public interface ErrorCodes {
* 该人员项目档案已减项,不允许划转
* 该人员项目档案已减项,不允许划转
*/
*/
String
PROJECT_PERSON_DELETE_EXIT
=
"project.person.delete.exit"
;
String
PROJECT_PERSON_DELETE_EXIT
=
"project.person.delete.exit"
;
/**
* 派单员工合同相关信息不可为空
*/
String
EMP_DISPATCH_CONTRACT_NOT_EMPTY
=
"emp.dispatch.contract.not.empty"
;
/**
* 派单员工社保相关信息不可为空
*/
String
EMP_DISPATCH_SOCIAL_NOT_EMPTY
=
"emp.dispatch.social.not.empty"
;
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/ErrorMessage.java
View file @
6d6f200a
...
@@ -3,6 +3,8 @@ package com.yifu.cloud.plus.v1.yifu.common.core.util;
...
@@ -3,6 +3,8 @@ package com.yifu.cloud.plus.v1.yifu.common.core.util;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.HashSet
;
import
java.util.Set
;
/**
/**
* @author fang
* @author fang
...
@@ -16,6 +18,8 @@ public class ErrorMessage implements Serializable {
...
@@ -16,6 +18,8 @@ public class ErrorMessage implements Serializable {
//默认红色 success green
//默认红色 success green
private
String
color
=
"red"
;
private
String
color
=
"red"
;
private
Set
<
String
>
errors
=
new
HashSet
();
/**
/**
* @param 用于展示勾选的名称
* @param 用于展示勾选的名称
* @Author: wangan
* @Author: wangan
...
@@ -42,4 +46,9 @@ public class ErrorMessage implements Serializable {
...
@@ -42,4 +46,9 @@ public class ErrorMessage implements Serializable {
this
.
message
=
message
;
this
.
message
=
message
;
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
ErrorMessage
(
Integer
lineNum
,
Set
<
String
>
errors
)
{
this
.
lineNum
=
lineNum
;
this
.
errors
=
errors
;
}
}
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
6d6f200a
...
@@ -106,8 +106,15 @@ change.strat.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u4E0D\u80FD\u4E3A\u7A7A
...
@@ -106,8 +106,15 @@ change.strat.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u4E0D\u80FD\u4E3A\u7A7A
change.less.month.exit
=
\u5212\u
8F6C
\u
8D77
\u
59CB
\u6708\u8981\u
5C0F
\u
4E8E
\u
7B49
\u
4E8E
\u
5F53
\u
524D
\u6708
change.less.month.exit
=
\u5212\u
8F6C
\u
8D77
\u
59CB
\u6708\u8981\u
5C0F
\u
4E8E
\u
7B49
\u
4E8E
\u
5F53
\u
524D
\u6708
project.person.search.exit
=
\u
672A
\u
627E
\u5230\u
8BE5
\u
4EBA
\u5458\u7684\u9879\u
76EE
\u6863\u6848\u
FF0C
\u
8BF7
\u6838\u
5B9E
project.person.search.exit
=
\u
672A
\u
627E
\u5230\u
8BE5
\u
4EBA
\u5458\u7684\u9879\u
76EE
\u6863\u6848\u
FF0C
\u
8BF7
\u6838\u
5B9E
project.person.delete.exit
=
\u
8BE5
\u
4EBA
\u5458\u9879\u
76EE
\u6863\u6848\u
5DF2
\u
51CF
\u9879\u
FF0C
\u
4E0D
\u5141\u
8BB8
\u5212\u
8F6C
project.person.delete.exit
=
\u
8BE5
\u
4EBA
\u5458\u9879\u
76EE
\u6863\u6848\u
5DF2
\u
51CF
\u9879\u
FF0C
\u
4E0D
\u5141\u
8BB8
\u5212\u
8F6C
emp.dispatch.contract.not.empty
=
\u
6D3E
\u5355\u5458\u
5DE5
\u5408\u
540C
\u
76F8
\u5173\u
4FE1
\u
606F
\u
4E0D
\u
53EF
\u
4E3A
\u
7A7A
emp.dispatch.social.not.empty
=
\u
6D3E
\u5355\u5458\u
5DE5
\u
793E
\u
4FDD
\u
76F8
\u5173\u
4FE1
\u
606F
\u
4E0D
\u
53EF
\u
4E3A
\u
7A7A
...
...
yifu-common/yifu-common-dapr/src/main/resources/daprConfig.properties
View file @
6d6f200a
dapr.upms.appUrl
=
http://
localhost
:3500/v1.0/invoke/
dapr.upms.appUrl
=
http://
yifu-upms.qas-mvp.svc.cluster.local
:3500/v1.0/invoke/
dapr.upms.appId
=
yifu-upms
dapr.upms.appId
=
yifu-upms
dapr.upms.appPort
=
4000
dapr.upms.appPort
=
4000
dapr.upms.httpPort
=
3500
dapr.upms.httpPort
=
3500
...
@@ -6,18 +6,11 @@ dapr.upms.grpcPort=52000
...
@@ -6,18 +6,11 @@ dapr.upms.grpcPort=52000
dapr.upms.metricsPort
=
9094
dapr.upms.metricsPort
=
9094
#\u6D4B\u8BD5\u73AF\u5883
#\u6D4B\u8BD5\u73AF\u5883
#
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.check.appUrl
=
http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
#\u672C\u5730
dapr.check.appUrl
=
http://localhost:3507
/v1.0/invoke/
#dapr.check.appUrl=http://localhost:3502
/v1.0/invoke/
dapr.check.appId
=
yifu-check
dapr.check.appId
=
yifu-check
#dapr.check.appPort=5022
dapr.check.appPort
=
5022
#dapr.check.httpPort=3502
dapr.check.httpPort
=
3502
#dapr.check.grpcPort=52002
dapr.check.grpcPort
=
52002
#dapr.check.metricsPort=9092
dapr.check.metricsPort
=
9092
\ No newline at end of file
dapr.social.appUrl
=
http://localhost:3509/v1.0/invoke/
dapr.social.appId\uFF1B
dapr.social.appPort
=
5002
dapr.social.httpPort
=
3509
dapr.social.grpcPort
=
52003
dapr.social.metricsPort
=
9093
\ No newline at end of file
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceCompanyController.java
View file @
6d6f200a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
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.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
/**
/**
* @author zhaji
* @author zhaji
...
@@ -18,4 +27,47 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -18,4 +27,47 @@ import org.springframework.web.bind.annotation.RestController;
@Tag
(
name
=
"保险公司相关"
)
@Tag
(
name
=
"保险公司相关"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsuranceCompanyController
{
public
class
TInsuranceCompanyController
{
@Resource
private
TInsuranceCompanyService
insuranceCompanyService
;
/**
* 分页查询
* @param page 分页对象
* @param insuranceCompany 保险公司
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TInsuranceCompany
>>
getTCertRecordPage
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
return
R
.
ok
(
insuranceCompanyService
.
pageDiy
(
page
,
insuranceCompany
));
}
/**
* 通过id查询保险公司详情
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询保险公司详情"
,
description
=
"通过id查询:hasPermission('demo_insuranceCompany_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceCompany_get')"
)
public
R
<
TInsuranceCompany
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
insuranceCompanyService
.
getById
(
id
));
}
/**
* 新增保险公司
* @param insuranceCompany 保险公司明细
* @return R
*/
@Operation
(
summary
=
"新增保险公司"
,
description
=
"新增证明开具记录表:hasPermission('demo_insuranceCompany_add')"
)
@SysLog
(
"新增保险公司"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceCompany_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TInsuranceCompany
insuranceCompany
)
{
return
R
.
ok
(
insuranceCompanyService
.
save
(
insuranceCompany
));
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeController.java
View file @
6d6f200a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
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.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
/**
/**
* @author zhaji
* @author zhaji
...
@@ -18,4 +28,44 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -18,4 +28,44 @@ import org.springframework.web.bind.annotation.RestController;
@Tag
(
name
=
"险种相关"
)
@Tag
(
name
=
"险种相关"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsuranceTypeController
{
public
class
TInsuranceTypeController
{
@Resource
private
TInsuranceTypeService
insuranceTypeService
;
/**
* 分页查询
* @param page 分页对象
* @param insuranceType 险种
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TInsuranceType
>>
getTCertRecordPage
(
Page
page
,
TInsuranceType
insuranceType
)
{
return
R
.
ok
(
insuranceTypeService
.
pageDiy
(
page
,
insuranceType
));
}
/**
* 通过id查询险种详情
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询险种详情"
,
description
=
"通过id查询:hasPermission('demo_insuranceType_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_get')"
)
public
R
<
TInsuranceType
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
insuranceTypeService
.
getById
(
id
));
}
/**
* 新增险种
* @param insuranceType 险种明细
* @return R
*/
@Operation
(
summary
=
"新增保险公司"
,
description
=
"新增险种:hasPermission('demo_insuranceType_add')"
)
@SysLog
(
"新增险种"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
R
.
ok
(
insuranceTypeService
.
save
(
insuranceType
));
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeRateController.java
View file @
6d6f200a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeRateService
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -7,6 +8,8 @@ import org.springframework.http.HttpHeaders;
...
@@ -7,6 +8,8 @@ import org.springframework.http.HttpHeaders;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
/**
* @author zhaji
* @author zhaji
* @description 费率相关
* @description 费率相关
...
@@ -18,4 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -18,4 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag
(
name
=
"费率相关"
)
@Tag
(
name
=
"费率相关"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsuranceTypeRateController
{
public
class
TInsuranceTypeRateController
{
@Resource
private
TInsuranceTypeRateService
insuranceTypeRateService
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeStandardController.java
View file @
6d6f200a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeStandardService
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -7,6 +8,8 @@ import org.springframework.http.HttpHeaders;
...
@@ -7,6 +8,8 @@ import org.springframework.http.HttpHeaders;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
/**
* @author zhaji
* @author zhaji
* @description 购买标准相关
* @description 购买标准相关
...
@@ -18,4 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -18,4 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag
(
name
=
"购买标准相关"
)
@Tag
(
name
=
"购买标准相关"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsuranceTypeStandardController
{
public
class
TInsuranceTypeStandardController
{
@Resource
private
TInsuranceTypeStandardService
insuranceTypeStandardService
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceCompanyService.java
View file @
6d6f200a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
...
@@ -10,4 +12,5 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
...
@@ -10,4 +12,5 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
*/
*/
public
interface
TInsuranceCompanyService
extends
IService
<
TInsuranceCompany
>
{
public
interface
TInsuranceCompanyService
extends
IService
<
TInsuranceCompany
>
{
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceTypeService.java
View file @
6d6f200a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
/**
/**
...
@@ -11,4 +14,5 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
...
@@ -11,4 +14,5 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
*/
*/
public
interface
TInsuranceTypeService
extends
IService
<
TInsuranceType
>
{
public
interface
TInsuranceTypeService
extends
IService
<
TInsuranceType
>
{
IPage
<
TInsuranceType
>
pageDiy
(
Page
page
,
TInsuranceType
insuranceType
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceCompanyServiceImpl.java
View file @
6d6f200a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceCompanyMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceCompanyMapper
;
...
@@ -14,4 +17,10 @@ import org.springframework.stereotype.Service;
...
@@ -14,4 +17,10 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
TInsuranceCompanyServiceImpl
extends
ServiceImpl
<
TInsuranceCompanyMapper
,
TInsuranceCompany
>
implements
TInsuranceCompanyService
{
public
class
TInsuranceCompanyServiceImpl
extends
ServiceImpl
<
TInsuranceCompanyMapper
,
TInsuranceCompany
>
implements
TInsuranceCompanyService
{
@Override
public
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
LambdaQueryWrapper
<
TInsuranceCompany
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeServiceImpl.java
View file @
6d6f200a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeMapper
;
...
@@ -15,4 +18,10 @@ import org.springframework.stereotype.Service;
...
@@ -15,4 +18,10 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
TInsuranceTypeServiceImpl
extends
ServiceImpl
<
TInsuranceTypeMapper
,
TInsuranceType
>
implements
TInsuranceTypeService
{
public
class
TInsuranceTypeServiceImpl
extends
ServiceImpl
<
TInsuranceTypeMapper
,
TInsuranceType
>
implements
TInsuranceTypeService
{
@Override
public
IPage
<
TInsuranceType
>
pageDiy
(
Page
page
,
TInsuranceType
insuranceType
)
{
LambdaQueryWrapper
<
TInsuranceType
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
TInsuranceType:
:
getCreateTime
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
}
}
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
0 → 100644
View file @
6d6f200a
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 派单信息记录表
*
* @author fxj
* @date 2022-07-15 11:38:05
*/
@Data
public
class
TDispatchImportVo
extends
RowIndex
implements
Serializable
{
/**
* 员工姓名
*/
@Length
(
max
=
50
,
message
=
"员工姓名 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"员工姓名"
)
@ExcelProperty
(
"员工姓名"
)
private
String
empName
;
/**
* 身份证号
*/
@Length
(
max
=
20
,
message
=
"身份证号 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 员工类型
*/
@Length
(
max
=
32
,
message
=
"员工类型 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"员工类型"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
,
isNotEmpty
=
true
)
@Schema
(
description
=
"员工类型"
)
@ExcelProperty
(
"员工类型"
)
private
String
empType
;
/**
* 手机号码
*/
@Length
(
max
=
32
,
message
=
"手机号码 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
32
,
isNotEmpty
=
true
)
@Schema
(
description
=
"手机号码"
)
@ExcelProperty
(
"手机号码"
)
private
String
empMobile
;
/**
* 项目编码
*/
@Length
(
max
=
32
,
message
=
"项目编码 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
32
,
isNotEmpty
=
true
)
@Schema
(
description
=
"项目编码"
)
@ExcelProperty
(
"项目编码"
)
private
String
settleDomainCode
;
/**
* 身份证省
*/
@ExcelAttribute
(
name
=
"身份证省"
,
isArea
=
true
)
@Schema
(
description
=
"身份证省"
)
@ExcelProperty
(
"身份证省"
)
private
Integer
idCardProvince
;
/**
* 身份证市
*/
@ExcelAttribute
(
name
=
"身份证市"
,
isArea
=
true
,
parentField
=
"idCardProvince"
)
@Schema
(
description
=
"身份证市"
)
@ExcelProperty
(
"身份证市"
)
private
Integer
idCardCity
;
/**
* 身份证县
*/
@ExcelAttribute
(
name
=
"身份证县"
,
isArea
=
true
,
parentField
=
"idCardCity"
)
@Schema
(
description
=
"身份证县"
)
@ExcelProperty
(
"身份证县"
)
private
Integer
idCardTown
;
/**
* 身份证所在地
*/
@ExcelAttribute
(
name
=
"身份证所在地"
)
@Schema
(
description
=
"身份证所在地"
)
@ExcelProperty
(
"身份证所在地"
)
private
Integer
idCardAddress
;
/**
* 档案-省
*/
@ExcelAttribute
(
name
=
"档案-省"
,
isArea
=
true
)
@Schema
(
description
=
"档案-省"
)
@ExcelProperty
(
"档案-省"
)
private
Integer
fileProvince
;
/**
* 档案-市
*/
@ExcelAttribute
(
name
=
"档案-市"
,
isArea
=
true
,
parentField
=
"fileProvince"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"档案-市"
)
@ExcelProperty
(
"档案-市"
)
private
Integer
fileCity
;
/**
* 档案-县
*/
@ExcelAttribute
(
name
=
"档案-县"
,
isArea
=
true
,
parentField
=
"fileCity"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"档案-县"
)
@ExcelProperty
(
"档案-县"
)
private
Integer
fileTown
;
/**
* 就职班组
*/
@Length
(
max
=
50
,
message
=
"就职班组 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"就职班组"
,
maxLength
=
50
)
@Schema
(
description
=
"就职班组"
)
@ExcelProperty
(
"就职班组"
)
private
String
inauguralTeam
;
/**
* 就职岗位
*/
@Length
(
max
=
30
,
message
=
"就职岗位 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"就职岗位"
,
maxLength
=
30
,
isNotEmpty
=
true
)
@Schema
(
description
=
"就职岗位"
)
@ExcelProperty
(
"就职岗位"
)
private
String
post
;
/**
* 试用期(单位月)
*/
@Length
(
max
=
2
,
message
=
"试用期 不能超过2 个字符"
)
@ExcelAttribute
(
name
=
"试用期"
,
maxLength
=
32
)
@Schema
(
description
=
"试用期"
)
@ExcelProperty
(
"试用期"
)
private
String
tryPeriod
;
/**
* 工时制:1标准工时 2 综合工时 3不定时工时制
*/
@Length
(
max
=
1
,
message
=
"工时制 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
1
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
,
isNotEmpty
=
true
)
@Schema
(
description
=
"工时制:1标准工时 2 综合工时 3不定时工时制"
)
@ExcelProperty
(
"工时制"
)
private
String
workingHours
;
/**
* 民族
*/
@Length
(
max
=
32
,
message
=
"民族 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"民族"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATIONAL
,
isNotEmpty
=
true
)
@Schema
(
description
=
"民族"
)
@ExcelProperty
(
"民族"
)
private
String
empNational
;
/**
* 户口性质
*/
@Length
(
max
=
32
,
message
=
"户口性质 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"户口性质"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_REGISTYPE
)
@Schema
(
description
=
"户口性质"
)
@ExcelProperty
(
"户口性质"
)
private
String
empRegisType
;
/**
* 合同类型
*/
@Length
(
max
=
32
,
message
=
"合同类型 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"合同类型"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
PERSONNEL_TYPE
)
@Schema
(
description
=
"合同类型"
)
@ExcelProperty
(
"合同类型"
)
private
String
contractName
;
/**
* 业务细分 personnel_type_sub
*/
@ExcelAttribute
(
name
=
"业务细分"
,
maxLength
=
32
)
@Schema
(
description
=
"业务细分"
,
name
=
"contractName"
)
private
String
contractSubName
;
/**
* 签订期限
* 0 已完成一定工作任务为期限
* 1 固定期限
* 2 无固定期限
*/
@NotBlank
(
message
=
"签订期限不能为空"
)
@Length
(
max
=
32
,
message
=
"签订期限不能超过32个字符"
)
@ExcelAttribute
(
name
=
"签订期限"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_CONTRACT_TYPE
)
@Schema
(
description
=
"签订期限"
,
name
=
"contractType"
)
private
String
contractType
;
/**
* 合同起始时间
*/
@ExcelAttribute
(
name
=
"合同起始时间"
,
isDate
=
true
)
@Schema
(
description
=
"合同起始时间"
)
@ExcelProperty
(
"合同起始时间"
)
private
Date
contractStart
;
/**
* 合同到期时间
*/
@ExcelAttribute
(
name
=
"合同到期时间"
,
isDate
=
true
)
@Schema
(
description
=
"合同到期时间"
)
@ExcelProperty
(
"合同到期时间"
)
private
Date
contractEnd
;
/**
* 合同期限
*/
@ExcelAttribute
(
name
=
"合同期限"
,
isInteger
=
true
)
@Schema
(
description
=
"合同期限"
)
@ExcelProperty
(
"合同期限"
)
private
Integer
contractTerm
;
/**
* 学历名称
*/
@ExcelAttribute
(
name
=
"学历"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EDUCATION
)
@NotNull
(
message
=
"学历不可为空"
)
@Schema
(
description
=
"学历:无档案的时候 新增档案时同步新增学历"
)
@ExcelProperty
(
value
=
"学历"
)
private
String
educationName
;
/**
* 备案基数
*/
@Length
(
max
=
255
,
message
=
"备案基数 不能超过255 个字符"
)
@ExcelAttribute
(
name
=
"备案基数"
,
maxLength
=
255
)
@Schema
(
description
=
"备案基数:购买社保时必填"
)
@ExcelProperty
(
"备案基数"
)
private
String
recordBase
;
/**
* 社保户
*/
@Length
(
max
=
32
,
message
=
"社保户 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"社保户"
,
maxLength
=
32
)
@Schema
(
description
=
"社保户"
)
@ExcelProperty
(
"社保户"
)
private
String
socialHousehold
;
/**
* 养老起缴日期
*/
@ExcelAttribute
(
name
=
"养老起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"养老起缴日期:购买社保时必填"
)
@ExcelProperty
(
"养老起缴日期"
)
private
Date
pensionStart
;
/**
* 医疗起缴日期
*/
@ExcelAttribute
(
name
=
"医疗起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"医疗起缴日期"
)
@ExcelProperty
(
"医疗起缴日期"
)
private
Date
medicalStart
;
/**
* 失业起缴日期
*/
@ExcelAttribute
(
name
=
"失业起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"失业起缴日期"
)
@ExcelProperty
(
"失业起缴日期"
)
private
Date
unemployStart
;
/**
* 工伤起缴日期
*/
@ExcelAttribute
(
name
=
"工伤起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"工伤起缴日期"
)
@ExcelProperty
(
"工伤起缴日期"
)
private
Date
workInjuryStart
;
/**
* 生育起缴日期
*/
@ExcelAttribute
(
name
=
"生育起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"生育起缴日期"
)
@ExcelProperty
(
"生育起缴日期"
)
private
Date
birthStart
;
/**
* 大病起缴日期
*/
@ExcelAttribute
(
name
=
"大病起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"大病起缴日期"
)
@ExcelProperty
(
"大病起缴日期"
)
private
Date
bigailmentStart
;
/**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)
*/
@Length
(
max
=
1
,
message
=
"缴纳类型 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"缴纳类型"
,
maxLength
=
1
,
isDataId
=
true
,
readConverterExp
=
"0=最低缴纳,1=自定义缴纳,2=最高缴纳"
)
@Schema
(
description
=
"缴纳类型:(0最低缴纳、1自定义缴纳、2最高缴纳)"
)
@ExcelProperty
(
"缴纳类型"
)
private
String
paymentType
;
/**
* 养老基数
*/
@ExcelAttribute
(
name
=
"养老基数"
)
@Schema
(
description
=
"养老基数"
)
@ExcelProperty
(
"养老基数"
)
private
BigDecimal
pensionCardinal
;
/**
* 医疗基数
*/
@ExcelAttribute
(
name
=
"医疗基数"
)
@Schema
(
description
=
"医疗基数"
)
@ExcelProperty
(
"医疗基数"
)
private
BigDecimal
medicalCardinal
;
/**
* 失业基数
*/
@ExcelAttribute
(
name
=
"失业基数"
)
@Schema
(
description
=
"失业基数"
)
@ExcelProperty
(
"失业基数"
)
private
BigDecimal
unemploymentCardinal
;
/**
* 工伤基数
*/
@ExcelAttribute
(
name
=
"工伤基数"
)
@Schema
(
description
=
"工伤基数"
)
@ExcelProperty
(
"工伤基数"
)
private
BigDecimal
workInjuryCardinal
;
/**
* 生育基数
*/
@ExcelAttribute
(
name
=
"生育基数"
)
@Schema
(
description
=
"生育基数"
)
@ExcelProperty
(
"生育基数"
)
private
BigDecimal
birthCardinal
;
/**
* 大病基数
*/
@ExcelAttribute
(
name
=
"大病基数"
)
@Schema
(
description
=
"大病基数"
)
@ExcelProperty
(
"大病基数"
)
private
BigDecimal
bigailmentCardinal
;
/**
* 公积金户
*/
@Length
(
max
=
32
,
message
=
"公积金户 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"公积金户"
,
maxLength
=
32
)
@Schema
(
description
=
"公积金户"
)
@ExcelProperty
(
"公积金户"
)
private
String
providentHousehold
;
/**
* 公积金起缴日期
*/
@ExcelAttribute
(
name
=
"公积金起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"公积金起缴日期"
)
@ExcelProperty
(
"公积金起缴日期"
)
private
Date
providentStart
;
/**
* 公积金基数
*/
@ExcelAttribute
(
name
=
"公积金基数"
)
@Schema
(
description
=
"公积金基数"
)
@ExcelProperty
(
"公积金基数"
)
private
BigDecimal
providentCardinal
;
/**
* 公积金缴纳比例
*/
@ExcelAttribute
(
name
=
"公积金缴纳比例"
)
@Schema
(
description
=
"公积金缴纳比例"
)
@ExcelProperty
(
"公积金缴纳比例"
)
private
BigDecimal
providentPer
;
/**
* 委托备注
*/
@Length
(
max
=
100
,
message
=
"委托备注 不能超过100 个字符"
)
@ExcelAttribute
(
name
=
"委托备注"
,
maxLength
=
100
)
@Schema
(
description
=
"委托备注"
)
@ExcelProperty
(
"委托备注"
)
private
String
trustRemark
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
6d6f200a
...
@@ -31,13 +31,15 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -31,13 +31,15 @@ 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.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoVo
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -48,6 +50,7 @@ import java.io.InputStream;
...
@@ -48,6 +50,7 @@ import java.io.InputStream;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 派单信息记录表
* 派单信息记录表
*
*
...
@@ -59,20 +62,22 @@ import java.util.List;
...
@@ -59,20 +62,22 @@ import java.util.List;
public
class
TDispatchInfoServiceImpl
extends
ServiceImpl
<
TDispatchInfoMapper
,
TDispatchInfo
>
implements
TDispatchInfoService
{
public
class
TDispatchInfoServiceImpl
extends
ServiceImpl
<
TDispatchInfoMapper
,
TDispatchInfo
>
implements
TDispatchInfoService
{
/**
/**
* 派单信息记录表简单分页查询
* 派单信息记录表简单分页查询
*
* @param tDispatchInfo 派单信息记录表
* @param tDispatchInfo 派单信息记录表
* @return
* @return
*/
*/
@Override
@Override
public
IPage
<
TDispatchInfo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfo
tDispatchInfo
)
{
public
IPage
<
TDispatchInfo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfo
tDispatchInfo
)
{
return
baseMapper
.
getTDispatchInfoPage
(
page
,
tDispatchInfo
);
return
baseMapper
.
getTDispatchInfoPage
(
page
,
tDispatchInfo
);
}
}
/**
/**
* 派单信息记录表批量导出
* 派单信息记录表批量导出
*
* @return
* @return
*/
*/
@Override
@Override
public
void
listExport
(
HttpServletResponse
response
,
TDispatchInfoSearchVo
searchVo
)
{
public
void
listExport
(
HttpServletResponse
response
,
TDispatchInfoSearchVo
searchVo
)
{
String
fileName
=
"不良记录批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"不良记录批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
//获取要导出的列表
List
<
TDispatchInfo
>
list
=
new
ArrayList
<>();
List
<
TDispatchInfo
>
list
=
new
ArrayList
<>();
...
@@ -82,45 +87,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -82,45 +87,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
out
=
response
.
getOutputStream
();
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TDispatchInfo
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TDispatchInfo
.
class
).
build
();
int
index
=
0
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TDispatchInfo
>
util
=
new
ExcelUtil
<>(
TDispatchInfo
.
class
);
ExcelUtil
<
TDispatchInfo
>
util
=
new
ExcelUtil
<>(
TDispatchInfo
.
class
);
for
(
TDispatchInfo
vo:
list
)
{
for
(
TDispatchInfo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
}
}
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
++;
}
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
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
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
list
.
clear
();
}
}
out
.
flush
();
out
.
flush
();
excelWriter
.
finish
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
log
.
error
(
"执行异常"
,
e
);
}
finally
{
}
finally
{
try
{
try
{
if
(
null
!=
out
)
{
if
(
null
!=
out
)
{
out
.
close
();
out
.
close
();
...
@@ -135,11 +140,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -135,11 +140,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public
List
<
TDispatchInfo
>
noPageDiy
(
TDispatchInfoSearchVo
searchVo
)
{
public
List
<
TDispatchInfo
>
noPageDiy
(
TDispatchInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TDispatchInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TDispatchInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TDispatchInfo:
:
getId
,
idList
);
wrapper
.
in
(
TDispatchInfo:
:
getId
,
idList
);
}
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
return
baseMapper
.
selectList
(
wrapper
);
...
@@ -148,21 +153,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -148,21 +153,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
Long
noPageCountDiy
(
TDispatchInfoSearchVo
searchVo
)
{
private
Long
noPageCountDiy
(
TDispatchInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TDispatchInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TDispatchInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TDispatchInfo:
:
getId
,
idList
);
wrapper
.
in
(
TDispatchInfo:
:
getId
,
idList
);
}
}
return
baseMapper
.
selectCount
(
wrapper
);
return
baseMapper
.
selectCount
(
wrapper
);
}
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TDispatchInfoSearchVo
entity
)
{
private
LambdaQueryWrapper
buildQueryWrapper
(
TDispatchInfoSearchVo
entity
)
{
LambdaQueryWrapper
<
TDispatchInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
TDispatchInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TDispatchInfo:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
wrapper
.
ge
(
TDispatchInfo:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TDispatchInfo:
:
getCreateTime
,
.
le
(
TDispatchInfo:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
entity
.
getCreateTimes
()[
1
]);
}
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TDispatchInfo:
:
getCreateName
,
entity
.
getCreateName
());
wrapper
.
eq
(
TDispatchInfo:
:
getCreateName
,
entity
.
getCreateName
());
}
}
return
wrapper
;
return
wrapper
;
}
}
...
@@ -170,12 +175,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -170,12 +175,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override
@Override
public
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
)
{
public
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
)
{
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
TDispatchInfoVo
>
util1
=
new
ExcelUtil
<>(
TDispatchInfoVo
.
class
);;
ExcelUtil
<
TDispatchImportVo
>
util1
=
new
ExcelUtil
<>(
TDispatchImportVo
.
class
);
;
// 写法2:
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
try
{
EasyExcel
.
read
(
inputStream
,
TDispatchInfoVo
.
class
,
new
ReadListener
<
TDispatchInfo
Vo
>()
{
EasyExcel
.
read
(
inputStream
,
TDispatchImportVo
.
class
,
new
ReadListener
<
TDispatchImport
Vo
>()
{
/**
/**
* 单次缓存的数据量
* 单次缓存的数据量
*/
*/
...
@@ -183,17 +189,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -183,17 +189,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
/**
/**
*临时存储
*临时存储
*/
*/
private
List
<
TDispatchInfo
Vo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
private
List
<
TDispatchImport
Vo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
@Override
@Override
public
void
invoke
(
TDispatchInfo
Vo
data
,
AnalysisContext
context
)
{
public
void
invoke
(
TDispatchImport
Vo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
))
{
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessageList
.
add
(
errorMessage
);
errorMessageList
.
add
(
errorMessage
);
}
else
{
}
else
{
cachedDataList
.
add
(
data
);
cachedDataList
.
add
(
data
);
}
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
...
@@ -202,6 +208,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -202,6 +208,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
}
}
}
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
saveData
();
...
@@ -212,33 +219,66 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -212,33 +219,66 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
*/
private
void
saveData
()
{
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTDispatchInfo
(
cachedDataList
,
errorMessageList
);
importTDispatchInfo
(
cachedDataList
,
errorMessageList
);
log
.
info
(
"存储数据库成功!"
);
log
.
info
(
"存储数据库成功!"
);
}
}
}).
sheet
().
doRead
();
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
}
return
R
.
ok
(
errorMessageList
);
return
R
.
ok
(
errorMessageList
);
}
}
private
void
importTDispatchInfo
(
List
<
TDispatchInfoVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
@GlobalTransactional
private
void
importTDispatchInfo
(
List
<
TDispatchImportVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
// 个性化校验逻辑
ErrorMessage
errorMsg
;
ErrorMessage
errorMsg
;
// 执行数据插入操作 组装
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
TDispatchInfoVo
excel
=
excelVOList
.
get
(
i
);
TDispatchImportVo
excel
=
excelVOList
.
get
(
i
);
// 数据合法情况 TODO
// 数据合法情况
if
(
Common
.
isNotNull
(
excel
.
getContractName
())
&&
(
Common
.
isEmpty
(
excel
.
getContractSubName
())
||
Common
.
isEmpty
(
excel
.
getContractType
())
||
Common
.
isEmpty
(
excel
.
getContractStart
())
||
Common
.
isEmpty
(
excel
.
getContractEnd
())
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_CONTRACT_NOT_EMPTY
)));
continue
;
}
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
())
&&
(
Common
.
isEmpty
(
excel
.
getRecordBase
())
||
Common
.
isEmpty
(
excel
.
getPensionStart
())
||
Common
.
isEmpty
(
excel
.
getPaymentType
())
||
Common
.
isEmpty
(
excel
.
getPensionCardinal
())
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_NOT_EMPTY
)));
continue
;
}
// 无档案无项目档案无合同无学历
// 有档案无项目档案无合同
// 有档案有项目档案无合同
// 新增社保
// 新增公积金
// 变更社保公积金查询
// 插入
insertExcel
(
excel
);
insertExcel
(
excel
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
}
}
/**
/**
* 插入excel bad record
* 插入excel bad record
*/
*/
private
void
insertExcel
(
TDispatchInfo
Vo
excel
)
{
private
void
insertExcel
(
TDispatchImport
Vo
excel
)
{
TDispatchInfo
insert
=
new
TDispatchInfo
();
TDispatchInfo
insert
=
new
TDispatchInfo
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
this
.
save
(
insert
);
...
...
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