|
@@ -1,6 +1,7 @@
|
|
package com.ozs.web.controller.pm;
|
|
package com.ozs.web.controller.pm;
|
|
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.ozs.common.annotation.Log;
|
|
import com.ozs.common.annotation.Log;
|
|
import com.ozs.common.constant.ModularConstans;
|
|
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.common.utils.StringUtils;
|
|
import com.ozs.framework.web.service.TokenService;
|
|
import com.ozs.framework.web.service.TokenService;
|
|
import com.ozs.pm.doman.PmDemand;
|
|
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.PmBookBuildingReqVo;
|
|
import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
|
|
import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
|
|
import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
|
|
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.beans.factory.annotation.Autowired;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.util.ObjectUtils;
|
|
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.controller.BaseController;
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.validation.constraints.NotEmpty;
|
|
import javax.validation.constraints.NotEmpty;
|
|
-import java.util.Date;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 采购需求Controller
|
|
* 采购需求Controller
|
|
@@ -80,14 +79,39 @@ public class PmDemandController extends BaseController {
|
|
}
|
|
}
|
|
return success(pmDemandService.selectPmDemandByDemandId(pmDemandReqVo.getDemandId(),pmDemandReqVo.getDetailType()));
|
|
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")
|
|
@PostMapping("/viewHis")
|
|
@PreAuthorize("@ss.hasPermi('pm:demand: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) {
|
|
public AjaxResult viewHis(@RequestBody PmDemandReqVo pmDemandReqVo) {
|
|
if(pmDemandReqVo.getDemandId() == null){
|
|
if(pmDemandReqVo.getDemandId() == null){
|
|
return AjaxResult.error("demandId不能为空");
|
|
return AjaxResult.error("demandId不能为空");
|