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