修改对外报告提示文字
This commit is contained in:
+8
-10
@@ -114,18 +114,17 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
@AutoLog(value = "对外报告数据表-添加")
|
@AutoLog(value = "对外报告数据表-添加")
|
||||||
@ApiOperation(value = "对外报告数据表-添加", notes = "对外报告数据表-添加")
|
@ApiOperation(value = "对外报告数据表-添加", notes = "对外报告数据表-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@Validated @RequestBody ExtRepoData extRepoData,
|
public Result<?> add(@Validated @RequestBody ExtRepoData extRepoData) {
|
||||||
@RequestParam("cut") String cut) {
|
|
||||||
if (extRepoFolderService.haveManageAuth(extRepoData.getSupFolder())) {
|
if (extRepoFolderService.haveManageAuth(extRepoData.getSupFolder())) {
|
||||||
log.info("对外报告数据表收到文件添加请求,开始处理文件:【" + sdf.format(new Date()) + "】");
|
log.info("对外报告数据表收到文件添加请求,开始处理文件:【" + sdf.format(new Date()) + "】");
|
||||||
int res = extRepoDataService.add(extRepoData);
|
int res = extRepoDataService.add(extRepoData);
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||||
return Result.OK("添加成功:" + res + "条数据!");
|
return Result.OK("添加成功:" + res + "条数据!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("success:" + res + "data!");
|
return Result.OK("success:" + res + "data!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||||
return Result.error("没有权限!");
|
return Result.error("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
return Result.error("No Permission!");
|
||||||
@@ -143,20 +142,19 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
@AutoLog(value = "对外报告数据表-编辑")
|
@AutoLog(value = "对外报告数据表-编辑")
|
||||||
@ApiOperation(value = "对外报告数据表-编辑", notes = "对外报告数据表-编辑")
|
@ApiOperation(value = "对外报告数据表-编辑", notes = "对外报告数据表-编辑")
|
||||||
@PutMapping(value = "/edit")
|
@PutMapping(value = "/edit")
|
||||||
public Result<?> edit(@Validated @RequestBody ExtRepoData extRepoData,
|
public Result<?> edit(@Validated @RequestBody ExtRepoData extRepoData) {
|
||||||
@RequestParam("cut") String cut) {
|
|
||||||
ExtRepoData erd = extRepoDataService.queryById(extRepoData.getId());
|
ExtRepoData erd = extRepoDataService.queryById(extRepoData.getId());
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) {
|
if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) {
|
||||||
extRepoData.setSupFolder(erd.getSupFolder());
|
extRepoData.setSupFolder(erd.getSupFolder());
|
||||||
extRepoDataService.editById(extRepoData);
|
extRepoDataService.editById(extRepoData);
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("success!");
|
return Result.OK("success!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||||
return Result.error("没有权限!");
|
return Result.error("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
return Result.error("No Permission!");
|
||||||
@@ -174,7 +172,7 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
@ApiOperation(value = "对外报告数据表-通过id删除", notes = "对外报告数据表-通过id删除")
|
@ApiOperation(value = "对外报告数据表-通过id删除", notes = "对外报告数据表-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam("id") String id,
|
public Result<?> delete(@RequestParam("id") String id,
|
||||||
@RequestParam("cut") String cut) {
|
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||||
if (null != erd) {
|
if (null != erd) {
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
@@ -207,7 +205,7 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
@ApiOperation(value = "对外报告数据表-批量删除", notes = "对外报告数据表-批量删除")
|
@ApiOperation(value = "对外报告数据表-批量删除", notes = "对外报告数据表-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam("ids") String ids,
|
public Result<?> deleteBatch(@RequestParam("ids") String ids,
|
||||||
@RequestParam("cut") String cut) {
|
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
List<String> idsList = Arrays.asList(ids.split(","));
|
List<String> idsList = Arrays.asList(ids.split(","));
|
||||||
for (String id : idsList) {
|
for (String id : idsList) {
|
||||||
|
|||||||
+8
-10
@@ -53,17 +53,16 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
|||||||
@AutoLog(value = "对外报告文件夹表-添加")
|
@AutoLog(value = "对外报告文件夹表-添加")
|
||||||
@ApiOperation(value = "对外报告文件夹表-添加", notes = "对外报告文件夹表-添加")
|
@ApiOperation(value = "对外报告文件夹表-添加", notes = "对外报告文件夹表-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@Validated @RequestBody ExtRepoFolder extRepoFolder,
|
public Result<?> add(@Validated @RequestBody ExtRepoFolder extRepoFolder) {
|
||||||
@RequestParam("cut") String cut) {
|
|
||||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getSupFolder())) {
|
if (extRepoFolderService.haveManageAuth(extRepoFolder.getSupFolder())) {
|
||||||
extRepoFolderService.add(extRepoFolder);
|
extRepoFolderService.add(extRepoFolder);
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("success!");
|
return Result.OK("success!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||||
return Result.error("没有权限!");
|
return Result.error("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
return Result.error("No Permission!");
|
||||||
@@ -80,17 +79,16 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
|||||||
@AutoLog(value = "对外报告文件夹表-编辑")
|
@AutoLog(value = "对外报告文件夹表-编辑")
|
||||||
@ApiOperation(value = "对外报告文件夹表-编辑", notes = "对外报告文件夹表-编辑")
|
@ApiOperation(value = "对外报告文件夹表-编辑", notes = "对外报告文件夹表-编辑")
|
||||||
@PutMapping(value = "/edit")
|
@PutMapping(value = "/edit")
|
||||||
public Result<?> edit(@Validated @RequestBody ExtRepoFolder extRepoFolder,
|
public Result<?> edit(@Validated @RequestBody ExtRepoFolder extRepoFolder) {
|
||||||
@RequestParam("cut") String cut) {
|
|
||||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getId())) {
|
if (extRepoFolderService.haveManageAuth(extRepoFolder.getId())) {
|
||||||
extRepoFolderService.editById(extRepoFolder);
|
extRepoFolderService.editById(extRepoFolder);
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("success!");
|
return Result.OK("success!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||||
return Result.error("没有权限!");
|
return Result.error("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
return Result.error("No Permission!");
|
||||||
@@ -108,7 +106,7 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
|||||||
@ApiOperation(value = "对外报告文件夹表-通过id删除", notes = "对外报告文件夹表-通过id删除")
|
@ApiOperation(value = "对外报告文件夹表-通过id删除", notes = "对外报告文件夹表-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id,
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id,
|
||||||
@RequestParam("cut") String cut) {
|
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||||
if (extRepoFolderService.haveManageAuth(id)) {
|
if (extRepoFolderService.haveManageAuth(id)) {
|
||||||
List<ExtRepoFolder> resList = extRepoFolderService.getListBySupFolder(id);
|
List<ExtRepoFolder> resList = extRepoFolderService.getListBySupFolder(id);
|
||||||
if (resList.isEmpty()) {
|
if (resList.isEmpty()) {
|
||||||
@@ -144,7 +142,7 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
|||||||
@ApiOperation(value = "对外报告文件夹表-通过id查询", notes = "对外报告文件夹表-通过id查询")
|
@ApiOperation(value = "对外报告文件夹表-通过id查询", notes = "对外报告文件夹表-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id,
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id,
|
||||||
@RequestParam("cut") String cut) {
|
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||||
ExtRepoFolder extRepoFolder = extRepoFolderService.queryById(id);
|
ExtRepoFolder extRepoFolder = extRepoFolderService.queryById(id);
|
||||||
if (extRepoFolder == null) {
|
if (extRepoFolder == null) {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
|||||||
+4
@@ -1,6 +1,7 @@
|
|||||||
package com.jero.modules.extRepo.entity;
|
package com.jero.modules.extRepo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
@@ -78,4 +79,7 @@ public class ExtRepoData implements Serializable {
|
|||||||
@ApiModelProperty(value = "所属文件夹")
|
@ApiModelProperty(value = "所属文件夹")
|
||||||
private java.lang.String supFolder;
|
private java.lang.String supFolder;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String cut;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -1,6 +1,7 @@
|
|||||||
package com.jero.modules.extRepo.entity;
|
package com.jero.modules.extRepo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
@@ -92,4 +93,7 @@ public class ExtRepoFolder implements Serializable {
|
|||||||
@Excel(name = "管理权限人员id", width = 15)
|
@Excel(name = "管理权限人员id", width = 15)
|
||||||
@ApiModelProperty(value = "管理权限人员id")
|
@ApiModelProperty(value = "管理权限人员id")
|
||||||
private String authManageIds;
|
private String authManageIds;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String cut;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user