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
437addff
Commit
437addff
authored
Apr 21, 2020
by
东州 翁
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of 120.24.24.239:8timerv2/8timerapiv200 into wdz
parents
5edaa44a
3f4f75e7
Show whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
2391 additions
and
304 deletions
+2391
-304
pom.xml
+25
-9
src/main/java/cn/timer/api/bean/quartz/JobAndTrigger.java
+0
-27
src/main/java/cn/timer/api/bean/sche/ScheduleTask.java
+40
-0
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalG.java
+53
-0
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalTemplate.java
+80
-0
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalTemplateG.java
+53
-0
src/main/java/cn/timer/api/bean/spmk/SpmkApproveDetail.java
+60
-0
src/main/java/cn/timer/api/bean/spmk/SpmkApproveExecuteRecord.java
+59
-0
src/main/java/cn/timer/api/bean/spmk/SpmkApproveSummary.java
+83
-0
src/main/java/cn/timer/api/bean/spmk/SpmkCustomApproval.java
+83
-0
src/main/java/cn/timer/api/bean/spmk/SpmkExecutor.java
+66
-0
src/main/java/cn/timer/api/bean/spmk/SpmkInitiatorConfig.java
+55
-0
src/main/java/cn/timer/api/config/interceptor/WebSecurityConfig.java
+1
-0
src/main/java/cn/timer/api/config/quartz/BaseJob.java
+7
-7
src/main/java/cn/timer/api/controller/LoginController.java
+1
-5
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
+21
-14
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
+1
-1
src/main/java/cn/timer/api/controller/oss/OSSController.java
+1
-1
src/main/java/cn/timer/api/controller/quartz/JobController.java
+0
-140
src/main/java/cn/timer/api/controller/spmk/SpmkServiceImpl.java
+346
-47
src/main/java/cn/timer/api/dao/sche/ScheduleTaskMapper.java
+11
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApprovalGMapper.java
+24
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApprovalTemplateGMapper.java
+24
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApprovalTemplateMapper.java
+21
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApproveDetailMapper.java
+17
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApproveExecuteRecordMapper.java
+17
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApproveSummaryMapper.java
+17
-0
src/main/java/cn/timer/api/dao/spmk/SpmkCustomApprovalMapper.java
+21
-0
src/main/java/cn/timer/api/dao/spmk/SpmkExecutorMapper.java
+17
-0
src/main/java/cn/timer/api/dao/spmk/SpmkInitiatorConfigMapper.java
+21
-0
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalGDto.java
+24
-0
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalTemplateDto.java
+59
-0
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalTemplateGDto.java
+27
-0
src/main/java/cn/timer/api/dto/spmk/SpmkApproveDetailDto.java
+42
-0
src/main/java/cn/timer/api/dto/spmk/SpmkApproveSummaryDto.java
+20
-0
src/main/java/cn/timer/api/dto/spmk/SpmkCustomApprovalDto.java
+66
-0
src/main/java/cn/timer/api/utils/Encrypt.java
+6
-6
src/main/java/cn/timer/api/utils/Md5.java
+5
-5
src/main/java/cn/timer/api/utils/RouterUtils.java
+10
-28
src/main/java/cn/timer/api/utils/aliyun/AliyunSMS.java
+1
-1
src/main/java/cn/timer/api/utils/aliyun/OSSUtil.java
+3
-1
src/main/java/cn/timer/api/utils/query/QueryUtil.java
+35
-0
src/main/java/cn/timer/api/utils/schedule/CronUtil.java
+24
-0
src/main/java/cn/timer/api/utils/schedule/RemindUtil.java
+24
-11
src/main/java/cn/timer/api/utils/schedule/TimerUtil.java
+1
-1
src/main/resources/application-dev.yml
+24
-0
src/main/resources/mapping/spmk/SpmkApprovalGMapper.xml
+157
-0
src/main/resources/mapping/spmk/SpmkApprovalTemplateGMapper.xml
+140
-0
src/main/resources/mapping/spmk/SpmkApprovalTemplateMapper.xml
+193
-0
src/main/resources/mapping/spmk/SpmkCustomApprovalMapper.xml
+202
-0
src/main/resources/mapping/spmk/SpmkInitiatorConfigMapper.xml
+103
-0
No files found.
pom.xml
View file @
437addff
...
@@ -11,9 +11,9 @@
...
@@ -11,9 +11,9 @@
</parent>
</parent>
<groupId>
cn.8timer
</groupId>
<groupId>
cn.8timer
</groupId>
<artifactId>
8timerV200
</artifactId>
<artifactId>
8timerV200
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
v0.4-beta
</version>
<name>
8timerV200
</name>
<name>
8timerV200
</name>
<description>
Demo project for Spring Boot
</description>
<description>
8小时人事管家2.0
</description>
<profiles>
<profiles>
<profile>
<profile>
...
@@ -79,6 +79,17 @@
...
@@ -79,6 +79,17 @@
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<scope>
provided
</scope>
</dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency> -->
<!-- 添加MySQL依赖 -->
<!-- 添加MySQL依赖 -->
<dependency>
<dependency>
<groupId>
mysql
</groupId>
<groupId>
mysql
</groupId>
...
@@ -183,17 +194,17 @@
...
@@ -183,17 +194,17 @@
<artifactId>
commons-lang3
</artifactId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
</dependency>
<dependency>
<!-- Apache shiro -->
<!-- <dependency>
<groupId>org.apache.shiro</groupId>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
<version>${shiro.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version>
<version>${shiro.version}</version>
</dependency>
</dependency>
-->
<!-- redis starter -->
<!-- redis starter -->
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId>
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId>
...
@@ -309,16 +320,16 @@
...
@@ -309,16 +320,16 @@
</dependency>
</dependency>
<!--springboot-quartz -->
<!--springboot-quartz -->
<dependency>
<
!-- <
dependency>
<groupId>org.springframework.boot</groupId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
</dependency>
-->
<!--Quartz 使用的连接池 这里Quartz在持久化任务时使用该jar -->
<!--Quartz 使用的连接池 这里Quartz在持久化任务时使用该jar -->
<dependency>
<
!-- <
dependency>
<groupId>com.mchange</groupId>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
<version>0.9.5.2</version>
</dependency>
</dependency>
-->
<!-- pdf -->
<!-- pdf -->
...
@@ -421,6 +432,11 @@
...
@@ -421,6 +432,11 @@
<overwrite>
true
</overwrite>
<overwrite>
true
</overwrite>
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>
pl.project13.maven
</groupId>
<artifactId>
git-commit-id-plugin
</artifactId>
</plugin>
</plugins>
</plugins>
</build>
</build>
...
...
src/main/java/cn/timer/api/bean/quartz/JobAndTrigger.java
deleted
100644 → 0
View file @
5edaa44a
package
cn
.
timer
.
api
.
bean
.
quartz
;
import
java.math.BigInteger
;
import
lombok.Data
;
@Data
public
class
JobAndTrigger
{
private
String
JOB_NAME
;
private
String
JOB_GROUP
;
private
String
JOB_CLASS_NAME
;
private
String
TRIGGER_NAME
;
private
String
TRIGGER_GROUP
;
private
BigInteger
REPEAT_INTERVAL
;
private
BigInteger
TIMES_TRIGGERED
;
private
String
CRON_EXPRESSION
;
private
String
TIME_ZONE_ID
;
}
src/main/java/cn/timer/api/bean/sche/ScheduleTask.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
sche
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table
(
name
=
"schedule_task"
)
@ApiModel
(
value
=
"任务调度表"
)
public
class
ScheduleTask
extends
Model
<
ScheduleTask
>{
private
static
final
long
serialVersionUID
=
9109546668048881081L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
String
cron
;
private
String
className
;
private
String
methodName
;
}
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalG.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2020-04-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approval_g"
)
@ApiModel
(
"审批组"
)
public
class
SpmkApprovalG
extends
Model
<
SpmkApprovalG
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"组名 "
,
example
=
"组名"
)
private
String
name
;
@ApiModelProperty
(
value
=
"排序 排序"
,
example
=
"101"
)
private
Integer
ranks
;
@ApiModelProperty
(
value
=
"是否可编辑 0是 1否"
,
example
=
"101"
)
private
Integer
isEditable
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalTemplate.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
java.util.Date
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2020-04-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approval_template"
)
@ApiModel
(
"员工登录表"
)
public
class
SpmkApprovalTemplate
extends
Model
<
SpmkApprovalTemplate
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"审批模板组id 当前用户ID"
,
example
=
"101"
)
private
Integer
approvalTemplateGId
;
@ApiModelProperty
(
value
=
"审批图标地址 "
,
example
=
"审批图标地址"
)
private
String
iconUrl
;
@ApiModelProperty
(
value
=
"审批名称 "
,
example
=
"审批名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"审批说明 "
,
example
=
"审批说明"
)
private
String
description
;
@ApiModelProperty
(
value
=
"审批开关 0启用 1停用"
,
example
=
"101"
)
private
Integer
isOpen
;
@ApiModelProperty
(
value
=
"排序 由于区分关键字,命名后缀加s"
,
example
=
"101"
)
private
Integer
ranks
;
@ApiModelProperty
(
value
=
"审批意见 是否必填 意见 0是 1否"
,
example
=
"101"
)
private
Integer
isOpinion
;
@ApiModelProperty
(
value
=
"更新时间 "
,
example
=
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"1"
)
private
Integer
assoType
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
byte
[]
froms
;
@ApiModelProperty
(
value
=
"审批流程 "
,
example
=
"审批流程"
)
private
byte
[]
router
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalTemplateG.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
java.util.Date
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2020-04-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approval_template_g"
)
@ApiModel
(
"审批模板组"
)
public
class
SpmkApprovalTemplateG
extends
Model
<
SpmkApprovalTemplateG
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"组名 "
,
example
=
"组名"
)
private
String
name
;
@ApiModelProperty
(
value
=
"排序 排序"
,
example
=
"101"
)
private
Integer
ranks
;
@ApiModelProperty
(
value
=
"编辑时间 "
,
example
=
"编辑时间"
)
private
Date
updateTime
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/spmk/SpmkApproveDetail.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2020-04-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approve_detail"
)
@ApiModel
(
"审批详情"
)
public
class
SpmkApproveDetail
extends
Model
<
SpmkApproveDetail
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"审批汇总id 审批汇总id"
,
example
=
"101"
)
private
Integer
approveSummaryId
;
@ApiModelProperty
(
value
=
"标题 "
,
example
=
"标题"
)
private
String
name
;
@ApiModelProperty
(
value
=
"所在部门名称 "
,
example
=
"所在部门名称"
)
private
String
departmentName
;
@ApiModelProperty
(
value
=
"申请数据 "
,
example
=
"申请数据"
)
private
byte
[]
requestData
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
byte
[]
froms
;
@ApiModelProperty
(
value
=
"审批流程 "
,
example
=
"审批流程"
)
private
byte
[]
router
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/spmk/SpmkApproveExecuteRecord.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
java.util.Date
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2020-04-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approve_execute_record"
)
@ApiModel
(
"审批执行记录"
)
public
class
SpmkApproveExecuteRecord
extends
Model
<
SpmkApproveExecuteRecord
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"审批汇总id 审批汇总id"
,
example
=
"101"
)
private
Integer
approveSummaryId
;
@ApiModelProperty
(
value
=
"名称 "
,
example
=
"发起申请 1抄送人 审批人 连续多级主管"
)
private
String
name
;
@ApiModelProperty
(
value
=
"类型 0发起申请 1抄送人 2审批人 3连续多级主管"
,
example
=
"101"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"状态 0未执行 1审批中 2同意 3拒绝"
,
example
=
"101"
)
private
Integer
sts
;
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/spmk/SpmkApproveSummary.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
java.util.Date
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2020-04-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approve_summary"
)
@ApiModel
(
"审批汇总"
)
public
class
SpmkApproveSummary
extends
Model
<
SpmkApproveSummary
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"审批编号 审批编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"企业组织代码"
,
example
=
"123"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"发起人id 用于搜索(所在部门)"
,
example
=
"101"
)
private
Integer
empNum
;
@ApiModelProperty
(
value
=
"标题 "
,
example
=
"标题"
)
private
String
title
;
@ApiModelProperty
(
value
=
"所在部门名称 "
,
example
=
"所在部门名称"
)
private
String
departmentName
;
@ApiModelProperty
(
value
=
"发起人名称 "
,
example
=
"发起人名称"
)
private
String
initiator
;
@ApiModelProperty
(
value
=
"发起时间 "
,
example
=
"发起时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"审批名称 "
,
example
=
"审批名称"
)
private
String
approveName
;
@ApiModelProperty
(
value
=
"状态 0审批中 1审批撤销 2审批拒绝 3审批通过/审批完成"
,
example
=
"101"
)
private
Integer
sts
;
@ApiModelProperty
(
value
=
"当前审批人 "
,
example
=
"当前审批人"
)
private
String
currentApprover
;
@ApiModelProperty
(
value
=
"历史审批人 "
,
example
=
"历史审批人"
)
private
String
historyApprover
;
@ApiModelProperty
(
value
=
"最近处理时间 "
,
example
=
"最近处理时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"结束时间 "
,
example
=
"结束时间"
)
private
Date
endTime
;
@ApiModelProperty
(
value
=
"摘要 "
,
example
=
"摘要"
)
private
String
digest
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/spmk/SpmkCustomApproval.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
java.util.Date
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2020-04-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_custom_approval"
)
@ApiModel
(
"自定义审批"
)
public
class
SpmkCustomApproval
extends
Model
<
SpmkCustomApproval
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"审批组id 当前用户ID"
,
example
=
"101"
)
private
Integer
approvalGId
;
@ApiModelProperty
(
value
=
"审批图标地址 "
,
example
=
"审批图标地址"
)
private
String
iconUrl
;
@ApiModelProperty
(
value
=
"审批名称 "
,
example
=
"审批名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"审批说明 "
,
example
=
"审批说明"
)
private
String
description
;
@ApiModelProperty
(
value
=
"审批开关 0启用 1停用"
,
example
=
"101"
)
private
Integer
isOpen
;
@ApiModelProperty
(
value
=
"排序 排序"
,
example
=
"101"
)
private
Integer
ranks
;
@ApiModelProperty
(
value
=
"审批意见 是否必填 意见 0是 1否"
,
example
=
"101"
)
private
Integer
isOpinion
;
@ApiModelProperty
(
value
=
"更新时间 "
,
example
=
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"1"
)
private
Integer
assoType
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
byte
[]
froms
;
@ApiModelProperty
(
value
=
"审批流程 "
,
example
=
"审批流程"
)
private
byte
[]
router
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/spmk/SpmkExecutor.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
java.util.Date
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2020-04-17
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_executor"
)
@ApiModel
(
"执行人"
)
public
class
SpmkExecutor
extends
Model
<
SpmkExecutor
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"审批执行记录id 审批执行记录id"
,
example
=
"101"
)
private
Integer
approveExecuteRecordId
;
@ApiModelProperty
(
value
=
"执行人id 执行人id"
,
example
=
"101"
)
private
Integer
empNum
;
@ApiModelProperty
(
value
=
"执行人名称 "
,
example
=
"执行人名称"
)
private
String
executorName
;
@ApiModelProperty
(
value
=
"执行人头像url "
,
example
=
"执行人头像url"
)
private
String
operatorHeaderUrl
;
@ApiModelProperty
(
value
=
"意见 "
,
example
=
"意见"
)
private
String
opinion
;
@ApiModelProperty
(
value
=
"状态 0未执行 1执行中 2同意 3拒接"
,
example
=
"101"
)
private
Integer
sts
;
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/spmk/SpmkInitiatorConfig.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 审批发起人配置
*
* @author Tang 2020-04-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approve_execute_record"
)
@ApiModel
(
"审批执行记录"
)
public
class
SpmkInitiatorConfig
extends
Model
<
SpmkInitiatorConfig
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 编号
*/
@ApiModelProperty
(
value
=
"编号 "
,
example
=
"1"
)
private
Integer
id
;
/**
* 自定义审批id
*/
@ApiModelProperty
(
value
=
"自定义审批id"
,
example
=
"100"
)
private
Integer
customApprovalId
;
/**
* 关联id
*/
@ApiModelProperty
(
value
=
"关联id"
,
example
=
"100"
)
private
Integer
assoId
;
/**
* 类型
*/
@ApiModelProperty
(
value
=
"类型"
,
example
=
"100"
)
private
Integer
type
;
}
\ No newline at end of file
src/main/java/cn/timer/api/config/interceptor/WebSecurityConfig.java
View file @
437addff
...
@@ -35,6 +35,7 @@ public class WebSecurityConfig implements WebMvcConfigurer {
...
@@ -35,6 +35,7 @@ public class WebSecurityConfig implements WebMvcConfigurer {
//.excludePathPatterns("/")
//.excludePathPatterns("/")
registry
.
addInterceptor
(
getSessionInterceptor
())
registry
.
addInterceptor
(
getSessionInterceptor
())
.
addPathPatterns
(
"/**"
)
.
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/actuator/*"
)
.
excludePathPatterns
(
"/doc*"
)
.
excludePathPatterns
(
"/doc*"
)
.
excludePathPatterns
(
"/v2/**"
)
.
excludePathPatterns
(
"/v2/**"
)
.
excludePathPatterns
(
"/**/*.js"
)
.
excludePathPatterns
(
"/**/*.js"
)
...
...
src/main/java/cn/timer/api/config/quartz/BaseJob.java
View file @
437addff
package
cn
.
timer
.
api
.
config
.
quartz
;
package
cn
.
timer
.
api
.
config
.
quartz
;
import
org.quartz.Job
;
//
import org.quartz.Job;
import
org.quartz.JobExecutionContext
;
//
import org.quartz.JobExecutionContext;
import
org.quartz.JobExecutionException
;
//
import org.quartz.JobExecutionException;
//
public
interface
BaseJob
extends
Job
{
//
public interface BaseJob extends Job {
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
;
//
public void execute(JobExecutionContext context) throws JobExecutionException;
}
//
}
src/main/java/cn/timer/api/controller/LoginController.java
View file @
437addff
...
@@ -10,7 +10,6 @@ import javax.servlet.http.HttpSession;
...
@@ -10,7 +10,6 @@ import javax.servlet.http.HttpSession;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.env.Environment
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -40,11 +39,11 @@ import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
...
@@ -40,11 +39,11 @@ import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.login.QysDto
;
import
cn.timer.api.dto.login.QysDto
;
import
cn.timer.api.dto.qyzx.EntRegisterDto
;
import
cn.timer.api.dto.qyzx.EntRegisterDto
;
import
cn.timer.api.utils.AliyunSMS
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.UserIp
;
import
cn.timer.api.utils.UserIp
;
import
cn.timer.api.utils.aliyun.AliyunSMS
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -54,9 +53,6 @@ import io.swagger.annotations.ApiOperation;
...
@@ -54,9 +53,6 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping
(
value
=
"/login"
,
produces
=
{
"application/json"
})
@RequestMapping
(
value
=
"/login"
,
produces
=
{
"application/json"
})
public
class
LoginController
{
public
class
LoginController
{
@Autowired
private
Environment
env
;
@Value
(
"${configtest.patht}"
)
@Value
(
"${configtest.patht}"
)
public
String
port
;
public
String
port
;
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
View file @
437addff
...
@@ -47,6 +47,7 @@ import cn.timer.api.controller.dzht.cn.tign.hz.exception.DefineException;
...
@@ -47,6 +47,7 @@ import cn.timer.api.controller.dzht.cn.tign.hz.exception.DefineException;
import
cn.timer.api.dto.dzht.DzhtRzDto
;
import
cn.timer.api.dto.dzht.DzhtRzDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.query.QueryUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -233,7 +234,20 @@ public class DzhtController {
...
@@ -233,7 +234,20 @@ public class DzhtController {
return
ResultUtil
.
data
(
list
);
return
ResultUtil
.
data
(
list
);
}
}
final
static
String
savePath
=
"esignTemplate"
;
// 本地服务器文件保存路径
public
static
String
savePath
()
{
String
savePath
=
null
;
String
name
=
System
.
getProperty
(
"os.name"
);
if
(
name
.
startsWith
(
"Windows"
))
{
savePath
=
"E:\\esignTemplate"
;
// Windows本地服务器文件保存路径包
}
else
if
(
name
.
startsWith
(
"Linux"
)){
savePath
=
"esignTemplate"
;
// Linux远程服务器文件保存路径包
}
else
{
savePath
=
"esignTemplate"
;
// 其他服务器文件保存路径包
}
return
savePath
;
}
final
static
String
APP_ID
=
ConfigConstant
.
PROJECT_ID
;
// 项目id
final
static
String
APP_ID
=
ConfigConstant
.
PROJECT_ID
;
// 项目id
final
static
String
APP_SECRET
=
ConfigConstant
.
PROJECT_SECRET
;
// 项目密码
final
static
String
APP_SECRET
=
ConfigConstant
.
PROJECT_SECRET
;
// 项目密码
// final static String RE_TOKEN = "8b58973c290cc848b67ff0017cd424ff";
// final static String RE_TOKEN = "8b58973c290cc848b67ff0017cd424ff";
...
@@ -595,7 +609,7 @@ public class DzhtController {
...
@@ -595,7 +609,7 @@ public class DzhtController {
String
filePath
=
null
;
String
filePath
=
null
;
try
{
try
{
filePath
=
FileHelper
.
downLoadFromUrl
(
ossUrl
,
fileName
,
savePath
);
filePath
=
FileHelper
.
downLoadFromUrl
(
ossUrl
,
fileName
,
savePath
()
);
}
catch
(
IOException
e1
)
{
}
catch
(
IOException
e1
)
{
e1
.
printStackTrace
();
e1
.
printStackTrace
();
}
}
...
@@ -678,18 +692,11 @@ public class DzhtController {
...
@@ -678,18 +692,11 @@ public class DzhtController {
}
}
@GetMapping
(
"/queryName"
)
@GetMapping
(
"/queryName"
)
@ApiOperation
(
value
=
"查版本名字"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"查名字"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getName
(
@RequestParam
String
empNum
)
{
public
Result
<
Object
>
getName
(
@RequestParam
(
required
=
false
)
Integer
empNum
)
{
String
a
=
System
.
getProperty
(
"os.name"
);
String
name
=
QueryUtil
.
queryEmpName
(
empNum
);
String
b
=
System
.
getProperty
(
"os.arch"
);
Map
<
String
,
String
>
map
=
QueryUtil
.
queryVersionName
();
String
c
=
System
.
getProperty
(
"os.version"
);
return
ResultUtil
.
datas
(
map
,
name
,
"查询成功"
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"os.name"
,
a
);
map
.
put
(
"os.arch"
,
b
);
map
.
put
(
"os.version"
,
c
);
return
ResultUtil
.
data
(
map
);
// return ResultUtil.data(YgglMainEmp.builder().build()
// .selectOne(new QueryWrapper<YgglMainEmp>().eq("emp_num", empNum)).getName());
}
}
/*************************** 设置请求头 ***************************************/
/*************************** 设置请求头 ***************************************/
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
437addff
...
@@ -724,7 +724,7 @@ public class DzhtController2 {
...
@@ -724,7 +724,7 @@ public class DzhtController2 {
String
filePath
=
null
;
String
filePath
=
null
;
try
{
try
{
filePath
=
FileHelper
.
downLoadFromUrl
(
ossUrl
,
fileName
,
DzhtController
.
savePath
);
filePath
=
FileHelper
.
downLoadFromUrl
(
ossUrl
,
fileName
,
DzhtController
.
savePath
()
);
tpyz
.
setFilePath
(
filePath
);
tpyz
.
setFilePath
(
filePath
);
}
catch
(
IOException
e1
)
{
}
catch
(
IOException
e1
)
{
e1
.
printStackTrace
();
e1
.
printStackTrace
();
...
...
src/main/java/cn/timer/api/controller/oss/OSSController.java
View file @
437addff
...
@@ -14,9 +14,9 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -14,9 +14,9 @@ import org.springframework.web.multipart.MultipartFile;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.utils.OSSUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.aliyun.OSSUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
...
src/main/java/cn/timer/api/controller/quartz/JobController.java
deleted
100644 → 0
View file @
5edaa44a
//package cn.timer.api.controller.quartz;
//
//import java.util.HashMap;
//import java.util.Map;
//
//import org.quartz.CronScheduleBuilder;
//import org.quartz.CronTrigger;
//import org.quartz.JobBuilder;
//import org.quartz.JobDetail;
//import org.quartz.JobKey;
//import org.quartz.Scheduler;
//import org.quartz.SchedulerException;
//import org.quartz.TriggerBuilder;
//import org.quartz.TriggerKey;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.github.pagehelper.PageInfo;
//
//import cn.timer.api.bean.quartz.JobAndTrigger;
//import cn.timer.api.config.quartz.TestJob;
//import cn.timer.api.dao.quartz.JobAndTriggerMapper;
//import cn.timer.api.utils.Result;
//import cn.timer.api.utils.ResultUtil;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//
//@Api(tags = "99.0 Quartz")
//@RestController
//@RequestMapping(value = "/quartz", produces = { "application/json" })
//public class JobController {
//
// @Autowired
// private Scheduler scheduler;
//
// @PostMapping(value = "/addjob")
// @ApiOperation(value = "新增任务", httpMethod = "POST", notes = "接口发布说明")
// public Result<Void> addjob(@RequestParam(value = "jobClassName") String jobClassName,
// @RequestParam(value = "jobGroupName") String jobGroupName,
// @RequestParam(value = "cronExpression") String cronExpression) throws Exception {
// addJob(jobClassName, jobGroupName, cronExpression);
// return ResultUtil.success("新增定时任务成功");
// }
//
// public void addJob(String jobClassName, String jobGroupName, String cronExpression) throws Exception {
//
// // 启动调度器
// scheduler.start();
//
// // 构建job信息
// JobDetail jobDetail = JobBuilder.newJob(TestJob.class)
// .withIdentity(jobClassName, jobGroupName).build();
//
// // 表达式调度构建器(即任务执行的时间)
// CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(cronExpression);
//
// // 按新的cronExpression表达式构建一个新的trigger
// CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(jobClassName, jobGroupName)
// .withSchedule(scheduleBuilder).build();
//
// try {
// scheduler.scheduleJob(jobDetail, trigger);
//
// } catch (SchedulerException e) {
// System.out.println("创建定时任务失败" + e);
// throw new Exception("创建定时任务失败");
// }
// }
//
// @PostMapping(value = "/pausejob")
// @ApiOperation(value = "暂停任务", httpMethod = "POST", notes = "接口发布说明")
// public Result<Void> pausejob(@RequestParam(value = "jobClassName") String jobClassName,
// @RequestParam(value = "jobGroupName") String jobGroupName) throws Exception {
// jobPause(jobClassName, jobGroupName);
// return ResultUtil.success("暂停定时任务成功");
// }
//
// public void jobPause(String jobClassName, String jobGroupName) throws Exception {
// scheduler.pauseJob(JobKey.jobKey(jobClassName, jobGroupName));
// }
//
// @PostMapping(value = "/resumejob")
// @ApiOperation(value = "恢复任务", httpMethod = "POST", notes = "接口发布说明")
// public Result<Void> resumejob(@RequestParam(value = "jobClassName") String jobClassName,
// @RequestParam(value = "jobGroupName") String jobGroupName) throws Exception {
// jobresume(jobClassName, jobGroupName);
// return ResultUtil.success("恢复定时任务成功");
// }
//
// public void jobresume(String jobClassName, String jobGroupName) throws Exception {
// scheduler.resumeJob(JobKey.jobKey(jobClassName, jobGroupName));
// }
//
// @PostMapping(value = "/reschedulejob")
// @ApiOperation(value = "重新设置任务", httpMethod = "POST", notes = "接口发布说明")
// public Result<Void> rescheduleJob(@RequestParam(value = "jobClassName") String jobClassName,
// @RequestParam(value = "jobGroupName") String jobGroupName,
// @RequestParam(value = "cronExpression") String cronExpression) throws Exception {
// jobreschedule(jobClassName, jobGroupName, cronExpression);
// return ResultUtil.success("重设定时任务成功");
// }
//
// public void jobreschedule(String jobClassName, String jobGroupName, String cronExpression) throws Exception {
// try {
// TriggerKey triggerKey = TriggerKey.triggerKey(jobClassName, jobGroupName);
// // 表达式调度构建器
// CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(cronExpression);
//
// CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey);
//
// // 按新的cronExpression表达式重新构建trigger
// trigger = trigger.getTriggerBuilder().withIdentity(triggerKey).withSchedule(scheduleBuilder).build();
//
// // 按新的trigger重新设置job执行
// scheduler.rescheduleJob(triggerKey, trigger);
// } catch (SchedulerException e) {
// System.out.println("更新定时任务失败" + e);
// throw new Exception("更新定时任务失败");
// }
// }
//
// @PostMapping(value = "/deletejob")
// @ApiOperation(value = "删除任务", httpMethod = "POST", notes = "接口发布说明")
// public Result<Void> deletejob(@RequestParam(value = "jobClassName") String jobClassName,
// @RequestParam(value = "jobGroupName") String jobGroupName) throws Exception {
// jobdelete(jobClassName, jobGroupName);
// return ResultUtil.success("删除成功");
// }
//
// public void jobdelete(String jobClassName, String jobGroupName) throws Exception {
// scheduler.pauseTrigger(TriggerKey.triggerKey(jobClassName, jobGroupName));
// scheduler.unscheduleJob(TriggerKey.triggerKey(jobClassName, jobGroupName));
// scheduler.deleteJob(JobKey.jobKey(jobClassName, jobGroupName));
// }
//
//}
src/main/java/cn/timer/api/controller/spmk/SpmkServiceImpl.java
View file @
437addff
...
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -27,8 +28,14 @@ import cn.hutool.core.util.ArrayUtil;
...
@@ -27,8 +28,14 @@ import cn.hutool.core.util.ArrayUtil;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
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.SpmkApproveDetail
;
import
cn.timer.api.bean.spmk.SpmkApproveSummary
;
import
cn.timer.api.bean.spmk.SpmkCustomApproval
;
import
cn.timer.api.bean.spmk.SpmkIcon
;
import
cn.timer.api.bean.spmk.SpmkIcon
;
import
cn.timer.api.bean.spmk.SpmkInitiatorConfig
;
import
cn.timer.api.bean.spmk.SpmkJqgz
;
import
cn.timer.api.bean.spmk.SpmkJqgz
;
import
cn.timer.api.bean.spmk.SpmkLcjd
;
import
cn.timer.api.bean.spmk.SpmkLcjd
;
import
cn.timer.api.bean.spmk.SpmkLcjdEmpAsso
;
import
cn.timer.api.bean.spmk.SpmkLcjdEmpAsso
;
...
@@ -41,11 +48,24 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
...
@@ -41,11 +48,24 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.dao.spmk.SpmkApprovalGMapper
;
import
cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper
;
import
cn.timer.api.dao.spmk.SpmkApprovalTemplateMapper
;
import
cn.timer.api.dao.spmk.SpmkApproveDetailMapper
;
import
cn.timer.api.dao.spmk.SpmkApproveExecuteRecordMapper
;
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.spmk.SpmkSpglMapper
;
import
cn.timer.api.dao.spmk.SpmkSpglMapper
;
import
cn.timer.api.dao.spmk.SpmkSpzMapper
;
import
cn.timer.api.dao.spmk.SpmkSpzMapper
;
import
cn.timer.api.dto.spmk.SpmkMbKjDto
;
import
cn.timer.api.dto.spmk.Router
;
import
cn.timer.api.dto.spmk.Router
;
import
cn.timer.api.dto.spmk.Spmk
;
import
cn.timer.api.dto.spmk.Spmk
;
import
cn.timer.api.dto.spmk.SpmkApprovalTemplateDto
;
import
cn.timer.api.dto.spmk.SpmkApproveDetailDto
;
import
cn.timer.api.dto.spmk.SpmkApproveSummaryDto
;
import
cn.timer.api.dto.spmk.SpmkCustomApprovalDto
;
import
cn.timer.api.dto.spmk.SpmkMbKjDto
;
import
cn.timer.api.dto.spmk.SpmkSpglDto
;
import
cn.timer.api.dto.spmk.SpmkSpglDto
;
import
cn.timer.api.dto.spmk.SpmkSpglMoveDto
;
import
cn.timer.api.dto.spmk.SpmkSpglMoveDto
;
import
cn.timer.api.dto.spmk.SpmkSpglSortDto
;
import
cn.timer.api.dto.spmk.SpmkSpglSortDto
;
...
@@ -69,12 +89,6 @@ public class SpmkServiceImpl {
...
@@ -69,12 +89,6 @@ public class SpmkServiceImpl {
private
SpmkSpglMapper
spmkSpglMapper
;
private
SpmkSpglMapper
spmkSpglMapper
;
@Autowired
@Autowired
private
SpmkSpzMapper
spmkSpzMapper
;
private
SpmkSpzMapper
spmkSpzMapper
;
// @Autowired
// private SpmkLcjdMapper spmkLcjdMapper;
// @Autowired
// private SpmkSxpzMapper spmkSxpzMapper;
// @Autowired
// private SpmkLcjdEmpAssoMapper spmkLcjdEmpAssoMapper;
/**
/**
* 审批组-列表
* 审批组-列表
...
@@ -415,83 +429,368 @@ public class SpmkServiceImpl {
...
@@ -415,83 +429,368 @@ public class SpmkServiceImpl {
/**
/**
* 流程节点解析
* 流程节点解析
*/
*/
@PostMapping
(
value
=
"/jsonparse"
)
// @PostMapping(value = "/jsonparse")
@ApiOperation
(
value
=
"流程节点解析"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析"
)
// @ApiOperation(value = "流程节点解析", httpMethod = "POST", notes = "流程节点解析")
// @ApiOperationSupport(order = 1)
// public Result<Object> jsonToObj(@RequestBody Object jsonObj){
//
// JSONObject obj = JSONUtil.parseObj(jsonObj, false, true);
//
// Router Router = obj.get("router", Router.class);
//
// Console.log("obj:" + obj.toStringPretty());
// Console.log("Router:" + Router.toPrettyString());
// Console.log("Router:" + Router.toJSONString());
//
// return ResultUtil.success("解析成功!");
// }
/**
* 部门id 查询 员工
*/
@PostMapping
(
value
=
"/deptSelectEmp"
)
@ApiOperation
(
value
=
"部门id 查询 员工"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus"
)
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
jsonToObj
(
@RequestBody
Object
jsonObj
){
public
Result
<
Object
>
selectEmpBydept
(
@RequestParam
Integer
id
){
List
<
YgglMainEmp
>
ygglMainEmp
=
RouterUtils
.
selectOtherlistent
(
4
,
id
);
return
ResultUtil
.
data
(
ygglMainEmp
,
"解析成功!"
);
}
JSONObject
obj
=
JSONUtil
.
parseObj
(
jsonObj
,
false
,
true
);
/**
* 流程节点解析123
*/
@PostMapping
(
value
=
"/jsonparse_plus_plus"
)
@ApiOperation
(
value
=
"jsonparse_plus_plus"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
jsonToObj123
(
@CurrentUser
UserBean
userBean
,
@RequestBody
Spmk
spmk
){
Router
Router
=
obj
.
get
(
"router"
,
Router
.
class
);
List
<
Router
>
listRouter
=
new
ArrayList
<
Router
>();
listRouter
.
add
(
spmk
.
getRouter
());
Console
.
log
(
"obj:"
+
obj
.
toStringPretty
());
JSONObject
jSONObject
=
spmk
.
getData
();
Console
.
log
(
"Router:"
+
Router
.
toPrettyString
());
jSONObject
.
put
(
"orgCode"
,
userBean
.
getOrgCode
());
Console
.
log
(
"Router:"
+
Router
.
toJSONString
());
return
ResultUtil
.
success
(
"解析成功!"
);
return
ResultUtil
.
data
(
RouterUtils
.
NextNode
(
listRouter
,
jSONObject
),
"解析成功!"
);
}
}
@Autowired
private
SpmkApprovalTemplateGMapper
spmkApprovalTemplateGMapper
;
@Autowired
private
SpmkApprovalTemplateMapper
spmkApprovalTemplateMapper
;
@Autowired
private
SpmkApprovalGMapper
spmkApprovalGMapper
;
@Autowired
private
SpmkCustomApprovalMapper
spmkCustomApprovalMapper
;
//TODO 审批模板组
/**
/**
*
流程节点解析
*
新增或编辑-审批模板组
*/
*/
@PostMapping
(
value
=
"/
jsonparse_plus
"
)
@PostMapping
(
value
=
"/
save_approval_template_g
"
)
@ApiOperation
(
value
=
"
流程节点解析_plus"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus
"
)
@ApiOperation
(
value
=
"
新增或编辑-审批模板组"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-审批模板组
"
)
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
jsonToObj2
(
@RequestBody
Router
jsonObj
){
public
Result
<
Object
>
saveAtg
(
@RequestBody
SpmkApprovalTemplateG
spmkApprovalTemplateG
){
Console
.
log
(
"jsonObj:"
+
jsonObj
);
return
spmkApprovalTemplateG
.
insertOrUpdate
()
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!"
);
Console
.
log
(
"jsonObj:"
+
jsonObj
.
getChildren
());
return
ResultUtil
.
data
(
jsonObj
,
"解析成功!"
);
}
}
/**
/**
*
流程节点解析
*
删除-审批模板组
*/
*/
@
PostMapping
(
value
=
"/jsonparse_plusx
"
)
@
DeleteMapping
(
value
=
"/delete_approval_template_g/{id}
"
)
@ApiOperation
(
value
=
"
流程节点解析_plus"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus
"
)
@ApiOperation
(
value
=
"
删除-审批模板组"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-审批模板组
"
)
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
jsonToObj3
(
@RequestBody
Object
jsonObj
){
public
Result
<
Object
>
deleteAtgById
(
@PathVariable
int
id
){
JSONObject
obj
=
JSONUtil
.
parseObj
(
jsonObj
,
false
,
true
);
return
SpmkApprovalTemplateG
.
builder
().
id
(
id
).
build
().
deleteById
()
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"没有找到该对象"
);
obj
.
put
(
"orgCode"
,
4
);
Console
.
log
(
"jsonObj:"
+
obj
.
get
(
"name"
));
Console
.
log
(
"jsonObj:"
+
obj
.
get
(
"id"
));
Console
.
log
(
"jsonObj:"
+
obj
.
get
(
"aaa"
));
return
ResultUtil
.
data
(
jsonObj
,
"解析成功!"
);
}
}
/**
/**
*
部门id 查询 员工
*
查询列表-审批模板组
*/
*/
@
PostMapping
(
value
=
"/deptSelectEmp
"
)
@
GetMapping
(
value
=
"/list_approval_template_g
"
)
@ApiOperation
(
value
=
"
部门id 查询 员工"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus
"
)
@ApiOperation
(
value
=
"
查询列表-审批模板组"
,
httpMethod
=
"GET"
,
notes
=
"查询列表-审批模板组
"
)
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
select
EmpBydept
(
@RequestParam
Integer
id
){
public
Result
<
Object
>
select
ListAtg
(
){
List
<
YgglMainEmp
>
ygglMainEmp
=
RouterUtils
.
selectOtherlistent
(
4
,
id
);
return
ResultUtil
.
data
(
ygglMainEmp
,
"解析
成功!"
);
return
ResultUtil
.
data
(
spmkApprovalTemplateGMapper
.
selectListAtInAtg
(),
"操作
成功!"
);
}
}
/**
* 排序-审批模板组
*/
@PutMapping
(
value
=
"/update_approval_template_g"
)
@ApiOperation
(
value
=
"排序-审批模板组"
,
httpMethod
=
"PUT"
,
notes
=
"排序-审批模板组"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
ranksAtg
(
@RequestBody
List
<
SpmkApprovalTemplateG
>
list
){
return
spmkApprovalTemplateGMapper
.
updateListRandsById
(
list
)
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!"
);
}
//TODO 审批模板
/**
* 新增或编辑-审批模板
*/
@PostMapping
(
value
=
"/save_approval_template"
)
@ApiOperation
(
value
=
"新增或编辑-审批模板"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-审批模板"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
saveAt
(
@RequestBody
SpmkApprovalTemplateDto
spmkApprovalTemplateDto
){
Integer
approvalTemplateGId
=
spmkApprovalTemplateDto
.
getApprovalTemplateGId
();
if
(
ObjectUtil
.
isNull
(
approvalTemplateGId
))
return
ResultUtil
.
error
(
"操作失败!-1"
);
SpmkApprovalTemplate
at
=
SpmkApprovalTemplate
.
builder
().
build
();
BeanUtil
.
copyProperties
(
spmkApprovalTemplateDto
,
at
,
"froms"
,
"router"
);
at
.
setFroms
(
ObjectUtil
.
serialize
(
spmkApprovalTemplateDto
.
getFroms
()));
at
.
setRouter
(
ObjectUtil
.
serialize
(
spmkApprovalTemplateDto
.
getRouter
()));
return
at
.
insertOrUpdate
()
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!-2"
);
}
/**
/**
*
流程节点解析123
*
删除-审批模板
*/
*/
@
PostMapping
(
value
=
"/jsonparse_plus_plus
"
)
@
DeleteMapping
(
value
=
"/delete_approval_template/{id}
"
)
@ApiOperation
(
value
=
"
流程节点解析_plus"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus
"
)
@ApiOperation
(
value
=
"
删除-审批模板"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-审批模板
"
)
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
jsonToObj123
(
@RequestBody
Spmk
spmk
){
public
Result
<
Object
>
deleteAtById
(
@PathVariable
int
id
){
List
<
Router
>
listRouter
=
new
ArrayList
<
Router
>();
return
SpmkApprovalTemplate
.
builder
().
id
(
id
).
build
().
deleteById
()
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"没有找到该对象"
);
listRouter
.
add
(
spmk
.
getRouter
());
}
/**
* id查询-审批模板
*/
@GetMapping
(
value
=
"/select_approval_template"
)
@ApiOperation
(
value
=
"id查询-审批模板"
,
httpMethod
=
"GET"
,
notes
=
"id查询-审批模板"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
selectAtById
(
@PathVariable
int
id
){
return
ResultUtil
.
data
(
SpmkApprovalTemplate
.
builder
().
id
(
id
).
build
().
selectById
(),
"操作成功!"
);
}
/**
* 排序-审批模板
*/
@PutMapping
(
value
=
"/update_approval_template"
)
@ApiOperation
(
value
=
"查询列表-审批模板组"
,
httpMethod
=
"PUT"
,
notes
=
"查询列表-审批模板组"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
ranksAt
(
@RequestBody
List
<
SpmkApprovalTemplate
>
list
){
return
spmkApprovalTemplateMapper
.
updateListRandsById
(
list
)
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!"
);
}
//TODO 审批组
/**
* 新增或编辑-审批组
*/
@PostMapping
(
value
=
"/save_approval_g"
)
@ApiOperation
(
value
=
"新增或编辑-审批组"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-审批组"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
saveAg
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SpmkApprovalG
spmkApprovalG
){
spmkApprovalG
.
setOrgCode
(
userBean
.
getOrgCode
());
return
spmkApprovalG
.
insertOrUpdate
()
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!"
);
}
/**
* 删除-审批组
*/
@DeleteMapping
(
value
=
"/delete_approval_g/{id}"
)
@ApiOperation
(
value
=
"删除-审批组"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-审批组"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
deleteAgById
(
@PathVariable
int
id
){
return
SpmkApprovalG
.
builder
().
id
(
id
).
build
().
deleteById
()
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"没有找到该对象"
);
}
/**
* 查询列表-审批组
*/
@GetMapping
(
value
=
"/list_approval_g"
)
@ApiOperation
(
value
=
"查询列表-审批组"
,
httpMethod
=
"GET"
,
notes
=
"查询列表-审批组"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
selectListAg
(
@CurrentUser
UserBean
userBean
){
return
ResultUtil
.
data
(
spmkApprovalGMapper
.
selectListAgInCa
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
()),
"操作成功!"
);
}
/**
* 排序-审批组
*/
@PutMapping
(
value
=
"/update_approval_g"
)
@ApiOperation
(
value
=
"排序-审批组"
,
httpMethod
=
"PUT"
,
notes
=
"排序-审批组"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
ranksAg
(
@RequestBody
List
<
SpmkApprovalG
>
list
){
return
ResultUtil
.
data
(
RouterUtils
.
NextNode
(
listRouter
,
spmk
.
getData
()),
"解析成功
!"
);
return
spmkApprovalGMapper
.
updateListRandsById
(
list
)
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败
!"
);
}
}
//TODO 自定义审批
/**
* 新增或编辑-自定义审批
*/
@PostMapping
(
value
=
"/save_custom_approval"
)
@ApiOperation
(
value
=
"新增或编辑-自定义审批"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-自定义审批"
)
@ApiOperationSupport
(
order
=
1
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
<
Object
>
saveCa
(
@RequestBody
SpmkCustomApprovalDto
spmkCustomApprovalDto
)
throws
Exception
{
Integer
approvalGId
=
spmkCustomApprovalDto
.
getApprovalGId
();
if
(
ObjectUtil
.
isNull
(
approvalGId
))
return
ResultUtil
.
error
(
"操作失败!-1"
);
SpmkCustomApproval
ca
=
SpmkCustomApproval
.
builder
().
build
();
BeanUtil
.
copyProperties
(
spmkCustomApprovalDto
,
ca
,
"froms"
,
"router"
,
"initiatorConfigs"
);
ca
.
setFroms
(
ObjectUtil
.
serialize
(
spmkCustomApprovalDto
.
getFroms
()));
ca
.
setRouter
(
ObjectUtil
.
serialize
(
spmkCustomApprovalDto
.
getRouter
()));
if
(!
ca
.
insertOrUpdate
())
return
ResultUtil
.
error
(
"操作失败!-2"
);
Integer
id
=
ca
.
getId
();
Console
.
log
(
"自定义审批id: "
+
id
);
List
<
SpmkInitiatorConfig
>
listIc
=
spmkCustomApprovalDto
.
getInitiatorConfigs
();
for
(
int
i
=
0
,
n
=
listIc
.
size
();
i
<
n
;
i
++)
{
listIc
.
get
(
i
).
setCustomApprovalId
(
id
);
}
//
/**
* 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class))
* 1.删除 历史的 SpmkInitiatorConfig-审批发起人配置,
* 2.新增 最新的 SpmkInitiatorConfig-审批发起人配置,
* 3.新增 SpmkCustomApproval-自定义审批
*/
if
(!
SpmkInitiatorConfig
.
builder
().
build
().
delete
(
new
QueryWrapper
<
SpmkInitiatorConfig
>().
lambda
().
eq
(
SpmkInitiatorConfig:
:
getCustomApprovalId
,
id
))
||
!
spmkInitiatorConfigMapper
.
insertList
(
listIc
))
{
// 手动抛出异常,事务回滚
throw
new
Exception
();
}
return
ResultUtil
.
success
(
"操作成功!"
);
}
/**
* 删除-自定义审批
*/
@DeleteMapping
(
value
=
"/delete_custom_approval/{id}"
)
@ApiOperation
(
value
=
"删除-自定义审批"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-自定义审批"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
deleteCaById
(
@PathVariable
int
id
){
return
SpmkCustomApproval
.
builder
().
id
(
id
).
build
().
deleteById
()
&&
SpmkInitiatorConfig
.
builder
().
build
().
delete
(
new
QueryWrapper
<
SpmkInitiatorConfig
>().
lambda
().
eq
(
SpmkInitiatorConfig:
:
getCustomApprovalId
,
id
))
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"没有找到该对象"
);
}
/**
* id查询-自定义审批
*/
@GetMapping
(
value
=
"/select_custom_approval"
)
@ApiOperation
(
value
=
"id查询-审批模板"
,
httpMethod
=
"GET"
,
notes
=
"id查询-审批模板"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
selectCaById
(
@PathVariable
int
id
){
return
ResultUtil
.
data
(
SpmkCustomApproval
.
builder
().
id
(
id
).
build
().
selectById
(),
"操作成功!"
);
}
/**
* 排序-自定义审批
*/
@PutMapping
(
value
=
"/update_custom_approval"
)
@ApiOperation
(
value
=
"排序-自定义审批"
,
httpMethod
=
"PUT"
,
notes
=
"排序-自定义审批"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
ranksCa
(
@RequestBody
List
<
SpmkCustomApproval
>
list
){
return
spmkCustomApprovalMapper
.
updateListRandsById
(
list
)
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!"
);
}
@Autowired
private
SpmkApproveSummaryMapper
spmkApproveSummaryMapper
;
@Autowired
private
SpmkApproveDetailMapper
spmkApproveDetailMapper
;
@Autowired
private
SpmkApproveExecuteRecordMapper
spmkApproveExecuteRecordMapper
;
@Autowired
private
SpmkExecutorMapper
spmkExecutorMapper
;
@Autowired
private
SpmkInitiatorConfigMapper
spmkInitiatorConfigMapper
;
// TODO 审批汇总(发起审批)
/**
* 发起审批
*/
@PostMapping
(
value
=
"/start_approval"
)
@ApiOperation
(
value
=
"新增或编辑-自定义审批"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-自定义审批"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
saveCa
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SpmkApproveSummaryDto
spmkApproveSummaryDto
){
SpmkApproveSummary
as
=
spmkApproveSummaryDto
.
getSpmkApproveSummary
();
as
.
setOrgCode
(
userBean
.
getOrgCode
());
// 待补充
SpmkApproveDetailDto
adD
=
spmkApproveSummaryDto
.
getSpmkApproveDetailDto
();
List
<
Router
>
listRouter
=
new
ArrayList
<
Router
>();
listRouter
.
add
(
spmkApproveSummaryDto
.
getSpmkApproveDetailDto
().
getRouter
());
JSONObject
jSONObject
=
spmkApproveSummaryDto
.
getSpmkApproveDetailDto
()
.
getRequestData
()
.
put
(
"orgCode"
,
userBean
.
getOrgCode
());
SpmkApproveDetail
ad
=
SpmkApproveDetail
.
builder
().
build
();
BeanUtil
.
copyProperties
(
adD
,
ad
,
"requestData"
,
"froms"
,
"router"
);
ad
.
setRequestData
(
ObjectUtil
.
serialize
(
adD
.
getRequestData
()));
ad
.
setFroms
(
ObjectUtil
.
serialize
(
adD
.
getFroms
()));
ad
.
setRouter
(
ObjectUtil
.
serialize
(
adD
.
getRouter
()));
// Integer approvalGId = spmkCustomApproval.getApprovalGId();
//
// if (approvalGId == null || approvalGId.equals("")) {
// return ResultUtil.error("操作失败!-1");
// }
return
null
;
// return spmkCustomApproval.insertOrUpdate() ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!-2");
}
...
...
src/main/java/cn/timer/api/dao/sche/ScheduleTaskMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
sche
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.sche.ScheduleTask
;
@Repository
public
interface
ScheduleTaskMapper
extends
BaseMapper
<
ScheduleTask
>{
}
src/main/java/cn/timer/api/dao/spmk/SpmkApprovalGMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.spmk.SpmkApprovalG
;
/**
* 审批组
*
* @author Tang 2020-04-17
*/
@Repository
public
interface
SpmkApprovalGMapper
extends
BaseMapper
<
SpmkApprovalG
>
{
List
<
SpmkApprovalG
>
selectListAgInCa
(
@Param
(
"org_code"
)
Integer
org_code
,
@Param
(
"emp_num"
)
Integer
emp_num
);
boolean
updateListRandsById
(
List
<
SpmkApprovalG
>
list
);
}
src/main/java/cn/timer/api/dao/spmk/SpmkApprovalTemplateGMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
java.util.List
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplateG
;
import
cn.timer.api.dto.spmk.SpmkApprovalTemplateGDto
;
/**
* 审批模板组
*
* @author Tang 2020-04-17
*/
@Repository
public
interface
SpmkApprovalTemplateGMapper
extends
BaseMapper
<
SpmkApprovalTemplateG
>
{
SpmkApprovalTemplateGDto
selectListAtInAtg
();
boolean
updateListRandsById
(
List
<
SpmkApprovalTemplateG
>
list
);
}
src/main/java/cn/timer/api/dao/spmk/SpmkApprovalTemplateMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
java.util.List
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplate
;
/**
* 员工登录表
*
* @author Tang 2020-04-17
*/
@Repository
public
interface
SpmkApprovalTemplateMapper
extends
BaseMapper
<
SpmkApprovalTemplate
>
{
boolean
updateListRandsById
(
List
<
SpmkApprovalTemplate
>
list
);
}
src/main/java/cn/timer/api/dao/spmk/SpmkApproveDetailMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.spmk.SpmkApproveDetail
;
/**
* 审批详情
*
* @author Tang 2020-04-17
*/
@Repository
public
interface
SpmkApproveDetailMapper
extends
BaseMapper
<
SpmkApproveDetail
>
{
}
src/main/java/cn/timer/api/dao/spmk/SpmkApproveExecuteRecordMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.spmk.SpmkApproveExecuteRecord
;
/**
* 审批执行记录
*
* @author Tang 2020-04-17
*/
@Repository
public
interface
SpmkApproveExecuteRecordMapper
extends
BaseMapper
<
SpmkApproveExecuteRecord
>
{
}
src/main/java/cn/timer/api/dao/spmk/SpmkApproveSummaryMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.spmk.SpmkApproveSummary
;
/**
* 审批汇总
*
* @author Tang 2020-04-17
*/
@Repository
public
interface
SpmkApproveSummaryMapper
extends
BaseMapper
<
SpmkApproveSummary
>
{
}
src/main/java/cn/timer/api/dao/spmk/SpmkCustomApprovalMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
java.util.List
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.spmk.SpmkCustomApproval
;
/**
* 自定义审批
*
* @author Tang 2020-04-17
*/
@Repository
public
interface
SpmkCustomApprovalMapper
extends
BaseMapper
<
SpmkCustomApproval
>
{
boolean
updateListRandsById
(
List
<
SpmkCustomApproval
>
list
);
}
src/main/java/cn/timer/api/dao/spmk/SpmkExecutorMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.spmk.SpmkExecutor
;
/**
* 执行人
*
* @author Tang 2020-04-17
*/
@Repository
public
interface
SpmkExecutorMapper
extends
BaseMapper
<
SpmkExecutor
>
{
}
src/main/java/cn/timer/api/dao/spmk/SpmkInitiatorConfigMapper.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
java.util.List
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.spmk.SpmkInitiatorConfig
;
/**
* 审批发起人配置
*
* @author Tang 2020-04-17
*/
@Repository
public
interface
SpmkInitiatorConfigMapper
extends
BaseMapper
<
SpmkInitiatorConfig
>
{
boolean
insertList
(
List
<
SpmkInitiatorConfig
>
listIc
);
}
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalGDto.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
java.util.List
;
import
javax.persistence.Entity
;
import
cn.timer.api.bean.spmk.SpmkApprovalG
;
import
cn.timer.api.bean.spmk.SpmkCustomApproval
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
SpmkApprovalGDto
extends
SpmkApprovalG
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
private
List
<
SpmkCustomApproval
>
spmkCustomApprovals
;
}
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalTemplateDto.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
java.util.Date
;
import
javax.persistence.Entity
;
import
cn.hutool.json.JSONObject
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
SpmkApprovalTemplateDto
{
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"审批模板组id 当前用户ID"
,
example
=
"101"
)
private
Integer
approvalTemplateGId
;
@ApiModelProperty
(
value
=
"审批图标地址 "
,
example
=
"审批图标地址"
)
private
String
iconUrl
;
@ApiModelProperty
(
value
=
"审批名称 "
,
example
=
"审批名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"审批说明 "
,
example
=
"审批说明"
)
private
String
description
;
@ApiModelProperty
(
value
=
"审批开关 0启用 1停用"
,
example
=
"101"
)
private
Integer
isOpen
;
@ApiModelProperty
(
value
=
"排序 由于区分关键字,命名后缀加s"
,
example
=
"101"
)
private
Integer
ranks
;
@ApiModelProperty
(
value
=
"审批意见 是否必填 意见 0是 1否"
,
example
=
"101"
)
private
Integer
isOpinion
;
@ApiModelProperty
(
value
=
"更新时间 "
,
example
=
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"2"
)
private
Integer
assoType
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
JSONObject
froms
;
@ApiModelProperty
(
value
=
"审批流程 "
,
example
=
"审批流程"
)
private
Router
router
;
}
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalTemplateGDto.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
java.util.List
;
import
javax.persistence.Entity
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplate
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplateG
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
SpmkApprovalTemplateGDto
extends
SpmkApprovalTemplateG
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
private
List
<
SpmkApprovalTemplate
>
spmkApprovalTemplates
;
}
src/main/java/cn/timer/api/dto/spmk/SpmkApproveDetailDto.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
javax.persistence.Entity
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.spmk.SpmkApproveDetail
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
SpmkApproveDetailDto
{
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"审批汇总id 审批汇总id"
,
example
=
"101"
)
private
Integer
approveSummaryId
;
@ApiModelProperty
(
value
=
"标题 "
,
example
=
"标题"
)
private
String
name
;
@ApiModelProperty
(
value
=
"所在部门名称 "
,
example
=
"所在部门名称"
)
private
String
departmentName
;
@ApiModelProperty
(
value
=
"申请数据 "
,
example
=
"申请数据"
)
private
JSONObject
requestData
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
JSONObject
froms
;
@ApiModelProperty
(
value
=
"审批流程 "
,
example
=
"审批流程"
)
private
Router
router
;
}
src/main/java/cn/timer/api/dto/spmk/SpmkApproveSummaryDto.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
cn.timer.api.bean.spmk.SpmkApproveSummary
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
SpmkApproveSummaryDto
{
private
SpmkApproveSummary
spmkApproveSummary
;
private
SpmkApproveDetailDto
spmkApproveDetailDto
;
}
src/main/java/cn/timer/api/dto/spmk/SpmkCustomApprovalDto.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
java.util.Date
;
import
java.util.List
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.spmk.SpmkInitiatorConfig
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
SpmkCustomApprovalDto
{
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"审批组id 当前用户ID"
,
example
=
"101"
)
private
Integer
approvalGId
;
@ApiModelProperty
(
value
=
"审批图标地址 "
,
example
=
"审批图标地址"
)
private
String
iconUrl
;
@ApiModelProperty
(
value
=
"审批名称 "
,
example
=
"审批名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"审批说明 "
,
example
=
"审批说明"
)
private
String
description
;
@ApiModelProperty
(
value
=
"审批开关 0启用 1停用"
,
example
=
"101"
)
private
Integer
isOpen
;
@ApiModelProperty
(
value
=
"排序 排序"
,
example
=
"101"
)
private
Integer
ranks
;
@ApiModelProperty
(
value
=
"审批意见 是否必填 意见 0是 1否"
,
example
=
"101"
)
private
Integer
isOpinion
;
@ApiModelProperty
(
value
=
"更新时间 "
,
example
=
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"1"
)
private
Integer
assoType
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
JSONObject
froms
;
@ApiModelProperty
(
value
=
"审批流程 "
,
example
=
"审批流程"
)
private
Router
router
;
@ApiModelProperty
(
value
=
"可见发起人配置 "
,
example
=
"可见发起人配置 "
)
private
List
<
SpmkInitiatorConfig
>
initiatorConfigs
;
}
src/main/java/cn/timer/api/utils/Encrypt.java
View file @
437addff
...
@@ -2,7 +2,7 @@ package cn.timer.api.utils;
...
@@ -2,7 +2,7 @@ package cn.timer.api.utils;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
org.apache.shiro.crypto.hash.SimpleHash
;
//
import org.apache.shiro.crypto.hash.SimpleHash;
/**
/**
*
*
...
@@ -30,11 +30,11 @@ public class Encrypt {
...
@@ -30,11 +30,11 @@ public class Encrypt {
* @param salt
* @param salt
* @return
* @return
*/
*/
public
static
String
md5
(
String
password
,
String
salt
)
{
//
public static String md5(String password, String salt) {
//
Object
tokenCredentials
=
new
SimpleHash
(
"md5"
,
password
,
salt
,
2
).
toHex
();
//
Object tokenCredentials = new SimpleHash("md5", password, salt, 2).toHex();
return
(
String
)
tokenCredentials
;
//
return (String) tokenCredentials;
}
//
}
public
static
String
myEncode
(
String
str
)
throws
UnsupportedEncodingException
{
public
static
String
myEncode
(
String
str
)
throws
UnsupportedEncodingException
{
byte
[]
strBytes
=
str
.
getBytes
(
"utf-8"
);
byte
[]
strBytes
=
str
.
getBytes
(
"utf-8"
);
...
...
src/main/java/cn/timer/api/utils/Md5.java
View file @
437addff
...
@@ -4,7 +4,7 @@ import java.math.BigInteger;
...
@@ -4,7 +4,7 @@ import java.math.BigInteger;
import
java.security.MessageDigest
;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.NoSuchAlgorithmException
;
import
org.apache.shiro.crypto.hash.SimpleHash
;
//
import org.apache.shiro.crypto.hash.SimpleHash;
/**
/**
*
*
...
@@ -16,10 +16,10 @@ import org.apache.shiro.crypto.hash.SimpleHash;
...
@@ -16,10 +16,10 @@ import org.apache.shiro.crypto.hash.SimpleHash;
*/
*/
public
class
Md5
{
public
class
Md5
{
public
static
String
md5password
(
String
name
,
String
password
)
{
//
public static String md5password(String name, String password) {
Object
tokenCredentials
=
new
SimpleHash
(
"md5"
,
password
,
name
,
56
).
toHex
();
//
Object tokenCredentials = new SimpleHash("md5", password, name, 56).toHex();
return
(
String
)
tokenCredentials
;
//
return (String) tokenCredentials;
}
//
}
// 写一个md5加密的方法
// 写一个md5加密的方法
public
static
String
md5
(
String
plainText
)
{
public
static
String
md5
(
String
plainText
)
{
...
...
src/main/java/cn/timer/api/utils/RouterUtils.java
View file @
437addff
...
@@ -2,29 +2,15 @@ package cn.timer.api.utils;
...
@@ -2,29 +2,15 @@ package cn.timer.api.utils;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpSession
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zcgl.ZcglAssoZcgx
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
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.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.spmk.Condition
;
import
cn.timer.api.dto.spmk.Condition
;
import
cn.timer.api.dto.spmk.Relation
;
import
cn.timer.api.dto.spmk.Relation
;
import
cn.timer.api.dto.spmk.Router
;
import
cn.timer.api.dto.spmk.Router
;
...
@@ -57,6 +43,10 @@ public class RouterUtils {
...
@@ -57,6 +43,10 @@ public class RouterUtils {
// 非条件节点
// 非条件节点
if
(
listRouter
.
size
()
==
1
)
{
if
(
listRouter
.
size
()
==
1
)
{
router
=
listRouter
.
get
(
0
);
router
=
listRouter
.
get
(
0
);
if
(
router
.
getExecute
()
==
null
)
{
System
.
out
.
println
(
"默认UNEXECUTED"
);
router
.
setExecute
(
UNEXECUTED
);
}
// 0未执行 1执行中 2已执行
// 0未执行 1执行中 2已执行
switch
(
router
.
getExecute
())
{
switch
(
router
.
getExecute
())
{
case
UNEXECUTED:
case
UNEXECUTED:
...
@@ -86,9 +76,6 @@ public class RouterUtils {
...
@@ -86,9 +76,6 @@ public class RouterUtils {
break
;
break
;
}
}
}
}
break
;
break
;
case
COPY:
case
COPY:
Console
.
log
(
"抄送人逻辑"
);
Console
.
log
(
"抄送人逻辑"
);
...
@@ -107,9 +94,9 @@ public class RouterUtils {
...
@@ -107,9 +94,9 @@ public class RouterUtils {
user
.
setId
(
String
.
valueOf
(
emp
.
getEmpNum
()));
user
.
setId
(
String
.
valueOf
(
emp
.
getEmpNum
()));
listUsers
.
add
(
user
);
listUsers
.
add
(
user
);
}
}
listRelations
.
get
(
i
).
setUsers
(
listUsers
);
}
else
if
(
RELATION_TYPE_USERS
.
equals
(
listRelations
.
get
(
i
).
getType
()))
{
}
else
if
(
RELATION_TYPE_USERS
.
equals
(
listRelations
.
get
(
i
).
getType
()))
{
// 直接跳过,此处 else if代码段 只做说明,可不写
}
}
}
}
NextNode
(
router
.
getChildren
(),
obj
);
NextNode
(
router
.
getChildren
(),
obj
);
...
@@ -122,7 +109,6 @@ public class RouterUtils {
...
@@ -122,7 +109,6 @@ public class RouterUtils {
switch
(
router
.
getClassName
())
{
switch
(
router
.
getClassName
())
{
case
AUDIT:
case
AUDIT:
Console
.
log
(
"下一个审批人逻辑"
);
Console
.
log
(
"下一个审批人逻辑"
);
router
.
setFlow
(
true
);
router
.
setFlow
(
true
);
boolean
executeFlog
=
true
;
boolean
executeFlog
=
true
;
List
<
User
>
listUser
=
router
.
getRelation
().
get
(
0
).
getUsers
();
List
<
User
>
listUser
=
router
.
getRelation
().
get
(
0
).
getUsers
();
...
@@ -198,7 +184,7 @@ public class RouterUtils {
...
@@ -198,7 +184,7 @@ public class RouterUtils {
};
};
// 执行下一个节点
// 执行下一个节点
public
static
List
<
Router
>
NextNode
ing
(
List
<
Router
>
listRouter
,
JSONObject
obj
)
{
public
static
List
<
Router
>
NextNode
_bak
(
List
<
Router
>
listRouter
,
JSONObject
obj
)
{
Router
router
;
Router
router
;
if
(
listRouter
!=
null
&&
listRouter
.
size
()
!=
0
)
{
if
(
listRouter
!=
null
&&
listRouter
.
size
()
!=
0
)
{
...
@@ -234,9 +220,6 @@ public class RouterUtils {
...
@@ -234,9 +220,6 @@ public class RouterUtils {
break
;
break
;
}
}
}
}
break
;
break
;
case
COPY:
case
COPY:
Console
.
log
(
"抄送人逻辑"
);
Console
.
log
(
"抄送人逻辑"
);
...
@@ -280,15 +263,14 @@ public class RouterUtils {
...
@@ -280,15 +263,14 @@ public class RouterUtils {
switch
(
execute
)
{
switch
(
execute
)
{
case
UNEXECUTED:
case
UNEXECUTED:
listUser
.
get
(
i
).
setExecute
(
EXECUTING
);
listUser
.
get
(
i
).
setExecute
(
EXECUTING
);
if
(!
EXECUTED
.
equals
(
listUser
.
get
(
i
).
getExecute
()))
{
executeFlog
=
false
;
}
break
user
;
break
user
;
case
EXECUTING:
case
EXECUTING:
listUser
.
get
(
i
).
setExecute
(
EXECUTED
);
listUser
.
get
(
i
).
setExecute
(
EXECUTED
);
break
;
break
;
}
}
if
(!
EXECUTED
.
equals
(
listUser
.
get
(
i
).
getExecute
()))
{
executeFlog
=
false
;
}
}
}
if
(
executeFlog
)
{
if
(
executeFlog
)
{
router
.
setExecute
(
EXECUTED
);
router
.
setExecute
(
EXECUTED
);
...
...
src/main/java/cn/timer/api/utils/AliyunSMS.java
→
src/main/java/cn/timer/api/utils/
aliyun/
AliyunSMS.java
View file @
437addff
package
cn
.
timer
.
api
.
utils
;
package
cn
.
timer
.
api
.
utils
.
aliyun
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
src/main/java/cn/timer/api/utils/OSSUtil.java
→
src/main/java/cn/timer/api/utils/
aliyun/
OSSUtil.java
View file @
437addff
package
cn
.
timer
.
api
.
utils
;
package
cn
.
timer
.
api
.
utils
.
aliyun
;
import
java.io.BufferedReader
;
import
java.io.BufferedReader
;
import
java.io.File
;
import
java.io.File
;
...
@@ -21,6 +21,8 @@ import com.aliyun.oss.model.OSSObject;
...
@@ -21,6 +21,8 @@ import com.aliyun.oss.model.OSSObject;
import
com.aliyun.oss.model.PutObjectRequest
;
import
com.aliyun.oss.model.PutObjectRequest
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
/**
/**
* OSS接口操作示例 1.创建空间 2.上传文件 3.下载文件
* OSS接口操作示例 1.创建空间 2.上传文件 3.下载文件
...
...
src/main/java/cn/timer/api/utils/query/QueryUtil.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
utils
.
query
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
public
class
QueryUtil
{
/**
* 查询当前系统名字与版本号
* @return
*/
public
static
Map
<
String
,
String
>
queryVersionName
()
{
String
a
=
System
.
getProperty
(
"os.name"
);
String
b
=
System
.
getProperty
(
"os.arch"
);
String
c
=
System
.
getProperty
(
"os.version"
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"os.name"
,
a
);
map
.
put
(
"os.arch"
,
b
);
map
.
put
(
"os.version"
,
c
);
return
map
;
}
/**
* 查询员工姓名
* @param empNum
* @return
*/
public
static
String
queryEmpName
(
Integer
empNum
)
{
return
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
eq
(
"emp_num"
,
empNum
)).
getName
();
}
}
src/main/java/cn/timer/api/utils/schedule/CronUtil.java
0 → 100644
View file @
437addff
package
cn
.
timer
.
api
.
utils
.
schedule
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
cn.timer.api.bean.sche.ScheduleTask
;
public
class
CronUtil
{
// 默认cron 10秒一次
private
static
String
cron
=
"0/10 * * * * ?"
;
// 数据库cron
public
static
String
getCron
(
String
className
,
String
methodName
)
{
ScheduleTask
task
=
ScheduleTask
.
builder
().
build
().
selectOne
(
new
LambdaQueryWrapper
<
ScheduleTask
>()
.
eq
(
ScheduleTask:
:
getClassName
,
className
).
eq
(
ScheduleTask:
:
getMethodName
,
methodName
));
// 数据库查询
System
.
err
.
println
(
task
);
if
(
task
!=
null
&&
task
.
getCron
()
!=
null
)
{
cron
=
task
.
getCron
();
}
return
cron
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/utils/RemindUtil.java
→
src/main/java/cn/timer/api/utils/
schedule/
RemindUtil.java
View file @
437addff
package
cn
.
timer
.
api
.
utils
;
package
cn
.
timer
.
api
.
utils
.
schedule
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -7,6 +7,9 @@ import java.util.List;
...
@@ -7,6 +7,9 @@ import java.util.List;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.SchedulingConfigurer
;
import
org.springframework.scheduling.config.ScheduledTaskRegistrar
;
import
org.springframework.scheduling.support.CronTrigger
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -15,6 +18,7 @@ import cn.hutool.core.date.DateUnit;
...
@@ -15,6 +18,7 @@ import cn.hutool.core.date.DateUnit;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.timer.api.bean.htzz.HtzzAdminZzda
;
import
cn.timer.api.bean.htzz.HtzzAdminZzda
;
import
cn.timer.api.bean.htzz.HtzzAssoHtgx
;
import
cn.timer.api.bean.htzz.HtzzAssoHtgx
;
import
cn.timer.api.utils.aliyun.AliyunSMS
;
/**
/**
* 记录当前时间循环输出 遍历合同提醒关系表,每天固定时间(8点)查询是否提醒
* 记录当前时间循环输出 遍历合同提醒关系表,每天固定时间(8点)查询是否提醒
...
@@ -25,9 +29,23 @@ import cn.timer.api.bean.htzz.HtzzAssoHtgx;
...
@@ -25,9 +29,23 @@ import cn.timer.api.bean.htzz.HtzzAssoHtgx;
@Component
@Component
@Lazy
(
false
)
@Lazy
(
false
)
@EnableScheduling
@EnableScheduling
public
class
RemindUtil
{
public
class
RemindUtil
implements
SchedulingConfigurer
{
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
static
String
className
=
new
Exception
().
getStackTrace
()[
0
].
getClassName
();
static
String
methodName
=
null
;
// 数据库动态更改定时配置
@Override
public
void
configureTasks
(
ScheduledTaskRegistrar
taskRegistrar
)
{
taskRegistrar
.
addTriggerTask
(()
->
{
// 任务逻辑
methodName
=
reportCurrentTime
();
},
triggerContext
->
{
CronTrigger
cronTrigger
=
new
CronTrigger
(
CronUtil
.
getCron
(
className
,
methodName
));
// cron配置
return
cronTrigger
.
nextExecutionTime
(
triggerContext
);
// 下次执行任务的时间
});
}
/**
/**
* 间隔时间提醒 30min/次
* 间隔时间提醒 30min/次
...
@@ -40,18 +58,13 @@ public class RemindUtil {
...
@@ -40,18 +58,13 @@ public class RemindUtil {
/**
/**
* 每天固定时间提醒
* 每天固定时间提醒
*/
*/
@Scheduled
(
cron
=
"0 0 8 * * ?"
)
// 每天8点扫一下看有没要提醒的,有就发一个
// @Scheduled(cron = "0 0 8 * * ?") // 每天8点扫一下看有没要提醒的,有就发一个
// @Scheduled(cron = "0 8 15 * * ?") // 测试合同提醒
public
static
String
reportCurrentTime
()
{
public
static
void
reportCurrentTime
()
{
List
<
HtzzAssoHtgx
>
htgxs
=
HtzzAssoHtgx
.
builder
().
build
().
selectAll
();
List
<
HtzzAssoHtgx
>
htgxs
=
HtzzAssoHtgx
.
builder
().
build
().
selectAll
();
for
(
HtzzAssoHtgx
htgx
:
htgxs
)
{
for
(
HtzzAssoHtgx
htgx
:
htgxs
)
{
QueryWrapper
<
HtzzAdminZzda
>
q
=
new
QueryWrapper
<
HtzzAdminZzda
>();
QueryWrapper
<
HtzzAdminZzda
>
q
=
new
QueryWrapper
<
HtzzAdminZzda
>();
q
.
select
(
"id"
,
"zjmc"
,
"txkg_type"
,
"yxdqr"
).
eq
(
"id"
,
htgx
.
getHtid
()).
eq
(
"is_delete"
,
0
).
eq
(
"txkg_type"
,
0
);
q
.
select
(
"id"
,
"zjmc"
,
"txkg_type"
,
"yxdqr"
).
eq
(
"id"
,
htgx
.
getHtid
()).
eq
(
"is_delete"
,
0
).
eq
(
"txkg_type"
,
0
);
HtzzAdminZzda
zzda
=
HtzzAdminZzda
.
builder
().
build
().
selectOne
(
q
);
HtzzAdminZzda
zzda
=
HtzzAdminZzda
.
builder
().
build
().
selectOne
(
q
);
if
(
zzda
!=
null
)
{
if
(
zzda
!=
null
)
{
String
name
=
htgx
.
getName
();
// 员工姓名
String
name
=
htgx
.
getName
();
// 员工姓名
String
phone
=
htgx
.
getPhone
();
// 员工手机
String
phone
=
htgx
.
getPhone
();
// 员工手机
...
@@ -72,14 +85,13 @@ public class RemindUtil {
...
@@ -72,14 +85,13 @@ public class RemindUtil {
}
else
if
(
betweenDay
==
30
)
{
}
else
if
(
betweenDay
==
30
)
{
AliyunSMS
.
remind
(
name
,
htname
,
time
,
phone
);
// 少于30天短信提醒
AliyunSMS
.
remind
(
name
,
htname
,
time
,
phone
);
// 少于30天短信提醒
}
}
}
else
{
}
else
{
zzda
.
setTxkgType
(
1
);
// 关闭提醒
zzda
.
setTxkgType
(
1
);
// 关闭提醒
zzda
.
updateById
();
zzda
.
updateById
();
}
}
}
}
}
}
return
new
Exception
().
getStackTrace
()[
0
].
getMethodName
();
}
}
}
}
\ No newline at end of file
src/main/java/cn/timer/api/utils/TimerUtil.java
→
src/main/java/cn/timer/api/utils/
schedule/
TimerUtil.java
View file @
437addff
package
cn
.
timer
.
api
.
utils
;
package
cn
.
timer
.
api
.
utils
.
schedule
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.cron.CronUtil
;
import
cn.hutool.cron.CronUtil
;
...
...
src/main/resources/application-dev.yml
View file @
437addff
...
@@ -86,6 +86,30 @@ spring:
...
@@ -86,6 +86,30 @@ spring:
margin
:
2
# Left hand image margin in chars.
margin
:
2
# Left hand image margin in chars.
invert
:
false
# Whether images should be inverted for dark terminal themes.
invert
:
false
# Whether images should be inverted for dark terminal themes.
######### Spring boot应用健康监控
management
:
server
:
port
:
9090
# 如果设置端口号为-1,则隐藏监控短点
endpoints
:
web
:
exposure
:
include
:
"
*"
# 开启暴露所有的endpoint
endpoint
:
health
:
show-details
:
always
# 显示健康具体信息 默认不会显示详细信息
# INFO ENDPOINT CONFIGURATION
info
:
app
:
name
:
'
@project.name@'
description
:
'
@project.description@'
version
:
'
@project.version@'
encoding
:
'
@project.build.sourceEncoding@'
java
:
version
:
'
@java.version@'
git
:
mode
:
full
##############################
# mybatis-plus
# mybatis-plus
mybatis-plus
:
mybatis-plus
:
mapper-locations
:
classpath:mapping/**/*Mapper.xml
# dao到xml文件映射
mapper-locations
:
classpath:mapping/**/*Mapper.xml
# dao到xml文件映射
...
...
src/main/resources/mapping/spmk/SpmkApprovalGMapper.xml
0 → 100644
View file @
437addff
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.spmk.SpmkApprovalGMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.spmk.SpmkApprovalG"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"ranks"
property=
"ranks"
/>
<result
column=
"is_editable"
property=
"isEditable"
/>
</resultMap>
<resultMap
id=
"BaseResultMapDto"
type=
"cn.timer.api.dto.spmk.SpmkApprovalGDto"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"ranks"
property=
"ranks"
/>
<result
column=
"is_editable"
property=
"isEditable"
/>
<collection
column=
"SpmkCustomApproval_id"
property=
"spmkCustomApprovals"
ofType=
"cn.timer.api.bean.spmk.SpmkCustomApproval"
resultMap=
"cn.timer.api.bean.spmk.SpmkCustomApproval.BaseResultMap"
columnPrefix=
"SpmkCustomApproval_"
>
</collection>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
org_code,
name,
ranks,
is_editable
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id SpmkApprovalG_id,
org_code SpmkApprovalG_org_code,
name SpmkApprovalG_name,
ranks SpmkApprovalG_ranks,
is_editable SpmkApprovalG_is_editable
</sql>
<sql
id=
"Base_Column_List_Alias_ca"
>
id SpmkCustomApproval_id,
org_code SpmkCustomApproval_org_code,
approval_g_id SpmkCustomApproval_approval_g_id,
icon_url SpmkCustomApproval_icon_url,
name SpmkCustomApproval_name,
description SpmkCustomApproval_description,
is_open SpmkCustomApproval_is_open,
ranks SpmkCustomApproval_ranks,
is_opinion SpmkCustomApproval_is_opinion,
update_time SpmkCustomApproval_update_time,
create_time SpmkCustomApproval_create_time,
asso_type SpmkCustomApproval_asso_type,
froms SpmkCustomApproval_froms,
router SpmkCustomApproval_router
</sql>
<select
id=
"selectListAgInCa"
resultMap=
"BaseResultMapDto"
>
SELECT
<include
refid=
"Base_Column_List_Alias"
/>
,
<include
refid=
"Base_Column_List_Alias_ca"
/>
FROM spmk_approval_g a
LEFT JOIN spmk_custom_approval b IN a.id = b.approval_g_id
WHERE b.org_code = #{org_code} AND b.id in
(
SELECT custom_approval_id FROM spmk_initiator_config WHERE emp_num = #{emp_num} GROUP BY custom_approval_id
)
</select>
<update
id=
"updateListRandsById"
parameterType=
"list"
>
<foreach
item=
"item"
index=
"index"
collection=
"list"
open=
""
separator=
";"
close=
""
>
UPDATE spmk_approval_template_g
<set>
<if
test =
'null != item.ranks'
>
ranks = #{item.ranks},
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkApprovalG">
INSERT INTO spmk_approval_g
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != name'>
name,
</if>
<if test ='null != ranks'>
ranks,
</if>
<if test ='null != isEditable'>
is_editable
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != name'>
#{name},
</if>
<if test ='null != ranks'>
#{ranks},
</if>
<if test ='null != isEditable'>
#{isEditable}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM spmk_approval_g
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.spmk.SpmkApprovalG">
UPDATE spmk_approval_g
<set>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != name'>name = #{name},</if>
<if test ='null != ranks'>ranks = #{ranks},</if>
<if test ='null != isEditable'>is_editable = #{isEditable}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_approval_g
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_approval_g
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM spmk_approval_g
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/spmk/SpmkApprovalTemplateGMapper.xml
0 → 100644
View file @
437addff
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.spmk.SpmkApprovalTemplateG"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"ranks"
property=
"ranks"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<resultMap
id=
"BaseResultMapDto"
type=
"cn.timer.api.dto.spmk.SpmkApprovalTemplateGDto"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"ranks"
property=
"ranks"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<collection
column=
"SpmkApprovalTemplate_id"
property=
"spmkApprovalTemplates"
ofType=
"cn.timer.api.bean.spmk.SpmkApprovalTemplate"
resultMap=
"cn.timer.api.bean.spmk.SpmkApprovalTemplate.BaseResultMap"
columnPrefix=
"SpmkApprovalTemplate_"
>
</collection>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
name,
ranks,
update_time
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id SpmkApprovalTemplateG_id,
name SpmkApprovalTemplateG_name,
ranks SpmkApprovalTemplateG_ranks,
update_time SpmkApprovalTemplateG_update_time
</sql>
<sql
id=
"Base_Column_List_Alias_at"
>
id SpmkApprovalTemplate_id,
approval_template_g_id SpmkApprovalTemplate_approval_template_g_id,
icon_url SpmkApprovalTemplate_icon_url,
name SpmkApprovalTemplate_name,
description SpmkApprovalTemplate_description,
is_open SpmkApprovalTemplate_is_open,
ranks SpmkApprovalTemplate_ranks,
is_opinion SpmkApprovalTemplate_is_opinion,
update_time SpmkApprovalTemplate_update_time,
create_time SpmkApprovalTemplate_create_time,
asso_type SpmkApprovalTemplate_asso_type,
froms SpmkApprovalTemplate_froms,
router SpmkApprovalTemplate_router
</sql>
<select
id=
"selectListAtInAtg"
resultMap=
"BaseResultMapDto"
>
SELECT
<include
refid=
"Base_Column_List_Alias"
/>
,
<include
refid=
"Base_Column_List_Alias_at"
/>
FROM spmk_approval_template_g a
LEFT JOIN spmk_approval_template b IN a.id = b.approval_template_g_id
</select>
<update
id=
"updateListRandsById"
parameterType=
"list"
>
<foreach
item=
"item"
index=
"index"
collection=
"list"
open=
""
separator=
";"
close=
""
>
UPDATE spmk_approval_template_g
<set>
<if
test =
'null != item.ranks'
>
ranks = #{item.ranks},
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkApprovalTemplateG">
INSERT INTO spmk_approval_template_g
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
name,
</if>
<if test ='null != ranks'>
ranks,
</if>
<if test ='null != updateTime'>
update_time
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != name'>
#{name},
</if>
<if test ='null != ranks'>
#{ranks},
</if>
<if test ='null != updateTime'>
#{updateTime}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM spmk_approval_template_g
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.spmk.SpmkApprovalTemplateG">
UPDATE spmk_approval_template_g
<set>
<if test ='null != name'>name = #{name},</if>
<if test ='null != ranks'>ranks = #{ranks},</if>
<if test ='null != updateTime'>update_time = #{updateTime}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_approval_template_g
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_approval_template_g
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM spmk_approval_template_g
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/spmk/SpmkApprovalTemplateMapper.xml
0 → 100644
View file @
437addff
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.spmk.SpmkApprovalTemplateMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.spmk.SpmkApprovalTemplate"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"approval_template_g_id"
property=
"approvalTemplateGId"
/>
<result
column=
"icon_url"
property=
"iconUrl"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"is_open"
property=
"isOpen"
/>
<result
column=
"ranks"
property=
"ranks"
/>
<result
column=
"is_opinion"
property=
"isOpinion"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"asso_type"
property=
"assoType"
/>
<result
column=
"froms"
property=
"froms"
/>
<result
column=
"router"
property=
"router"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
approval_template_g_id,
icon_url,
name,
description,
is_open,
ranks,
is_opinion,
update_time,
create_time,
asso_type,
froms,
router
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id SpmkApprovalTemplate_id,
approval_template_g_id SpmkApprovalTemplate_approval_template_g_id,
icon_url SpmkApprovalTemplate_icon_url,
name SpmkApprovalTemplate_name,
description SpmkApprovalTemplate_description,
is_open SpmkApprovalTemplate_is_open,
ranks SpmkApprovalTemplate_ranks,
is_opinion SpmkApprovalTemplate_is_opinion,
update_time SpmkApprovalTemplate_update_time,
create_time SpmkApprovalTemplate_create_time,
asso_type SpmkApprovalTemplate_asso_type,
froms SpmkApprovalTemplate_froms,
router SpmkApprovalTemplate_router
</sql>
<update
id=
"updateListRandsById"
parameterType=
"list"
>
<foreach
item=
"item"
index=
"index"
collection=
"list"
open=
""
separator=
";"
close=
""
>
UPDATE spmk_approval_template
<set>
<if
test =
'null != item.ranks'
>
ranks = #{item.ranks},
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkApprovalTemplate">
INSERT INTO spmk_approval_template
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != approvalTemplateGId'>
approval_template_g_id,
</if>
<if test ='null != iconUrl'>
icon_url,
</if>
<if test ='null != name'>
name,
</if>
<if test ='null != description'>
description,
</if>
<if test ='null != isOpen'>
is_open,
</if>
<if test ='null != ranks'>
ranks,
</if>
<if test ='null != isOpinion'>
is_opinion,
</if>
<if test ='null != updateTime'>
update_time,
</if>
<if test ='null != createTime'>
create_time,
</if>
<if test ='null != assoType'>
asso_type,
</if>
<if test ='null != froms'>
froms,
</if>
<if test ='null != router'>
router
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != approvalTemplateGId'>
#{approvalTemplateGId},
</if>
<if test ='null != iconUrl'>
#{iconUrl},
</if>
<if test ='null != name'>
#{name},
</if>
<if test ='null != description'>
#{description},
</if>
<if test ='null != isOpen'>
#{isOpen},
</if>
<if test ='null != ranks'>
#{ranks},
</if>
<if test ='null != isOpinion'>
#{isOpinion},
</if>
<if test ='null != updateTime'>
#{updateTime},
</if>
<if test ='null != createTime'>
#{createTime},
</if>
<if test ='null != assoType'>
#{assoType},
</if>
<if test ='null != froms'>
#{froms},
</if>
<if test ='null != router'>
#{router}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM spmk_approval_template
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.spmk.SpmkApprovalTemplate">
UPDATE spmk_approval_template
<set>
<if test ='null != approvalTemplateGId'>approval_template_g_id = #{approvalTemplateGId},</if>
<if test ='null != iconUrl'>icon_url = #{iconUrl},</if>
<if test ='null != name'>name = #{name},</if>
<if test ='null != description'>description = #{description},</if>
<if test ='null != isOpen'>is_open = #{isOpen},</if>
<if test ='null != ranks'>ranks = #{ranks},</if>
<if test ='null != isOpinion'>is_opinion = #{isOpinion},</if>
<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 != froms'>froms = #{froms},</if>
<if test ='null != router'>router = #{router}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_approval_template
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_approval_template
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM spmk_approval_template
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/spmk/SpmkCustomApprovalMapper.xml
0 → 100644
View file @
437addff
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.spmk.SpmkCustomApprovalMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.spmk.SpmkCustomApproval"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"approval_g_id"
property=
"approvalGId"
/>
<result
column=
"icon_url"
property=
"iconUrl"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"is_open"
property=
"isOpen"
/>
<result
column=
"ranks"
property=
"ranks"
/>
<result
column=
"is_opinion"
property=
"isOpinion"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"asso_type"
property=
"assoType"
/>
<result
column=
"froms"
property=
"froms"
/>
<result
column=
"router"
property=
"router"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
org_code,
approval_g_id,
icon_url,
name,
description,
is_open,
ranks,
is_opinion,
update_time,
create_time,
asso_type,
froms,
router
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id SpmkCustomApproval_id,
org_code SpmkCustomApproval_org_code,
approval_g_id SpmkCustomApproval_approval_g_id,
icon_url SpmkCustomApproval_icon_url,
name SpmkCustomApproval_name,
description SpmkCustomApproval_description,
is_open SpmkCustomApproval_is_open,
ranks SpmkCustomApproval_ranks,
is_opinion SpmkCustomApproval_is_opinion,
update_time SpmkCustomApproval_update_time,
create_time SpmkCustomApproval_create_time,
asso_type SpmkCustomApproval_asso_type,
froms SpmkCustomApproval_froms,
router SpmkCustomApproval_router
</sql>
<update
id=
"updateListRandsById"
parameterType=
"list"
>
<foreach
item=
"item"
index=
"index"
collection=
"list"
open=
""
separator=
";"
close=
""
>
UPDATE spmk_custom_approval
<set>
<if
test =
'null != item.ranks'
>
ranks = #{item.ranks},
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkCustomApproval">
INSERT INTO spmk_custom_approval
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != approvalGId'>
approval_g_id,
</if>
<if test ='null != iconUrl'>
icon_url,
</if>
<if test ='null != name'>
name,
</if>
<if test ='null != description'>
description,
</if>
<if test ='null != isOpen'>
is_open,
</if>
<if test ='null != ranks'>
ranks,
</if>
<if test ='null != isOpinion'>
is_opinion,
</if>
<if test ='null != updateTime'>
update_time,
</if>
<if test ='null != createTime'>
create_time,
</if>
<if test ='null != assoType'>
asso_type,
</if>
<if test ='null != froms'>
froms,
</if>
<if test ='null != router'>
router
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != approvalGId'>
#{approvalGId},
</if>
<if test ='null != iconUrl'>
#{iconUrl},
</if>
<if test ='null != name'>
#{name},
</if>
<if test ='null != description'>
#{description},
</if>
<if test ='null != isOpen'>
#{isOpen},
</if>
<if test ='null != ranks'>
#{ranks},
</if>
<if test ='null != isOpinion'>
#{isOpinion},
</if>
<if test ='null != updateTime'>
#{updateTime},
</if>
<if test ='null != createTime'>
#{createTime},
</if>
<if test ='null != assoType'>
#{assoType},
</if>
<if test ='null != froms'>
#{froms},
</if>
<if test ='null != router'>
#{router}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM spmk_custom_approval
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.spmk.SpmkCustomApproval">
UPDATE spmk_custom_approval
<set>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != approvalGId'>approval_g_id = #{approvalGId},</if>
<if test ='null != iconUrl'>icon_url = #{iconUrl},</if>
<if test ='null != name'>name = #{name},</if>
<if test ='null != description'>description = #{description},</if>
<if test ='null != isOpen'>is_open = #{isOpen},</if>
<if test ='null != ranks'>ranks = #{ranks},</if>
<if test ='null != isOpinion'>is_opinion = #{isOpinion},</if>
<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 != froms'>froms = #{froms},</if>
<if test ='null != router'>router = #{router}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_custom_approval
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_custom_approval
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM spmk_custom_approval
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/spmk/SpmkInitiatorConfigMapper.xml
0 → 100644
View file @
437addff
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.spmk.SpmkInitiatorConfigMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.spmk.SpmkInitiatorConfig"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"custom_approval_id"
property=
"customApprovalId"
/>
<result
column=
"asso_id"
property=
"assoId"
/>
<result
column=
"type"
property=
"type"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
custom_approval_id,
asso_id,
type
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id SpmkInitiatorConfig_id,
custom_approval_id SpmkInitiatorConfig_custom_approval_id,
asso_id SpmkInitiatorConfig_asso_id,
type SpmkInitiatorConfig_type
</sql>
<insert
id=
"insertList"
useGeneratedKeys=
"true"
keyColumn=
"id"
parameterType=
"list"
>
INSERT INTO spmk_initiator_config
(custom_approval_id,asso_id,type)
values
<foreach
item=
"item"
index=
"index"
collection=
"list"
open=
""
separator=
","
close=
""
>
(
#{item.customApprovalId},#{item.assoId},#{item.type}
)
</foreach>
</insert>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkInitiatorConfig">
INSERT INTO spmk_initiator_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != customApprovalId'>
custom_approval_id,
</if>
<if test ='null != assoId'>
asso_id,
</if>
<if test ='null != type'>
type
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != customApprovalId'>
#{customApprovalId},
</if>
<if test ='null != assoId'>
#{assoId},
</if>
<if test ='null != type'>
#{type}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM spmk_initiator_config
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.spmk.SpmkInitiatorConfig">
UPDATE spmk_initiator_config
<set>
<if test ='null != customApprovalId'>custom_approval_id = #{customApprovalId},</if>
<if test ='null != assoId'>asso_id = #{assoId},</if>
<if test ='null != type'>type = #{type}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_initiator_config
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM spmk_initiator_config
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM spmk_initiator_config
</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