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
84dc70bb
Commit
84dc70bb
authored
Aug 23, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专项扣除
parent
226f6f3f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
129 additions
and
27 deletions
+129
-27
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-1
pom.xml
yifu-common/yifu-common-ekp/pom.xml
+13
-1
EkpSalaryUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
+53
-0
EkpConstants.java
...om/yifu/cloud/plus/v1/yifu/ekp/constant/EkpConstants.java
+19
-0
EkpSalaryParam.java
...va/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParam.java
+13
-0
TSpecialDeducationSumServiceImpl.java
...salary/service/impl/TSpecialDeducationSumServiceImpl.java
+8
-8
TDispatchImportVo.java
.../yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
+5
-5
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+15
-10
application-dev.yml
...al/yifu-social-biz/src/main/resources/application-dev.yml
+2
-2
No files found.
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
84dc70bb
...
...
@@ -175,7 +175,7 @@ emp.dispatch.fund.start.is.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u516C\u79EF\u91
emp.dispatch.emp.contract.not.empty
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u5408\u
540C
\u
76F8
\u5173\u
4FE1
\u
606F
\u
4E0D
\u
53EF
\u
4E3A
\u
7A7A
emp.dispatch.emp.not.empty
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
7CFB
\u
7EDF
\u
65E0
\u
5BF9
\u
5E94
\u9879\u
76EE
\u6863\u6848\u
FF0C
\u6863\u6848\u
76F8
\u5173\u
540C
\u
8272\u
5B57
\u
6BB5
\u
5FC5
\u
586B
emp.dispatch.emp.not.empty
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
7CFB
\u
7EDF
\u
65E0
\u
5BF9
\u
5E94
\u9879\u
76EE
\u6863\u6848\u
FF0C
\u6863\u6848\u
76F8
\u5173\u
540C
\u
5B57
\u
6BB5
\u
5FC5
\u
586B
emp.dispatch.settleDomain.stop
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
5BF9
\u
5E94
\u9879\u
76EE
\u
7F16
\u7801\u
5DF2
\u
505C
\u
6B62
\u5408\u
4F5C
...
...
yifu-common/yifu-common-ekp/pom.xml
View file @
84dc70bb
...
...
@@ -19,5 +19,17 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot
</artifactId>
</dependency>
</dependencies>
<dependency>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-mapper-asl
</artifactId>
<version>
1.9.13
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
5.8.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
View file @
84dc70bb
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
util
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
io.micrometer.core.instrument.util.StringUtils
;
import
lombok.extern.log4j.Log4j2
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.http.*
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.client.RestTemplate
;
import
cn.hutool.json.JSONObject
;
/**
* @Author fxj
...
...
@@ -17,4 +26,48 @@ public class EkpSalaryUtil {
@Autowired
private
EkpSalaryProperties
ekpProperties
;
public
String
sendToEKP
(
EkpSalaryParam
param
){
log
.
info
(
"推送EKP开始--薪资明细数据"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
param
);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject
loginName
=
new
JSONObject
();
loginName
.
append
(
"LoginName"
,
ekpProperties
.
getLoginName
());
String
loginData
=
new
ObjectMapper
().
writeValueAsString
(
loginName
);
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") );
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getDocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
//wholeForm.add("docCreator", loginData);
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelId
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowId
());
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
System
.
out
.
println
(
"wholeForm:"
+
wholeForm
);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
wholeForm
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
){
log
.
info
(
e
.
getMessage
());
return
null
;
}
}
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/constant/EkpConstants.java
0 → 100644
View file @
84dc70bb
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
constant
;
/**
* @Author fxj
* @Date 2022/8/22
* @Description
* @Version 1.0
*/
public
interface
EkpConstants
{
/**
* 推送成功
*/
String
SEND_SUCCESS
=
"推送成功"
;
/**
* 推送失败
*/
String
SEND_FAILED
=
"推送失败"
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParam.java
0 → 100644
View file @
84dc70bb
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public
class
EkpSalaryParam
{
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSpecialDeducationSumServiceImpl.java
View file @
84dc70bb
...
...
@@ -12,6 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSpecialDeducationSumMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
...
...
@@ -99,12 +100,11 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
}
/**
* @param sdsList
* @Description: 保存专项
* @Author: hgw
* @Date: 2019/10/14 14:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
* @Author fxj
* @Description 保存专项
* @Date 10:05 2022/8/23
**/
@Transactional
@Override
public
R
<
List
<
ErrorMessage
>>
uploadSds
(
List
<
TSpecialDeducationSum
>
sdsList
)
{
if
(
Common
.
isNotNull
(
sdsList
))
{
...
...
@@ -149,7 +149,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
s
.
setCreateBy
(
String
.
valueOf
(
user
.
getId
()));
}
if
(
this
.
saveBatch
(
sdsList
)){
return
R
.
failed
(
CommonConstants
.
SAVE_SUCCESS
);
return
R
.
ok
(
null
,
CommonConstants
.
SAVE_SUCCESS
);
}
else
{
return
R
.
failed
(
CommonConstants
.
SAVE_FAILED
);
}
...
...
@@ -163,7 +163,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
int
i
=
0
;
for
(
TSpecialDeducationSum
data:
sdsList
)
{
i
++;
errorMessage
=
util1
.
checkEntity
(
data
,
-
1
);
errorMessage
=
util1
.
checkEntity
(
data
,
i
);
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessages
.
add
(
errorMessage
);
}
else
{
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
View file @
84dc70bb
...
...
@@ -54,7 +54,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 身份证号
*/
@Length
(
max
=
20
,
message
=
"身份证号 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
...
...
@@ -148,7 +148,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 就职岗位
*/
@Length
(
max
=
30
,
message
=
"岗位 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"岗位"
,
maxLength
=
30
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"岗位"
,
maxLength
=
30
)
@Schema
(
description
=
"岗位"
)
@ExcelProperty
(
"岗位"
)
private
String
post
;
...
...
@@ -166,7 +166,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 工时制:1标准工时 2 综合工时 3不定时工时制
*/
@Length
(
max
=
1
,
message
=
"工时制 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
50
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
50
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
)
@Schema
(
description
=
"工时制:1标准工时 2 综合工时 3不定时工时制"
)
@ExcelProperty
(
"工时制"
)
private
String
workingHours
;
...
...
@@ -174,7 +174,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 民族
*/
@Length
(
max
=
32
,
message
=
"民族 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"民族"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATIONAL
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"民族"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATIONAL
)
@Schema
(
description
=
"民族"
)
@ExcelProperty
(
"民族"
)
private
String
empNational
;
...
...
@@ -239,7 +239,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
* 学历名称
*/
@ExcelAttribute
(
name
=
"学历"
)
@ExcelAttribute
(
name
=
"学历"
,
isNotEmpty
=
true
)
@NotNull
(
message
=
"学历不可为空"
)
@Schema
(
description
=
"学历:派增只做记录"
)
@ExcelProperty
(
value
=
"学历"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
84dc70bb
...
...
@@ -1930,11 +1930,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isEmpty
(
empVo
)){
if
(
Common
.
isEmpty
(
excel
.
getFileProvince
())
||
Common
.
isEmpty
(
excel
.
getFileCity
())
||
Common
.
isEmpty
(
excel
.
getIdCardProvince
())
||
Common
.
isEmpty
(
excel
.
getIdCardCity
())
||
Common
.
isEmpty
(
excel
.
getWorkingHours
())
||
Common
.
isEmpty
(
excel
.
getEmpNational
())
||
Common
.
isEmpty
(
excel
.
getEmpMobile
())
||
Common
.
isEmpty
(
excel
.
getEmpType
())
||
Common
.
isEmpty
(
excel
.
getPost
())){
||
Common
.
isEmpty
(
excel
.
getPost
())
||
Common
.
isEmpty
(
excel
.
getEducationName
())
||
Common
.
isEmpty
(
excel
.
getContractName
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_EMPTY
)));
return
true
;
}
...
...
@@ -1958,6 +1962,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
true
;
}
}
Date
contractDateTemp
=
excel
.
getContractStart
();
/*项目档案有可用状态的合同:
不对合同做判断,取值:项目档案的合同;
项目档案无可用状态的合同:
...
...
@@ -2093,7 +2098,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
true
;
}
//校验各项基数
if
(
validSocialBaseInfo
(
errorMessageList
,
excel
,
empVo
,
socialSet
)){
if
(
validSocialBaseInfo
(
errorMessageList
,
excel
,
empVo
,
socialSet
,
contractDateTemp
)){
return
true
;
}
}
...
...
@@ -2139,7 +2144,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
false
;
}
private
boolean
validSocialBaseInfo
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
,
SysBaseSetInfo
socialSet
)
{
private
boolean
validSocialBaseInfo
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
,
SysBaseSetInfo
socialSet
,
Date
contractDateTemp
)
{
if
(
Common
.
isNotNull
(
socialSet
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
&&
(
excel
.
getPensionCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
...
...
@@ -2183,13 +2188,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR
)));
return
true
;
}
flag
=
(
Common
.
isNotNull
(
excel
.
getContractStart
()
)
&&
((!
excel
.
getContractStart
()
.
equals
(
excel
.
getPensionStart
())
&&
Common
.
isNotNull
(
excel
.
getPensionStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getMedicalStart
())
&&
Common
.
isNotNull
(
excel
.
getMedicalStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getUnemployStart
())
&&
Common
.
isNotNull
(
excel
.
getUnemployStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getBirthStart
())
&&
Common
.
isNotNull
(
excel
.
getBirthStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getWorkInjuryStart
())
&&
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getBigailmentStart
())
&&
Common
.
isNotNull
(
excel
.
getBigailmentStart
()))));
flag
=
(
Common
.
isNotNull
(
contractDateTemp
)
&&
((!
contractDateTemp
.
equals
(
excel
.
getPensionStart
())
&&
Common
.
isNotNull
(
excel
.
getPensionStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getMedicalStart
())
&&
Common
.
isNotNull
(
excel
.
getMedicalStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getUnemployStart
())
&&
Common
.
isNotNull
(
excel
.
getUnemployStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getBirthStart
())
&&
Common
.
isNotNull
(
excel
.
getBirthStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getWorkInjuryStart
())
&&
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getBigailmentStart
())
&&
Common
.
isNotNull
(
excel
.
getBigailmentStart
()))));
if
(
flag
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR2
)));
return
true
;
...
...
yifu-social/yifu-social-biz/src/main/resources/application-dev.yml
View file @
84dc70bb
...
...
@@ -48,6 +48,6 @@ spring:
activate
:
on-profile
:
dev
redis
:
host
:
1
92.168.1.65
port
:
22
379
host
:
1
27.0.0.1
port
:
6
379
password
:
'
@yf_2017'
\ No newline at end of file
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