完成工单管理模块及细节优化
This commit is contained in:
@@ -30,7 +30,6 @@ public class AdController extends BaseController {
|
||||
@Resource
|
||||
private AdService adService;
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:ad:list')")
|
||||
@ApiOperation("分页查询广告位管理表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Ad>> page(AdParam param) {
|
||||
@@ -41,7 +40,6 @@ public class AdController extends BaseController {
|
||||
//return success(adService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:ad:list')")
|
||||
@ApiOperation("查询全部广告位管理表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Ad>> list(AdParam param) {
|
||||
@@ -52,7 +50,6 @@ public class AdController extends BaseController {
|
||||
//return success(adService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:ad:list')")
|
||||
@ApiOperation("根据id查询广告位管理表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Ad> get(@PathVariable("id") Integer id) {
|
||||
@@ -61,7 +58,6 @@ public class AdController extends BaseController {
|
||||
//return success(adService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:ad:save')")
|
||||
@ApiOperation("添加广告位管理表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Ad ad) {
|
||||
@@ -76,7 +72,6 @@ public class AdController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:ad:update')")
|
||||
@ApiOperation("修改广告位管理表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Ad ad) {
|
||||
@@ -86,7 +81,6 @@ public class AdController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:ad:remove')")
|
||||
@ApiOperation("删除广告位管理表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
@@ -96,7 +90,6 @@ public class AdController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:ad:save')")
|
||||
@ApiOperation("批量添加广告位管理表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Ad> list) {
|
||||
@@ -106,7 +99,6 @@ public class AdController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:ad:update')")
|
||||
@ApiOperation("批量修改广告位管理表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Ad> batchParam) {
|
||||
@@ -116,7 +108,6 @@ public class AdController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:ad:remove')")
|
||||
@ApiOperation("批量删除广告位管理表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
|
||||
@@ -31,7 +31,6 @@ public class ArticleCategoryController extends BaseController {
|
||||
@Resource
|
||||
private ArticleCategoryService articleCategoryService;
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleCategory:list')")
|
||||
@ApiOperation("分页查询文章分类表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ArticleCategory>> page(ArticleCategoryParam param) {
|
||||
@@ -42,7 +41,6 @@ public class ArticleCategoryController extends BaseController {
|
||||
//return success(articleCategoryService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleCategory:list')")
|
||||
@ApiOperation("查询全部文章分类表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ArticleCategory>> list(ArticleCategoryParam param) {
|
||||
@@ -53,7 +51,6 @@ public class ArticleCategoryController extends BaseController {
|
||||
//return success(articleCategoryService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleCategory:list')")
|
||||
@ApiOperation("根据id查询文章分类表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ArticleCategory> get(@PathVariable("id") Integer id) {
|
||||
@@ -62,7 +59,6 @@ public class ArticleCategoryController extends BaseController {
|
||||
//return success(articleCategoryService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleCategory:save')")
|
||||
@ApiOperation("添加文章分类表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ArticleCategory articleCategory) {
|
||||
@@ -77,7 +73,6 @@ public class ArticleCategoryController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleCategory:update')")
|
||||
@ApiOperation("修改文章分类表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ArticleCategory articleCategory) {
|
||||
@@ -87,7 +82,6 @@ public class ArticleCategoryController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleCategory:remove')")
|
||||
@ApiOperation("删除文章分类表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
@@ -97,7 +91,6 @@ public class ArticleCategoryController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleCategory:save')")
|
||||
@ApiOperation("批量添加文章分类表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ArticleCategory> list) {
|
||||
@@ -107,7 +100,6 @@ public class ArticleCategoryController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleCategory:update')")
|
||||
@ApiOperation("批量修改文章分类表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ArticleCategory> batchParam) {
|
||||
@@ -117,7 +109,6 @@ public class ArticleCategoryController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleCategory:remove')")
|
||||
@ApiOperation("批量删除文章分类表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
|
||||
@@ -31,7 +31,6 @@ public class ArticleCommentController extends BaseController {
|
||||
@Resource
|
||||
private ArticleCommentService articleCommentService;
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:list')")
|
||||
@ApiOperation("分页查询文章评论表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ArticleComment>> page(ArticleCommentParam param) {
|
||||
@@ -42,7 +41,6 @@ public class ArticleCommentController extends BaseController {
|
||||
//return success(articleCommentService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:list')")
|
||||
@ApiOperation("查询全部文章评论表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ArticleComment>> list(ArticleCommentParam param) {
|
||||
@@ -53,7 +51,6 @@ public class ArticleCommentController extends BaseController {
|
||||
//return success(articleCommentService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:list')")
|
||||
@ApiOperation("根据id查询文章评论表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ArticleComment> get(@PathVariable("id") Integer id) {
|
||||
@@ -62,7 +59,6 @@ public class ArticleCommentController extends BaseController {
|
||||
//return success(articleCommentService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:save')")
|
||||
@ApiOperation("添加文章评论表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ArticleComment articleComment) {
|
||||
@@ -77,7 +73,6 @@ public class ArticleCommentController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:update')")
|
||||
@ApiOperation("修改文章评论表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ArticleComment articleComment) {
|
||||
@@ -87,7 +82,6 @@ public class ArticleCommentController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:remove')")
|
||||
@ApiOperation("删除文章评论表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
@@ -97,7 +91,6 @@ public class ArticleCommentController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:save')")
|
||||
@ApiOperation("批量添加文章评论表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ArticleComment> list) {
|
||||
@@ -107,7 +100,6 @@ public class ArticleCommentController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:update')")
|
||||
@ApiOperation("批量修改文章评论表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ArticleComment> batchParam) {
|
||||
@@ -117,7 +109,6 @@ public class ArticleCommentController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:remove')")
|
||||
@ApiOperation("批量删除文章评论表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
|
||||
@@ -31,7 +31,6 @@ public class ArticleController extends BaseController {
|
||||
@Resource
|
||||
private ArticleService articleService;
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:article:list')")
|
||||
@ApiOperation("分页查询文章记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Article>> page(ArticleParam param) {
|
||||
@@ -42,7 +41,6 @@ public class ArticleController extends BaseController {
|
||||
//return success(articleService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:article:list')")
|
||||
@ApiOperation("查询全部文章记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Article>> list(ArticleParam param) {
|
||||
@@ -53,7 +51,6 @@ public class ArticleController extends BaseController {
|
||||
//return success(articleService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:article:list')")
|
||||
@ApiOperation("根据id查询文章记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Article> get(@PathVariable("id") Integer id) {
|
||||
@@ -62,7 +59,6 @@ public class ArticleController extends BaseController {
|
||||
//return success(articleService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:article:save')")
|
||||
@ApiOperation("添加文章记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Article article) {
|
||||
@@ -77,7 +73,6 @@ public class ArticleController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:article:update')")
|
||||
@ApiOperation("修改文章记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Article article) {
|
||||
@@ -87,7 +82,6 @@ public class ArticleController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:article:remove')")
|
||||
@ApiOperation("删除文章记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
@@ -97,7 +91,6 @@ public class ArticleController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:article:save')")
|
||||
@ApiOperation("批量添加文章记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Article> list) {
|
||||
@@ -107,7 +100,6 @@ public class ArticleController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:article:update')")
|
||||
@ApiOperation("批量修改文章记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Article> batchParam) {
|
||||
@@ -117,7 +109,6 @@ public class ArticleController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:article:remove')")
|
||||
@ApiOperation("批量删除文章记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
|
||||
@@ -31,7 +31,6 @@ public class ArticleLikeController extends BaseController {
|
||||
@Resource
|
||||
private ArticleLikeService articleLikeService;
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleLike:list')")
|
||||
@ApiOperation("分页查询点赞文章")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ArticleLike>> page(ArticleLikeParam param) {
|
||||
@@ -42,7 +41,6 @@ public class ArticleLikeController extends BaseController {
|
||||
//return success(articleLikeService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleLike:list')")
|
||||
@ApiOperation("查询全部点赞文章")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ArticleLike>> list(ArticleLikeParam param) {
|
||||
@@ -53,7 +51,6 @@ public class ArticleLikeController extends BaseController {
|
||||
//return success(articleLikeService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleLike:list')")
|
||||
@ApiOperation("根据id查询点赞文章")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ArticleLike> get(@PathVariable("id") Integer id) {
|
||||
@@ -62,7 +59,6 @@ public class ArticleLikeController extends BaseController {
|
||||
//return success(articleLikeService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleLike:save')")
|
||||
@ApiOperation("添加点赞文章")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ArticleLike articleLike) {
|
||||
@@ -77,7 +73,6 @@ public class ArticleLikeController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleLike:update')")
|
||||
@ApiOperation("修改点赞文章")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ArticleLike articleLike) {
|
||||
@@ -87,7 +82,6 @@ public class ArticleLikeController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleLike:remove')")
|
||||
@ApiOperation("删除点赞文章")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
@@ -97,7 +91,6 @@ public class ArticleLikeController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleLike:save')")
|
||||
@ApiOperation("批量添加点赞文章")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ArticleLike> list) {
|
||||
@@ -107,7 +100,6 @@ public class ArticleLikeController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleLike:update')")
|
||||
@ApiOperation("批量修改点赞文章")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ArticleLike> batchParam) {
|
||||
@@ -117,7 +109,6 @@ public class ArticleLikeController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleLike:remove')")
|
||||
@ApiOperation("批量删除点赞文章")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
|
||||
@@ -31,7 +31,6 @@ public class DocsController extends BaseController {
|
||||
@Resource
|
||||
private DocsService docsService;
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:docs:list')")
|
||||
@ApiOperation("分页查询文档管理记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Docs>> page(DocsParam param) {
|
||||
@@ -42,7 +41,6 @@ public class DocsController extends BaseController {
|
||||
//return success(docsService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:docs:list')")
|
||||
@ApiOperation("查询全部文档管理记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Docs>> list(DocsParam param) {
|
||||
@@ -53,7 +51,6 @@ public class DocsController extends BaseController {
|
||||
//return success(docsService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:docs:list')")
|
||||
@ApiOperation("根据id查询文档管理记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Docs> get(@PathVariable("id") Integer id) {
|
||||
@@ -62,7 +59,6 @@ public class DocsController extends BaseController {
|
||||
//return success(docsService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:docs:save')")
|
||||
@ApiOperation("添加文档管理记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Docs docs) {
|
||||
@@ -77,7 +73,6 @@ public class DocsController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:docs:update')")
|
||||
@ApiOperation("修改文档管理记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Docs docs) {
|
||||
@@ -87,7 +82,6 @@ public class DocsController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:docs:remove')")
|
||||
@ApiOperation("删除文档管理记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
@@ -97,7 +91,6 @@ public class DocsController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:docs:save')")
|
||||
@ApiOperation("批量添加文档管理记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Docs> list) {
|
||||
@@ -107,7 +100,6 @@ public class DocsController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:docs:update')")
|
||||
@ApiOperation("批量修改文档管理记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Docs> batchParam) {
|
||||
@@ -117,7 +109,6 @@ public class DocsController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:docs:remove')")
|
||||
@ApiOperation("批量删除文档管理记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -55,6 +57,6 @@ public class Ad implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -114,9 +116,9 @@ public class Article implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -60,9 +62,9 @@ public class ArticleCategory implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -69,9 +71,9 @@ public class ArticleComment implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -37,6 +39,6 @@ public class ArticleLike implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -63,9 +65,9 @@ public class Docs implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ public class MybatisPlusConfig {
|
||||
"sys_tenant",
|
||||
"sys_dictionary",
|
||||
"sys_dictionary_data",
|
||||
"oa_app",
|
||||
"apps_test_data"
|
||||
).contains(tableName);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.common.core.constants;
|
||||
|
||||
public class QRCodeConstants {
|
||||
// 二维码类型
|
||||
public static final String USER_QRCODE = "user"; // 用户二维码
|
||||
public static final String TASK_QRCODE = "task"; // 工单二维码
|
||||
public static final String ARTICLE_QRCODE = "article"; // 文章二维码
|
||||
public static final String GOODS_QRCODE = "goods"; // 商品二维码
|
||||
public static final String DIY_QRCODE = "diy"; // 工单二维码
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.gxwebsoft.common.core.constants;
|
||||
|
||||
public class TaskConstants {
|
||||
// 工单进度
|
||||
public static final Integer TOBEARRANGED = 0; // 待安排
|
||||
public static final Integer PENDING = 1; // 待处理
|
||||
public static final Integer PROCESSING = 2; // 处理中
|
||||
public static final Integer TOBECONFIRMED = 3; // 待确认
|
||||
public static final Integer COMPLETED = 4; // 已完成
|
||||
public static final Integer CLOSED = 5; // 已关闭
|
||||
|
||||
// 工单状态
|
||||
public static final Integer TASK_STATUS_0 = 0; // 待处理
|
||||
public static final Integer TASK_STATUS_1 = 1; // 已完成
|
||||
|
||||
// 操作类型
|
||||
public static final String ACTION_1 = "派单";
|
||||
public static final String ACTION_2 = "已解决";
|
||||
public static final String ACTION_3 = "关单";
|
||||
public static final String ACTION_4 = "分享";
|
||||
public static final String ACTION_5 = "编辑";
|
||||
}
|
||||
@@ -72,6 +72,7 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
||||
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
|
||||
user, null, authorities);
|
||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||
|
||||
// token将要过期签发新token, 防止突然退出登录
|
||||
// long expiration = (claims.getExpiration().getTime() - new Date().getTime()) / 1000 / 60;
|
||||
// if (expiration < configProperties.getTokenRefreshTime()) {
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.gxwebsoft.common.core.utils;
|
||||
|
||||
import com.gxwebsoft.oa.entity.Assets;
|
||||
import com.gxwebsoft.oa.service.AssetsService;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.math.BigInteger;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 宝塔工具类
|
||||
* @author 科技小王子
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
public class BtUtil {
|
||||
public static Integer tenantId;
|
||||
public static String server;
|
||||
public static String token;
|
||||
private static String timestamp;
|
||||
@Resource
|
||||
private AssetsService assetsService;
|
||||
|
||||
// 实例化客户端
|
||||
public BtUtil client(Integer id) {
|
||||
Assets assets = assetsService.getByIdRel(id);
|
||||
try {
|
||||
String btSign = assets.getBtSign();
|
||||
server = "http://".concat(assets.getCode()).concat(":9003");
|
||||
String url = "http://".concat(assets.getCode()) + ":9003/system?action=GetSystemTotal";
|
||||
timestamp = (new Date().getTime()+"");
|
||||
String md5Sign = getMd5(btSign);
|
||||
String temp = timestamp+md5Sign;
|
||||
token = getMd5(temp);
|
||||
|
||||
String json = "request_time="+timestamp+"&request_token="+token;
|
||||
String responseText = sendPost(url,json);
|
||||
System.out.println("responseText = " + responseText);
|
||||
System.out.println(responseText);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSystemTotal(){
|
||||
String url = server.concat("/system?action=GetSystemTotal");
|
||||
String json = "request_time="+timestamp+"&request_token="+token;
|
||||
String responseText = sendPost(url,json);
|
||||
System.out.println("responseText = " + responseText);
|
||||
return responseText;
|
||||
}
|
||||
|
||||
public String getDiskInfo(){
|
||||
String url = server.concat("/system?action=GetDiskInfo");
|
||||
String json = "request_time="+timestamp+"&request_token="+token;
|
||||
return sendPost(url,json);
|
||||
}
|
||||
|
||||
// public void config()
|
||||
// {
|
||||
// try {
|
||||
// System.out.println("tenantId = " + tenantId);
|
||||
// String btSign = "XXXXXXXXXXXXXXXXXXXXXXXX";
|
||||
// String url = "http://XXX.XXX.XXX.XXX:8888/system?action=GetSystemTotal";
|
||||
// String timestamp = (new Date().getTime()+"");
|
||||
// String md5Sign = getMd5(btSign);
|
||||
// String temp = timestamp+md5Sign;
|
||||
// String token = getMd5(temp);
|
||||
//
|
||||
// String json = "request_time="+timestamp+"&request_token="+token;
|
||||
// String responseText = sendPost(url,json);
|
||||
// System.out.println(responseText);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
|
||||
public static String getMd5(String str) throws Exception
|
||||
{
|
||||
try {
|
||||
// 生成一个MD5加密计算摘要
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
// 计算md5函数
|
||||
md.update(str.getBytes());
|
||||
// digest()最后确定返回md5 hash值,返回值为8为字符串。因为md5 hash值是16位的hex值,实际上就是8位的字符
|
||||
// BigInteger函数则将8位的字符串转换成16位hex值,用字符串来表示;得到字符串形式的hash值
|
||||
return new BigInteger(1, md.digest()).toString(16);
|
||||
} catch (Exception e) {
|
||||
throw new Exception("MD5加密出现错误,"+e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public static String sendPost(String url, String param) {
|
||||
PrintWriter out = null;
|
||||
BufferedReader in = null;
|
||||
StringBuffer result = new StringBuffer();
|
||||
try {
|
||||
URL realUrl = new URL(url);
|
||||
// 打开和URL之间的连接
|
||||
URLConnection conn = realUrl.openConnection();
|
||||
// 设置通用的请求属性
|
||||
conn.setRequestProperty("accept", "text/xml,text/javascript,text/html,application/json");
|
||||
conn.setRequestProperty("connection", "Keep-Alive");
|
||||
// 发送POST请求必须设置如下两行
|
||||
conn.setDoOutput(true);
|
||||
conn.setDoInput(true);
|
||||
// 获取URLConnection对象对应的输出流
|
||||
out = new PrintWriter(conn.getOutputStream());
|
||||
// 发送请求参数
|
||||
out.print(param);
|
||||
// flush输出流的缓冲
|
||||
out.flush();
|
||||
// 定义BufferedReader输入流来读取URL的响应
|
||||
in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
result.append(line);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("发送 POST 请求出现异常!"+e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
//使用finally块来关闭输出流、输入流
|
||||
finally{
|
||||
try{
|
||||
if(out!=null){
|
||||
out.close();
|
||||
}
|
||||
if(in!=null){
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
catch(IOException ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,18 +6,18 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.gxwebsoft.common.core.Constants;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.system.entity.Dict;
|
||||
import com.gxwebsoft.common.system.entity.Role;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 常用工具方法
|
||||
@@ -232,4 +232,41 @@ public class CommonUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean hasRole(List<Role> array,String value){
|
||||
System.out.println("value = " + value);
|
||||
if (value == null) {
|
||||
return true;
|
||||
}
|
||||
if (array == null) {
|
||||
return false;
|
||||
}
|
||||
if (!array.isEmpty()) {
|
||||
final List<String> collect = array.stream().map(Role::getRoleCode)
|
||||
.collect(Collectors.toList());
|
||||
final boolean contains = collect.contains(value);
|
||||
if (contains) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean hasRole(List<Role> array,List<String> value){
|
||||
System.out.println("value = " + value);
|
||||
if (value == null) {
|
||||
return true;
|
||||
}
|
||||
if (array == null) {
|
||||
return false;
|
||||
}
|
||||
if (!array.isEmpty()) {
|
||||
final List<String> collect = array.stream().map(Role::getRoleCode)
|
||||
.collect(Collectors.toList());
|
||||
final boolean disjoint = Collections.disjoint(collect, value);
|
||||
if (!disjoint) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,14 @@ import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||
import cn.hutool.extra.qrcode.QrConfig;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
|
||||
import static com.gxwebsoft.common.core.constants.QRCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 常用工具方法
|
||||
@@ -17,29 +21,47 @@ import java.net.URL;
|
||||
* @since 2017-06-10 10:10:22
|
||||
*/
|
||||
public class MyQrCodeUtil {
|
||||
|
||||
private static final String logoUrl = "https://file.wsdns.cn/20230430/6fa31aca3b0d47af98a149cf2dd26a4f.jpeg";
|
||||
|
||||
/**
|
||||
* 生成二维码
|
||||
* 用户ID
|
||||
* 生成用户二维码
|
||||
*/
|
||||
public static String getCode(Integer loginUserId) throws IOException {
|
||||
return createQrCode(loginUserId,loginUserId.toString());
|
||||
public static String getUserCode(Integer userId, String content) throws IOException {
|
||||
return createQrCode(USER_QRCODE,userId,content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成二维码
|
||||
* 支持自定义类型和内容
|
||||
* 生成工单二维码
|
||||
*/
|
||||
public String getCode(Integer loginUserId,String content) throws IOException {
|
||||
return createQrCode(loginUserId,content);
|
||||
public static String getTaskCode(Integer taskId, String content) throws IOException {
|
||||
return createQrCode(TASK_QRCODE,taskId,content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成商品二维码
|
||||
*/
|
||||
public static String getGoodsCode(Integer goodsId, String content) throws IOException {
|
||||
return createQrCode(GOODS_QRCODE,goodsId,content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成自定义二维码
|
||||
*/
|
||||
public static String getCodeMap(HashMap<String, String> map) throws IOException {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成带水印的二维码
|
||||
* @return https://file.gxwebsoft.com/qrcode/870.jpg?v=1682925307569
|
||||
* @param type 类型
|
||||
* @param id 实体ID
|
||||
* @param content 二维码内容
|
||||
* @return 二维码图片地址
|
||||
*/
|
||||
public static String createQrCode(Integer userId,String content) throws IOException {
|
||||
public static String createQrCode(String type,Integer id, String content) throws IOException {
|
||||
String filePath = "/www/wwwroot/file.ws/file/qrcode/".concat(type).concat("/");
|
||||
String qrcodeUrl = "https://file.gxwebsoft.com/qrcode/".concat(type).concat("/");
|
||||
// 将URL转为BufferedImage
|
||||
BufferedImage bufferedImage = ImageIO.read(new URL(logoUrl));
|
||||
// 生成二维码
|
||||
@@ -49,13 +71,10 @@ public class MyQrCodeUtil {
|
||||
// 附带小logo
|
||||
config.setImg(bufferedImage);
|
||||
// 保存路径
|
||||
// String filePath = "/Users/gxwebsoft/Documents/uploads/" + "file/qrcode/" + userId + ".jpg";
|
||||
String filePath = "/www/wwwroot/file.ws/" + "file/qrcode/" + userId + ".jpg";
|
||||
String qrcodeUrl = "https://file.gxwebsoft.com/qrcode/" + userId + ".jpg" + "?v=" + DateUtil.current();
|
||||
filePath = filePath.concat(id + ".jpg");
|
||||
qrcodeUrl = qrcodeUrl.concat(id + ".jpg") + "?v=" + DateUtil.current();
|
||||
|
||||
// 生成二维码
|
||||
System.out.println("config = " + config);
|
||||
System.out.println("con = " + content);
|
||||
System.out.println("filePath = " + filePath);
|
||||
QrCodeUtil.generate(content, config, FileUtil.file(filePath));
|
||||
return qrcodeUrl;
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.gxwebsoft.common.core.utils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 自动执行计划
|
||||
*
|
||||
* @author WebSoft
|
||||
* @since 2018-12-14 08:38:19
|
||||
*/
|
||||
public class SchedulingUtil {
|
||||
|
||||
// @Scheduled(cron="*/5 * * * * *")
|
||||
// public void reportCurrentTime() {
|
||||
// System.out.println("定时任务开始 = " + new Date());
|
||||
// int count = orderService.count(new LambdaQueryWrapper<Order>().eq(Order::getPayStatus, 20));
|
||||
//// orderService.removeOrderByTimeOut();
|
||||
// System.out.println("count = " + count);
|
||||
// }
|
||||
}
|
||||
@@ -55,6 +55,14 @@ public class BaseParam implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String keywords;
|
||||
|
||||
@ApiModelProperty("token")
|
||||
@TableField(exist = false)
|
||||
private String token;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
@TableField(exist = false)
|
||||
private Integer tenantId;
|
||||
|
||||
/**
|
||||
* 获取集合中的第一条数据
|
||||
*
|
||||
|
||||
@@ -29,6 +29,8 @@ import com.gxwebsoft.common.system.param.UpdatePasswordParam;
|
||||
import com.gxwebsoft.common.system.result.CaptchaResult;
|
||||
import com.gxwebsoft.common.system.result.LoginResult;
|
||||
import com.gxwebsoft.common.system.service.*;
|
||||
import com.gxwebsoft.oa.entity.Company;
|
||||
import com.gxwebsoft.oa.service.CompanyService;
|
||||
import com.wf.captcha.SpecCaptcha;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -68,8 +70,6 @@ public class MainController extends BaseController {
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
@Resource
|
||||
private AccessKeyService accessKeyService;
|
||||
@Resource
|
||||
private TenantService tenantService;
|
||||
@Resource
|
||||
private CompanyService companyService;
|
||||
@@ -85,46 +85,6 @@ public class MainController extends BaseController {
|
||||
return fail("不存在");
|
||||
}
|
||||
|
||||
@ApiOperation("获取当前租户信息")
|
||||
@GetMapping("/auth/tenant")
|
||||
public ApiResult<?> tenant() {
|
||||
Integer tenantId = getTenantId();
|
||||
Tenant tenant = tenantService.getByIdRel(tenantId);
|
||||
// 企业信息
|
||||
Company company = companyService.getByTenantIdRel(tenantId);
|
||||
company.setBusinessEntity(null);
|
||||
company.setPhone(null);
|
||||
company.setCompanyCode(null);
|
||||
tenant.setCompany(company);
|
||||
// 网站菜单
|
||||
ArrayList<Menu> list = new ArrayList<>();
|
||||
final Menu menu = new Menu();
|
||||
menu.setTitle("首页");
|
||||
menu.setPath("/");
|
||||
menu.setComponent("/index");
|
||||
menu.setParentId(0);
|
||||
menu.setMenuType(0);
|
||||
list.add(menu);
|
||||
menu.setTitle("文档");
|
||||
menu.setPath("/docs?id=143");
|
||||
menu.setComponent("/content/docs/index");
|
||||
menu.setParentId(0);
|
||||
menu.setMenuType(0);
|
||||
list.add(menu);
|
||||
tenant.setMenu(list);
|
||||
// 查询游客用户
|
||||
User loginUser = userService.getByUsername("www", tenantId);
|
||||
tenant.setLoginUser(loginUser);
|
||||
// 设置过期时间
|
||||
Long tokenExpireTime = configProperties.getTokenExpireTime();
|
||||
// 签发token
|
||||
String access_token = JwtUtil.buildToken(new JwtSubject("www", tenantId),
|
||||
tokenExpireTime, configProperties.getTokenKey());
|
||||
tenant.setToken(access_token);
|
||||
tenant.setUsername("www");
|
||||
return success(tenant);
|
||||
}
|
||||
|
||||
@ApiOperation("获取登录用户信息")
|
||||
@GetMapping("/auth/user")
|
||||
public ApiResult<User> userInfo() {
|
||||
@@ -275,27 +235,6 @@ public class MainController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("免密登录")
|
||||
@GetMapping("/token/{userId}/{accessKey}")
|
||||
public ApiResult<LoginResult> getToken(@PathVariable("userId") Integer userId, @PathVariable("accessKey") String accessKey) {
|
||||
// 免密登录 传指定的userId和AccessKey,请给指定的userId分配好角色和权限
|
||||
if (accessKeyService.count(new LambdaQueryWrapper<AccessKey>().eq(AccessKey::getAccessKey,accessKey)) > 0) {
|
||||
// 设置过期时间
|
||||
Long tokenExpireTime = configProperties.getTokenExpireTime();
|
||||
// 查询用户信息
|
||||
final User byId = userService.getById(userId);
|
||||
// 登录账号|手机号码|邮箱登录
|
||||
User user = userService.getByUsername(byId.getUsername(), byId.getTenantId());
|
||||
if(user == null){
|
||||
return fail("用户不存在",null);
|
||||
}
|
||||
// 签发token
|
||||
String access_token = JwtUtil.buildToken(new JwtSubject(user.getUsername(), user.getTenantId()),
|
||||
tokenExpireTime, configProperties.getTokenKey());
|
||||
return success("登录成功", new LoginResult(access_token, user));
|
||||
}
|
||||
return fail("请求失败: 40010",null);
|
||||
}
|
||||
@ApiOperation("短信验证码登录")
|
||||
@PostMapping("/loginBySms")
|
||||
public ApiResult<LoginResult> loginBySms(@RequestBody LoginParam param, HttpServletRequest request) {
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.gxwebsoft.common.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 访问凭证管理
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-16 19:19:55
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "AccessKey对象", description = "访问凭证管理")
|
||||
@TableName("sys_access_key")
|
||||
public class AccessKey implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "字典项id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "字典id")
|
||||
private String accessKey;
|
||||
|
||||
@ApiModelProperty(value = "字典项标识")
|
||||
private String accessSecret;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.gxwebsoft.common.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.gxwebsoft.oa.entity.Company;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.gxwebsoft.common.system.entity;
|
||||
import cn.hutool.core.util.DesensitizedUtil;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gxwebsoft.oa.entity.Company;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.common.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.common.system.entity.AccessKey;
|
||||
import com.gxwebsoft.common.system.param.AccessKeyParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 访问凭证管理Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-16 19:19:55
|
||||
*/
|
||||
public interface AccessKeyMapper extends BaseMapper<AccessKey> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<AccessKey>
|
||||
*/
|
||||
List<AccessKey> selectPageRel(@Param("page") IPage<AccessKey> page,
|
||||
@Param("param") AccessKeyParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<AccessKey> selectListRel(@Param("param") AccessKeyParam param);
|
||||
|
||||
}
|
||||
@@ -52,9 +52,6 @@
|
||||
<if test="param.contentType != null">
|
||||
AND a.content_type LIKE CONCAT('%', #{param.contentType}, '%')
|
||||
</if>
|
||||
<if test="param.merchantCode != null">
|
||||
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.gxwebsoft.common.system.param;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*
|
||||
* @author WebSoft
|
||||
* @since 2021-08-29 20:35:09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(description = "角色查询参数")
|
||||
public class AccessKeyParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("AccessKey")
|
||||
private String accessKey;
|
||||
|
||||
@ApiModelProperty("AccessSecret")
|
||||
private String accessSecret;
|
||||
|
||||
@ApiModelProperty("手机号码")
|
||||
@TableField(exist = false)
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("短信验证码")
|
||||
@TableField(exist = false)
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.common.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.AccessKey;
|
||||
import com.gxwebsoft.common.system.param.AccessKeyParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 访问凭证管理Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-16 19:19:55
|
||||
*/
|
||||
public interface AccessKeyService extends IService<AccessKey> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<AccessKey>
|
||||
*/
|
||||
PageResult<AccessKey> pageRel(AccessKeyParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<AccessKey>
|
||||
*/
|
||||
List<AccessKey> listRel(AccessKeyParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 字典项id
|
||||
* @return AccessKey
|
||||
*/
|
||||
AccessKey getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.common.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.common.system.mapper.AccessKeyMapper;
|
||||
import com.gxwebsoft.common.system.service.AccessKeyService;
|
||||
import com.gxwebsoft.common.system.entity.AccessKey;
|
||||
import com.gxwebsoft.common.system.param.AccessKeyParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 访问凭证管理Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-16 19:19:55
|
||||
*/
|
||||
@Service
|
||||
public class AccessKeyServiceImpl extends ServiceImpl<AccessKeyMapper, AccessKey> implements AccessKeyService {
|
||||
|
||||
@Override
|
||||
public PageResult<AccessKey> pageRel(AccessKeyParam param) {
|
||||
PageParam<AccessKey, AccessKeyParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<AccessKey> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccessKey> listRel(AccessKeyParam param) {
|
||||
List<AccessKey> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<AccessKey, AccessKeyParam> page = new PageParam<>();
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccessKey getByIdRel(Integer id) {
|
||||
AccessKeyParam param = new AccessKeyParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,16 +9,16 @@ import com.gxwebsoft.common.core.exception.BusinessException;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.Company;
|
||||
import com.gxwebsoft.common.system.entity.Role;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.entity.UserRole;
|
||||
import com.gxwebsoft.common.system.mapper.UserMapper;
|
||||
import com.gxwebsoft.common.system.param.UserParam;
|
||||
import com.gxwebsoft.common.system.service.CompanyService;
|
||||
import com.gxwebsoft.common.system.service.RoleMenuService;
|
||||
import com.gxwebsoft.common.system.service.UserRoleService;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import com.gxwebsoft.oa.entity.Company;
|
||||
import com.gxwebsoft.oa.service.CompanyService;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
@@ -92,12 +92,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
map.put("fileUrl",object.getString("fileUrl") + "/");
|
||||
user.setSystem(map);
|
||||
}
|
||||
// 企业信息
|
||||
final Company company = companyService.getByTenantIdRel(user.getTenantId());
|
||||
if (company != null) {
|
||||
user.setCompanyId(company.getCompanyId());
|
||||
user.setCompanyInfo(company);
|
||||
}
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.entity.AppUser;
|
||||
import com.gxwebsoft.oa.service.AppService;
|
||||
import com.gxwebsoft.oa.entity.App;
|
||||
import com.gxwebsoft.oa.param.AppParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.oa.service.AppUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 应用管理记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
@Api(tags = "应用管理记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/app")
|
||||
public class AppController extends BaseController {
|
||||
@Resource
|
||||
private AppService appService;
|
||||
@Resource
|
||||
private AppUserService appUserService;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@ApiOperation("分页查询应用管理记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<App>> page(AppParam param) {
|
||||
final User loginUser = getLoginUser();
|
||||
final Integer userId = loginUser.getUserId();
|
||||
loginUser.getRoles().forEach(d -> {
|
||||
if(!StrUtil.equals(d.getRoleCode(),"superAdmin") && !StrUtil.equals(d.getRoleCode(),"admin")){
|
||||
// 非管理员按项目成员权限显示
|
||||
final List<AppUser> list = appUserService.list(new LambdaQueryWrapper<AppUser>().eq(AppUser::getUserId, userId));
|
||||
final Set<Integer> collect = list.stream().map(AppUser::getAppId).collect(Collectors.toSet());
|
||||
param.setAppIds(collect);
|
||||
}
|
||||
});
|
||||
// 使用关联查询
|
||||
return success(appService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部应用管理记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<App>> list(AppParam param) {
|
||||
// 使用关联查询
|
||||
return success(appService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询应用管理记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<App> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(appService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加应用管理记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody App app) {
|
||||
// 记录当前登录用户id、租户id、商户编号
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
app.setUserId(loginUser.getUserId());
|
||||
app.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
if (appService.count(new LambdaQueryWrapper<App>()
|
||||
.eq(App::getAppCode, app.getAppCode())) > 0) {
|
||||
return fail("应用标识已存在");
|
||||
}
|
||||
if (appService.save(app)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改应用管理记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody App app) {
|
||||
if (appService.updateById(app)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除应用管理记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (appService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加应用管理记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<App> list) {
|
||||
if (appService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改应用管理记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<App> batchParam) {
|
||||
if (batchParam.update(appService, "app_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除应用管理记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (appService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("重置秘钥")
|
||||
@PostMapping("/updateAppSecret")
|
||||
public ApiResult<?> updateAppSecret(@RequestBody App app) {
|
||||
if (app.getAppId() == null) {
|
||||
return fail("请勿重复操作");
|
||||
}
|
||||
App result = appService.getByIdRel(app.getAppId());
|
||||
String appSecret = IdUtil.fastSimpleUUID();
|
||||
redisUtil.set("AppSecret:" + getTenantId(),appSecret);
|
||||
result.setAppSecret(appSecret);
|
||||
return success("重置成功",result);
|
||||
}
|
||||
|
||||
@ApiOperation("APP应用授权身份效验")
|
||||
@GetMapping("/authentication/{appid}")
|
||||
public ApiResult<?> authentication(@PathVariable("appid") String appid) {
|
||||
final App appInfo = appService.getById(appid);
|
||||
if(appInfo == null){
|
||||
return fail("应用不存在:".concat(appid));
|
||||
}
|
||||
return success("应用信息",appInfo);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.service.AppUserService;
|
||||
import com.gxwebsoft.oa.entity.AppUser;
|
||||
import com.gxwebsoft.oa.param.AppUserParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用成员控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
@Api(tags = "应用成员管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/app-user")
|
||||
public class AppUserController extends BaseController {
|
||||
@Resource
|
||||
private AppUserService appUserService;
|
||||
|
||||
@ApiOperation("分页查询应用成员")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<AppUser>> page(AppUserParam param) {
|
||||
// 使用关联查询
|
||||
return success(appUserService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部应用成员")
|
||||
@GetMapping()
|
||||
public ApiResult<List<AppUser>> list(AppUserParam param) {
|
||||
// 使用关联查询
|
||||
if (param.getAppId() == null) {
|
||||
return fail("AppId不存在",null);
|
||||
}
|
||||
return success(appUserService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询应用成员")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<AppUser> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(appUserService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加应用成员")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody AppUser appUser) {
|
||||
if (appUserService.count(new LambdaQueryWrapper<AppUser>()
|
||||
.eq(AppUser::getUserId, appUser.getUserId()).eq(AppUser::getAppId,appUser.getAppId())) > 0) {
|
||||
return fail("该成员已存在");
|
||||
}
|
||||
if (appUserService.save(appUser)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改应用成员")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody AppUser appUser) {
|
||||
if (appUserService.updateById(appUser)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除应用成员")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (appUserService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加应用成员")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<AppUser> list) {
|
||||
if (appUserService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改应用成员")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<AppUser> batchParam) {
|
||||
if (batchParam.update(appUserService, "app_user_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除应用成员")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (appUserService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.utils.BtUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.entity.AssetsUser;
|
||||
import com.gxwebsoft.oa.service.AssetsService;
|
||||
import com.gxwebsoft.oa.entity.Assets;
|
||||
import com.gxwebsoft.oa.param.AssetsParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.oa.service.AssetsUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
@Api(tags = "服务器资产记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/assets")
|
||||
public class AssetsController extends BaseController {
|
||||
@Resource
|
||||
private AssetsService assetsService;
|
||||
@Resource
|
||||
private AssetsUserService assetsUserService;
|
||||
@Resource
|
||||
private BtUtil btUtil;
|
||||
|
||||
@ApiOperation("分页查询服务器资产记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Assets>> page(AssetsParam param) {
|
||||
final User loginUser = getLoginUser();
|
||||
final Integer userId = loginUser.getUserId();
|
||||
loginUser.getRoles().forEach(d -> {
|
||||
if(!StrUtil.equals(d.getRoleCode(),"superAdmin") && !StrUtil.equals(d.getRoleCode(),"admin")){
|
||||
// 非管理员按项目成员权限显示
|
||||
param.setSceneType("NotAdministrator");
|
||||
final List<AssetsUser> list = assetsUserService.list(new LambdaQueryWrapper<AssetsUser>().eq(AssetsUser::getUserId, userId));
|
||||
final Set<Integer> collect = list.stream().map(AssetsUser::getAssetsId).collect(Collectors.toSet());
|
||||
if(!CollectionUtils.isEmpty(collect)){
|
||||
param.setAssetsIds(collect);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 非管理员并且无分配资源
|
||||
if(param.getSceneType() != null && param.getSceneType().equals("NotAdministrator") && CollectionUtils.isEmpty(param.getAssetsIds())){
|
||||
final PageResult<Assets> result = new PageResult<>();
|
||||
result.setList(new ArrayList<>());
|
||||
result.setCount(0L);
|
||||
return success(result);
|
||||
}
|
||||
// 返回查询结果
|
||||
return success(assetsService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部服务器资产记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Assets>> list(AssetsParam param) {
|
||||
// 使用关联查询
|
||||
return success(assetsService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询服务器资产记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Assets> get(@PathVariable("id") Integer id) {
|
||||
final Assets assets = assetsService.getByIdRel(id);
|
||||
final BtUtil client = btUtil.client(id);
|
||||
final String systemTotal = client.getSystemTotal();
|
||||
final String diskInfo = client.getDiskInfo();
|
||||
assets.setSystemTotal(systemTotal);
|
||||
assets.setDiskInfo(diskInfo);
|
||||
// 使用关联查询
|
||||
return success(assets);
|
||||
}
|
||||
|
||||
@ApiOperation("添加服务器资产记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Assets assets) {
|
||||
// 记录当前登录用户id、租户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
assets.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (assetsService.count(new LambdaQueryWrapper<Assets>().eq(Assets::getCode,assets.getCode())) > 0) {
|
||||
return fail("该IP地址已存在");
|
||||
}
|
||||
if (assetsService.save(assets)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改服务器资产记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Assets assets) {
|
||||
if (assetsService.updateById(assets)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除服务器资产记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (assetsService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加服务器资产记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Assets> list) {
|
||||
if (assetsService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改服务器资产记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Assets> batchParam) {
|
||||
if (batchParam.update(assetsService, "assets_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除服务器资产记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (assetsService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.service.AssetsUserService;
|
||||
import com.gxwebsoft.oa.entity.AssetsUser;
|
||||
import com.gxwebsoft.oa.param.AssetsUserParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器成员管理控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
@Api(tags = "服务器成员管理管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/assets-user")
|
||||
public class AssetsUserController extends BaseController {
|
||||
@Resource
|
||||
private AssetsUserService assetsUserService;
|
||||
|
||||
@ApiOperation("分页查询服务器成员管理")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<AssetsUser>> page(AssetsUserParam param) {
|
||||
// 使用关联查询
|
||||
return success(assetsUserService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部服务器成员管理")
|
||||
@GetMapping()
|
||||
public ApiResult<List<AssetsUser>> list(AssetsUserParam param) {
|
||||
// 使用关联查询
|
||||
return success(assetsUserService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询服务器成员管理")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<AssetsUser> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(assetsUserService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加服务器成员管理")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody AssetsUser assetsUser) {
|
||||
if (assetsUserService.count(new LambdaQueryWrapper<AssetsUser>()
|
||||
.eq(AssetsUser::getUserId, assetsUser.getUserId()).eq(AssetsUser::getAssetsId,assetsUser.getAssetsId())) > 0) {
|
||||
return fail("该成员已存在");
|
||||
}
|
||||
if (assetsUserService.save(assetsUser)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改服务器成员管理")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody AssetsUser assetsUser) {
|
||||
if (assetsUserService.updateById(assetsUser)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除服务器成员管理")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (assetsUserService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加服务器成员管理")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<AssetsUser> list) {
|
||||
if (assetsUserService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改服务器成员管理")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<AssetsUser> batchParam) {
|
||||
if (batchParam.update(assetsUserService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除服务器成员管理")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (assetsUserService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
+20
-41
@@ -1,20 +1,18 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.*;
|
||||
import com.gxwebsoft.common.system.entity.Company;
|
||||
import com.gxwebsoft.common.system.entity.Tenant;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.param.CompanyParam;
|
||||
import com.gxwebsoft.common.system.service.CompanyService;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.common.system.service.TenantService;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import com.gxwebsoft.oa.service.CompanyService;
|
||||
import com.gxwebsoft.oa.entity.Company;
|
||||
import com.gxwebsoft.oa.param.CompanyParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -24,16 +22,15 @@ import java.util.List;
|
||||
* 企业信息控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-27 14:57:34
|
||||
* @since 2023-10-23 19:18:58
|
||||
*/
|
||||
@Api(tags = "企业信息管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/company")
|
||||
@RequestMapping("/api/oa/company")
|
||||
public class CompanyController extends BaseController {
|
||||
@Resource
|
||||
private CompanyService companyService;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:list')")
|
||||
@ApiOperation("分页查询企业信息")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Company>> page(CompanyParam param) {
|
||||
@@ -41,23 +38,24 @@ public class CompanyController extends BaseController {
|
||||
return success(companyService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:list')")
|
||||
@ApiOperation("查询全部企业信息")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Company>> list(CompanyParam param) {
|
||||
PageParam<Company, CompanyParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(companyService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
return success(companyService.listRel(param));
|
||||
//return success(companyService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:list')")
|
||||
@ApiOperation("根据id查询企业信息")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Company> get(@PathVariable("id") Integer id) {
|
||||
return success(companyService.getById(id));
|
||||
// 使用关联查询
|
||||
return success(companyService.getByIdRel(id));
|
||||
//return success(companyService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:profile')")
|
||||
@ApiOperation("添加企业信息")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Company company) {
|
||||
@@ -72,18 +70,15 @@ public class CompanyController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:profile')")
|
||||
@ApiOperation("修改企业信息")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Company company) {
|
||||
final int count = companyService.count();
|
||||
if (companyService.updateById(company)) {
|
||||
if (companyService.updateById(company)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败",count);
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:remove')")
|
||||
@ApiOperation("删除企业信息")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
@@ -93,7 +88,6 @@ public class CompanyController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:profile')")
|
||||
@ApiOperation("批量添加企业信息")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Company> list) {
|
||||
@@ -103,7 +97,6 @@ public class CompanyController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:update')")
|
||||
@ApiOperation("批量修改企业信息")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Company> batchParam) {
|
||||
@@ -113,7 +106,6 @@ public class CompanyController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:remove')")
|
||||
@ApiOperation("批量删除企业信息")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
@@ -123,17 +115,4 @@ public class CompanyController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:company:profile')")
|
||||
@ApiOperation("根据id查询企业信息")
|
||||
@GetMapping("/profile")
|
||||
public ApiResult<Company> profile() {
|
||||
final CompanyParam param = new CompanyParam();
|
||||
param.setTenantId(getTenantId());
|
||||
param.setAuthoritative(true);
|
||||
final List<Company> list = companyService.listRel(param);
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
return success(list.get(0));
|
||||
}
|
||||
return fail("企业不存在",null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||
import com.gxwebsoft.common.core.utils.MyQrCodeUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.Role;
|
||||
import com.gxwebsoft.oa.entity.TaskCount;
|
||||
import com.gxwebsoft.oa.entity.TaskRecord;
|
||||
import com.gxwebsoft.oa.service.TaskCountService;
|
||||
import com.gxwebsoft.oa.service.TaskRecordService;
|
||||
import com.gxwebsoft.oa.service.TaskService;
|
||||
import com.gxwebsoft.oa.entity.Task;
|
||||
import com.gxwebsoft.oa.param.TaskParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static com.gxwebsoft.common.core.constants.TaskConstants.*;
|
||||
|
||||
/**
|
||||
* 任务记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Api(tags = "任务记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/task")
|
||||
public class TaskController extends BaseController {
|
||||
@Resource
|
||||
private TaskService taskService;
|
||||
@Resource
|
||||
private TaskCountService taskCountService;
|
||||
|
||||
@ApiOperation("分页查询任务记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Task>> page(TaskParam param) {
|
||||
// 使用关联查询
|
||||
param.setLoginUser(getLoginUser());
|
||||
return success(taskService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部任务记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Task>> list(TaskParam param) {
|
||||
PageParam<Task, TaskParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(taskService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(taskService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询任务记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Task> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(taskService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加任务记录表")
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Task task) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
task.setUserId(loginUser.getUserId());
|
||||
Role role = loginUser.getRoles().get(0);
|
||||
task.setRoleId(role.getRoleId());
|
||||
task.setRoleCode(role.getRoleCode());
|
||||
task.setOrganizationId(loginUser.getOrganizationId());
|
||||
}
|
||||
if (taskService.saveByRel(task)) {
|
||||
return success("添加成功", task);
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改任务记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Task task) {
|
||||
task.setLoginUserId(getLoginUserId());
|
||||
if (taskService.updateById(task)) {
|
||||
taskService.updateCount(task);
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除任务记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (taskService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加任务记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Task> list) {
|
||||
if (taskService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改任务记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Task> batchParam) {
|
||||
if (batchParam.update(taskService, "task_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除任务记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (taskService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("统计信息")
|
||||
@GetMapping("/count")
|
||||
public ApiResult<?> count(TaskParam param) {
|
||||
User loginUser = getLoginUser();
|
||||
ArrayList<Object> countNum = taskService.getCountNum(loginUser, param);
|
||||
return success("操作成功", countNum);
|
||||
}
|
||||
|
||||
@ApiOperation("生成工单二维码")
|
||||
@GetMapping("/taskQRCode")
|
||||
public ApiResult<?> taskQRCode(TaskParam param, HttpServletRequest request) throws IOException {
|
||||
String url = "https://modules.gxwebsoft.com/oa/task/detail?id=".concat(param.getTaskId().toString());
|
||||
final String qrCode = MyQrCodeUtil.getTaskCode(param.getTaskId(),url);
|
||||
return success("操作成功", qrCode);
|
||||
}
|
||||
|
||||
@ApiOperation("生成邀请加入二维码")
|
||||
@GetMapping("/taskJoinQRCode")
|
||||
public ApiResult<?> taskJoinQRCode(TaskParam param, HttpServletRequest request) throws IOException {
|
||||
User loginUser = getLoginUser();
|
||||
String access_token = JwtUtil.getAccessToken(request);
|
||||
String url = "https://modules.gxwebsoft.com/passport/register?type=join&dealerId=".concat(loginUser.getUserId().toString())+"&token=".concat(access_token);
|
||||
final String qrCode = MyQrCodeUtil.getUserCode(loginUser.getUserId(),url);
|
||||
return success("操作成功", qrCode);
|
||||
}
|
||||
|
||||
@Scheduled(cron="*/2 * * * * *")
|
||||
public void updateProgressTask() {
|
||||
System.out.println("定时任务开始 = " + DateUtil.now());
|
||||
TaskParam taskParam = new TaskParam();
|
||||
taskParam.setProgress(TOBECONFIRMED);
|
||||
taskParam.setLimit(10L);
|
||||
final PageResult<Task> result = taskService.pageRelAll(taskParam);
|
||||
if(result.getCount() == 0){
|
||||
return;
|
||||
}
|
||||
final List<Task> list = result.getList();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
list.forEach(d -> {
|
||||
try {
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date newDate = DateUtil.offset(d.getUpdateTime(), DateField.MINUTE, 1);
|
||||
Date date1 = df.parse(newDate.toString());
|
||||
Date date2 = df.parse(DateUtil.now());
|
||||
if(date2.after(date1)){
|
||||
d.setProgress(COMPLETED);
|
||||
d.setStatus(TASK_STATUS_1);
|
||||
taskService.updateByIdAll(d);
|
||||
System.out.println("已解决的工单半个小时未确认则自动确认 = " + d.getTaskId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.entity.Task;
|
||||
import com.gxwebsoft.oa.service.TaskCountService;
|
||||
import com.gxwebsoft.oa.entity.TaskCount;
|
||||
import com.gxwebsoft.oa.param.TaskCountParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.oa.service.TaskService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据统计控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-30 14:25:30
|
||||
*/
|
||||
@Api(tags = "数据统计管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/task-count")
|
||||
public class TaskCountController extends BaseController {
|
||||
@Resource
|
||||
private TaskCountService taskCountService;
|
||||
|
||||
@ApiOperation("分页查询数据统计")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<TaskCount>> page(TaskCountParam param, HttpServletRequest request) {
|
||||
param.setToken(JwtUtil.getAccessToken(request));
|
||||
param.setTenantId(getTenantId());
|
||||
return success(taskCountService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部数据统计")
|
||||
@GetMapping()
|
||||
public ApiResult<List<TaskCount>> list(TaskCountParam param) {
|
||||
PageParam<TaskCount, TaskCountParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(taskCountService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(taskCountService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询数据统计")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<TaskCount> get(@PathVariable("id") Integer id) {
|
||||
return success(taskCountService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(taskCountService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加数据统计")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody TaskCount taskCount) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
taskCount.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (taskCountService.save(taskCount)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改数据统计")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody TaskCount taskCount) {
|
||||
if (taskCountService.updateById(taskCount)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除数据统计")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (taskCountService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加数据统计")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<TaskCount> list) {
|
||||
if (taskCountService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改数据统计")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<TaskCount> batchParam) {
|
||||
if (batchParam.update(taskCountService, "task_count_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除数据统计")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (taskCountService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.web.*;
|
||||
import com.gxwebsoft.common.system.entity.Role;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.entity.Task;
|
||||
import com.gxwebsoft.oa.entity.TaskRecord;
|
||||
import com.gxwebsoft.oa.param.TaskRecordParam;
|
||||
import com.gxwebsoft.oa.service.TaskRecordService;
|
||||
import com.gxwebsoft.oa.service.TaskService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static com.gxwebsoft.common.core.constants.TaskConstants.PENDING;
|
||||
import static com.gxwebsoft.common.core.constants.TaskConstants.PROCESSING;
|
||||
|
||||
/**
|
||||
* 工单回复记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Api(tags = "工单回复记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/task-record")
|
||||
public class TaskRecordController extends BaseController {
|
||||
@Resource
|
||||
private TaskRecordService taskRecordService;
|
||||
@Resource
|
||||
private TaskService taskService;
|
||||
|
||||
@ApiOperation("分页查询工单回复记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<TaskRecord>> page(TaskRecordParam param, HttpServletRequest request) {
|
||||
param.setToken(JwtUtil.getAccessToken(request));
|
||||
param.setTenantId(getTenantId());
|
||||
return success(taskRecordService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部工单回复记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<TaskRecord>> list(TaskRecordParam param) {
|
||||
PageParam<TaskRecord, TaskRecordParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(taskRecordService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(taskRecordService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询工单回复记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<TaskRecord> get(@PathVariable("id") Integer id) {
|
||||
return success(taskRecordService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(taskRecordService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加工单回复记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody TaskRecord taskRecord) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
taskRecord.setUserId(loginUser.getUserId());
|
||||
// 技术人员更新工单状态
|
||||
Task task = taskService.getById(taskRecord.getTaskId());
|
||||
if (CommonUtil.hasRole(loginUser.getRoles(),"staff") && task.getProgress().equals(PENDING)) {
|
||||
task.setProgress(PROCESSING);
|
||||
task.setUpdateTime(new Date());
|
||||
taskService.updateById(task);
|
||||
}
|
||||
}
|
||||
if (taskRecordService.save(taskRecord)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改工单回复记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody TaskRecord taskRecord) {
|
||||
if (taskRecordService.updateById(taskRecord)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除工单回复记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (taskRecordService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加工单回复记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<TaskRecord> list) {
|
||||
if (taskRecordService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改工单回复记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<TaskRecord> batchParam) {
|
||||
if (batchParam.update(taskRecordService, "task_record_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除工单回复记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (taskRecordService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.service.TaskUserService;
|
||||
import com.gxwebsoft.oa.entity.TaskUser;
|
||||
import com.gxwebsoft.oa.param.TaskUserParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工单成员控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Api(tags = "工单成员管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/task-user")
|
||||
public class TaskUserController extends BaseController {
|
||||
@Resource
|
||||
private TaskUserService taskUserService;
|
||||
|
||||
@ApiOperation("分页查询工单成员")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<TaskUser>> page(TaskUserParam param) {
|
||||
PageParam<TaskUser, TaskUserParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(taskUserService.page(page, page.getWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(taskUserService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部工单成员")
|
||||
@GetMapping()
|
||||
public ApiResult<List<TaskUser>> list(TaskUserParam param) {
|
||||
PageParam<TaskUser, TaskUserParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(taskUserService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(taskUserService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询工单成员")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<TaskUser> get(@PathVariable("id") Integer id) {
|
||||
return success(taskUserService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(taskUserService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加工单成员")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody TaskUser taskUser) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
taskUser.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (taskUserService.save(taskUser)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改工单成员")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody TaskUser taskUser) {
|
||||
if (taskUserService.updateById(taskUser)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除工单成员")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (taskUserService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加工单成员")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<TaskUser> list) {
|
||||
if (taskUserService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改工单成员")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<TaskUser> batchParam) {
|
||||
if (batchParam.update(taskUserService, "task_user_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除工单成员")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (taskUserService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,240 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用管理记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "App对象", description = "应用管理记录表")
|
||||
@TableName("oa_app")
|
||||
public class App implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "应用ID")
|
||||
@TableId(value = "app_id", type = IdType.AUTO)
|
||||
private Integer appId;
|
||||
|
||||
@ApiModelProperty(value = "应用名称")
|
||||
private String appName;
|
||||
|
||||
@ApiModelProperty(value = "应用标识")
|
||||
private String appCode;
|
||||
|
||||
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||
private Integer parentId;
|
||||
|
||||
@ApiModelProperty(value = "应用类型")
|
||||
private String appType;
|
||||
|
||||
@ApiModelProperty(value = "应用类型")
|
||||
private String appTypeMultiple;
|
||||
|
||||
@ApiModelProperty(value = "类型, 0菜单, 1按钮")
|
||||
private Integer menuType;
|
||||
|
||||
@ApiModelProperty(value = "企业ID")
|
||||
private Integer companyId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "应用图标")
|
||||
private String appIcon;
|
||||
|
||||
@ApiModelProperty(value = "二维码")
|
||||
private String appQrcode;
|
||||
|
||||
@ApiModelProperty(value = "链接地址")
|
||||
private String appUrl;
|
||||
|
||||
@ApiModelProperty(value = "后台管理地址")
|
||||
private String adminUrl;
|
||||
|
||||
@ApiModelProperty(value = "下载地址")
|
||||
private String downUrl;
|
||||
|
||||
@ApiModelProperty(value = "链接地址")
|
||||
private String serverUrl;
|
||||
|
||||
@ApiModelProperty(value = "文件服务器")
|
||||
private String fileUrl;
|
||||
|
||||
@ApiModelProperty(value = "回调地址")
|
||||
private String callbackUrl;
|
||||
|
||||
@ApiModelProperty(value = "腾讯文档地址")
|
||||
private String docsUrl;
|
||||
|
||||
@ApiModelProperty(value = "代码仓库地址")
|
||||
private String gitUrl;
|
||||
|
||||
@ApiModelProperty(value = "原型图地址")
|
||||
private String prototypeUrl;
|
||||
|
||||
@ApiModelProperty(value = "IP白名单")
|
||||
private String ipAddress;
|
||||
|
||||
@ApiModelProperty(value = "应用截图")
|
||||
private String images;
|
||||
|
||||
@ApiModelProperty(value = "应用包名")
|
||||
private String packageName;
|
||||
|
||||
@ApiModelProperty(value = "下载次数")
|
||||
private Integer clicks;
|
||||
|
||||
@ApiModelProperty(value = "安装次数")
|
||||
private Integer installs;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "应用介绍")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "项目需求")
|
||||
private String requirement;
|
||||
|
||||
@ApiModelProperty(value = "开发者(个人或公司)")
|
||||
private String developer;
|
||||
|
||||
@ApiModelProperty(value = "项目负责人")
|
||||
private String director;
|
||||
|
||||
@ApiModelProperty(value = "项目经理")
|
||||
private String projectDirector;
|
||||
|
||||
@ApiModelProperty(value = "业务员")
|
||||
private String salesman;
|
||||
|
||||
@ApiModelProperty(value = "软件定价")
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "划线价格")
|
||||
private BigDecimal linePrice;
|
||||
|
||||
@ApiModelProperty(value = "评分")
|
||||
private String score;
|
||||
|
||||
@ApiModelProperty(value = "星级")
|
||||
private String star;
|
||||
|
||||
@ApiModelProperty(value = "菜单路由地址")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "菜单组件地址, 目录可为空")
|
||||
private String component;
|
||||
|
||||
@ApiModelProperty(value = "权限标识")
|
||||
private String authority;
|
||||
|
||||
@ApiModelProperty(value = "打开位置")
|
||||
private String target;
|
||||
|
||||
@ApiModelProperty(value = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
|
||||
private Integer hide;
|
||||
|
||||
@ApiModelProperty(value = "禁止搜索,1禁止 0 允许")
|
||||
private Integer search;
|
||||
|
||||
@ApiModelProperty(value = "菜单侧栏选中的path")
|
||||
private String active;
|
||||
|
||||
@ApiModelProperty(value = "其它路由元信息")
|
||||
private String meta;
|
||||
|
||||
@ApiModelProperty(value = "版本,0正式版 1体验版 2开发版")
|
||||
private String edition;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private String version;
|
||||
|
||||
@ApiModelProperty(value = "是否已安装")
|
||||
private Integer isUse;
|
||||
|
||||
@ApiModelProperty(value = "附近1")
|
||||
private String file1;
|
||||
|
||||
@ApiModelProperty(value = "附件2")
|
||||
private String file2;
|
||||
|
||||
@ApiModelProperty(value = "附件3")
|
||||
private String file3;
|
||||
|
||||
@ApiModelProperty(value = "应用状态")
|
||||
private String appStatus;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "机构id")
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
private String tenantCode;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "应用秘钥")
|
||||
@TableField(exist = false)
|
||||
private String appSecret;
|
||||
|
||||
@ApiModelProperty(value = "成员管理")
|
||||
@TableField(exist = false)
|
||||
private List<AppUser> users;
|
||||
|
||||
@ApiModelProperty(value = "主体名称")
|
||||
@TableField(exist = false)
|
||||
private String tenantName;
|
||||
|
||||
@ApiModelProperty(value = "开发者名称")
|
||||
@TableField(exist = false)
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty(value = "开发者名称")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "开发者头像")
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "公司简称")
|
||||
@TableField(exist = false)
|
||||
private String shortName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用成员
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "AppUser对象", description = "应用成员")
|
||||
@TableName("oa_app_user")
|
||||
public class AppUser implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@TableId(value = "app_user_id", type = IdType.AUTO)
|
||||
private Integer appUserId;
|
||||
|
||||
@ApiModelProperty(value = "角色,10体验成员 20开发者成员 30管理员 ")
|
||||
private Integer role;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "应用ID")
|
||||
private Integer appId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1待确认")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@TableField(exist = false)
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
@TableField(exist = false)
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@TableField(exist = false)
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "Assets对象", description = "服务器资产记录表")
|
||||
@TableName("oa_assets")
|
||||
public class Assets implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "资产ID")
|
||||
@TableId(value = "assets_id", type = IdType.AUTO)
|
||||
private Integer assetsId;
|
||||
|
||||
@ApiModelProperty(value = "资产名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "资产标识")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "资产类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "服务器厂商")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty(value = "服务器配置")
|
||||
private String configuration;
|
||||
|
||||
@ApiModelProperty(value = "初始账号")
|
||||
private String account;
|
||||
|
||||
@ApiModelProperty(value = "初始密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "(阿里云/腾讯云)登录账号")
|
||||
private String brandAccount;
|
||||
|
||||
@ApiModelProperty(value = "(阿里云/腾讯云)登录密码")
|
||||
private String brandPassword;
|
||||
|
||||
@ApiModelProperty(value = "宝塔面板")
|
||||
private String panel;
|
||||
|
||||
@ApiModelProperty(value = "宝塔面板账号")
|
||||
private String panelAccount;
|
||||
|
||||
@ApiModelProperty(value = "宝塔面板密码")
|
||||
private String panelPassword;
|
||||
|
||||
@ApiModelProperty(value = "财务信息-合同金额")
|
||||
private BigDecimal financeAmount;
|
||||
|
||||
@ApiModelProperty(value = "购买年限")
|
||||
private Integer financeYears;
|
||||
|
||||
@ApiModelProperty(value = "续费金额")
|
||||
private BigDecimal financeRenew;
|
||||
|
||||
@ApiModelProperty(value = "客户名称")
|
||||
private String financeCustomerName;
|
||||
|
||||
@ApiModelProperty(value = "客户联系人")
|
||||
private String financeCustomerContact;
|
||||
|
||||
@ApiModelProperty(value = "客户联系电话")
|
||||
private String financeCustomerPhone;
|
||||
|
||||
@ApiModelProperty(value = "客户ID")
|
||||
private Integer customerId;
|
||||
|
||||
@ApiModelProperty(value = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@ApiModelProperty(value = "开放端口")
|
||||
private String openPort;
|
||||
|
||||
@ApiModelProperty(value = "详情内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "购买时间")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty(value = "到期时间")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "置顶状态")
|
||||
private String isTop;
|
||||
|
||||
@ApiModelProperty(value = "可见性(public,private,protected)")
|
||||
private String visibility;
|
||||
|
||||
@ApiModelProperty(value = "宝塔接口秘钥")
|
||||
private String btSign;
|
||||
|
||||
@ApiModelProperty(value = "文章排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "客户ID")
|
||||
private Integer companyId;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "机构id")
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "开发者头像")
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "系统基础统计")
|
||||
@TableField(exist = false)
|
||||
private Object systemTotal;
|
||||
|
||||
@ApiModelProperty(value = "磁盘分区信息")
|
||||
@TableField(exist = false)
|
||||
private Object diskInfo;
|
||||
|
||||
@ApiModelProperty(value = "实时状态信息(CPU、内存、网络、负载)")
|
||||
@TableField(exist = false)
|
||||
private Object netWork;
|
||||
|
||||
@ApiModelProperty(value = "网站列表")
|
||||
@TableField(exist = false)
|
||||
private Object sites;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 服务器成员管理
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "AssetsUser对象", description = "服务器成员管理")
|
||||
@TableName("oa_assets_user")
|
||||
public class AssetsUser implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "角色,10体验成员 20开发者成员 30管理员 ")
|
||||
private Integer role;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "应用ID")
|
||||
private Integer assetsId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1待确认")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@TableField(exist = false)
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
@TableField(exist = false)
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@TableField(exist = false)
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
}
|
||||
+70
-47
@@ -1,25 +1,27 @@
|
||||
package com.gxwebsoft.common.system.entity;
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 企业信息
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-27 14:57:34
|
||||
* @since 2023-10-23 19:18:58
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "Company对象", description = "企业信息")
|
||||
@TableName("sys_company")
|
||||
@TableName("oa_company")
|
||||
public class Company implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -36,48 +38,48 @@ public class Company implements Serializable {
|
||||
@ApiModelProperty(value = "企业标识")
|
||||
private String companyCode;
|
||||
|
||||
@ApiModelProperty(value = "企业类型")
|
||||
@ApiModelProperty(value = "类型 10企业 20政府单位")
|
||||
private String companyType;
|
||||
|
||||
@ApiModelProperty(value = "企业类型 多选")
|
||||
@ApiModelProperty(value = "企业类型多选")
|
||||
private String companyTypeMultiple;
|
||||
|
||||
@ApiModelProperty(value = "应用标识")
|
||||
private String companyLogo;
|
||||
|
||||
@ApiModelProperty(value = "企业域名")
|
||||
@ApiModelProperty(value = "应用类型")
|
||||
private String appType;
|
||||
|
||||
@ApiModelProperty(value = "绑定域名")
|
||||
private String domain;
|
||||
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "企业法人")
|
||||
private String businessEntity;
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@TableField("Invoice_header")
|
||||
private String invoiceHeader;
|
||||
|
||||
@ApiModelProperty(value = "企业法人")
|
||||
private String businessEntity;
|
||||
|
||||
@ApiModelProperty(value = "服务开始时间")
|
||||
private Date startTime;
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty(value = "服务到期时间")
|
||||
private Date expirationTime;
|
||||
private LocalDateTime expirationTime;
|
||||
|
||||
@ApiModelProperty(value = "应用版本 10体验版 20授权版 30旗舰版")
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "企业成员(当前)")
|
||||
private Integer users;
|
||||
|
||||
@ApiModelProperty(value = "成员数量(上限)")
|
||||
@ApiModelProperty(value = "成员数量(人数上限)")
|
||||
private Integer members;
|
||||
|
||||
@ApiModelProperty(value = "存储空间")
|
||||
private Long storage;
|
||||
|
||||
@ApiModelProperty(value = "存储空间(上限)")
|
||||
private Long storageMax;
|
||||
@ApiModelProperty(value = "成员数量(当前)")
|
||||
private Integer users;
|
||||
|
||||
@ApiModelProperty(value = "行业类型(父级)")
|
||||
private String industryParent;
|
||||
@@ -88,6 +90,12 @@ public class Company implements Serializable {
|
||||
@ApiModelProperty(value = "部门数量")
|
||||
private Integer departments;
|
||||
|
||||
@ApiModelProperty(value = "存储空间")
|
||||
private Long storage;
|
||||
|
||||
@ApiModelProperty(value = "存储空间(上限)")
|
||||
private Long storageMax;
|
||||
|
||||
@ApiModelProperty(value = "所在国家")
|
||||
private String country;
|
||||
|
||||
@@ -115,44 +123,59 @@ public class Company implements Serializable {
|
||||
@ApiModelProperty(value = "是否实名认证")
|
||||
private Integer authentication;
|
||||
|
||||
@ApiModelProperty(value = "企业默认主体")
|
||||
private Integer authoritative;
|
||||
|
||||
@ApiModelProperty(value = "request合法域名")
|
||||
private String requestUrl;
|
||||
|
||||
@ApiModelProperty(value = "socket合法域名")
|
||||
private String socketUrl;
|
||||
|
||||
@ApiModelProperty(value = "主控端域名")
|
||||
private String serverUrl;
|
||||
|
||||
@ApiModelProperty(value = "业务域名")
|
||||
private String modulesUrl;
|
||||
|
||||
@ApiModelProperty(value = "是否推荐")
|
||||
private Integer recommend;
|
||||
|
||||
@ApiModelProperty(value = "点赞数量")
|
||||
private Integer likes;
|
||||
|
||||
@ApiModelProperty(value = "点击数量")
|
||||
private Integer clicks;
|
||||
|
||||
@ApiModelProperty(value = "购买数量")
|
||||
private Integer buys;
|
||||
|
||||
@ApiModelProperty(value = "是否含税, 0不含, 1含")
|
||||
private Integer isTax;
|
||||
|
||||
@ApiModelProperty(value = "当前克隆的租户ID")
|
||||
private Integer planId;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "是否含税")
|
||||
private Boolean isTax;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "是否默认企业主体")
|
||||
private Boolean authoritative;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "租户名称")
|
||||
@TableField(exist = false)
|
||||
private String tenantName;
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
@TableField(exist = false)
|
||||
private String tenantCode;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 任务记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "Task对象", description = "任务记录表")
|
||||
@TableName("oa_task")
|
||||
public class Task implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "工单ID")
|
||||
@TableId(value = "task_id", type = IdType.AUTO)
|
||||
private Integer taskId;
|
||||
|
||||
@ApiModelProperty(value = "工单名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "工单类型")
|
||||
private String taskType;
|
||||
|
||||
@ApiModelProperty(value = "任务内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "工单附件")
|
||||
private String files;
|
||||
|
||||
@ApiModelProperty(value = "工单发起人")
|
||||
private Integer promoter;
|
||||
|
||||
@ApiModelProperty(value = "受理人")
|
||||
private Integer commander;
|
||||
|
||||
@ApiModelProperty(value = "工单状态, 0未开始 1已指派 ")
|
||||
private Integer progress;
|
||||
|
||||
@ApiModelProperty(value = "优先级")
|
||||
private String priority;
|
||||
|
||||
@ApiModelProperty(value = "品质要求")
|
||||
private String quality;
|
||||
|
||||
@ApiModelProperty(value = "时限(天)")
|
||||
private Integer day;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "项目ID")
|
||||
private Integer appId;
|
||||
|
||||
@ApiModelProperty(value = "机构id")
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "项目ID")
|
||||
private Integer projectId;
|
||||
|
||||
@ApiModelProperty(value = "客户ID")
|
||||
private Integer customerId;
|
||||
|
||||
@ApiModelProperty(value = "资产ID")
|
||||
private Integer assetsId;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "是否已查阅")
|
||||
private Integer isRead;
|
||||
|
||||
@ApiModelProperty(value = "最后回复人")
|
||||
private Integer lastReadUser;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0待处理, 1已完成")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "项目信息")
|
||||
@TableField(exist = false)
|
||||
private String appName;
|
||||
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
@TableField(exist = false)
|
||||
private Integer roleId;
|
||||
|
||||
@ApiModelProperty(value = "角色标识")
|
||||
@TableField(exist = false)
|
||||
private String roleCode;
|
||||
|
||||
@ApiModelProperty(value = "操作类型")
|
||||
@TableField(exist = false)
|
||||
private String action;
|
||||
|
||||
@ApiModelProperty(value = "当前登录用户ID")
|
||||
@TableField(exist = false)
|
||||
private Integer loginUserId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 数据统计
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-30 14:25:30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "TaskCount对象", description = "数据统计")
|
||||
@TableName("oa_task_count")
|
||||
public class TaskCount implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@TableId(value = "task_count_id", type = IdType.AUTO)
|
||||
private Integer taskCountId;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "待处理数")
|
||||
private Integer pending;
|
||||
|
||||
@ApiModelProperty(value = "闲置可抢的工单")
|
||||
private Integer unused;
|
||||
|
||||
@ApiModelProperty(value = "已完成数")
|
||||
private Integer completed;
|
||||
|
||||
@ApiModelProperty(value = "今天处理数")
|
||||
private Integer today;
|
||||
|
||||
@ApiModelProperty(value = "本月处理数")
|
||||
private Integer month;
|
||||
|
||||
@ApiModelProperty(value = "今年处理数")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty(value = "总工单数")
|
||||
private Integer total;
|
||||
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
private Integer roleId;
|
||||
|
||||
@ApiModelProperty(value = "角色标识")
|
||||
private String roleCode;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
@TableField(exist = false)
|
||||
private String phone;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 工单回复记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "TaskRecord对象", description = "工单回复记录表")
|
||||
@TableName("oa_task_record")
|
||||
public class TaskRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "回复ID")
|
||||
@TableId(value = "task_record_id", type = IdType.AUTO)
|
||||
private Integer taskRecordId;
|
||||
|
||||
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||
private Integer parentId;
|
||||
|
||||
@ApiModelProperty(value = "工单ID")
|
||||
private Integer taskId;
|
||||
|
||||
@ApiModelProperty(value = "任务内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "工单附件")
|
||||
private String files;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0待处理, 1已完成")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "发布者")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "发布者头像")
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "所在城市")
|
||||
@TableField(exist = false)
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty(value = "回复者")
|
||||
@TableField(exist = false)
|
||||
private User user;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 工单成员
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "TaskUser对象", description = "工单成员")
|
||||
@TableName("oa_task_user")
|
||||
public class TaskUser implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@TableId(value = "task_user_id", type = IdType.AUTO)
|
||||
private Integer taskUserId;
|
||||
|
||||
@ApiModelProperty(value = "角色,10体验成员 20开发者成员 30管理员 ")
|
||||
private Integer role;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "工单ID")
|
||||
private Integer taskId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0待处理, 1已完成")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "加入时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.App;
|
||||
import com.gxwebsoft.oa.param.AppParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用管理记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
public interface AppMapper extends BaseMapper<App> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<App>
|
||||
*/
|
||||
List<App> selectPageRel(@Param("page") IPage<App> page,
|
||||
@Param("param") AppParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<App> selectListRel(@Param("param") AppParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.AppUser;
|
||||
import com.gxwebsoft.oa.param.AppUserParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用成员Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
public interface AppUserMapper extends BaseMapper<AppUser> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<AppUser>
|
||||
*/
|
||||
List<AppUser> selectPageRel(@Param("page") IPage<AppUser> page,
|
||||
@Param("param") AppUserParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<AppUser> selectListRel(@Param("param") AppUserParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.Assets;
|
||||
import com.gxwebsoft.oa.param.AssetsParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
public interface AssetsMapper extends BaseMapper<Assets> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<Assets>
|
||||
*/
|
||||
List<Assets> selectPageRel(@Param("page") IPage<Assets> page,
|
||||
@Param("param") AssetsParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<Assets> selectListRel(@Param("param") AssetsParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.AssetsUser;
|
||||
import com.gxwebsoft.oa.param.AssetsUserParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器成员管理Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
public interface AssetsUserMapper extends BaseMapper<AssetsUser> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<AssetsUser>
|
||||
*/
|
||||
List<AssetsUser> selectPageRel(@Param("page") IPage<AssetsUser> page,
|
||||
@Param("param") AssetsUserParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<AssetsUser> selectListRel(@Param("param") AssetsUserParam param);
|
||||
|
||||
}
|
||||
+4
-5
@@ -1,10 +1,9 @@
|
||||
package com.gxwebsoft.common.system.mapper;
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.common.system.entity.Company;
|
||||
import com.gxwebsoft.common.system.param.CompanyParam;
|
||||
import com.gxwebsoft.oa.entity.Company;
|
||||
import com.gxwebsoft.oa.param.CompanyParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -13,7 +12,7 @@ import java.util.List;
|
||||
* 企业信息Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-27 14:57:34
|
||||
* @since 2023-10-23 19:18:58
|
||||
*/
|
||||
public interface CompanyMapper extends BaseMapper<Company> {
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.TaskCount;
|
||||
import com.gxwebsoft.oa.param.TaskCountParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据统计Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-30 14:25:30
|
||||
*/
|
||||
public interface TaskCountMapper extends BaseMapper<TaskCount> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<TaskCount>
|
||||
*/
|
||||
List<TaskCount> selectPageRel(@Param("page") IPage<TaskCount> page,
|
||||
@Param("param") TaskCountParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<TaskCount> selectListRel(@Param("param") TaskCountParam param);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.oa.entity.Task;
|
||||
import com.gxwebsoft.oa.param.TaskParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 任务记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
public interface TaskMapper extends BaseMapper<Task> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<Task>
|
||||
*/
|
||||
List<Task> selectPageRel(@Param("page") IPage<Task> page,
|
||||
@Param("param") TaskParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<Task> selectListRel(@Param("param") TaskParam param);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<Task> selectPageRelAll(PageParam<Task, TaskParam> page, TaskParam param);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
void updateByTaskId(@Param("param") Task task);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.TaskRecord;
|
||||
import com.gxwebsoft.oa.param.TaskRecordParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工单回复记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
public interface TaskRecordMapper extends BaseMapper<TaskRecord> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<TaskRecord>
|
||||
*/
|
||||
List<TaskRecord> selectPageRel(@Param("page") IPage<TaskRecord> page,
|
||||
@Param("param") TaskRecordParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<TaskRecord> selectListRel(@Param("param") TaskRecordParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.TaskUser;
|
||||
import com.gxwebsoft.oa.param.TaskUserParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工单成员Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
public interface TaskUserMapper extends BaseMapper<TaskUser> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<TaskUser>
|
||||
*/
|
||||
List<TaskUser> selectPageRel(@Param("page") IPage<TaskUser> page,
|
||||
@Param("param") TaskUserParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<TaskUser> selectListRel(@Param("param") TaskUserParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
<?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="com.gxwebsoft.oa.mapper.AppMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM oa_app a
|
||||
<where>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.appName != null">
|
||||
AND a.app_name LIKE CONCAT('%', #{param.appName}, '%')
|
||||
</if>
|
||||
<if test="param.appCode != null">
|
||||
AND a.app_code LIKE CONCAT('%', #{param.appCode}, '%')
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.appType != null">
|
||||
AND a.app_type LIKE CONCAT('%', #{param.appType}, '%')
|
||||
</if>
|
||||
<if test="param.appTypeMultiple != null">
|
||||
AND a.app_type_multiple LIKE CONCAT('%', #{param.appTypeMultiple}, '%')
|
||||
</if>
|
||||
<if test="param.menuType != null">
|
||||
AND a.menu_type = #{param.menuType}
|
||||
</if>
|
||||
<if test="param.companyId != null">
|
||||
AND a.company_id = #{param.companyId}
|
||||
</if>
|
||||
<if test="param.companyName != null">
|
||||
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
|
||||
</if>
|
||||
<if test="param.appIcon != null">
|
||||
AND a.app_icon LIKE CONCAT('%', #{param.appIcon}, '%')
|
||||
</if>
|
||||
<if test="param.appQrcode != null">
|
||||
AND a.app_qrcode LIKE CONCAT('%', #{param.appQrcode}, '%')
|
||||
</if>
|
||||
<if test="param.appUrl != null">
|
||||
AND a.app_url LIKE CONCAT('%', #{param.appUrl}, '%')
|
||||
</if>
|
||||
<if test="param.adminUrl != null">
|
||||
AND a.admin_url LIKE CONCAT('%', #{param.adminUrl}, '%')
|
||||
</if>
|
||||
<if test="param.downUrl != null">
|
||||
AND a.down_url LIKE CONCAT('%', #{param.downUrl}, '%')
|
||||
</if>
|
||||
<if test="param.serverUrl != null">
|
||||
AND a.server_url LIKE CONCAT('%', #{param.serverUrl}, '%')
|
||||
</if>
|
||||
<if test="param.fileUrl != null">
|
||||
AND a.file_url LIKE CONCAT('%', #{param.fileUrl}, '%')
|
||||
</if>
|
||||
<if test="param.callbackUrl != null">
|
||||
AND a.callback_url LIKE CONCAT('%', #{param.callbackUrl}, '%')
|
||||
</if>
|
||||
<if test="param.docsUrl != null">
|
||||
AND a.docs_url LIKE CONCAT('%', #{param.docsUrl}, '%')
|
||||
</if>
|
||||
<if test="param.gitUrl != null">
|
||||
AND a.git_url LIKE CONCAT('%', #{param.gitUrl}, '%')
|
||||
</if>
|
||||
<if test="param.prototypeUrl != null">
|
||||
AND a.prototype_url LIKE CONCAT('%', #{param.prototypeUrl}, '%')
|
||||
</if>
|
||||
<if test="param.ipAddress != null">
|
||||
AND a.ip_address LIKE CONCAT('%', #{param.ipAddress}, '%')
|
||||
</if>
|
||||
<if test="param.images != null">
|
||||
AND a.images LIKE CONCAT('%', #{param.images}, '%')
|
||||
</if>
|
||||
<if test="param.packageName != null">
|
||||
AND a.package_name LIKE CONCAT('%', #{param.packageName}, '%')
|
||||
</if>
|
||||
<if test="param.clicks != null">
|
||||
AND a.clicks = #{param.clicks}
|
||||
</if>
|
||||
<if test="param.installs != null">
|
||||
AND a.installs = #{param.installs}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.requirement != null">
|
||||
AND a.requirement LIKE CONCAT('%', #{param.requirement}, '%')
|
||||
</if>
|
||||
<if test="param.developer != null">
|
||||
AND a.developer LIKE CONCAT('%', #{param.developer}, '%')
|
||||
</if>
|
||||
<if test="param.director != null">
|
||||
AND a.director LIKE CONCAT('%', #{param.director}, '%')
|
||||
</if>
|
||||
<if test="param.projectDirector != null">
|
||||
AND a.project_director LIKE CONCAT('%', #{param.projectDirector}, '%')
|
||||
</if>
|
||||
<if test="param.salesman != null">
|
||||
AND a.salesman LIKE CONCAT('%', #{param.salesman}, '%')
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.linePrice != null">
|
||||
AND a.line_price = #{param.linePrice}
|
||||
</if>
|
||||
<if test="param.score != null">
|
||||
AND a.score LIKE CONCAT('%', #{param.score}, '%')
|
||||
</if>
|
||||
<if test="param.star != null">
|
||||
AND a.star LIKE CONCAT('%', #{param.star}, '%')
|
||||
</if>
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.component != null">
|
||||
AND a.component LIKE CONCAT('%', #{param.component}, '%')
|
||||
</if>
|
||||
<if test="param.authority != null">
|
||||
AND a.authority LIKE CONCAT('%', #{param.authority}, '%')
|
||||
</if>
|
||||
<if test="param.target != null">
|
||||
AND a.target LIKE CONCAT('%', #{param.target}, '%')
|
||||
</if>
|
||||
<if test="param.hide != null">
|
||||
AND a.hide = #{param.hide}
|
||||
</if>
|
||||
<if test="param.search != null">
|
||||
AND a.search = #{param.search}
|
||||
</if>
|
||||
<if test="param.active != null">
|
||||
AND a.active LIKE CONCAT('%', #{param.active}, '%')
|
||||
</if>
|
||||
<if test="param.meta != null">
|
||||
AND a.meta LIKE CONCAT('%', #{param.meta}, '%')
|
||||
</if>
|
||||
<if test="param.edition != null">
|
||||
AND a.edition LIKE CONCAT('%', #{param.edition}, '%')
|
||||
</if>
|
||||
<if test="param.version != null">
|
||||
AND a.version LIKE CONCAT('%', #{param.version}, '%')
|
||||
</if>
|
||||
<if test="param.isUse != null">
|
||||
AND a.is_use = #{param.isUse}
|
||||
</if>
|
||||
<if test="param.file1 != null">
|
||||
AND a.file1 LIKE CONCAT('%', #{param.file1}, '%')
|
||||
</if>
|
||||
<if test="param.file2 != null">
|
||||
AND a.file2 LIKE CONCAT('%', #{param.file2}, '%')
|
||||
</if>
|
||||
<if test="param.file3 != null">
|
||||
AND a.file3 LIKE CONCAT('%', #{param.file3}, '%')
|
||||
</if>
|
||||
<if test="param.appStatus != null">
|
||||
AND a.app_status LIKE CONCAT('%', #{param.appStatus}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.tenantCode != null">
|
||||
AND a.tenant_code LIKE CONCAT('%', #{param.tenantCode}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.App">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.App">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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="com.gxwebsoft.oa.mapper.AppUserMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM oa_app_user a
|
||||
<where>
|
||||
<if test="param.appUserId != null">
|
||||
AND a.app_user_id = #{param.appUserId}
|
||||
</if>
|
||||
<if test="param.role != null">
|
||||
AND a.role = #{param.role}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.AppUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.AppUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,142 @@
|
||||
<?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="com.gxwebsoft.oa.mapper.AssetsMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM oa_assets a
|
||||
<where>
|
||||
<if test="param.assetsId != null">
|
||||
AND a.assets_id = #{param.assetsId}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.code != null">
|
||||
AND a.code LIKE CONCAT('%', #{param.code}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.brand != null">
|
||||
AND a.brand LIKE CONCAT('%', #{param.brand}, '%')
|
||||
</if>
|
||||
<if test="param.configuration != null">
|
||||
AND a.configuration LIKE CONCAT('%', #{param.configuration}, '%')
|
||||
</if>
|
||||
<if test="param.account != null">
|
||||
AND a.account LIKE CONCAT('%', #{param.account}, '%')
|
||||
</if>
|
||||
<if test="param.password != null">
|
||||
AND a.password LIKE CONCAT('%', #{param.password}, '%')
|
||||
</if>
|
||||
<if test="param.brandAccount != null">
|
||||
AND a.brand_account LIKE CONCAT('%', #{param.brandAccount}, '%')
|
||||
</if>
|
||||
<if test="param.brandPassword != null">
|
||||
AND a.brand_password LIKE CONCAT('%', #{param.brandPassword}, '%')
|
||||
</if>
|
||||
<if test="param.panel != null">
|
||||
AND a.panel LIKE CONCAT('%', #{param.panel}, '%')
|
||||
</if>
|
||||
<if test="param.panelAccount != null">
|
||||
AND a.panel_account LIKE CONCAT('%', #{param.panelAccount}, '%')
|
||||
</if>
|
||||
<if test="param.panelPassword != null">
|
||||
AND a.panel_password LIKE CONCAT('%', #{param.panelPassword}, '%')
|
||||
</if>
|
||||
<if test="param.financeAmount != null">
|
||||
AND a.finance_amount = #{param.financeAmount}
|
||||
</if>
|
||||
<if test="param.financeYears != null">
|
||||
AND a.finance_years = #{param.financeYears}
|
||||
</if>
|
||||
<if test="param.financeRenew != null">
|
||||
AND a.finance_renew = #{param.financeRenew}
|
||||
</if>
|
||||
<if test="param.financeCustomerName != null">
|
||||
AND a.finance_customer_name LIKE CONCAT('%', #{param.financeCustomerName}, '%')
|
||||
</if>
|
||||
<if test="param.financeCustomerContact != null">
|
||||
AND a.finance_customer_contact LIKE CONCAT('%', #{param.financeCustomerContact}, '%')
|
||||
</if>
|
||||
<if test="param.financeCustomerPhone != null">
|
||||
AND a.finance_customer_phone LIKE CONCAT('%', #{param.financeCustomerPhone}, '%')
|
||||
</if>
|
||||
<if test="param.customerId != null">
|
||||
AND a.customer_id = #{param.customerId}
|
||||
</if>
|
||||
<if test="param.customerName != null">
|
||||
AND a.customer_name LIKE CONCAT('%', #{param.customerName}, '%')
|
||||
</if>
|
||||
<if test="param.openPort != null">
|
||||
AND a.open_port LIKE CONCAT('%', #{param.openPort}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
AND a.end_time LIKE CONCAT('%', #{param.endTime}, '%')
|
||||
</if>
|
||||
<if test="param.isTop != null">
|
||||
AND a.is_top LIKE CONCAT('%', #{param.isTop}, '%')
|
||||
</if>
|
||||
<if test="param.visibility != null">
|
||||
AND a.visibility LIKE CONCAT('%', #{param.visibility}, '%')
|
||||
</if>
|
||||
<if test="param.btSign != null">
|
||||
AND a.bt_sign LIKE CONCAT('%', #{param.btSign}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.companyId != null">
|
||||
AND a.company_id = #{param.companyId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status LIKE CONCAT('%', #{param.status}, '%')
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.code LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.Assets">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.Assets">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+12
-12
@@ -1,26 +1,26 @@
|
||||
<?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="com.gxwebsoft.common.system.mapper.AccessKeyMapper">
|
||||
<mapper namespace="com.gxwebsoft.oa.mapper.AssetsUserMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_access_key a
|
||||
FROM oa_assets_user a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.accessKey != null">
|
||||
AND a.accessKey LIKE CONCAT('%', #{param.accessKey}, '%')
|
||||
<if test="param.role != null">
|
||||
AND a.role = #{param.role}
|
||||
</if>
|
||||
<if test="param.accessSecret != null">
|
||||
AND a.accessSecret LIKE CONCAT('%', #{param.accessSecret}, '%')
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
<if test="param.assetsId != null">
|
||||
AND a.assets_id = #{param.assetsId}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
@@ -32,12 +32,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.AccessKey">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.AssetsUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.AccessKey">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.AssetsUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+70
-15
@@ -1,12 +1,11 @@
|
||||
<?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="com.gxwebsoft.common.system.mapper.CompanyMapper">
|
||||
<mapper namespace="com.gxwebsoft.oa.mapper.CompanyMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.tenant_id,b.tenant_name,b.tenant_code
|
||||
FROM sys_company a
|
||||
LEFT JOIN sys_tenant b ON a.tenant_id = b.tenant_id
|
||||
SELECT a.*
|
||||
FROM oa_company a
|
||||
<where>
|
||||
<if test="param.companyId != null">
|
||||
AND a.company_id = #{param.companyId}
|
||||
@@ -17,21 +16,36 @@
|
||||
<if test="param.companyName != null">
|
||||
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
|
||||
</if>
|
||||
<if test="param.companyCode != null">
|
||||
AND a.company_code LIKE CONCAT('%', #{param.companyCode}, '%')
|
||||
</if>
|
||||
<if test="param.companyType != null">
|
||||
AND a.company_type = #{param.companyType}
|
||||
AND a.company_type LIKE CONCAT('%', #{param.companyType}, '%')
|
||||
</if>
|
||||
<if test="param.companyTypeMultiple != null">
|
||||
AND a.company_type_multiple LIKE CONCAT('%', #{param.companyTypeMultiple}, '%')
|
||||
</if>
|
||||
<if test="param.companyLogo != null">
|
||||
AND a.company_logo LIKE CONCAT('%', #{param.companyLogo}, '%')
|
||||
</if>
|
||||
<if test="param.appType != null">
|
||||
AND a.app_type LIKE CONCAT('%', #{param.appType}, '%')
|
||||
</if>
|
||||
<if test="param.domain != null">
|
||||
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.email != null">
|
||||
AND a.email LIKE CONCAT('%', #{param.email}, '%')
|
||||
</if>
|
||||
<if test="param.invoiceHeader != null">
|
||||
AND a.Invoice_header LIKE CONCAT('%', #{param.invoiceHeader}, '%')
|
||||
</if>
|
||||
<if test="param.businessEntity != null">
|
||||
AND a.business_entity LIKE CONCAT('%', #{param.businessEntity}, '%')
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||
</if>
|
||||
@@ -44,6 +58,9 @@
|
||||
<if test="param.members != null">
|
||||
AND a.members = #{param.members}
|
||||
</if>
|
||||
<if test="param.users != null">
|
||||
AND a.users = #{param.users}
|
||||
</if>
|
||||
<if test="param.industryParent != null">
|
||||
AND a.industry_parent LIKE CONCAT('%', #{param.industryParent}, '%')
|
||||
</if>
|
||||
@@ -53,6 +70,12 @@
|
||||
<if test="param.departments != null">
|
||||
AND a.departments = #{param.departments}
|
||||
</if>
|
||||
<if test="param.storage != null">
|
||||
AND a.storage LIKE CONCAT('%', #{param.storage}, '%')
|
||||
</if>
|
||||
<if test="param.storageMax != null">
|
||||
AND a.storage_max LIKE CONCAT('%', #{param.storageMax}, '%')
|
||||
</if>
|
||||
<if test="param.country != null">
|
||||
AND a.country LIKE CONCAT('%', #{param.country}, '%')
|
||||
</if>
|
||||
@@ -80,9 +103,45 @@
|
||||
<if test="param.authentication != null">
|
||||
AND a.authentication = #{param.authentication}
|
||||
</if>
|
||||
<if test="param.authoritative != null">
|
||||
AND a.authoritative = #{param.authoritative}
|
||||
</if>
|
||||
<if test="param.requestUrl != null">
|
||||
AND a.request_url LIKE CONCAT('%', #{param.requestUrl}, '%')
|
||||
</if>
|
||||
<if test="param.socketUrl != null">
|
||||
AND a.socket_url LIKE CONCAT('%', #{param.socketUrl}, '%')
|
||||
</if>
|
||||
<if test="param.serverUrl != null">
|
||||
AND a.server_url LIKE CONCAT('%', #{param.serverUrl}, '%')
|
||||
</if>
|
||||
<if test="param.modulesUrl != null">
|
||||
AND a.modules_url LIKE CONCAT('%', #{param.modulesUrl}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.likes != null">
|
||||
AND a.likes = #{param.likes}
|
||||
</if>
|
||||
<if test="param.clicks != null">
|
||||
AND a.clicks = #{param.clicks}
|
||||
</if>
|
||||
<if test="param.buys != null">
|
||||
AND a.buys = #{param.buys}
|
||||
</if>
|
||||
<if test="param.isTax != null">
|
||||
AND a.is_tax = #{param.isTax}
|
||||
</if>
|
||||
<if test="param.planId != null">
|
||||
AND a.plan_id = #{param.planId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
@@ -98,26 +157,22 @@
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.authoritative != null">
|
||||
AND a.authoritative = #{param.authoritative}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.company_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.short_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.tenant_id = #{param.keywords}
|
||||
OR a.domain LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
AND (
|
||||
a.short_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.company_name = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Company">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.Company">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Company">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.Company">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?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="com.gxwebsoft.oa.mapper.TaskCountMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM oa_task_count a
|
||||
<where>
|
||||
<if test="param.taskCountId != null">
|
||||
AND a.task_count_id = #{param.taskCountId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.pending != null">
|
||||
AND a.pending = #{param.pending}
|
||||
</if>
|
||||
<if test="param.completed != null">
|
||||
AND a.completed = #{param.completed}
|
||||
</if>
|
||||
<if test="param.today != null">
|
||||
AND a.today = #{param.today}
|
||||
</if>
|
||||
<if test="param.month != null">
|
||||
AND a.month = #{param.month}
|
||||
</if>
|
||||
<if test="param.year != null">
|
||||
AND a.year = #{param.year}
|
||||
</if>
|
||||
<if test="param.total != null">
|
||||
AND a.total = #{param.total}
|
||||
</if>
|
||||
<if test="param.roleId != null">
|
||||
AND a.role_id = #{param.roleId}
|
||||
</if>
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.TaskCount">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.TaskCount">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,126 @@
|
||||
<?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="com.gxwebsoft.oa.mapper.TaskMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.app_name
|
||||
FROM oa_task a
|
||||
LEFT JOIN oa_app b ON a.app_id = b.app_id
|
||||
<where>
|
||||
<if test="param.taskId != null">
|
||||
AND a.task_id = #{param.taskId}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.taskType != null">
|
||||
AND a.task_type LIKE CONCAT('%', #{param.taskType}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.files != null">
|
||||
AND a.files LIKE CONCAT('%', #{param.files}, '%')
|
||||
</if>
|
||||
<if test="param.promoter != null">
|
||||
AND a.promoter = #{param.promoter}
|
||||
</if>
|
||||
<if test="param.commander != null">
|
||||
AND (a.commander = #{param.commander} OR a.user_id = #{param.commander} OR a.promoter = #{param.commander})
|
||||
</if>
|
||||
<if test="param.progress != null">
|
||||
AND a.progress = #{param.progress}
|
||||
</if>
|
||||
<if test="param.priority != null">
|
||||
AND a.priority LIKE CONCAT('%', #{param.priority}, '%')
|
||||
</if>
|
||||
<if test="param.quality != null">
|
||||
AND a.quality LIKE CONCAT('%', #{param.quality}, '%')
|
||||
</if>
|
||||
<if test="param.day != null">
|
||||
AND a.day = #{param.day}
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
AND a.end_time LIKE CONCAT('%', #{param.endTime}, '%')
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.projectId != null">
|
||||
AND a.project_id = #{param.projectId}
|
||||
</if>
|
||||
<if test="param.customerId != null">
|
||||
AND a.customer_id = #{param.customerId}
|
||||
</if>
|
||||
<if test="param.assetsId != null">
|
||||
AND a.assets_id = #{param.assetsId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.isRead != null">
|
||||
AND a.is_read = #{param.isRead}
|
||||
</if>
|
||||
<if test="param.lastReadUser != null">
|
||||
AND a.last_read_user = #{param.lastReadUser}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.content LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.task_id = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.Task">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.Task">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<select id="selectPageRelAll" resultType="com.gxwebsoft.oa.entity.Task">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 更新工单状态信息 -->
|
||||
<update id="updateByTaskId">
|
||||
UPDATE oa_task SET progress = #{param.progress} WHERE task_id = #{param.taskId}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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="com.gxwebsoft.oa.mapper.TaskRecordMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM oa_task_record a
|
||||
<where>
|
||||
<if test="param.taskRecordId != null">
|
||||
AND a.task_record_id = #{param.taskRecordId}
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.taskId != null">
|
||||
AND a.task_id = #{param.taskId}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.files != null">
|
||||
AND a.files LIKE CONCAT('%', #{param.files}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.TaskRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.TaskRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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="com.gxwebsoft.oa.mapper.TaskUserMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM oa_task_user a
|
||||
<where>
|
||||
<if test="param.taskUserId != null">
|
||||
AND a.task_user_id = #{param.taskUserId}
|
||||
</if>
|
||||
<if test="param.role != null">
|
||||
AND a.role = #{param.role}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.taskId != null">
|
||||
AND a.task_id = #{param.taskId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.TaskUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.TaskUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,220 @@
|
||||
package com.gxwebsoft.oa.param;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 应用管理记录表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "AppParam对象", description = "应用管理记录表查询参数")
|
||||
public class AppParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "应用ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer appId;
|
||||
|
||||
@ApiModelProperty(value = "应用名称")
|
||||
private String appName;
|
||||
|
||||
@ApiModelProperty(value = "应用标识")
|
||||
private String appCode;
|
||||
|
||||
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer parentId;
|
||||
|
||||
@ApiModelProperty(value = "应用类型")
|
||||
private String appType;
|
||||
|
||||
@ApiModelProperty(value = "应用类型")
|
||||
private String appTypeMultiple;
|
||||
|
||||
@ApiModelProperty(value = "类型, 0菜单, 1按钮")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer menuType;
|
||||
|
||||
@ApiModelProperty(value = "企业ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer companyId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "应用图标")
|
||||
private String appIcon;
|
||||
|
||||
@ApiModelProperty(value = "二维码")
|
||||
private String appQrcode;
|
||||
|
||||
@ApiModelProperty(value = "链接地址")
|
||||
private String appUrl;
|
||||
|
||||
@ApiModelProperty(value = "后台管理地址")
|
||||
private String adminUrl;
|
||||
|
||||
@ApiModelProperty(value = "下载地址")
|
||||
private String downUrl;
|
||||
|
||||
@ApiModelProperty(value = "链接地址")
|
||||
private String serverUrl;
|
||||
|
||||
@ApiModelProperty(value = "文件服务器")
|
||||
private String fileUrl;
|
||||
|
||||
@ApiModelProperty(value = "回调地址")
|
||||
private String callbackUrl;
|
||||
|
||||
@ApiModelProperty(value = "腾讯文档地址")
|
||||
private String docsUrl;
|
||||
|
||||
@ApiModelProperty(value = "代码仓库地址")
|
||||
private String gitUrl;
|
||||
|
||||
@ApiModelProperty(value = "原型图地址")
|
||||
private String prototypeUrl;
|
||||
|
||||
@ApiModelProperty(value = "IP白名单")
|
||||
private String ipAddress;
|
||||
|
||||
@ApiModelProperty(value = "应用截图")
|
||||
private String images;
|
||||
|
||||
@ApiModelProperty(value = "应用包名")
|
||||
private String packageName;
|
||||
|
||||
@ApiModelProperty(value = "下载次数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer clicks;
|
||||
|
||||
@ApiModelProperty(value = "安装次数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer installs;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "应用介绍")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "项目需求")
|
||||
private String requirement;
|
||||
|
||||
@ApiModelProperty(value = "开发者(个人或公司)")
|
||||
private String developer;
|
||||
|
||||
@ApiModelProperty(value = "项目负责人")
|
||||
private String director;
|
||||
|
||||
@ApiModelProperty(value = "项目经理")
|
||||
private String projectDirector;
|
||||
|
||||
@ApiModelProperty(value = "业务员")
|
||||
private String salesman;
|
||||
|
||||
@ApiModelProperty(value = "软件定价")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "划线价格")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal linePrice;
|
||||
|
||||
@ApiModelProperty(value = "评分")
|
||||
private String score;
|
||||
|
||||
@ApiModelProperty(value = "星级")
|
||||
private String star;
|
||||
|
||||
@ApiModelProperty(value = "菜单路由地址")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "菜单组件地址, 目录可为空")
|
||||
private String component;
|
||||
|
||||
@ApiModelProperty(value = "权限标识")
|
||||
private String authority;
|
||||
|
||||
@ApiModelProperty(value = "打开位置")
|
||||
private String target;
|
||||
|
||||
@ApiModelProperty(value = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer hide;
|
||||
|
||||
@ApiModelProperty(value = "禁止搜索,1禁止 0 允许")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer search;
|
||||
|
||||
@ApiModelProperty(value = "菜单侧栏选中的path")
|
||||
private String active;
|
||||
|
||||
@ApiModelProperty(value = "其它路由元信息")
|
||||
private String meta;
|
||||
|
||||
@ApiModelProperty(value = "版本,0正式版 1体验版 2开发版")
|
||||
private String edition;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private String version;
|
||||
|
||||
@ApiModelProperty(value = "是否已安装")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer isUse;
|
||||
|
||||
@ApiModelProperty(value = "附近1")
|
||||
private String file1;
|
||||
|
||||
@ApiModelProperty(value = "附件2")
|
||||
private String file2;
|
||||
|
||||
@ApiModelProperty(value = "附件3")
|
||||
private String file3;
|
||||
|
||||
@ApiModelProperty(value = "应用状态")
|
||||
private String appStatus;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "机构id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
private String tenantCode;
|
||||
|
||||
@ApiModelProperty(value = "按APPID集搜索")
|
||||
@TableField(exist = false)
|
||||
private Set<Integer> appIds;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.gxwebsoft.oa.param;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用成员查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "AppUserParam对象", description = "应用成员查询参数")
|
||||
public class AppUserParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer appUserId;
|
||||
|
||||
@ApiModelProperty(value = "角色,10体验成员 20开发者成员 30管理员 ")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer role;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "应用ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer appId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1待确认")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@TableField(exist = false)
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
@TableField(exist = false)
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@TableField(exist = false)
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package com.gxwebsoft.oa.param;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "AssetsParam对象", description = "服务器资产记录表查询参数")
|
||||
public class AssetsParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "资产ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer assetsId;
|
||||
|
||||
@ApiModelProperty(value = "资产名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "资产标识")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "资产类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "服务器厂商")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty(value = "服务器配置")
|
||||
private String configuration;
|
||||
|
||||
@ApiModelProperty(value = "初始账号")
|
||||
private String account;
|
||||
|
||||
@ApiModelProperty(value = "初始密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "(阿里云/腾讯云)登录账号")
|
||||
private String brandAccount;
|
||||
|
||||
@ApiModelProperty(value = "(阿里云/腾讯云)登录密码")
|
||||
private String brandPassword;
|
||||
|
||||
@ApiModelProperty(value = "宝塔面板")
|
||||
private String panel;
|
||||
|
||||
@ApiModelProperty(value = "宝塔面板账号")
|
||||
private String panelAccount;
|
||||
|
||||
@ApiModelProperty(value = "宝塔面板密码")
|
||||
private String panelPassword;
|
||||
|
||||
@ApiModelProperty(value = "财务信息-合同金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal financeAmount;
|
||||
|
||||
@ApiModelProperty(value = "购买年限")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer financeYears;
|
||||
|
||||
@ApiModelProperty(value = "续费金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal financeRenew;
|
||||
|
||||
@ApiModelProperty(value = "客户名称")
|
||||
private String financeCustomerName;
|
||||
|
||||
@ApiModelProperty(value = "客户联系人")
|
||||
private String financeCustomerContact;
|
||||
|
||||
@ApiModelProperty(value = "客户联系电话")
|
||||
private String financeCustomerPhone;
|
||||
|
||||
@ApiModelProperty(value = "客户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer customerId;
|
||||
|
||||
@ApiModelProperty(value = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@ApiModelProperty(value = "开放端口")
|
||||
private String openPort;
|
||||
|
||||
@ApiModelProperty(value = "详情内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "购买时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "到期时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "置顶状态")
|
||||
private String isTop;
|
||||
|
||||
@ApiModelProperty(value = "可见性(public,private,protected)")
|
||||
private String visibility;
|
||||
|
||||
@ApiModelProperty(value = "宝塔接口秘钥")
|
||||
private String btSign;
|
||||
|
||||
@ApiModelProperty(value = "文章排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "客户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer companyId;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "机构id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "按ID集搜索")
|
||||
@TableField(exist = false)
|
||||
private Set<Integer> assetsIds;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.gxwebsoft.oa.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 服务器成员管理查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "AssetsUserParam对象", description = "服务器成员管理查询参数")
|
||||
public class AssetsUserParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "角色,10体验成员 20开发者成员 30管理员 ")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer role;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "应用ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer assetsId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1待确认")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
package com.gxwebsoft.oa.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 企业信息查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 19:18:58
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "CompanyParam对象", description = "企业信息查询参数")
|
||||
public class CompanyParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "企业id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer companyId;
|
||||
|
||||
@ApiModelProperty(value = "企业简称")
|
||||
private String shortName;
|
||||
|
||||
@ApiModelProperty(value = "企业全称")
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "企业标识")
|
||||
private String companyCode;
|
||||
|
||||
@ApiModelProperty(value = "类型 10企业 20政府单位")
|
||||
private String companyType;
|
||||
|
||||
@ApiModelProperty(value = "企业类型多选")
|
||||
private String companyTypeMultiple;
|
||||
|
||||
@ApiModelProperty(value = "应用标识")
|
||||
private String companyLogo;
|
||||
|
||||
@ApiModelProperty(value = "应用类型")
|
||||
private String appType;
|
||||
|
||||
@ApiModelProperty(value = "绑定域名")
|
||||
private String domain;
|
||||
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
private String invoiceHeader;
|
||||
|
||||
@ApiModelProperty(value = "企业法人")
|
||||
private String businessEntity;
|
||||
|
||||
@ApiModelProperty(value = "服务开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "服务到期时间")
|
||||
private String expirationTime;
|
||||
|
||||
@ApiModelProperty(value = "应用版本 10体验版 20授权版 30旗舰版")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "成员数量(人数上限)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer members;
|
||||
|
||||
@ApiModelProperty(value = "成员数量(当前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer users;
|
||||
|
||||
@ApiModelProperty(value = "行业类型(父级)")
|
||||
private String industryParent;
|
||||
|
||||
@ApiModelProperty(value = "行业类型(子级)")
|
||||
private String industryChild;
|
||||
|
||||
@ApiModelProperty(value = "部门数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer departments;
|
||||
|
||||
@ApiModelProperty(value = "存储空间")
|
||||
private Long storage;
|
||||
|
||||
@ApiModelProperty(value = "存储空间(上限)")
|
||||
private Long storageMax;
|
||||
|
||||
@ApiModelProperty(value = "所在国家")
|
||||
private String country;
|
||||
|
||||
@ApiModelProperty(value = "所在省份")
|
||||
private String province;
|
||||
|
||||
@ApiModelProperty(value = "所在城市")
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty(value = "所在辖区")
|
||||
private String region;
|
||||
|
||||
@ApiModelProperty(value = "街道地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "是否实名认证")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer authentication;
|
||||
|
||||
@ApiModelProperty(value = "企业默认主体")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer authoritative;
|
||||
|
||||
@ApiModelProperty(value = "request合法域名")
|
||||
private String requestUrl;
|
||||
|
||||
@ApiModelProperty(value = "socket合法域名")
|
||||
private String socketUrl;
|
||||
|
||||
@ApiModelProperty(value = "主控端域名")
|
||||
private String serverUrl;
|
||||
|
||||
@ApiModelProperty(value = "业务域名")
|
||||
private String modulesUrl;
|
||||
|
||||
@ApiModelProperty(value = "是否推荐")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer recommend;
|
||||
|
||||
@ApiModelProperty(value = "点赞数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer likes;
|
||||
|
||||
@ApiModelProperty(value = "点击数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer clicks;
|
||||
|
||||
@ApiModelProperty(value = "购买数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer buys;
|
||||
|
||||
@ApiModelProperty(value = "是否含税, 0不含, 1含")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer isTax;
|
||||
|
||||
@ApiModelProperty(value = "当前克隆的租户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer planId;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.gxwebsoft.oa.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 数据统计查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-30 14:25:30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "TaskCountParam对象", description = "数据统计查询参数")
|
||||
public class TaskCountParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer taskCountId;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "待处理数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer pending;
|
||||
|
||||
@ApiModelProperty(value = "已完成数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer completed;
|
||||
|
||||
@ApiModelProperty(value = "今天处理数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer today;
|
||||
|
||||
@ApiModelProperty(value = "本月处理数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer month;
|
||||
|
||||
@ApiModelProperty(value = "今年处理数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty(value = "总工单数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer total;
|
||||
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
private Integer roleId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.gxwebsoft.oa.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 任务记录表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "TaskParam对象", description = "任务记录表查询参数")
|
||||
public class TaskParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "工单ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer taskId;
|
||||
|
||||
@ApiModelProperty(value = "工单名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "工单类型")
|
||||
private String taskType;
|
||||
|
||||
@ApiModelProperty(value = "任务内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "工单附件")
|
||||
private String files;
|
||||
|
||||
@ApiModelProperty(value = "工单发起人")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer promoter;
|
||||
|
||||
@ApiModelProperty(value = "受理人")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer commander;
|
||||
|
||||
@ApiModelProperty(value = "工单状态, 0未开始 1已指派 ")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer progress;
|
||||
|
||||
@ApiModelProperty(value = "优先级")
|
||||
private String priority;
|
||||
|
||||
@ApiModelProperty(value = "品质要求")
|
||||
private String quality;
|
||||
|
||||
@ApiModelProperty(value = "时限(天)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer day;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "项目ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer appId;
|
||||
|
||||
@ApiModelProperty(value = "机构id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty(value = "项目ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer projectId;
|
||||
|
||||
@ApiModelProperty(value = "客户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer customerId;
|
||||
|
||||
@ApiModelProperty(value = "资产ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer assetsId;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "是否已查阅")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer isRead;
|
||||
|
||||
@ApiModelProperty(value = "最后回复人")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer lastReadUser;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0待处理, 1已完成")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "当前登录用户")
|
||||
private User loginUser;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gxwebsoft.oa.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 工单回复记录表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "TaskRecordParam对象", description = "工单回复记录表查询参数")
|
||||
public class TaskRecordParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "回复ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer taskRecordId;
|
||||
|
||||
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer parentId;
|
||||
|
||||
@ApiModelProperty(value = "工单ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer taskId;
|
||||
|
||||
@ApiModelProperty(value = "任务内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "工单附件")
|
||||
private String files;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0待处理, 1已完成")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.gxwebsoft.oa.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 工单成员查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "TaskUserParam对象", description = "工单成员查询参数")
|
||||
public class TaskUserParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer taskUserId;
|
||||
|
||||
@ApiModelProperty(value = "角色,10体验成员 20开发者成员 30管理员 ")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer role;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "工单ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer taskId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0待处理, 1已完成")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.App;
|
||||
import com.gxwebsoft.oa.param.AppParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用管理记录表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
public interface AppService extends IService<App> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<App>
|
||||
*/
|
||||
PageResult<App> pageRel(AppParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<App>
|
||||
*/
|
||||
List<App> listRel(AppParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param appId 应用ID
|
||||
* @return App
|
||||
*/
|
||||
App getByIdRel(Integer appId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.AppUser;
|
||||
import com.gxwebsoft.oa.param.AppUserParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用成员Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
public interface AppUserService extends IService<AppUser> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<AppUser>
|
||||
*/
|
||||
PageResult<AppUser> pageRel(AppUserParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<AppUser>
|
||||
*/
|
||||
List<AppUser> listRel(AppUserParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param appUserId 自增ID
|
||||
* @return AppUser
|
||||
*/
|
||||
AppUser getByIdRel(Integer appUserId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.Assets;
|
||||
import com.gxwebsoft.oa.param.AssetsParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
public interface AssetsService extends IService<Assets> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<Assets>
|
||||
*/
|
||||
PageResult<Assets> pageRel(AssetsParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<Assets>
|
||||
*/
|
||||
List<Assets> listRel(AssetsParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param assetsId 资产ID
|
||||
* @return Assets
|
||||
*/
|
||||
Assets getByIdRel(Integer assetsId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.AssetsUser;
|
||||
import com.gxwebsoft.oa.param.AssetsUserParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器成员管理Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
public interface AssetsUserService extends IService<AssetsUser> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<AssetsUser>
|
||||
*/
|
||||
PageResult<AssetsUser> pageRel(AssetsUserParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<AssetsUser>
|
||||
*/
|
||||
List<AssetsUser> listRel(AssetsUserParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 自增ID
|
||||
* @return AssetsUser
|
||||
*/
|
||||
AssetsUser getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
+4
-6
@@ -1,9 +1,9 @@
|
||||
package com.gxwebsoft.common.system.service;
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.Company;
|
||||
import com.gxwebsoft.common.system.param.CompanyParam;
|
||||
import com.gxwebsoft.oa.entity.Company;
|
||||
import com.gxwebsoft.oa.param.CompanyParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.List;
|
||||
* 企业信息Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-27 14:57:34
|
||||
* @since 2023-10-23 19:18:58
|
||||
*/
|
||||
public interface CompanyService extends IService<Company> {
|
||||
|
||||
@@ -39,6 +39,4 @@ public interface CompanyService extends IService<Company> {
|
||||
*/
|
||||
Company getByIdRel(Integer companyId);
|
||||
|
||||
Company getByTenantIdRel(Integer tenantId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.Task;
|
||||
import com.gxwebsoft.oa.entity.TaskCount;
|
||||
import com.gxwebsoft.oa.param.TaskCountParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据统计Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-30 14:25:30
|
||||
*/
|
||||
public interface TaskCountService extends IService<TaskCount> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<TaskCount>
|
||||
*/
|
||||
PageResult<TaskCount> pageRel(TaskCountParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<TaskCount>
|
||||
*/
|
||||
List<TaskCount> listRel(TaskCountParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param taskCountId 自增ID
|
||||
* @return TaskCount
|
||||
*/
|
||||
TaskCount getByIdRel(Integer taskCountId);
|
||||
|
||||
TaskCount getByUserId(Integer userId);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.TaskRecord;
|
||||
import com.gxwebsoft.oa.param.TaskRecordParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工单回复记录表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
public interface TaskRecordService extends IService<TaskRecord> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<TaskRecord>
|
||||
*/
|
||||
PageResult<TaskRecord> pageRel(TaskRecordParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<TaskRecord>
|
||||
*/
|
||||
List<TaskRecord> listRel(TaskRecordParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param taskRecordId 回复ID
|
||||
* @return TaskRecord
|
||||
*/
|
||||
TaskRecord getByIdRel(Integer taskRecordId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.entity.Task;
|
||||
import com.gxwebsoft.oa.param.TaskParam;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 任务记录表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
public interface TaskService extends IService<Task> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<Task>
|
||||
*/
|
||||
PageResult<Task> pageRel(TaskParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<Task>
|
||||
*/
|
||||
List<Task> listRel(TaskParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param taskId 工单ID
|
||||
* @return Task
|
||||
*/
|
||||
Task getByIdRel(Integer taskId);
|
||||
|
||||
ArrayList<Object> getCountNum(User loginUser, TaskParam param);
|
||||
|
||||
boolean saveByRel(Task task);
|
||||
|
||||
void updateCount(Task task);
|
||||
|
||||
PageResult<Task> pageRelAll(TaskParam taskParam);
|
||||
|
||||
void updateByIdAll(Task task);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.TaskUser;
|
||||
import com.gxwebsoft.oa.param.TaskUserParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工单成员Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
public interface TaskUserService extends IService<TaskUser> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<TaskUser>
|
||||
*/
|
||||
PageResult<TaskUser> pageRel(TaskUserParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<TaskUser>
|
||||
*/
|
||||
List<TaskUser> listRel(TaskUserParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param taskUserId 自增ID
|
||||
* @return TaskUser
|
||||
*/
|
||||
TaskUser getByIdRel(Integer taskUserId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.AppMapper;
|
||||
import com.gxwebsoft.oa.service.AppService;
|
||||
import com.gxwebsoft.oa.entity.App;
|
||||
import com.gxwebsoft.oa.param.AppParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用管理记录表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
@Service
|
||||
public class AppServiceImpl extends ServiceImpl<AppMapper, App> implements AppService {
|
||||
|
||||
@Override
|
||||
public PageResult<App> pageRel(AppParam param) {
|
||||
PageParam<App, AppParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<App> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<App> listRel(AppParam param) {
|
||||
List<App> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<App, AppParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public App getByIdRel(Integer appId) {
|
||||
AppParam param = new AppParam();
|
||||
param.setAppId(appId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.AppUserMapper;
|
||||
import com.gxwebsoft.oa.service.AppUserService;
|
||||
import com.gxwebsoft.oa.entity.AppUser;
|
||||
import com.gxwebsoft.oa.param.AppUserParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用成员Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 22:06:23
|
||||
*/
|
||||
@Service
|
||||
public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, AppUser> implements AppUserService {
|
||||
|
||||
@Override
|
||||
public PageResult<AppUser> pageRel(AppUserParam param) {
|
||||
PageParam<AppUser, AppUserParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<AppUser> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppUser> listRel(AppUserParam param) {
|
||||
List<AppUser> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<AppUser, AppUserParam> page = new PageParam<>();
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppUser getByIdRel(Integer appUserId) {
|
||||
AppUserParam param = new AppUserParam();
|
||||
param.setAppUserId(appUserId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.AssetsMapper;
|
||||
import com.gxwebsoft.oa.service.AssetsService;
|
||||
import com.gxwebsoft.oa.entity.Assets;
|
||||
import com.gxwebsoft.oa.param.AssetsParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
@Service
|
||||
public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> implements AssetsService {
|
||||
|
||||
@Override
|
||||
public PageResult<Assets> pageRel(AssetsParam param) {
|
||||
PageParam<Assets, AssetsParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<Assets> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Assets> listRel(AssetsParam param) {
|
||||
List<Assets> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<Assets, AssetsParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Assets getByIdRel(Integer assetsId) {
|
||||
AssetsParam param = new AssetsParam();
|
||||
param.setAssetsId(assetsId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.AssetsUserMapper;
|
||||
import com.gxwebsoft.oa.service.AssetsUserService;
|
||||
import com.gxwebsoft.oa.entity.AssetsUser;
|
||||
import com.gxwebsoft.oa.param.AssetsUserParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器成员管理Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-26 21:08:27
|
||||
*/
|
||||
@Service
|
||||
public class AssetsUserServiceImpl extends ServiceImpl<AssetsUserMapper, AssetsUser> implements AssetsUserService {
|
||||
|
||||
@Override
|
||||
public PageResult<AssetsUser> pageRel(AssetsUserParam param) {
|
||||
PageParam<AssetsUser, AssetsUserParam> page = new PageParam<>(param);
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
List<AssetsUser> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AssetsUser> listRel(AssetsUserParam param) {
|
||||
List<AssetsUser> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<AssetsUser, AssetsUserParam> page = new PageParam<>();
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssetsUser getByIdRel(Integer id) {
|
||||
AssetsUserParam param = new AssetsUserParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
+7
-15
@@ -1,12 +1,12 @@
|
||||
package com.gxwebsoft.common.system.service.impl;
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.CompanyMapper;
|
||||
import com.gxwebsoft.oa.service.CompanyService;
|
||||
import com.gxwebsoft.oa.entity.Company;
|
||||
import com.gxwebsoft.oa.param.CompanyParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.Company;
|
||||
import com.gxwebsoft.common.system.mapper.CompanyMapper;
|
||||
import com.gxwebsoft.common.system.param.CompanyParam;
|
||||
import com.gxwebsoft.common.system.service.CompanyService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
* 企业信息Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-27 14:57:34
|
||||
* @since 2023-10-23 19:18:58
|
||||
*/
|
||||
@Service
|
||||
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements CompanyService {
|
||||
@@ -33,7 +33,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||
List<Company> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<Company, CompanyParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@@ -44,12 +44,4 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Company getByTenantIdRel(Integer tenantId) {
|
||||
CompanyParam param = new CompanyParam();
|
||||
// final Company one = param.getOne(baseMapper.selectListRel(param));
|
||||
param.setAuthoritative(true);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.net.url.UrlBuilder;
|
||||
import cn.hutool.core.net.url.UrlQuery;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.entity.Task;
|
||||
import com.gxwebsoft.oa.entity.TaskRecord;
|
||||
import com.gxwebsoft.oa.mapper.TaskCountMapper;
|
||||
import com.gxwebsoft.oa.service.TaskCountService;
|
||||
import com.gxwebsoft.oa.entity.TaskCount;
|
||||
import com.gxwebsoft.oa.param.TaskCountParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.service.TaskService;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 数据统计Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-30 14:25:30
|
||||
*/
|
||||
@Service
|
||||
public class TaskCountServiceImpl extends ServiceImpl<TaskCountMapper, TaskCount> implements TaskCountService {
|
||||
@Override
|
||||
public PageResult<TaskCount> pageRel(TaskCountParam param) {
|
||||
PageParam<TaskCount, TaskCountParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("month desc");
|
||||
List<TaskCount> list = baseMapper.selectPageRel(page, param);
|
||||
final PageResult<TaskCount> result = new PageResult<>(list, page.getTotal());
|
||||
// 请求主服务器获取用户信息
|
||||
final List<TaskCount> taskCountList = result.getList();
|
||||
final Set<Integer> userIds = taskCountList.stream().map(TaskCount::getUserId).collect(Collectors.toSet());
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("userIds", userIds);
|
||||
if (!userIds.isEmpty()) {
|
||||
// 链式构建GET请求
|
||||
final String build = UrlBuilder.of("https://server.gxwebsoft.com/api/system/user/page").setQuery(new UrlQuery(map)).build();
|
||||
String response = HttpRequest.get(build)
|
||||
.header("Authorization", param.getToken())
|
||||
.header("Tenantid", param.getTenantId().toString())
|
||||
.body(JSONObject.toJSONString(map))//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
|
||||
final ApiResult<PageResult<User>> userResult = JSONObject.parseObject(response, new TypeReference<ApiResult<PageResult<User>>>() {
|
||||
});
|
||||
final Map<Integer, List<User>> collect = userResult.getData().getList().stream().collect(Collectors.groupingBy(User::getUserId));
|
||||
if (!CollectionUtils.isEmpty(collect)) {
|
||||
taskCountList.forEach(item -> {
|
||||
final List<User> users = collect.get(item.getUserId());
|
||||
if(!CollectionUtils.isEmpty(users)) {
|
||||
final User user = users.get(0);
|
||||
item.setNickname(user.getNickname());
|
||||
item.setAvatar(user.getAvatar());
|
||||
item.setPhone(user.getPhone());
|
||||
}
|
||||
});
|
||||
}
|
||||
result.setList(taskCountList);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaskCount> listRel(TaskCountParam param) {
|
||||
List<TaskCount> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<TaskCount, TaskCountParam> page = new PageParam<>();
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskCount getByIdRel(Integer taskCountId) {
|
||||
TaskCountParam param = new TaskCountParam();
|
||||
param.setTaskCountId(taskCountId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskCount getByUserId(Integer userId) {
|
||||
TaskCountParam param = new TaskCountParam();
|
||||
param.setUserId(userId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 每日清零
|
||||
*/
|
||||
// @Scheduled(cron="0 0 0 * * ?")
|
||||
// public void todayTask() {
|
||||
// System.out.println("每日清零任务 = ");
|
||||
// update(new LambdaUpdateWrapper<TaskCount>().set(TaskCount::getToday, 0));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 本月清零
|
||||
*/
|
||||
// @Scheduled(cron="0 0 1 * * ?")
|
||||
// public void monthTask() {
|
||||
// update(new LambdaUpdateWrapper<TaskCount>().set(TaskCount::getMonth, 0));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 每年清零
|
||||
*/
|
||||
// @Scheduled(cron = "0 0 0 1 * ?")
|
||||
// public void yearTask(){
|
||||
// update(new LambdaUpdateWrapper<TaskCount>().set(TaskCount::getYear, 0));
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.net.url.UrlBuilder;
|
||||
import cn.hutool.core.net.url.UrlQuery;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.mapper.TaskRecordMapper;
|
||||
import com.gxwebsoft.oa.service.TaskRecordService;
|
||||
import com.gxwebsoft.oa.entity.TaskRecord;
|
||||
import com.gxwebsoft.oa.param.TaskRecordParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 工单回复记录表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Service
|
||||
public class TaskRecordServiceImpl extends ServiceImpl<TaskRecordMapper, TaskRecord> implements TaskRecordService {
|
||||
|
||||
@Override
|
||||
public PageResult<TaskRecord> pageRel(TaskRecordParam param) {
|
||||
PageParam<TaskRecord, TaskRecordParam> page = new PageParam<>(param);
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
List<TaskRecord> list = baseMapper.selectPageRel(page, param);
|
||||
final PageResult<TaskRecord> result = new PageResult<>(list, page.getTotal());
|
||||
|
||||
// 请求主服务器获取用户信息
|
||||
final List<TaskRecord> taskRecordList = result.getList();
|
||||
final Set<Integer> userIds = taskRecordList.stream().map(TaskRecord::getUserId).collect(Collectors.toSet());
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("userIds", userIds);
|
||||
|
||||
// 链式构建GET请求
|
||||
final String build = UrlBuilder.of("https://server.gxwebsoft.com/api/system/user/page").setQuery(new UrlQuery(map)).build();
|
||||
String response = HttpRequest.get(build)
|
||||
.header("Authorization", param.getToken())
|
||||
.header("Tenantid", param.getTenantId().toString())
|
||||
.body(JSONObject.toJSONString(map))//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
|
||||
final ApiResult<PageResult<User>> userResult = JSONObject.parseObject(response, new TypeReference<ApiResult<PageResult<User>>>() {
|
||||
});
|
||||
final Map<Integer, List<User>> collect = userResult.getData().getList().stream().collect(Collectors.groupingBy(User::getUserId));
|
||||
taskRecordList.forEach(item -> {
|
||||
final List<User> users = collect.get(item.getUserId());
|
||||
if(!CollectionUtils.isEmpty(users)) {
|
||||
final User user = users.get(0);
|
||||
item.setNickname(user.getNickname());
|
||||
item.setAvatar(user.getAvatar());
|
||||
item.setCity(user.getCity());
|
||||
item.setUser(user);
|
||||
}
|
||||
});
|
||||
result.setList(taskRecordList);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaskRecord> listRel(TaskRecordParam param) {
|
||||
List<TaskRecord> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<TaskRecord, TaskRecordParam> page = new PageParam<>();
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskRecord getByIdRel(Integer taskRecordId) {
|
||||
TaskRecordParam param = new TaskRecordParam();
|
||||
param.setTaskRecordId(taskRecordId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.param.CompanyParam;
|
||||
import com.gxwebsoft.oa.entity.Company;
|
||||
import com.gxwebsoft.oa.entity.TaskCount;
|
||||
import com.gxwebsoft.oa.entity.TaskRecord;
|
||||
import com.gxwebsoft.oa.mapper.TaskMapper;
|
||||
import com.gxwebsoft.oa.service.TaskCountService;
|
||||
import com.gxwebsoft.oa.service.TaskRecordService;
|
||||
import com.gxwebsoft.oa.service.TaskService;
|
||||
import com.gxwebsoft.oa.entity.Task;
|
||||
import com.gxwebsoft.oa.param.TaskParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static com.gxwebsoft.common.core.constants.TaskConstants.*;
|
||||
|
||||
/**
|
||||
* 任务记录表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Service
|
||||
public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService {
|
||||
@Resource
|
||||
private TaskRecordService taskRecordService;
|
||||
@Resource
|
||||
private TaskCountService taskCountService;
|
||||
|
||||
@Override
|
||||
public PageResult<Task> pageRel(TaskParam param) {
|
||||
PageParam<Task, TaskParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<Task> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Task> listRel(TaskParam param) {
|
||||
List<Task> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<Task, TaskParam> page = new PageParam<>();
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Task getByIdRel(Integer taskId) {
|
||||
TaskParam param = new TaskParam();
|
||||
param.setTaskId(taskId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getCountNum(User loginUser, TaskParam param) {
|
||||
Integer type = loginUser.getType();
|
||||
final Integer userId = param.getUserId();
|
||||
// if (param.getUserId() != null) {
|
||||
// this.userId = param.getUserId();
|
||||
// }else {
|
||||
// this.userId = loginUser.getUserId();
|
||||
// }
|
||||
|
||||
AtomicInteger count1 = new AtomicInteger(count(new LambdaQueryWrapper<Task>().eq(Task::getStatus, 0)));
|
||||
AtomicInteger count2 = new AtomicInteger(count(new LambdaQueryWrapper<Task>().eq(Task::getStatus, 1)));
|
||||
// 非管理员仅可浏览和自己相关的工单
|
||||
loginUser.getRoles().forEach(d -> {
|
||||
|
||||
if (type.equals(6)) {
|
||||
count1.set(count(new LambdaQueryWrapper<Task>().eq(Task::getStatus, 0).eq(Task::getCommander, userId)));
|
||||
count2.set(count(new LambdaQueryWrapper<Task>().eq(Task::getStatus, 1).eq(Task::getCommander, userId)));
|
||||
}
|
||||
if (type.equals(10)) {
|
||||
count1.set(count(new LambdaQueryWrapper<Task>().eq(Task::getStatus, 0).eq(Task::getPromoter, userId)));
|
||||
count2.set(count(new LambdaQueryWrapper<Task>().eq(Task::getStatus, 1).eq(Task::getPromoter, userId)));
|
||||
}
|
||||
});
|
||||
JSONObject json1 = new JSONObject();
|
||||
json1.put("tab", "待处理");
|
||||
json1.put("key", "0");
|
||||
json1.put("count", count1);
|
||||
JSONObject json2 = new JSONObject();
|
||||
json2.put("tab", "已完成");
|
||||
json2.put("key", "1");
|
||||
json2.put("count", count2);
|
||||
ArrayList<Object> objects = new ArrayList<>();
|
||||
objects.add(json1);
|
||||
objects.add(json2);
|
||||
return objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交工单记录
|
||||
*/
|
||||
@Override
|
||||
public boolean saveByRel(Task task) {
|
||||
// 保存工单
|
||||
save(task);
|
||||
// 添加第一条记录
|
||||
TaskRecord taskRecord = BeanUtil.copyProperties(task, TaskRecord.class);
|
||||
taskRecord.setCreateTime(new Date());
|
||||
taskRecord.setUpdateTime(new Date());
|
||||
taskRecordService.save(taskRecord);
|
||||
// 添加统计记录表
|
||||
if (taskCountService.count(new LambdaQueryWrapper<TaskCount>().eq(TaskCount::getUserId, task.getUserId())) == 0) {
|
||||
final TaskCount taskCount = new TaskCount();
|
||||
taskCount.setUserId(task.getUserId());
|
||||
taskCount.setRoleId(task.getRoleId());
|
||||
taskCount.setRoleCode(task.getRoleCode());
|
||||
taskCount.setOrganizationId(task.getOrganizationId());
|
||||
taskCountService.save(taskCount);
|
||||
}
|
||||
// 更新统计表
|
||||
TaskCount taskCount = taskCountService.getByUserId(task.getUserId());
|
||||
taskCount.setPending(taskCount.getPending() + 1);
|
||||
taskCountService.updateById(taskCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Async
|
||||
@Override
|
||||
public void updateCount(Task task) {
|
||||
// 统计项目发起人
|
||||
TaskCount user = taskCountService.getByUserId(task.getLoginUserId());
|
||||
user.setPending(count(new LambdaQueryWrapper<Task>().eq(Task::getStatus, 0).eq(Task::getUserId,task.getLoginUserId())));
|
||||
taskCountService.updateById(user);
|
||||
// 统计项目受理人
|
||||
TaskCount commander = taskCountService.getByUserId(task.getCommander());
|
||||
commander.setPending(count(new LambdaQueryWrapper<Task>().eq(Task::getStatus,0).eq(Task::getCommander,task.getCommander())));
|
||||
taskCountService.updateById(commander);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<Task> pageRelAll(TaskParam param) {
|
||||
PageParam<Task, TaskParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<Task> list = baseMapper.selectPageRelAll(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateByIdAll(Task task) {
|
||||
baseMapper.updateByTaskId(task);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.TaskUserMapper;
|
||||
import com.gxwebsoft.oa.service.TaskUserService;
|
||||
import com.gxwebsoft.oa.entity.TaskUser;
|
||||
import com.gxwebsoft.oa.param.TaskUserParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工单成员Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-23 18:53:01
|
||||
*/
|
||||
@Service
|
||||
public class TaskUserServiceImpl extends ServiceImpl<TaskUserMapper, TaskUser> implements TaskUserService {
|
||||
|
||||
@Override
|
||||
public PageResult<TaskUser> pageRel(TaskUserParam param) {
|
||||
PageParam<TaskUser, TaskUserParam> page = new PageParam<>(param);
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
List<TaskUser> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaskUser> listRel(TaskUserParam param) {
|
||||
List<TaskUser> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<TaskUser, TaskUserParam> page = new PageParam<>();
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskUser getByIdRel(Integer taskUserId) {
|
||||
TaskUserParam param = new TaskUserParam();
|
||||
param.setTaskUserId(taskUserId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user