parent
076604f91c
commit
e9cfbc5224
27 changed files with 1505 additions and 0 deletions
@ -0,0 +1,24 @@ |
||||
package org.springblade.desk.common.constant; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-02-26 11:14 |
||||
*/ |
||||
public interface ApprovalStatusConstant { |
||||
|
||||
/** |
||||
* 待审核 |
||||
*/ |
||||
Integer WAITING = 0; |
||||
|
||||
/** |
||||
* 审核通过 |
||||
*/ |
||||
Integer PASS = 1; |
||||
|
||||
/** |
||||
* 审核失败 |
||||
*/ |
||||
Integer REJECT = 2; |
||||
} |
||||
@ -0,0 +1,9 @@ |
||||
package org.springblade.desk.common.constant; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-02-26 14:40 |
||||
*/ |
||||
public interface BizTypeConstant { |
||||
} |
||||
@ -0,0 +1,64 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.feign; |
||||
|
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
||||
/** |
||||
* 审批记录表 Feign接口类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@FeignClient( |
||||
value = "blade-desk" |
||||
) |
||||
public interface IMesApprovalRecordClient { |
||||
|
||||
String API_PREFIX = "/feign/client/mesApprovalRecord"; |
||||
String SAVE = API_PREFIX + "/save"; |
||||
String UPDATE = API_PREFIX + "/update"; |
||||
|
||||
/** |
||||
* 新增审批记录表 |
||||
* @param mesApprovalRecord 审批记录表 |
||||
* @return 结果 |
||||
*/ |
||||
@PostMapping(SAVE) |
||||
R save(@RequestBody MesApprovalRecordEntity mesApprovalRecord); |
||||
|
||||
/** |
||||
* 修改审批记录表 |
||||
* @param mesApprovalRecord 审批记录表 |
||||
* @return 结果 |
||||
*/ |
||||
@PostMapping(UPDATE) |
||||
R update(@RequestBody MesApprovalRecordEntity mesApprovalRecord); |
||||
} |
||||
@ -0,0 +1,57 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.feign; |
||||
|
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
||||
/** |
||||
* 通知消息 Feign接口类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@FeignClient( |
||||
value = "blade-desk" |
||||
) |
||||
public interface IMesNotifyMessageClient { |
||||
|
||||
String API_PREFIX = "/feign/client/mesNotifyMessage"; |
||||
String SAVE = API_PREFIX + "/save"; |
||||
|
||||
/** |
||||
* 获取通知消息列表 |
||||
* |
||||
* @param mesNotifyMessage 通知消息 |
||||
* @return 结果 |
||||
*/ |
||||
@PostMapping(SAVE) |
||||
R save(@RequestBody MesNotifyMessageEntity mesNotifyMessage); |
||||
|
||||
} |
||||
@ -0,0 +1,45 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.pojo.dto; |
||||
|
||||
import org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 审批记录表 数据传输对象实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MesApprovalRecordDTO extends MesApprovalRecordEntity { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,45 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.pojo.dto; |
||||
|
||||
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 通知消息 数据传输对象实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MesNotifyMessageDTO extends MesNotifyMessageEntity { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,90 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 审批记录表 实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Data |
||||
@TableName("MES_APPROVAL_RECORD") |
||||
@Schema(description = "MesApprovalRecord对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MesApprovalRecordEntity extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 业务ID |
||||
*/ |
||||
@Schema(description = "业务ID") |
||||
private Long bizId; |
||||
/** |
||||
* 业务类型 |
||||
*/ |
||||
@Schema(description = "业务类型") |
||||
private String bizType; |
||||
/** |
||||
* 流程内容 |
||||
*/ |
||||
@Schema(description = "流程内容") |
||||
private String content; |
||||
/** |
||||
* 当前角色ID |
||||
*/ |
||||
@Schema(description = "当前角色ID") |
||||
private Long currentRoleId; |
||||
/** |
||||
* 当前角色名称 |
||||
*/ |
||||
private String currentRoleName; |
||||
/** |
||||
* 下一个流程节点角色ID |
||||
*/ |
||||
@Schema(description = "下一个流程节点角色ID") |
||||
private Long nextRoleId; |
||||
/** |
||||
* 下一个流程节点角色ID |
||||
*/ |
||||
@Schema(description = "下一个流程节点角色名称") |
||||
private String nextRoleName; |
||||
/** |
||||
* 审批意见 |
||||
*/ |
||||
@Schema(description = "审批意见") |
||||
private String opinion; |
||||
|
||||
} |
||||
@ -0,0 +1,61 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 通知消息 实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Data |
||||
@TableName("MES_NOTIFY_MESSAGE") |
||||
@Schema(description = "MesNotifyMessage对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MesNotifyMessageEntity extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 流程内容 |
||||
*/ |
||||
@Schema(description = "流程内容") |
||||
private String content; |
||||
/** |
||||
* 接收人ID |
||||
*/ |
||||
@Schema(description = "接收人ID") |
||||
private Long receiveUserId; |
||||
|
||||
} |
||||
@ -0,0 +1,45 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.pojo.vo; |
||||
|
||||
import org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 审批记录表 视图实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MesApprovalRecordVO extends MesApprovalRecordEntity { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
||||
@ -0,0 +1,46 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.pojo.vo; |
||||
|
||||
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 通知消息 视图实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MesNotifyMessageVO extends MesNotifyMessageEntity { |
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
private String createUserName; |
||||
} |
||||
@ -0,0 +1,34 @@ |
||||
package org.springblade.desk.common.pojo.vo; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description 我的历史审批 |
||||
* @create 2026-02-26 9:56 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MyHistoryMesApprovalRecordVO extends MesApprovalRecordVO{ |
||||
|
||||
/** |
||||
* 当前节点名称 |
||||
*/ |
||||
private String currentNodeName; |
||||
|
||||
/** |
||||
* 是否审阅结束 |
||||
*/ |
||||
private Boolean endStatus; |
||||
|
||||
/** |
||||
* 流程发起人 |
||||
*/ |
||||
private String startUserName; |
||||
|
||||
/** |
||||
* 流程节点名称 |
||||
*/ |
||||
private String currentFlowNodeName; |
||||
} |
||||
@ -0,0 +1,16 @@ |
||||
package org.springblade.desk.common.pojo.vo; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description 我的审批VO展示类 |
||||
* @create 2026-02-26 9:55 |
||||
*/ |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@Data |
||||
public class MyMesApprovalRecordVO extends MesApprovalRecordVO{ |
||||
|
||||
private String createUserName; |
||||
} |
||||
@ -0,0 +1,79 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.common.pojo.vo.MyHistoryMesApprovalRecordVO; |
||||
import org.springblade.desk.common.pojo.vo.MyMesApprovalRecordVO; |
||||
import org.springblade.desk.common.service.IMesApprovalRecordService; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
/** |
||||
* 审批记录表 控制器 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/mesApprovalRecord") |
||||
@Tag(name = "审批记录表", description = "审批记录表接口") |
||||
public class MesApprovalRecordController extends BladeController { |
||||
|
||||
private final IMesApprovalRecordService mesApprovalRecordService; |
||||
|
||||
/** |
||||
* 审批记录表 我的审批记录分页 |
||||
*/ |
||||
@GetMapping("/pageMyApprovalRecord") |
||||
@Operation(summary = "获取我的审批分页", description = "传入mesApprovalRecord") |
||||
public R<IPage<MyMesApprovalRecordVO>> pageMyApprovalRecord(MyMesApprovalRecordVO mesApprovalRecord, Query query) { |
||||
mesApprovalRecord.setNextRoleId(Long.parseLong(AuthUtil.getUser().getRoleId())); |
||||
IPage<MyMesApprovalRecordVO> pages = mesApprovalRecordService.selectMyMesApprovalRecordPage(Condition.getPage(query), mesApprovalRecord); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 审批记录表 我的历史审批记录表 |
||||
*/ |
||||
@GetMapping("/pageMyHistoryApprovalRecord") |
||||
@Operation(summary = "获取审批记录分页", description = "传入mesApprovalRecord") |
||||
public R<IPage<MyHistoryMesApprovalRecordVO>> page(MyHistoryMesApprovalRecordVO mesApprovalRecord, Query query) { |
||||
mesApprovalRecord.setCurrentRoleId(Long.parseLong(AuthUtil.getUser().getRoleId())); |
||||
IPage<MyHistoryMesApprovalRecordVO> pages = mesApprovalRecordService.selectMyHistoryMesApprovalRecordPage(Condition.getPage(query), mesApprovalRecord); |
||||
return R.data(pages); |
||||
} |
||||
} |
||||
@ -0,0 +1,77 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.desk.common.pojo.vo.MesNotifyMessageVO; |
||||
import org.springblade.desk.common.service.IMesNotifyMessageService; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
/** |
||||
* 通知消息 控制器 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/mesNotifyMessage") |
||||
@Tag(name = "通知消息", description = "通知消息接口") |
||||
public class MesNotifyMessageController extends BladeController { |
||||
|
||||
private final IMesNotifyMessageService mesNotifyMessageService; |
||||
|
||||
/** |
||||
* 通知消息 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@Operation(summary = "分页", description = "传入mesNotifyMessage") |
||||
public R<IPage<MesNotifyMessageVO>> page(MesNotifyMessageVO mesNotifyMessage, Query query) { |
||||
mesNotifyMessage.setReceiveUserId(AuthUtil.getUserId()); |
||||
IPage<MesNotifyMessageVO> pages = mesNotifyMessageService.selectMesNotifyMessagePage(Condition.getPage(query), mesNotifyMessage); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 通知消息 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@Operation(summary = "逻辑删除", description = "传入ids") |
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(mesNotifyMessageService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,61 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.feign; |
||||
|
||||
import lombok.AllArgsConstructor; |
||||
import io.swagger.v3.oas.annotations.Hidden; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.common.constant.ApprovalStatusConstant; |
||||
import org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity; |
||||
import org.springblade.desk.common.service.IMesApprovalRecordService; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
/** |
||||
* 审批记录表 Feign实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Hidden |
||||
@RestController |
||||
@AllArgsConstructor |
||||
public class MesApprovalRecordClient implements IMesApprovalRecordClient { |
||||
|
||||
private final IMesApprovalRecordService mesApprovalRecordService; |
||||
|
||||
@Override |
||||
public R save(MesApprovalRecordEntity mesApprovalRecord) { |
||||
mesApprovalRecord.setStatus(ApprovalStatusConstant.WAITING); |
||||
mesApprovalRecordService.save(mesApprovalRecord); |
||||
return R.success(); |
||||
} |
||||
|
||||
@Override |
||||
public R update(MesApprovalRecordEntity mesApprovalRecord) { |
||||
mesApprovalRecordService.updateById(mesApprovalRecord); |
||||
return R.success(); |
||||
} |
||||
} |
||||
@ -0,0 +1,54 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.feign; |
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
||||
import org.springblade.desk.common.service.IMesNotifyMessageService; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
/** |
||||
* 通知消息 Feign实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Hidden |
||||
@RestController |
||||
@AllArgsConstructor |
||||
public class MesNotifyMessageClient implements IMesNotifyMessageClient { |
||||
|
||||
private final IMesNotifyMessageService mesNotifyMessageService; |
||||
|
||||
|
||||
@Override |
||||
public R save(MesNotifyMessageEntity mesNotifyMessage) { |
||||
mesNotifyMessageService.save(mesNotifyMessage); |
||||
return R.success(); |
||||
} |
||||
} |
||||
@ -0,0 +1,34 @@ |
||||
<?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="org.springblade.desk.common.mapper.MesApprovalRecordMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="mesApprovalRecordResultMap" type="org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity"> |
||||
<result column="ID" property="id"/> |
||||
<result column="BIZ_ID" property="bizId"/> |
||||
<result column="BIZ_TYPE" property="bizType"/> |
||||
<result column="CONTENT" property="content"/> |
||||
<result column="CURRENT_ROLE_ID" property="currentRoleId"/> |
||||
<result column="CURRENT_ROLE_NAME" property="currentRoleName"/> |
||||
<result column="NEXT_ROLE_ID" property="nextRoleId"/> |
||||
<result column="NEXT_ROLE_NAME" property="nextRoleName"/> |
||||
<result column="OPINION" property="opinion"/> |
||||
<result column="CREATE_USER" property="createUser"/> |
||||
<result column="CREATE_DEPT" property="createDept"/> |
||||
<result column="CREATE_TIME" property="createTime"/> |
||||
<result column="UPDATE_USER" property="updateUser"/> |
||||
<result column="UPDATE_TIME" property="updateTime"/> |
||||
<result column="STATUS" property="status"/> |
||||
<result column="IS_DELETED" property="isDeleted"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectMyMesApprovalRecordPage" resultMap="mesApprovalRecordResultMap"> |
||||
select * from MES_APPROVAL_RECORD where is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="selectMyHistoryMesApprovalRecordPage" resultMap="mesApprovalRecordResultMap"> |
||||
select * from MES_APPROVAL_RECORD where is_deleted = 0 |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,62 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity; |
||||
import org.springblade.desk.common.pojo.vo.MyHistoryMesApprovalRecordVO; |
||||
import org.springblade.desk.common.pojo.vo.MyMesApprovalRecordVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 审批记录表 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
public interface MesApprovalRecordMapper extends BaseMapper<MesApprovalRecordEntity> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param mesApprovalRecord 查询参数 |
||||
* @return List<MyMesApprovalRecordVO> |
||||
*/ |
||||
List<MesApprovalRecordEntity> selectMyMesApprovalRecordPage(IPage page, MyMesApprovalRecordVO mesApprovalRecord); |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param mesApprovalRecord 查询参数 |
||||
* @return List<MyHistoryMesApprovalRecordVO> |
||||
*/ |
||||
List<MesApprovalRecordEntity> selectMyHistoryMesApprovalRecordPage(IPage page, MyHistoryMesApprovalRecordVO mesApprovalRecord); |
||||
|
||||
} |
||||
@ -0,0 +1,52 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
||||
import org.springblade.desk.common.pojo.vo.MesNotifyMessageVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 通知消息 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
public interface MesNotifyMessageMapper extends BaseMapper<MesNotifyMessageEntity> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param mesNotifyMessage 查询参数 |
||||
* @return List<MesNotifyMessageVO> |
||||
*/ |
||||
List<MesNotifyMessageEntity> selectMesNotifyMessagePage(IPage page, MesNotifyMessageVO mesNotifyMessage); |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
<?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="org.springblade.desk.common.mapper.MesNotifyMessageMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="mesNotifyMessageResultMap" type="org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity"> |
||||
<result column="ID" property="id"/> |
||||
<result column="CONTENT" property="content"/> |
||||
<result column="RECEIVE_USER_ID" property="receiveUserId"/> |
||||
<result column="CREATE_USER" property="createUser"/> |
||||
<result column="CREATE_DEPT" property="createDept"/> |
||||
<result column="CREATE_TIME" property="createTime"/> |
||||
<result column="UPDATE_USER" property="updateUser"/> |
||||
<result column="UPDATE_TIME" property="updateTime"/> |
||||
<result column="STATUS" property="status"/> |
||||
<result column="IS_DELETED" property="isDeleted"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectMesNotifyMessagePage" resultMap="mesNotifyMessageResultMap"> |
||||
select * from MES_NOTIFY_MESSAGE where is_deleted = 0 |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,59 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity; |
||||
import org.springblade.desk.common.pojo.vo.MyHistoryMesApprovalRecordVO; |
||||
import org.springblade.desk.common.pojo.vo.MyMesApprovalRecordVO; |
||||
|
||||
/** |
||||
* 审批记录表 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
public interface IMesApprovalRecordService extends BaseService<MesApprovalRecordEntity> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param mesApprovalRecord 查询参数 |
||||
* @return IPage<MyMesApprovalRecordVO> |
||||
*/ |
||||
IPage<MyMesApprovalRecordVO> selectMyMesApprovalRecordPage(IPage<MyMesApprovalRecordVO> page, MyMesApprovalRecordVO mesApprovalRecord); |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param mesApprovalRecord 查询参数 |
||||
* @return IPage<MyHistoryMesApprovalRecordVO> |
||||
*/ |
||||
IPage<MyHistoryMesApprovalRecordVO> selectMyHistoryMesApprovalRecordPage(IPage<MyHistoryMesApprovalRecordVO> page, MyHistoryMesApprovalRecordVO mesApprovalRecord); |
||||
|
||||
} |
||||
@ -0,0 +1,49 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
||||
import org.springblade.desk.common.pojo.vo.MesNotifyMessageVO; |
||||
|
||||
/** |
||||
* 通知消息 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
public interface IMesNotifyMessageService extends BaseService<MesNotifyMessageEntity> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page 分页参数 |
||||
* @param mesNotifyMessage 查询参数 |
||||
* @return IPage<MesNotifyMessageVO> |
||||
*/ |
||||
IPage<MesNotifyMessageVO> selectMesNotifyMessagePage(IPage<MesNotifyMessageVO> page, MesNotifyMessageVO mesNotifyMessage); |
||||
|
||||
} |
||||
@ -0,0 +1,109 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.common.utils.CommonUtil; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.desk.common.constant.ApprovalStatusConstant; |
||||
import org.springblade.desk.common.mapper.MesApprovalRecordMapper; |
||||
import org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity; |
||||
import org.springblade.desk.common.pojo.vo.MyHistoryMesApprovalRecordVO; |
||||
import org.springblade.desk.common.pojo.vo.MyMesApprovalRecordVO; |
||||
import org.springblade.desk.common.service.IMesApprovalRecordService; |
||||
import org.springblade.system.cache.UserCache; |
||||
import org.springframework.beans.BeanUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import java.util.stream.Collectors; |
||||
|
||||
/** |
||||
* 审批记录表 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Service |
||||
public class MesApprovalRecordServiceImpl extends BaseServiceImpl<MesApprovalRecordMapper, MesApprovalRecordEntity> implements IMesApprovalRecordService { |
||||
|
||||
@Override |
||||
public IPage<MyMesApprovalRecordVO> selectMyMesApprovalRecordPage(IPage<MyMesApprovalRecordVO> page, MyMesApprovalRecordVO mesApprovalRecord) { |
||||
List<MesApprovalRecordEntity> myMesApprovalRecordVOList = baseMapper.selectMyMesApprovalRecordPage(page, mesApprovalRecord); |
||||
if (!myMesApprovalRecordVOList.isEmpty()){ |
||||
List<MyMesApprovalRecordVO> recordVOList = new ArrayList<>(); |
||||
myMesApprovalRecordVOList.forEach(entity -> { |
||||
MyMesApprovalRecordVO recordVO = new MyMesApprovalRecordVO(); |
||||
BeanUtils.copyProperties(entity, recordVO); |
||||
recordVO.setCreateUserName(AuthUtil.getUserName()); |
||||
recordVOList.add(recordVO); |
||||
}); |
||||
return page.setRecords(recordVOList); |
||||
} |
||||
return page.setRecords(Collections.emptyList()); |
||||
} |
||||
|
||||
@Override |
||||
public IPage<MyHistoryMesApprovalRecordVO> selectMyHistoryMesApprovalRecordPage(IPage<MyHistoryMesApprovalRecordVO> page, MyHistoryMesApprovalRecordVO mesApprovalRecord) { |
||||
List<MesApprovalRecordEntity> myHistoryMesApprovalRecordVOList = baseMapper.selectMyHistoryMesApprovalRecordPage(page, mesApprovalRecord); |
||||
// 提取所有的业务ID
|
||||
List<Long> bizIdList = myHistoryMesApprovalRecordVOList.stream().map(MesApprovalRecordEntity::getBizId).toList(); |
||||
// 提取所有的业务类型
|
||||
List<String> bizTypeList = myHistoryMesApprovalRecordVOList.stream().map(MesApprovalRecordEntity::getBizType).toList(); |
||||
// 根据业务ID和业务类型查询所有的审批记录
|
||||
if (!myHistoryMesApprovalRecordVOList.isEmpty()){ |
||||
List<MesApprovalRecordEntity> list = this.list(new LambdaQueryWrapper<MesApprovalRecordEntity>() |
||||
.in(MesApprovalRecordEntity::getBizId, bizIdList) |
||||
.in(MesApprovalRecordEntity::getBizType, bizTypeList) |
||||
.orderByDesc(MesApprovalRecordEntity::getCreateTime)); |
||||
Map<String, List<MesApprovalRecordEntity>> recordMap = list.stream() |
||||
.collect(Collectors.groupingBy( |
||||
entity -> entity.getBizId().toString() + "_" + entity.getBizType() |
||||
)); |
||||
// 拼接查询数据,无需多次查询
|
||||
List<MyHistoryMesApprovalRecordVO> recordVOList = new ArrayList<>(); |
||||
myHistoryMesApprovalRecordVOList.forEach(entity -> { |
||||
MyHistoryMesApprovalRecordVO recordVO = new MyHistoryMesApprovalRecordVO(); |
||||
BeanUtils.copyProperties(entity, recordVO); |
||||
String key = entity.getBizId().toString() + "_" + entity.getBizType(); |
||||
MesApprovalRecordEntity currentRecord = recordMap.get(key).get(recordMap.get(key).size() - 1); |
||||
MesApprovalRecordEntity firstRecord = recordMap.get(key).get(0); |
||||
recordVO.setCurrentNodeName(AuthUtil.getUserRole() + "审批"); |
||||
recordVO.setCurrentFlowNodeName(currentRecord.getCurrentRoleName() + "已审批"); |
||||
recordVO.setStartUserName(UserCache.getUser(firstRecord.getCreateUser()).getName()); |
||||
recordVO.setEndStatus(currentRecord.getStatus().equals(ApprovalStatusConstant.PASS)); |
||||
recordVOList.add(recordVO); |
||||
}); |
||||
page.setRecords(recordVOList); |
||||
} |
||||
return page.setRecords(Collections.emptyList()); |
||||
} |
||||
} |
||||
@ -0,0 +1,67 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.common.mapper.MesNotifyMessageMapper; |
||||
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
||||
import org.springblade.desk.common.pojo.vo.MesNotifyMessageVO; |
||||
import org.springblade.desk.common.service.IMesNotifyMessageService; |
||||
import org.springblade.system.cache.UserCache; |
||||
import org.springframework.beans.BeanUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 通知消息 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
@Service |
||||
public class MesNotifyMessageServiceImpl extends BaseServiceImpl<MesNotifyMessageMapper, MesNotifyMessageEntity> implements IMesNotifyMessageService { |
||||
|
||||
@Override |
||||
public IPage<MesNotifyMessageVO> selectMesNotifyMessagePage(IPage<MesNotifyMessageVO> page, MesNotifyMessageVO mesNotifyMessage) { |
||||
List<MesNotifyMessageEntity> mesNotifyMessageVOList = baseMapper.selectMesNotifyMessagePage(page, mesNotifyMessage); |
||||
if (!mesNotifyMessageVOList.isEmpty()){ |
||||
List<MesNotifyMessageVO> mesNotifyMessageList = new ArrayList<>(); |
||||
mesNotifyMessageVOList.forEach(entity -> { |
||||
MesNotifyMessageVO mesNotifyMessageVO = new MesNotifyMessageVO(); |
||||
BeanUtils.copyProperties(entity, mesNotifyMessageVO); |
||||
mesNotifyMessageVO.setCreateUserName(UserCache.getUser(mesNotifyMessageVO.getCreateUser()).getName()); |
||||
mesNotifyMessageList.add(mesNotifyMessageVO); |
||||
}); |
||||
return page.setRecords(mesNotifyMessageList); |
||||
} |
||||
return page.setRecords(Collections.emptyList()); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,59 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.wrapper; |
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity; |
||||
import org.springblade.desk.common.pojo.vo.MesApprovalRecordVO; |
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* 审批记录表 包装类,返回视图层所需的字段 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
public class MesApprovalRecordWrapper extends BaseEntityWrapper<MesApprovalRecordEntity, MesApprovalRecordVO> { |
||||
|
||||
public static MesApprovalRecordWrapper build() { |
||||
return new MesApprovalRecordWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public MesApprovalRecordVO entityVO(MesApprovalRecordEntity mesApprovalRecord) { |
||||
MesApprovalRecordVO mesApprovalRecordVO = Objects.requireNonNull(BeanUtil.copyProperties(mesApprovalRecord, MesApprovalRecordVO.class)); |
||||
|
||||
//User createUser = UserCache.getUser(mesApprovalRecord.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(mesApprovalRecord.getUpdateUser());
|
||||
//mesApprovalRecordVO.setCreateUserName(createUser.getName());
|
||||
//mesApprovalRecordVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return mesApprovalRecordVO; |
||||
} |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,59 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.common.wrapper; |
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
||||
import org.springblade.desk.common.pojo.vo.MesNotifyMessageVO; |
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* 通知消息 包装类,返回视图层所需的字段 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-02-26 |
||||
*/ |
||||
public class MesNotifyMessageWrapper extends BaseEntityWrapper<MesNotifyMessageEntity, MesNotifyMessageVO> { |
||||
|
||||
public static MesNotifyMessageWrapper build() { |
||||
return new MesNotifyMessageWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public MesNotifyMessageVO entityVO(MesNotifyMessageEntity mesNotifyMessage) { |
||||
MesNotifyMessageVO mesNotifyMessageVO = Objects.requireNonNull(BeanUtil.copyProperties(mesNotifyMessage, MesNotifyMessageVO.class)); |
||||
|
||||
//User createUser = UserCache.getUser(mesNotifyMessage.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(mesNotifyMessage.getUpdateUser());
|
||||
//mesNotifyMessageVO.setCreateUserName(createUser.getName());
|
||||
//mesNotifyMessageVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return mesNotifyMessageVO; |
||||
} |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,124 @@ |
||||
CREATE TABLE "JONHON_MES"."MES_APPROVAL_RECORD" ( |
||||
"ID" NUMBER(20,0) NOT NULL, |
||||
"BIZ_ID" NUMBER(20,0) NOT NULL, |
||||
"BIZ_TYPE" NVARCHAR2(255) NOT NULL, |
||||
"CONTENT" NVARCHAR2(255) NOT NULL, |
||||
"CURRENT_ROLE_ID" NUMBER(20,0) NOT NULL, |
||||
"NEXT_ROLE_ID" NUMBER(20,0) NOT NULL, |
||||
"OPINION" NVARCHAR2(255), |
||||
"CREATE_USER" NUMBER(20,0), |
||||
"CREATE_DEPT" NUMBER(20,0), |
||||
"CREATE_TIME" DATE, |
||||
"UPDATE_USER" NUMBER(20,0), |
||||
"UPDATE_TIME" DATE, |
||||
"STATUS" NUMBER(1,0) NOT NULL, |
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0, |
||||
"CURRENT_ROLE_NAME" NVARCHAR2(255) NOT NULL ENABLE, |
||||
"NEXT_ROLE_NAME" NVARCHAR2(255) NOT NULL ENABLE, |
||||
CONSTRAINT "SYS_C0023068" PRIMARY KEY ("ID"), |
||||
CONSTRAINT "SYS_C0023061" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE, |
||||
CONSTRAINT "SYS_C0023062" CHECK ("BIZ_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE, |
||||
CONSTRAINT "SYS_C0023063" CHECK ("BIZ_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE, |
||||
CONSTRAINT "SYS_C0023064" CHECK ("CONTENT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE, |
||||
CONSTRAINT "SYS_C0023065" CHECK ("CURRENT_ROLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE, |
||||
CONSTRAINT "SYS_C0023066" CHECK ("NEXT_ROLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE, |
||||
CONSTRAINT "SYS_C0023067" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE |
||||
) |
||||
TABLESPACE "JONHON_MES_DATA" |
||||
LOGGING |
||||
NOCOMPRESS |
||||
PCTFREE 10 |
||||
INITRANS 1 |
||||
STORAGE ( |
||||
BUFFER_POOL DEFAULT |
||||
) |
||||
PARALLEL 1 |
||||
NOCACHE |
||||
DISABLE ROW MOVEMENT |
||||
; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."ID" IS 'ID'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."BIZ_ID" IS '业务ID'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."BIZ_TYPE" IS '业务类型'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."CONTENT" IS '流程内容'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."CURRENT_ROLE_ID" IS '当前角色ID'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."NEXT_ROLE_ID" IS '下一个流程节点角色ID'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."OPINION" IS '审批意见'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."CREATE_USER" IS '创建人'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."CREATE_DEPT" IS '创建部门'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."CREATE_TIME" IS '创建时间'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."UPDATE_USER" IS '更新人'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."UPDATE_TIME" IS '更新时间'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."STATUS" IS '审核状态 0 待审核 1 审核通过 2 审核失败'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."IS_DELETED" IS '是否已删除'; |
||||
|
||||
COMMENT ON TABLE "JONHON_MES"."MES_APPROVAL_RECORD" IS '审批记录表 - 统计所有的审批记录' |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."CURRENT_ROLE_NAME" IS '当前角色名称'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_APPROVAL_RECORD"."NEXT_ROLE_NAME" IS '下一个流程节点角色名称'; |
||||
|
||||
|
||||
CREATE TABLE "JONHON_MES"."MES_NOTIFY_MESSAGE" ( |
||||
"ID" NUMBER(20,0) NOT NULL, |
||||
"CONTENT" NVARCHAR2(255) NOT NULL, |
||||
"RECEIVE_USER_ID" NUMBER(20,0), |
||||
"CREATE_USER" NUMBER(20,0), |
||||
"CREATE_DEPT" NUMBER(20,0), |
||||
"CREATE_TIME" DATE, |
||||
"UPDATE_USER" NUMBER(20,0), |
||||
"UPDATE_TIME" DATE, |
||||
"STATUS" NUMBER(1,0) NOT NULL, |
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0, |
||||
CONSTRAINT "SYS_C0023072" PRIMARY KEY ("ID"), |
||||
CONSTRAINT "SYS_C0023069" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE, |
||||
CONSTRAINT "SYS_C0023070" CHECK ("CONTENT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE, |
||||
CONSTRAINT "SYS_C0023071" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE |
||||
) |
||||
TABLESPACE "JONHON_MES_DATA" |
||||
LOGGING |
||||
NOCOMPRESS |
||||
PCTFREE 10 |
||||
INITRANS 1 |
||||
STORAGE ( |
||||
BUFFER_POOL DEFAULT |
||||
) |
||||
PARALLEL 1 |
||||
NOCACHE |
||||
DISABLE ROW MOVEMENT |
||||
; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."ID" IS 'ID'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."CONTENT" IS '流程内容'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."RECEIVE_USER_ID" IS '接收人ID'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."CREATE_USER" IS '创建人'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."CREATE_DEPT" IS '创建部门'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."CREATE_TIME" IS '创建时间'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."UPDATE_USER" IS '更新人'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."UPDATE_TIME" IS '更新时间'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."STATUS" IS '已读状态 0 未读 1 已读'; |
||||
|
||||
COMMENT ON COLUMN "JONHON_MES"."MES_NOTIFY_MESSAGE"."IS_DELETED" IS '是否已删除'; |
||||
|
||||
COMMENT ON TABLE "JONHON_MES"."MES_NOTIFY_MESSAGE" IS '通知消息' |
||||
Loading…
Reference in new issue