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
2191704e
Commit
2191704e
authored
Jun 29, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
55132bbf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
857 additions
and
46 deletions
+857
-46
TCertRecord.java
.../yifu/cloud/plus/v1/yifu/archives/entity/TCertRecord.java
+3
-38
TEmpBadRecord.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmpBadRecord.java
+126
-0
EmpBadRecordSearchVo.java
.../cloud/plus/v1/yifu/archives/vo/EmpBadRecordSearchVo.java
+24
-0
EmpBadRecordVo.java
...m/yifu/cloud/plus/v1/yifu/archives/vo/EmpBadRecordVo.java
+84
-0
TEmpBadRecordController.java
.../v1/yifu/archives/controller/TEmpBadRecordController.java
+176
-0
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+14
-0
TEmpBadRecordMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmpBadRecordMapper.java
+33
-0
TEmpBadRecordService.java
...d/plus/v1/yifu/archives/service/TEmpBadRecordService.java
+49
-0
TEmployeeProjectService.java
...lus/v1/yifu/archives/service/TEmployeeProjectService.java
+3
-0
TCertRecordServiceImpl.java
...v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
+1
-1
TEmpBadRecordServiceImpl.java
.../yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
+262
-0
TEmpWorkRecordingServiceImpl.java
...u/archives/service/impl/TEmpWorkRecordingServiceImpl.java
+3
-3
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+15
-0
TEmpBadRecordMapper.xml
...ves-biz/src/main/resources/mapper/TEmpBadRecordMapper.xml
+43
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+5
-1
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+2
-0
pom.xml
yifu-common/yifu-common-mybatis/pom.xml
+6
-0
BaseEntity.java
...fu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
+3
-0
Controller.java.vm
...fu-codegen/src/main/resources/template/Controller.java.vm
+3
-3
Entity.java.vm
...l/yifu-codegen/src/main/resources/template/Entity.java.vm
+2
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TCertRecord.java
View file @
2191704e
...
...
@@ -117,41 +117,6 @@ public class TCertRecord extends BaseEntity {
@Schema
(
description
=
"印章名称"
)
private
String
seal
;
/**
* 创建者
*/
@ExcelAttribute
(
name
=
"创建者"
)
@Schema
(
description
=
"创建者"
)
private
String
createBy
;
/**
* 更新人
*/
@ExcelAttribute
(
name
=
"更新人"
)
@Schema
(
description
=
"更新人"
)
private
String
updateBy
;
/**
* 创建人姓名
*/
@ExcelAttribute
(
name
=
"创建人姓名"
)
@Schema
(
description
=
"创建人姓名"
)
private
String
createName
;
/**
* 创建时间
*/
@ExcelAttribute
(
name
=
"创建时间"
)
@Schema
(
description
=
"创建时间"
)
private
LocalDateTime
createTime
;
/**
* 更新时间
*/
@ExcelAttribute
(
name
=
"更新时间"
)
@Schema
(
description
=
"更新时间"
)
private
LocalDateTime
updateTime
;
/**
* 证明类型:0 在职 1 离职2劳动合同解除 3调档函4.代缴证明
*/
...
...
@@ -174,10 +139,10 @@ public class TCertRecord extends BaseEntity {
private
String
leaveReason
;
/**
* 性别:
0男 1
女
* 性别:
1男 2
女
*/
@ExcelAttribute
(
name
=
"性别
:0男 1女
"
)
@Schema
(
description
=
"性别:
0男 1女
"
)
@ExcelAttribute
(
name
=
"性别"
)
@Schema
(
description
=
"性别:
1男 2女,和档案一致
"
)
private
String
sex
;
/**
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmpBadRecord.java
0 → 100644
View file @
2191704e
/*
* 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
.
archives
.
entity
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
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.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
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 员工不良记录
*
* @author fxj
* @date 2022-06-29 15:50:45
*/
@Data
@TableName
(
"t_emp_bad_record"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"员工不良记录"
)
public
class
TEmpBadRecord
extends
BaseEntity
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelAttribute
(
name
=
"主键"
)
@Schema
(
description
=
"主键"
)
@ExcelIgnore
private
String
id
;
/**
* 员工姓名
*/
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
20
)
@Schema
(
description
=
"员工姓名"
)
@ExcelProperty
(
"员工姓名"
)
private
String
empName
;
/**
* 员工ID
*/
@ExcelAttribute
(
name
=
"员工ID"
)
@Schema
(
description
=
"员工ID"
)
@ExcelIgnore
private
String
empId
;
/**
* 身份证号
*/
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 产生项目
*/
@ExcelAttribute
(
name
=
"产生项目"
,
maxLength
=
50
)
@Schema
(
description
=
"产生项目"
)
@ExcelProperty
(
"产生项目"
)
private
String
project
;
/**
* 项目编码
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
50
)
@Schema
(
description
=
"项目编码"
)
@ExcelProperty
(
"项目编码"
)
private
String
projectCode
;
/**
* 发生时间
*/
@ExcelAttribute
(
name
=
"发生时间"
)
@Schema
(
description
=
"发生时间"
)
@ExcelProperty
(
"发生时间"
)
private
Date
happenTime
;
/**
* 备注
*/
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
200
)
@Schema
(
description
=
"备注"
)
@ExcelProperty
(
"备注"
)
private
String
remark
;
/**
* 费用损失 (费用损失与其他费用损失其一必填)
*/
@ExcelAttribute
(
name
=
"费用损失 "
)
@Schema
(
description
=
"费用损失 (费用损失与其他费用损失其一必填)"
)
@ExcelProperty
(
"费用损失"
)
private
BigDecimal
loseFee
;
/**
* 其他损失 (费用损失与其他费用损失其一必填)
*/
@ExcelAttribute
(
name
=
"其他损失"
)
@Schema
(
description
=
"其他损失 (费用损失与其他费用损失其一必填)"
)
@ExcelProperty
(
"其他损失"
)
private
BigDecimal
loseFeeOther
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpBadRecordSearchVo.java
0 → 100644
View file @
2191704e
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* @Author fxj
* @Date 2022/6/29
* @Description
* @Version 1.0
*/
@Data
public
class
EmpBadRecordSearchVo
extends
TEmpBadRecord
{
private
String
ids
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpBadRecordVo.java
0 → 100644
View file @
2191704e
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
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
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @Author fxj
* @Date 2022/6/29
* @Description
* @Version 1.0
*/
@Data
public
class
EmpBadRecordVo
extends
RowIndex
implements
Serializable
{
/**
* 员工姓名
*/
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工ID
*/
@ExcelAttribute
(
name
=
"员工ID"
)
@Schema
(
description
=
"员工ID"
)
private
String
empId
;
/**
* 身份证号
*/
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@Schema
(
description
=
"身份证号"
)
private
String
empIdcard
;
/**
* 产生项目
*/
@ExcelAttribute
(
name
=
"产生项目"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"产生项目"
)
private
String
project
;
/**
* 项目编码
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"项目编码"
)
private
String
projectCode
;
/**
* 发生时间
*/
@ExcelAttribute
(
name
=
"发生时间"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"发生时间"
)
private
Date
happenTime
;
/**
* 备注
*/
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
200
,
isNotEmpty
=
true
)
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 费用损失 (费用损失与其他费用损失其一必填)
*/
@ExcelAttribute
(
name
=
"费用损失 "
)
@Schema
(
description
=
"费用损失 (费用损失与其他费用损失其一必填)"
)
private
BigDecimal
loseFee
;
/**
* 其他损失 (费用损失与其他费用损失其一必填)
*/
@ExcelAttribute
(
name
=
"其他损失"
)
@Schema
(
description
=
"其他损失 (费用损失与其他费用损失其一必填)"
)
private
BigDecimal
loseFeeOther
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpBadRecordController.java
0 → 100644
View file @
2191704e
/*
* 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
.
archives
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpBadRecordService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpBadRecordSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 员工不良记录
*
* @author fxj
* @date 2022-06-29 15:50:45
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tempbadrecord"
)
@Tag
(
name
=
"员工不良记录管理"
)
public
class
TEmpBadRecordController
{
private
final
TEmpBadRecordService
tEmpBadRecordService
;
/**
* 分页查询
* @param page 分页对象
* @param tEmpBadRecord 员工不良记录
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
//@PreAuthorize("@pms.hasPermission('demo_tempbadrecord_get')" )
public
R
<
IPage
<
TEmpBadRecord
>>
getTEmpBadRecordPage
(
Page
page
,
EmpBadRecordSearchVo
tEmpBadRecord
)
{
return
R
.
ok
(
tEmpBadRecordService
.
pageDiy
(
page
,
tEmpBadRecord
));
}
/**
* 不分页查询
* @param tEmpBadRecord 员工不良记录
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('demo_tempbadrecord_get')" )
public
R
<
List
<
TEmpBadRecord
>>
getTEmpBadRecordNoPage
(
@RequestBody
EmpBadRecordSearchVo
tEmpBadRecord
)
{
return
R
.
ok
(
tEmpBadRecordService
.
noPageDiy
(
tEmpBadRecord
));
}
/**
* 通过id查询员工不良记录
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('demo_tempbadrecord_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_tempbadrecord_get')"
)
public
R
<
TEmpBadRecord
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tEmpBadRecordService
.
getById
(
id
));
}
/**
* 新增员工不良记录
* @param tEmpBadRecord 员工不良记录
* @return R
*/
@Operation
(
summary
=
"新增员工不良记录"
,
description
=
"新增员工不良记录:hasPermission('demo_tempbadrecord_add')"
)
@SysLog
(
"新增员工不良记录"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_tempbadrecord_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TEmpBadRecord
tEmpBadRecord
)
{
return
tEmpBadRecordService
.
saveDiy
(
tEmpBadRecord
);
}
/**
* 修改员工不良记录
* @param tEmpBadRecord 员工不良记录
* @return R
*/
@Operation
(
summary
=
"修改员工不良记录"
,
description
=
"修改员工不良记录:hasPermission('demo_tempbadrecord_edit')"
)
@SysLog
(
"修改员工不良记录"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('demo_tempbadrecord_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TEmpBadRecord
tEmpBadRecord
)
{
return
R
.
ok
(
tEmpBadRecordService
.
updateById
(
tEmpBadRecord
));
}
/**
* 通过id删除员工不良记录
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除员工不良记录"
,
description
=
"通过id删除员工不良记录:hasPermission('demo_tempbadrecord_del')"
)
@SysLog
(
"通过id删除员工不良记录"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_tempbadrecord_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tEmpBadRecordService
.
removeById
(
id
));
}
/**
* 通过ids删除员工不良记录
* @param ids
* @return R
*/
@Operation
(
summary
=
"通过ids删除员工不良记录"
,
description
=
"通过id删除员工不良记录:hasPermission('demo_tempbadrecord_del_batch')"
)
@SysLog
(
"通过ids删除员工不良记录"
)
@DeleteMapping
(
"/removeByIds"
)
@PreAuthorize
(
"@pms.hasPermission('demo_tempbadrecord_del_batch')"
)
public
R
<
Boolean
>
removeByIds
(
@RequestParam
String
ids
)
{
List
<
String
>
idList
=
Common
.
getList
(
ids
);
return
R
.
ok
(
tEmpBadRecordService
.
removeByIds
(
idList
));
}
/**
* 批量新增不良记录信息
*
* @param file
* @return
* @Author fxj
* @Date 2019-08-16
**/
@SneakyThrows
@Operation
(
description
=
"批量新增不良记录信息 hasPermission('archives_tempbadrecord_importListAdd')"
)
@SysLog
(
"批量新增不良记录信息"
)
@PostMapping
(
"/importListAdd"
)
@PreAuthorize
(
"@pms.hasPermission('archives_tempbadrecord_importListAdd')"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
)
{
return
tEmpBadRecordService
.
importEmpBadRecordDiy
(
file
.
getInputStream
());
}
/**
* 批量导出项目档案信息
* @param searchVo
* @return R<List>
* @Author FXJ
* @Date 2022-06-21
**/
@Operation
(
description
=
"导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
EmpBadRecordSearchVo
searchVo
)
{
tEmpBadRecordService
.
listExport
(
response
,
searchVo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
2191704e
...
...
@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -245,4 +246,17 @@ public class TEmployeeProjectController {
public
R
getItemByEmpNo
(
@RequestParam
String
empIdcard
,
@RequestParam
String
empNo
)
{
return
tEmployeeProjectService
.
getItemByEmpNo
(
empIdcard
,
empNo
);
}
/**
* 通过身份证获取对应所有项目信息
* @author fxj
* @param empIdCard
* @date 2022-06-29 17:45
* @return R
*/
@Operation
(
summary
=
"通过身份证获取对应所有项目信息"
,
description
=
"通过身份证获取对应所有项目信息"
)
@GetMapping
(
"/getProjectByIdCard"
)
public
R
<
Map
<
String
,
String
>>
getProjectByIdCard
(
@RequestParam
String
empIdCard
)
{
return
tEmployeeProjectService
.
getProjectByIdCard
(
empIdCard
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmpBadRecordMapper.java
0 → 100644
View file @
2191704e
/*
* 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
.
archives
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 员工不良记录
*
* @author fxj
* @date 2022-06-29 15:50:45
*/
@Mapper
public
interface
TEmpBadRecordMapper
extends
BaseMapper
<
TEmpBadRecord
>
{
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmpBadRecordService.java
0 → 100644
View file @
2191704e
/*
* 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
.
archives
.
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.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpBadRecordSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* 员工不良记录
*
* @author fxj
* @date 2022-06-29 15:50:45
*/
public
interface
TEmpBadRecordService
extends
IService
<
TEmpBadRecord
>
{
R
<
List
<
ErrorMessage
>>
importEmpBadRecordDiy
(
InputStream
inputStream
);
R
<
Boolean
>
saveDiy
(
TEmpBadRecord
tEmpBadRecord
);
void
listExport
(
HttpServletResponse
response
,
EmpBadRecordSearchVo
searchVo
);
IPage
<
TEmpBadRecord
>
pageDiy
(
Page
page
,
EmpBadRecordSearchVo
tEmpBadRecord
);
List
<
TEmpBadRecord
>
noPageDiy
(
EmpBadRecordSearchVo
tEmpBadRecord
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeProjectService.java
View file @
2191704e
...
...
@@ -31,6 +31,7 @@ import org.springframework.validation.BindingResult;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* 项目档案表
...
...
@@ -118,4 +119,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
void
saveEmployeeProjectInfo
(
TEmployeeInfo
employeeInfo
);
R
getItemByEmpNo
(
String
empIdcard
,
String
empNo
);
R
<
Map
<
String
,
String
>>
getProjectByIdCard
(
String
empIdCard
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
View file @
2191704e
...
...
@@ -92,7 +92,7 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
@Override
public
IPage
<
TCertRecord
>
pageDiy
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
buildQueryWrapper
(
searchVo
);
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreate
Time
);
wrapper
.
orderByDesc
(
TCertRecord:
:
getOpen
Time
);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
0 → 100644
View file @
2191704e
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpWorkRecordingServiceImpl.java
View file @
2191704e
...
...
@@ -96,7 +96,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
continue
;
}
// 数据合法情况
insertExcel
Post
(
excel
,
emp
);
insertExcel
(
excel
,
emp
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
...
...
@@ -166,7 +166,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
/**
* 插入excel work record
*/
private
void
insertExcel
Post
(
EmpWorkRecordExcelVO
excel
,
TEmployeeInfo
emp
)
{
private
void
insertExcel
(
EmpWorkRecordExcelVO
excel
,
TEmployeeInfo
emp
)
{
TEmpWorkRecording
insert
=
new
TEmpWorkRecording
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
insert
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
...
...
@@ -194,7 +194,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
@Override
public
R
<
List
<
ErrorMessage
>>
importEmpWorkRecordDiy
(
InputStream
inputStream
)
{
List
<
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
core
.
util
.
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
EmpWorkRecordExcelVO
>
util1
=
new
ExcelUtil
<>(
EmpWorkRecordExcelVO
.
class
);;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
2191704e
...
...
@@ -727,4 +727,19 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return
R
.
ok
(
map
);
}
@Override
public
R
<
Map
<
String
,
String
>>
getProjectByIdCard
(
String
empIdCard
)
{
List
<
TEmployeeProject
>
projects
=
baseMapper
.
selectList
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
empIdCard
));
Map
<
String
,
String
>
projectMap
=
new
HashMap
<>();
if
(
Common
.
isEmpty
(
projects
)){
for
(
TEmployeeProject
project:
projects
){
projectMap
.
put
(
project
.
getDeptName
(),
project
.
getDeptNo
());
}
}
return
R
.
ok
(
projectMap
);
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmpBadRecordMapper.xml
0 → 100644
View file @
2191704e
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ 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)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpBadRecordMapper"
>
<resultMap
id=
"tEmpBadRecordMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empId"
column=
"EMP_ID"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"project"
column=
"PROJECT"
/>
<result
property=
"projectCode"
column=
"PROJECT_CODE"
/>
<result
property=
"happenTime"
column=
"HAPPEN_TIME"
/>
<result
property=
"remark"
column=
"REMARK"
/>
<result
property=
"loseFee"
column=
"LOSE_FEE"
/>
<result
property=
"loseFeeOther"
column=
"LOSE_FEE_OTHER"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
</resultMap>
</mapper>
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
2191704e
...
...
@@ -172,7 +172,7 @@ public interface ErrorCodes {
String
ARCHIVES_EMP_FAMILY_NAME_EXISTING
=
"archives.emp.family.name.existing"
;
/**
*
已存在对应身份证的家庭成员
信息
*
无对应身份证的员工
信息
*/
String
ARCHIVES_EMP_NOT_EXIST
=
"archives.emp.not.exist"
;
...
...
@@ -279,4 +279,8 @@ public interface ErrorCodes {
* 申请年份不可为未来年份
*/
String
ARCHIVES_EMP_CERTIFICATE_DECLARE_YEAR_ERROR
=
"archives.emp.certificate.declare.year.error"
;
/**
* 对应项目编码无项目档案信息,请核实后导入
*/
String
ARCHIVES_PROJECT_EMP_NOT_EXIST
=
"archives.project.emp.not.exist"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
2191704e
...
...
@@ -85,6 +85,8 @@ archives.import.emp.leaveReason.must=\u51CF\u6863\u539F\u56E0\u5FC5\u586B
import.file.type.error
=
\u
5BFC
\u5165\u7684\u6587\u
4EF6
\u
683C
\u
5F0F
\u
4E0D
\u
6B63
\u
786E
archives.project.emp.not.exist
=
\u
5BF9
\u
5E94
\u9879\u
76EE
\u
7F16
\u7801\u
65E0
\u9879\u
76EE
\u6863\u6848\u
4FE1
\u
606F
\u
FF0C
\u
8BF7
\u6838\u
5B9E
\u
540E
\u
5BFC
\u5165
...
...
yifu-common/yifu-common-mybatis/pom.xml
View file @
2191704e
...
...
@@ -77,5 +77,11 @@
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-common-core
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
<version>
3.0.5
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
yifu-common/yifu-common-mybatis/src/main/java/com/yifu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
View file @
2191704e
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
mybatis
.
base
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
...
@@ -33,6 +34,7 @@ public class BaseEntity implements Serializable {
*/
@Schema
(
description
=
"创建人"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelIgnore
private
String
createBy
;
/**
...
...
@@ -48,6 +50,7 @@ public class BaseEntity implements Serializable {
*/
@Schema
(
description
=
"更新人"
)
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
@ExcelIgnore
private
String
updateBy
;
/**
...
...
yifu-visual/yifu-codegen/src/main/resources/template/Controller.java.vm
View file @
2191704e
...
...
@@ -66,9 +66,9 @@ public class ${className}Controller {
*
@
return
*/
@
Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@
Ge
tMapping
(
"/noPage"
)
@
Pos
tMapping
(
"/noPage"
)
//@
PreAuthorize
(
"@pms.hasPermission('${moduleName}_${pathName}_get')"
)
public
R
<
List
<${
className
}>>
get
${
className
}
NoPage
(${
className
}
${
classname
})
{
public
R
<
List
<${
className
}>>
get
${
className
}
NoPage
(
@
RequestBody
${
className
}
${
classname
})
{
return
R
.
ok
(${
classname
}
Service
.
list
(
Wrappers
.
query
(${
classname
})));
}
...
...
@@ -80,7 +80,7 @@ public class ${className}Controller {
@
Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('${moduleName}_${pathName}_get')"
)
@
GetMapping
(
"/{${pk.lowerAttrName}}"
)
@
PreAuthorize
(
"@pms.hasPermission('${moduleName}_${pathName}_get')"
)
public
R
<${
class
n
ame
}>
getById
(@
PathVariable
(
"${pk.lowerAttrName}"
)
${
pk
.
attrType
}
${
pk
.
lowerAttrName
})
{
public
R
<${
class
N
ame
}>
getById
(@
PathVariable
(
"${pk.lowerAttrName}"
)
${
pk
.
attrType
}
${
pk
.
lowerAttrName
})
{
return
R
.
ok
(${
classname
}
Service
.
getById
(${
pk
.
lowerAttrName
}));
}
...
...
yifu-visual/yifu-codegen/src/main/resources/template/Entity.java.vm
View file @
2191704e
...
...
@@ -17,6 +17,7 @@
#
set
($
excludeColumns
=
[
"create_time"
,
"update_time"
,
"create_by"
,
"update_by"
])
package
${
package
}.${
moduleName
}.
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
;
...
...
@@ -51,6 +52,7 @@ public class ${className} extends BaseEntity {
#
end
@
ExcelAttribute
(
name
=
"$column.comments"
#
if
($
column
.
isNullable
==
'NO'
&&
$
column
.
attrType
!='LocalDate' && $column.attrType !='LocalDateTime'), isNotEmpty = true,errorInfo = "$column.comments不能为空"#end #if($column.maxLength), maxLength = $column.maxLength #end)
@
Schema
(
description
=
"$column.comments"
#
if
($
column
.
hidden
),
hidden
=$
column
.
hidden
#
end
)
@
ExcelProperty
(
"$column.comments"
)
private
$
column
.
attrType
$
column
.
lowerAttrName
;
#
end
...
...
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