浏览代码

项目管理-任务下达。。

suntianwu 2 年之前
父节点
当前提交
ed946da71f

+ 43 - 0
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmContractInfoController.java

@@ -0,0 +1,43 @@
+package com.ozs.web.controller.pm;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ozs.common.core.controller.BaseController;
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.framework.web.service.TokenService;
+import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
+import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
+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.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;
+
+/**
+ * 合同信息Controller
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Api(tags = "合同信息")
+@RestController
+@RequestMapping("/pm/contractInfo")
+public class PmContractInfoController extends BaseController {
+    @Autowired
+    private IPmDemandService pmDemandService;
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 合同信息查询列表
+     */
+    @ApiOperation(value = "合同信息查询列表", notes = "参数非必传")
+    @PostMapping("/list")
+    public AjaxResult list(@RequestBody PmDemandReqVo pmDemandReqVo) {
+        IPage<PmDemandResVo> page  = pmDemandService.selectPmDemandList(pmDemandReqVo,4);
+        return success(page);
+    }
+}

+ 3 - 6
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmDemandController.java

@@ -1,9 +1,7 @@
 package com.ozs.web.controller.pm;
 
-import java.util.List;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.pagehelper.PageInfo;
 import com.ozs.common.core.domain.model.LoginUser;
 import com.ozs.framework.web.service.TokenService;
 import com.ozs.pm.doman.vo.requestVo.PmBookBuildingReqVo;
@@ -43,7 +41,7 @@ public class PmDemandController extends BaseController {
     @ApiOperation(value = "查询采购需求列表", notes = "参数非必传")
     @PostMapping("/list")
     public AjaxResult list(@RequestBody PmDemandReqVo pmDemandReqVo) {
-        IPage<PmDemandResVo> page  = pmDemandService.selectPmDemandList(pmDemandReqVo);
+        IPage<PmDemandResVo> page  = pmDemandService.selectPmDemandList(pmDemandReqVo,0);
         return success(page);
 
     }
@@ -95,14 +93,13 @@ public class PmDemandController extends BaseController {
     }
 
     /**
-     * 查询采购需求列表
+     * 审核单位查询采购需求列表
      */
     @ApiOperation(value = "审核单位查询采购需求列表", notes = "参数非必传")
     @PostMapping("/examineList")
     public AjaxResult examineList(@RequestBody PmDemandReqVo pmDemandReqVo) {
-        IPage<PmDemandResVo> page  = pmDemandService.selectPmDemanDexamineList(pmDemandReqVo);
+        IPage<PmDemandResVo> page  = pmDemandService.selectPmDemandList(pmDemandReqVo,1);
         return success(page);
-
     }
 
     @ApiOperation(value = "审核采购需求通过", notes = "必传demandId和上传附件,其他字段不传")

+ 43 - 0
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmProjectConstructionController.java

@@ -0,0 +1,43 @@
+package com.ozs.web.controller.pm;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ozs.common.core.controller.BaseController;
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.framework.web.service.TokenService;
+import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
+import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
+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.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;
+
+/**
+ * 项目建设Controller
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Api(tags = "项目建设")
+@RestController
+@RequestMapping("/pm/projectConstruction")
+public class PmProjectConstructionController extends BaseController {
+    @Autowired
+    private IPmDemandService pmDemandService;
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 项目建设查询列表
+     */
+    @ApiOperation(value = "项目建设查询列表", notes = "参数非必传")
+    @PostMapping("/list")
+    public AjaxResult list(@RequestBody PmDemandReqVo pmDemandReqVo) {
+        IPage<PmDemandResVo> page  = pmDemandService.selectPmDemandList(pmDemandReqVo,5);
+        return success(page);
+    }
+}

+ 43 - 0
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmPurchaseExecutionController.java

@@ -0,0 +1,43 @@
+package com.ozs.web.controller.pm;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ozs.common.core.controller.BaseController;
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.framework.web.service.TokenService;
+import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
+import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
+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.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;
+
+/**
+ * 采购执行Controller
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Api(tags = "采购执行")
+@RestController
+@RequestMapping("/pm/purchaseExecution")
+public class PmPurchaseExecutionController extends BaseController {
+    @Autowired
+    private IPmDemandService pmDemandService;
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 采购执行查询列表
+     */
+    @ApiOperation(value = "采购执行查询列表", notes = "参数非必传")
+    @PostMapping("/list")
+    public AjaxResult list(@RequestBody PmDemandReqVo pmDemandReqVo) {
+        IPage<PmDemandResVo> page  = pmDemandService.selectPmDemandList(pmDemandReqVo,3);
+        return success(page);
+    }
+}

+ 47 - 0
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmTaskReleaseController.java

