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
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 {
...
@@ -117,41 +117,6 @@ public class TCertRecord extends BaseEntity {
@Schema
(
description
=
"印章名称"
)
@Schema
(
description
=
"印章名称"
)
private
String
seal
;
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.代缴证明
* 证明类型:0 在职 1 离职2劳动合同解除 3调档函4.代缴证明
*/
*/
...
@@ -174,10 +139,10 @@ public class TCertRecord extends BaseEntity {
...
@@ -174,10 +139,10 @@ public class TCertRecord extends BaseEntity {
private
String
leaveReason
;
private
String
leaveReason
;
/**
/**
* 性别:
0男 1
女
* 性别:
1男 2
女
*/
*/
@ExcelAttribute
(
name
=
"性别
:0男 1女
"
)
@ExcelAttribute
(
name
=
"性别"
)
@Schema
(
description
=
"性别:
0男 1女
"
)
@Schema
(
description
=
"性别:
1男 2女,和档案一致
"
)
private
String
sex
;
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.*;
...
@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
...
@@ -245,4 +246,17 @@ public class TEmployeeProjectController {
...
@@ -245,4 +246,17 @@ public class TEmployeeProjectController {
public
R
getItemByEmpNo
(
@RequestParam
String
empIdcard
,
@RequestParam
String
empNo
)
{
public
R
getItemByEmpNo
(
@RequestParam
String
empIdcard
,
@RequestParam
String
empNo
)
{
return
tEmployeeProjectService
.
getItemByEmpNo
(
empIdcard
,
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;
...
@@ -31,6 +31,7 @@ import org.springframework.validation.BindingResult;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 项目档案表
* 项目档案表
...
@@ -118,4 +119,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
...
@@ -118,4 +119,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
void
saveEmployeeProjectInfo
(
TEmployeeInfo
employeeInfo
);
void
saveEmployeeProjectInfo
(
TEmployeeInfo
employeeInfo
);
R
getItemByEmpNo
(
String
empIdcard
,
String
empNo
);
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
...
@@ -92,7 +92,7 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
@Override
@Override
public
IPage
<
TCertRecord
>
pageDiy
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
public
IPage
<
TCertRecord
>
pageDiy
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
buildQueryWrapper
(
searchVo
);
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreate
Time
);
wrapper
.
orderByDesc
(
TCertRecord:
:
getOpen
Time
);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
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
/*
* 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
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpBadRecordMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpBadRecordService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 员工不良记录
*
* @author fxj
* @date 2022-06-29 15:50:45
*/
@Log4j2
@RequiredArgsConstructor
@Service
public
class
TEmpBadRecordServiceImpl
extends
ServiceImpl
<
TEmpBadRecordMapper
,
TEmpBadRecord
>
implements
TEmpBadRecordService
{
private
final
TEmployeeInfoMapper
employeeInfoMapper
;
private
final
TEmployeeProjectMapper
projectMapper
;
@Override
public
R
<
List
<
ErrorMessage
>>
importEmpBadRecordDiy
(
InputStream
inputStream
)
{
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
EmpBadRecordVo
>
util1
=
new
ExcelUtil
<>(
EmpBadRecordVo
.
class
);;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
EmpBadRecordVo
.
class
,
new
ReadListener
<
EmpBadRecordVo
>()
{
/**
* 单次缓存的数据量
*/
public
static
final
int
BATCH_COUNT
=
CommonConstants
.
BATCH_COUNT
;
/**
*临时存储
*/
private
List
<
EmpBadRecordVo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
@Override
public
void
invoke
(
EmpBadRecordVo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
)){
errorMessageList
.
add
(
errorMessage
);
}
else
{
cachedDataList
.
add
(
data
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
saveData
();
// 存储完成清理 list
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
}
/**
* 加上存储数据库
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importEmpBadRecord
(
cachedDataList
,
errorMessageList
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
){
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
return
R
.
ok
(
errorMessageList
);
}
@Override
public
R
<
Boolean
>
saveDiy
(
TEmpBadRecord
tEmpBadRecord
)
{
return
R
.
ok
(
baseMapper
.
insert
(
tEmpBadRecord
)
>
0
);
}
private
void
importEmpBadRecord
(
List
<
EmpBadRecordVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
List
<
TEmpBadRecord
>
list
=
this
.
list
();
TEmployeeInfo
emp
;
TEmployeeProject
exist
;
ErrorMessage
errorMsg
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
// 已有验证报错直接下一个
EmpBadRecordVo
excel
=
excelVOList
.
get
(
i
);
emp
=
employeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
errorMsg
=
checkRes
(
list
,
emp
,
excel
);
if
(
Common
.
isNotNull
(
errorMsg
)){
errorMessageList
.
add
(
errorMsg
);
continue
;
}
excel
.
setEmpName
(
emp
.
getEmpName
());
exist
=
projectMapper
.
selectOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getProjectCode
())
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isEmpty
(
exist
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_EMP_NOT_EXIST
)));
continue
;
}
// 数据合法情况
insertExcel
(
excel
,
emp
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
private
ErrorMessage
checkRes
(
List
<
TEmpBadRecord
>
list
,
TEmployeeInfo
emp
,
EmpBadRecordVo
excel
)
{
if
(
Common
.
isEmpty
(
emp
)){
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_NOT_EXIST
));
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
emp
.
getFileStatus
())){
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
return
null
;
}
/**
* 插入excel bad record
*/
private
void
insertExcel
(
EmpBadRecordVo
excel
,
TEmployeeInfo
emp
)
{
TEmpBadRecord
insert
=
new
TEmpBadRecord
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
insert
.
setEmpIdcard
(
emp
.
getEmpIdcard
());
insert
.
setEmpId
(
emp
.
getId
());
insert
.
setEmpId
(
emp
.
getId
());
this
.
save
(
insert
);
}
@Override
public
void
listExport
(
HttpServletResponse
response
,
EmpBadRecordSearchVo
searchVo
)
{
String
fileName
=
"不良记录批量导出"
+
LocalDateTime
.
now
()
+
".xlsx"
;
//获取要导出的列表
List
<
TEmpBadRecord
>
list
=
new
ArrayList
<>();
//获取记录
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TEmpBadRecord
>
util
=
new
ExcelUtil
<>(
TEmpBadRecord
.
class
);
for
(
TEmpBadRecord
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
ServletOutputStream
out
=
null
;
try
{
if
(
list
.
size
()>
0
)
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename*=utf-8'zh_cn'"
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel
.
write
(
out
,
TEmpBadRecord
.
class
).
sheet
(
"不良记录"
).
doWrite
(
list
);
out
.
flush
();
}
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
@Override
public
IPage
<
TEmpBadRecord
>
pageDiy
(
Page
page
,
EmpBadRecordSearchVo
tEmpBadRecord
)
{
LambdaQueryWrapper
<
TEmpBadRecord
>
wrapper
=
buildQueryWrapper
(
tEmpBadRecord
);
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
}
@Override
public
List
<
TEmpBadRecord
>
noPageDiy
(
EmpBadRecordSearchVo
tEmpBadRecord
)
{
LambdaQueryWrapper
<
TEmpBadRecord
>
wrapper
=
buildQueryWrapper
(
tEmpBadRecord
);
List
<
String
>
idList
=
Common
.
getList
(
tEmpBadRecord
.
getIds
());
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TEmpBadRecord:
:
getId
,
idList
);
}
return
baseMapper
.
selectList
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
EmpBadRecordSearchVo
entity
){
LambdaQueryWrapper
<
TEmpBadRecord
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TEmpBadRecord:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TEmpBadRecord:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getEmpName
())){
wrapper
.
likeRight
(
TEmpBadRecord:
:
getEmpName
,
entity
.
getEmpName
());
}
if
(
Common
.
isNotNull
(
entity
.
getEmpIdcard
())){
wrapper
.
likeRight
(
TEmpBadRecord:
:
getEmpIdcard
,
entity
.
getEmpIdcard
());
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
())){
wrapper
.
eq
(
TEmpBadRecord:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
}
}
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
...
@@ -96,7 +96,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
continue
;
continue
;
}
}
// 数据合法情况
// 数据合法情况
insertExcel
Post
(
excel
,
emp
);
insertExcel
(
excel
,
emp
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
}
}
...
@@ -166,7 +166,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
...
@@ -166,7 +166,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
/**
/**
* 插入excel work record
* 插入excel work record
*/
*/
private
void
insertExcel
Post
(
EmpWorkRecordExcelVO
excel
,
TEmployeeInfo
emp
)
{
private
void
insertExcel
(
EmpWorkRecordExcelVO
excel
,
TEmployeeInfo
emp
)
{
TEmpWorkRecording
insert
=
new
TEmpWorkRecording
();
TEmpWorkRecording
insert
=
new
TEmpWorkRecording
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
BeanUtil
.
copyProperties
(
excel
,
insert
);
insert
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
insert
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
...
@@ -194,7 +194,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
...
@@ -194,7 +194,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
@Override
@Override
public
R
<
List
<
ErrorMessage
>>
importEmpWorkRecordDiy
(
InputStream
inputStream
)
{
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
);;
ExcelUtil
<
EmpWorkRecordExcelVO
>
util1
=
new
ExcelUtil
<>(
EmpWorkRecordExcelVO
.
class
);;
// 写法2:
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 匿名内部类 不用额外写一个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
...
@@ -727,4 +727,19 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return
R
.
ok
(
map
);
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 {
...
@@ -172,7 +172,7 @@ public interface ErrorCodes {
String
ARCHIVES_EMP_FAMILY_NAME_EXISTING
=
"archives.emp.family.name.existing"
;
String
ARCHIVES_EMP_FAMILY_NAME_EXISTING
=
"archives.emp.family.name.existing"
;
/**
/**
*
已存在对应身份证的家庭成员
信息
*
无对应身份证的员工
信息
*/
*/
String
ARCHIVES_EMP_NOT_EXIST
=
"archives.emp.not.exist"
;
String
ARCHIVES_EMP_NOT_EXIST
=
"archives.emp.not.exist"
;
...
@@ -279,4 +279,8 @@ public interface ErrorCodes {
...
@@ -279,4 +279,8 @@ public interface ErrorCodes {
* 申请年份不可为未来年份
* 申请年份不可为未来年份
*/
*/
String
ARCHIVES_EMP_CERTIFICATE_DECLARE_YEAR_ERROR
=
"archives.emp.certificate.declare.year.error"
;
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
...
@@ -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
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 @@
...
@@ -77,5 +77,11 @@
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-common-core
</artifactId>
<artifactId>
yifu-common-core
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
<version>
3.0.5
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</dependencies>
</project>
</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
;
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.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
@@ -33,6 +34,7 @@ public class BaseEntity implements Serializable {
...
@@ -33,6 +34,7 @@ public class BaseEntity implements Serializable {
*/
*/
@Schema
(
description
=
"创建人"
)
@Schema
(
description
=
"创建人"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelIgnore
private
String
createBy
;
private
String
createBy
;
/**
/**
...
@@ -48,6 +50,7 @@ public class BaseEntity implements Serializable {
...
@@ -48,6 +50,7 @@ public class BaseEntity implements Serializable {
*/
*/
@Schema
(
description
=
"更新人"
)
@Schema
(
description
=
"更新人"
)
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
@ExcelIgnore
private
String
updateBy
;
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 {
...
@@ -66,9 +66,9 @@ public class ${className}Controller {
*
@
return
*
@
return
*/
*/
@
Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@
Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@
Ge
tMapping
(
"/noPage"
)
@
Pos
tMapping
(
"/noPage"
)
//@
PreAuthorize
(
"@pms.hasPermission('${moduleName}_${pathName}_get')"
)
//@
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
})));
return
R
.
ok
(${
classname
}
Service
.
list
(
Wrappers
.
query
(${
classname
})));
}
}
...
@@ -80,7 +80,7 @@ public class ${className}Controller {
...
@@ -80,7 +80,7 @@ public class ${className}Controller {
@
Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('${moduleName}_${pathName}_get')"
)
@
Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('${moduleName}_${pathName}_get')"
)
@
GetMapping
(
"/{${pk.lowerAttrName}}"
)
@
GetMapping
(
"/{${pk.lowerAttrName}}"
)
@
PreAuthorize
(
"@pms.hasPermission('${moduleName}_${pathName}_get')"
)
@
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
}));
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 @@
...
@@ -17,6 +17,7 @@
#
set
($
excludeColumns
=
[
"create_time"
,
"update_time"
,
"create_by"
,
"update_by"
])
#
set
($
excludeColumns
=
[
"create_time"
,
"update_time"
,
"create_by"
,
"update_by"
])
package
${
package
}.${
moduleName
}.
entity
;
package
${
package
}.${
moduleName
}.
entity
;
import
com
.
alibaba
.
excel
.
annotation
.
ExcelProperty
;
import
com
.
baomidou
.
mybatisplus
.
annotation
.
IdType
;
import
com
.
baomidou
.
mybatisplus
.
annotation
.
IdType
;
import
com
.
baomidou
.
mybatisplus
.
annotation
.
TableId
;
import
com
.
baomidou
.
mybatisplus
.
annotation
.
TableId
;
import
com
.
baomidou
.
mybatisplus
.
annotation
.
TableName
;
import
com
.
baomidou
.
mybatisplus
.
annotation
.
TableName
;
...
@@ -51,6 +52,7 @@ public class ${className} extends BaseEntity {
...
@@ -51,6 +52,7 @@ public class ${className} extends BaseEntity {
#
end
#
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)
@
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
)
@
Schema
(
description
=
"$column.comments"
#
if
($
column
.
hidden
),
hidden
=$
column
.
hidden
#
end
)
@
ExcelProperty
(
"$column.comments"
)
private
$
column
.
attrType
$
column
.
lowerAttrName
;
private
$
column
.
attrType
$
column
.
lowerAttrName
;
#
end
#
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