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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
2045 additions
and
257 deletions
+2045
-257
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
+0
-0
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 @@
</parent>
<groupId>
cn.8timer
</groupId>
<artifactId>
8timerV200
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
v0.4-beta
</version>
<name>
8timerV200
</name>
<description>
Demo project for Spring Boot
</description>
<description>
8小时人事管家2.0
</description>
<profiles>
<profile>
...
...
@@ -79,6 +79,17 @@
<scope>
test
</scope>
</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依赖 -->
<dependency>
<groupId>
mysql
</groupId>
...
...
@@ -183,17 +194,17 @@
<artifactId>
commons-lang3
</artifactId>
</dependency>
<dependency>
<!-- Apache shiro -->
<!-- <dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version>
</dependency>
</dependency>
-->
<!-- redis starter -->
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId>
...
...
@@ -309,16 +320,16 @@
</dependency>
<!--springboot-quartz -->
<dependency>
<
!-- <
dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
</dependency>
-->
<!--Quartz 使用的连接池 这里Quartz在持久化任务时使用该jar -->
<dependency>
<
!-- <
dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency>
</dependency>
-->
<!-- pdf -->
...
...
@@ -421,6 +432,11 @@
<overwrite>
true
</overwrite>
</configuration>
</plugin>
<plugin>
<groupId>
pl.project13.maven
</groupId>
<artifactId>
git-commit-id-plugin
</artifactId>
</plugin>
</plugins>
</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 {
//.excludePathPatterns("/")
registry
.
addInterceptor
(
getSessionInterceptor
())
.
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/actuator/*"
)
.
excludePathPatterns
(
"/doc*"
)
.
excludePathPatterns
(
"/v2/**"
)
.
excludePathPatterns
(
"/**/*.js"
)
...
...
src/main/java/cn/timer/api/config/quartz/BaseJob.java
View file @
437addff
package
cn
.
timer
.
api
.
config
.
quartz
;
import
org.quartz.Job
;
import
org.quartz.JobExecutionContext
;
import
org.quartz.JobExecutionException
;
public
interface
BaseJob
extends
Job
{
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
;
}
//
import org.quartz.Job;
//
import org.quartz.JobExecutionContext;
//
import org.quartz.JobExecutionException;
//
//
public interface BaseJob extends Job {
//
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;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.env.Environment
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -40,11 +39,11 @@ import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.login.QysDto
;
import
cn.timer.api.dto.qyzx.EntRegisterDto
;
import
cn.timer.api.utils.AliyunSMS
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.UserIp
;
import
cn.timer.api.utils.aliyun.AliyunSMS
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -54,9 +53,6 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping
(
value
=
"/login"
,
produces
=
{
"application/json"
})
public
class
LoginController
{
@Autowired
private
Environment
env
;
@Value
(
"${configtest.patht}"
)
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;
import
cn.timer.api.dto.dzht.DzhtRzDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.query.QueryUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -233,7 +234,20 @@ public class DzhtController {
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_SECRET
=
ConfigConstant
.
PROJECT_SECRET
;
// 项目密码
// final static String RE_TOKEN = "8b58973c290cc848b67ff0017cd424ff";
...
...
@@ -595,7 +609,7 @@ public class DzhtController {
String
filePath
=
null
;
try
{
filePath
=
FileHelper
.
downLoadFromUrl
(
ossUrl
,
fileName
,
savePath
);
filePath
=
FileHelper
.
downLoadFromUrl
(
ossUrl
,
fileName
,
savePath
()
);
}
catch
(
IOException
e1
)
{
e1
.
printStackTrace
();
}
...
...
@@ -678,18 +692,11 @@ public class DzhtController {
}
@GetMapping
(
"/queryName"
)
@ApiOperation
(
value
=
"查版本名字"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getName
(
@RequestParam
String
empNum
)
{
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
ResultUtil
.
data
(
map
);
// return ResultUtil.data(YgglMainEmp.builder().build()
// .selectOne(new QueryWrapper<YgglMainEmp>().eq("emp_num", empNum)).getName());
@ApiOperation
(
value
=
"查名字"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getName
(
@RequestParam
(
required
=
false
)
Integer
empNum
)
{
String
name
=
QueryUtil
.
queryEmpName
(
empNum
);
Map
<
String
,
String
>
map
=
QueryUtil
.
queryVersionName
();
return
ResultUtil
.
datas
(
map
,
name
,
"查询成功"
);
}
/*************************** 设置请求头 ***************************************/
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
437addff
...
...
@@ -724,7 +724,7 @@ public class DzhtController2 {
String
filePath
=
null
;
try
{
filePath
=
FileHelper
.
downLoadFromUrl
(
ossUrl
,
fileName
,
DzhtController
.
savePath
);
filePath
=
FileHelper
.
downLoadFromUrl
(
ossUrl
,
fileName
,
DzhtController
.
savePath
()
);
tpyz
.
setFilePath
(
filePath
);
}
catch
(
IOException
e1
)
{
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;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.utils.OSSUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.aliyun.OSSUtil
;
import
io.swagger.annotations.Api
;
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
This diff is collapsed.
Click to expand it.
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;
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 {
* @param salt
* @return
*/
public
static
String
md5
(
String
password
,
String
salt
)
{
Object
tokenCredentials
=
new
SimpleHash
(
"md5"
,
password
,
salt
,
2
).
toHex
();
return
(
String
)
tokenCredentials
;
}
//
public static String md5(String password, String salt) {
//
//
Object tokenCredentials = new SimpleHash("md5", password, salt, 2).toHex();
//
return (String) tokenCredentials;
//
}
public
static
String
myEncode
(
String
str
)
throws
UnsupportedEncodingException
{
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;
import
java.security.MessageDigest
;
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;
*/
public
class
Md5
{
public
static
String
md5password
(
String
name
,
String
password
)
{
Object
tokenCredentials
=
new
SimpleHash
(
"md5"
,
password
,
name
,
56
).
toHex
();
return
(
String
)
tokenCredentials
;
}
//
public static String md5password(String name, String password) {
//
Object tokenCredentials = new SimpleHash("md5", password, name, 56).toHex();
//
return (String) tokenCredentials;
//
}
// 写一个md5加密的方法
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;
import
java.util.ArrayList
;
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.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
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.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.Relation
;
import
cn.timer.api.dto.spmk.Router
;
...
...
@@ -57,6 +43,10 @@ public class RouterUtils {
// 非条件节点
if
(
listRouter
.
size
()
==
1
)
{
router
=
listRouter
.
get
(
0
);
if
(
router
.
getExecute
()
==
null
)
{
System
.
out
.
println
(
"默认UNEXECUTED"
);
router
.
setExecute
(
UNEXECUTED
);
}
// 0未执行 1执行中 2已执行
switch
(
router
.
getExecute
())
{
case
UNEXECUTED:
...
...
@@ -86,9 +76,6 @@ public class RouterUtils {
break
;
}
}
break
;
case
COPY:
Console
.
log
(
"抄送人逻辑"
);
...
...
@@ -107,9 +94,9 @@ public class RouterUtils {
user
.
setId
(
String
.
valueOf
(
emp
.
getEmpNum
()));
listUsers
.
add
(
user
);
}
listRelations
.
get
(
i
).
setUsers
(
listUsers
);
}
else
if
(
RELATION_TYPE_USERS
.
equals
(
listRelations
.
get
(
i
).
getType
()))
{
// 直接跳过,此处 else if代码段 只做说明,可不写
}
}
NextNode
(
router
.
getChildren
(),
obj
);
...
...
@@ -122,7 +109,6 @@ public class RouterUtils {
switch
(
router
.
getClassName
())
{
case
AUDIT:
Console
.
log
(
"下一个审批人逻辑"
);
router
.
setFlow
(
true
);
boolean
executeFlog
=
true
;
List
<
User
>
listUser
=
router
.
getRelation
().
get
(
0
).
getUsers
();
...
...
@@ -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
;
if
(
listRouter
!=
null
&&
listRouter
.
size
()
!=
0
)
{
...
...
@@ -234,9 +220,6 @@ public class RouterUtils {
break
;
}
}
break
;
case
COPY:
Console
.
log
(
"抄送人逻辑"
);
...
...
@@ -280,15 +263,14 @@ public class RouterUtils {
switch
(
execute
)
{
case
UNEXECUTED:
listUser
.
get
(
i
).
setExecute
(
EXECUTING
);
if
(!
EXECUTED
.
equals
(
listUser
.
get
(
i
).
getExecute
()))
{
executeFlog
=
false
;
}
break
user
;
case
EXECUTING:
listUser
.
get
(
i
).
setExecute
(
EXECUTED
);
break
;
}
if
(!
EXECUTED
.
equals
(
listUser
.
get
(
i
).
getExecute
()))
{
executeFlog
=
false
;
}
}
if
(
executeFlog
)
{
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
;
...
...
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.File
;
...
...
@@ -21,6 +21,8 @@ import com.aliyun.oss.model.OSSObject;
import
com.aliyun.oss.model.PutObjectRequest
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
/**
* 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.util.Date
;
...
...
@@ -7,6 +7,9 @@ import java.util.List;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
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
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -15,6 +18,7 @@ import cn.hutool.core.date.DateUnit;
import
cn.hutool.core.date.DateUtil
;
import
cn.timer.api.bean.htzz.HtzzAdminZzda
;
import
cn.timer.api.bean.htzz.HtzzAssoHtgx
;
import
cn.timer.api.utils.aliyun.AliyunSMS
;
/**
* 记录当前时间循环输出 遍历合同提醒关系表,每天固定时间(8点)查询是否提醒
...
...
@@ -25,9 +29,23 @@ import cn.timer.api.bean.htzz.HtzzAssoHtgx;
@Component
@Lazy
(
false
)
@EnableScheduling
public
class
RemindUtil
{
public
class
RemindUtil
implements
SchedulingConfigurer
{
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/次
...
...
@@ -40,18 +58,13 @@ public class RemindUtil {
/**
* 每天固定时间提醒
*/
@Scheduled
(
cron
=
"0 0 8 * * ?"
)
// 每天8点扫一下看有没要提醒的,有就发一个
// @Scheduled(cron = "0 8 15 * * ?") // 测试合同提醒
public
static
void
reportCurrentTime
()
{
// @Scheduled(cron = "0 0 8 * * ?") // 每天8点扫一下看有没要提醒的,有就发一个
public
static
String
reportCurrentTime
()
{
List
<
HtzzAssoHtgx
>
htgxs
=
HtzzAssoHtgx
.
builder
().
build
().
selectAll
();
for
(
HtzzAssoHtgx
htgx
:
htgxs
)
{
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
);
HtzzAdminZzda
zzda
=
HtzzAdminZzda
.
builder
().
build
().
selectOne
(
q
);
if
(
zzda
!=
null
)
{
String
name
=
htgx
.
getName
();
// 员工姓名
String
phone
=
htgx
.
getPhone
();
// 员工手机
...
...
@@ -72,14 +85,13 @@ public class RemindUtil {
}
else
if
(
betweenDay
==
30
)
{
AliyunSMS
.
remind
(
name
,
htname
,
time
,
phone
);
// 少于30天短信提醒
}
}
else
{
zzda
.
setTxkgType
(
1
);
// 关闭提醒
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.cron.CronUtil
;
...
...
src/main/resources/application-dev.yml
View file @
437addff
...
...
@@ -86,6 +86,30 @@ spring:
margin
:
2
# Left hand image margin in chars.
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
:
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