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
903418a7
Commit
903418a7
authored
May 09, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://120.24.24.239:8082/8timerv2/8timerapiv200.git
into dsc
parents
f5006eaf
6a564afb
Show whitespace changes
Inline
Side-by-side
Showing
64 changed files
with
1145 additions
and
364 deletions
+1145
-364
src/main/java/cn/timer/api/aspect/BindingResultAspect.java
+30
-20
src/main/java/cn/timer/api/aspect/lang/bean/ValidationError.java
+0
-1
src/main/java/cn/timer/api/bean/qyzx/QyzxInvoiceUsual.java
+5
-2
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalTemplate.java
+1
-1
src/main/java/cn/timer/api/bean/spmk/SpmkApproveSummary.java
+1
-1
src/main/java/cn/timer/api/bean/spmk/SpmkCustomApproval.java
+4
-1
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
+1
-1
src/main/java/cn/timer/api/config/interceptor/WebSecurityConfig.java
+4
-1
src/main/java/cn/timer/api/config/specification/SimpleSpecification.java
+0
-78
src/main/java/cn/timer/api/config/specification/SimpleSpecificationBuilder.java
+0
-77
src/main/java/cn/timer/api/config/specification/SpecificationOperator.java
+0
-59
src/main/java/cn/timer/api/controller/LoginController.java
+7
-0
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+72
-0
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+10
-3
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+100
-34
src/main/java/cn/timer/api/controller/spmk/service/SpmkService.java
+7
-0
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
+65
-0
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+35
-6
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+19
-1
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMService.java
+14
-0
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMServiceImpl.java
+64
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApprovalGMapper.java
+3
-1
src/main/java/cn/timer/api/dto/kqgl/CompensateDto.java
+20
-0
src/main/java/cn/timer/api/dto/kqgl/LeaveTypeDto.java
+21
-0
src/main/java/cn/timer/api/dto/spmk/MySummaryQueryDto.java
+2
-2
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalTemplateDto.java
+17
-2
src/main/java/cn/timer/api/dto/spmk/SpmkApproveSummaryDto.java
+3
-5
src/main/java/cn/timer/api/dto/spmk/SpmkCustomApprovalDto.java
+22
-1
src/main/java/cn/timer/api/dto/yggl/LoginInfoDto.java
+34
-0
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+7
-5
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
+40
-0
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
+42
-0
src/main/java/cn/timer/api/utils/router/business/RecruitBusiness.java
+57
-0
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
+47
-0
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
+35
-0
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
+39
-0
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusiness.java
+16
-0
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusinessFactory.java
+49
-0
src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java
+43
-0
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
+41
-0
src/main/java/cn/timer/api/utils/router/enums/ApproveEnum.java
+43
-0
src/main/resources/mapping/jxgl/JxglAdminJcszMapper.xml
+3
-2
src/main/resources/mapping/jxgl/JxglAdminKpzszMapper.xml
+3
-2
src/main/resources/mapping/jxgl/JxglAdminZbkMapper.xml
+3
-2
src/main/resources/mapping/sbgjj/SbgjjAdminCbryMapper.xml
+3
-2
src/main/resources/mapping/sbgjj/SbgjjAssoCbfaMapper.xml
+3
-2
src/main/resources/mapping/sbgjj/SbgjjAssoCbfzmxMapper.xml
+3
-2
src/main/resources/mapping/sbgjj/SbgjjAssoYjzdMapper.xml
+3
-2
src/main/resources/mapping/sbgjj/SbgjjTypeDetailsMapper.xml
+3
-2
src/main/resources/mapping/sbgjj/SbgjjYjCsbhMapper.xml
+3
-2
src/main/resources/mapping/spmk/SpmkApprovalGMapper.xml
+38
-6
src/main/resources/mapping/spmk/SpmkApprovalTemplateGMapper.xml
+2
-2
src/main/resources/mapping/spmk/SpmkCustomApprovalMapper.xml
+10
-0
src/main/resources/mapping/xcgl/XcglAdminXzzMapper.xml
+3
-2
src/main/resources/mapping/xcgl/XcglAssoGztszMapper.xml
+3
-2
src/main/resources/mapping/xcgl/XcglAssoGztztMapper.xml
+3
-2
src/main/resources/mapping/xcgl/XcglAssoJsgzzxMapper.xml
+6
-6
src/main/resources/mapping/xcgl/XcglAssoJxgzMapper.xml
+2
-2
src/main/resources/mapping/xcgl/XcglAssoXzbMapper.xml
+7
-5
src/main/resources/mapping/xcgl/XcglAssoXzdadxMapper.xml
+3
-2
src/main/resources/mapping/xcgl/XcglAssoXzdazMapper.xml
+9
-5
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
+4
-4
src/main/resources/mapping/xcgl/XcglAssoXzuryMapper.xml
+3
-2
src/main/resources/mapping/xcgl/XcglAssoZxfjkcMapper.xml
+5
-4
No files found.
src/main/java/cn/timer/api/aspect/BindingResultAspect.java
View file @
903418a7
...
...
@@ -3,19 +3,16 @@ package cn.timer.api.aspect;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Optional
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.Signature
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Before
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.stereotype.Component
;
import
org.springframework.validation.BeanPropertyBindingResult
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.ObjectError
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -23,7 +20,6 @@ import com.alibaba.fastjson.JSONObject;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.util.ClassUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.timer.api.aspect.lang.annotation.BindingResultCtrol
;
import
cn.timer.api.aspect.lang.bean.ValidationError
;
import
cn.timer.api.utils.ResultUtil
;
...
...
@@ -37,25 +33,38 @@ import cn.timer.api.utils.ResultUtil;
@Component
public
class
BindingResultAspect
{
// 配置织入点
@Pointcut
(
"@annotation(cn.timer.api.aspect.lang.annotation.BindingResultCtrol)"
)
public
void
bindingResultPointCut
()
{
// @annotation配置织入点
// @Pointcut("@annotation(cn.timer.api.aspect.lang.annotation.BindingResultCtrol)")
// public void bindingResultPointCut()
// {
// }
// execution 配置织入点 -匹配 cn.timer.api.controller 包下的所有子包的类的方法
@Pointcut
(
"execution(* cn.timer.api.controller.spmk.*.*(..))"
)
public
void
clazzPointCut
(){
}
@Before
(
"bindingResultPointCut()"
)
public
void
doBefore
(
JoinPoint
point
)
throws
Throwable
{
//预留
//
// @Before("bindingResultPointCut()")
// public void doBefore(JoinPoint point) throws Throwable
// {
// //预留
// handleDataScope(point);
}
//
}
@Around
(
"bindingResultPointCut() && args(..,bindingResult)"
)
public
Object
doAround
(
ProceedingJoinPoint
joinPoint
,
BindingResult
bindingResult
)
throws
Throwable
{
// @Around("bindingResultPointCut() && args(..,bindingResult)")
@Around
(
"clazzPointCut()"
)
public
Object
doAround
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
Long
startTime
=
System
.
currentTimeMillis
();
Object
retVal
;
if
(
bindingResult
.
hasErrors
()){
List
<
ObjectError
>
ls
=
bindingResult
.
getAllErrors
();
Object
[]
objs
=
joinPoint
.
getArgs
();
List
<
Object
>
listObj
=
CollectionUtil
.
toList
(
objs
);
BeanPropertyBindingResult
optional
=
(
BeanPropertyBindingResult
)
listObj
.
stream
()
.
filter
(
p
->
"BeanPropertyBindingResult"
.
equals
(
ClassUtil
.
getClassName
(
p
,
true
)))
.
findFirst
()
.
orElse
(
null
);
if
(
optional
!=
null
&&
optional
.
hasErrors
()){
List
<
ObjectError
>
ls
=
optional
.
getAllErrors
();
List
<
ValidationError
>
listVe
=
new
ArrayList
<
ValidationError
>();
ValidationError
ve
;
for
(
ObjectError
one
:
ls
)
{
...
...
@@ -65,9 +74,9 @@ public class BindingResultAspect {
fieldString
=
fieldString
.
substring
(
fieldString
.
lastIndexOf
(
"."
)
+
1
);
}
for
(
String
str
:
one
.
getCodes
())
{
System
.
err
.
println
(
str
);
}
//
for (String str : one.getCodes()) {
//
System.err.println(str);
//
}
ve
=
ValidationError
.
builder
().
field
(
fieldString
).
msg
(
one
.
getDefaultMessage
()).
build
();
listVe
.
add
(
ve
);
...
...
@@ -80,6 +89,7 @@ public class BindingResultAspect {
Console
.
log
(
"返回内容 {}: "
,
JSONObject
.
toJSONString
(
retVal
));
Long
endtime
=
System
.
currentTimeMillis
();
Console
.
log
(
"执行耗时为{}:"
,
endtime
-
startTime
+
"ms"
);
return
retVal
;
}
...
...
src/main/java/cn/timer/api/aspect/lang/bean/ValidationError.java
View file @
903418a7
package
cn
.
timer
.
api
.
aspect
.
lang
.
bean
;
import
cn.timer.api.bean.spmk.SpmkApprovalG
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
...
...
src/main/java/cn/timer/api/bean/qyzx/QyzxInvoiceUsual.java
View file @
903418a7
...
...
@@ -40,8 +40,8 @@ import lombok.NoArgsConstructor;
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table
(
name
=
"qyzx_invoice_
data
"
)
@ApiModel
(
"发票资料表"
)
@Table
(
name
=
"qyzx_invoice_
usual
"
)
@ApiModel
(
"
常用
发票资料表"
)
public
class
QyzxInvoiceUsual
extends
Model
<
QyzxInvoiceUsual
>{
private
static
final
long
serialVersionUID
=
2890357568571822258L
;
...
...
@@ -82,6 +82,9 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
@ApiModelProperty
(
value
=
"邮箱"
,
example
=
"13144400255@163.com"
)
private
String
email
;
@ApiModelProperty
(
value
=
"收货地区"
,
example
=
"广东省广州市白云区"
)
private
String
shippingArea
;
@ApiModelProperty
(
value
=
"收货地址"
,
example
=
"白云东平伯曼酒店"
)
private
String
shippingAddress
;
...
...
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalTemplate.java
View file @
903418a7
...
...
@@ -70,7 +70,7 @@ public class SpmkApprovalTemplate extends Model<SpmkApprovalTemplate> {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型
1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡
"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"关联类型
0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪
"
,
example
=
"1"
)
private
Integer
assoType
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
...
...
src/main/java/cn/timer/api/bean/spmk/SpmkApproveSummary.java
View file @
903418a7
...
...
@@ -73,7 +73,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
@ApiModelProperty
(
value
=
"历史审批人 "
,
example
=
"历史审批人"
)
private
String
historyApprover
;
@ApiModelProperty
(
value
=
"关联类型
1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"5
"
)
@ApiModelProperty
(
value
=
"关联类型
0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪"
,
example
=
"1
"
)
private
Integer
assoType
;
@TableField
(
fill
=
FieldFill
.
UPDATE
)
...
...
src/main/java/cn/timer/api/bean/spmk/SpmkCustomApproval.java
View file @
903418a7
...
...
@@ -73,9 +73,12 @@ public class SpmkCustomApproval extends Model<SpmkCustomApproval> {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型
1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡
"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"关联类型
0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪
"
,
example
=
"1"
)
private
Integer
assoType
;
@ApiModelProperty
(
value
=
"可见范围 0部分可见 1所有可见 2禁用"
,
example
=
"1"
)
private
Integer
isAllvisible
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
byte
[]
froms
;
...
...
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
View file @
903418a7
...
...
@@ -127,7 +127,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty
(
value
=
"转正备注 "
,
example
=
"转正备注"
)
private
String
zzRemark
;
@ApiModelProperty
(
value
=
"工作性质
1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8
退休返聘"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"工作性质
0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7
退休返聘"
,
example
=
"101"
)
private
Integer
jobType
;
@ApiModelProperty
(
value
=
"员工状态 0试用、1正式、2离职中、3已离职"
,
example
=
"101"
)
...
...
src/main/java/cn/timer/api/config/interceptor/WebSecurityConfig.java
View file @
903418a7
...
...
@@ -65,7 +65,10 @@ public class WebSecurityConfig implements WebMvcConfigurer {
// WriteNullStringAsEmpty 将字符串类型字段的空值输出为空字符串 ""
// WriteNullNumberAsZero 将数值类型字段的空值输出为0
// WriteNullBooleanAsFalse 将Boolean类型字段的空值输出为false
fastJsonConfig
.
setSerializerFeatures
(
SerializerFeature
.
PrettyFormat
,
SerializerFeature
.
WriteNullListAsEmpty
,
fastJsonConfig
.
setSerializerFeatures
(
SerializerFeature
.
PrettyFormat
,
SerializerFeature
.
WriteMapNullValue
,
SerializerFeature
.
WriteDateUseDateFormat
,
SerializerFeature
.
WriteNullStringAsEmpty
);
// 处理中文乱码问题
List
<
MediaType
>
fastMediaTypes
=
new
ArrayList
<>();
...
...
src/main/java/cn/timer/api/config/specification/SimpleSpecification.java
deleted
100644 → 0
View file @
f5006eaf
package
cn
.
timer
.
api
.
config
.
specification
;
import
java.util.List
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
org.springframework.data.jpa.domain.Specification
;
public
class
SimpleSpecification
<
T
>
implements
Specification
<
T
>
{
private
static
final
long
serialVersionUID
=
9090560756576906120L
;
/**
* 查询的条件列表,是一组列表
*/
private
List
<
SpecificationOperator
>
opers
;
public
SimpleSpecification
(
List
<
SpecificationOperator
>
opers
)
{
this
.
opers
=
opers
;
}
@Override
public
Predicate
toPredicate
(
Root
<
T
>
root
,
CriteriaQuery
<?>
criteriaQuery
,
CriteriaBuilder
criteriaBuilder
)
{
int
index
=
0
;
// 通过resultPre来组合多个条件
Predicate
resultPre
=
null
;
for
(
SpecificationOperator
op
:
opers
)
{
if
(
index
++
==
0
)
{
resultPre
=
generatePredicate
(
root
,
criteriaBuilder
,
op
);
continue
;
}
Predicate
pre
=
generatePredicate
(
root
,
criteriaBuilder
,
op
);
if
(
pre
==
null
)
continue
;
if
(
"and"
.
equalsIgnoreCase
(
op
.
getJoin
()))
{
resultPre
=
criteriaBuilder
.
and
(
resultPre
,
pre
);
}
else
if
(
"or"
.
equalsIgnoreCase
(
op
.
getJoin
()))
{
resultPre
=
criteriaBuilder
.
or
(
resultPre
,
pre
);
}
}
return
resultPre
;
}
/**
* 根据不同的操作符返回特定的查询
*/
private
Predicate
generatePredicate
(
Root
<
T
>
root
,
CriteriaBuilder
criteriaBuilder
,
SpecificationOperator
op
)
{
if
(
"="
.
equalsIgnoreCase
(
op
.
getOper
()))
{
System
.
out
.
println
(
op
.
getKey
()
+
","
+
op
.
getValue
());
return
criteriaBuilder
.
equal
(
root
.
get
(
op
.
getKey
()),
op
.
getValue
());
}
else
if
(
">="
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
ge
(
root
.
get
(
op
.
getKey
()),
(
Number
)
op
.
getValue
());
}
else
if
(
"<="
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
le
(
root
.
get
(
op
.
getKey
()),
(
Number
)
op
.
getValue
());
}
else
if
(
">"
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
gt
(
root
.
get
(
op
.
getKey
()),
(
Number
)
op
.
getValue
());
}
else
if
(
"<"
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
lt
(
root
.
get
(
op
.
getKey
()),
(
Number
)
op
.
getValue
());
}
else
if
(
":"
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
like
(
root
.
get
(
op
.
getKey
()),
"%"
+
op
.
getValue
()
+
"%"
);
}
else
if
(
"l:"
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
like
(
root
.
get
(
op
.
getKey
()),
op
.
getValue
()
+
"%"
);
}
else
if
(
":l"
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
like
(
root
.
get
(
op
.
getKey
()),
"%"
+
op
.
getValue
());
}
else
if
(
"null"
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
isNull
(
root
.
get
(
op
.
getKey
()));
}
else
if
(
"!null"
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
isNotNull
(
root
.
get
(
op
.
getKey
()));
}
else
if
(
"!="
.
equalsIgnoreCase
(
op
.
getOper
()))
{
return
criteriaBuilder
.
notEqual
(
root
.
get
(
op
.
getKey
()),
op
.
getValue
());
}
return
null
;
}
}
src/main/java/cn/timer/api/config/specification/SimpleSpecificationBuilder.java
deleted
100644 → 0
View file @
f5006eaf
package
cn
.
timer
.
api
.
config
.
specification
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.data.jpa.domain.Specification
;
/**
* Created by Tang on 2019/11/4.
*/
public
class
SimpleSpecificationBuilder
<
T
>
{
/**
* 条件列表
*/
private
List
<
SpecificationOperator
>
opers
;
/**
* 构造函数,初始化的条件是and
*/
public
SimpleSpecificationBuilder
(
String
key
,
String
oper
,
Object
value
)
{
SpecificationOperator
so
=
new
SpecificationOperator
();
so
.
setJoin
(
"and"
);
so
.
setKey
(
key
);
so
.
setOper
(
oper
);
so
.
setValue
(
value
);
opers
=
new
ArrayList
<
SpecificationOperator
>();
opers
.
add
(
so
);
}
public
SimpleSpecificationBuilder
()
{
opers
=
new
ArrayList
<
SpecificationOperator
>();
}
/**
* 完成条件的添加
*
* @return
*/
@SuppressWarnings
(
"rawtypes"
)
public
SimpleSpecificationBuilder
add
(
String
key
,
String
oper
,
Object
value
,
String
join
)
{
SpecificationOperator
so
=
new
SpecificationOperator
();
so
.
setKey
(
key
);
so
.
setValue
(
value
);
so
.
setOper
(
oper
);
so
.
setJoin
(
join
);
opers
.
add
(
so
);
return
this
;
}
/**
* 添加or条件的重载
*
* @return this,方便后续的链式调用
*/
@SuppressWarnings
(
"rawtypes"
)
public
SimpleSpecificationBuilder
addOr
(
String
key
,
String
oper
,
Object
value
)
{
return
this
.
add
(
key
,
oper
,
value
,
"or"
);
}
/**
* 添加and的条件
*
* @return
*/
@SuppressWarnings
(
"rawtypes"
)
public
SimpleSpecificationBuilder
add
(
String
key
,
String
oper
,
Object
value
)
{
return
this
.
add
(
key
,
oper
,
value
,
"and"
);
}
@SuppressWarnings
(
"rawtypes"
)
public
Specification
generateSpecification
()
{
Specification
<
T
>
specification
=
new
SimpleSpecification
<
T
>(
opers
);
return
specification
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/config/specification/SpecificationOperator.java
deleted
100644 → 0
View file @
f5006eaf
package
cn
.
timer
.
api
.
config
.
specification
;
/**
* Created by konghao on 2016/12/15.
* 操作符类,这个类中存储了键值对和操作符号,另外存储了连接下一个条件的类型是and还是or 创建时通过
* id>=7,其中id就是key,>=就是oper操作符,7就是value 特殊的自定义几个操作符(:表示like %v%,b:表示v%,:b表示%v)
*/
public
class
SpecificationOperator
{
/**
* 操作符的key,如查询时的name,id,address..之类
*/
private
String
key
;
/**
* 操作符的value,具体要查询的值
*/
private
Object
value
;
/**
* 操作符,自己定义的一组操作符,用来方便查询
*/
private
String
oper
;
/**
* 连接的方式:and或者or
*/
private
String
join
;
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
Object
getValue
()
{
return
value
;
}
public
void
setValue
(
Object
value
)
{
this
.
value
=
value
;
}
public
String
getOper
()
{
return
oper
;
}
public
void
setOper
(
String
oper
)
{
this
.
oper
=
oper
;
}
public
String
getJoin
()
{
return
join
;
}
public
void
setJoin
(
String
join
)
{
this
.
join
=
join
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/LoginController.java
View file @
903418a7
...
...
@@ -38,6 +38,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.controller.spmk.service.SpmkServiceImpl
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
...
...
@@ -427,6 +428,10 @@ public class LoginController {
return
ResultUtil
.
error
(
"修改手机号/用户名失败"
);
}
@Autowired
SpmkServiceImpl
SpmkService
;
/**
* 注册企业
*
...
...
@@ -510,6 +515,8 @@ public class LoginController {
return
ResultUtil
.
error
(
"注册企业失败4"
);
}
SpmkService
.
createCustomApproval
(
qyzxEntInfoM
.
getId
());
return
ResultUtil
.
success
(
"注册企业成功"
);
}
catch
(
Exception
e
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
controller
.
kqgl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.timer.api.dto.kqgl.CompensateDto
;
import
cn.timer.api.dto.kqgl.LeaveTypeDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
=
"3.0考勤模块"
)
@RestController
@Transactional
@RequestMapping
(
value
=
"/kqmk"
,
produces
=
{
"application/json"
,
"multipart/form-data"
})
public
class
TimeCardController
{
/**
* 查询列表-假期规则
*/
@GetMapping
(
value
=
"/list_leave_rules"
)
@ApiOperation
(
value
=
"1: 查询列表-假期规则"
,
httpMethod
=
"GET"
,
notes
=
" 查询列表-假期规则"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
selectListLeaveRules
()
{
List
<
LeaveTypeDto
>
leas
=
new
ArrayList
<
LeaveTypeDto
>();
LeaveTypeDto
lea
=
LeaveTypeDto
.
builder
().
build
();
lea
.
setId
(
1
);
lea
.
setValue
(
"事假"
);
leas
.
add
(
lea
);
LeaveTypeDto
lea2
=
LeaveTypeDto
.
builder
().
build
();
lea2
.
setId
(
2
);
lea2
.
setValue
(
"调休"
);
leas
.
add
(
lea2
);
LeaveTypeDto
lea3
=
LeaveTypeDto
.
builder
().
build
();
lea3
.
setId
(
3
);
lea3
.
setValue
(
"病假"
);
leas
.
add
(
lea3
);
return
ResultUtil
.
data
(
leas
,
"操作成功!"
);
}
/**
* 查询列表-加班补偿方式
*/
@GetMapping
(
value
=
"/list_compensate"
)
@ApiOperation
(
value
=
"2: 查询列表-加班补偿方式"
,
httpMethod
=
"GET"
,
notes
=
" 查询列表-加班补偿方式"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
selectListCompensate
()
{
List
<
CompensateDto
>
coms
=
new
ArrayList
<
CompensateDto
>();
CompensateDto
com
=
CompensateDto
.
builder
().
build
();
com
.
setId
(
1
);
com
.
setValue
(
"加班费"
);
coms
.
add
(
com
);
CompensateDto
coms2
=
CompensateDto
.
builder
().
build
();
coms2
.
setId
(
2
);
coms2
.
setValue
(
"调休"
);
coms
.
add
(
coms2
);
return
ResultUtil
.
data
(
coms
,
"操作成功!"
);
}
}
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
903418a7
...
...
@@ -39,7 +39,6 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.qyzx.QyzxEntAuthMapper
;
...
...
@@ -230,8 +229,16 @@ public class QyzxController {
@GetMapping
(
value
=
"/invoiceusual"
)
@ApiOperation
(
value
=
"显示常用的企业开票资料"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
QyzxInvoiceUsual
>
invoiceusual
(
@CurrentUser
UserBean
userBean
)
{
QyzxInvoiceUsual
one
=
new
LambdaQueryChainWrapper
<
QyzxInvoiceUsual
>(
qyzxInvoiceUsualMapper
)
.
eq
(
QyzxInvoiceUsual:
:
getOrgCode
,
userBean
.
getOrgCode
()).
one
();
QyzxInvoiceUsual
one
=
qyzxInvoiceUsualMapper
.
selectOne
(
new
QueryWrapper
<
QyzxInvoiceUsual
>().
lambda
()
.
eq
(
QyzxInvoiceUsual:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
one
!=
null
)
{
if
(
one
.
getShippingArea
()
==
null
)
{
one
.
setShippingArea
(
""
);
}
if
(
one
.
getShippingAddress
()
==
null
)
{
one
.
setShippingAddress
(
""
);
}
}
return
ResultUtil
.
data
(
one
,
"显示常用的企业开票资料"
);
}
...
...
src/main/java/cn/timer/api/controller/spmk/Spmk
ServiceImpl
.java
→
src/main/java/cn/timer/api/controller/spmk/Spmk
Controller
.java
View file @
903418a7
...
...
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -29,7 +30,6 @@ import cn.hutool.core.lang.Console;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.aspect.lang.annotation.BindingResultCtrol
;
import
cn.timer.api.bean.spmk.SpmkApprovalG
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplate
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplateG
;
...
...
@@ -43,6 +43,8 @@ import cn.timer.api.bean.spmk.SpmkInitiatorConfig;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.controller.spmk.service.SpmkServiceImpl
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dao.spmk.SpmkApprovalGMapper
;
import
cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper
;
import
cn.timer.api.dao.spmk.SpmkApprovalTemplateMapper
;
...
...
@@ -52,7 +54,6 @@ import cn.timer.api.dao.spmk.SpmkApproveSummaryMapper;
import
cn.timer.api.dao.spmk.SpmkCustomApprovalMapper
;
import
cn.timer.api.dao.spmk.SpmkExecutorMapper
;
import
cn.timer.api.dao.spmk.SpmkInitiatorConfigMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dto.spmk.ApprovingDto
;
import
cn.timer.api.dto.spmk.FlowChildren
;
import
cn.timer.api.dto.spmk.FromData
;
...
...
@@ -66,15 +67,20 @@ import cn.timer.api.dto.spmk.SummaryQueryDto;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.router.RouterUtils
;
import
cn.timer.api.utils.router.business.SpmkAssoBusiness
;
import
cn.timer.api.utils.router.business.SpmkAssoBusinessFactory
;
import
cn.timer.api.utils.router.enums.ApproveEnum
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.models.auth.In
;
@Api
(
tags
=
"3.0审批模块"
)
@RestController
@Transactional
@RequestMapping
(
value
=
"/spmk"
,
produces
=
{
"application/json"
,
"multipart/form-data"
})
public
class
SpmkServiceImpl
{
//@BindingResultCtrol(title = "发起审批")
public
class
SpmkController
{
@Autowired
private
SpmkApprovalTemplateGMapper
spmkApprovalTemplateGMapper
;
...
...
@@ -88,7 +94,12 @@ public class SpmkServiceImpl {
@Autowired
private
SpmkCustomApprovalMapper
spmkCustomApprovalMapper
;
//TODO 新增或编辑-审批模板组
@Autowired
private
ZzglBmgwMService
zzglBmgwMService
;
//TODO 审批模板组
/**
* 新增或编辑-审批模板组
*/
...
...
@@ -146,7 +157,7 @@ public class SpmkServiceImpl {
@PostMapping
(
value
=
"/save_approval_template"
)
@ApiOperation
(
value
=
"5.新增或编辑-审批模板"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-审批模板"
)
@ApiOperationSupport
(
order
=
5
)
public
Result
<
Object
>
saveAt
(
@
RequestBody
SpmkApprovalTemplateDto
spmkApprovalTemplateDto
){
public
Result
<
Object
>
saveAt
(
@
Valid
@RequestBody
SpmkApprovalTemplateDto
spmkApprovalTemplateDto
,
BindingResult
bindingResult
){
Integer
approvalTemplateGId
=
spmkApprovalTemplateDto
.
getApprovalTemplateGId
();
if
(
ObjectUtil
.
isNull
(
approvalTemplateGId
))
return
ResultUtil
.
error
(
"操作失败!-1"
);
...
...
@@ -156,7 +167,7 @@ public class SpmkServiceImpl {
// 克隆 SpmkApprovalTemplateDto对象 到 SpmkApprovalTemplate对象,排除属性froms,router
BeanUtil
.
copyProperties
(
spmkApprovalTemplateDto
,
at
,
"froms"
,
"router"
);
// 序列化 后 写入 SpmkApprovalTemplate对象
at
.
setFroms
(
ObjectUtil
.
serialize
(
spmkApprovalTemplateDto
.
getFroms
()));
at
.
setFroms
(
ObjectUtil
.
serialize
(
(
List
<
JSONObject
>)
spmkApprovalTemplateDto
.
getFroms
()));
at
.
setRouter
(
ObjectUtil
.
serialize
(
spmkApprovalTemplateDto
.
getRouter
()));
if
(!
at
.
insertOrUpdate
())
...
...
@@ -184,12 +195,17 @@ public class SpmkServiceImpl {
/**
* id查询-审批模板
*/
@GetMapping
(
value
=
"/select_approval_template"
)
@GetMapping
(
value
=
"/select_approval_template
/{id}
"
)
@ApiOperation
(
value
=
"7.id查询-审批模板"
,
httpMethod
=
"GET"
,
notes
=
"id查询-审批模板"
)
@ApiOperationSupport
(
order
=
7
)
public
Result
<
Object
>
selectAtById
(
@PathVariable
int
id
){
SpmkApprovalTemplate
at
=
SpmkApprovalTemplate
.
builder
().
id
(
id
).
build
().
selectById
();
return
ResultUtil
.
data
(
SpmkApprovalTemplate
.
builder
().
id
(
id
).
build
().
selectById
(),
"操作成功!"
);
SpmkApprovalTemplateDto
atd
=
SpmkApprovalTemplateDto
.
builder
().
build
();
BeanUtil
.
copyProperties
(
at
,
atd
,
"froms"
,
"router"
);
atd
.
setFroms
(
ObjectUtil
.
deserialize
(
at
.
getFroms
()));
atd
.
setRouter
(
ObjectUtil
.
deserialize
(
at
.
getRouter
()));
return
ResultUtil
.
data
(
atd
,
"操作成功!"
);
}
...
...
@@ -197,7 +213,7 @@ public class SpmkServiceImpl {
* 排序-审批模板
*/
@PutMapping
(
value
=
"/update_approval_template"
)
@ApiOperation
(
value
=
"8.
查询列表-审批模板组
"
,
httpMethod
=
"PUT"
,
notes
=
"查询列表-审批模板组"
)
@ApiOperation
(
value
=
"8.
排序-审批模板
"
,
httpMethod
=
"PUT"
,
notes
=
"查询列表-审批模板组"
)
@ApiOperationSupport
(
order
=
8
)
public
Result
<
Object
>
ranksAt
(
@RequestBody
List
<
SpmkApprovalTemplate
>
list
){
...
...
@@ -214,7 +230,7 @@ public class SpmkServiceImpl {
@PostMapping
(
value
=
"/save_approval_g"
)
@ApiOperation
(
value
=
"9.新增或编辑-审批组"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-审批组"
)
@ApiOperationSupport
(
order
=
9
)
public
Result
<
Object
>
saveAg
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SpmkApprovalG
spmkApprovalG
){
public
Result
<
Object
>
saveAg
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SpmkApprovalG
spmkApprovalG
){
spmkApprovalG
.
setOrgCode
(
userBean
.
getOrgCode
());
return
spmkApprovalG
.
insertOrUpdate
()
?
ResultUtil
.
data
(
spmkApprovalG
,
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!"
);
...
...
@@ -236,14 +252,30 @@ public class SpmkServiceImpl {
}
/**
* 查询列表-审批组
* 查询列表-审批组-审批管理
*/
@GetMapping
(
value
=
"/all_approval_g"
)
@ApiOperation
(
value
=
"11.查询列表-审批组-审批管理"
,
httpMethod
=
"GET"
,
notes
=
"查询列表-审批组-审批管理"
)
@ApiOperationSupport
(
order
=
11
)
public
Result
<
Object
>
selectListAgByAdmin
(
@CurrentUser
UserBean
userBean
){
List
<
Integer
>
depts
=
zzglBmgwMService
.
empNumupGetDepts
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
());
System
.
out
.
println
(
depts
);
return
ResultUtil
.
data
(
spmkApprovalGMapper
.
selectListAgInCaByAdmin
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
depts
),
"操作成功!"
);
}
/**
* 查询列表-审批组-个人审批
*/
@GetMapping
(
value
=
"/list_approval_g"
)
@ApiOperation
(
value
=
"11.查询列表-审批组
"
,
httpMethod
=
"GET"
,
notes
=
"查询列表-审批组
"
)
@ApiOperation
(
value
=
"11.查询列表-审批组
-个人审批"
,
httpMethod
=
"GET"
,
notes
=
"查询列表-审批组-个人审批
"
)
@ApiOperationSupport
(
order
=
11
)
public
Result
<
Object
>
selectListAg
(
@CurrentUser
UserBean
userBean
){
return
ResultUtil
.
data
(
spmkApprovalGMapper
.
selectListAgInCa
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
()),
"操作成功!"
);
List
<
Integer
>
depts
=
zzglBmgwMService
.
empNumupGetDepts
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
());
System
.
out
.
println
(
depts
);
return
ResultUtil
.
data
(
spmkApprovalGMapper
.
selectListAgInCa
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
depts
),
"操作成功!"
);
}
...
...
@@ -266,7 +298,7 @@ public class SpmkServiceImpl {
@ApiOperation
(
value
=
"13.新增或编辑-自定义审批"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-自定义审批"
)
@ApiOperationSupport
(
order
=
13
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
<
Object
>
saveCa
(
@
RequestBody
SpmkCustomApprovalDto
spmkCustomApprovalDto
)
throws
Exception
{
public
Result
<
Object
>
saveCa
(
@
Valid
@RequestBody
SpmkCustomApprovalDto
spmkCustomApprovalDto
,
BindingResult
bindingResult
)
throws
Exception
{
Integer
approvalGId
=
spmkCustomApprovalDto
.
getApprovalGId
();
if
(
ObjectUtil
.
isNull
(
approvalGId
))
return
ResultUtil
.
error
(
"操作失败!-1"
);
...
...
@@ -277,10 +309,14 @@ public class SpmkServiceImpl {
ca
.
setFroms
(
ObjectUtil
.
serialize
(
spmkCustomApprovalDto
.
getFroms
()));
ca
.
setRouter
(
ObjectUtil
.
serialize
(
spmkCustomApprovalDto
.
getRouter
()));
//1.新增 SpmkCustomApproval-自定义审批
if
(!
ca
.
insertOrUpdate
())
return
ResultUtil
.
error
(
"操作失败!-2"
);
Integer
id
=
ca
.
getId
();
// 2.删除 历史的 SpmkInitiatorConfig-审批发起人配置,
SpmkInitiatorConfig
.
builder
().
build
().
delete
(
new
QueryWrapper
<
SpmkInitiatorConfig
>().
lambda
().
eq
(
SpmkInitiatorConfig:
:
getCustomApprovalId
,
id
));
Console
.
log
(
"自定义审批id: "
+
id
);
List
<
SpmkInitiatorConfig
>
listIc
=
spmkCustomApprovalDto
.
getInitiatorConfigs
();
...
...
@@ -288,6 +324,7 @@ public class SpmkServiceImpl {
for
(
int
i
=
0
,
n
=
listIc
.
size
();
i
<
n
;
i
++)
{
listIc
.
get
(
i
).
setCustomApprovalId
(
id
);
}
// 3.新增 最新的 SpmkInitiatorConfig-审批发起人配置,
if
(!
spmkInitiatorConfigMapper
.
insertList
(
listIc
))
{
// 手动抛出异常,事务回滚
throw
new
Exception
();
...
...
@@ -295,14 +332,14 @@ public class SpmkServiceImpl {
}
SpmkInitiatorConfig
.
builder
().
build
().
delete
(
new
QueryWrapper
<
SpmkInitiatorConfig
>().
lambda
().
eq
(
SpmkInitiatorConfig:
:
getCustomApprovalId
,
id
));
//
/**
* 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class))
* 1.
删除 历史的 SpmkInitiatorConfig-审批发起人配置,
* 2.
新增 最新的
SpmkInitiatorConfig-审批发起人配置,
* 3.新增
SpmkCustomApproval-自定义审批
* 1.
新增 SpmkCustomApproval-自定义审批
* 2.
删除 历史的
SpmkInitiatorConfig-审批发起人配置,
* 3.新增
最新的 SpmkInitiatorConfig-审批发起人配置,
*/
// 清空前端不需要的字段再返回,节省流量
...
...
@@ -339,12 +376,13 @@ public class SpmkServiceImpl {
@ApiOperationSupport
(
order
=
15
)
public
Result
<
Object
>
selectCaById
(
@PathVariable
int
id
){
SpmkCustomApproval
ca
=
SpmkCustomApproval
.
builder
().
id
(
id
).
build
().
selectById
();
List
<
SpmkInitiatorConfig
>
listIc
=
SpmkInitiatorConfig
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
SpmkInitiatorConfig
>().
lambda
().
eq
(
SpmkInitiatorConfig:
:
getCustomApprovalId
,
id
));
SpmkCustomApprovalDto
caD
=
SpmkCustomApprovalDto
.
builder
()
.
froms
(
ObjectUtil
.
un
serialize
(
ca
.
getFroms
()))
.
router
(
ObjectUtil
.
un
serialize
(
ca
.
getRouter
()))
.
froms
(
ObjectUtil
.
de
serialize
(
ca
.
getFroms
()))
.
router
(
ObjectUtil
.
de
serialize
(
ca
.
getRouter
()))
.
build
();
BeanUtil
.
copyProperties
(
ca
,
caD
,
"froms"
,
"router"
);
caD
.
setInitiatorConfigs
(
listIc
);
return
ResultUtil
.
data
(
caD
,
"操作成功!"
);
}
...
...
@@ -380,9 +418,8 @@ public class SpmkServiceImpl {
@ApiOperation
(
value
=
"17.发起审批"
,
httpMethod
=
"POST"
,
notes
=
"发起审批"
)
@ApiOperationSupport
(
order
=
17
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@BindingResultCtrol
(
title
=
"发起审批"
)
//
@BindingResultCtrol(title = "发起审批")
public
Result
<
Object
>
saveCa
(
@CurrentUser
UserBean
userBean
,
@Valid
@RequestBody
SpmkApproveSummaryDto
spmkApproveSummaryDto
,
BindingResult
bindingResult
)
throws
Exception
{
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>()
.
lambda
()
.
select
(
YgglMainEmp:
:
getHeadUrl
,
YgglMainEmp:
:
getName
)
...
...
@@ -394,10 +431,10 @@ public class SpmkServiceImpl {
List
<
Router
>
listRouter
=
new
ArrayList
<
Router
>();
listRouter
.
add
(
spmkApproveSummaryDto
.
getRouter
());
JSONObject
jSONObject
=
spmkApproveSummaryDto
.
getRequestData
()
.
pu
t
(
"orgCode"
,
FromData
.
builder
().
value
(
String
.
valueOf
(
userBean
.
getOrgCode
())).
build
())
.
pu
t
(
"initiator"
,
FromData
.
builder
().
value
(
spmkApproveSummaryDto
.
getInitiator
()).
build
())
.
pu
t
(
"headUrl"
,
FromData
.
builder
().
value
(
ygglMainEmp
.
getHeadUrl
()).
build
())
.
pu
t
(
"id"
,
FromData
.
builder
().
value
(
StrUtil
.
toString
(
userBean
.
getEmpNum
())).
build
());
.
se
t
(
"orgCode"
,
FromData
.
builder
().
value
(
String
.
valueOf
(
userBean
.
getOrgCode
())).
build
())
.
se
t
(
"initiator"
,
FromData
.
builder
().
value
(
spmkApproveSummaryDto
.
getInitiator
()).
build
())
.
se
t
(
"headUrl"
,
FromData
.
builder
().
value
(
ygglMainEmp
.
getHeadUrl
()).
build
())
.
se
t
(
"id"
,
FromData
.
builder
().
value
(
StrUtil
.
toString
(
userBean
.
getEmpNum
())).
build
());
RouterUtils
.
NextNode
(
listRouter
,
jSONObject
,
ISFIRST
);
List
<
FlowChildren
>
listFlowChildren
=
new
ArrayList
<
FlowChildren
>();
RouterUtils
.
getIsFlowChildren
(
listRouter
,
listFlowChildren
);
...
...
@@ -482,13 +519,15 @@ public class SpmkServiceImpl {
SpmkApproveDetail
ad
=
spmkApproveDetailMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveDetail
>().
lambda
().
eq
(
SpmkApproveDetail:
:
getApproveSummaryId
,
id
));
SpmkApproveDetailDto
adD
=
SpmkApproveDetailDto
.
builder
().
build
();
if
(
ad
==
null
)
{
return
ResultUtil
.
data
(
adD
,
"操作成功!"
);
}
List
<
SpmkApproveExecuteRecord
>
listAer
=
spmkApproveExecuteRecordMapper
.
selectListByAsId
(
id
);
BeanUtil
.
copyProperties
(
ad
,
adD
,
"requestData"
,
"froms"
,
"router"
,
"spmkApproveExecuteRecord"
);
adD
.
setRequestData
(
ObjectUtil
.
unserialize
(
ad
.
getRequestData
()));
adD
.
setFroms
(
ObjectUtil
.
unserialize
(
ad
.
getFroms
()));
adD
.
setRouter
(
ObjectUtil
.
unserialize
(
ad
.
getRouter
()));
adD
.
setFlowChildren
(
ObjectUtil
.
unserialize
(
ad
.
getFlowChildren
()));
adD
.
setRequestData
(
ObjectUtil
.
deserialize
(
ad
.
getRequestData
()));
adD
.
setFroms
(
ObjectUtil
.
deserialize
(
ad
.
getFroms
()));
adD
.
setRouter
(
ObjectUtil
.
deserialize
(
ad
.
getRouter
()));
adD
.
setFlowChildren
(
ObjectUtil
.
deserialize
(
ad
.
getFlowChildren
()));
adD
.
setApproveExecuteRecord
(
listAer
);
return
ResultUtil
.
data
(
adD
,
"操作成功!"
);
...
...
@@ -521,6 +560,9 @@ public class SpmkServiceImpl {
SpmkApproveDetail
ad
=
SpmkApproveDetail
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
SpmkApproveDetail
>()
.
lambda
()
.
select
(
SpmkApproveDetail:
:
getId
,
SpmkApproveDetail:
:
getRequestData
,
SpmkApproveDetail:
:
getFlowChildren
)
.
eq
(
SpmkApproveDetail:
:
getApproveSummaryId
,
approvingDto
.
getAsId
()));
// 查询 SpmkApproveSummary 状态
...
...
@@ -542,7 +584,7 @@ public class SpmkServiceImpl {
}
if
(
aSummary
.
getSts
()
==
0
)
{
List
<
FlowChildren
>
listFlowChildren
=
ObjectUtil
.
un
serialize
(
ad
.
getFlowChildren
());
List
<
FlowChildren
>
listFlowChildren
=
ObjectUtil
.
de
serialize
(
ad
.
getFlowChildren
());
RouterUtils
.
approving
(
listFlowChildren
,
approvingDto
.
getAsId
(),
...
...
@@ -560,10 +602,18 @@ public class SpmkServiceImpl {
if
(
fc
.
getExecute
()
==
"2"
)
{
// 查询 SpmkApproveSummary 状态
aSummary
=
spmkApproveSummaryMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveSummary
>().
lambda
()
.
select
(
SpmkApproveSummary:
:
getSts
)
.
select
(
SpmkApproveSummary:
:
getSts
,
SpmkApproveSummary:
:
getAssoType
)
.
eq
(
SpmkApproveSummary:
:
getId
,
approvingDto
.
getAsId
()));
if
(
aSummary
.
getSts
()
!=
3
)
{
SpmkApproveSummary
.
builder
().
id
(
approvingDto
.
getAsId
()).
endTime
(
new
Date
()).
sts
(
2
).
build
().
updateById
();
//审批完成后 业务
SpmkAssoBusiness
sab
=
SpmkAssoBusinessFactory
.
createSpmkAssoType
(
ApproveEnum
.
getEnums
(
aSummary
.
getAssoType
()));
if
(
sab
!=
null
)
sab
.
handleApprove
(
ObjectUtil
.
deserialize
(
ad
.
getRequestData
()));
}
}
...
...
@@ -602,6 +652,8 @@ public class SpmkServiceImpl {
@ApiOperationSupport
(
order
=
90
)
public
Result
<
Object
>
deleteApprovalData
(
@CurrentUser
UserBean
userBean
){
spmkApprovalGMapper
.
delete
(
null
);
spmkCustomApprovalMapper
.
delete
(
null
);
spmkApproveSummaryMapper
.
delete
(
null
);
spmkApproveDetailMapper
.
delete
(
null
);
spmkApproveExecuteRecordMapper
.
delete
(
null
);
...
...
@@ -621,5 +673,19 @@ public class SpmkServiceImpl {
return
ResultUtil
.
data
(
spmkIcons
,
"获取图标列表成功"
);
}
@Autowired
SpmkServiceImpl
SpmkService
;
//TODO 测试-生成 审批组 和 自定义审批
@GetMapping
(
value
=
"/test"
)
@ApiOperation
(
value
=
"98.测试-生成 审批组 和 自定义审批"
,
httpMethod
=
"GET"
,
notes
=
"测试-生成 审批组 和 自定义审批"
)
@ApiOperationSupport
(
order
=
98
)
public
Result
<
List
<
SpmkIcon
>>
createCustomApproval
(
@RequestParam
Integer
orgCode
){
SpmkService
.
createCustomApproval
(
orgCode
);
List
<
SpmkIcon
>
spmkIcons
=
SpmkIcon
.
builder
().
build
().
selectAll
();
return
ResultUtil
.
data
(
spmkIcons
,
"获取图标列表成功"
);
}
}
src/main/java/cn/timer/api/controller/spmk/service/SpmkService.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
controller
.
spmk
.
service
;
public
interface
SpmkService
{
boolean
createCustomApproval
(
Integer
orgCode
);
}
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
controller
.
spmk
.
service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.lang.Console
;
import
cn.timer.api.bean.spmk.SpmkApprovalG
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplate
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplateG
;
import
cn.timer.api.bean.spmk.SpmkCustomApproval
;
import
cn.timer.api.dao.spmk.SpmkCustomApprovalMapper
;
@Service
public
class
SpmkServiceImpl
implements
SpmkService
{
@Autowired
SpmkCustomApprovalMapper
spmkCustomApprovalMapper
;
/**
* 根据orgCode查数据库 审批模板 生成 自定义模板
* orgCode 企业id
*/
@Override
public
boolean
createCustomApproval
(
Integer
orgCode
)
{
// TODO Auto-generated method stub
List
<
SpmkApprovalTemplateG
>
listAtg
=
SpmkApprovalTemplateG
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
SpmkApprovalTemplateG
>().
lambda
().
orderByAsc
(
SpmkApprovalTemplateG:
:
getId
));
List
<
SpmkApprovalG
>
listAG
=
new
ArrayList
<
SpmkApprovalG
>(
listAtg
.
size
());
for
(
SpmkApprovalTemplateG
spmkApprovalTemplateG
:
listAtg
)
{
SpmkApprovalG
saG
=
SpmkApprovalG
.
builder
().
build
();
BeanUtil
.
copyProperties
(
spmkApprovalTemplateG
,
saG
,
"id"
,
"update_time"
);
saG
.
setOrgCode
(
orgCode
);
listAG
.
add
(
saG
);
}
Console
.
log
(
listAG
);
SpmkCustomApproval
sca
=
SpmkCustomApproval
.
builder
().
build
();
List
<
SpmkApprovalTemplate
>
listAt
=
new
ArrayList
<
SpmkApprovalTemplate
>();
for
(
int
i
=
0
,
n
=
listAG
.
size
();
i
<
n
;
i
++)
{
boolean
b
=
listAG
.
get
(
i
).
insert
();
if
(
b
)
{
listAt
=
SpmkApprovalTemplate
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
SpmkApprovalTemplate
>()
.
lambda
()
.
eq
(
SpmkApprovalTemplate:
:
getApprovalTemplateGId
,
listAtg
.
get
(
i
).
getId
()).
orderByAsc
(
SpmkApprovalTemplate:
:
getId
));
for
(
SpmkApprovalTemplate
spmkApprovalTemplate
:
listAt
)
{
BeanUtil
.
copyProperties
(
spmkApprovalTemplate
,
sca
,
"id"
,
"approval_template_g_id"
,
"update_time"
,
"create_time"
);
sca
.
setOrgCode
(
orgCode
);
sca
.
setApprovalGId
(
listAG
.
get
(
i
).
getId
());
sca
.
setIsAllvisible
(
1
);
sca
.
insert
();
}
}
}
return
true
;
}
}
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
903418a7
...
...
@@ -11,10 +11,12 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Set
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
...
...
@@ -43,6 +45,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
...
...
@@ -76,6 +79,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import
cn.timer.api.dao.yggl.YgglMainLzbMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.yggl.AddygdaDto
;
import
cn.timer.api.dto.yggl.LoginInfoDto
;
import
cn.timer.api.dto.yggl.LoginerChargeDto
;
import
cn.timer.api.dto.yggl.LzbQueryDto
;
import
cn.timer.api.dto.yggl.LzygQueryDto
;
...
...
@@ -142,17 +146,34 @@ public class YgglController {
@GetMapping
(
value
=
"/loginmessage"
)
@ApiOperation
(
value
=
" 获取登录人的相关信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
68
)
public
Result
<
YgglMainEmp
>
loginmessage
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
LoginInfoDto
>
loginmessage
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
orgCode
=
userBean
.
getOrgCode
();
LoginInfoDto
loginInfo
=
LoginInfoDto
.
builder
().
build
();
YgglMainEmp
ygglMainEmp
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getRzTime
,
YgglMainEmp:
:
getEmpNum
)
.
select
(
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getRzTime
,
YgglMainEmp:
:
getZzTime
,
YgglMainEmp:
:
getEmpNum
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
one
();
if
(
ygglMainEmp
!=
null
)
{
Integer
gw
=
ygglMainEmp
.
getBmgwId
();
ZzglBmgwM
bmid
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getUpId
)
ZzglBmgwM
gwObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getUpId
,
ZzglBmgwM:
:
getName
)
.
eq
(
ZzglBmgwM:
:
getId
,
gw
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
ygglMainEmp
.
setUnionid
(
bmid
.
toString
());
return
ResultUtil
.
data
(
ygglMainEmp
,
"部门id返回字段为unionid"
);
ZzglBmgwM
bmObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getId
,
ZzglBmgwM:
:
getName
)
.
eq
(
ZzglBmgwM:
:
getId
,
gwObj
.
getUpId
()).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
loginInfo
.
setEmpNum
(
ygglMainEmp
.
getEmpNum
());
loginInfo
.
setName
(
ygglMainEmp
.
getName
());
loginInfo
.
setBmId
(
bmObj
!=
null
?
bmObj
.
getId
()
:
null
);
loginInfo
.
setBmName
(
bmObj
!=
null
?
bmObj
.
getName
()
:
null
);
loginInfo
.
setGwId
(
gw
);
loginInfo
.
setGwName
(
gwObj
!=
null
?
gwObj
.
getName
()
:
""
);
loginInfo
.
setEntryTime
(
ygglMainEmp
.
getRzTime
());
loginInfo
.
setRegularTime
(
ygglMainEmp
.
getRzTime
());
}
return
ResultUtil
.
data
(
loginInfo
,
"操作成功!"
);
}
/**
...
...
@@ -219,6 +240,7 @@ public class YgglController {
return
one
;
}
/**
* 获取用户头像
*
...
...
@@ -359,9 +381,13 @@ public class YgglController {
.
build
();
ygglMainEmp
.
insert
();
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
set
(
addygdaDto
.
getBmgwId
()
!=
null
,
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"新添加员工档案成功!"
);
}
else
{
...
...
@@ -424,6 +450,7 @@ public class YgglController {
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
ZzglBmgwM
.
getDepts
(
bList
,
b
,
zzglBmgwMs
);
Integer
j
=
ygQueryDto
.
getJobStatus
();
Integer
t
=
ygQueryDto
.
getJobType
();
String
q
=
ygQueryDto
.
getQuery
();
...
...
@@ -438,6 +465,7 @@ public class YgglController {
.
in
(!
bList
.
isEmpty
(),
"bmgw_id"
,
bList
)
.
and
(!
StrUtil
.
hasBlank
(
q
),
wq
->
wq
.
like
(
"name"
,
q
).
or
().
like
(
"phone"
,
q
));
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
IPage
<
YgglMainEmp
>
ygglMainEmpPage
=
YgglMainEmp
.
builder
().
build
().
selectPage
(
page
,
queryWrapper
);
// List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords();
...
...
@@ -767,9 +795,10 @@ public class YgglController {
// 浴池,洗去选填项字节大于100的选项
public
boolean
takeshower
(
String
[]
bathroom
)
{
for
(
String
b
:
bathroom
)
{
if
(
b
.
length
()
>
100
)
{
if
(
b
!=
null
&&
b
.
length
()
>
100
)
{
return
false
;
}
}
return
true
;
}
...
...
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
903418a7
package
cn
.
timer
.
api
.
controller
.
zzgl
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
javax.transaction.Transactional
;
...
...
@@ -21,12 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglLogDgjlMapper
;
import
cn.timer.api.dto.zzgl.LogDgjlsDto
;
...
...
@@ -49,6 +52,9 @@ public class ZzglController {
@Autowired
ZzglLogDgjlMapper
zzglLogDgjlMapper
;
@Autowired
YgglMainEmpMapper
ygglMainEmpMapper
;
/**
* 架构树/架构图/导出
*
...
...
@@ -64,6 +70,15 @@ public class ZzglController {
return
ResultUtil
.
data
(
zzglBmgwMs
);
}
@GetMapping
(
value
=
"/depts"
)
@ApiOperation
(
value
=
"只获取部门"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
ZzglBmgwM
>>
selectdepts
(
@CurrentUser
UserBean
userBean
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
eq
(
ZzglBmgwM:
:
getType
,
0
).
list
();
//0:部门;1:岗位
return
ResultUtil
.
data
(
zzglBmgwMs
);
}
/**
* 岗位成员
*
...
...
@@ -161,6 +176,8 @@ public class ZzglController {
@PostMapping
(
value
=
"/dept"
)
@ApiOperation
(
value
=
"添加/修改部门"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
ZzglBmgwM
>
adddept
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZzglBmgwM
zzglBmgwM
)
{
if
(
zzglBmgwM
.
getName
().
trim
().
length
()==
0
)
return
ResultUtil
.
error
(
"部门岗位名称不能为空"
);
Boolean
a
=
zzglBmgwM
.
getId
()
==
null
;
if
(
a
&&
zzglBmgwM
.
getType
()
==
null
)
zzglBmgwM
.
setType
((
Integer
)
0
);
...
...
@@ -171,6 +188,7 @@ public class ZzglController {
return
ResultUtil
.
success
();
}
/**
* 删除部门岗位
*
...
...
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMService.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
controller
.
zzgl
.
service
;
import
java.util.List
;
/**
* 部门岗位 服务层
*
* @author Tang
*/
public
interface
ZzglBmgwMService
{
public
List
<
Integer
>
empNumupGetDepts
(
Integer
orgCode
,
Integer
empNum
);
}
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMServiceImpl.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
controller
.
zzgl
.
service
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
/**
* 部门岗位 服务逻辑层
*
* @author Tang
*/
@Service
public
class
ZzglBmgwMServiceImpl
implements
ZzglBmgwMService
{
@Autowired
private
ZzglBmgwMMapper
zzglBmgwMMapper
;
@Autowired
private
YgglMainEmpMapper
ygglMainEmpMapper
;
//根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组
@Override
public
List
<
Integer
>
empNumupGetDepts
(
Integer
orgCode
,
Integer
empNum
)
{
Set
<
Integer
>
lanzi
=
new
HashSet
<
Integer
>();
//所有部门岗位
List
<
ZzglBmgwM
>
bmgws
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
//个人岗位
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
Integer
getId
=
one
!=
null
?
one
.
getBmgwId
()
:
null
;
System
.
out
.
println
(
getId
);
Set
<
Integer
>
all
=
one
!=
null
?
empNumupdept2
(
lanzi
,
bmgws
,
getId
)
:
new
HashSet
<
Integer
>();
all
.
add
(
getId
);
return
ListUtil
.
toList
(
all
);
}
//遍历
public
Set
<
Integer
>
empNumupdept2
(
Set
<
Integer
>
lanzi
,
List
<
ZzglBmgwM
>
bmgws
,
Integer
getId
)
{
for
(
ZzglBmgwM
z
:
bmgws
)
{
if
(
getId
.
equals
(
z
.
getId
()))
{
lanzi
.
add
(
getId
);
if
(
z
.
getUpId
()==
null
||
z
.
getUpId
()
==
0
)
{
return
lanzi
;
}
getId
=
z
.
getUpId
();
empNumupdept2
(
lanzi
,
bmgws
,
getId
);
}
}
return
lanzi
;
}
}
src/main/java/cn/timer/api/dao/spmk/SpmkApprovalGMapper.java
View file @
903418a7
...
...
@@ -17,8 +17,10 @@ import cn.timer.api.bean.spmk.SpmkApprovalG;
@Repository
public
interface
SpmkApprovalGMapper
extends
BaseMapper
<
SpmkApprovalG
>
{
List
<
SpmkApprovalG
>
selectListAgInCa
(
@Param
(
"org_code"
)
Integer
org_code
,
@Param
(
"emp_num"
)
Integer
emp_num
);
List
<
SpmkApprovalG
>
selectListAgInCa
(
@Param
(
"org_code"
)
Integer
org_code
,
@Param
(
"emp_num"
)
Integer
emp_num
,
@Param
(
"deptIds"
)
List
<
Integer
>
deptIds
);
boolean
updateListRandsById
(
List
<
SpmkApprovalG
>
list
);
List
<
SpmkApprovalG
>
selectListAgInCaByAdmin
(
@Param
(
"org_code"
)
Integer
org_code
,
@Param
(
"emp_num"
)
Integer
emp_num
,
@Param
(
"deptIds"
)
List
<
Integer
>
deptIds
);
}
src/main/java/cn/timer/api/dto/kqgl/CompensateDto.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
dto
.
kqgl
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
CompensateDto
{
@ApiModelProperty
(
value
=
"加班补偿记录id"
,
example
=
"1"
,
required
=
true
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"加班补偿名称"
,
example
=
"加班费、调休"
)
private
String
value
;
}
src/main/java/cn/timer/api/dto/kqgl/LeaveTypeDto.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
dto
.
kqgl
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
LeaveTypeDto
{
@ApiModelProperty
(
value
=
"假期记录id"
,
example
=
"1"
,
required
=
true
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"假期名称"
,
example
=
"事假、调休..."
)
private
String
value
;
}
src/main/java/cn/timer/api/dto/spmk/MySummaryQueryDto.java
View file @
903418a7
...
...
@@ -35,8 +35,8 @@ public class MySummaryQueryDto extends Page{
private
String
endTime
;
@NotNull
(
message
=
"type为空"
)
@DecimalMax
(
value
=
"2"
,
message
=
"
assoT
ype 只能为 0我发起的 1抄送我的 2我审批的"
)
@DecimalMin
(
value
=
"0"
,
message
=
"
assoT
ype 只能为 0我发起的 1抄送我的 2我审批的"
)
@DecimalMax
(
value
=
"2"
,
message
=
"
t
ype 只能为 0我发起的 1抄送我的 2我审批的"
)
@DecimalMin
(
value
=
"0"
,
message
=
"
t
ype 只能为 0我发起的 1抄送我的 2我审批的"
)
@ApiModelProperty
(
value
=
"0我发起的 1抄送我的 2我审批的"
,
example
=
"0"
)
private
Integer
type
;
...
...
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalTemplateDto.java
View file @
903418a7
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
java.util.Date
;
import
java.util.List
;
import
javax.persistence.Entity
;
import
javax.validation.constraints.DecimalMax
;
import
javax.validation.constraints.DecimalMin
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
cn.hutool.json.JSONObject
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -20,12 +26,15 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@NotNull
(
message
=
"approvalTemplateGId为空"
)
@ApiModelProperty
(
value
=
"审批模板组id 当前用户ID"
,
example
=
"101"
)
private
Integer
approvalTemplateGId
;
@NotBlank
(
message
=
"iconUrl为空"
)
@ApiModelProperty
(
value
=
"审批图标地址 "
,
example
=
"审批图标地址"
)
private
String
iconUrl
;
@NotBlank
(
message
=
"name为空"
)
@ApiModelProperty
(
value
=
"审批名称 "
,
example
=
"审批名称"
)
private
String
name
;
...
...
@@ -38,6 +47,7 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty
(
value
=
"排序 由于区分关键字,命名后缀加s"
,
example
=
"101"
)
private
Integer
ranks
;
@NotBlank
(
message
=
"isOpinion为空 是否必填 意见 0是 1否"
)
@ApiModelProperty
(
value
=
"审批意见 是否必填 意见 0是 1否"
,
example
=
"101"
)
private
Integer
isOpinion
;
...
...
@@ -47,12 +57,17 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"2"
)
@NotNull
(
message
=
"assoType为空"
)
@DecimalMax
(
value
=
"9"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 "
)
@DecimalMin
(
value
=
"0"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 "
)
@ApiModelProperty
(
value
=
"关联类型 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪"
,
example
=
"1"
)
private
Integer
assoType
;
@NotEmpty
(
message
=
"froms为空"
)
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
JSONObject
froms
;
private
List
<
JSONObject
>
froms
;
@NotNull
(
message
=
"router为空"
)
@ApiModelProperty
(
value
=
"审批流程 "
,
example
=
"审批流程"
)
private
Router
router
;
...
...
src/main/java/cn/timer/api/dto/spmk/SpmkApproveSummaryDto.java
View file @
903418a7
...
...
@@ -2,12 +2,10 @@ package cn.timer.api.dto.spmk;
import
java.util.List
;
import
javax.validation.Valid
;
import
javax.validation.constraints.DecimalMax
;
import
javax.validation.constraints.DecimalMin
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
cn.hutool.json.JSONObject
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -38,9 +36,9 @@ public class SpmkApproveSummaryDto{
private
String
initiator
;
@NotNull
(
message
=
"assoType为空"
)
@DecimalMax
(
value
=
"9"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调
薪 4调岗 5加班 6请假 7出差 8外出 9补卡
"
)
@DecimalMin
(
value
=
"0"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调
薪 4调岗 5加班 6请假 7出差 8外出 9补卡
"
)
@ApiModelProperty
(
value
=
"关联类型 0无 1转正 2离职 3调
薪 4调岗 5加班 6请假 7出差 8外出 9补卡 "
,
example
=
"5
"
)
@DecimalMax
(
value
=
"9"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调
岗 4招聘 5加班 6请假 7出差 8外出 9补卡
"
)
@DecimalMin
(
value
=
"0"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调
岗 4招聘 5加班 6请假 7出差 8外出 9补卡
"
)
@ApiModelProperty
(
value
=
"关联类型 0无 1转正 2离职 3调
岗 4招聘 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"1
"
)
private
Integer
assoType
;
@NotNull
(
message
=
"requestData为空"
)
...
...
src/main/java/cn/timer/api/dto/spmk/SpmkCustomApprovalDto.java
View file @
903418a7
...
...
@@ -3,6 +3,12 @@ package cn.timer.api.dto.spmk;
import
java.util.Date
;
import
java.util.List
;
import
javax.validation.constraints.DecimalMax
;
import
javax.validation.constraints.DecimalMin
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.spmk.SpmkInitiatorConfig
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -23,12 +29,15 @@ public class SpmkCustomApprovalDto {
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@NotNull
(
message
=
"approvalGId为空"
)
@ApiModelProperty
(
value
=
"审批组id 当前用户ID"
,
example
=
"101"
)
private
Integer
approvalGId
;
@NotBlank
(
message
=
"iconUrl为空"
)
@ApiModelProperty
(
value
=
"审批图标地址 "
,
example
=
"审批图标地址"
)
private
String
iconUrl
;
@NotBlank
(
message
=
"name为空"
)
@ApiModelProperty
(
value
=
"审批名称 "
,
example
=
"审批名称"
)
private
String
name
;
...
...
@@ -50,15 +59,27 @@ public class SpmkCustomApprovalDto {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"1"
)
@NotNull
(
message
=
"assoType为空"
)
@DecimalMax
(
value
=
"9"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 "
)
@DecimalMin
(
value
=
"0"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 "
)
@ApiModelProperty
(
value
=
"关联类型 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"1"
)
private
Integer
assoType
;
@NotNull
(
message
=
"isAllvisible为空"
)
@DecimalMax
(
value
=
"1"
,
message
=
"isAllvisible 只能为 0部分可见 1所有可见 2禁用"
)
@DecimalMin
(
value
=
"0"
,
message
=
"isAllvisible 只能为 0部分可见 1所有可见 2禁用"
)
@ApiModelProperty
(
value
=
"可见范围 0部分可见 1所有可见 2禁用"
,
example
=
"1"
)
private
Integer
isAllvisible
;
@NotEmpty
(
message
=
"froms为空"
)
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
List
<
JSONObject
>
froms
;
@NotNull
(
message
=
"router为空"
)
@ApiModelProperty
(
value
=
"审批流程 "
,
example
=
"审批流程"
)
private
Router
router
;
@NotNull
(
message
=
"initiatorConfigs为空"
)
@ApiModelProperty
(
value
=
"可见发起人配置 "
,
example
=
"数组类型"
)
private
List
<
SpmkInitiatorConfig
>
initiatorConfigs
;
...
...
src/main/java/cn/timer/api/dto/yggl/LoginInfoDto.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
dto
.
yggl
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
LoginInfoDto
{
@ApiModelProperty
(
value
=
"员工id"
,
example
=
"1"
)
private
Integer
empNum
;
@ApiModelProperty
(
value
=
"员工姓名"
,
example
=
"1"
)
private
String
name
;
@ApiModelProperty
(
value
=
"部门id"
,
example
=
"1"
)
private
Integer
bmId
;
@ApiModelProperty
(
value
=
"部门名称"
,
example
=
"1"
)
private
String
bmName
;
@ApiModelProperty
(
value
=
"岗位id"
,
example
=
"1"
)
private
Integer
gwId
;
@ApiModelProperty
(
value
=
"岗位名称"
,
example
=
"1"
)
private
String
gwName
;
@ApiModelProperty
(
value
=
"入职日期"
,
example
=
"1"
)
private
Date
entryTime
;
@ApiModelProperty
(
value
=
"转正时间"
,
example
=
"1"
)
private
Date
regularTime
;
}
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
903418a7
...
...
@@ -100,7 +100,7 @@ public class RouterUtils {
listUser
.
get
(
i
).
setExecute
(
EXECUTING
);
// 首次发起申请时,写入 审批人名称 至 obj 中
if
(
isFirse
)
{
obj
.
pu
t
(
"current_approver"
,
listUser
.
get
(
i
).
getName
());
obj
.
se
t
(
"current_approver"
,
listUser
.
get
(
i
).
getName
());
}
break
user
;
...
...
@@ -121,8 +121,11 @@ public class RouterUtils {
List
<
Relation
>
listRelations
=
router
.
getRelation
();
for
(
int
i
=
0
;
i
<
listRelations
.
size
();
i
++)
{
// 装配 部门人员
if
(
RELATION_TYPE_DEPARTMENT
.
equals
(
listRelations
.
get
(
i
).
getType
()))
{
List
<
YgglMainEmp
>
listYgglMainEmp
=
selectOtherlistent
(
Integer
.
parseInt
(
obj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
()),
Integer
.
valueOf
(
listRelations
.
get
(
i
).
getDepartmentId
()));
if
(
RELATION_TYPE_DEPARTMENT
.
equals
(
listRelations
.
get
(
i
).
getType
())
&&
listRelations
.
get
(
i
).
getDepartmentId
()
!=
null
)
{
Console
.
log
(
"listRelations-----------"
+
listRelations
);
Console
.
log
(
"obj-----------"
+
obj
);
List
<
YgglMainEmp
>
listYgglMainEmp
=
selectOtherlistent
(
Integer
.
parseInt
(
obj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
().
trim
()),
Integer
.
valueOf
(
listRelations
.
get
(
i
).
getDepartmentId
().
trim
()));
System
.
out
.
println
(
listYgglMainEmp
);
...
...
@@ -196,8 +199,8 @@ public class RouterUtils {
if
(
listCondition
==
null
||
listCondition
.
size
()
==
0
)
{
routerRule
.
setFlow
(
true
);
}
else
{
Compare
compare
;
for
(
Condition
condition
:
listCondition
)
{
Compare
compare
;
for
(
String
string
:
condition
.
getValues
())
{
// 简单工厂模式 - 判断条件
...
...
@@ -547,7 +550,6 @@ public class RouterUtils {
aer2
.
insert
();
for
(
int
i_user2
=
0
,
n_user2
=
listUser
.
size
();
i_user2
<
n_user2
;
i_user2
++)
{
User
u
=
listUser
.
get
(
i_user2
);
SpmkExecutor
executor
=
SpmkExecutor
.
builder
()
.
approveExecuteRecordId
(
aer2
.
getId
())
.
empNum
(
Integer
.
parseInt
(
listUser
.
get
(
i_user2
).
getId
()))
...
...
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 出差-业务
* @author Tang
*
*/
@Builder
public
class
EvectionBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 开始时间
String
startTime
=
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
// 结束时间
String
endTime
=
jsonObj
.
get
(
"__endTime"
,
FromData
.
class
).
getValue
();
// 时长
String
longTime
=
jsonObj
.
get
(
"__longTime"
,
FromData
.
class
).
getValue
();
// 出差事由
String
businessTrip
=
jsonObj
.
get
(
"__businessTrip"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
}
}
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 请假-业务
*
* @author Tang
*
*/
@Builder
public
class
LeaveBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 请假类型
String
LeaveType
=
jsonObj
.
get
(
"__LeaveType"
,
FromData
.
class
).
getValue
();
// 开始时间
String
startTime
=
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
// 结束时间
String
endTime
=
jsonObj
.
get
(
"__endTime"
,
FromData
.
class
).
getValue
();
// 时长
String
longTime
=
jsonObj
.
get
(
"__longTime"
,
FromData
.
class
).
getValue
();
// 请假事由
String
ReasonsForLeave
=
jsonObj
.
get
(
"__ReasonsForLeave"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
}
}
src/main/java/cn/timer/api/utils/router/business/RecruitBusiness.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 招聘-业务
*
* @author Tang
*
*/
@Builder
public
class
RecruitBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 招聘部门
String
RecruitmentDept
=
jsonObj
.
get
(
"__RecruitmentDept"
,
FromData
.
class
).
getValue
();
// 招聘职位
String
RecruitmentPost
=
jsonObj
.
get
(
"__RecruitmentPost"
,
FromData
.
class
).
getValue
();
// 工性性质
String
WorkingNature
=
jsonObj
.
get
(
"__WorkingNature"
,
FromData
.
class
).
getValue
();
// 招聘人数
String
NumberOfRecruiters
=
jsonObj
.
get
(
"__NumberOfRecruiters"
,
FromData
.
class
).
getValue
();
// 已在岗人数
String
NumberOfPeople
=
jsonObj
.
get
(
"NumberOfPeople"
,
FromData
.
class
).
getValue
();
// 招聘原因
String
RecruitmentReasons
=
jsonObj
.
get
(
"RecruitmentReasons"
,
FromData
.
class
).
getValue
();
// 该岗位工作职责
String
operatingDuty
=
jsonObj
.
get
(
"operatingDuty"
,
FromData
.
class
).
getValue
();
// 招聘要求
String
RecruitmentRequirements
=
jsonObj
.
get
(
"RecruitmentRequirements"
,
FromData
.
class
).
getValue
();
// 薪酬上限
String
SalaryCap
=
jsonObj
.
get
(
"SalaryCap"
,
FromData
.
class
).
getValue
();
// 薪酬下限
String
TransferInDepartment
=
jsonObj
.
get
(
"TransferInDepartment"
,
FromData
.
class
).
getValue
();
// 生效日期
String
PayFloor
=
jsonObj
.
get
(
"PayFloor"
,
FromData
.
class
).
getValue
();
// 备注
String
Remarks
=
jsonObj
.
get
(
"Remarks"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 招聘管理 业务
}
}
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 转正-业务
* @author Tang
*
*/
@Builder
public
class
RegularizationBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 申请人名称
String
applicant
=
jsonObj
.
get
(
"__applicant"
,
FromData
.
class
).
getValue
();
// 试用期内主要工作和成绩
String
WorkAndAchievement
=
jsonObj
.
get
(
"WorkAndAchievement"
,
FromData
.
class
).
getValue
();
// 存在问题及改进意见
String
problem
=
jsonObj
.
get
(
"problem"
,
FromData
.
class
).
getValue
();
// 上传文件
String
file
=
jsonObj
.
get
(
"file"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 实际转正时间
String
newConfirmationTime
=
jsonObj
.
get
(
"__newConfirmationTime"
,
FromData
.
class
).
getValue
();
// 备注
String
Remarks
=
jsonObj
.
get
(
"Remarks"
,
FromData
.
class
).
getValue
();
// 调 员工管理 业务
}
}
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 补卡-业务
* @author Tang
*
*/
@Builder
public
class
ReissueACardBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 补卡时间
String
PatchCardTime
=
jsonObj
.
get
(
"__PatchCardTime"
,
FromData
.
class
).
getValue
();
// 缺卡原因
String
cardShortage
=
jsonObj
.
get
(
"cardShortage"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
}
}
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 离职-业务
* @author Tang
*
*/
@Builder
public
class
ResignationBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 申请人
String
applicant
=
jsonObj
.
get
(
"__applicant"
,
FromData
.
class
).
getValue
();
// 计划离职日期
String
terminationDate
=
jsonObj
.
get
(
"__terminationDate"
,
FromData
.
class
).
getValue
();
// 离职原因
String
ReasonForResignation
=
jsonObj
.
get
(
"__ReasonForResignation"
,
FromData
.
class
).
getValue
();
// 备注
String
Remarks
=
jsonObj
.
get
(
"Remarks"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 员工管理 业务
}
}
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusiness.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
lombok.Data
;
/**
* 审批关联业务
* @author Tang
*
*/
@Data
public
abstract
class
SpmkAssoBusiness
{
public
abstract
void
handleApprove
(
JSONObject
jsonObj
);
}
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusinessFactory.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.timer.api.utils.router.enums.ApproveEnum
;
/**
* 审批关联业务工厂类
* @author Tang
*
*/
public
class
SpmkAssoBusinessFactory
{
public
static
SpmkAssoBusiness
createSpmkAssoType
(
ApproveEnum
assotype
)
{
SpmkAssoBusiness
sat
=
null
;
switch
(
assotype
)
{
case
DEFAULT:
break
;
case
REGULARIZATION:
sat
=
RegularizationBusiness
.
builder
().
build
();
break
;
case
RESIGNATION:
sat
=
ResignationBusiness
.
builder
().
build
();
break
;
case
TRANSFER_POSITION:
sat
=
TransferPositionBusiness
.
builder
().
build
();
break
;
case
RECRUIT:
sat
=
RecruitBusiness
.
builder
().
build
();
break
;
case
WORK_OVERTIME:
sat
=
WorkOvertimeBusiness
.
builder
().
build
();
break
;
case
LEAVE:
sat
=
LeaveBusiness
.
builder
().
build
();
break
;
case
EVECTION:
sat
=
EvectionBusiness
.
builder
().
build
();
break
;
case
REISSUE_A_CARD:
sat
=
ReissueACardBusiness
.
builder
().
build
();
break
;
default
:
break
;
}
return
sat
;
}
}
src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 调岗-业务
* @author Tang
*
*/
@Builder
public
class
TransferPositionBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 申请人
String
applicant
=
jsonObj
.
get
(
"__applicant"
,
FromData
.
class
).
getValue
();
// 申请原因
String
ReasonForApplication
=
jsonObj
.
get
(
"__ReasonForApplication"
,
FromData
.
class
).
getValue
();
// 调入部门
String
TransferInDepartment
=
jsonObj
.
get
(
"__TransferInDepartment"
,
FromData
.
class
).
getValue
();
// 调入岗位
String
TransferInPosition
=
jsonObj
.
get
(
"__TransferInPosition"
,
FromData
.
class
).
getValue
();
// 生效日期
String
effectiveDate
=
jsonObj
.
get
(
"__effectiveDate"
,
FromData
.
class
).
getValue
();
// 备注
String
Remarks
=
jsonObj
.
get
(
"Remarks"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 员工管理 业务
}
}
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 加班-业务
* @author Tang
*
*/
@Builder
public
class
WorkOvertimeBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 开始时间
String
startTime
=
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
// 结束时间
String
endTime
=
jsonObj
.
get
(
"__endTime"
,
FromData
.
class
).
getValue
();
// 时长
String
timeLong
=
jsonObj
.
get
(
"__timeLong"
,
FromData
.
class
).
getValue
();
// 加班补偿方式
String
compensate
=
jsonObj
.
get
(
"__compensate"
,
FromData
.
class
).
getValue
();
// 加班原因
String
OvertimeReason
=
jsonObj
.
get
(
"__OvertimeReason"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
}
}
src/main/java/cn/timer/api/utils/router/enums/ApproveEnum.java
0 → 100644
View file @
903418a7
package
cn
.
timer
.
api
.
utils
.
router
.
enums
;
public
enum
ApproveEnum
{
DEFAULT
(
0
,
"默认"
,
1
),
REGULARIZATION
(
1
,
"转正"
,
1
),
RESIGNATION
(
2
,
"离职"
,
1
),
TRANSFER_POSITION
(
3
,
"调岗"
,
1
),
RECRUIT
(
4
,
"招聘"
,
1
),
WORK_OVERTIME
(
5
,
"加班"
,
2
),
LEAVE
(
6
,
"请假"
,
2
),
EVECTION
(
7
,
"出差"
,
2
),
REISSUE_A_CARD
(
8
,
"补卡"
,
2
),
WAGE_ADJUSTMENT
(
9
,
"调薪"
,
3
),;
private
Integer
type
;
private
String
desc
;
private
Integer
businessType
;
ApproveEnum
(
Integer
type
,
String
desc
,
Integer
businessType
)
{
this
.
type
=
type
;
this
.
desc
=
desc
;
this
.
businessType
=
businessType
;
}
public
Integer
getType
()
{
return
this
.
type
;
}
public
static
ApproveEnum
getEnums
(
Integer
type
)
{
for
(
ApproveEnum
approveEnum
:
values
())
{
if
(
approveEnum
.
getType
()
==
type
)
{
return
approveEnum
;
}
}
return
null
;
}
public
String
getDesc
()
{
return
this
.
desc
;
}
public
Integer
getBusinessType
()
{
return
this
.
businessType
;
}
}
src/main/resources/mapping/jxgl/JxglAdminJcszMapper.xml
View file @
903418a7
...
...
@@ -185,7 +185,7 @@
<delete
id=
"delete"
>
<
!-- <
delete id="delete">
DELETE FROM jxgl_admin_jcsz
WHERE id = #{id}
</delete>
...
...
@@ -207,7 +207,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM jxgl_admin_jcsz
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/jxgl/JxglAdminKpzszMapper.xml
View file @
903418a7
...
...
@@ -249,7 +249,7 @@
</trim>
</insert>
<delete
id=
"delete"
>
<
!-- <
delete id="delete" >
DELETE FROM jxgl_admin_kpzsz
WHERE id = #{id}
</delete>
...
...
@@ -302,7 +302,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM jxgl_admin_kpzsz
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/jxgl/JxglAdminZbkMapper.xml
View file @
903418a7
...
...
@@ -186,7 +186,7 @@
</trim>
</insert>
<delete
id=
"delete"
>
<
!-- <
delete id="delete" >
DELETE FROM jxgl_admin_zbk
WHERE id = #{id}
</delete>
...
...
@@ -232,7 +232,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM jxgl_admin_zbk
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/sbgjj/SbgjjAdminCbryMapper.xml
View file @
903418a7
...
...
@@ -308,7 +308,7 @@
</trim>
</insert>
<delete
id=
"delete"
>
<!--
<delete id="delete" >
DELETE FROM sbgjj_admin_cbry
WHERE id = #{id}
</delete>
...
...
@@ -355,7 +355,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM sbgjj_admin_cbry
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/sbgjj/SbgjjAssoCbfaMapper.xml
View file @
903418a7
...
...
@@ -132,7 +132,7 @@
</trim>
</insert>
<delete
id=
"delete"
>
<
!-- <
delete id="delete" >
DELETE FROM sbgjj_asso_cbfa
WHERE id = #{id}
</delete>
...
...
@@ -173,6 +173,6 @@
SELECT count(1)
FROM sbgjj_asso_cbfa
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/sbgjj/SbgjjAssoCbfzmxMapper.xml
View file @
903418a7
...
...
@@ -126,7 +126,7 @@
</foreach>
</insert>
<insert
id=
"insert"
parameterType=
"cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<
!-- <
insert id="insert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx" useGeneratedKeys="true" keyProperty="id">
INSERT INTO sbgjj_asso_cbfzmx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != xz'>
...
...
@@ -288,6 +288,6 @@
SELECT count(1)
FROM sbgjj_asso_cbfzmx
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/sbgjj/SbgjjAssoYjzdMapper.xml
View file @
903418a7
...
...
@@ -236,7 +236,7 @@
</trim>
</insert>
<delete
id=
"delete"
>
<
!-- <
delete id="delete" >
DELETE FROM sbgjj_asso_yjzd
WHERE id = #{id}
</delete>
...
...
@@ -280,7 +280,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM sbgjj_asso_yjzd
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/sbgjj/SbgjjTypeDetailsMapper.xml
View file @
903418a7
...
...
@@ -99,7 +99,7 @@
</select>
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
parameterType=
"cn.timer.api.bean.sbgjj.SbgjjTypeDetails"
>
<
!-- <
insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.sbgjj.SbgjjTypeDetails">
INSERT INTO sbgjj_type_details
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
...
...
@@ -233,7 +233,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM sbgjj_type_details
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/sbgjj/SbgjjYjCsbhMapper.xml
View file @
903418a7
...
...
@@ -28,7 +28,7 @@
</sql>
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
parameterType=
"cn.timer.api.bean.sbgjj.SbgjjYjCsbh"
>
<
!-- <
insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.sbgjj.SbgjjYjCsbh">
INSERT INTO sbgjj_yj_csbh
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != cityCode'>
...
...
@@ -92,7 +92,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM sbgjj_yj_csbh
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/spmk/SpmkApprovalGMapper.xml
View file @
903418a7
...
...
@@ -60,23 +60,55 @@
b.is_opinion SpmkCustomApproval_is_opinion,
b.update_time SpmkCustomApproval_update_time,
b.create_time SpmkCustomApproval_create_time,
b.asso_type SpmkCustomApproval_asso_type
<!-- ,
b.asso_type SpmkCustomApproval_asso_type,
b.is_allvisible SpmkCustomApproval_is_allvisible
<!-- ,
b.froms SpmkCustomApproval_froms,
b.router SpmkCustomApproval_router -->
</sql>
<select
id=
"selectListAgInCa"
resultMap=
"BaseResultMapDto"
>
<select
id=
"selectListAgInCa
ByAdmin
"
resultMap=
"BaseResultMapDto"
>
SELECT
<include
refid=
"Base_Column_List_Alias_a"
/>
,
<include
refid=
"Base_Column_List_Alias_ca"
/>
FROM spmk_approval_g a
LEFT JOIN spmk_custom_approval b
ON a.id = b.approval_g_id
LEFT JOIN spmk_custom_approval b
ON a.id = b.approval_g_id
WHERE a.org_code = #{org_code}
<!-- AND b.id IN (
ORDER BY a.ranks, b.ranks
</select>
<select
id=
"selectListAgInCa"
resultMap=
"BaseResultMapDto"
>
SELECT
<include
refid=
"Base_Column_List_Alias_a"
/>
,
<include
refid=
"Base_Column_List_Alias_ca"
/>
FROM spmk_approval_g a
LEFT JOIN spmk_custom_approval b
ON a.id = b.approval_g_id AND ( b.id IN (
SELECT custom_approval_id FROM spmk_initiator_config WHERE asso_id = #{emp_num} AND type = 1 GROUP BY custom_approval_id
) -->
<if
test=
"deptIds != null and deptIds.size() > 0"
>
UNION
SELECT custom_approval_id FROM spmk_initiator_config WHERE
<choose>
<when
test=
"deptIds.size() > 1"
>
asso_id IN
(
<foreach
item=
"it"
index=
"index"
collection=
"deptIds"
separator=
","
close=
""
>
#{it}
</foreach>
)
</when>
<otherwise>
asso_id = #{deptIds[0]}
</otherwise>
</choose>
AND type IN (2,3) GROUP BY custom_approval_id
</if>
) OR b.is_allvisible = 1)
AND b.is_allvisible
<![CDATA[ <> ]]>
2
WHERE a.org_code = #{org_code}
ORDER BY a.ranks, b.ranks
</select>
...
...
src/main/resources/mapping/spmk/SpmkApprovalTemplateGMapper.xml
View file @
903418a7
...
...
@@ -52,9 +52,9 @@
b.is_opinion SpmkApprovalTemplate_is_opinion,
b.update_time SpmkApprovalTemplate_update_time,
b.create_time SpmkApprovalTemplate_create_time,
b.asso_type SpmkApprovalTemplate_asso_type,
b.asso_type SpmkApprovalTemplate_asso_type
<!--
,
b.froms SpmkApprovalTemplate_froms,
b.router SpmkApprovalTemplate_router
b.router SpmkApprovalTemplate_router
-->
</sql>
<select
id=
"selectListAtInAtg"
resultMap=
"BaseResultMapDto"
>
...
...
src/main/resources/mapping/spmk/SpmkCustomApprovalMapper.xml
View file @
903418a7
...
...
@@ -16,6 +16,7 @@
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"asso_type"
property=
"assoType"
/>
<result
column=
"is_allvisible"
property=
"isAllvisible"
/>
<result
column=
"froms"
property=
"froms"
/>
<result
column=
"router"
property=
"router"
/>
</resultMap>
...
...
@@ -33,6 +34,7 @@
update_time,
create_time,
asso_type,
is_allvisible,
froms,
router
</sql>
...
...
@@ -50,6 +52,7 @@
update_time SpmkCustomApproval_update_time,
create_time SpmkCustomApproval_create_time,
asso_type SpmkCustomApproval_asso_type,
is_allvisible SpmkCustomApproval_is_allvisible,
froms SpmkCustomApproval_froms,
router SpmkCustomApproval_router
</sql>
...
...
@@ -102,6 +105,9 @@
<if test ='null != assoType'>
asso_type,
</if>
<if test ='null != isAllvisible'>
is_allvisible,
</if>
<if test ='null != froms'>
froms,
</if>
...
...
@@ -143,6 +149,9 @@
<if test ='null != assoType'>
#{assoType},
</if>
<if test ='null != isAllvisible'>
#{isAllvisible},
</if>
<if test ='null != froms'>
#{froms},
</if>
...
...
@@ -171,6 +180,7 @@
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != assoType'>asso_type = #{assoType},</if>
<if test ='null != isAllvisible'>is_allvisible = #{isAllvisible},</if>
<if test ='null != froms'>froms = #{froms},</if>
<if test ='null != router'>router = #{router}</if>
</set>
...
...
src/main/resources/mapping/xcgl/XcglAdminXzzMapper.xml
View file @
903418a7
...
...
@@ -66,7 +66,7 @@
and xzs.xzyf = #{xzyf}
</select>
<insert
id=
"insert"
parameterType=
"cn.timer.api.bean.xcgl.XcglAdminXzz"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<
!-- <
insert id="insert" parameterType="cn.timer.api.bean.xcgl.XcglAdminXzz" useGeneratedKeys="true" keyProperty="id">
INSERT INTO xcgl_admin_xzz
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
...
...
@@ -179,7 +179,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_admin_xzz
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoGztszMapper.xml
View file @
903418a7
...
...
@@ -160,7 +160,7 @@
</trim>
</insert>
<delete
id=
"delete"
>
<
!-- <
delete id="delete" >
DELETE FROM xcgl_asso_gztsz
WHERE id = #{id}
</delete>
...
...
@@ -202,7 +202,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_gztsz
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoGztztMapper.xml
View file @
903418a7
...
...
@@ -124,7 +124,7 @@
</insert>
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
parameterType=
"cn.timer.api.bean.xcgl.XcglAssoGztzt"
>
<
!-- <
insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoGztzt">
INSERT INTO xcgl_asso_gztzt
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
...
...
@@ -224,6 +224,6 @@
SELECT count(1)
FROM xcgl_asso_gztzt
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoJsgzzxMapper.xml
View file @
903418a7
...
...
@@ -249,11 +249,6 @@
</trim>
</insert>
<delete
id=
"delete"
>
DELETE FROM xcgl_asso_jsgzzx
WHERE id = #{id}
</delete>
<update
id=
"jsgzzxupdate"
parameterType=
"cn.timer.api.bean.xcgl.XcglAssoJsgzzx"
>
UPDATE xcgl_asso_jsgzzx
<set>
...
...
@@ -274,6 +269,10 @@
WHERE id = #{id}
</update>
<!-- <delete id="delete" >
DELETE FROM xcgl_asso_jsgzzx
WHERE id = #{id}
</delete>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
...
...
@@ -290,7 +289,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_jsgzzx
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoJxgzMapper.xml
View file @
903418a7
...
...
@@ -131,7 +131,7 @@
</trim>
</insert>
<delete
id=
"delete"
>
<!--
<delete id="delete" >
DELETE FROM xcgl_asso_jxgz
WHERE id = #{id}
</delete>
...
...
@@ -165,7 +165,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_jxgz
</select>
</select>
-->
<select
id=
"selectPayrollGroupList"
resultMap=
"PayGroupedDataMap"
>
select jxgz.id as zid,
...
...
src/main/resources/mapping/xcgl/XcglAssoXzbMapper.xml
View file @
903418a7
...
...
@@ -184,10 +184,6 @@
</trim>
</insert>
<delete
id=
"delete"
>
DELETE FROM xcgl_asso_xzb
WHERE id = #{id}
</delete>
<update
id=
"ModifyImportedSalary"
parameterType=
"cn.timer.api.bean.xcgl.XcglAssoXzb"
>
UPDATE xcgl_asso_xzb
...
...
@@ -197,6 +193,11 @@
and xzxid = #{xzxid}
</update>
<!-- <delete id="delete" >
DELETE FROM xcgl_asso_xzb
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzb">
UPDATE xcgl_asso_xzb
<set>
...
...
@@ -225,7 +226,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_xzb
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoXzdadxMapper.xml
View file @
903418a7
...
...
@@ -116,7 +116,7 @@
</trim>
</insert>
<delete
id=
"delete"
>
<
!-- <
delete id="delete" >
DELETE FROM xcgl_asso_xzdadx
WHERE id = #{id}
</delete>
...
...
@@ -152,6 +152,6 @@
SELECT count(1)
FROM xcgl_asso_xzdadx
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoXzdazMapper.xml
View file @
903418a7
...
...
@@ -42,6 +42,13 @@
</insert>
<delete
id=
"Recorddelete"
>
DELETE FROM xcgl_asso_xzdaz
WHERE xzdadxid = #{xzdadxid}
</delete>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzdaz">
INSERT INTO xcgl_asso_xzdaz
<trim prefix="(" suffix=")" suffixOverrides=",">
...
...
@@ -68,10 +75,6 @@
</trim>
</insert>
<delete
id=
"Recorddelete"
>
DELETE FROM xcgl_asso_xzdaz
WHERE xzdadxid = #{xzdadxid}
</delete>
<delete id="delete" >
DELETE FROM xcgl_asso_xzdaz
...
...
@@ -104,7 +107,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_xzdaz
</select>
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
View file @
903418a7
...
...
@@ -137,10 +137,10 @@
</trim>
</insert>
<delete
id=
"delete"
>
<!--
<delete id="delete" >
DELETE FROM xcgl_asso_xzdazdy
WHERE id = #{id}
</delete>
</delete>
-->
<update
id=
"dazdyupdate"
parameterType=
"cn.timer.api.bean.xcgl.XcglAssoXzdazdy"
>
UPDATE xcgl_asso_xzdazdy
...
...
@@ -154,7 +154,7 @@
WHERE id = #{id}
</update>
<!--
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_xzdazdy
...
...
@@ -170,7 +170,7 @@
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_xzdazdy
</select>
</select>
-->
<select
id=
"selectFixedSalaryStaff"
resultMap=
"FixedSalaryStaffMap"
>
select emp.emp_num empnum,
...
...
src/main/resources/mapping/xcgl/XcglAssoXzuryMapper.xml
View file @
903418a7
...
...
@@ -91,7 +91,7 @@
</delete>
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
parameterType=
"cn.timer.api.bean.xcgl.XcglAssoXzury"
>
<
!-- <
insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzury">
INSERT INTO xcgl_asso_xzury
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != xzzid'>
...
...
@@ -149,6 +149,6 @@
SELECT count(1)
FROM xcgl_asso_xzury
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoZxfjkcMapper.xml
View file @
903418a7
...
...
@@ -150,10 +150,10 @@
</trim>
</insert>
<delete
id=
"delete"
>
<
!-- <
delete id="delete" >
DELETE FROM xcgl_asso_zxfjkc
WHERE id = #{id}
</delete>
</delete>
-->
<update
id=
"updateXcglAssoZxfjkc"
parameterType=
"cn.timer.api.bean.xcgl.XcglAssoZxfjkc"
>
UPDATE xcgl_asso_zxfjkc
...
...
@@ -173,7 +173,7 @@
</update>
<select
id=
"load"
resultMap=
"BaseResultMap"
>
<!--
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_zxfjkc
WHERE id = #{id}
...
...
@@ -189,6 +189,6 @@
SELECT count(1)
FROM xcgl_asso_zxfjkc
</select>
-->
</mapper>
\ No newline at end of file
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