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
058daa9c
Commit
058daa9c
authored
Jul 01, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编码优化
parent
09de76ba
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
0 deletions
+48
-0
TEmployeeContractInfoMapper.java
.../v1/yifu/archives/mapper/TEmployeeContractInfoMapper.java
+8
-0
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+8
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+9
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+13
-0
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+5
-0
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+5
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeContractInfoMapper.java
View file @
058daa9c
...
...
@@ -55,4 +55,12 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
int
updateInUseStatusById
(
@Param
(
"empId"
)
String
empId
,
@Param
(
"deptId"
)
String
deptId
,
@Param
(
"id"
)
String
id
,
@Param
(
"status"
)
String
status
);
/**
* @Description: 获取当日合同最大编码
* @Author: hgw
* @Date: 2022/7/1 15:03
* @return: java.lang.String
**/
String
getMaxContractCode
();
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
058daa9c
...
...
@@ -65,4 +65,12 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
*/
List
<
EmployeeExportVO
>
getTEmployeeLeaveExportList
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
/**
* @Description: 获取当日最大的编码
* @Author: hgw
* @Date: 2022/7/1 14:57
* @return: java.lang.String
**/
String
getMaxEmpCode
();
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
058daa9c
...
...
@@ -213,6 +213,15 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
Common
.
isNotNull
(
nowNumObj
))
{
SimpleValueWrapper
value
=
(
SimpleValueWrapper
)
nowNumObj
;
nowNums
=
(
Integer
)
value
.
get
()
+
1
;
}
else
{
String
empCode
=
null
;
try
{
empCode
=
baseMapper
.
getMaxContractCode
();
nowNums
=
Integer
.
parseInt
(
empCode
)
+
1
;
}
catch
(
NumberFormatException
e
)
{
log
.
error
(
"获取人员合同当日最大编码时出错:"
+
empCode
);
nowNums
=
1
;
}
}
cache
.
put
(
nowDay
,
nowNums
);
return
"HT"
+
nowDay
+
this
.
getFourNum
(
String
.
valueOf
(
nowNums
));
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
058daa9c
...
...
@@ -777,6 +777,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
saveEmp
.
setEmpName
(
excel
.
getEmpName
());
saveEmp
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
saveEmp
.
setEmpPhone
(
excel
.
getEmpPhone
());
// 校验手机号
checkPhone
=
new
TEmployeeInfo
();
...
...
@@ -932,6 +933,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
Common
.
isNotNull
(
excel
.
getRemark
()))
{
saveEmp
.
setRemark
(
excel
.
getRemark
());
}
if
(
Common
.
isNotNull
(
excel
.
getPost
()))
{
saveEmp
.
setPost
(
excel
.
getPost
());
}
this
.
setBaseData
(
saveEmp
,
CommonConstants
.
dingleDigitStrArray
[
4
],
user
);
saveList
.
add
(
saveEmp
);
}
...
...
@@ -1031,6 +1035,15 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
Common
.
isNotNull
(
nowNumObj
))
{
SimpleValueWrapper
value
=
(
SimpleValueWrapper
)
nowNumObj
;
nowNums
=
(
Integer
)
value
.
get
()
+
1
;
}
else
{
String
empCode
=
null
;
try
{
empCode
=
baseMapper
.
getMaxEmpCode
();
nowNums
=
Integer
.
parseInt
(
empCode
)
+
1
;
}
catch
(
NumberFormatException
e
)
{
log
.
error
(
"获取人员档案当日最大编码时出错:"
+
empCode
);
nowNums
=
1
;
}
}
cache
.
put
(
nowDay
,
nowNums
);
return
"ZM"
+
nowDay
+
this
.
getFiveNum
(
String
.
valueOf
(
nowNums
));
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
058daa9c
...
...
@@ -321,4 +321,9 @@
where EMP_ID = #{empId} and SETTLE_DOMAIN = #{deptId} and ID != #{id}
</update>
<!-- 获取当日最大的编码 -->
<select
id=
"getMaxContractCode"
resultType=
"java.lang.String"
>
SELECT ifnull(max(right(e.APPLY_NO,5)),0) APPLY_NO FROM t_employee_contract_info e where e.DELETE_FLAG = 0 and e.CREATE_TIME>DATE_FORMAT(now(),'%Y-%m-%d')
</select>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
058daa9c
...
...
@@ -556,4 +556,9 @@
GROUP BY a.id
</select>
<!-- 获取当日最大的编码 -->
<select
id=
"getMaxEmpCode"
resultType=
"java.lang.String"
>
SELECT ifnull(max(right(e.EMP_CODE,5)),0) EMP_CODE FROM t_employee_info e where e.DELETE_FLAG = '0' and e.CREATE_TIME>DATE_FORMAT(now(),'%Y-%m-%d')
</select>
</mapper>
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