From d742edc9ad3a6aee08fbe3ab5b257dc60449855d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Wed, 5 Jul 2023 16:28:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=8B=E6=9C=BA=E7=AB=AFPC?= =?UTF-8?q?=E7=AB=AF=E6=8E=A5=E5=8F=A3=E5=88=86=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProblemKnowledgeBaseEOServiceImpl.java | 2 +- ...ectCertificationInventoryEOController.java | 356 ++++++++++++++++++ 2 files changed, 357 insertions(+), 1 deletion(-) create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/PhoneProjectCertificationInventoryEOController.java diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java index cb7cba3b0..2c7a9ff12 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java @@ -458,7 +458,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl { + @Autowired + private IProjectCertificationInventoryEOService projectCertificationInventoryEOService; + + /** + * 分页列表查询 + * + * @param projectCertificationInventoryEO + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "项目库-认证清单表-分页列表查询") + @ApiOperation(value="项目库-认证清单表-分页列表查询", notes="项目库-认证清单表-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(ProjectCertificationInventoryEO projectCertificationInventoryEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + @RequestParam(name="cut", defaultValue="cn") String cut, + HttpServletRequest req) { + String flowStatusStr = ""; + if (StringUtils.isNotEmpty(projectCertificationInventoryEO.getFlowStatus())) { + flowStatusStr = projectCertificationInventoryEO.getFlowStatus(); + projectCertificationInventoryEO.setFlowStatus(null); + } + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryEO, req.getParameterMap()); + if (StringUtils.isNotEmpty(flowStatusStr)) { + String finalflowStatusStr = flowStatusStr.replaceAll("\\*",""); + queryWrapper.and(query -> { + query.lambda().like(ProjectCertificationInventoryEO::getFlowStatus, finalflowStatusStr); + if(StringUtils.contains(finalflowStatusStr,",")){ + String[] flowStatusArr = finalflowStatusStr.split(","); + for (String fs : flowStatusArr) { + query.or(q -> { + q.like("flow_status",fs); + }); + } + } + }); + } + queryWrapper.orderByDesc("create_time"); + Page page = new Page(pageNo, pageSize); + IPage pageList = this.projectCertificationInventoryEOService.queryPage(queryWrapper,page,projectCertificationInventoryEO,cut); + return Result.OK(cut,pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "项目库-认证清单表-列表查询") + @ApiOperation(value="项目库-认证清单表-列表查询", notes="项目库-认证清单表-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List list = projectCertificationInventoryEOService.queryList(); + return Result.OK(list); + } + + /** + * 添加 + * + * @param projectCertificationInventoryEO + * @return + */ + @AutoLog(value = "项目库-认证清单表-添加") + @ApiOperation(value="项目库-认证清单表-添加", notes="项目库-认证清单表-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody ProjectCertificationInventoryEO projectCertificationInventoryEO) { + projectCertificationInventoryEOService.add(projectCertificationInventoryEO); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param projectCertificationInventoryEO + * @return + */ + @AutoLog(value = "项目库-认证清单表-编辑") + @ApiOperation(value="项目库-认证清单表-编辑", notes="项目库-认证清单表-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody ProjectCertificationInventoryEO projectCertificationInventoryEO) { + projectCertificationInventoryEOService.editById(projectCertificationInventoryEO); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "项目库-认证清单表-通过id删除") + @ApiOperation(value="项目库-认证清单表-通过id删除", notes="项目库-认证清单表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + projectCertificationInventoryEOService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "项目库-认证清单表-批量删除") + @ApiOperation(value="项目库-认证清单表-批量删除", notes="项目库-认证清单表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.projectCertificationInventoryEOService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "项目库-认证清单表-通过id查询") + @ApiOperation(value="项目库-认证清单表-通过id查询", notes="项目库-认证清单表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + ProjectCertificationInventoryEO projectCertificationInventoryEO = projectCertificationInventoryEOService.queryById(id); + if(projectCertificationInventoryEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(projectCertificationInventoryEO); + } + + /** + * 导出excel + * + * @param request + * @param projectCertificationInventoryEO + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ProjectCertificationInventoryEO projectCertificationInventoryEO) { + return super.exportXls(request, projectCertificationInventoryEO, ProjectCertificationInventoryEO.class, "项目库-认证清单表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ProjectCertificationInventoryEO.class); + } + + @AutoLog(value = "项目库-认证清单表-批量添加") + @ApiOperation(value="项目库-认证清单表-批量添加", notes="项目库-认证清单表-批量添加") + @PostMapping(value = "/batchAdd") + public Result batchAdd(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.batchAdd(json); + } + + @AutoLog(value = "项目库-认证清单表-批量设置") + @ApiOperation(value="项目库-认证清单表-批量设置", notes="项目库-认证清单表-批量设置") + @PostMapping(value = "/setBatch") + public Result setBatch(@RequestBody ProjectCertificationInventoryEO projectCertificationInventoryEO) { + return this.projectCertificationInventoryEOService.setBatch(projectCertificationInventoryEO); + } + + @AutoLog(value = "项目库-认证清单表-studio发布") + @ApiOperation(value="项目库-认证清单表-studio发布", notes="项目库-认证清单表-studio发布") + @PostMapping(value = "/issue") + public Result issue(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.issue(json); + } + + @AutoLog(value = "项目库-认证清单表-当前登录用户角色") + @ApiOperation(value="项目库-认证清单表-当前登录用户角色", notes="项目库-认证清单表-当前登录用户角色") + @GetMapping(value = "/getRoleByUserId") + public Result> getRoleByUserId(@RequestParam Map params) { + return this.projectCertificationInventoryEOService.getRoleByUserId(params); + } + + @AutoLog(value = "项目库-认证清单表-获取流程状态列表") + @ApiOperation(value="项目库-认证清单表-获取流程状态列表", notes="项目库-认证清单表-获取流程状态列表") + @GetMapping(value = "/getFlowStatusList") + public Result getFlowStatusList(@RequestParam("cut") String cut) { + return this.projectCertificationInventoryEOService.getFlowStatusList(cut); + } + + @AutoLog(value = "项目库-认证清单表-认证流程统一提交任务接口") + @ApiOperation(value="项目库-认证清单表-认证流程统一提交任务接口", notes="项目库-认证清单表-认证流程统一提交任务接口") + @PostMapping(value = "/submitTask") + public Result submitTask(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.submitTask(json); + } + + @AutoLog(value = "项目库-认证清单表-批量保存") + @ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存") + @PostMapping(value = "/saveBatch") + public Result saveBatch(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.saveBatch(json); + } + + @AutoLog(value = "项目库-认证清单表-流程重置") + @ApiOperation(value="项目库-认证清单表-流程重置", notes="项目库-认证清单表-流程重置") + @PostMapping(value = "/resetFlow") + public Result resetFlow(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.resetFlow(json); + } + + @AutoLog(value = "项目库-认证清单表-转办") + @ApiOperation(value="项目库-认证清单表-转办", notes="项目库-认证清单表-转办") + @PostMapping(value = "/transferTask") + public Result transferTask(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.transferTask(json); + } + + @AutoLog(value = "项目库-认证清单表-催办") + @ApiOperation(value="项目库-认证清单表-催办", notes="项目库-认证清单表-催办") + @PostMapping(value = "/expediting") + public Result expediting(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.expediting(json); + } + + @AutoLog(value = "项目库-认证清单表-批量修改配置项") + @ApiOperation(value="项目库-认证清单表-批量修改配置项", notes="项目库-认证清单表-批量修改配置项") + @PostMapping(value = "/updateConfigItemBatch") + public Result updateConfigItemBatch(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.updateConfigItemBatch(json); + } + + @ApiOperation(value="项目库-认证清单表-模板下载", notes="项目库-认证清单表-模板下载") + @GetMapping(value = "/exportTemplate") + public void exportTemplate(ProjectCertificationInventoryEO projectCertificationInventoryEO, HttpServletResponse response, HttpServletRequest request) throws Exception { + projectCertificationInventoryEOService.exportTemplate(projectCertificationInventoryEO,response,request); + } + + /** + * 导入数据 + * + * @param file + * @param projectCertificationInventoryEO + * @return + */ + @ApiOperation(value="项目库-认证清单表-导入数据", notes="项目库-认证清单表-导入数据") + @RequestMapping(value = "/importData", method = RequestMethod.POST) + public Result importData(@RequestParam(value = "file", required = false) MultipartFile file, + ProjectCertificationInventoryEO projectCertificationInventoryEO) { + projectCertificationInventoryEOService.importData(file,projectCertificationInventoryEO); + return Result.OK("导入成功"); + } + /** + * 导出数据 + * @param request + * @param projectCertificationInventoryEO + */ + @ApiOperation(value="项目库-认证清单表-导出数据", notes="项目库-认证清单表-导出数据") + @RequestMapping(value = "/exportData",method = RequestMethod.GET) +// @RequiresPermissions("projectLawsInventory:exportData") + public void exportData(HttpServletResponse response, + HttpServletRequest request, + ProjectCertificationInventoryEO projectCertificationInventoryEO) { + projectCertificationInventoryEOService.exportData(response,request, projectCertificationInventoryEO); + } + + @AutoLog(value = "项目库-认证清单表-调取添加") + @ApiOperation(value="项目库-认证清单表-调取添加", notes="项目库-认证清单表-调取添加") + @PostMapping(value = "/callAdd") + public Result callAdd(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.callAdd(json); + } + + @AutoLog(value = "项目库-认证清单表-引用交付物") + @ApiOperation(value="项目库-认证清单表-引用交付物", notes="项目库-认证清单表-引用交付物") + @PostMapping(value = "/citeDeliverable") + public Result citeDeliverable(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.citeDeliverable(json); + } + + /** + * 批量更新法规清单状态 + * @param json + * @return + */ + @AutoLog(value = "项目库-认证清单表-批量更新流程状态") + @ApiOperation(value="项目库-认证清单表-批量更新流程状态", notes="项目库-认证清单表-批量更新流程状态") + @PostMapping(value = "/updateStatusBatch") + public Result updateStatusBatch(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.updateStatusBatch(json); + } + + /** + * 添加配置 等同于 复制 + * @param json + * @return + */ + @AutoLog(value = "项目库-认证清单表-添加配置") + @ApiOperation(value="项目库-认证清单表-添加配置", notes="项目库-认证清单表-添加配置") + @PostMapping(value = "/addConfigByIds") + public Result addConfigByIds(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.addConfigByIds(json); + } + + /** + * 获取责任人和接口人 + * @return + */ + @AutoLog(value = "项目库-认证清单表-获取责任人和接口人") + @ApiOperation(value="项目库-认证清单表-获取责任人和接口人", notes="项目库-认证清单表-获取责任人和接口人") + @GetMapping(value = "/queryDutyPersonByProjectId") + public Result queryDutyPersonByProjectId(@RequestParam Map params) { + return Result.OK(this.projectCertificationInventoryEOService.queryDutyPersonByProjectId(params)); + } +}