|
@@ -2,7 +2,10 @@ package com.ozs.web.controller.pm;
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.ozs.common.annotation.Log;
|
|
|
+import com.ozs.common.constant.ModularConstans;
|
|
|
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.PmDemand;
|
|
@@ -13,6 +16,7 @@ import com.ozs.pm.service.IPmDemandService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
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;
|
|
@@ -45,6 +49,8 @@ public class PmDemandController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation(value = "查询采购需求列表", notes = "参数非必传")
|
|
|
@PostMapping("/list")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:demand:list')")
|
|
|
+ @Log(title = ModularConstans.demand, businessType = BusinessType.QUERY)
|
|
|
public AjaxResult list(@RequestBody PmDemandReqVo pmDemandReqVo) {
|
|
|
IPage<PmDemandResVo> page = pmDemandService.selectPmDemandList(pmDemandReqVo,0);
|
|
|
return success(page);
|
|
@@ -56,6 +62,8 @@ public class PmDemandController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation(value = "查看详情", notes = "必传demandId和详情类型(1项目计划,2需求建档,3任务下达,4中标信息,5合同信息,6建设情况),其他字段不传")
|
|
|
@PostMapping("/view")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:demand:view')")
|
|
|
+ @Log(title = ModularConstans.demand, businessType = BusinessType.QUERY)
|
|
|
public AjaxResult view(@RequestBody PmDemandReqVo pmDemandReqVo) {
|
|
|
if(pmDemandReqVo.getDemandId() == null){
|
|
|
return AjaxResult.error("demandId不能为空");
|
|
@@ -71,6 +79,8 @@ public class PmDemandController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation(value = "需求建档", notes = "必传demandId,根据项目类型必传pmDemandEngineeringResponseVo(3:工程类)、pmDemandEquipResponseVo(0:装备类)、pmDemandMaterialsResponseVo(1:物资类)、pmDemandServeResponseVo(2:服务类)其中之一")
|
|
|
@PostMapping("/bookBuilding")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:demand:bookBuilding')")
|
|
|
+ @Log(title = ModularConstans.demand, businessType = BusinessType.INSERT)
|
|
|
public AjaxResult bookBuilding(@NotEmpty(message = "数据为空") @RequestBody PmBookBuildingReqVo pmBookBuildingReqVo, HttpServletRequest request) {
|
|
|
try {
|
|
|
if (pmBookBuildingReqVo.getDemandId() == null) {
|
|
@@ -93,6 +103,8 @@ public class PmDemandController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "提交采购需求", notes = "必传demandId,其他字段不传")
|
|
|
@PostMapping("/commit")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:demand:commit')")
|
|
|
+ @Log(title = ModularConstans.demand, businessType = BusinessType.UPDATE)
|
|
|
public AjaxResult commit(@RequestBody PmDemandReqVo pmDemandReqVo, HttpServletRequest request) {
|
|
|
if(pmDemandReqVo.getDemandId() == null){
|
|
|
return AjaxResult.error("demandId不能为空");
|
|
@@ -108,6 +120,8 @@ public class PmDemandController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation(value = "查看流程图,获取当前阶段名字", notes = "必传demandId,其他字段不传")
|
|
|
@PostMapping("/viewFlowChart")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:demand:viewFlowChart')")
|
|
|
+ @Log(title = ModularConstans.demand, businessType = BusinessType.QUERY)
|
|
|
public AjaxResult viewFlowChart(@RequestBody PmDemandReqVo pmRequestVo) {
|
|
|
if(pmRequestVo.getDemandId() == null){
|
|
|
return AjaxResult.error("demandId不能为空");
|
|
@@ -120,6 +134,8 @@ public class PmDemandController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation(value = "查看流程图,鼠标移到对应模块后,显示悬浮框提示", notes = "必传demandId和模块名称,其他字段不传")
|
|
|
@PostMapping("/getModuleInfo")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:demand:getModuleInfo')")
|
|
|
+ @Log(title = ModularConstans.demand, businessType = BusinessType.QUERY)
|
|
|
public AjaxResult getModuleInfo(@RequestBody PmDemandReqVo pmRequestVo) {
|
|
|
if(pmRequestVo.getDemandId() == null){
|
|
|
return AjaxResult.error("demandId不能为空");
|
|
@@ -136,6 +152,8 @@ public class PmDemandController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation(value = "审核单位查询采购需求列表", notes = "参数非必传")
|
|
|
@PostMapping("/examineList")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:examine:list')")
|
|
|
+ @Log(title = ModularConstans.demandExamine, businessType = BusinessType.QUERY)
|
|
|
public AjaxResult examineList(@RequestBody PmDemandReqVo pmDemandReqVo) {
|
|
|
IPage<PmDemandResVo> page = pmDemandService.selectPmDemandList(pmDemandReqVo,1);
|
|
|
return success(page);
|
|
@@ -143,6 +161,8 @@ public class PmDemandController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "审核采购需求通过", notes = "必传demandId和上传附件,其他字段不传")
|
|
|
@PostMapping("/reviewTo")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:examine:reviewTo')")
|
|
|
+ @Log(title = ModularConstans.demandExamine, businessType = BusinessType.UPDATE)
|
|
|
public AjaxResult reviewTo(@RequestBody PmDemandReqVo pmDemandReqVo, HttpServletRequest request) {
|
|
|
if(pmDemandReqVo.getDemandId() == null){
|
|
|
return AjaxResult.error("demandId不能为空");
|
|
@@ -157,6 +177,8 @@ public class PmDemandController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "审核采购需求退回", notes = "必传demandId和退回原因,其他字段不传")
|
|
|
@PostMapping("/reviewReturn")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:examine:reviewReturn')")
|
|
|
+ @Log(title = ModularConstans.demandExamine, businessType = BusinessType.UPDATE)
|
|
|
public AjaxResult reviewReturn(@RequestBody PmDemandReqVo pmDemandReqVo, HttpServletRequest request) {
|
|
|
if(pmDemandReqVo.getDemandId() == null){
|
|
|
return AjaxResult.error("demandId不能为空");
|