mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
1. Added the dynamic time effect of creating a time item in the Add transaction page
2. When inserting a new transaction or approving a new transaction, the transactions are arranged in reverse chronological order according to the creation time and approval time. The newly added transaction and the newly approved transaction appear at the top 3. You can obtain the current time when approving. You can see the approval time on the approved page
This commit is contained in:
@@ -34,6 +34,7 @@ public class AffairController {
|
||||
public ResponseResult select_NotApproved() {
|
||||
LambdaQueryWrapper<Affair> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(Affair::getStatus, 0).eq(Affair::getInspectorId,WebUtil.getLoginUser().getUser().getId());
|
||||
wrapper.orderByDesc(Affair::getCreateTime);
|
||||
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", affairService.list(wrapper));
|
||||
}
|
||||
|
||||
@@ -41,7 +42,8 @@ public class AffairController {
|
||||
@GetMapping("/Approved")
|
||||
public ResponseResult select_Approved() {
|
||||
LambdaQueryWrapper<Affair> wrapper2 = new LambdaQueryWrapper<>();
|
||||
wrapper2.ne(Affair::getStatus, 0);
|
||||
wrapper2.ne(Affair::getStatus, 0).eq(Affair::getInspectorId,WebUtil.getLoginUser().getUser().getId());
|
||||
wrapper2.orderByDesc(Affair::getInspectTime);
|
||||
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", affairService.list(wrapper2));
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ public class Affair implements Serializable {
|
||||
* 审核时间
|
||||
*/
|
||||
@TableField("inspect_time")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",timezone = "UTC")
|
||||
private LocalDateTime inspectTime;
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface AffairMapper extends BaseMapper<Affair> {
|
||||
//根据id,撤回新建的事务,在新建事务时,会再进行一次确定
|
||||
// (是否撤回,当用户撤回新建的事务时,根据新建的事务的id,删除该条事务在数据库中的信息)
|
||||
|
||||
@Update("update t_affair set status=1 where id=#{id}")
|
||||
@Update("update t_affair set status=1,inspect_time=#{inspectTime} where id=#{id}")
|
||||
int updateAffairs_Yes(Affair affair);
|
||||
//管理员权限--->修改事务的状态(AffairsStatus)--->达到审批的效果
|
||||
//同意
|
||||
|
||||
Reference in New Issue
Block a user