@@ -0,0 +1,47 @@
+package com.ozs.web.controller.pm;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ozs.common.core.controller.BaseController;
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.common.core.domain.model.LoginUser;
+import com.ozs.framework.web.service.TokenService;
+import com.ozs.pm.doman.vo.requestVo.PmBookBuildingReqVo;
+import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
+import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
+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.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 javax.servlet.http.HttpServletRequest;
+
+/**
+ * 任务下达Controller
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Api(tags = "任务下达")
+@RestController
+@RequestMapping("/pm/taskRelease")
+public class PmTaskReleaseController extends BaseController {
+    @Autowired
+    private IPmDemandService pmDemandService;
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 任务下达查询列表
+     */
+    @ApiOperation(value = "任务下达查询列表", notes = "参数非必传")
+    @PostMapping("/list")
+    public AjaxResult list(@RequestBody PmDemandReqVo pmDemandReqVo) {
+        IPage<PmDemandResVo> page  = pmDemandService.selectPmDemandList(pmDemandReqVo,2);
+        return success(page);
+    }
+}

+ 1 - 8
purchase-system/src/main/java/com/ozs/pm/service/IPmDemandService.java

@@ -33,15 +33,8 @@ public interface IPmDemandService extends IService<PmDemand>
      * @param pmDemandReqVo 采购需求
      * @return 采购需求集合
      */
-    public IPage<PmDemandResVo> selectPmDemandList(PmDemandReqVo pmDemandReqVo);
+    public IPage<PmDemandResVo> selectPmDemandList(PmDemandReqVo pmDemandReqVo,int reqType);
 
-    /**
-     * 审核单位查询采购需求列表
-     *
-     * @param pmDemandReqVo 采购需求
-     * @return 采购需求集合
-     */
-    public IPage<PmDemandResVo> selectPmDemanDexamineList(PmDemandReqVo pmDemandReqVo);
 
     /**
      * 新增采购需求

+ 12 - 104
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServiceImpl.java

@@ -255,7 +255,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
      * @return 采购需求
      */
     @Override
