Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
22760536
Commit
22760536
authored
May 12, 2020
by
tangzhaoqian
Browse files
Options
Browse Files
Download
Plain Diff
+1
parents
37b1a356
9fbba089
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
229 additions
and
39 deletions
+229
-39
src/main/java/cn/timer/api/bean/clazz/SysRegion.java
+80
-0
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
+1
-1
src/main/java/cn/timer/api/bean/kqmk/KqglAssoOvertimeRules.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+49
-4
src/main/java/cn/timer/api/controller/oss/OSSController.java
+11
-1
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+46
-24
src/main/java/cn/timer/api/dao/clazz/SysRegionMapper.java
+28
-0
src/main/java/cn/timer/api/dto/kqmk/IndividualOvertimeRuleDto.java
+2
-2
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
+1
-1
src/main/java/cn/timer/api/dto/kqmk/KqglAssoOvertimeRulesDto.java
+4
-1
src/main/java/cn/timer/api/dto/kqmk/VacationInformationDto.java
+1
-1
src/main/java/cn/timer/api/utils/schedule/CronUtil.java
+4
-2
src/main/java/cn/timer/api/utils/schedule/RemindUtil.java
+1
-1
No files found.
src/main/java/cn/timer/api/bean/clazz/SysRegion.java
0 → 100644
View file @
22760536
/**
* <p>Title: China.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月11日
* @version 1.0
*/
package
cn
.
timer
.
api
.
bean
.
clazz
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* <p>
* Title: China.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年5月11日
* @version 1.0
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"地区字典表(全)"
)
public
class
SysRegion
extends
Model
<
SysRegion
>{
private
static
final
long
serialVersionUID
=
-
3184372953004418673L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"区域主键"
,
example
=
"1"
)
private
Integer
keyId
;
@ApiModelProperty
(
value
=
"区域名称"
,
example
=
"10"
)
private
String
regionName
;
@ApiModelProperty
(
value
=
"区域编码"
,
example
=
"1"
)
private
String
regionCode
;
@ApiModelProperty
(
value
=
"地名简称"
,
example
=
"1"
)
private
String
simpleName
;
@ApiModelProperty
(
value
=
"区域等级"
,
example
=
"1"
)
private
Integer
level
;
@ApiModelProperty
(
value
=
"城市编码"
,
example
=
"1"
)
private
String
cityCode
;
@ApiModelProperty
(
value
=
"邮政编码"
,
example
=
"1"
)
private
String
zipCode
;
@ApiModelProperty
(
value
=
"组合名称"
,
example
=
"1"
)
private
String
merName
;
@ApiModelProperty
(
value
=
"经度"
,
example
=
"1"
)
private
Float
lng
;
@ApiModelProperty
(
value
=
"纬度"
,
example
=
"1"
)
private
Float
lat
;
@ApiModelProperty
(
value
=
"拼音/英文名"
,
example
=
"1"
)
private
String
enName
;
}
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
View file @
22760536
...
@@ -41,7 +41,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
...
@@ -41,7 +41,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"请假单位 "
,
example
=
"1:按天请假;2:按半天;3:按小时"
)
@ApiModelProperty
(
value
=
"请假单位 "
,
example
=
"1:按天请假;2:按半天;3:按小时"
)
private
String
company
;
private
Integer
company
;
@ApiModelProperty
(
value
=
"假期类型 "
,
example
=
"1:系统项;2:自定义项"
)
@ApiModelProperty
(
value
=
"假期类型 "
,
example
=
"1:系统项;2:自定义项"
)
private
Integer
leaveType
;
private
Integer
leaveType
;
...
...
src/main/java/cn/timer/api/bean/kqmk/KqglAssoOvertimeRules.java
View file @
22760536
...
@@ -41,7 +41,7 @@ public class KqglAssoOvertimeRules extends Model<KqglAssoOvertimeRules> {
...
@@ -41,7 +41,7 @@ public class KqglAssoOvertimeRules extends Model<KqglAssoOvertimeRules> {
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"1"
)
private
Integer
appliedScope
;
private
String
appliedScope
;
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
private
Integer
isWorkovertime
;
private
Integer
isWorkovertime
;
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
22760536
package
cn
.
timer
.
api
.
controller
.
kqgl
;
package
cn
.
timer
.
api
.
controller
.
kqgl
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
@@ -177,9 +179,16 @@ public class TimeCardController {
...
@@ -177,9 +179,16 @@ public class TimeCardController {
overrules
.
setCreateTime
(
new
Date
().
getTime
());
overrules
.
setCreateTime
(
new
Date
().
getTime
());
overrules
.
setOrgCode
(
userBean
.
getOrgCode
());
overrules
.
setOrgCode
(
userBean
.
getOrgCode
());
overrules
.
setCreateUserid
(
userBean
.
getEmpNum
());
overrules
.
setCreateUserid
(
userBean
.
getEmpNum
());
String
[]
launchs
=
overrules
.
getApplyrange
();
String
appliedscope
=
StringUtils
.
join
(
launchs
,
","
);
// rul.setAppliedScope(appliedscope);//应用范围
overrules
.
setAppliedScope
(
appliedscope
);
KqglAssoOvertimeRules
rul
=
KqglAssoOvertimeRules
.
builder
().
build
();
KqglAssoOvertimeRules
rul
=
KqglAssoOvertimeRules
.
builder
().
build
();
// 克隆 KqglAssoOvertimeRulesDto对象 到 KqglAssoOvertimeRules对象
// 克隆 KqglAssoOvertimeRulesDto对象 到 KqglAssoOvertimeRules对象
BeanUtil
.
copyProperties
(
overrules
,
rul
,
"starttime"
);
BeanUtil
.
copyProperties
(
overrules
,
rul
,
"starttime"
,
"applyrange"
);
if
(!
rul
.
insertOrUpdate
())
if
(!
rul
.
insertOrUpdate
())
return
ResultUtil
.
error
(
"操作失败"
);
return
ResultUtil
.
error
(
"操作失败"
);
...
@@ -213,9 +222,14 @@ public class TimeCardController {
...
@@ -213,9 +222,14 @@ public class TimeCardController {
public
Result
<
IndividualOvertimeRuleDto
>
getOvertimeRules
(
@PathVariable
(
"id"
)
Integer
id
)
{
public
Result
<
IndividualOvertimeRuleDto
>
getOvertimeRules
(
@PathVariable
(
"id"
)
Integer
id
)
{
IndividualOvertimeRuleDto
overrule
=
IndividualOvertimeRuleDto
.
builder
().
build
();
IndividualOvertimeRuleDto
overrule
=
IndividualOvertimeRuleDto
.
builder
().
build
();
KqglAssoOvertimeRules
rules
=
KqglAssoOvertimeRules
.
builder
().
id
(
id
).
build
().
selectById
();
KqglAssoOvertimeRules
rules
=
KqglAssoOvertimeRules
.
builder
().
id
(
id
).
build
().
selectById
();
overrule
.
setRules
(
rules
);
String
str
=
rules
.
getAppliedScope
();
String
[]
arr
=
str
.
split
(
","
);
// 用,分割
KqglAssoOvertimeRulesDto
ruldto
=
KqglAssoOvertimeRulesDto
.
builder
().
build
();
ruldto
.
setApplyrange
(
arr
);
BeanUtil
.
copyProperties
(
rules
,
ruldto
,
"starttime"
,
"applyrange"
);
overrule
.
setRules
(
ruldto
);
List
<
KqglAssOvertimeVice
>
vice
=
new
LambdaQueryChainWrapper
<
KqglAssOvertimeVice
>(
kqglassovertimevicemapper
).
eq
(
KqglAssOvertimeVice:
:
getOvertimeRulesId
,
id
).
list
();
List
<
KqglAssOvertimeVice
>
vice
=
new
LambdaQueryChainWrapper
<
KqglAssOvertimeVice
>(
kqglassovertimevicemapper
).
eq
(
KqglAssOvertimeVice:
:
getOvertimeRulesId
,
id
).
list
();
overrule
.
set
Vic
e
(
vice
);
overrule
.
set
Starttim
e
(
vice
);
return
ResultUtil
.
data
(
overrule
,
"操作成功!"
);
return
ResultUtil
.
data
(
overrule
,
"操作成功!"
);
}
}
...
@@ -351,7 +365,7 @@ public class TimeCardController {
...
@@ -351,7 +365,7 @@ public class TimeCardController {
KqglAssoLeaveRules
rules
=
KqglAssoLeaveRules
.
builder
().
id
(
id
).
build
().
selectById
();
KqglAssoLeaveRules
rules
=
KqglAssoLeaveRules
.
builder
().
id
(
id
).
build
().
selectById
();
overrule
.
setRules
(
rules
);
overrule
.
setRules
(
rules
);
List
<
KqglAssoRulesVice
>
vice
=
new
LambdaQueryChainWrapper
<
KqglAssoRulesVice
>(
kqglassorulesvicemapper
).
eq
(
KqglAssoRulesVice:
:
getLeaveRulesId
,
id
).
list
();
List
<
KqglAssoRulesVice
>
vice
=
new
LambdaQueryChainWrapper
<
KqglAssoRulesVice
>(
kqglassorulesvicemapper
).
eq
(
KqglAssoRulesVice:
:
getLeaveRulesId
,
id
).
list
();
overrule
.
set
Vic
e
(
vice
);
overrule
.
set
Rang
e
(
vice
);
return
ResultUtil
.
data
(
overrule
,
"操作成功!"
);
return
ResultUtil
.
data
(
overrule
,
"操作成功!"
);
}
}
...
@@ -639,6 +653,37 @@ public class TimeCardController {
...
@@ -639,6 +653,37 @@ public class TimeCardController {
}
}
/**
/**
* 根据组织机构代码 获取加班基础设置信息
*/
@PostMapping
(
value
=
"/overtime_basic_information"
)
@ApiOperation
(
value
=
"32:根据组织机构代码 获取加班基础设置信息"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
32
)
public
Result
<
Object
>
overtimebasicinformation
(
@CurrentUser
UserBean
userBean
)
{
KqglAssoOvertimeBasics
kqjdev
=
KqglAssoOvertimeBasics
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoOvertimeBasics
>().
lambda
().
eq
(
KqglAssoOvertimeBasics:
:
getOrgCode
,
userBean
.
getOrgCode
()));
return
ResultUtil
.
data
(
kqjdev
,
"操作成功!"
);
}
/**
* 查询列表-获取假期规则数据-分页
*/
@PostMapping
(
value
=
"/select_leave_rules"
)
@ApiOperation
(
value
=
"33:获取假期规则数据-分页"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
33
)
public
Result
<
Object
>
selectleaverules
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AttqueryCriteriaDto
attquerycriteriadto
)
{
IPage
<
KqglAssoLeaveRules
>
page
=
new
Page
<
KqglAssoLeaveRules
>(
attquerycriteriadto
.
getCurrentPage
()
==
null
?
1
:
attquerycriteriadto
.
getCurrentPage
(),
attquerycriteriadto
.
getTotalPage
()
==
null
?
10
:
attquerycriteriadto
.
getTotalPage
());
attquerycriteriadto
.
setOrgCode
(
userBean
.
getOrgCode
());
attquerycriteriadto
.
setEmpNum
(
userBean
.
getEmpNum
());
IPage
<
KqglAssoLeaveRules
>
pageAs
=
kqglassoleaverulesmapper
.
selectPage
(
page
,
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
userBean
.
getOrgCode
()));
List
<
KqglAssoLeaveRules
>
listAs
=
pageAs
.
getRecords
();
return
ResultUtil
.
data
(
pageAs
,
listAs
,
"操作成功!"
);
}
/**
* 查询列表-加班补偿方式
* 查询列表-加班补偿方式
*/
*/
@GetMapping
(
value
=
"/list_compensate"
)
@GetMapping
(
value
=
"/list_compensate"
)
...
...
src/main/java/cn/timer/api/controller/oss/OSSController.java
View file @
22760536
...
@@ -120,27 +120,37 @@ public class OSSController {
...
@@ -120,27 +120,37 @@ public class OSSController {
* DELETE
* DELETE
*
*
* @param moudle
* @param moudle
* @param fileName
************/
************/
@DeleteMapping
(
value
=
"/delSingle"
)
@DeleteMapping
(
value
=
"/delSingle"
)
@ApiOperation
(
value
=
"删除单个(谨慎使用)"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"删除单个(谨慎使用)"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
public
Result
<
String
>
delSingle
(
@CurrentUser
UserBean
userBean
,
@RequestParam
(
required
=
false
)
String
moudle
,
public
Result
<
String
>
delSingle
(
@CurrentUser
UserBean
userBean
,
@RequestParam
(
required
=
false
)
String
moudle
,
@RequestParam
(
required
=
false
)
String
fileName
)
{
@RequestParam
(
required
=
false
)
String
fileName
)
{
try
{
String
path
=
"8timer2.0/"
+
userBean
.
getOrgCode
()
+
"/"
+
moudle
+
"/"
+
fileName
;
String
path
=
"8timer2.0/"
+
userBean
.
getOrgCode
()
+
"/"
+
moudle
+
"/"
+
fileName
;
oss
.
delSingleFile
(
path
);
oss
.
delSingleFile
(
path
);
}
catch
(
Exception
e
)
{
e
.
getStackTrace
();
}
return
ResultUtil
.
success
(
"删除成功"
);
return
ResultUtil
.
success
(
"删除成功"
);
}
}
@DeleteMapping
(
value
=
"/delFiles"
)
@DeleteMapping
(
value
=
"/delFiles"
)
@ApiOperation
(
value
=
"删除多个(谨慎使用,谨慎使用)"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"删除多个(谨慎使用,谨慎使用)"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
String
>>
delFiles
(
@CurrentUser
UserBean
userBean
,
@RequestBody
OssDto
ossDto
)
{
public
Result
<
List
<
String
>>
delFiles
(
@CurrentUser
UserBean
userBean
,
@RequestBody
OssDto
ossDto
)
{
List
<
String
>
list
=
null
;
List
<
String
>
keys
=
null
;
List
<
String
>
keys
=
null
;
try
{
for
(
String
fileName
:
ossDto
.
getFileNames
())
{
for
(
String
fileName
:
ossDto
.
getFileNames
())
{
keys
=
new
ArrayList
<
String
>();
keys
=
new
ArrayList
<
String
>();
String
key
=
"8timer2.0/"
+
userBean
.
getOrgCode
()
+
"/"
+
ossDto
.
getMoudle
()
+
"/"
+
fileName
;
String
key
=
"8timer2.0/"
+
userBean
.
getOrgCode
()
+
"/"
+
ossDto
.
getMoudle
()
+
"/"
+
fileName
;
keys
.
add
(
key
);
keys
.
add
(
key
);
}
}
List
<
String
>
list
=
oss
.
delFiles
(
keys
,
ossDto
.
isQuiet
());
list
=
oss
.
delFiles
(
keys
,
ossDto
.
isQuiet
());
}
catch
(
Exception
e
)
{
e
.
getStackTrace
();
}
return
ResultUtil
.
data
(
list
,
"删除成功"
);
return
ResultUtil
.
data
(
list
,
"删除成功"
);
}
}
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
22760536
...
@@ -11,12 +11,10 @@ import java.util.ArrayList;
...
@@ -11,12 +11,10 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Map.Entry
;
import
java.util.Set
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -33,6 +31,7 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -33,6 +31,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -45,11 +44,14 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
...
@@ -45,11 +44,14 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.TreeNodeConfig
;
import
cn.hutool.core.lang.tree.TreeUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.bean.clazz.CommonArea
;
import
cn.timer.api.bean.clazz.CommonArea
;
import
cn.timer.api.bean.clazz.SysRegion
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.yggl.YgglAttaClfjb
;
import
cn.timer.api.bean.yggl.YgglAttaClfjb
;
...
@@ -71,7 +73,6 @@ import cn.timer.api.config.annotation.CurrentUser;
...
@@ -71,7 +73,6 @@ import cn.timer.api.config.annotation.CurrentUser;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enuminterface.YgEnumInterface
;
import
cn.timer.api.config.enuminterface.YgEnumInterface
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.controller.yggl.service.YgglService
;
import
cn.timer.api.dao.clazz.CommonAreaMapper
;
import
cn.timer.api.dao.clazz.CommonAreaMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.yggl.YgAreaDtoMapper
;
import
cn.timer.api.dao.yggl.YgAreaDtoMapper
;
...
@@ -154,14 +155,12 @@ public class YgglController {
...
@@ -154,14 +155,12 @@ public class YgglController {
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
orgCode
=
userBean
.
getOrgCode
();
LoginInfoDto
loginInfo
=
LoginInfoDto
.
builder
().
build
();
LoginInfoDto
loginInfo
=
LoginInfoDto
.
builder
().
build
();
YgglMainEmp
ygglMainEmp
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
YgglMainEmp
ygglMainEmp
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
,
.
select
(
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getRzTime
,
YgglMainEmp:
:
getZzTime
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getRzTime
,
YgglMainEmp:
:
getZzTime
,
YgglMainEmp:
:
getEmpNum
)
YgglMainEmp:
:
getEmpNum
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
one
();
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
one
();
if
(
ygglMainEmp
!=
null
)
{
if
(
ygglMainEmp
!=
null
)
{
Integer
gw
=
ygglMainEmp
.
getBmgwId
();
Integer
gw
=
ygglMainEmp
.
getBmgwId
();
ZzglBmgwM
gwObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getUpId
,
ZzglBmgwM:
:
getName
)
ZzglBmgwM
gwObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getUpId
,
ZzglBmgwM:
:
getName
)
.
eq
(
ZzglBmgwM:
:
getId
,
gw
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
.
eq
(
ZzglBmgwM:
:
getId
,
gw
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
...
@@ -246,7 +245,6 @@ public class YgglController {
...
@@ -246,7 +245,6 @@ public class YgglController {
return
one
;
return
one
;
}
}
/**
/**
* 获取用户头像
* 获取用户头像
*
*
...
@@ -388,7 +386,7 @@ public class YgglController {
...
@@ -388,7 +386,7 @@ public class YgglController {
ygglMainEmp
.
insert
();
ygglMainEmp
.
insert
();
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
set
(
addygdaDto
.
getBmgwId
()
!=
null
,
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
set
(
addygdaDto
.
getBmgwId
()
!=
null
,
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
...
@@ -428,7 +426,8 @@ public class YgglController {
...
@@ -428,7 +426,8 @@ public class YgglController {
@PostMapping
(
value
=
"/updateygda"
)
@PostMapping
(
value
=
"/updateygda"
)
@ApiOperation
(
value
=
"修改员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"修改员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
)
@ApiOperationSupport
(
order
=
5
)
public
Result
<
Object
>
updateygda
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglMainEmp
ygglMainEmp
)
throws
Exception
{
public
Result
<
Object
>
updateygda
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglMainEmp
ygglMainEmp
)
throws
Exception
{
if
(
ygglMainEmp
.
getEmpNum
()
!=
null
)
{
if
(
ygglMainEmp
.
getEmpNum
()
!=
null
)
{
UpdateWrapper
<
YgglMainEmp
>
updateWrapper
=
new
UpdateWrapper
<
YgglMainEmp
>();
UpdateWrapper
<
YgglMainEmp
>
updateWrapper
=
new
UpdateWrapper
<
YgglMainEmp
>();
...
@@ -464,7 +463,6 @@ public class YgglController {
...
@@ -464,7 +463,6 @@ public class YgglController {
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
ZzglBmgwM
.
getDepts
(
bList
,
b
,
zzglBmgwMs
);
ZzglBmgwM
.
getDepts
(
bList
,
b
,
zzglBmgwMs
);
Integer
j
=
ygQueryDto
.
getJobStatus
();
Integer
j
=
ygQueryDto
.
getJobStatus
();
Integer
t
=
ygQueryDto
.
getJobType
();
Integer
t
=
ygQueryDto
.
getJobType
();
String
q
=
ygQueryDto
.
getQuery
();
String
q
=
ygQueryDto
.
getQuery
();
...
@@ -473,13 +471,11 @@ public class YgglController {
...
@@ -473,13 +471,11 @@ public class YgglController {
ygQueryDto
.
getTotalPage
()
==
null
?
10
:
ygQueryDto
.
getTotalPage
());
ygQueryDto
.
getTotalPage
()
==
null
?
10
:
ygQueryDto
.
getTotalPage
());
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"name"
,
"emp_num"
,
"bmgw_id"
,
"rz_time"
,
"job_type"
,
"phone"
,
"job_status"
)
queryWrapper
.
select
(
"name"
,
"emp_num"
,
"bmgw_id"
,
"rz_time"
,
"job_type"
,
"phone"
,
"job_status"
)
.
ne
(
"job_status"
,
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
())
.
ne
(
"job_status"
,
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()).
eq
(
"org_code"
,
orgCode
)
.
eq
(
"org_code"
,
orgCode
)
.
eq
(
t
!=
null
&&
t
>
-
1
,
"job_type"
,
t
).
eq
(
j
!=
null
&&
j
>
-
1
,
"job_status"
,
j
)
.
eq
(
t
!=
null
&&
t
>
-
1
,
"job_type"
,
t
).
eq
(
j
!=
null
&&
j
>
-
1
,
"job_status"
,
j
)
.
in
(!
bList
.
isEmpty
(),
"bmgw_id"
,
bList
)
.
in
(!
bList
.
isEmpty
(),
"bmgw_id"
,
bList
)
.
and
(!
StrUtil
.
hasBlank
(
q
),
wq
->
wq
.
like
(
"name"
,
q
).
or
().
like
(
"phone"
,
q
));
.
and
(!
StrUtil
.
hasBlank
(
q
),
wq
->
wq
.
like
(
"name"
,
q
).
or
().
like
(
"phone"
,
q
));
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
IPage
<
YgglMainEmp
>
ygglMainEmpPage
=
YgglMainEmp
.
builder
().
build
().
selectPage
(
page
,
queryWrapper
);
IPage
<
YgglMainEmp
>
ygglMainEmpPage
=
YgglMainEmp
.
builder
().
build
().
selectPage
(
page
,
queryWrapper
);
// List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords();
// List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords();
...
@@ -799,7 +795,8 @@ public class YgglController {
...
@@ -799,7 +795,8 @@ public class YgglController {
// 员工状态(最大优化)
// 员工状态(最大优化)
d
.
setJobStatus
(
YgEnumInterface
.
jobStatus
.
isZhen
(
jobStatus
));
d
.
setJobStatus
(
YgEnumInterface
.
jobStatus
.
isZhen
(
jobStatus
));
// 入职日期(最大优化)
// 入职日期(最大优化)
d
.
setRzTime
(
rzTime
!=
null
?
YgEnumInterface
.
rzTime
.
tranTime2
(
YgEnumInterface
.
rzTime
.
tranTime
(
rzTime
))
:
null
);
d
.
setRzTime
(
rzTime
!=
null
?
YgEnumInterface
.
rzTime
.
tranTime2
(
YgEnumInterface
.
rzTime
.
tranTime
(
rzTime
))
:
null
);
// 试用期(最大优化)
// 试用期(最大优化)
d
.
setSyq
(
YgEnumInterface
.
syq
.
choose
(
syq
));
d
.
setSyq
(
YgEnumInterface
.
syq
.
choose
(
syq
));
}
}
...
@@ -810,7 +807,7 @@ public class YgglController {
...
@@ -810,7 +807,7 @@ public class YgglController {
// 浴池,洗去选填项字节大于100的选项
// 浴池,洗去选填项字节大于100的选项
public
boolean
takeshower
(
String
[]
bathroom
)
{
public
boolean
takeshower
(
String
[]
bathroom
)
{
for
(
String
b
:
bathroom
)
{
for
(
String
b
:
bathroom
)
{
if
(
b
!=
null
&&
b
.
length
()
>
100
)
{
if
(
b
!=
null
&&
b
.
length
()
>
100
)
{
return
false
;
return
false
;
}
}
...
@@ -1575,10 +1572,10 @@ public class YgglController {
...
@@ -1575,10 +1572,10 @@ public class YgglController {
updateWrapper
.
eq
(
"emp_num"
,
empNum
);
updateWrapper
.
eq
(
"emp_num"
,
empNum
);
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
updateWrapper1
.
eq
(
"emp_num"
,
empNum
);
updateWrapper1
.
eq
(
"emp_num"
,
empNum
);
YgglMainEmp
.
builder
().
empNum
(
empNum
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
())
YgglMainEmp
.
builder
().
empNum
(
empNum
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
())
.
build
()
.
build
().
update
(
updateWrapper
);
.
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
empNum
(
empNum
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
())
YgglMainLzb
.
builder
().
empNum
(
empNum
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
())
.
sjlzTime
(
new
Date
())
.
sjlzTime
(
new
Date
()).
build
().
update
(
updateWrapper1
);
.
build
().
update
(
updateWrapper1
);
// 查询该员工的关联表
// 查询该员工的关联表
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper1
=
new
QueryWrapper
<
QyzxEmpEntAsso
>();
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper1
=
new
QueryWrapper
<
QyzxEmpEntAsso
>();
queryWrapper1
.
eq
(
"emp_num"
,
empNum
);
queryWrapper1
.
eq
(
"emp_num"
,
empNum
);
...
@@ -1587,9 +1584,8 @@ public class YgglController {
...
@@ -1587,9 +1584,8 @@ public class YgglController {
qyzxEmpEntAsso
.
delete
(
queryWrapper1
);
qyzxEmpEntAsso
.
delete
(
queryWrapper1
);
// 初始化 部门主管
// 初始化 部门主管
zzglBmgwMMapper
.
update
(
ZzglBmgwM
.
builder
().
leader
(
null
).
build
(),
new
UpdateWrapper
<
ZzglBmgwM
>()
zzglBmgwMMapper
.
update
(
ZzglBmgwM
.
builder
().
leader
(
null
).
build
(),
.
lambda
()
new
UpdateWrapper
<
ZzglBmgwM
>().
lambda
().
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
.
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
return
ResultUtil
.
success
(
"确认离职员工成功"
);
return
ResultUtil
.
success
(
"确认离职员工成功"
);
}
}
...
@@ -2032,4 +2028,30 @@ public class YgglController {
...
@@ -2032,4 +2028,30 @@ public class YgglController {
.
delete
(
new
QueryWrapper
<
YgglAttaSbgjj
>().
eq
(
"org_code"
,
orgCode
).
eq
(
"id"
,
id
)),
"删除员工社保公积金成功"
);
.
delete
(
new
QueryWrapper
<
YgglAttaSbgjj
>().
eq
(
"org_code"
,
orgCode
).
eq
(
"id"
,
id
)),
"删除员工社保公积金成功"
);
}
}
@GetMapping
(
value
=
"/sysRegion"
)
@ApiOperation
(
value
=
"省市区字典(贼全)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
Tree
<
String
>>>
sysRegion
()
{
List
<
SysRegion
>
nodeList
=
SysRegion
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
SysRegion
>().
select
(
SysRegion:
:
getKeyId
,
SysRegion:
:
getRegionCode
,
SysRegion:
:
getRegionName
,
SysRegion:
:
getMerName
,
SysRegion:
:
getLevel
));
// 配置
TreeNodeConfig
treeNodeConfig
=
new
TreeNodeConfig
();
// 自定义属性名 都要默认值的
treeNodeConfig
.
setIdKey
(
"key_id"
);
treeNodeConfig
.
setParentIdKey
(
"region_code"
);
// 最大递归深度
treeNodeConfig
.
setDeep
(
4
);
List
<
Tree
<
String
>>
treeNodes
=
TreeUtil
.
build
(
nodeList
,
"0"
,
treeNodeConfig
,
(
treeNode
,
tree
)
->
{
tree
.
setId
(
treeNode
.
getKeyId
().
toString
());
tree
.
setParentId
(
treeNode
.
getRegionCode
());
tree
.
setName
(
treeNode
.
getRegionName
());
// 扩展属性 ...
tree
.
putExtra
(
"mer_name"
,
treeNode
.
getMerName
());
});
return
ResultUtil
.
data
(
treeNodes
,
"获取成功"
);
}
}
}
src/main/java/cn/timer/api/dao/clazz/SysRegionMapper.java
0 → 100644
View file @
22760536
/**
* <p>Title: SysRegionMapper.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月11日
* @version 1.0
*/
package
cn
.
timer
.
api
.
dao
.
clazz
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.clazz.SysRegion
;
/**
* <p>
* Title: SysRegionMapper.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年5月11日
* @version 1.0
*/
public
interface
SysRegionMapper
extends
BaseMapper
<
SysRegion
>
{
}
src/main/java/cn/timer/api/dto/kqmk/IndividualOvertimeRuleDto.java
View file @
22760536
...
@@ -17,8 +17,8 @@ import lombok.NoArgsConstructor;
...
@@ -17,8 +17,8 @@ import lombok.NoArgsConstructor;
public
class
IndividualOvertimeRuleDto
{
public
class
IndividualOvertimeRuleDto
{
@ApiModelProperty
(
value
=
"加班规则数据 "
,
example
=
"字段说明"
)
@ApiModelProperty
(
value
=
"加班规则数据 "
,
example
=
"字段说明"
)
KqglAssoOvertimeRules
rules
;
KqglAssoOvertimeRules
Dto
rules
;
@ApiModelProperty
(
value
=
"加班规则-扣除休息时间 "
,
example
=
"字段说明"
)
@ApiModelProperty
(
value
=
"加班规则-扣除休息时间 "
,
example
=
"字段说明"
)
List
<
KqglAssOvertimeVice
>
vic
e
;
List
<
KqglAssOvertimeVice
>
starttim
e
;
}
}
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
View file @
22760536
...
@@ -22,7 +22,7 @@ public class KqglAssoLeaveRulesDto {
...
@@ -22,7 +22,7 @@ public class KqglAssoLeaveRulesDto {
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"请假单位 "
,
example
=
"1:按天请假;2:按半天;3:按小时"
)
@ApiModelProperty
(
value
=
"请假单位 "
,
example
=
"1:按天请假;2:按半天;3:按小时"
)
private
String
company
;
private
Integer
company
;
@ApiModelProperty
(
value
=
"假期类型 "
,
example
=
"1:系统项;2:自定义项"
)
@ApiModelProperty
(
value
=
"假期类型 "
,
example
=
"1:系统项;2:自定义项"
)
private
Integer
leaveType
;
private
Integer
leaveType
;
...
...
src/main/java/cn/timer/api/dto/kqmk/KqglAssoOvertimeRulesDto.java
View file @
22760536
...
@@ -21,7 +21,7 @@ public class KqglAssoOvertimeRulesDto {
...
@@ -21,7 +21,7 @@ public class KqglAssoOvertimeRulesDto {
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"1"
)
private
Integer
appliedScope
;
private
String
appliedScope
;
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
private
Integer
isWorkovertime
;
private
Integer
isWorkovertime
;
...
@@ -98,5 +98,7 @@ public class KqglAssoOvertimeRulesDto {
...
@@ -98,5 +98,7 @@ public class KqglAssoOvertimeRulesDto {
@ApiModelProperty
(
value
=
"扣除休息时间段"
,
example
=
"12:00-13:30"
)
@ApiModelProperty
(
value
=
"扣除休息时间段"
,
example
=
"12:00-13:30"
)
private
StartTimeRestDto
[]
starttime
;
private
StartTimeRestDto
[]
starttime
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"[]"
)
private
String
[]
applyrange
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/dto/kqmk/VacationInformationDto.java
View file @
22760536
...
@@ -20,6 +20,6 @@ public class VacationInformationDto {
...
@@ -20,6 +20,6 @@ public class VacationInformationDto {
KqglAssoLeaveRules
rules
;
KqglAssoLeaveRules
rules
;
@ApiModelProperty
(
value
=
"假期规则-适用范围 "
,
example
=
"字段说明"
)
@ApiModelProperty
(
value
=
"假期规则-适用范围 "
,
example
=
"字段说明"
)
List
<
KqglAssoRulesVice
>
vic
e
;
List
<
KqglAssoRulesVice
>
rang
e
;
}
}
src/main/java/cn/timer/api/utils/schedule/CronUtil.java
View file @
22760536
...
@@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
cn.timer.api.bean.sche.ScheduleTask
;
import
cn.timer.api.bean.sche.ScheduleTask
;
public
class
CronUtil
{
public
class
CronUtil
{
// 默认cron 10秒一次
// 默认cron 30秒一次
private
static
String
cron
=
"0/10 * * * * ?"
;
private
static
String
cron
=
"0 0 8 * * ?"
;
// private static String cron = "0 50 14 * * ?";
// 数据库cron
// 数据库cron
public
static
String
getCron
(
String
className
,
String
methodName
)
{
public
static
String
getCron
(
String
className
,
String
methodName
)
{
...
...
src/main/java/cn/timer/api/utils/schedule/RemindUtil.java
View file @
22760536
...
@@ -28,7 +28,7 @@ import cn.timer.api.utils.aliyun.AliyunSMS;
...
@@ -28,7 +28,7 @@ import cn.timer.api.utils.aliyun.AliyunSMS;
*
*
*/
*/
@Component
@Component
@Lazy
(
false
)
@Lazy
public
class
RemindUtil
implements
SchedulingConfigurer
{
public
class
RemindUtil
implements
SchedulingConfigurer
{
@Autowired
@Autowired
...
...
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