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
e9b33042
Commit
e9b33042
authored
Jun 30, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://git.yifucenter.com/fangxinjiang/yifu
into develop
parents
8216d708
fefe49f2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
19 deletions
+28
-19
EmpBadRecordVo.java
...m/yifu/cloud/plus/v1/yifu/archives/vo/EmpBadRecordVo.java
+14
-15
TEmpBadRecordServiceImpl.java
.../yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
+6
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+4
-0
ExcelUtil.java
...m/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
+2
-4
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+2
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpBadRecordVo.java
View file @
e9b33042
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -22,36 +21,32 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
...
@@ -22,36 +21,32 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
/**
/**
* 员工姓名
* 员工姓名
*/
*/
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
20
)
@Schema
(
description
=
"员工姓名"
)
@Schema
(
description
=
"员工姓名"
)
@ExcelProperty
(
"员工姓名"
)
private
String
empName
;
private
String
empName
;
/**
* 员工ID
*/
@ExcelAttribute
(
name
=
"员工ID"
)
@Schema
(
description
=
"员工ID"
)
private
String
empId
;
/**
/**
* 身份证号
* 身份证号
*/
*/
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@Schema
(
description
=
"身份证号"
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
private
String
empIdcard
;
/**
/**
* 产生项目
* 产生项目
*/
*/
@ExcelAttribute
(
name
=
"产生项目"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"产生项目"
)
@Schema
(
description
=
"产生项目"
)
@ExcelIgnore
private
String
project
;
private
String
project
;
/**
/**
* 项目编码
* 项目编码
*/
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"产生项目编码"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"项目编码"
)
@Schema
(
description
=
"产生项目编码"
)
@ExcelProperty
(
"产生项目编码"
)
private
String
projectCode
;
private
String
projectCode
;
/**
/**
...
@@ -59,13 +54,15 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
...
@@ -59,13 +54,15 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
*/
*/
@ExcelAttribute
(
name
=
"发生时间"
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"发生时间"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"发生时间"
)
@Schema
(
description
=
"发生时间"
)
@ExcelProperty
(
"发生时间"
)
private
Date
happenTime
;
private
Date
happenTime
;
/**
/**
* 备注
* 备注
*/
*/
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
200
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"不良记录描述"
,
maxLength
=
200
,
isNotEmpty
=
true
)
@Schema
(
description
=
"备注"
)
@Schema
(
description
=
"不良记录描述"
)
@ExcelProperty
(
"不良记录描述"
)
private
String
remark
;
private
String
remark
;
/**
/**
...
@@ -73,6 +70,7 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
...
@@ -73,6 +70,7 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
*/
*/
@ExcelAttribute
(
name
=
"费用损失 "
)
@ExcelAttribute
(
name
=
"费用损失 "
)
@Schema
(
description
=
"费用损失 (费用损失与其他费用损失其一必填)"
)
@Schema
(
description
=
"费用损失 (费用损失与其他费用损失其一必填)"
)
@ExcelProperty
(
"费用损失"
)
private
BigDecimal
loseFee
;
private
BigDecimal
loseFee
;
/**
/**
...
@@ -80,5 +78,6 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
...
@@ -80,5 +78,6 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
*/
*/
@ExcelAttribute
(
name
=
"其他损失"
)
@ExcelAttribute
(
name
=
"其他损失"
)
@Schema
(
description
=
"其他损失 (费用损失与其他费用损失其一必填)"
)
@Schema
(
description
=
"其他损失 (费用损失与其他费用损失其一必填)"
)
@ExcelProperty
(
"其他损失"
)
private
BigDecimal
loseFeeOther
;
private
BigDecimal
loseFeeOther
;
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
View file @
e9b33042
...
@@ -152,6 +152,10 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
...
@@ -152,6 +152,10 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
// 已有验证报错直接下一个
// 已有验证报错直接下一个
EmpBadRecordVo
excel
=
excelVOList
.
get
(
i
);
EmpBadRecordVo
excel
=
excelVOList
.
get
(
i
);
if
(
Common
.
isEmpty
(
excel
.
getLoseFee
())
&&
Common
.
isEmpty
(
excel
.
getLoseFeeOther
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_EMP_LOSE_FEE_NOT_EMPTY
)));
continue
;
}
emp
=
employeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
emp
=
employeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
...
@@ -171,6 +175,8 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
...
@@ -171,6 +175,8 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_EMP_NOT_EXIST
)));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_EMP_NOT_EXIST
)));
continue
;
continue
;
}
}
excel
.
setProjectCode
(
exist
.
getDeptNo
());
excel
.
setProject
(
exist
.
getDeptName
());
// 数据合法情况
// 数据合法情况
insertExcel
(
excel
,
emp
);
insertExcel
(
excel
,
emp
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
e9b33042
...
@@ -287,4 +287,8 @@ public interface ErrorCodes {
...
@@ -287,4 +287,8 @@ public interface ErrorCodes {
* 人员在该项目下存在进行中/未完结的服务
* 人员在该项目下存在进行中/未完结的服务
*/
*/
String
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
=
"archives.project.change.not.exist"
;
String
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
=
"archives.project.change.not.exist"
;
/**
* 不良记录费用损失和其他损失不可同时为空
*/
String
ARCHIVES_PROJECT_EMP_LOSE_FEE_NOT_EMPTY
=
"archives.project.emp.lose.fee.not.empty"
;
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
View file @
e9b33042
...
@@ -257,6 +257,7 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -257,6 +257,7 @@ public class ExcelUtil <T> implements Serializable {
tempStr
=
reverseByExp
(
c
,
attr
.
readConverterExp
());
tempStr
=
reverseByExp
(
c
,
attr
.
readConverterExp
());
if
(
Common
.
isEmpty
(
tempStr
)){
if
(
Common
.
isEmpty
(
tempStr
)){
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"未找到:"
+
c
+
"的字典数据"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"未找到:"
+
c
+
"的字典数据"
),
errorTemp
);
continue
;
}
else
{
}
else
{
c
=
tempStr
;
c
=
tempStr
;
}
}
...
@@ -280,12 +281,9 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -280,12 +281,9 @@ public class ExcelUtil <T> implements Serializable {
// TODO
// TODO
tempStr
=
getAreaValue
(
"area_"
+
c
.
trim
()+
"_"
+
getFieldValueByName
(
attr
.
parentField
(),
data
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
),
tempStr
,
attr
,
rowNum
,
errorTemp
);
tempStr
=
getAreaValue
(
"area_"
+
c
.
trim
()+
"_"
+
getFieldValueByName
(
attr
.
parentField
(),
data
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
),
tempStr
,
attr
,
rowNum
,
errorTemp
);
}
}
}
else
{
//直接按值去找数据 TODO
tempStr
=
getDicValue
(
c
.
trim
()
,
tempStr
,
attr
,
rowNum
,
errorTemp
);
}
}
}
}
if
(
!
StringUtils
.
isNotBlank
(
tempStr
))
{
if
(
StringUtils
.
isEmpty
(
tempStr
)
&&
(
attr
.
isArea
()
||
attr
.
isDataId
()
))
{
if
(
attr
.
isOrgan
())
{
if
(
attr
.
isOrgan
())
{
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"未找到:"
+
c
+
"的单位或结算主体数据,请确认存在结算主体权限"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"未找到:"
+
c
+
"的单位或结算主体数据,请确认存在结算主体权限"
),
errorTemp
);
}
}
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
e9b33042
...
@@ -89,6 +89,8 @@ archives.project.emp.not.exist=\u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u65E0\u9879\
...
@@ -89,6 +89,8 @@ archives.project.emp.not.exist=\u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u65E0\u9879\
archives.project.change.not.exist
=
\u
4EBA
\u5458\u5728\u
8BE5
\u9879\u
76EE
\u
4E0B
\u
5B58
\u5728\u
8FDB
\u
884C
\u
4E2D/
\u
672A
\u
5B8C
\u
7ED3
\u7684\u
670D
\u
52A1
archives.project.change.not.exist
=
\u
4EBA
\u5458\u5728\u
8BE5
\u9879\u
76EE
\u
4E0B
\u
5B58
\u5728\u
8FDB
\u
884C
\u
4E2D/
\u
672A
\u
5B8C
\u
7ED3
\u7684\u
670D
\u
52A1
archives.project.emp.lose.fee.not.empty
=
\u
4E0D
\u
826F
\u
8BB0
\u
5F55
\u
8D39
\u7528\u
635F
\u5931\u
548C
\u5176\u
4ED6
\u
635F
\u5931\u
4E0D
\u
53EF
\u
540C
\u
65F6
\u
4E3A
\u
7A7A
...
...
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