|
@@ -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不能为空");
|