From 9cca98d3f486495767ef745f7ada20042571f58d Mon Sep 17 00:00:00 2001 From: hongjli <3117313295@qq.com> Date: 星期三, 21 五月 2025 12:12:55 +0800 Subject: [PATCH] 补充标准焊缝数据数据查询接口,新增适用plant(适用工厂)字段 --- aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java index ece0314..e2b1ddd 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java @@ -1,5 +1,6 @@ package com.aps.core.controller.basicData; +import com.aps.common.core.utils.DateUtils; import com.aps.common.core.utils.poi.ExcelUtil; import com.aps.common.core.web.controller.BaseController; import com.aps.common.core.web.domain.AjaxResult; @@ -7,6 +8,7 @@ import com.aps.common.log.annotation.Log; import com.aps.common.log.enums.BusinessType; import com.aps.common.security.annotation.RequiresPermissions; +import com.aps.common.security.utils.SecurityUtils; import com.aps.core.domain.ApsGasPipelineCapacityPlan; import com.aps.core.domain.ApsStandardProcess; import com.aps.core.service.IApsGasPipelineCapacityPlanService; @@ -42,7 +44,7 @@ * 鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃 */ @Operation(summary = "鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃", description = "鍒嗛〉鏌ヨ") -// @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:list") + @RequiresPermissions("aps:gasPipelineCapacityPlan:list") @GetMapping("/list") public TableDataInfo list(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) { @@ -50,19 +52,22 @@ List<ApsGasPipelineCapacityPlan> list = apsGasPipelineCapacityPlanService.selectApsGasPipelineCapacityPlanList(apsGasPipelineCapacityPlan); ApsStandardProcess apsStandardProcess = new ApsStandardProcess(); apsStandardProcess.setMajor(apsGasPipelineCapacityPlan.getMajor()); + apsStandardProcess.setPlant(apsGasPipelineCapacityPlan.getOrgCode()); List<ApsStandardProcess> processList = apsStandardProcessService.selectApsStandardProcessListAll(apsStandardProcess); if(list.isEmpty()){ for(ApsStandardProcess apsStandardProcessTemp : processList){ ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlanTemp = new ApsGasPipelineCapacityPlan(); apsGasPipelineCapacityPlanTemp.setProcessName(apsStandardProcessTemp.getProcessName()); + apsGasPipelineCapacityPlanTemp.setOrgCode(apsStandardProcessTemp.getPlant()); list.add(apsGasPipelineCapacityPlanTemp); } - }else if(processList.size()>list.size()){ + } + if(processList.size()>list.size()){ List<String> newProcess = new ArrayList<>(); for(ApsStandardProcess apsStandardProcessTemp : processList){ boolean flag = true; for(ApsGasPipelineCapacityPlan temp : list){ - if(apsStandardProcessTemp.getMajor().equals(temp.getMajor())){ + if(apsStandardProcessTemp.getProcessName().equals(temp.getProcessName())){ flag = false; break; } @@ -77,6 +82,7 @@ list.add(apsGasPipelineCapacityPlanTemp); } } + list.sort((a, b)->a.getProcessName().compareTo(b.getProcessName())); return getDataTable(list); } @@ -84,7 +90,7 @@ * 瀵煎嚭姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃 */ @Operation(summary = "瀵煎嚭姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃", description = "瀵煎嚭") - @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:export") + @RequiresPermissions("aps:gasPipelineCapacityPlan:export") @Log(title = "姘斾綋绠¤矾浜ц兘瑙勫垝", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) @@ -98,7 +104,7 @@ * 鑾峰彇姘斾綋绠¤矾浜ц兘瑙勫垝璇︾粏淇℃伅 */ @Operation(summary = "鑾峰彇姘斾綋绠¤矾浜ц兘瑙勫垝璇︾粏淇℃伅", description = "鏍规嵁id鑾峰彇") - @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:query") + @RequiresPermissions("aps:gasPipelineCapacityPlan:query") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { @@ -109,15 +115,19 @@ * 鏂板姘斾綋绠¤矾浜ц兘瑙勫垝 */ @Operation(summary = "鏂板姘斾綋绠¤矾浜ц兘瑙勫垝", description = "鍗曚釜鏂板") - @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:add") + @RequiresPermissions("aps:gasPipelineCapacityPlan:add") @Log(title = "姘斾綋绠¤矾浜ц兘瑙勫垝", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody List<ApsGasPipelineCapacityPlan> apsGasPipelineCapacityPlan) { apsGasPipelineCapacityPlan.forEach(apsGasPipelineCapacityPlanTemp -> { - if(apsGasPipelineCapacityPlanTemp.getId()!=null){ + if(apsGasPipelineCapacityPlanTemp.getId()==null){ + apsGasPipelineCapacityPlanTemp.setCreateBy(SecurityUtils.getUsername()); + apsGasPipelineCapacityPlanTemp.setCreateTime(DateUtils.getNowDate()); apsGasPipelineCapacityPlanService.insertApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlanTemp); }else{ + apsGasPipelineCapacityPlanTemp.setUpdateBy(SecurityUtils.getUsername()); + apsGasPipelineCapacityPlanTemp.setUpdateTime(DateUtils.getNowDate()); apsGasPipelineCapacityPlanService.updateApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlanTemp); } }); @@ -128,7 +138,7 @@ * 淇敼姘斾綋绠¤矾浜ц兘瑙勫垝 */ @Operation(summary = "淇敼姘斾綋绠¤矾浜ц兘瑙勫垝", description = "鍗曚釜淇敼") - @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:edit") + @RequiresPermissions("aps:gasPipelineCapacityPlan:edit") @Log(title = "姘斾綋绠¤矾浜ц兘瑙勫垝", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) @@ -140,7 +150,7 @@ * 鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝 */ @Operation(summary = "鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝", description = "鎵归噺鍒犻櫎") - @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:remove") + @RequiresPermissions("aps:gasPipelineCapacityPlan:remove") @Log(title = "姘斾綋绠¤矾浜ц兘瑙勫垝", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) -- Gitblit v1.9.3