suntianwu 2 年之前
父節點
當前提交
3c52a72354

+ 31 - 7
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmDemandController.java

@@ -1,6 +1,7 @@
 package com.ozs.web.controller.pm;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ozs.common.annotation.Log;
 import com.ozs.common.constant.ModularConstans;
@@ -10,6 +11,7 @@ import com.ozs.common.enums.BusinessType;
 import com.ozs.common.utils.StringUtils;
 import com.ozs.framework.web.service.TokenService;
 import com.ozs.pm.doman.PmDemand;
+import com.ozs.pm.doman.PmDemandHis;
 import com.ozs.pm.doman.vo.requestVo.PmBookBuildingReqVo;
 import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
 import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
@@ -20,16 +22,13 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.ObjectUtils;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.ozs.common.core.controller.BaseController;
 import com.ozs.common.core.domain.AjaxResult;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.validation.constraints.NotEmpty;
-import java.util.Date;
+import java.util.*;
 
 /**
  * 采购需求Controller
@@ -80,14 +79,39 @@ public class PmDemandController extends BaseController {
         }
         return success(pmDemandService.selectPmDemandByDemandId(pmDemandReqVo.getDemandId(),pmDemandReqVo.getDetailType()));
     }
+    /**
+     * 获取回退下拉列表
+     */
+    @ApiOperation(value = "获取回退下拉列表", notes = "必传demandId")
+    @GetMapping("/getReturnList")
+    @PreAuthorize("@ss.hasPermi('pm:demand:getReturnList')")
+    @Log(title = ModularConstans.demand, businessType = BusinessType.QUERY)
+    public AjaxResult getReturnList(@NotEmpty(message = "需求ID不能为空")
+                                    @RequestParam(value = "demandId", required = true) Long demandId) {
+        List< Map<String,Integer>> list = new ArrayList<>();
+        LambdaQueryWrapper<PmDemandHis> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(PmDemandHis::getDemandId,demandId).orderByAsc(PmDemandHis::getReturnOrderNumber);
+        List<PmDemandHis> pmDemandHisList = this.pmDemandHisService.list(lambdaQueryWrapper);
+        if(!ObjectUtils.isEmpty(pmDemandHisList)){
+            Map<String,Integer> map = new HashMap<>();
+            map.put("当前信息",0);
+            list.add(map);
+            for (PmDemandHis pmDemandHis : pmDemandHisList) {
+                Map<String,Integer> map2 = new HashMap<>();
+                map2.put("第" + pmDemandHis.getReturnOrderNumber() + "回退",pmDemandHis.getReturnOrderNumber());
+                list.add(map2);
+            }
+        }
 
+        return success(list);
+    }
     /**
      * 查看历史详情
      */
-    @ApiOperation(value = "查看历史详情", notes = "必传demandId和详情类型(1项目计划,2需求建档,3任务下达,4中标信息,5合同信息,6建设情况),returnOrderNumber(回退序号,0当前/1第一次回退/2第二次回退...),其他字段不传")
+    @ApiOperation(value = "查看历史详情", notes = "必传demandId和详情类型(1项目计划,2需求建档,3任务下达,4中标信息,5合同信息,6建设情况),必传returnOrderNumber(回退序号,0当前/1第一次回退/2第二次回退...),其他字段不传")
     @PostMapping("/viewHis")
     @PreAuthorize("@ss.hasPermi('pm:demand:viewHis')")