-    public IPage<PmDemandResVo> selectPmDemandList(PmDemandReqVo pmDemandReqVo) {
+    public IPage<PmDemandResVo> selectPmDemandList(PmDemandReqVo pmDemandReqVo, int reqType) {
 
         LambdaQueryWrapper<PmDemand> lw = new LambdaQueryWrapper<>();
         if (!StringUtils.isBlank(pmDemandReqVo.getProjectName())) {
@@ -277,110 +277,17 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
             lw.apply("(plan_demand_sub_time <= '" + pmDemandReqVo.getEndDate() +"' or plan_purchase_finish_time <= '" + pmDemandReqVo.getEndDate() + "' or plan_deliver_time <=  '" + pmDemandReqVo.getEndDate() +"' )");
         }
 
-        IPage<PmDemand> pageRes = this.page(new Page<>(pmDemandReqVo.getPageNum(), pmDemandReqVo.getPageSize()), lw);
-        IPage<PmDemandResVo> results = new Page<>(pageRes.getCurrent(), pageRes.getSize(), pageRes.getTotal());
-        if(pageRes.getRecords() != null && pageRes.getRecords().size() > 0){
-            List<PmDemandResVo> pmDemandResponseVoList = new ArrayList<>();
-            for(PmDemand pmDemand1 : pageRes.getRecords()){
-                PmDemandResVo vo = new PmDemandResVo();
-                BeanUtils.copyProperties(pmDemand1,vo);
-                if(vo.getPurchaseDeptId() != null){
-                    Map<String, Object> deptMap =  deptService.selectDeptById(vo.getPurchaseDeptId());
-                    if(deptMap!= null){
-                        SysDeptResponseVo sysDeptResponseVo = (SysDeptResponseVo)deptMap.get("sysDept");
-                        if(sysDeptResponseVo != null){
-                            vo.setPurchaseDeptName(sysDeptResponseVo.getDeptName());
-                        }
-                    }
-                }
-
-                String purchaseServicesName = dictDataService.selectDictLabel("purchase_services",vo.getPurchaseServices());
-                if(StringUtils.isNotEmpty(purchaseServicesName)){
-                    vo.setPurchaseServicesName(purchaseServicesName);
-                }
-
-                //项目类型
-                for (ProjectTypes value : ProjectTypes.values()) {
-                    if (vo.getProjectType() != null && vo.getProjectType().equals(value.getCode())) {
-                        vo.setProjectTypeName(value.getInfo());
-                        break;
-                    }
-                }
-                //是否为超限额计划
-                for (IsExcess value : IsExcess.values()) {
-                    if (vo.getIsExcess() != null && vo.getIsExcess().equals(value.getCode())) {
-                        vo.setIsExcessName(value.getInfo());
-                        break;
-                    }
-                }
-
-                //采购方式
-                for (PlanPurchaseMode value : PlanPurchaseMode.values()) {
-                    if (vo.getPurchaseMode() != null && vo.getPurchaseMode().equals(value.getCode())) {
-                        vo.setPurchaseModeName(value.getInfo());
-                        break;
-                    }
-                }
-                //项目属性
-                for (ProjectAttribute value : ProjectAttribute.values()) {
-                    if (vo.getProjectAttr() != null && vo.getProjectAttr().equals(value.getCode())) {
-                        vo.setProjectAttrName(value.getInfo());
-                        break;
-                    }
-                }
-                //预警状态
-                for (WarnStatus value : WarnStatus.values()) {
-                    if (vo.getWarnStatus() != null && vo.getWarnStatus().equals(value.getCode())) {
-                        vo.setWarnStatusName(value.getInfo());
-                        break;
-                    }
-                }
-
-                //项目状态
-                for (PmProjectStatus value : PmProjectStatus.values()) {
-                    if (vo.getProjectStatus() != null && vo.getProjectStatus().equals(value.getCode())) {
-                        vo.setProjectStatusName(value.getInfo());
-                        break;
-                    }
-                }
-                pmDemandResponseVoList.add(vo);
-            }
-            results.setRecords(pmDemandResponseVoList);
-        }
-
-        return results;
-    }
-
-    /**
-     * 审核单位查询采购需求列表
-     *
-     * @param pmDemandReqVo
-     * @return 采购需求
-     */
-    @Override
-    public IPage<PmDemandResVo> selectPmDemanDexamineList(PmDemandReqVo pmDemandReqVo) {
-
-        LambdaQueryWrapper<PmDemand> lw = new LambdaQueryWrapper<>();
-        if (!StringUtils.isBlank(pmDemandReqVo.getProjectName())) {
-            lw.like(PmDemand::getProjectName, "%" + pmDemandReqVo.getProjectName() + "%");
-        }
-        if (!StringUtils.isBlank(pmDemandReqVo.getPurchaseServices())) {
-            lw.eq(PmDemand::getPurchaseServices, pmDemandReqVo.getPurchaseServices());
+        if(reqType== 1) { //需求审核单位列表
+            lw.eq(PmDemand::getProjectStatus, PmProjectStatus.DEMAND_WAIT_AUDIT.getCode());
+        } else  if(reqType== 2) { //任务下达列表
+            lw.apply("(project_status = 8 or project_status = 9 )");
+        } else  if(reqType== 3) { //采购执行列表
+            lw.apply("(project_status = 9 or project_status = 10 )");
+        } else  if(reqType== 4) { //合同信息列表
+            lw.apply("(project_status = 10 or project_status = 11 )");
+        }  else  if(reqType== 5) { //项目建设列表
+            lw.apply("(project_status = 11 or project_status = 12 )");
         }
-        if (pmDemandReqVo.getProjectStatus() != null) {
-            lw.eq(PmDemand::getProjectStatus, pmDemandReqVo.getProjectStatus());
-        }
-        if (pmDemandReqVo.getIsExcess() != null) {
-            lw.eq(PmDemand::getIsExcess, pmDemandReqVo.getIsExcess());
-        }
-        if (!StringUtils.isBlank(pmDemandReqVo.getBeginDate())) {
-            lw.apply("(plan_demand_sub_time >= '" + pmDemandReqVo.getBeginDate() +"' or plan_purchase_finish_time >= '" + pmDemandReqVo.getBeginDate() + "' or plan_deliver_time >=  '" + pmDemandReqVo.getBeginDate() +"' )");
-        }
-        if (!StringUtils.isBlank(pmDemandReqVo.getEndDate())) {
-            lw.apply("(plan_demand_sub_time <= '" + pmDemandReqVo.getEndDate() +"' or plan_purchase_finish_time <= '" + pmDemandReqVo.getEndDate() + "' or plan_deliver_time <=  '" + pmDemandReqVo.getEndDate() +"' )");
-        }
-
-        lw.eq(PmDemand::getProjectStatus, PmProjectStatus.DEMAND_WAIT_AUDIT.getCode());
 
         IPage<PmDemand> pageRes = this.page(new Page<>(pmDemandReqVo.getPageNum(), pmDemandReqVo.getPageSize()), lw);
         IPage<PmDemandResVo> results = new Page<>(pageRes.getCurrent(), pageRes.getSize(), pageRes.getTotal());
@@ -456,6 +363,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
         return results;
     }
 
+
     /**
      * 新增采购需求
      *