修改对外报告英语提示
This commit is contained in:
+37
-20
@@ -9,10 +9,12 @@ import com.jero.common.constant.enums.CutEnum;
|
|||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.common.util.oss.CosBootUtil;
|
import com.jero.common.util.oss.CosBootUtil;
|
||||||
|
import com.jero.generater.modules.online.auth.entity.OnlAuthData;
|
||||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||||
import com.jero.modules.extRepo.entity.ExtRepoDataPage;
|
import com.jero.modules.extRepo.entity.ExtRepoDataPage;
|
||||||
import com.jero.modules.extRepo.service.IExtRepoDataService;
|
import com.jero.modules.extRepo.service.IExtRepoDataService;
|
||||||
import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
||||||
|
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -88,6 +90,7 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
queryWrapper.eq(ExtRepoData::getSupFolder, extRepoData.getSupFolder());
|
queryWrapper.eq(ExtRepoData::getSupFolder, extRepoData.getSupFolder());
|
||||||
|
queryWrapper.orderBy(true, false, ExtRepoData::getCreateTime);
|
||||||
IPage<ExtRepoData> pageList = extRepoDataService.page(page, queryWrapper);
|
IPage<ExtRepoData> pageList = extRepoDataService.page(page, queryWrapper);
|
||||||
ExtRepoDataPage res = new ExtRepoDataPage(extRepoFolderService.haveManageAuth(extRepoData.getSupFolder()), pageList);
|
ExtRepoDataPage res = new ExtRepoDataPage(extRepoFolderService.haveManageAuth(extRepoData.getSupFolder()), pageList);
|
||||||
return Result.OK(res);
|
return Result.OK(res);
|
||||||
@@ -116,21 +119,23 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
@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) {
|
||||||
|
Result<ExtRepoData> result = new Result();
|
||||||
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(extRepoData.getCut())) {
|
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||||
return Result.OK("添加成功:" + res + "条数据!");
|
result.success("添加成功:" + res + "条数据!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("success:" + res + "data!");
|
result.success(res + " pieces of data are added successfully!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||||
return Result.error("没有权限!");
|
result.success("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
result.success("You do not have permission !");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -144,23 +149,25 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
@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) {
|
||||||
|
Result<ExtRepoData> result = new Result();
|
||||||
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(extRepoData.getCut())) {
|
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||||
return Result.OK("添加成功!");
|
result.success("编辑成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("success!");
|
result.success("Data update successfully!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||||
return Result.error("没有权限!");
|
result.success("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
result.success("You do not have permission !");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -174,6 +181,7 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam("id") String id,
|
public Result<?> delete(@RequestParam("id") String id,
|
||||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||||
|
Result<ExtRepoData> result = new Result();
|
||||||
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();
|
||||||
@@ -181,20 +189,25 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
extRepoDataService.deleteById(id);
|
extRepoDataService.deleteById(id);
|
||||||
CosBootUtil.delete(erd.getFileKey());
|
CosBootUtil.delete(erd.getFileKey());
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
return Result.OK("删除成功!");
|
result.success("删除成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("Delete success!");
|
result.success("Data deletion successfully!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
return Result.error("没有权限!");
|
result.success("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
result.success("You do not have permission!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Result.error("Delete Error!");
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
result.success("删除失败!");
|
||||||
|
} else {
|
||||||
|
result.success("Delete failed!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -208,30 +221,32 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam("ids") String ids,
|
public Result<?> deleteBatch(@RequestParam("ids") String ids,
|
||||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||||
|
Result<ExtRepoData> result = new Result();
|
||||||
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) {
|
||||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||||
if (null != erd && !extRepoFolderService.isManager() && !sysUser.getUsername().equals(erd.getCreateBy())) {
|
if (null != erd && !extRepoFolderService.isManager() && !sysUser.getUsername().equals(erd.getCreateBy())) {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
return Result.error("没有权限!");
|
result.success("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
result.success("You do not have permission!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (String id : idsList) {
|
for (String id : idsList) {
|
||||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||||
if(null!=erd){
|
if (null != erd) {
|
||||||
CosBootUtil.delete(erd.getFileKey());
|
CosBootUtil.delete(erd.getFileKey());
|
||||||
this.extRepoDataService.deleteById(id);
|
this.extRepoDataService.deleteById(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
return Result.OK("删除成功!");
|
result.success("删除成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("Delete success!");
|
result.success("Data deletion successfully!");
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -244,11 +259,13 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
|||||||
@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) {
|
||||||
|
Result<ExtRepoData> result = new Result();
|
||||||
ExtRepoData extRepoData = extRepoDataService.queryById(id);
|
ExtRepoData extRepoData = extRepoDataService.queryById(id);
|
||||||
if (extRepoData == null) {
|
if (extRepoData == null) {
|
||||||
return Result.error("未找到对应数据");
|
result.success("未找到对应数据!");
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return Result.OK(extRepoData);
|
return result.OK(extRepoData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-18
@@ -59,20 +59,22 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
|||||||
@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) {
|
||||||
|
Result<ExtRepoFolder> result = new Result();
|
||||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getSupFolder())) {
|
if (extRepoFolderService.haveManageAuth(extRepoFolder.getSupFolder())) {
|
||||||
extRepoFolderService.add(extRepoFolder);
|
extRepoFolderService.add(extRepoFolder);
|
||||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||||
return Result.OK("添加成功!");
|
result.success("添加成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("success!");
|
result.success("Data added successfully!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||||
return Result.error("没有权限!");
|
result.success("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
result.success("You do not have permission !");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -85,20 +87,22 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
|||||||
@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) {
|
||||||
|
Result<ExtRepoFolder> result = new Result();
|
||||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getId())) {
|
if (extRepoFolderService.haveManageAuth(extRepoFolder.getId())) {
|
||||||
extRepoFolderService.editById(extRepoFolder);
|
extRepoFolderService.editById(extRepoFolder);
|
||||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||||
return Result.OK("编辑成功!");
|
result.success("编辑成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("success!");
|
result.success("Data update successfully!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||||
return Result.error("没有权限!");
|
result.success("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
result.success("You do not have permission !");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,33 +116,35 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
|||||||
@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(name = "cut", defaultValue = "cn") String cut) {
|
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||||
|
Result<ExtRepoFolder> result = new Result();
|
||||||
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()) {
|
||||||
List<ExtRepoData> erdList = extRepoDataService.queryByFolder(id);
|
List<ExtRepoData> erdList = extRepoDataService.queryByFolder(id);
|
||||||
for (ExtRepoData erd:erdList){
|
for (ExtRepoData erd : erdList) {
|
||||||
extRepoDataService.deleteById(erd.getId());
|
extRepoDataService.deleteById(erd.getId());
|
||||||
}
|
}
|
||||||
extRepoFolderService.deleteById(id);
|
extRepoFolderService.deleteById(id);
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
return Result.error("请先删除子文件夹!");
|
result.success("请先删除子文件夹!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("Please Delete Subfolder First!");
|
result.success("Please delete the subfolder first!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
return Result.error("没有权限!");
|
result.success("没有权限!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Permission!");
|
result.success("You do not have permission!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
return Result.OK("删除成功!");
|
result.success("删除成功!");
|
||||||
} else {
|
} else {
|
||||||
return Result.OK("success!");
|
result.success("Data deletion successfully!");
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -152,14 +158,15 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
|||||||
@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(name = "cut", defaultValue = "cn") String cut) {
|
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||||
|
Result<ExtRepoFolder> result = new Result();
|
||||||
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)) {
|
||||||
return Result.error("未找到对应数据");
|
result.success("未找到对应数据!");
|
||||||
} else {
|
} else {
|
||||||
return Result.error("No Data!");
|
result.success("No Data!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Result.OK(extRepoFolder);
|
return result.OK(extRepoFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user