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
ed3e6247
Commit
ed3e6247
authored
Aug 20, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时华颐后台--
新增草稿箱
parent
43da0315
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1236 additions
and
21 deletions
+1236
-21
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalG.java
+2
-4
src/main/java/cn/timer/api/bean/spmk/SpmkApproveDetailDrafts.java
+161
-0
src/main/java/cn/timer/api/bean/spmk/SpmkApproveDrafts.java
+305
-0
src/main/java/cn/timer/api/bean/spmk/SpmkApproveExecuteRecordDrafts.java
+145
-0
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+131
-0
src/main/java/cn/timer/api/controller/spmk/service/SpmkService.java
+5
-3
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
+71
-14
src/main/java/cn/timer/api/dao/spmk/SpmkApproveDetailDraftsMapper.java
+18
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApproveDraftsMapper.java
+25
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApproveExecuteRecordDraftsMapper.java
+17
-0
src/main/java/cn/timer/api/dto/spmk/SpmkApproveSummaryDto.java
+3
-0
src/main/resources/mapping/spmk/SpmkApproveDetailDraftsMapper.xml
+164
-0
src/main/resources/mapping/spmk/SpmkApproveDraftsMapper.xml
+36
-0
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordDraftsMapper.xml
+153
-0
No files found.
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalG.java
View file @
ed3e6247
...
@@ -34,7 +34,7 @@ import lombok.NoArgsConstructor;
...
@@ -34,7 +34,7 @@ import lombok.NoArgsConstructor;
public
class
SpmkApprovalG
extends
Model
<
SpmkApprovalG
>
{
public
class
SpmkApprovalG
extends
Model
<
SpmkApprovalG
>
{
/**
/**
*
*
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -58,5 +58,4 @@ public class SpmkApprovalG extends Model<SpmkApprovalG> {
...
@@ -58,5 +58,4 @@ public class SpmkApprovalG extends Model<SpmkApprovalG> {
@ApiModelProperty
(
value
=
"是否可编辑 0是 1否"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"是否可编辑 0是 1否"
,
example
=
"101"
)
private
Integer
isEditable
;
private
Integer
isEditable
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/spmk/SpmkApproveDetailDrafts.java
0 → 100644
View file @
ed3e6247
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 审批草稿详情
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-16 14:52:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approve_detail_drafts"
)
@ApiModel
(
"审批草稿详情"
)
public
class
SpmkApproveDetailDrafts
extends
Model
<
SpmkApproveDetailDrafts
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 编号
*/
private
Integer
id
;
/**
* 审批汇总id
*/
private
Integer
approveSummaryId
;
/**
* 标题
*/
private
String
name
;
/**
* 所在部门名称
*/
private
String
departmentName
;
/**
* 申请数据
*/
private
String
requestData
;
/**
* 审批表单
*/
private
String
froms
;
/**
* 审批流程
*/
private
String
router
;
/**
* 通过节点
*/
private
String
flowChildren
;
/**
* 设置:编号
*/
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
/**
* 获取:编号
*/
public
Integer
getId
()
{
return
id
;
}
/**
* 设置:审批汇总id
*/
public
void
setApproveSummaryId
(
Integer
approveSummaryId
)
{
this
.
approveSummaryId
=
approveSummaryId
;
}
/**
* 获取:审批汇总id
*/
public
Integer
getApproveSummaryId
()
{
return
approveSummaryId
;
}
/**
* 设置:标题
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/**
* 获取:标题
*/
public
String
getName
()
{
return
name
;
}
/**
* 设置:所在部门名称
*/
public
void
setDepartmentName
(
String
departmentName
)
{
this
.
departmentName
=
departmentName
;
}
/**
* 获取:所在部门名称
*/
public
String
getDepartmentName
()
{
return
departmentName
;
}
/**
* 设置:申请数据
*/
public
void
setRequestData
(
String
requestData
)
{
this
.
requestData
=
requestData
;
}
/**
* 获取:申请数据
*/
public
String
getRequestData
()
{
return
requestData
;
}
/**
* 设置:审批表单
*/
public
void
setFroms
(
String
froms
)
{
this
.
froms
=
froms
;
}
/**
* 获取:审批表单
*/
public
String
getFroms
()
{
return
froms
;
}
/**
* 设置:审批流程
*/
public
void
setRouter
(
String
router
)
{
this
.
router
=
router
;
}
/**
* 获取:审批流程
*/
public
String
getRouter
()
{
return
router
;
}
/**
* 设置:通过节点
*/
public
void
setFlowChildren
(
String
flowChildren
)
{
this
.
flowChildren
=
flowChildren
;
}
/**
* 获取:通过节点
*/
public
String
getFlowChildren
()
{
return
flowChildren
;
}
}
src/main/java/cn/timer/api/bean/spmk/SpmkApproveDrafts.java
0 → 100644
View file @
ed3e6247
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 审批草稿箱
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-16 14:52:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approve_drafts"
)
@ApiModel
(
"审批草稿箱"
)
public
class
SpmkApproveDrafts
extends
Model
<
SpmkApproveDrafts
>
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 审批编号
*/
private
Integer
id
;
/**
* 企业组织代码
*/
private
Integer
orgCode
;
/**
* 发起人id 用于搜索(所在部门)
*/
private
Integer
empNum
;
/**
* 标题
*/
private
String
title
;
/**
* 所在部门名称
*/
private
String
departmentName
;
/**
* 发起人名称
*/
private
String
initiator
;
/**
* 发起时间
*/
private
Date
createTime
;
/**
* 审批名称
*/
private
String
approveName
;
/**
* 状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝
*/
private
Integer
sts
;
/**
* 当前审批人
*/
private
String
currentApprover
;
/**
* 历史审批人
*/
private
String
historyApprover
;
/**
* assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 10调薪
*/
private
Integer
assoType
;
/**
* 最近处理时间
*/
private
Date
updateTime
;
/**
* 结束时间
*/
private
Date
endTime
;
/**
* 摘要
*/
private
String
digest
;
/**
* 是否删除 0-否 1-是
*/
private
Integer
isDelete
;
/**
* 是否加急 0-否 1-是
*/
private
Integer
isUrgent
;
/**
* 设置:审批编号
*/
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
/**
* 获取:审批编号
*/
public
Integer
getId
()
{
return
id
;
}
/**
* 设置:企业组织代码
*/
public
void
setOrgCode
(
Integer
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
/**
* 获取:企业组织代码
*/
public
Integer
getOrgCode
()
{
return
orgCode
;
}
/**
* 设置:发起人id 用于搜索(所在部门)
*/
public
void
setEmpNum
(
Integer
empNum
)
{
this
.
empNum
=
empNum
;
}
/**
* 获取:发起人id 用于搜索(所在部门)
*/
public
Integer
getEmpNum
()
{
return
empNum
;
}
/**
* 设置:标题
*/
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
/**
* 获取:标题
*/
public
String
getTitle
()
{
return
title
;
}
/**
* 设置:所在部门名称
*/
public
void
setDepartmentName
(
String
departmentName
)
{
this
.
departmentName
=
departmentName
;
}
/**
* 获取:所在部门名称
*/
public
String
getDepartmentName
()
{
return
departmentName
;
}
/**
* 设置:发起人名称
*/
public
void
setInitiator
(
String
initiator
)
{
this
.
initiator
=
initiator
;
}
/**
* 获取:发起人名称
*/
public
String
getInitiator
()
{
return
initiator
;
}
/**
* 设置:发起时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:发起时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 设置:审批名称
*/
public
void
setApproveName
(
String
approveName
)
{
this
.
approveName
=
approveName
;
}
/**
* 获取:审批名称
*/
public
String
getApproveName
()
{
return
approveName
;
}
/**
* 设置:状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝
*/
public
void
setSts
(
Integer
sts
)
{
this
.
sts
=
sts
;
}
/**
* 获取:状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝
*/
public
Integer
getSts
()
{
return
sts
;
}
/**
* 设置:当前审批人
*/
public
void
setCurrentApprover
(
String
currentApprover
)
{
this
.
currentApprover
=
currentApprover
;
}
/**
* 获取:当前审批人
*/
public
String
getCurrentApprover
()
{
return
currentApprover
;
}
/**
* 设置:历史审批人
*/
public
void
setHistoryApprover
(
String
historyApprover
)
{
this
.
historyApprover
=
historyApprover
;
}
/**
* 获取:历史审批人
*/
public
String
getHistoryApprover
()
{
return
historyApprover
;
}
/**
* 设置:assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 10调薪
*/
public
void
setAssoType
(
Integer
assoType
)
{
this
.
assoType
=
assoType
;
}
/**
* 获取:assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 10调薪
*/
public
Integer
getAssoType
()
{
return
assoType
;
}
/**
* 设置:最近处理时间
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
/**
* 获取:最近处理时间
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
/**
* 设置:结束时间
*/
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
/**
* 获取:结束时间
*/
public
Date
getEndTime
()
{
return
endTime
;
}
/**
* 设置:摘要
*/
public
void
setDigest
(
String
digest
)
{
this
.
digest
=
digest
;
}
/**
* 获取:摘要
*/
public
String
getDigest
()
{
return
digest
;
}
/**
* 设置:是否删除 0-否 1-是
*/
public
void
setIsDelete
(
Integer
isDelete
)
{
this
.
isDelete
=
isDelete
;
}
/**
* 获取:是否删除 0-否 1-是
*/
public
Integer
getIsDelete
()
{
return
isDelete
;
}
/**
* 设置:是否加急 0-否 1-是
*/
public
void
setIsUrgent
(
Integer
isUrgent
)
{
this
.
isUrgent
=
isUrgent
;
}
/**
* 获取:是否加急 0-否 1-是
*/
public
Integer
getIsUrgent
()
{
return
isUrgent
;
}
}
src/main/java/cn/timer/api/bean/spmk/SpmkApproveExecuteRecordDrafts.java
0 → 100644
View file @
ed3e6247
package
cn
.
timer
.
api
.
bean
.
spmk
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 审批执行记录 发起人、抄送人、审批人操作记录--草稿
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-19 14:53:36
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"spmk_approve_execute_record_drafts"
)
@ApiModel
(
"审批执行记录 发起人、抄送人、审批人操作记录--草稿"
)
public
class
SpmkApproveExecuteRecordDrafts
extends
Model
<
SpmkApproveExecuteRecordDrafts
>
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 编号
*/
private
Integer
id
;
/**
* 审批汇总id
*/
private
Integer
approveSummaryId
;
/**
* 名称 发起申请 1抄送人 审批人 连续多级主管
*/
private
String
name
;
/**
* 类型 0发起申请 1抄送人 2审批人 3连续多级主管
*/
private
Integer
type
;
/**
* 状态 0未执行 1审批中 2同意 3拒绝
*/
private
Integer
sts
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
* 设置:编号
*/
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
/**
* 获取:编号
*/
public
Integer
getId
()
{
return
id
;
}
/**
* 设置:审批汇总id
*/
public
void
setApproveSummaryId
(
Integer
approveSummaryId
)
{
this
.
approveSummaryId
=
approveSummaryId
;
}
/**
* 获取:审批汇总id
*/
public
Integer
getApproveSummaryId
()
{
return
approveSummaryId
;
}
/**
* 设置:名称 发起申请 1抄送人 审批人 连续多级主管
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/**
* 获取:名称 发起申请 1抄送人 审批人 连续多级主管
*/
public
String
getName
()
{
return
name
;
}
/**
* 设置:类型 0发起申请 1抄送人 2审批人 3连续多级主管
*/
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
/**
* 获取:类型 0发起申请 1抄送人 2审批人 3连续多级主管
*/
public
Integer
getType
()
{
return
type
;
}
/**
* 设置:状态 0未执行 1审批中 2同意 3拒绝
*/
public
void
setSts
(
Integer
sts
)
{
this
.
sts
=
sts
;
}
/**
* 获取:状态 0未执行 1审批中 2同意 3拒绝
*/
public
Integer
getSts
()
{
return
sts
;
}
/**
* 设置:创建时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 设置:
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
/**
* 获取:
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
}
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
ed3e6247
...
@@ -111,6 +111,9 @@ public class SpmkController {
...
@@ -111,6 +111,9 @@ public class SpmkController {
@Autowired
@Autowired
private
SpmkAssoBusinessFactory
spmkAssoBusinessFactory
;
private
SpmkAssoBusinessFactory
spmkAssoBusinessFactory
;
@Autowired
private
SpmkApproveDetailDraftsMapper
spmkApproveDetailDraftsMapper
;
private
static
com
.
alibaba
.
fastjson
.
JSONObject
jsonObject
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
private
static
com
.
alibaba
.
fastjson
.
JSONObject
jsonObject
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
private
boolean
ISFIRST
=
true
;
// 第一次启动审批流程
private
boolean
ISFIRST
=
true
;
// 第一次启动审批流程
...
@@ -118,6 +121,9 @@ public class SpmkController {
...
@@ -118,6 +121,9 @@ public class SpmkController {
@Resource
@Resource
private
RedisUtil
redisUtil
;
private
RedisUtil
redisUtil
;
@Autowired
private
SpmkApproveDraftsMapper
spmkApproveDraftsMapper
;
//TODO 审批模板组
//TODO 审批模板组
/**
/**
...
@@ -752,6 +758,19 @@ public class SpmkController {
...
@@ -752,6 +758,19 @@ public class SpmkController {
}
}
/**
* 审批详情
*/
@GetMapping
(
value
=
"/select_drafts_detail/{id}"
)
@ApiOperation
(
value
=
"草稿箱审批详情"
,
httpMethod
=
"GET"
,
notes
=
"审批详情"
)
@Log
(
title
=
"审批-审批详情"
,
businessType
=
BusinessType
.
OTHER
)
public
Result
<
Object
>
selectdd
(
@CurrentUser
UserBean
userBean
,
@PathVariable
(
required
=
true
)
Integer
id
)
{
SpmkApproveDetailDto
adD
=
spmkService
.
selectDraftsDetailByAsId
(
id
);
System
.
out
.
println
(
ResultUtil
.
data
(
adD
));
return
ResultUtil
.
data
(
adD
);
}
//TODO 审批人审批
//TODO 审批人审批
/**
/**
* 审批人审批
* 审批人审批
...
@@ -1184,4 +1203,116 @@ public class SpmkController {
...
@@ -1184,4 +1203,116 @@ public class SpmkController {
return
ResultUtil
.
data
(
JSON
.
toJSONString
(
detailSummary
));
return
ResultUtil
.
data
(
JSON
.
toJSONString
(
detailSummary
));
}
}
@PostMapping
(
value
=
"/save_drafts"
)
@ApiOperation
(
value
=
"存入草稿箱"
,
httpMethod
=
"POST"
,
notes
=
"存入草稿箱"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Log
(
title
=
"审批-存入草稿箱"
,
businessType
=
BusinessType
.
INSERT
)
public
Result
<
Object
>
saveDrafts
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
SpmkApproveSummaryDto
spmkApproveSummaryDto
)
throws
Exception
{
try
{
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>()
.
lambda
()
.
select
(
YgglMainEmp:
:
getHeadUrl
,
YgglMainEmp:
:
getName
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
userBean
.
getEmpNum
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
);
if
(
ygglMainEmp
==
null
)
return
ResultUtil
.
error
(
"发起人不存在!"
);
// List<SpmkApprovalG> saG = spmkService.selectListAg(userBean);
Router
router
=
spmkApproveSummaryDto
.
getRouter
();
// routers = RouterUtils.clearRouters(routers);
/*TODO 验证是否拥有添加审核人的权限 只用于华颐*/
QyzxEmpEntAsso
ent
=
QyzxEmpEntAsso
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
if
(
ent
!=
null
)
{
/*超管和管理员不受权限控制*/
if
(
ent
.
getUserType
()
==
2
)
{
ZzglAuth
zzglAuth
=
ZzglAuth
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
ZzglAuth
>().
lambda
().
eq
(
ZzglAuth:
:
getBmgwId
,
userBean
.
getUserInfo
().
getBmgwId
())
.
eq
(
ZzglAuth:
:
getMenuId
,
"/Approvalspbutonspbuton020101"
));
/*如果没有该权限*/
if
(
zzglAuth
==
null
){
SpmkCustomApproval
ca
=
SpmkCustomApproval
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
SpmkCustomApproval
>().
lambda
()
.
eq
(
SpmkCustomApproval:
:
getName
,
spmkApproveSummaryDto
.
getApproveName
()).
eq
(
SpmkCustomApproval:
:
getOrgCode
,
userBean
.
getOrgCode
()));
Router
oldRouter
=
ObjectUtil
.
deserialize
(
ca
.
getRouter
());
if
(
isTrue
(
router
.
getChildren
(),
oldRouter
.
getChildren
())){
return
ResultUtil
.
error
(
"您没有新增审批人的权限"
);
}
}
}
}
List
<
Router
>
listRouter
=
new
ArrayList
<
Router
>();
listRouter
.
add
(
router
);
JSONObject
jSONObject
=
spmkApproveSummaryDto
.
getRequestData
()
.
set
(
"orgCode"
,
userBean
.
getOrgCode
())
.
set
(
"initiator"
,
ygglMainEmp
.
getName
())
.
set
(
"headUrl"
,
ygglMainEmp
.
getHeadUrl
())
.
set
(
"id"
,
userBean
.
getEmpNum
());
RouterUtils
.
NextNode
(
listRouter
,
jSONObject
,
ISFIRST
);
List
<
FlowChildren
>
listFlowChildren
=
new
ArrayList
<
FlowChildren
>();
RouterUtils
.
getIsFlowChildren
(
listRouter
,
listFlowChildren
);
String
currentApprover
=
jSONObject
.
getStr
(
"current_approver"
);
SpmkApproveDrafts
as
=
SpmkApproveDrafts
.
builder
()
.
orgCode
(
userBean
.
getOrgCode
())
.
empNum
(
userBean
.
getEmpNum
())
.
title
(
spmkApproveSummaryDto
.
getTitle
())
.
initiator
(
spmkApproveSummaryDto
.
getInitiator
())
.
approveName
(
spmkApproveSummaryDto
.
getApproveName
())
.
assoType
(
spmkApproveSummaryDto
.
getAssoType
())
.
sts
(
ApproveSummarySts
.
IN
.
ordinal
())
.
currentApprover
(
currentApprover
).
isUrgent
(
spmkApproveSummaryDto
.
getIsUrgent
())
.
build
();
if
(
spmkApproveSummaryDto
.
getId
()!=
null
){
as
.
setId
(
spmkApproveSummaryDto
.
getId
());
as
.
setUpdateTime
(
new
Date
());
}
if
(!
as
.
insertOrUpdate
())
{
throw
new
CustomException
(
"审批草稿汇总-新增异常"
);
}
// 草稿不插入执审批流程
// RouterUtils.insertogExecuteRecord(listFlowChildren, as.getId());
// 封装 审批详情
SpmkApproveDetailDrafts
adm
=
SpmkApproveDetailDrafts
.
builder
().
build
();
adm
.
setApproveSummaryId
(
as
.
getId
());
adm
.
setName
(
spmkApproveSummaryDto
.
getTitle
());
adm
.
setRequestData
(
spmkApproveSummaryDto
.
getRequestData
().
toString
());
adm
.
setFroms
(
spmkApproveSummaryDto
.
getFroms
().
toString
());
adm
.
setRouter
(
listRouter
.
get
(
0
).
toJSONString
());
adm
.
setFlowChildren
(
JSONArray
.
fromObject
(
listFlowChildren
).
toString
());
if
(
spmkApproveSummaryDto
.
getId
()!=
null
){
SpmkApproveDetailDrafts
sp
=
SpmkApproveDetailDrafts
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
SpmkApproveDetailDrafts
>().
lambda
().
eq
(
SpmkApproveDetailDrafts:
:
getApproveSummaryId
,
spmkApproveSummaryDto
.
getId
()));
adm
.
setId
(
sp
.
getId
());
spmkApproveDetailDraftsMapper
.
updateById
(
adm
);
}
else
{
spmkApproveDetailDraftsMapper
.
insert
(
adm
);
}
return
ResultUtil
.
data
(
as
.
getId
());
}
catch
(
Exception
e
){
// throw new CustomException("审批草稿详情-新增异常");
e
.
printStackTrace
();
}
return
ResultUtil
.
error
(
"审批草稿详情-新增异常"
);
};
@PostMapping
(
value
=
"/my_drafts"
)
@ApiOperation
(
value
=
"我的草稿箱"
,
httpMethod
=
"POST"
,
notes
=
"我的草稿箱"
)
@Log
(
title
=
"审批-我的草稿箱"
,
businessType
=
BusinessType
.
OTHER
)
public
Result
<
Object
>
myDrafts
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
MySummaryQueryDto
mySummaryQueryDto
){
IPage
<
SpmkApproveDrafts
>
page
=
new
Page
<
SpmkApproveDrafts
>(
mySummaryQueryDto
.
getCurrentPage
()
==
null
?
1
:
mySummaryQueryDto
.
getCurrentPage
(),
mySummaryQueryDto
.
getTotalPage
()
==
null
?
10
:
mySummaryQueryDto
.
getTotalPage
());
mySummaryQueryDto
.
setOrgCode
(
userBean
.
getOrgCode
());
mySummaryQueryDto
.
setEmpNum
(
userBean
.
getEmpNum
());
if
(
mySummaryQueryDto
.
getSts
()
==
null
)
{
mySummaryQueryDto
.
setSts
(
0
);
}
IPage
<
SpmkApproveDrafts
>
pageAs
=
spmkApproveDraftsMapper
.
selectPageByQueryForEmpNum
(
page
,
mySummaryQueryDto
);
List
<
SpmkApproveDrafts
>
listAs
=
pageAs
.
getRecords
();
return
ResultUtil
.
data
(
pageAs
,
listAs
);
}
}
}
src/main/java/cn/timer/api/controller/spmk/service/SpmkService.java
View file @
ed3e6247
...
@@ -9,11 +9,13 @@ import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
...
@@ -9,11 +9,13 @@ import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
public
interface
SpmkService
{
public
interface
SpmkService
{
boolean
createCustomApproval
(
Integer
orgCode
);
boolean
createCustomApproval
(
Integer
orgCode
);
SpmkApproveDetailDto
selectApproveDetailByAsId
(
Integer
asId
,
Integer
empNum
);
SpmkApproveDetailDto
selectApproveDetailByAsId
(
Integer
asId
,
Integer
empNum
);
List
<
SpmkApprovalG
>
selectListAg
(
UserBean
userBean
);
List
<
SpmkApprovalG
>
selectListAg
(
UserBean
userBean
);
String
addApproveDetail
();
String
addApproveDetail
();
SpmkApproveDetailDto
selectDraftsDetailByAsId
(
Integer
asId
);
}
}
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
View file @
ed3e6247
...
@@ -12,6 +12,7 @@ import cn.timer.api.dao.spmk.*;
...
@@ -12,6 +12,7 @@ import cn.timer.api.dao.spmk.*;
import
cn.timer.api.dto.spmk.FlowChildren
;
import
cn.timer.api.dto.spmk.FlowChildren
;
import
cn.timer.api.dto.spmk.Router
;
import
cn.timer.api.dto.spmk.Router
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
org.checkerframework.checker.units.qual.A
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -28,22 +29,28 @@ import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
...
@@ -28,22 +29,28 @@ import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
@Service
@Service
public
class
SpmkServiceImpl
implements
SpmkService
{
public
class
SpmkServiceImpl
implements
SpmkService
{
@Autowired
@Autowired
private
ZzglBmgwMService
zzglBmgwMService
;
private
ZzglBmgwMService
zzglBmgwMService
;
@Autowired
@Autowired
private
SpmkApproveDetailMapper
spmkApproveDetailMapper
;
private
SpmkApproveDetailMapper
spmkApproveDetailMapper
;
@Autowired
@Autowired
private
SpmkApprovalGMapper
spmkApprovalGMapper
;
private
SpmkApprovalGMapper
spmkApprovalGMapper
;
@Autowired
@Autowired
private
SpmkApproveExecuteRecordMapper
spmkApproveExecuteRecordMapper
;
private
SpmkApproveExecuteRecordMapper
spmkApproveExecuteRecordMapper
;
@Autowired
@Autowired
private
SpmkApproveDetailSummaryMapper
spmkApproveDetailSummaryMapper
;
private
SpmkApproveDetailSummaryMapper
spmkApproveDetailSummaryMapper
;
@Autowired
private
SpmkApproveDetailDraftsMapper
spmkApproveDetailDraftsMapper
;
@Autowired
private
SpmkApproveDraftsMapper
spmkApproveDraftsMapper
;
private
static
com
.
alibaba
.
fastjson
.
JSONObject
jsonObject
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
private
static
com
.
alibaba
.
fastjson
.
JSONObject
jsonObject
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
/**
/**
...
@@ -62,7 +69,7 @@ public class SpmkServiceImpl implements SpmkService{
...
@@ -62,7 +69,7 @@ public class SpmkServiceImpl implements SpmkService{
saG
.
setOrgCode
(
orgCode
);
saG
.
setOrgCode
(
orgCode
);
listAG
.
add
(
saG
);
listAG
.
add
(
saG
);
}
}
Console
.
log
(
listAG
);
Console
.
log
(
listAG
);
SpmkCustomApproval
sca
=
SpmkCustomApproval
.
builder
().
build
();
SpmkCustomApproval
sca
=
SpmkCustomApproval
.
builder
().
build
();
List
<
SpmkApprovalTemplate
>
listAt
=
new
ArrayList
<
SpmkApprovalTemplate
>();
List
<
SpmkApprovalTemplate
>
listAt
=
new
ArrayList
<
SpmkApprovalTemplate
>();
...
@@ -77,12 +84,12 @@ public class SpmkServiceImpl implements SpmkService{
...
@@ -77,12 +84,12 @@ public class SpmkServiceImpl implements SpmkService{
sca
.
setOrgCode
(
orgCode
);
sca
.
setOrgCode
(
orgCode
);
sca
.
setApprovalGId
(
listAG
.
get
(
i
).
getId
());
sca
.
setApprovalGId
(
listAG
.
get
(
i
).
getId
());
sca
.
setIsAllvisible
(
1
);
sca
.
setIsAllvisible
(
1
);
sca
.
insert
();
sca
.
insert
();
}
}
}
}
}
}
return
true
;
return
true
;
}
}
...
@@ -104,7 +111,7 @@ public class SpmkServiceImpl implements SpmkService{
...
@@ -104,7 +111,7 @@ public class SpmkServiceImpl implements SpmkService{
sum
=
SpmkApproveSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
SpmkApproveSummary
>().
lambda
().
select
(
SpmkApproveSummary:
:
getId
,
SpmkApproveSummary:
:
getEmpNum
,
SpmkApproveSummary:
:
getSts
,
SpmkApproveSummary:
:
getCreateTime
,
SpmkApproveSummary:
:
getDigest
)
sum
=
SpmkApproveSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
SpmkApproveSummary
>().
lambda
().
select
(
SpmkApproveSummary:
:
getId
,
SpmkApproveSummary:
:
getEmpNum
,
SpmkApproveSummary:
:
getSts
,
SpmkApproveSummary:
:
getCreateTime
,
SpmkApproveSummary:
:
getDigest
)
.
eq
(
SpmkApproveSummary:
:
getId
,
ad
.
getApproveSummaryId
()));
.
eq
(
SpmkApproveSummary:
:
getId
,
ad
.
getApproveSummaryId
()));
}
}
SpmkApproveDetailDto
adD
=
SpmkApproveDetailDto
.
builder
().
build
();
SpmkApproveDetailDto
adD
=
SpmkApproveDetailDto
.
builder
().
build
();
if
(
ad
==
null
)
{
if
(
ad
==
null
)
{
return
null
;
return
null
;
...
@@ -125,25 +132,75 @@ public class SpmkServiceImpl implements SpmkService{
...
@@ -125,25 +132,75 @@ public class SpmkServiceImpl implements SpmkService{
adD
.
setFlowChildren
(
jsonObject
.
parseArray
(
ad
.
getFlowChildren
(),
FlowChildren
.
class
));
adD
.
setFlowChildren
(
jsonObject
.
parseArray
(
ad
.
getFlowChildren
(),
FlowChildren
.
class
));
}
}
adD
.
setApproveExecuteRecord
(
listAer
);
adD
.
setApproveExecuteRecord
(
listAer
);
/*** 标记 执行人 阅读 ***/
if
(
sum
!=
null
)
{
if
(!
CollectionUtils
.
isEmpty
(
listAer
)){
adD
.
setEmpNum
(
sum
.
getEmpNum
());
this
.
updateSpmkExecutorReadStatus
(
listAer
,
empNum
);
adD
.
setSts
(
sum
.
getSts
());
adD
.
setLaunchTime
(
sum
.
getCreateTime
());
SpmkExecutor
exe
=
null
;
SpmkApproveExecuteRecord
exere
=
SpmkApproveExecuteRecord
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
SpmkApproveExecuteRecord
>().
lambda
().
select
(
SpmkApproveExecuteRecord:
:
getId
).
eq
(
SpmkApproveExecuteRecord:
:
getApproveSummaryId
,
sum
.
getId
())
.
eq
(
SpmkApproveExecuteRecord:
:
getSts
,
1
));
if
(
exere
!=
null
)
{
exe
=
SpmkExecutor
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
SpmkExecutor
>().
lambda
().
eq
(
SpmkExecutor:
:
getApproveExecuteRecordId
,
exere
.
getId
()).
orderByDesc
(
SpmkExecutor:
:
getId
));
}
if
(
exe
!=
null
)
{
adD
.
setExecuteEmpNum
(
exe
.
getEmpNum
());
adD
.
setExecuteSts
(
exe
.
getSts
());
adD
.
setExeid
(
exe
.
getId
());
adD
.
setExereid
(
exere
.
getId
());
}
}
}
/*** 标记执行人阅读 结束***/
return
adD
;
}
//草稿箱用
public
SpmkApproveDetailDto
selectDraftsDetailByAsId
(
Integer
asId
)
{
// TODO Auto-generated method stub
//SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, asId));
SpmkApproveDetailDrafts
ad
=
spmkApproveDetailDraftsMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveDetailDrafts
>().
lambda
().
eq
(
SpmkApproveDetailDrafts:
:
getApproveSummaryId
,
asId
));
SpmkApproveDrafts
sum
=
null
;
if
(
ad
!=
null
)
{
sum
=
SpmkApproveDrafts
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
SpmkApproveDrafts
>().
lambda
().
select
(
SpmkApproveDrafts:
:
getId
,
SpmkApproveDrafts:
:
getEmpNum
,
SpmkApproveDrafts:
:
getSts
,
SpmkApproveDrafts:
:
getCreateTime
)
.
eq
(
SpmkApproveDrafts:
:
getId
,
ad
.
getApproveSummaryId
()));
}
SpmkApproveDetailDto
adD
=
SpmkApproveDetailDto
.
builder
().
build
();
if
(
ad
==
null
)
{
return
null
;
}
//审批操作记录
// List<SpmkApproveExecuteRecord> listAer = spmkApproveExecuteRecordMapper.selectListByAsId(asId);
BeanUtil
.
copyProperties
(
ad
,
adD
,
"requestData"
,
"froms"
,
"router"
,
"flowChildren"
,
"spmkApproveExecuteRecord"
);
if
(
ad
.
getRequestData
()
!=
null
)
{
adD
.
setRequestData
(
jsonObject
.
parseObject
(
ad
.
getRequestData
(),
JSONObject
.
class
));
}
if
(
ad
.
getFroms
()!=
null
)
{
adD
.
setFroms
(
jsonObject
.
parseArray
(
ad
.
getFroms
(),
JSONObject
.
class
));
}
if
(
ad
.
getFlowChildren
()
!=
null
)
{
adD
.
setRouter
(
jsonObject
.
parseObject
(
ad
.
getRouter
(),
Router
.
class
));
}
if
(
ad
.
getFlowChildren
()!=
null
)
{
adD
.
setFlowChildren
(
jsonObject
.
parseArray
(
ad
.
getFlowChildren
(),
FlowChildren
.
class
));
}
// adD.setApproveExecuteRecord(listAer);
if
(
sum
!=
null
)
{
if
(
sum
!=
null
)
{
adD
.
setEmpNum
(
sum
.
getEmpNum
());
adD
.
setEmpNum
(
sum
.
getEmpNum
());
adD
.
setSts
(
sum
.
getSts
());
adD
.
setSts
(
sum
.
getSts
());
adD
.
setLaunchTime
(
sum
.
getCreateTime
());
adD
.
setLaunchTime
(
sum
.
getCreateTime
());
adD
.
setDigest
(
sum
.
getDigest
());
adD
.
setDigest
(
sum
.
getDigest
());
SpmkExecutor
exe
=
null
;
SpmkExecutor
exe
=
null
;
SpmkApproveExecuteRecord
exere
=
SpmkApproveExecuteRecord
.
builder
().
build
()
SpmkApproveExecuteRecord
exere
=
SpmkApproveExecuteRecord
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
SpmkApproveExecuteRecord
>().
lambda
().
select
(
SpmkApproveExecuteRecord:
:
getId
).
eq
(
SpmkApproveExecuteRecord:
:
getApproveSummaryId
,
sum
.
getId
())
.
selectOne
(
new
QueryWrapper
<
SpmkApproveExecuteRecord
>().
lambda
().
select
(
SpmkApproveExecuteRecord:
:
getId
).
eq
(
SpmkApproveExecuteRecord:
:
getApproveSummaryId
,
sum
.
getId
())
.
eq
(
SpmkApproveExecuteRecord:
:
getSts
,
1
));
.
eq
(
SpmkApproveExecuteRecord:
:
getSts
,
1
));
if
(
exere
!=
null
)
{
if
(
exere
!=
null
)
{
exe
=
SpmkExecutor
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
SpmkExecutor
>().
lambda
().
eq
(
SpmkExecutor:
:
getApproveExecuteRecordId
,
exere
.
getId
()).
orderByDesc
(
SpmkExecutor:
:
getId
));
exe
=
SpmkExecutor
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
SpmkExecutor
>().
lambda
().
eq
(
SpmkExecutor:
:
getApproveExecuteRecordId
,
exere
.
getId
()).
orderByDesc
(
SpmkExecutor:
:
getId
));
}
}
if
(
exe
!=
null
)
{
if
(
exe
!=
null
)
{
adD
.
setExecuteEmpNum
(
exe
.
getEmpNum
());
adD
.
setExecuteEmpNum
(
exe
.
getEmpNum
());
adD
.
setExecuteSts
(
exe
.
getSts
());
adD
.
setExecuteSts
(
exe
.
getSts
());
...
@@ -151,7 +208,7 @@ public class SpmkServiceImpl implements SpmkService{
...
@@ -151,7 +208,7 @@ public class SpmkServiceImpl implements SpmkService{
adD
.
setExereid
(
exere
.
getId
());
adD
.
setExereid
(
exere
.
getId
());
}
}
}
}
return
adD
;
return
adD
;
}
}
...
...
src/main/java/cn/timer/api/dao/spmk/SpmkApproveDetailDraftsMapper.java
0 → 100644
View file @
ed3e6247
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
cn.timer.api.bean.spmk.SpmkApproveDetailDrafts
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* 审批草稿详情
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-16 14:52:01
*/
@Repository
public
interface
SpmkApproveDetailDraftsMapper
extends
BaseMapper
<
SpmkApproveDetailDrafts
>
{
}
src/main/java/cn/timer/api/dao/spmk/SpmkApproveDraftsMapper.java
0 → 100644
View file @
ed3e6247
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
cn.timer.api.bean.spmk.SpmkApproveDrafts
;
import
cn.timer.api.bean.spmk.SpmkApproveSummary
;
import
cn.timer.api.dto.spmk.MySummaryQueryDto
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
io.swagger.models.auth.In
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* 审批草稿箱
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-16 14:52:01
*/
@Repository
public
interface
SpmkApproveDraftsMapper
extends
BaseMapper
<
SpmkApproveDrafts
>
{
IPage
<
SpmkApproveDrafts
>
selectPageByQueryForEmpNum
(
IPage
<
SpmkApproveDrafts
>
page
,
@Param
(
"param"
)
MySummaryQueryDto
mySummaryQueryDto
);
}
src/main/java/cn/timer/api/dao/spmk/SpmkApproveExecuteRecordDraftsMapper.java
0 → 100644
View file @
ed3e6247
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 审批执行记录 发起人、抄送人、审批人操作记录--草稿
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-08-19 14:53:36
*/
public
interface
SpmkApproveExecuteRecordDraftsMapper
extends
BaseMapper
<
SpmkApproveExecuteRecordDrafts
>
{
}
src/main/java/cn/timer/api/dto/spmk/SpmkApproveSummaryDto.java
View file @
ed3e6247
...
@@ -62,4 +62,7 @@ public class SpmkApproveSummaryDto{
...
@@ -62,4 +62,7 @@ public class SpmkApproveSummaryDto{
@ApiModelProperty
(
value
=
"是否加急"
,
example
=
"是否加急"
,
required
=
true
)
@ApiModelProperty
(
value
=
"是否加急"
,
example
=
"是否加急"
,
required
=
true
)
private
Integer
isUrgent
;
private
Integer
isUrgent
;
@ApiModelProperty
private
Integer
id
;
}
}
src/main/resources/mapping/spmk/SpmkApproveDetailDraftsMapper.xml
0 → 100644
View file @
ed3e6247
<?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.SpmkApproveDetailDraftsMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"cn.timer.api.bean.spmk.SpmkApproveDetailDrafts"
id=
"spmkApproveDetailDraftsMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"approveSummaryId"
column=
"approve_summary_id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"departmentName"
column=
"department_name"
/>
<result
property=
"requestData"
column=
"request_data"
/>
<result
property=
"froms"
column=
"froms"
/>
<result
property=
"router"
column=
"router"
/>
<result
property=
"flowChildren"
column=
"flow_children"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"cn.timer.api.bean.spmk.SpmkApproveDetailDrafts"
>
select *
from spmk_approve_detail_drafts
where id = #{value}
</select>
<select
id=
"queryList"
resultType=
"cn.timer.api.bean.spmk.SpmkApproveDetailDrafts"
>
select * from spmk_approve_detail_drafts
<where>
<if
test=
"approveSummaryId != null and approveSummaryId != ''"
>
AND `approve_summary_id` =
#{approveSummaryId}
</if>
<if
test=
"name != null and name != ''"
>
AND `name` = #{name}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND `department_name` = #{departmentName}
</if>
<if
test=
"requestData != null and requestData != ''"
>
AND `request_data` = #{requestData}
</if>
<if
test=
"froms != null and froms != ''"
>
AND `froms` = #{froms}
</if>
<if
test=
"router != null and router != ''"
>
AND `router` = #{router}
</if>
<if
test=
"flowChildren != null and flowChildren != ''"
>
AND `flow_children` = #{flowChildren}
</if>
</where>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from spmk_approve_detail_drafts
<where>
<if
test=
"approveSummaryId != null and approveSummaryId != ''"
>
AND `approve_summary_id` =
#{approveSummaryId}
</if>
<if
test=
"name != null and name != ''"
>
AND `name` = #{name}
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
AND `department_name` = #{departmentName}
</if>
<if
test=
"requestData != null and requestData != ''"
>
AND `request_data` = #{requestData}
</if>
<if
test=
"froms != null and froms != ''"
>
AND `froms` = #{froms}
</if>
<if
test=
"router != null and router != ''"
>
AND `router` = #{router}
</if>
<if
test=
"flowChildren != null and flowChildren != ''"
>
AND `flow_children` = #{flowChildren}
</if>
</where>
</select>
<insert
id=
"save"
parameterType=
"cn.timer.api.bean.spmk.SpmkApproveDetailDrafts"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into spmk_approve_detail_drafts
(`approve_summary_id`,
`name`,
`department_name`,
`request_data`,
`froms`,
`router`,
`flow_children`)
values (#{approveSummaryId},
#{name},
#{departmentName},
#{requestData},
#{froms},
#{router},
#{flowChildren})
</insert>
<insert
id=
"saveSelective"
parameterType=
"cn.timer.api.bean.spmk.SpmkApproveDetailDrafts"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into spmk_approve_detail_drafts
(
<if
test=
"approveSummaryId != null"
>
,`approve_summary_id`
</if>
<if
test=
"name != null"
>
,`name`
</if>
<if
test=
"departmentName != null"
>
,`department_name`
</if>
<if
test=
"requestData != null"
>
,`request_data`
</if>
<if
test=
"froms != null"
>
,`froms`
</if>
<if
test=
"router != null"
>
,`router`
</if>
<if
test=
"flowChildren != null"
>
,`flow_children`
</if>
)
values
(
<if
test=
"approveSummaryId != null"
>
,#{approveSummaryId}
</if>
<if
test=
"name != null"
>
,#{name}
</if>
<if
test=
"departmentName != null"
>
,#{departmentName}
</if>
<if
test=
"requestData != null"
>
,#{requestData}
</if>
<if
test=
"froms != null"
>
,#{froms}
</if>
<if
test=
"router != null"
>
,#{router}
</if>
<if
test=
"flowChildren != null"
>
,#{flowChildren}
</if>
)
</insert>
<insert
id=
"saveList"
parameterType=
"cn.timer.api.bean.spmk.SpmkApproveDetailDrafts"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into spmk_approve_detail_drafts
(
`approve_summary_id`,
`name`,
`department_name`,
`request_data`,
`froms`,
`router`,
`flow_children`
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.approveSummaryId},
#{item.name},
#{item.departmentName},
#{item.requestData},
#{item.froms},
#{item.router},
#{item.flowChildren}
)
</foreach>
</insert>
<update
id=
"update"
parameterType=
"cn.timer.api.bean.spmk.SpmkApproveDetailDrafts"
>
update spmk_approve_detail_drafts
<set>
<if
test=
"approveSummaryId != null"
>
`approve_summary_id` = #{approveSummaryId},
</if>
<if
test=
"name != null"
>
`name` = #{name},
</if>
<if
test=
"departmentName != null"
>
`department_name` = #{departmentName},
</if>
<if
test=
"requestData != null"
>
`request_data` = #{requestData},
</if>
<if
test=
"froms != null"
>
`froms` = #{froms},
</if>
<if
test=
"router != null"
>
`router` = #{router},
</if>
<if
test=
"flowChildren != null"
>
`flow_children` = #{flowChildren}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete
from spmk_approve_detail_drafts
where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from spmk_approve_detail_drafts where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
src/main/resources/mapping/spmk/SpmkApproveDraftsMapper.xml
0 → 100644
View file @
ed3e6247
<?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.SpmkApproveDraftsMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"cn.timer.api.bean.spmk.SpmkApproveDrafts"
id=
"spmkApproveDraftsMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"orgCode"
column=
"org_code"
/>
<result
property=
"empNum"
column=
"emp_num"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"departmentName"
column=
"department_name"
/>
<result
property=
"initiator"
column=
"initiator"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"approveName"
column=
"approve_name"
/>
<result
property=
"sts"
column=
"sts"
/>
<result
property=
"currentApprover"
column=
"current_approver"
/>
<result
property=
"historyApprover"
column=
"history_approver"
/>
<result
property=
"assoType"
column=
"asso_type"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"digest"
column=
"digest"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"isUrgent"
column=
"is_urgent"
/>
</resultMap>
<select
id=
"selectPageByQueryForEmpNum"
resultMap=
"spmkApproveDraftsMap"
>
SELECT
*
FROM spmk_approve_drafts a
WHERE a.org_code = #{param.orgCode} and a.is_delete=0 and a.emp_num=#{param.empNum}
ORDER BY a.id DESC
</select>
</mapper>
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordDraftsMapper.xml
0 → 100644
View file @
ed3e6247
<?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.SpmkApproveExecuteRecordDraftsMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts"
id=
"spmkApproveExecuteRecordDraftsMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"approveSummaryId"
column=
"approve_summary_id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"sts"
column=
"sts"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts"
>
select *
from spmk_approve_execute_record_drafts
where id = #{value}
</select>
<select
id=
"queryList"
resultType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts"
>
select * from spmk_approve_execute_record_drafts
<where>
<if
test=
"approveSummaryId != null and approveSummaryId != ''"
>
AND `approve_summary_id` =
#{approveSummaryId}
</if>
<if
test=
"name != null and name != ''"
>
AND `name` = #{name}
</if>
<if
test=
"type != null and type != ''"
>
AND `type` = #{type}
</if>
<if
test=
"sts != null and sts != ''"
>
AND `sts` = #{sts}
</if>
<if
test=
"createTime != null and createTime != ''"
>
AND `create_time` = #{createTime}
</if>
<if
test=
"updateTime != null and updateTime != ''"
>
AND `update_time` = #{updateTime}
</if>
</where>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from spmk_approve_execute_record_drafts
<where>
<if
test=
"approveSummaryId != null and approveSummaryId != ''"
>
AND `approve_summary_id` =
#{approveSummaryId}
</if>
<if
test=
"name != null and name != ''"
>
AND `name` = #{name}
</if>
<if
test=
"type != null and type != ''"
>
AND `type` = #{type}
</if>
<if
test=
"sts != null and sts != ''"
>
AND `sts` = #{sts}
</if>
<if
test=
"createTime != null and createTime != ''"
>
AND `create_time` = #{createTime}
</if>
<if
test=
"updateTime != null and updateTime != ''"
>
AND `update_time` = #{updateTime}
</if>
</where>
</select>
<insert
id=
"save"
parameterType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into spmk_approve_execute_record_drafts
(`approve_summary_id`,
`name`,
`type`,
`sts`,
`create_time`,
`update_time`)
values (#{approveSummaryId},
#{name},
#{type},
#{sts},
#{createTime},
#{updateTime})
</insert>
<insert
id=
"saveSelective"
parameterType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into spmk_approve_execute_record_drafts
(
<if
test=
"approveSummaryId != null"
>
,`approve_summary_id`
</if>
<if
test=
"name != null"
>
,`name`
</if>
<if
test=
"type != null"
>
,`type`
</if>
<if
test=
"sts != null"
>
,`sts`
</if>
<if
test=
"createTime != null"
>
,`create_time`
</if>
<if
test=
"updateTime != null"
>
,`update_time`
</if>
)
values
(
<if
test=
"approveSummaryId != null"
>
,#{approveSummaryId}
</if>
<if
test=
"name != null"
>
,#{name}
</if>
<if
test=
"type != null"
>
,#{type}
</if>
<if
test=
"sts != null"
>
,#{sts}
</if>
<if
test=
"createTime != null"
>
,#{createTime}
</if>
<if
test=
"updateTime != null"
>
,#{updateTime}
</if>
)
</insert>
<insert
id=
"saveList"
parameterType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into spmk_approve_execute_record_drafts
(
`approve_summary_id`,
`name`,
`type`,
`sts`,
`create_time`,
`update_time`
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.approveSummaryId},
#{item.name},
#{item.type},
#{item.sts},
#{item.createTime},
#{item.updateTime}
)
</foreach>
</insert>
<update
id=
"update"
parameterType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecordDrafts"
>
update spmk_approve_execute_record_drafts
<set>
<if
test=
"approveSummaryId != null"
>
`approve_summary_id` = #{approveSummaryId},
</if>
<if
test=
"name != null"
>
`name` = #{name},
</if>
<if
test=
"type != null"
>
`type` = #{type},
</if>
<if
test=
"sts != null"
>
`sts` = #{sts},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete
from spmk_approve_execute_record_drafts
where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from spmk_approve_execute_record_drafts where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
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