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
a1245590
Commit
a1245590
authored
Jul 21, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量新增导入
parent
957fa46a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
384 additions
and
116 deletions
+384
-116
DispatchAddVo.java
...om/yifu/cloud/plus/v1/yifu/archives/vo/DispatchAddVo.java
+3
-0
TEmpContractAlertServiceImpl.java
...u/archives/service/impl/TEmpContractAlertServiceImpl.java
+11
-7
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+6
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+14
-0
Common.java
.../com/yifu.cloud.plus.v1/yifu/common/core/util/Common.java
+32
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+2
-2
daprConfig.properties
...yifu-common-dapr/src/main/resources/daprConfig.properties
+13
-11
TAuditInfo.java
...com/yifu/cloud/plus/v1/yifu/social/entity/TAuditInfo.java
+10
-33
TSocialFundInfo.java
...ifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
+6
-12
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+274
-21
TAuditInfoMapper.xml
...social-biz/src/main/resources/mapper/TAuditInfoMapper.xml
+13
-30
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/DispatchAddVo.java
View file @
a1245590
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
lombok.Data
;
import
java.util.List
;
/**
...
...
@@ -8,6 +10,7 @@ import java.util.List;
* @Description 派单新增档案|项目档案|员工合同
* @Version 1.0
*/
@Data
public
class
DispatchAddVo
{
/**
* 员工档案
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpContractAlertServiceImpl.java
View file @
a1245590
...
...
@@ -29,10 +29,10 @@ import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployee
Info
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployee
Project
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployee
Info
Mapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployee
Project
Mapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
...
@@ -63,7 +63,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
private
final
TEmployeeContractInfoMapper
contractInfoMapper
;
private
final
TEmployee
InfoMapper
employeeInfo
Mapper
;
private
final
TEmployee
ProjectMapper
project
Mapper
;
@Override
public
IPage
<
TEmpContractAlert
>
pageDiy
(
Page
page
,
ContractAlertSearchVo
searchVo
)
{
...
...
@@ -216,6 +216,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_STRING
)
.
isNotNull
(
TEmployeeContractInfo:
:
getAuditTimeLast
)
.
eq
(
TEmployeeContractInfo:
:
getContractType
,
"1"
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeContractInfo:
:
getWorkFlag
,
CommonConstants
.
ZERO_STRING
)
.
le
(
TEmployeeContractInfo:
:
getContractEnd
,
DateUtil
.
dateIncreaseByDay
(
DateUtil
.
dateIncreaseByMonth
(
DateUtil
.
getCurrentDateTime
(),
...
...
@@ -254,10 +255,13 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
private
void
extracted
(
Date
nowDate
,
TEmployeeContractInfo
contract
,
Map
<
String
,
TEmpContractAlert
>
alertMap
)
{
TEmployeeInfo
employeeInfo
=
employeeInfoMapper
.
selectById
(
contract
.
getEmpId
());
if
(
Common
.
isNotNull
(
employeeInfo
)
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
employeeInfo
.
getEmpNatrue
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
employeeInfo
.
getEmpNatrue
())){
TEmployeeProject
project
=
projectMapper
.
selectOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpId
,
contract
.
getEmpId
())
.
eq
(
TEmployeeProject:
:
getDeptNo
,
contract
.
getDeptNo
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
project
)
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
project
.
getEmpNatrue
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
project
.
getEmpNatrue
())){
return
;
}
TEmpContractAlert
alert
=
alertMap
.
get
(
contract
.
getEmpIdcard
());
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
a1245590
...
...
@@ -335,6 +335,12 @@ public interface CommonConstants {
*/
int
ONE_INT_NEGATE
=
-
1
;
/**
* 数字int -1
* @author fxj
*/
String
ONE_STRING_NEGATE
=
"-1"
;
/**
* 数字int -1
* @author fxj
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
a1245590
...
...
@@ -382,4 +382,18 @@ public interface ErrorCodes {
* 新增异常:未找到对应项目编码信息
*/
String
EMP_DISPATCH_PROJECT_NOT_FOUND
=
"emp.dispatch.project.not.found"
;
/**
* 新增异常:派单新增档案失败,请重试
*/
String
EMP_DISPATCH_ADD_EMP_ERROR
=
"emp.dispatch.add.emp.error"
;
/**
* 新增异常:派单新增合同失败,请重试
*/
String
EMP_DISPATCH_ADD_CONTRACT_ERROR
=
"emp.dispatch.add.contract.error"
;
/**
* 新增异常:派单新增项目档案失败,请重试
*/
String
EMP_DISPATCH_ADD_PROJECT_ERROR
=
"emp.dispatch.add.project.error"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/Common.java
View file @
a1245590
...
...
@@ -6,6 +6,8 @@ import org.apache.commons.lang.StringUtils;
import
java.lang.reflect.Method
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -345,4 +347,34 @@ public class Common {
year
=
Integer
.
valueOf
(
endYear
).
intValue
()
-
Integer
.
valueOf
(
startYear
).
intValue
()
;
return
year
<
0
?
0
:
year
;
}
/**
* 公积金单边小数点格式化
*
* @param money
* @param type
* @return
* @Author fxj
* @Date 2019-09-26
**/
public
static
BigDecimal
formatMoneyForFund
(
BigDecimal
money
,
int
type
)
{
DecimalFormat
formater
=
new
DecimalFormat
(
"#0.#"
);
if
(
type
==
1
)
{
//四舍五入取整
return
BigDecimal
.
valueOf
(
money
.
doubleValue
()).
setScale
(
0
,
RoundingMode
.
HALF_UP
);
}
if
(
type
==
2
)
{
//元一下全部舍去,取整
return
BigDecimal
.
valueOf
(
Math
.
floor
(
money
.
doubleValue
())).
setScale
(
0
,
BigDecimal
.
ROUND_UP
);
}
if
(
type
==
3
)
{
//见角进元
return
BigDecimal
.
valueOf
(
Math
.
ceil
(
BigDecimal
.
valueOf
(
money
.
doubleValue
()).
setScale
(
1
,
RoundingMode
.
HALF_DOWN
).
doubleValue
())).
setScale
(
0
,
BigDecimal
.
ROUND_UP
);
}
if
(
type
==
4
)
{
//保留两位小数
return
BigDecimal
.
valueOf
(
money
.
doubleValue
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
}
if
(
type
==
5
)
{
//保留一位小数
return
BigDecimal
.
valueOf
(
money
.
doubleValue
()).
setScale
(
1
,
RoundingMode
.
HALF_UP
);
}
return
money
;
}
}
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
a1245590
...
...
@@ -100,8 +100,8 @@ public class ArchivesDaprUtil {
return
res
;
}
public
R
<
DispatchAddVo
>
addDispatchInfo
(
EmpDispatchAddVo
addVo
)
{
R
<
DispatchAddVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeeinfo/addDispatchInfo"
,
JSON
.
toJSONString
(
addVo
),
DispatchAddVo
.
class
,
SecurityConstants
.
FROM_IN
);
public
R
<
Emp
DispatchAddVo
>
addDispatchInfo
(
EmpDispatchAddVo
addVo
)
{
R
<
EmpDispatchAddVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeeinfo/addDispatchInfo"
,
JSON
.
toJSONString
(
addVo
),
Emp
DispatchAddVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"新增档案|项目档案|合同信息失败!"
);
}
...
...
yifu-common/yifu-common-dapr/src/main/resources/daprConfig.properties
View file @
a1245590
dapr.upms.appUrl
=
http://
yifu-upms.qas-mvp.svc.cluster.local
:3500/v1.0/invoke/
dapr.upms.appUrl
=
http://
localhost
:3500/v1.0/invoke/
dapr.upms.appId
=
yifu-upms
dapr.upms.appPort
=
4000
dapr.upms.httpPort
=
3500
dapr.upms.grpcPort
=
52000
dapr.upms.metricsPort
=
9094
#\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
#dapr.check.appUrl=http://localhost:3502
/v1.0/invoke/
dapr.check.appUrl
=
http://localhost:3507
/v1.0/invoke/
dapr.check.appId
=
yifu-check
dapr.check.appPort
=
5022
dapr.check.httpPort
=
3502
dapr.check.grpcPort
=
52002
dapr.check.metricsPort
=
9092
\ No newline at end of file
#\u672C\u5730
dapr.archives.appUrl
=
http://localhost:3508/v1.0/invoke/
dapr.archives.appId
=
yifu-archives
dapr.social.appUrl
=
http://localhost:3510/v1.0/invoke/
dapr.social.appId
=
yifu-social
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TAuditInfo.java
View file @
a1245590
...
...
@@ -109,38 +109,15 @@ public class TAuditInfo extends BaseEntity {
@Schema
(
description
=
"公积金ID"
)
@ExcelProperty
(
"公积金ID"
)
private
String
providentId
;
/**
* 基数变更ID
*/
@Length
(
max
=
32
,
message
=
"基数变更ID 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"基数变更ID"
,
maxLength
=
32
)
@Schema
(
description
=
"基数变更ID"
)
@ExcelProperty
(
"基数变更ID"
)
private
String
cardinalId
;
/**
* 社保代理结算信息ID
*/
@Length
(
max
=
32
,
message
=
"社保代理结算信息ID 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"社保代理结算信息ID"
,
maxLength
=
32
)
@Schema
(
description
=
"社保代理结算信息ID"
)
@ExcelProperty
(
"社保代理结算信息ID"
)
private
String
forecastFormId
;
/**
* 人员离职派单ID
*/
@Length
(
max
=
32
,
message
=
"人员离职派单ID 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"人员离职派单ID"
,
maxLength
=
32
)
@Schema
(
description
=
"人员离职派单ID"
)
@ExcelProperty
(
"人员离职派单ID"
)
private
String
empLeaveId
;
/**
* 社保、公积金核准表
* 身份证
*/
@
Length
(
max
=
32
,
message
=
"社保、公积金核准表 不能超过32个字符"
)
@
ExcelAttribute
(
name
=
"社保、公积金核准表"
,
maxLength
=
32
)
@
Schema
(
description
=
"社保、公积金核准表
"
)
@ExcelProperty
(
"社保、公积金核准表"
)
private
String
aprovalFormId
;
@
ExcelAttribute
(
name
=
"身份证"
,
maxLength
=
32
)
@
Schema
(
description
=
"身份证"
)
@
ExcelProperty
(
"身份证
"
)
private
String
empIdcard
;
/**
* 派单id
*/
...
...
@@ -150,13 +127,13 @@ public class TAuditInfo extends BaseEntity {
@ExcelProperty
(
"派单id"
)
private
String
dispatchInfoId
;
/**
* type类型:0:其他;1:社
保办理备注
* type类型:0:其他;1:社
保 2.公积金
*/
@NotBlank
(
message
=
"type类型不能为空"
)
@Length
(
max
=
1
,
message
=
"type类型不能超过1个字符"
)
@ExcelAttribute
(
name
=
"type类型"
,
isNotEmpty
=
true
,
errorInfo
=
"type类型不能为空"
,
maxLength
=
1
)
@Schema
(
description
=
"
type类型:0:其他;1:社 保办理备注
"
)
@ExcelProperty
(
"type类型
:0:其他;1:社 保办理备注
"
)
@Schema
(
description
=
"
ype类型:0:其他;1:社保 2.公积金
"
)
@ExcelProperty
(
"type类型"
)
private
String
type
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
View file @
a1245590
...
...
@@ -17,9 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
...
...
@@ -371,13 +369,7 @@ public class TSocialFundInfo extends BaseEntity {
@Schema
(
description
=
"个人失业基数"
)
@ExcelProperty
(
"个人失业基数"
)
private
BigDecimal
personalUnemploymentCardinal
;
/**
* 单位工伤基数
*/
@ExcelAttribute
(
name
=
"单位工伤基数"
)
@Schema
(
description
=
"单位工伤基数"
)
@ExcelProperty
(
"单位工伤基数"
)
private
BigDecimal
personalWorkInjuryCardinal
;
/**
* 单位养老比例
*/
...
...
@@ -462,6 +454,7 @@ public class TSocialFundInfo extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"社保停缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"社保停缴日期"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
@ExcelProperty
(
"社保停缴日期"
)
private
Date
socialReduceDate
;
/**
...
...
@@ -914,18 +907,19 @@ public class TSocialFundInfo extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"公积金停缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"公积金停缴日期"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
@ExcelProperty
(
"公积金停缴日期"
)
private
Date
fundReduceDate
;
/**
* 单位补缴利息
* 单位补缴利息
逻辑不明确-暂无实现
*/
@ExcelAttribute
(
name
=
"单位补缴利息"
)
@Schema
(
description
=
"单位补缴利息"
)
@ExcelProperty
(
"单位补缴利息"
)
private
BigDecimal
unitInterestFee
;
/**
* 个人补缴利息
* 个人补缴利息
逻辑不明确-暂无实现
*/
@ExcelAttribute
(
name
=
"个人补缴利息"
)
@Schema
(
description
=
"个人补缴利息"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
a1245590
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/resources/mapper/TAuditInfoMapper.xml
View file @
a1245590
...
...
@@ -32,28 +32,23 @@
<result
property=
"auditTime"
column=
"AUDIT_TIME"
/>
<result
property=
"isCommision"
column=
"IS_COMMISION"
/>
<result
property=
"providentId"
column=
"PROVIDENT_ID"
/>
<result
property=
"cardinalId"
column=
"CARDINAL_ID"
/>
<result
property=
"forecastFormId"
column=
"FORECAST_FORM_ID"
/>
<result
property=
"empLeaveId"
column=
"EMP_LEAVE_ID"
/>
<result
property=
"aprovalFormId"
column=
"APROVAL_FORM_ID"
/>
<result
property=
"dispatchInfoId"
column=
"DISPATCH_INFO_ID"
/>
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.SOCIAL_ID,
a.AUDIT_STATUS,
a.AUDIT_REMARK,
a.AUDIT_USER,
a.AUDIT_TIME,
a.IS_COMMISION,
a.PROVIDENT_ID,
a.CARDINAL_ID,
a.FORECAST_FORM_ID,
a.EMP_LEAVE_ID,
a.APROVAL_FORM_ID,
a.DISPATCH_INFO_ID,
a.TYPE
a.ID,
a.SOCIAL_ID,
a.AUDIT_STATUS,
a.AUDIT_REMARK,
a.AUDIT_USER,
a.AUDIT_TIME,
a.IS_COMMISION,
a.PROVIDENT_ID,
a.DISPATCH_INFO_ID,
a.TYPE,
a.EMP_IDCARD
</sql>
<sql
id=
"tAuditInfo_where"
>
<if
test=
"tAuditInfo != null"
>
...
...
@@ -81,18 +76,6 @@
<if
test=
"tAuditInfo.providentId != null and tAuditInfo.providentId.trim() != ''"
>
AND a.PROVIDENT_ID = #{tAuditInfo.providentId}
</if>
<if
test=
"tAuditInfo.cardinalId != null and tAuditInfo.cardinalId.trim() != ''"
>
AND a.CARDINAL_ID = #{tAuditInfo.cardinalId}
</if>
<if
test=
"tAuditInfo.forecastFormId != null and tAuditInfo.forecastFormId.trim() != ''"
>
AND a.FORECAST_FORM_ID = #{tAuditInfo.forecastFormId}
</if>
<if
test=
"tAuditInfo.empLeaveId != null and tAuditInfo.empLeaveId.trim() != ''"
>
AND a.EMP_LEAVE_ID = #{tAuditInfo.empLeaveId}
</if>
<if
test=
"tAuditInfo.aprovalFormId != null and tAuditInfo.aprovalFormId.trim() != ''"
>
AND a.APROVAL_FORM_ID = #{tAuditInfo.aprovalFormId}
</if>
<if
test=
"tAuditInfo.dispatchInfoId != null and tAuditInfo.dispatchInfoId.trim() != ''"
>
AND a.DISPATCH_INFO_ID = #{tAuditInfo.dispatchInfoId}
</if>
...
...
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