-    @Log(title = ModularConstans.purchaseExecution, businessType = BusinessType.QUERY)
+    @Log(title = ModularConstans.demand, businessType = BusinessType.QUERY)
     public AjaxResult viewHis(@RequestBody PmDemandReqVo pmDemandReqVo) {
         if(pmDemandReqVo.getDemandId() == null){
             return AjaxResult.error("demandId不能为空");

+ 27 - 2
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmPurchaseExecutionController.java

@@ -685,11 +685,36 @@ public class PmPurchaseExecutionController extends BaseController {
         }
         return success(pmDemandService.selectPmDemandByDemandId(pmDemandReqVo.getDemandId(),pmDemandReqVo.getDetailType()));
     }
+    /**
+     * 获取回退下拉列表
+     */
+    @ApiOperation(value = "获取回退下拉列表", notes = "必传demandId")
+    @GetMapping("/getReturnList")
+    @PreAuthorize("@ss.hasPermi('pm:purchaseExecution:getReturnList')")
+    @Log(title = ModularConstans.purchaseExecution, businessType = BusinessType.QUERY)
+    public AjaxResult getReturnList(@NotEmpty(message = "需求ID不能为空")
+                                    @RequestParam(value = "demandId", required = true) Long demandId) {
+        List< Map<String,Integer>> list = new ArrayList<>();
+        LambdaQueryWrapper<PmDemandHis> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(PmDemandHis::getDemandId,demandId).orderByAsc(PmDemandHis::getReturnOrderNumber);
+        List<PmDemandHis> pmDemandHisList = this.pmDemandHisService.list(lambdaQueryWrapper);
+        if(!ObjectUtils.isEmpty(pmDemandHisList)){
+            Map<String,Integer> map = new HashMap<>();
+            map.put("当前信息",0);
+            list.add(map);
+            for (PmDemandHis pmDemandHis : pmDemandHisList) {
+                Map<String,Integer> map2 = new HashMap<>();
+                map2.put("第" + pmDemandHis.getReturnOrderNumber() + "回退",pmDemandHis.getReturnOrderNumber());
+                list.add(map2);
+            }
+        }
 
+        return success(list);
+    }
     /**
      * 查看历史详情
      */
-    @ApiOperation(value = "查看历史详情", notes = "必传demandId和详情类型(1项目计划,2需求建档,3任务下达,4中标信息,5合同信息,6建设情况),returnOrderNumber(回退序号,0当前/1第一次回退/2第二次回退...),其他字段不传")
+    @ApiOperation(value = "查看历史详情", notes = "必传demandId和详情类型(1项目计划,2需求建档,3任务下达,4中标信息,5合同信息,6建设情况),必传returnOrderNumber(回退序号,0当前/1第一次回退/2第二次回退...),其他字段不传")
     @PostMapping("/viewHis")
     @PreAuthorize("@ss.hasPermi('pm:purchaseExecution:viewHis')")
     @Log(title = ModularConstans.purchaseExecution, businessType = BusinessType.QUERY)
@@ -879,7 +904,7 @@ public class PmPurchaseExecutionController extends BaseController {
     /**
      * 历史评标结果公告详情查看中标单位列表
      */
-    @ApiOperation(value = "历史评标结果公告详情查看历史中标单位列表", notes = "必传选需求ID、回退序号和中标ID")
+    @ApiOperation(value = "历史评标结果公告详情查看中标单位列表", notes = "必传选需求ID、回退序号和中标ID")
     @GetMapping("/getBidWinningUnitHisList")
     @PreAuthorize("@ss.hasPermi('pm:purchaseExecution:getBidWinningUnitHisList')")
     @Log(title = ModularConstans.purchaseExecution, businessType = BusinessType.QUERY)

+ 37 - 6
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmTaskReleaseController.java

@@ -1,6 +1,7 @@
 package com.ozs.web.controller.pm;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ozs.common.annotation.Log;
 import com.ozs.common.constant.ModularConstans;
@@ -11,6 +12,7 @@ import com.ozs.common.core.domain.model.LoginUser;
 import com.ozs.common.enums.BusinessType;
 import com.ozs.common.utils.StringUtils;
 import com.ozs.framework.web.service.TokenService;
+import com.ozs.pm.doman.PmDemandHis;
 import com.ozs.pm.doman.vo.requestVo.PmBookBuildingReqVo;
 import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
 import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
@@ -21,12 +23,14 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.ObjectUtils;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.validation.constraints.NotEmpty;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 任务下达Controller
@@ -92,13 +96,40 @@ public class PmTaskReleaseController extends BaseController {
         return success(pmDemandService.selectPmDemandByDemandId(pmDemandReqVo.getDemandId(), pmDemandReqVo.getDetailType()));
     }
 
+    /**
+     * 获取回退下拉列表
+     */
+    @ApiOperation(value = "获取回退下拉列表", notes = "必传demandId")
+    @GetMapping("/getReturnList")
+    @PreAuthorize("@ss.hasPermi('pm:taskRelease:getReturnList')")
+    @Log(title = ModularConstans.taskRelease, businessType = BusinessType.QUERY)
+    public AjaxResult getReturnList(@NotEmpty(message = "需求ID不能为空")
+                                        @RequestParam(value = "demandId", required = true) Long demandId) {
+        List< Map<String,Integer>> list = new ArrayList<>();
+        LambdaQueryWrapper<PmDemandHis> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(PmDemandHis::getDemandId,demandId).orderByAsc(PmDemandHis::getReturnOrderNumber);
+        List<PmDemandHis> pmDemandHisList = this.pmDemandHisService.list(lambdaQueryWrapper);
+        if(!ObjectUtils.isEmpty(pmDemandHisList)){
+            Map<String,Integer> map = new HashMap<>();
+            map.put("当前信息",0);
+            list.add(map);
+            for (PmDemandHis pmDemandHis : pmDemandHisList) {
+                Map<String,Integer> map2 = new HashMap<>();
+                map2.put("第" + pmDemandHis.getReturnOrderNumber() + "回退",pmDemandHis.getReturnOrderNumber());
+                list.add(map2);
+            }
+        }
+
+        return success(list);
+    }
+
     /**
      * 查看历史详情
      */
-    @ApiOperation(value = "查看历史详情", notes = "必传demandId和详情类型(1项目计划,2需求建档,3任务下达,4中标信息,5合同信息,6建设情况),returnOrderNumber(回退序号,0当前/1第一次回退/2第二次回退...),其他字段不传")
+    @ApiOperation(value = "查看历史详情", notes = "必传demandId和详情类型(1项目计划,2需求建档,3任务下达,4中标信息,5合同信息,6建设情况),必传returnOrderNumber(回退序号,0当前/1第一次回退/2第二次回退...),其他字段不传")
     @PostMapping("/viewHis")
     @PreAuthorize("@ss.hasPermi('pm:taskRelease:viewHis')")
-    @Log(title = ModularConstans.purchaseExecution, businessType = BusinessType.QUERY)
+    @Log(title = ModularConstans.taskRelease, businessType = BusinessType.QUERY)
     public AjaxResult viewHis(@RequestBody PmDemandReqVo pmDemandReqVo) {
         if(pmDemandReqVo.getDemandId() == null){
             return AjaxResult.error("demandId不能为空");

+ 2 - 4
purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmPurchaseExecutionResVo.java

@@ -1,9 +1,8 @@
 package com.ozs.pm.doman.vo.responseVo;
 
 
-import com.fasterxml.jackson.annotation.JsonFormat;
+
 import com.ozs.base.domain.BaseAgency;
-import com.ozs.pm.doman.PmProcurementDocumentsReview;
 import com.ozs.system.domain.SysFileInfo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -12,8 +11,7 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
-import java.util.Date;
-import java.util.HashMap;
+
 import java.util.List;