Browse Source

Merge branch 'master' of http://124.70.58.209:3000/ytrd-project-management/purchase

gao.qiang 2 years ago
parent
commit
7dd0c062e2
69 changed files with 3642 additions and 215 deletions
  1. 32 31
      purchase-admin/src/main/java/com/ozs/web/controller/base/BaseExpertController.java
  2. 9 7
      purchase-admin/src/main/java/com/ozs/web/controller/base/BaseProfessionalController.java
  3. 48 12
      purchase-admin/src/main/java/com/ozs/web/controller/base/BaseSupplierController.java
  4. 99 0
      purchase-admin/src/main/java/com/ozs/web/controller/plan/MonthlyReconciliationController.java
  5. 8 5
      purchase-admin/src/main/java/com/ozs/web/controller/plan/PlanYearsController.java
  6. 82 0
      purchase-admin/src/main/java/com/ozs/web/controller/pm/PmDemandController.java
  7. 3 3
      purchase-admin/src/main/resources/application-dev.yml
  8. 1 1
      purchase-admin/src/main/resources/application.yml
  9. 2 2
      purchase-admin/src/main/resources/logback.xml
  10. 4 2
      purchase-common/src/main/java/com/ozs/common/constant/ModularConstans.java
  11. 23 0
      purchase-common/src/main/java/com/ozs/common/enums/SysFileRefEnum.java
  12. 3 3
      purchase-system/src/main/java/com/ozs/base/domain/BaseExpert.java
  13. 1 3
      purchase-system/src/main/java/com/ozs/base/domain/BaseProfessional.java
  14. 5 2
      purchase-system/src/main/java/com/ozs/base/domain/BaseSupplier.java
  15. 9 11
      purchase-system/src/main/java/com/ozs/base/domain/vo/BaseExpertVo.java
  16. 22 0
      purchase-system/src/main/java/com/ozs/base/domain/vo/BaseSupplierVo.java
  17. 1 0
      purchase-system/src/main/java/com/ozs/base/mapper/BaseExpertMapper.java
  18. 3 1
      purchase-system/src/main/java/com/ozs/base/mapper/BaseSupplierMapper.java
  19. 5 1
      purchase-system/src/main/java/com/ozs/base/service/BaseExpertService.java
  20. 3 1
      purchase-system/src/main/java/com/ozs/base/service/BaseSupplierService.java
  21. 22 0
      purchase-system/src/main/java/com/ozs/base/service/impl/BaseExpertServiceImpl.java
  22. 4 1
      purchase-system/src/main/java/com/ozs/base/service/impl/BaseSupplierServiceImpl.java
  23. 133 0
      purchase-system/src/main/java/com/ozs/plan/doman/MonthlyReconciliation.java
  24. 25 16
      purchase-system/src/main/java/com/ozs/plan/doman/PlanYears.java
  25. 37 0
      purchase-system/src/main/java/com/ozs/plan/doman/vo/requestVo/MonthlyReconciliationPageReqVo.java
  26. 19 9
      purchase-system/src/main/java/com/ozs/plan/doman/vo/requestVo/PlanYearsStandardVo.java
  27. 13 9
      purchase-system/src/main/java/com/ozs/plan/doman/vo/responseVo/PlanYearsResponseVo.java
  28. 13 0
      purchase-system/src/main/java/com/ozs/plan/mapper/MonthlyReconciliationMapper.java
  29. 10 0
      purchase-system/src/main/java/com/ozs/plan/service/MonthlyReconciliationService.java
  30. 2 1
      purchase-system/src/main/java/com/ozs/plan/service/PlanYearsService.java
  31. 15 0
      purchase-system/src/main/java/com/ozs/plan/service/impl/MonthlyReconciliationServiceImpl.java
  32. 49 61
      purchase-system/src/main/java/com/ozs/plan/service/impl/PlanYearsServiceImpl.java
  33. 131 0
      purchase-system/src/main/java/com/ozs/pm/doman/PmDemand.java
  34. 127 0
      purchase-system/src/main/java/com/ozs/pm/doman/PmDemandEngineering.java
  35. 86 0
      purchase-system/src/main/java/com/ozs/pm/doman/PmDemandEquip.java
  36. 112 0
      purchase-system/src/main/java/com/ozs/pm/doman/PmDemandMaterials.java
  37. 82 0
      purchase-system/src/main/java/com/ozs/pm/doman/PmDemandServe.java
  38. 50 0
      purchase-system/src/main/java/com/ozs/pm/doman/vo/requestVo/PmRequestVo.java
  39. 128 0
      purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandEngineeringResponseVo.java
  40. 87 0
      purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandEquipResponseVo.java
  41. 113 0
      purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandMaterialsResponseVo.java
  42. 142 0
      purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandResponseVo.java
  43. 83 0
      purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandServeResponseVo.java
  44. 49 0
      purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandEngineeringMapper.java
  45. 49 0
      purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandEquipMapper.java
  46. 49 0
      purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandMapper.java
  47. 49 0
      purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandMaterialsMapper.java
  48. 48 0
      purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandServeMapper.java
  49. 48 0
      purchase-system/src/main/java/com/ozs/pm/service/IPmDemandEngineeringService.java
  50. 47 0
      purchase-system/src/main/java/com/ozs/pm/service/IPmDemandEquipService.java
  51. 48 0
      purchase-system/src/main/java/com/ozs/pm/service/IPmDemandMaterialsService.java
  52. 49 0
      purchase-system/src/main/java/com/ozs/pm/service/IPmDemandServeService.java
  53. 51 0
      purchase-system/src/main/java/com/ozs/pm/service/IPmDemandService.java
  54. 74 0
      purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandEngineeringServiceImpl.java
  55. 75 0
      purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandEquipServiceImpl.java
  56. 74 0
      purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandMaterialsServiceImpl.java
  57. 75 0
      purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServeServiceImpl.java
  58. 103 0
      purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServiceImpl.java
  59. 43 0
      purchase-system/src/main/java/com/ozs/system/domain/SysFileRef.java
  60. 14 0
      purchase-system/src/main/java/com/ozs/system/mapper/SysFileRefMapper.java
  61. 7 0
      purchase-system/src/main/java/com/ozs/system/service/SysFileRefService.java
  62. 12 0
      purchase-system/src/main/java/com/ozs/system/service/impl/SysFileRefServiceImpl.java
  63. 86 0
      purchase-system/src/main/resources/mapper/base/BaseExpertMapper.xml
  64. 36 33
      purchase-system/src/main/resources/mapper/plan/PlanYearsMapper.xml
  65. 172 0
      purchase-system/src/main/resources/mapper/pm/PmDemandEngineeringMapper.xml
  66. 117 0
      purchase-system/src/main/resources/mapper/pm/PmDemandEquipMapper.xml
  67. 186 0
      purchase-system/src/main/resources/mapper/pm/PmDemandMapper.xml
  68. 118 0
      purchase-system/src/main/resources/mapper/pm/PmDemandMaterialsMapper.xml
  69. 117 0
      purchase-system/src/main/resources/mapper/pm/PmDemandServeMapper.xml

+ 32 - 31
purchase-admin/src/main/java/com/ozs/web/controller/base/BaseExpertController.java

@@ -3,21 +3,20 @@ package com.ozs.web.controller.base;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.ozs.base.domain.BaseAgency;
 import com.ozs.base.domain.BaseExpert;
-import com.ozs.base.domain.BaseProfessional;
-import com.ozs.base.domain.BaseSupplier;
 import com.ozs.base.domain.vo.BaseExpertVo;
-import com.ozs.base.domain.vo.BaseProfessionalVo;
 import com.ozs.base.service.BaseExpertService;
-import com.ozs.base.service.BaseProfessionalService;
-import com.ozs.base.vo.BaseAgentPageReqVo;
+import com.ozs.common.annotation.Log;
+import com.ozs.common.constant.ModularConstans;
 import com.ozs.common.core.controller.BaseController;
 import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.common.enums.BusinessType;
 import com.ozs.common.utils.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.joda.time.DateTime;
 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;
@@ -25,10 +24,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.constraints.NotEmpty;
-import java.util.List;
 
 /**
- * 专库管理
+ * 专库管理
  *
  * @author sunhh
  */
@@ -42,16 +40,18 @@ public class BaseExpertController extends BaseController {
 
     @ApiOperation(value = "新增专家库", notes = "必传 专家库名称")
     @PostMapping("/insertExpert")
-    public AjaxResult insertExpert(BaseExpert baseExpert) {
+    @PreAuthorize("@ss.hasPermi('base:expert:insertExpert')")
+    @Log(title = ModularConstans.policy, businessType = BusinessType.INSERT)
+    public AjaxResult insertExpert(@RequestBody BaseExpert baseExpert) {
         if (StringUtils.isNull(baseExpert) || StringUtils.isNull(baseExpert.getExpertName())) {
             return error("专家库名称不能为空");
         }
-        return toAjax(baseExpertService.save(baseExpert));
+        return toAjax(baseExpertService.insertExpert(baseExpert));
     }
 
     @ApiOperation(value = "删除专家库", notes = "必传 id")
     @PostMapping("/deleteExpert")
-    public AjaxResult deleteExpert(BaseExpert baseExpert) {
+    public AjaxResult deleteExpert(@RequestBody BaseExpert baseExpert) {
         if (StringUtils.isNull(baseExpert) || StringUtils.isNull(baseExpert.getId())) {
             return error("专家库id不能为空");
         }
@@ -60,43 +60,44 @@ public class BaseExpertController extends BaseController {
 
     @ApiOperation(value = "修改专家库", notes = "必传 id 及修改数据")
     @PostMapping("/updateExpert")
-    public AjaxResult updateProfessional(BaseExpert baseExpert) {
+    public AjaxResult updateProfessional(@RequestBody BaseExpert baseExpert) {
         if (StringUtils.isNull(baseExpert) || StringUtils.isNull(baseExpert.getId())) {
             return error("专家库id和修改数据不能为空");
         }
         return toAjax(baseExpertService.updateById(baseExpert));
     }
 
-    @ApiOperation(value = "查询专家库树结构", notes = "非必传 查询条件:品目名称")
+    @ApiOperation(value = "查询专家库", notes = "非必传 查询条件:品目名称")
     @PostMapping("/selectExpert")
-    public AjaxResult selectExpert(@NotEmpty(message = "数据为空") @RequestBody BaseExpertVo baseExpertVo) {
+    public AjaxResult selectExpert(@RequestBody BaseExpertVo baseExpertVo) {
         LambdaQueryWrapper<BaseExpert> lw = new LambdaQueryWrapper<BaseExpert>();
-        if (!StringUtils.isBlank(baseExpertVo.getExpertName())) {
-            lw.like(BaseExpert::getExpertName, baseExpertVo.getExpertName());
+        if (!StringUtils.isBlank(baseExpertVo.getExpertNameVo())) {
+            lw.like(BaseExpert::getExpertName, baseExpertVo.getExpertNameVo());
         }
-        if (!StringUtils.isBlank(baseExpertVo.getMajorType())) {
-            lw.eq(BaseExpert::getMajorType, baseExpertVo.getMajorType());
+        if (!StringUtils.isBlank(baseExpertVo.getMajorTypeVo())) {
+            lw.eq(BaseExpert::getMajorType, baseExpertVo.getMajorTypeVo());
         }
-        if (!ObjectUtils.isEmpty(baseExpertVo.getMajorGrade())) {
-            lw.eq(BaseExpert::getMajorGrade, baseExpertVo.getMajorGrade());
+        if (!ObjectUtils.isEmpty(baseExpertVo.getMajorGradeVo())) {
+            lw.eq(BaseExpert::getMajorGrade, baseExpertVo.getMajorGradeVo());
         }
         IPage<BaseExpert> page = baseExpertService.page(new Page<BaseExpert>(baseExpertVo.getPageNum(), baseExpertVo.getPageSize()), lw);
         return success(page);
     }
 
-    @ApiOperation(value = "黑白名单开关", notes = "必传id,supplierType 其他字段不传; 黑名单传0,白名单传1")
+    @ApiOperation(value = "黑白名单开关", notes = "必传id,status 其他字段不传; 黑名单传0,白名单传1")
     @PostMapping("/updateSupplierType")
-    public AjaxResult updateSupplierType(BaseExpert baseExpert) {
-        if (StringUtils.isNull(baseExpert) || StringUtils.isNull(baseExpert.getId()) || StringUtils.isNotNull(baseExpert.getStatus())) {
+    public AjaxResult updateSupplierType(@RequestBody BaseExpert baseExpert) {
+        if (StringUtils.isNull(baseExpert) || StringUtils.isNull(baseExpert.getId())
+                || StringUtils.isNull(baseExpert.getStatus())) {
             return error("状态及ID不能为空");
         }
-        LambdaQueryWrapper<BaseExpert> lw = new LambdaQueryWrapper<BaseExpert>();
-        if (!StringUtils.isNull(baseExpert.getId())) {
-            lw.eq(BaseExpert::getId, baseExpert.getId());
-        }
-        if (!StringUtils.isBlank(baseExpert.getStatus())) {
-            lw.like(BaseExpert::getStatus, baseExpert.getStatus());
-        }
-        return toAjax(baseExpertService.update(lw));
+//        LambdaQueryWrapper<BaseExpert> lw = new LambdaQueryWrapper<BaseExpert>();
+//        if (!StringUtils.isNull(baseExpert.getId())) {
+//            lw.eq(BaseExpert::getId, baseExpert.getId());
+//        }
+//        if (!StringUtils.isBlank(baseExpert.getStatus())) {
+//            lw.eq(BaseExpert::getStatus, baseExpert.getStatus());
+//        }
+        return toAjax(baseExpertService.updateSupplierType(baseExpert));
     }
 }

+ 9 - 7
purchase-admin/src/main/java/com/ozs/web/controller/base/BaseProfessionalController.java

@@ -32,9 +32,11 @@ public class BaseProfessionalController extends BaseController {
 
     @ApiOperation(value = "新增专业库", notes = "必传 专业库名称、一级分类、编码、父级编码;没有父级编码传0")
     @PostMapping("/insertProfessional")
-    public AjaxResult insertProfessional(BaseProfessional baseProfessional) {
-        if (StringUtils.isNull(baseProfessional) || StringUtils.isNull(baseProfessional.getProfessionalName())
-                || StringUtils.isNull(baseProfessional.getProfessionalCode()) || StringUtils.isNull(baseProfessional.getProfessionalGrade())) {
+    public AjaxResult insertProfessional(@RequestBody BaseProfessional baseProfessional) {
+        if (StringUtils.isNull(baseProfessional)
+                || StringUtils.isNull(baseProfessional.getProfessionalName())
+                || StringUtils.isNull(baseProfessional.getProfessionalCode())
+                || StringUtils.isNull(baseProfessional.getProfessionalGrade())) {
             return error("专业库名称、编码、一级分类不能为空");
         }
         return toAjax(baseProfessionalService.save(baseProfessional));
@@ -42,7 +44,7 @@ public class BaseProfessionalController extends BaseController {
 
     @ApiOperation(value = "删除专业库", notes = "必传 id")
     @PostMapping("/deleteProfessional")
-    public AjaxResult deleteProfessional(BaseProfessional baseProfessional) {
+    public AjaxResult deleteProfessional(@RequestBody BaseProfessional baseProfessional) {
         if (StringUtils.isNull(baseProfessional) || StringUtils.isNull(baseProfessional.getId())) {
             return error("专业库id不能为空");
         }
@@ -58,7 +60,7 @@ public class BaseProfessionalController extends BaseController {
 
     @ApiOperation(value = "修改专业库", notes = "必传 id 及修改数据")
     @PostMapping("/updateProfessional")
-    public AjaxResult updateProfessional(BaseProfessional baseProfessional) {
+    public AjaxResult updateProfessional(@RequestBody BaseProfessional baseProfessional) {
         if (StringUtils.isNull(baseProfessional) || StringUtils.isNull(baseProfessional.getId())) {
             return error("专业库id和修改数据不能为空");
         }
@@ -67,14 +69,14 @@ public class BaseProfessionalController extends BaseController {
 
     @ApiOperation(value = "查询专业库树结构", notes = "非必传 查询条件:品目名称")
     @PostMapping("/selectBaseProfessional")
-    public AjaxResult selectBaseProfessional(BaseProfessionalVo baseProfessionalVo) {
+    public AjaxResult selectBaseProfessional(@RequestBody BaseProfessionalVo baseProfessionalVo) {
         List<BaseProfessionalVo> baseSupplierList = baseProfessionalService.selectBaseProfessional(baseProfessionalVo);
         return success(baseSupplierList);
     }
 
     @ApiOperation(value = "导入专业库", notes = "导入表格")
     @PostMapping("/importBaseProfessional")
-    public AjaxResult importBaseProfessional(MultipartFile file) throws Exception {
+    public AjaxResult importBaseProfessional(@RequestBody MultipartFile file) throws Exception {
         ExcelUtil<BaseProfessional> util = new ExcelUtil<BaseProfessional>(BaseProfessional.class);
         List<BaseProfessional> baseProfessionalList = util.importExcel(file.getInputStream());
         if (StringUtils.isNull(baseProfessionalList) || baseProfessionalList.size() == 0) {

+ 48 - 12
purchase-admin/src/main/java/com/ozs/web/controller/base/BaseSupplierController.java

@@ -1,15 +1,26 @@
 package com.ozs.web.controller.base;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ozs.base.domain.BaseExpert;
+import com.ozs.base.domain.vo.BaseSupplierVo;
+import com.ozs.common.annotation.Log;
+import com.ozs.common.constant.ModularConstans;
 import com.ozs.common.core.controller.BaseController;
 import com.ozs.common.core.domain.AjaxResult;
 import com.ozs.common.core.page.TableDataInfo;
+import com.ozs.common.enums.BusinessType;
 import com.ozs.common.utils.StringUtils;
 import com.ozs.base.domain.BaseSupplier;
 import com.ozs.base.service.BaseSupplierService;
 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;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -20,7 +31,7 @@ import java.util.List;
  *
  * @author sunhh
  */
-@Api(tags="供应商管理")
+@Api(tags = "供应商管理")
 @RestController
 @RequestMapping("/base/supplier")
 public class BaseSupplierController extends BaseController {
@@ -30,7 +41,9 @@ public class BaseSupplierController extends BaseController {
 
     @ApiOperation(value = "新增供应商户", notes = "")
     @PostMapping("/insertBaseSupplier")
-    public AjaxResult insertBaseSupplier(BaseSupplier baseSupplier) {
+    @PreAuthorize("@ss.hasPermi('base:supplier:insertBaseSupplier')")
+    @Log(title = ModularConstans.policy, businessType = BusinessType.INSERT)
+    public AjaxResult insertBaseSupplier(@RequestBody BaseSupplier baseSupplier) {
         if (StringUtils.isNull(baseSupplier) || StringUtils.isNull(baseSupplier.getSupplierName())) {
             return error("供应商名称不能为空");
         }
@@ -39,7 +52,9 @@ public class BaseSupplierController extends BaseController {
 
     @ApiOperation(value = "删除供应商户", notes = "必传ID")
     @PostMapping("/deleteBaseSupplier")
-    public AjaxResult deleteBaseSupplier(BaseSupplier baseSupplier) {
+    @PreAuthorize("@ss.hasPermi('base:supplier:deleteBaseSupplier')")
+    @Log(title = ModularConstans.policy, businessType = BusinessType.DELETE)
+    public AjaxResult deleteBaseSupplier(@RequestBody BaseSupplier baseSupplier) {
         if (StringUtils.isNull(baseSupplier) || StringUtils.isNull(baseSupplier.getId())) {
             return error("删除ID不能为空");
         }
@@ -48,7 +63,9 @@ public class BaseSupplierController extends BaseController {
 
     @ApiOperation(value = "修改供应商户", notes = "必传ID及修改字段")
     @PostMapping("/updateBaseSupplier")
-    public AjaxResult updateBaseSupplier(BaseSupplier baseSupplier) {
+    @PreAuthorize("@ss.hasPermi('base:supplier:updateBaseSupplier')")
+    @Log(title = ModularConstans.policy, businessType = BusinessType.UPDATE)
+    public AjaxResult updateBaseSupplier(@RequestBody BaseSupplier baseSupplier) {
         if (StringUtils.isNull(baseSupplier) || StringUtils.isNull(baseSupplier.getId())) {
             return error("修改数据及ID不能为空");
         }
@@ -57,17 +74,19 @@ public class BaseSupplierController extends BaseController {
 
     @ApiOperation(value = "预先采购开关", notes = "必传id,supplierAdvancePurchase 其他字段不传; 关闭传0,开启传1")
     @PostMapping("/updateBaseSupplierAdvancePurchase")
-    public AjaxResult updateBaseSupplierAdvancePurchase(BaseSupplier baseSupplier) {
-        if (StringUtils.isNull(baseSupplier) || StringUtils.isNull(baseSupplier.getId()) || StringUtils.isNotNull(baseSupplier.getSupplierAdvancePurchase())) {
+    public AjaxResult updateBaseSupplierAdvancePurchase(@RequestBody BaseSupplier baseSupplier) {
+        if (StringUtils.isNull(baseSupplier) || StringUtils.isNull(baseSupplier.getId())
+                || StringUtils.isNull(baseSupplier.getSupplierAdvancePurchase())) {
             return error("预先采购及ID不能为空");
         }
         return toAjax(baseSupplierService.updateBaseSupplier(baseSupplier));
     }
 
-    @ApiOperation(value = "黑白名单开关", notes = "必传id,supplierType 其他字段不传; 黑名单传0,白名单传1")
+    @ApiOperation(value = "黑白名单开关", notes = "必传id,supplierState 其他字段不传; 黑名单传0,白名单传1")
     @PostMapping("/updateSupplierType")
-    public AjaxResult updateSupplierType(BaseSupplier baseSupplier) {
-        if (StringUtils.isNull(baseSupplier) || StringUtils.isNull(baseSupplier.getId()) || StringUtils.isNotNull(baseSupplier.getSupplierType())) {
+    public AjaxResult updateSupplierType(@RequestBody BaseSupplier baseSupplier) {
+        if (StringUtils.isNull(baseSupplier) || StringUtils.isNull(baseSupplier.getId())
+                || StringUtils.isNull(baseSupplier.getSupplierState())) {
             return error("状态及ID不能为空");
         }
         return toAjax(baseSupplierService.updateBaseSupplier(baseSupplier));
@@ -75,8 +94,25 @@ public class BaseSupplierController extends BaseController {
 
     @ApiOperation(value = "查询供应商户", notes = "非必传 查询条件:供应商名称,供应商类型,供应商状态,预先采购状态")
     @PostMapping("/selectBaseSupplier")
-    public TableDataInfo selectBaseSupplier(BaseSupplier baseSupplier) {
-        List<BaseSupplier> baseSupplierList = baseSupplierService.selectBaseSupplier(baseSupplier);
-        return getDataTable(baseSupplierList);
+    @PreAuthorize("@ss.hasPermi('base:supplier:selectBaseSupplier')")
+    @Log(title = ModularConstans.policy, businessType = BusinessType.QUERY)
+    public AjaxResult selectBaseSupplier(@RequestBody BaseSupplierVo baseSupplierVo) {
+//        List<BaseSupplier> baseSupplierList = baseSupplierService.selectBaseSupplier(baseSupplier);
+//        return getDataTable(baseSupplierList);
+        LambdaQueryWrapper<BaseSupplier> lw = new LambdaQueryWrapper<BaseSupplier>();
+        if (!StringUtils.isBlank(baseSupplierVo.getSupplierName())) {
+            lw.like(BaseSupplier::getSupplierName, "%" + baseSupplierVo.getSupplierName() + "%");
+        }
+        if (!StringUtils.isBlank(baseSupplierVo.getSupplierState())) {
+            lw.eq(BaseSupplier::getSupplierState, baseSupplierVo.getSupplierState());
+        }
+        if (!StringUtils.isBlank(baseSupplierVo.getSupplierType())) {
+            lw.eq(BaseSupplier::getSupplierType, baseSupplierVo.getSupplierType());
+        }
+        if (!StringUtils.isBlank(baseSupplierVo.getSupplierAdvancePurchase())) {
+            lw.eq(BaseSupplier::getSupplierAdvancePurchase, baseSupplierVo.getSupplierAdvancePurchase());
+        }
+        IPage<BaseSupplier> page = baseSupplierService.page(new Page<BaseSupplier>(baseSupplierVo.getPageNum(), baseSupplierVo.getPageSize()), lw);
+        return success(page);
     }
 }

+ 99 - 0
purchase-admin/src/main/java/com/ozs/web/controller/plan/MonthlyReconciliationController.java

@@ -0,0 +1,99 @@
+package com.ozs.web.controller.plan;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ozs.base.domain.BaseNoticeType;
+import com.ozs.common.annotation.Log;
+import com.ozs.common.constant.ModularConstans;
+import com.ozs.common.core.controller.BaseController;
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.common.enums.BusinessType;
+import com.ozs.common.enums.SysFileRefEnum;
+import com.ozs.plan.doman.MonthlyReconciliation;
+import com.ozs.plan.doman.vo.requestVo.MonthlyReconciliationPageReqVo;
+import com.ozs.plan.service.MonthlyReconciliationService;
+import com.ozs.system.domain.SysFileInfo;
+import com.ozs.system.domain.SysFileRef;
+import com.ozs.system.service.SysFileRefService;
+import com.ozs.system.service.SysFileService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+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.*;
+
+import javax.validation.constraints.NotEmpty;
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+@RestController
+@RequestMapping("/monthly/reconciliation")
+@Api( tags = ModularConstans.monthly)
+public class MonthlyReconciliationController extends BaseController {
+
+
+    @Autowired
+    private MonthlyReconciliationService monthlyReconciliationService;
+    @Autowired
+    private SysFileRefService sysFileRefService;
+    @Autowired
+    private SysFileService sysFileService;
+
+    @ApiOperation(value = "分页查询月度对表")
+    @PostMapping("/page")
+    @PreAuthorize("@ss.hasPermi('base:monthly:list')")
+    @Log(title = ModularConstans.monthly, businessType = BusinessType.QUERY)
+    public AjaxResult page(@NotEmpty(message = "数据为空")
+                           @RequestBody MonthlyReconciliationPageReqVo vo) {
+        LambdaQueryWrapper<MonthlyReconciliation> lw = new LambdaQueryWrapper<>();
+        if(!StringUtils.isBlank(vo.getProjectName())){
+            lw.like(MonthlyReconciliation::getProjectName,vo.getProjectName());
+        }
+        if(!ObjectUtils.isEmpty(vo.getProjectStatus())){
+            lw.eq(MonthlyReconciliation::getProjectStatus,vo.getProjectStatus());
+        }
+        if(!StringUtils.isBlank(vo.getPurchaseServices())){
+            lw.eq(MonthlyReconciliation::getPurchaseServices,vo.getPurchaseServices());
+        }
+//        if(!ObjectUtils.isEmpty(vo.getStartTime())){
+//            lw.ge(BaseNotice::getReleaseTime,vo.getStartTime());
+//        }
+//        if(!ObjectUtils.isEmpty(vo.getStartTime())){
+//            lw.le(BaseNotice::getReleaseTime,vo.getEntTime());
+//        }
+        IPage<MonthlyReconciliation> page = monthlyReconciliationService.page(new Page<>(vo.getPageNum(), vo.getPageSize()), lw);
+
+        return success(page);
+
+    }
+
+
+    @ApiOperation(value = "查看月度对表详情")
+    @PostMapping("/getInfo")
+    @PreAuthorize("@ss.hasPermi('base:monthly:query')")
+    @Log(title = ModularConstans.monthly, businessType = BusinessType.QUERY)
+    public AjaxResult getInfo(@NotEmpty(message = "主键id不能为空")
+                              @RequestParam(value = "id", required = true)
+                                      Long id) {
+        MonthlyReconciliation vo = monthlyReconciliationService.getById(id);
+
+        if(!ObjectUtils.isEmpty(vo)){
+            LambdaQueryWrapper<SysFileRef> lw =new LambdaQueryWrapper();
+            lw.eq(SysFileRef::getType, SysFileRefEnum.PLAN_TEMPORARY.getType());
+            lw.eq(SysFileRef::getRedId,vo.getPlanId());
+            List<SysFileRef> list = sysFileRefService.list(lw);
+            if(!ObjectUtils.isEmpty(list)){
+                LambdaQueryWrapper<SysFileInfo> l =new LambdaQueryWrapper();
+                l.in(SysFileInfo::getFileId, list.stream().map(SysFileRef::getFileId).collect(Collectors.toList()));
+                vo.setFileList(sysFileService.list(l));
+            }
+        }
+
+        return success(vo);
+    }
+
+}

+ 8 - 5
purchase-admin/src/main/java/com/ozs/web/controller/plan/PlanYearsController.java

@@ -46,14 +46,16 @@ public class PlanYearsController extends BaseController {
     public AjaxResult add(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
         //获取采购单位-
         LoginUser loginUser = tokenService.getLoginUser(request);
-        yearsStandardVo.setPurchaseUnit(loginUser.getDeptId());
-        yearsStandardVo.setCreateBy(String.valueOf(loginUser.getUserId()));
+        yearsStandardVo.setPurchaseDeptId(loginUser.getDeptId());
+        yearsStandardVo.setCreated(String.valueOf(loginUser.getUserId()));
         return planYearsService.insertPlanYears(yearsStandardVo);
     }
 
     @ApiOperation(value = "修改年度计划")
     @PostMapping("/update")
-    public AjaxResult update(@RequestBody PlanYearsStandardVo yearsStandardVo) {
+    public AjaxResult update(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
+        LoginUser loginUser = tokenService.getLoginUser(request);
+        yearsStandardVo.setUpdated(String.valueOf(loginUser.getUserId()));
         return planYearsService.update(yearsStandardVo);
     }
 
@@ -92,8 +94,9 @@ public class PlanYearsController extends BaseController {
     public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
         ExcelUtil<PlanYears> util = new ExcelUtil<>(PlanYears.class);
         List<PlanYears> planYears = util.importExcel(file.getInputStream());
-        String operName = getUsername();
-        String message = planYearsService.importPlanYears(planYears, updateSupport, operName);
+        //获取采购单位-
+        LoginUser loginUser = getLoginUser();
+        String message = planYearsService.importPlanYears(planYears, updateSupport, loginUser);
         return success(message);
     }
 

+ 82 - 0
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmDemandController.java

@@ -0,0 +1,82 @@
+package com.ozs.web.controller.pm;
+
+import java.util.List;
+
+import com.ozs.pm.doman.PmDemand;
+import com.ozs.pm.doman.vo.requestVo.PmRequestVo;
+import com.ozs.pm.doman.vo.responseVo.PmDemandResponseVo;
+import com.ozs.pm.service.IPmDemandService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ozs.common.annotation.Log;
+import com.ozs.common.core.controller.BaseController;
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.common.enums.BusinessType;
+import com.ozs.common.core.page.TableDataInfo;
+
+/**
+ * 采购需求Controller
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@RestController
+@RequestMapping("/system/demand")
+public class PmDemandController extends BaseController
+{
+    @Autowired
+    private IPmDemandService pmDemandService;
+
+    /**
+     * 查询采购需求列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:demand:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(@RequestBody PmRequestVo pmDemand)
+    {
+        startPage();
+        List<PmDemandResponseVo> list = pmDemandService.selectPmDemandList(pmDemand);
+        return getDataTable(list);
+    }
+
+    /**
+     * 获取采购需求详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:demand:query')")
+    @GetMapping(value = "/{demandId}")
+    public AjaxResult getInfo(@PathVariable("demandId") Long demandId)
+    {
+        return success(pmDemandService.selectPmDemandByDemandId(demandId));
+    }
+
+    /**
+     * 新增采购需求
+     */
+    @PreAuthorize("@ss.hasPermi('system:demand:add')")
+    @Log(title = "采购需求", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PmDemand pmDemand)
+    {
+        return toAjax(pmDemandService.insertPmDemand(pmDemand));
+    }
+
+    /**
+     * 修改采购需求
+     */
+    @PreAuthorize("@ss.hasPermi('system:demand:edit')")
+    @Log(title = "采购需求", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody PmDemand pmDemand)
+    {
+        return toAjax(pmDemandService.updatePmDemand(pmDemand));
+    }
+
+
+}

+ 3 - 3
purchase-admin/src/main/resources/application-dev.yml

@@ -9,8 +9,8 @@ purchase:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/purchase/uploadPath,Linux配置 /home/purchase/uploadPath)
-  profile: C:/purchase/uploadPath
-#  profile: /Users/sunhuanhuan/Documents/project/106/文档/purchase/uploadPath
+  # profile: C:/purchase/uploadPath
+  profile: /Users/sunhuanhuan/Documents/project/106/文档/purchase/uploadPath
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数组计算 char 字符验证
@@ -36,7 +36,7 @@ server:
 logging:
   level:
     com.ozs: debug
-    org.springframework: debug
+    org.springframework: warn
 
 
 # 用户配置

+ 1 - 1
purchase-admin/src/main/resources/application.yml

@@ -10,4 +10,4 @@ server:
 # Spring配置
 spring:
   profiles:
-    active: druid,test
+    active: druid,dev

+ 2 - 2
purchase-admin/src/main/resources/logback.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-        <property name="log.path" value="/home/purchase/logs" />
-<!--    <property name="log.path" value="/Users/sunhuanhuan/Documents/project/106/文档/purchase/logs"/>-->
+    <property name="log.path" value="/home/purchase/logs"/>
+    <!--    <property name="log.path" value="/Users/sunhuanhuan/Documents/project/106/文档/purchase/logs"/>-->
     <!-- 日志输出格式 -->
     <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
 

+ 4 - 2
purchase-common/src/main/java/com/ozs/common/constant/ModularConstans.java

@@ -4,11 +4,13 @@ public class ModularConstans {
 
     public static final String policy = "政策法规";
 
-    public static final String  notice = "公告管理";
+    public static final String notice = "公告管理";
 
-    public static final String  noticeType = "公告类型管理";
+    public static final String noticeType = "公告类型管理";
 
     public static final String agency = "招标代理机构管理";
 
     public static final String fileTemplate = "文件模板管理";
+
+    public static final String monthly = "月度对表";
 }

+ 23 - 0
purchase-common/src/main/java/com/ozs/common/enums/SysFileRefEnum.java

@@ -0,0 +1,23 @@
+package com.ozs.common.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+@NoArgsConstructor
+@AllArgsConstructor
+@Getter
+public enum SysFileRefEnum {
+
+    PLAN_YEAR(1, "年度计划附件"),
+    PLAN_TEMPORARY(2, "临时、季度计划附件"),
+
+    ;
+
+    private  Integer type;
+    private  String info;
+
+
+
+
+}

+ 3 - 3
purchase-system/src/main/java/com/ozs/base/domain/BaseExpert.java

@@ -8,8 +8,8 @@ import lombok.Data;
 import org.joda.time.DateTime;
 
 @Data
-@TableName("base_supplier")
-public class BaseExpert extends BaseExpertVo {
+@TableName("base_expert")
+public class BaseExpert {
 
     /**
      * 主键ID
@@ -37,7 +37,7 @@ public class BaseExpert extends BaseExpertVo {
      */
     @ApiModelProperty(value = "出生年月")
     @TableField("expert_date_birth")
-    private DateTime expertDate_Birth;
+    private String expertDateBirth;
 
     /**
      * 联系方式

+ 1 - 3
purchase-system/src/main/java/com/ozs/base/domain/BaseProfessional.java

@@ -5,11 +5,9 @@ import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.io.Serializable;
-
 @Data
 @TableName("base_professional")
-public class BaseProfessional implements Serializable {
+public class BaseProfessional {
 
     /**
      * 主键ID

+ 5 - 2
purchase-system/src/main/java/com/ozs/base/domain/BaseSupplier.java

@@ -2,6 +2,8 @@ package com.ozs.base.domain;
 
 import lombok.Data;
 
+import javax.validation.constraints.NotBlank;
+
 /**
  * 供应商管理
  *
@@ -11,14 +13,15 @@ import lombok.Data;
 public class BaseSupplier {
     private int id;
     // 供应商名称
+    @NotBlank(message = "供应商名称不能为空")
     private String supplierName;
     // 供应商负责人
     private String supplierResponsiblePerson;
     // 供应商地址
     private String supplierAddress;
-    // 供应商类型 黑白名单
+    // 供应商类型
     private String supplierType;
-    // 状态
+    // 状态 黑白名单
     private String supplierState;
     // 预先采购
     private String supplierAdvancePurchase;

+ 9 - 11
purchase-system/src/main/java/com/ozs/base/domain/vo/BaseExpertVo.java

@@ -2,22 +2,20 @@ package com.ozs.base.domain.vo;
 
 import com.ozs.common.vo.PageVo;
 import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
-@ApiModel(value = "BaseAgentPageReqVo", description = "专家库分页查询")
 @Data
-@AllArgsConstructor
-@NoArgsConstructor
 public class BaseExpertVo extends PageVo {
 
-    // 专家姓名
-    private String expertName;
-    // 专业类型
-    private String majorType;
-    // 专业等级
-    private String majorGrade;
-    // 采购品种
-    private String varietyPurchase;
+    @ApiModelProperty("专家姓名")
+    private String expertNameVo;
+    @ApiModelProperty("专业类型")
+    private String majorTypeVo;
+    @ApiModelProperty("专业等级")
+    private String majorGradeVo;
+    @ApiModelProperty("采购品种")
+    private String varietyPurchaseVo;
 }

+ 22 - 0
purchase-system/src/main/java/com/ozs/base/domain/vo/BaseSupplierVo.java

@@ -0,0 +1,22 @@
+package com.ozs.base.domain.vo;
+
+import com.ozs.common.vo.PageVo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class BaseSupplierVo extends PageVo {
+
+    @ApiModelProperty("供应商名称")
+    private String supplierName;
+    @ApiModelProperty("供应商负责人")
+    private String supplierResponsiblePerson;
+    @ApiModelProperty("供应商地址")
+    private String supplierAddress;
+    @ApiModelProperty("供应商类型")
+    private String supplierType;
+    @ApiModelProperty("状态 黑白名单")
+    private String supplierState;
+    @ApiModelProperty("预先采购")
+    private String supplierAdvancePurchase;
+}

+ 1 - 0
purchase-system/src/main/java/com/ozs/base/mapper/BaseExpertMapper.java

@@ -6,4 +6,5 @@ import org.apache.ibatis.annotations.Mapper;
 
 @Mapper
 public interface BaseExpertMapper extends BaseMapper<BaseExpert> {
+    int insertExpert(BaseExpert baseExpert);
 }

+ 3 - 1
purchase-system/src/main/java/com/ozs/base/mapper/BaseSupplierMapper.java

@@ -1,5 +1,7 @@
 package com.ozs.base.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ozs.base.domain.BaseExpert;
 import com.ozs.base.domain.BaseSupplier;
 import org.apache.ibatis.annotations.Mapper;
 
@@ -11,7 +13,7 @@ import java.util.List;
  * @author sunhh
  */
 @Mapper
-public interface BaseSupplierMapper {
+public interface BaseSupplierMapper extends BaseMapper<BaseSupplier> {
 
     /**
      * 新增

+ 5 - 1
purchase-system/src/main/java/com/ozs/base/service/BaseExpertService.java

@@ -1,7 +1,11 @@
 package com.ozs.base.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ozs.base.domain.BaseAgency;
 import com.ozs.base.domain.BaseExpert;
 
-public interface BaseExpertService extends IService<BaseExpert> {
+public interface BaseExpertService  extends IService<BaseExpert> {
+    int insertExpert(BaseExpert baseExpert);
+
+    int updateSupplierType(BaseExpert baseExpert);
 }

+ 3 - 1
purchase-system/src/main/java/com/ozs/base/service/BaseSupplierService.java

@@ -1,5 +1,7 @@
 package com.ozs.base.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ozs.base.domain.BaseExpert;
 import com.ozs.base.domain.BaseSupplier;
 
 import java.util.List;
@@ -9,7 +11,7 @@ import java.util.List;
  *
  * @author sunhh
  */
-public interface BaseSupplierService {
+public interface BaseSupplierService extends IService<BaseSupplier> {
 
     /**
      * 新增供应商

+ 22 - 0
purchase-system/src/main/java/com/ozs/base/service/impl/BaseExpertServiceImpl.java

@@ -1,11 +1,33 @@
 package com.ozs.base.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ozs.base.domain.BaseAgency;
 import com.ozs.base.domain.BaseExpert;
 import com.ozs.base.mapper.BaseExpertMapper;
+import com.ozs.base.mapper.BaseSupplierMapper;
 import com.ozs.base.service.BaseExpertService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 @Service
 public class BaseExpertServiceImpl extends ServiceImpl<BaseExpertMapper, BaseExpert> implements BaseExpertService {
+
+    @Autowired
+    private BaseExpertMapper baseExpertMapper;
+
+    @Override
+    public int insertExpert(BaseExpert baseExpert) {
+        return baseExpertMapper.insertExpert(baseExpert);
+    }
+
+    @Override
+    public int updateSupplierType(BaseExpert baseExpert) {
+        LambdaUpdateWrapper<BaseExpert> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
+        //eq是指你查询的条件,set是指你修改的值
+        lambdaUpdateWrapper
+                .eq(BaseExpert::getId, baseExpert.getId())
+                .set(BaseExpert::getStatus, baseExpert.getStatus());
+        return baseExpertMapper.update(null, lambdaUpdateWrapper);
+    }
 }

+ 4 - 1
purchase-system/src/main/java/com/ozs/base/service/impl/BaseSupplierServiceImpl.java

@@ -1,6 +1,9 @@
 package com.ozs.base.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ozs.base.domain.BaseExpert;
 import com.ozs.base.domain.BaseSupplier;
+import com.ozs.base.mapper.BaseExpertMapper;
 import com.ozs.base.mapper.BaseSupplierMapper;
 import com.ozs.base.service.BaseSupplierService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -14,7 +17,7 @@ import java.util.List;
  * @author sunhh
  */
 @Service
-public class BaseSupplierServiceImpl implements BaseSupplierService {
+public class BaseSupplierServiceImpl extends ServiceImpl<BaseSupplierMapper, BaseSupplier> implements BaseSupplierService {
 
     @Autowired
     private BaseSupplierMapper baseSupplierMapper;

+ 133 - 0
purchase-system/src/main/java/com/ozs/plan/doman/MonthlyReconciliation.java

@@ -0,0 +1,133 @@
+package com.ozs.plan.doman;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import com.ozs.system.domain.SysFileInfo;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("月度对表对象")
+@TableName("pm_demand")
+public class MonthlyReconciliation extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long demandId;
+
+    /** 计划ID */
+    @Excel(name = "计划ID")
+    private Long planId;
+
+    /** 采购单位(登录账号的单位) */
+    @Excel(name = "采购单位", readConverterExp = "登=录账号的单位")
+    private Long purchaseDeptId;
+
+    /** 项目名称 */
+    @Excel(name = "项目名称")
+    private String projectName;
+
+    /** 项目类型(0:装备类;1:物资类;2:服务类;3:工程类) */
+    @Excel(name = "项目类型", readConverterExp = "0=:装备类;1:物资类;2:服务类;3:工程类")
+    private String projectType;
+
+    /** 需求概况 */
+    @Excel(name = "需求概况")
+    private String demandOverview;
+
+    /** 概算金额(万元(保留小数点后两位) */
+    @Excel(name = "概算金额(万元", readConverterExp = "保=留小数点后两位")
+    private BigDecimal evaluation;
+
+    /** 是否为超限额计划(0:未超额,1:超额) */
+    @Excel(name = "是否为超限额计划(0:未超额,1:超额)")
+    private Integer isExcess;
+
+    /** 采购服务站 */
+    @Excel(name = "采购服务站")
+    private String purchaseServices;
+
+    /** 采购方式  (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价) */
+    @Excel(name = "采购方式  (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价)")
+    private String purchaseMode;
+
+    /** 计划提报需求时间--->需求单位成功提报采购需求的日期(具体到月) */
+    @Excel(name = "计划提报需求时间--->需求单位成功提报采购需求的日期", readConverterExp = "具=体到月")
+    private Date planDemandSubTime;
+
+    /** 计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到月) */
+    @Excel(name = "计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期", readConverterExp = "具=体到月")
+    private Date planPurchaseFinishTime;
+
+    /** 计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date planDeliverTime;
+
+    /** 项目属性(0:应急应战项目, 1:重大规划任务项目, 2:规划任务项目, 3:一般项目) */
+    @Excel(name = "项目属性", readConverterExp = "0=:应急应战项目,,1=:重大规划任务项目,,2=:规划任务项目,,3=:一般项目")
+    private String projectAttr;
+
+    /** 计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示该信息 */
+    @Excel(name = "计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示该信息")
+    private String adjustReason;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 实际提报需求时间--->需求单位成功提报采购需求的日期(具体到日) */
+    @Excel(name = "实际提报需求时间--->需求单位成功提报采购需求的日期", readConverterExp = "具=体到日")
+    private Date realDemandCommitTime;
+
+    /** 实际完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到日) */
+    @Excel(name = "实际完成采购时间--->公示中标结果的日期,即填制中标信息的日期", readConverterExp = "具=体到日")
+    private Date realPurchaseFinishTime;
+
+    /** 实际交付(实施)时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期 */
+    @Excel(name = "实际交付", readConverterExp = "实=施")
+    private Date realDeliverTime;
+
+    /** 审核时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date auditTime;
+
+    /** 预警状态(0:正常,1:预警) */
+    @Excel(name = "预警状态(0:正常,1:预警)")
+    private String warnStatus;
+
+    /** 项目状态(4:需求待填制,5:需求待提交,6:需求待审核,7:任务待下达,8:任务已下达,9:中标信息待填制,10:中标信息已填制,11:合同待填制,12:合同已填制,13:项目建设中,14:项目建设完成) */
+    @Excel(name = "项目状态(4:需求待填制,5:需求待提交,6:需求待审核,7:任务待下达,8:任务已下达,9:中标信息待填制,10:中标信息已填制,11:合同待填制,12:合同已填制,13:项目建设中,14:项目建设完成)")
+    private Long projectStatus;
+
+    /** 退回原因 */
+    @Excel(name = "退回原因")
+    private String refuseReason;
+
+    /** 滞后原因 */
+    @Excel(name = "滞后原因")
+    private String delayReason;
+
+    /** 调整建议 */
+    @Excel(name = "调整建议")
+    private String adjustAdvice;
+
+    /** 附件 */
+    @Excel(name = "附件")
+    private List<SysFileInfo> fileList;
+}

+ 25 - 16
purchase-system/src/main/java/com/ozs/plan/doman/PlanYears.java

@@ -25,7 +25,7 @@ public class PlanYears extends BaseEntity {
      */
     @NotNull(message = "采购单位不能为空")
     @Excel(name = "采购单位")
-    private Long purchaseUnit;
+    private Long purchaseDeptId;
     /**
      * 项目名称
      */
@@ -47,7 +47,7 @@ public class PlanYears extends BaseEntity {
     /**
      * 概算金额(万元(保留小数点后两位)
      */
-    @Excel(name = "概算金额")
+    @Excel(name = "概算金额(万元)")
     @NotNull(message = "概算金额不能为空")
     private BigDecimal evaluation;
     /**
@@ -70,36 +70,36 @@ public class PlanYears extends BaseEntity {
     /**
      * 计划提报需求时间--->需求单位成功提报采购需求的日期(具体到月)
      */
-    @Excel(name = "计划提报需求时间")
+    @Excel(name = "提报需求时间")
     @NotNull(message = "计划提报需求时间不能为空")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date demandCommitTime;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planDemandSubTime;
     /**
      * 计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到月)
      */
-    @Excel(name = "计划完成采购时间")
+    @Excel(name = "完成采购时间")
     @NotNull(message = "计划完成采购时间不能为空")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date purchaseFinishTime;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planPurchaseFinishTime;
     /**
      * 计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期
      */
-    @Excel(name = "计划交付时间")
+    @Excel(name = "交付(实施)时间")
     @NotNull(message = "计划交付时间不能为空")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date deliverTime;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planDeliverTime;
     /**
      * 项目属性--->应急应战项目、重大规划任务项目、规划任务项目或一般项目
      */
     @Excel(name = "项目属性")
     @NotNull(message = "项目属性不能为空")
-    private String projectAttribute;
+    private String projectAtt;
     /**
      * 计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示
      */
     @Excel(name = "计划调整情况及理由")
     @NotNull(message = "计划调整情况及理由不能为空")
-    private String readjustOfPlan;
+    private String adjustReason;
     /**
      * 备注
      */
@@ -114,7 +114,7 @@ public class PlanYears extends BaseEntity {
     /**
      * 退回原因--->审核不通过就是退回
      */
-    private String reasonOfReturn;
+    private String refuseReason;
     /**
      * 项目附件
      */
@@ -122,16 +122,25 @@ public class PlanYears extends BaseEntity {
     /**
      * 创建者
      */
-    private String createBy;
+    private String created;
     /**
      * 创建时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
+    /**
+     * 更改者
+     */
+    private String updated;
+    /**
+     * 更改时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
     /**
      * 逻辑删除字段--->(0:正常,1:已删除)
      */
-    private Integer isDelete;
+    private Integer delFlay;
 
 
 }

+ 37 - 0
purchase-system/src/main/java/com/ozs/plan/doman/vo/requestVo/MonthlyReconciliationPageReqVo.java

@@ -0,0 +1,37 @@
+package com.ozs.plan.doman.vo.requestVo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.constant.ModularConstans;
+import com.ozs.common.vo.PageVo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+@ApiModel(value = "MonthlyReconciliationPageReqVo", description = ModularConstans.monthly+ "分页查询实体")
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class MonthlyReconciliationPageReqVo extends PageVo {
+
+    @ApiModelProperty("项目名称")
+    private String projectName;
+
+    @ApiModelProperty("采购服务站")
+    private String purchaseServices;
+
+    @ApiModelProperty("项目状态")
+    private Integer projectStatus;
+
+    @ApiModelProperty("开始时间")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date startTime;
+
+    @ApiModelProperty("结束时间")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date entTime;
+
+}

+ 19 - 9
purchase-system/src/main/java/com/ozs/plan/doman/vo/requestVo/PlanYearsStandardVo.java

@@ -25,7 +25,7 @@ public class PlanYearsStandardVo extends BaseEntity {
      * 采购单位(登录账号的单位)
      */
     @ApiModelProperty(value = "采购单位")
-    private Long purchaseUnit;
+    private Long purchaseDeptId;
 
     /**
      * 项目名称
@@ -73,28 +73,28 @@ public class PlanYearsStandardVo extends BaseEntity {
      * 计划提报需求时间--->需求单位成功提报采购需求的日期(具体到月)
      */
     @ApiModelProperty(value = "计划提报需求时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date demandCommitTime;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planDemandSubTime;
 
     /**
      * 计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到月)
      */
     @ApiModelProperty(value = "计划完成采购时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date purchaseFinishTime;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planPurchaseFinishTime;
 
     /**
      * 计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期
      */
     @ApiModelProperty(value = "计划交付时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date deliverTime;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planDeliverTime;
 
     /**
      * 项目属性--->应急应战项目、重大规划任务项目、规划任务项目或一般项目
      */
     @ApiModelProperty(value = "项目属性")
-    private String projectAttribute;
+    private String projectAtt;
 
     /**
      * 项目状态--->包括计划待提交、计划待审核、计划已退回、计划已审核
@@ -102,6 +102,11 @@ public class PlanYearsStandardVo extends BaseEntity {
     @ApiModelProperty(value = "项目状态(0:计划待提交,1:计划待审核,2:计划已退回,3:计划已审核)")
     private String projectStatus;
 
+    /**
+     * 退回原因--->审核不通过就是退回
+     */
+    private String refuseReason;
+
     /**
      * 备注
      */
@@ -121,5 +126,10 @@ public class PlanYearsStandardVo extends BaseEntity {
     /**
      * 创建者
      */
-    private String createBy;
+    private String created;
+
+    /**
+     * 更改者
+     */
+    private String updated;
 }

+ 13 - 9
purchase-system/src/main/java/com/ozs/plan/doman/vo/responseVo/PlanYearsResponseVo.java

@@ -22,7 +22,7 @@ public class PlanYearsResponseVo {
      * 采购单位(登录账号的单位)
      */
     @Excel(name = "采购单位")
-    private Long purchaseUnit;
+    private Long purchaseDeptId;
     /**
      * 项目名称
      */
@@ -62,30 +62,30 @@ public class PlanYearsResponseVo {
      * 计划提报需求时间--->需求单位成功提报采购需求的日期(具体到月)
      */
     @Excel(name = "计划提报需求时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date demandCommitTime;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planDemandSubTime;
     /**
      * 计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到月)
      */
     @Excel(name = "计划完成采购时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date purchaseFinishTime;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planPurchaseFinishTime;
     /**
      * 计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期
      */
     @Excel(name = "计划交付时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date deliverTime;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date planDeliverTime;
     /**
      * 项目属性--->应急应战项目、重大规划任务项目、规划任务项目或一般项目
      */
     @Excel(name = "项目属性")
-    private String projectAttribute;
+    private String projectAtt;
     /**
      * 计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示
      */
     @Excel(name = "计划调整情况及理由")
-    private String readjustOfPlan;
+    private String adjustReason;
     /**
      * 备注
      */
@@ -97,6 +97,10 @@ public class PlanYearsResponseVo {
      */
     @Excel(name = "项目状态")
     private String projectStatus;
+    /**
+     * 退回原因--->审核不通过就是退回
+     */
+    private String refuseReason;
     /**
      * 项目附件
      */

+ 13 - 0
purchase-system/src/main/java/com/ozs/plan/mapper/MonthlyReconciliationMapper.java

@@ -0,0 +1,13 @@
+package com.ozs.plan.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ozs.base.domain.BaseAgency;
+import com.ozs.plan.doman.MonthlyReconciliation;
+import org.apache.ibatis.annotations.Mapper;
+
+
+@Mapper
+public interface MonthlyReconciliationMapper extends BaseMapper<MonthlyReconciliation> {
+
+
+}

+ 10 - 0
purchase-system/src/main/java/com/ozs/plan/service/MonthlyReconciliationService.java

@@ -0,0 +1,10 @@
+package com.ozs.plan.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ozs.plan.doman.MonthlyReconciliation;
+
+public interface MonthlyReconciliationService extends IService<MonthlyReconciliation> {
+
+
+}

+ 2 - 1
purchase-system/src/main/java/com/ozs/plan/service/PlanYearsService.java

@@ -2,6 +2,7 @@ package com.ozs.plan.service;
 
 
 import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.common.core.domain.model.LoginUser;
 import com.ozs.plan.doman.PlanYears;
 import com.ozs.plan.doman.vo.requestVo.PlanYearsStandardVo;
 
@@ -66,7 +67,7 @@ public interface PlanYearsService {
      *
      * @return 结果
      */
-    public String importPlanYears(List<PlanYears> planYears, boolean isUpdateSupport, String operName);
+    public String importPlanYears(List<PlanYears> planYears, boolean isUpdateSupport, LoginUser loginUser);
 
     /**
      * 提交年度计划

+ 15 - 0
purchase-system/src/main/java/com/ozs/plan/service/impl/MonthlyReconciliationServiceImpl.java

@@ -0,0 +1,15 @@
+package com.ozs.plan.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ozs.plan.doman.MonthlyReconciliation;
+import com.ozs.plan.mapper.MonthlyReconciliationMapper;
+import com.ozs.plan.service.MonthlyReconciliationService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+@Service
+@Slf4j
+public class MonthlyReconciliationServiceImpl extends ServiceImpl<MonthlyReconciliationMapper, MonthlyReconciliation> implements MonthlyReconciliationService {
+
+}

+ 49 - 61
purchase-system/src/main/java/com/ozs/plan/service/impl/PlanYearsServiceImpl.java

@@ -2,6 +2,7 @@ package com.ozs.plan.service.impl;
 
 import com.ozs.common.core.domain.AjaxResult;
 import com.ozs.common.core.domain.entity.SysDictData;
+import com.ozs.common.core.domain.model.LoginUser;
 import com.ozs.common.enums.ProjectStatus;
 import com.ozs.common.enums.ProjectTypes;
 import com.ozs.common.exception.ServiceException;
@@ -67,29 +68,7 @@ public class PlanYearsServiceImpl implements PlanYearsService {
             e.printStackTrace();
         }
         //判断是否为超额计划
-        BigDecimal evaluation = yearsStandardVo.getEvaluation();
-        BigDecimal threshold = new BigDecimal(0);
-        //获取各个项目类型设定的概算金额阈值
-        List<SysDictData> data = dictTypeService.selectDictDataByType("sys_over_limit_threshold");
-        HashMap<String, String> thresholdMap = new LinkedHashMap<>();
-        //各个类型的概算金额阈值
-        for (SysDictData dictData : data) {
-            //    类型----阈值
-            thresholdMap.put(dictData.getDictLabel(), dictData.getDictValue());
-        }
-        //项目类型
-        for (ProjectTypes value : ProjectTypes.values()) {
-            if (yearsStandardVo.getProjectType().equals(value.getCode())) {
-                threshold = BigDecimal.valueOf(Long.parseLong(thresholdMap.get(value.getInfo())));
-            }
-            break;
-        }
-        if (evaluation.compareTo(threshold) == 1) {
-            //是超额项目
-            ofYears.setIsExcess("1");
-        } else {
-            ofYears.setIsExcess("0");
-        }
+        ofYears.setIsExcess(isExcessOrNo(ofYears.getProjectType(), ofYears.getEvaluation()));
         ofYears.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
         ofYears.setCreateTime(new Date());
         planYearsMapper.insertPlanYears(ofYears);
@@ -130,43 +109,19 @@ public class PlanYearsServiceImpl implements PlanYearsService {
         } catch (Exception e) {
             e.printStackTrace();
         }
-        BigDecimal evaluation = ofYears.getEvaluation();
-        BigDecimal threshold = new BigDecimal(0);
-        //获取各个项目类型设定的概算金额阈值
-        List<SysDictData> data = dictTypeService.selectDictDataByType("sys_over_limit_threshold");
-        HashMap<String, String> thresholdMap = new LinkedHashMap<>();
-        //各个类型的概算金额阈值
-        for (SysDictData dictData : data) {
-            //    类型----阈值
-            thresholdMap.put(dictData.getDictLabel(), dictData.getDictValue());
-        }
-        //项目类型
-        for (ProjectTypes value : ProjectTypes.values()) {
-            if (ofYears.getProjectType().equals(value.getCode())) {
-                threshold = BigDecimal.valueOf(Long.parseLong(thresholdMap.get(value.getInfo())));
-            }
-            break;
-        }
-
-        if (evaluation.compareTo(threshold) == 1) {
-            //是超额项目
-            ofYears.setIsExcess("1");
-        } else {
-            ofYears.setIsExcess("0");
-        }
-
+        ofYears.setIsExcess(isExcessOrNo(ofYears.getProjectType(), ofYears.getEvaluation()));
+        ofYears.setUpdateTime(new Date());
         planYearsMapper.updateById(ofYears);
         return AjaxResult.success();
     }
 
     @Override
-    public String importPlanYears(List<PlanYears> planYears, boolean isUpdateSupport, String operName) {
+    public String importPlanYears(List<PlanYears> planYears, boolean isUpdateSupport, LoginUser loginUser) {
         if (StringUtils.isNull(planYears) || planYears.size() == 0) {
             throw new ServiceException("导入年度计划数据不能为空!");
         }
         HashMap<String, HashMap<String, String>> planEnums = dictTypeService.getAboutEnums();
         HashMap<String, String> projectTypesMap = planEnums.get("ProjectTypes");
-        HashMap<String, String> projectStatusMap = planEnums.get("ProjectStatus");
         HashMap<String, String> planPurchaseModesMap = planEnums.get("PlanPurchaseModes");
         HashMap<String, String> projectAttributes = planEnums.get("ProjectAttributes");
         HashMap<String, String> purchaseServices = planEnums.get("purchaseServices");
@@ -178,24 +133,32 @@ public class PlanYearsServiceImpl implements PlanYearsService {
             try {
                 //验证项目名称是否重复导入
                 List<PlanYears> plan = planYearsMapper.countProjectName(ofYear.getProjectName());
+
                 if (plan.size() == 0) {
                     //将录入信息中的值更改为要保存的数据
-
+                    ofYear.setProjectType(projectTypesMap.get(ofYear.getProjectType()));
+                    ofYear.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
+                    ofYear.setPurchaseMode(planPurchaseModesMap.get(ofYear.getPurchaseMode()));
+                    ofYear.setProjectAtt(projectAttributes.get(ofYear.getProjectAtt()));
+                    ofYear.setPurchaseServices(purchaseServices.get(ofYear.getPurchaseServices()));
+                    ofYear.setCreateBy(String.valueOf(loginUser.getUserId()));
+                    ofYear.setCreateTime(new Date());
+                    //采购单位
                     planYearsMapper.insertPlanYears(ofYear);
                     successNum++;
                     successMsg.append("<br/>" + successNum + "、项目 " + ofYear.getProjectName() + " 导入成功");
-                } else if (isUpdateSupport) {
-                    PlanYears years = plan.get(0);
-                    BeanValidators.validateWithException(validator, ofYear);
-                    years.setCreateBy(operName);
-                    years.setCreateTime(new Date());
-                    years.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
-                    planYearsMapper.updateById(years);
-                    successNum++;
-                    successMsg.append("<br/>" + successNum + "、项目 " + ofYear.getProjectName() + " 更新成功");
+                    //} else if (isUpdateSupport) {
+                    //    PlanYears years = plan.get(0);
+                    //    BeanValidators.validateWithException(validator, ofYear);
+                    //    years.setCreateBy(operName);
+                    //    years.setCreateTime(new Date());
+                    //    years.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
+                    //    planYearsMapper.updateById(years);
+                    //    successNum++;
+                    //    successMsg.append("<br/>" + successNum + "、项目 " + ofYear.getProjectName() + " 更新成功");
                 } else {
                     failureNum++;
-                    successMsg.append("<br/>" + successNum + "、项目 " + ofYear.getProjectName() + " 已存在");
+                    failureMsg.append("<br/>" + successNum + "、项目 " + ofYear.getProjectName() + " 已存在");
                 }
             } catch (Exception exc) {
                 failureNum++;
@@ -269,4 +232,29 @@ public class PlanYearsServiceImpl implements PlanYearsService {
         return AjaxResult.success();
     }
 
+    //判断是否为超额计划
+    public String isExcessOrNo(String projectType, BigDecimal evaluation) {
+        BigDecimal threshold = new BigDecimal(0);
+        //获取各个项目类型设定的概算金额阈值
+        List<SysDictData> data = dictTypeService.selectDictDataByType("sys_over_limit_threshold");
+        HashMap<String, String> thresholdMap = new LinkedHashMap<>();
+        //各个类型的概算金额阈值
+        for (SysDictData dictData : data) {
+            //    类型----阈值
+            thresholdMap.put(dictData.getDictLabel(), dictData.getDictValue());
+        }
+        //项目类型
+        for (ProjectTypes value : ProjectTypes.values()) {
+            if (projectType.equals(value.getCode())) {
+                threshold = BigDecimal.valueOf(Long.parseLong(thresholdMap.get(value.getInfo())));
+            }
+            break;
+        }
+        if (evaluation.compareTo(threshold) == 1) {
+            //是超额计划
+            return ("1");
+        } else {
+            return ("0");
+        }
+    }
 }

+ 131 - 0
purchase-system/src/main/java/com/ozs/pm/doman/PmDemand.java

@@ -0,0 +1,131 @@
+package com.ozs.pm.doman;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 采购需求对象 pm_demand
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求对象")
+public class PmDemand extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long demandId;
+
+    /** 计划ID */
+    @Excel(name = "计划ID")
+    private Long planId;
+
+    /** 采购单位(登录账号的单位) */
+    @Excel(name = "采购单位", readConverterExp = "登=录账号的单位")
+    private Long purchaseDeptId;
+
+    /** 项目名称 */
+    @Excel(name = "项目名称")
+    private String projectName;
+
+    /** 项目类型(0:装备类;1:物资类;2:服务类;3:工程类) */
+    @Excel(name = "项目类型", readConverterExp = "0=:装备类;1:物资类;2:服务类;3:工程类")
+    private String projectType;
+
+    /** 需求概况 */
+    @Excel(name = "需求概况")
+    private String demandOverview;
+
+    /** 概算金额(万元(保留小数点后两位) */
+    @Excel(name = "概算金额(万元", readConverterExp = "保=留小数点后两位")
+    private BigDecimal evaluation;
+
+    /** 是否为超限额计划(0:未超额,1:超额) */
+    @Excel(name = "是否为超限额计划(0:未超额,1:超额)")
+    private Integer isExcess;
+
+    /** 采购服务站 */
+    @Excel(name = "采购服务站")
+    private String purchaseServices;
+
+    /** 采购方式  (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价) */
+    @Excel(name = "采购方式  (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价)")
+    private String purchaseMode;
+
+    /** 计划提报需求时间--->需求单位成功提报采购需求的日期(具体到月) */
+    @Excel(name = "计划提报需求时间--->需求单位成功提报采购需求的日期", readConverterExp = "具=体到月")
+    private Date planDemandSubTime;
+
+    /** 计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到月) */
+    @Excel(name = "计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期", readConverterExp = "具=体到月")
+    private Date planPurchaseFinishTime;
+
+    /** 计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date planDeliverTime;
+
+    /** 项目属性(0:应急应战项目, 1:重大规划任务项目, 2:规划任务项目, 3:一般项目) */
+    @Excel(name = "项目属性", readConverterExp = "0=:应急应战项目,,1=:重大规划任务项目,,2=:规划任务项目,,3=:一般项目")
+    private String projectAttr;
+
+    /** 计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示该信息 */
+    @Excel(name = "计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示该信息")
+    private String adjustReason;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 实际提报需求时间--->需求单位成功提报采购需求的日期(具体到日) */
+    @Excel(name = "实际提报需求时间--->需求单位成功提报采购需求的日期", readConverterExp = "具=体到日")
+    private Date realDemandCommitTime;
+
+    /** 实际完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到日) */
+    @Excel(name = "实际完成采购时间--->公示中标结果的日期,即填制中标信息的日期", readConverterExp = "具=体到日")
+    private Date realPurchaseFinishTime;
+
+    /** 实际交付(实施)时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期 */
+    @Excel(name = "实际交付", readConverterExp = "实=施")
+    private Date realDeliverTime;
+
+    /** 审核时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date auditTime;
+
+    /** 预警状态(0:正常,1:预警) */
+    @Excel(name = "预警状态(0:正常,1:预警)")
+    private String warnStatus;
+
+    /** 项目状态(4:需求待填制,5:需求待提交,6:需求待审核,7:任务待下达,8:任务已下达,9:中标信息待填制,10:中标信息已填制,11:合同待填制,12:合同已填制,13:项目建设中,14:项目建设完成) */
+    @Excel(name = "项目状态(4:需求待填制,5:需求待提交,6:需求待审核,7:任务待下达,8:任务已下达,9:中标信息待填制,10:中标信息已填制,11:合同待填制,12:合同已填制,13:项目建设中,14:项目建设完成)")
+    private Long projectStatus;
+
+    /** 退回原因 */
+    @Excel(name = "退回原因")
+    private String refuseReason;
+
+    /** 滞后原因 */
+    @Excel(name = "滞后原因")
+    private String delayReason;
+
+    /** 调整建议 */
+    @Excel(name = "调整建议")
+    private String adjustAdvice;
+
+
+}

+ 127 - 0
purchase-system/src/main/java/com/ozs/pm/doman/PmDemandEngineering.java

@@ -0,0 +1,127 @@
+package com.ozs.pm.doman;
+
+import java.math.BigDecimal;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 采购需求工程类对象 pm_demand_engineering
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求工程类对象")
+public class PmDemandEngineering extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long demandEngineeringId;
+
+    /** 需求ID */
+    @Excel(name = "需求ID")
+    private Long demandId;
+
+    /** 工程项目名称 */
+    @Excel(name = "工程项目名称")
+    private String engineeringName;
+
+    /** 建设地点 */
+    @Excel(name = "建设地点")
+    private String constructionLocation;
+
+    /** 设计任务书批复文号 */
+    @Excel(name = "设计任务书批复文号")
+    private String designAssignmenApprovalNumber;
+
+    /** 工程建设计划文号 */
+    @Excel(name = "工程建设计划文号")
+    private BigDecimal projectConstructionPlanNumber;
+
+    /** 任务书批复规模(㎡): */
+    @Excel(name = "任务书批复规模(㎡):")
+    private BigDecimal tassignmentApprovalScale;
+
+    /** 任务书批复投资 */
+    @Excel(name = "任务书批复投资")
+    private String tassignmentApprovalInvestmen;
+
+    /** 规划许可文号 */
+    @Excel(name = "规划许可文号")
+    private String planningLicenseNumber;
+
+    /** 密级处理 */
+    @Excel(name = "密级处理")
+    private String classifiedTreatment;
+
+    /** 采购项目规模(㎡) */
+    @Excel(name = "采购项目规模(㎡)")
+    private BigDecimal procurementProjectScale;
+
+    /** 采购项目投资(万元) */
+    @Excel(name = "采购项目投资(万元)")
+    private BigDecimal procurementProjectInvestment;
+
+    /** 联系人 */
+    @Excel(name = "联系人")
+    private BigDecimal linkman;
+
+    /** 电话 */
+    @Excel(name = "电话")
+    private BigDecimal phone;
+
+    /** 项目类别 */
+    @Excel(name = "项目类别")
+    private String projectCategory;
+
+    /** 承包方式 */
+    @Excel(name = "承包方式")
+    private String contractingMode;
+
+    /** 施工图是否完成(0未完成,1完成) */
+    @Excel(name = "施工图是否完成(0未完成,1完成)")
+    private String constructionDrawing;
+
+    /** 设计单位 */
+    @Excel(name = "设计单位")
+    private BigDecimal designUnit;
+
+    /** 最高限价 */
+    @Excel(name = "最高限价")
+    private BigDecimal ceilingPrice;
+
+    /** 采购方式建议 */
+    @Excel(name = "采购方式建议")
+    private String procurementMethodSuggest;
+
+    /** 投标(报价)人资质等级要求 */
+    @Excel(name = "投标(报价)人资质等级要求")
+    private String qualificationLevelRequirement;
+
+    /** 供应商 */
+    @Excel(name = "供应商")
+    private Long supplierId;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 项目附件 */
+    @Excel(name = "项目附件")
+    private String projectFiles;
+
+    /** 逻辑删除字段--->(0:正常,1:已删除) */
+    @Excel(name = "逻辑删除字段--->", readConverterExp = "0=:正常,1:已删除")
+    private Integer isDelete;
+
+
+}

+ 86 - 0
purchase-system/src/main/java/com/ozs/pm/doman/PmDemandEquip.java

@@ -0,0 +1,86 @@
+package com.ozs.pm.doman;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 采购需求装备类对象 pm_demand_equip
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求装备类对象")
+public class PmDemandEquip extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long demandEquipId;
+
+    /** 需求ID */
+    @Excel(name = "需求ID")
+    private Long demandId;
+
+    /** 物资类别及品种名称 */
+    @Excel(name = "物资类别及品种名称")
+    private String typeAndName;
+
+    /** 规格型号长*宽*高 */
+    @Excel(name = "规格型号长*宽*高")
+    private String specification;
+
+    /** 质量技术标准(技术参数): */
+    @Excel(name = "质量技术标准(技术参数):")
+    private String qualityTechnicalStandard;
+
+    /** 计量单位 */
+    @Excel(name = "计量单位")
+    private String measurementUnit;
+
+    /** 采购数量 */
+    @Excel(name = "采购数量")
+    private BigDecimal procurementQuantity;
+
+    /** 单价(元) */
+    @Excel(name = "单价(元)")
+    private BigDecimal price;
+
+    /** 预算金额(万元) */
+    @Excel(name = "预算金额(万元)")
+    private BigDecimal budgetAmount;
+
+    /** 需求提报时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "需求提报时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date demandCommitTime;
+
+    /** 采购方式建议 */
+    @Excel(name = "采购方式建议")
+    private String procurementMethodSuggest;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 项目附件 */
+    @Excel(name = "项目附件")
+    private String projectFiles;
+
+    /** 逻辑删除字段--->(0:正常,1:已删除) */
+    @Excel(name = "逻辑删除字段--->", readConverterExp = "0=:正常,1:已删除")
+    private Integer isDelete;
+
+
+}

+ 112 - 0
purchase-system/src/main/java/com/ozs/pm/doman/PmDemandMaterials.java

@@ -0,0 +1,112 @@
+package com.ozs.pm.doman;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 采购需求物资类对象 pm_demand_materials
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求物资类对象")
+public class PmDemandMaterials extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long demandMaterialsId;
+
+    /**
+     * 需求ID
+     */
+    @Excel(name = "需求ID")
+    private Long demandId;
+
+    /**
+     * 物资类别及品种名称
+     */
+    @Excel(name = "物资类别及品种名称")
+    private String typeAndName;
+
+    /**
+     * 规格型号长*宽*高
+     */
+    @Excel(name = "规格型号长*宽*高")
+    private String specification;
+
+    /**
+     * 质量技术标准(技术参数):
+     */
+    @Excel(name = "质量技术标准(技术参数):")
+    private String qualityTechnicalStandard;
+
+    /**
+     * 计量单位
+     */
+    @Excel(name = "计量单位")
+    private String measurementUnit;
+
+    /**
+     * 采购数量
+     */
+    @Excel(name = "采购数量")
+    private BigDecimal procurementQuantity;
+
+    /**
+     * 单价(元)
+     */
+    @Excel(name = "单价(元)")
+    private BigDecimal price;
+
+    /**
+     * 预算金额(万元)
+     */
+    @Excel(name = "预算金额(万元)")
+    private BigDecimal budgetAmount;
+
+    /**
+     * 需求提报时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "需求提报时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date demandCommitTime;
+
+    /**
+     * 采购方式建议
+     */
+    @Excel(name = "采购方式建议")
+    private String procurementMethodSuggest;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /**
+     * 项目附件
+     */
+    @Excel(name = "项目附件")
+    private String projectFiles;
+
+    /**
+     * 逻辑删除字段--->(0:正常,1:已删除)
+     */
+    @Excel(name = "逻辑删除字段--->", readConverterExp = "0=:正常,1:已删除")
+    private Integer isDelete;
+
+}

+ 82 - 0
purchase-system/src/main/java/com/ozs/pm/doman/PmDemandServe.java

@@ -0,0 +1,82 @@
+package com.ozs.pm.doman;
+
+import java.math.BigDecimal;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 采购需求服务类对象 pm_demand_serve
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求服务类对象")
+public class PmDemandServe extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long demandServeId;
+
+    /** 需求ID */
+    @Excel(name = "需求ID")
+    private Long demandId;
+
+    /** 服务项目名称 */
+    @Excel(name = "服务项目名称")
+    private String serviceName;
+
+    /** 技术服务要求 */
+    @Excel(name = "技术服务要求")
+    private String technicalServiceRequirement;
+
+    /** 计量单位 */
+    @Excel(name = "计量单位")
+    private String measurementUnit;
+
+    /** 采购数量 */
+    @Excel(name = "采购数量")
+    private BigDecimal procurementQuantity;
+
+    /** 单价(元) */
+    @Excel(name = "单价(元)")
+    private BigDecimal price;
+
+    /** 预算金额(万元) */
+    @Excel(name = "预算金额(万元)")
+    private BigDecimal budgetAmount;
+
+    /** 交货期限 */
+    @Excel(name = "交货期限")
+    private String deliveryTimeLimit;
+
+    /** 采购方式建议 */
+    @Excel(name = "采购方式建议")
+    private String procurementMethodSuggest;
+
+    /** 供应商 */
+    @Excel(name = "供应商")
+    private Long supplierId;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 项目附件 */
+    @Excel(name = "项目附件")
+    private String projectFiles;
+
+    /** 逻辑删除字段--->(0:正常,1:已删除) */
+    @Excel(name = "逻辑删除字段--->", readConverterExp = "0=:正常,1:已删除")
+    private Integer isDelete;
+
+}

+ 50 - 0
purchase-system/src/main/java/com/ozs/pm/doman/vo/requestVo/PmRequestVo.java

@@ -0,0 +1,50 @@
+package com.ozs.pm.doman.vo.requestVo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 采购需求对象 pm_demand
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求对象")
+public class PmRequestVo
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 项目名称 */
+    @Excel(name = "项目名称")
+    private String projectName;
+
+    /** 采购服务站 */
+    @Excel(name = "采购服务站")
+    private String purchaseServiceStation;
+
+
+    /** 项目状态(4:需求待填制,5:需求待提交,6:需求待审核,7:任务待下达,8:任务已下达,9:中标信息待填制,10:中标信息已填制,11:合同待填制,12:合同已填制,13:项目建设中,14:项目建设完成) */
+    @Excel(name = "项目状态(4:需求待填制,5:需求待提交,6:需求待审核,7:任务待下达,8:任务已下达,9:中标信息待填制,10:中标信息已填制,11:合同待填制,12:合同已填制,13:项目建设中,14:项目建设完成)")
+    private Long projectStatus;
+
+    /** 开始日期 */
+    @Excel(name = "开始日期")
+    private String beginDate;
+
+    /** 结束日期 */
+    @Excel(name = "结束日期")
+    private String endDate;
+}

+ 128 - 0
purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandEngineeringResponseVo.java

@@ -0,0 +1,128 @@
+package com.ozs.pm.doman.vo.responseVo;
+
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+/**
+ * 采购需求工程类对象 pm_demand_engineering
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求工程类对象")
+public class PmDemandEngineeringResponseVo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long demandEngineeringId;
+
+    /** 需求ID */
+    @Excel(name = "需求ID")
+    private Long demandId;
+
+    /** 工程项目名称 */
+    @Excel(name = "工程项目名称")
+    private String engineeringName;
+
+    /** 建设地点 */
+    @Excel(name = "建设地点")
+    private String constructionLocation;
+
+    /** 设计任务书批复文号 */
+    @Excel(name = "设计任务书批复文号")
+    private String designAssignmenApprovalNumber;
+
+    /** 工程建设计划文号 */
+    @Excel(name = "工程建设计划文号")
+    private BigDecimal projectConstructionPlanNumber;
+
+    /** 任务书批复规模(㎡): */
+    @Excel(name = "任务书批复规模(㎡):")
+    private BigDecimal tassignmentApprovalScale;
+
+    /** 任务书批复投资 */
+    @Excel(name = "任务书批复投资")
+    private String tassignmentApprovalInvestmen;
+
+    /** 规划许可文号 */
+    @Excel(name = "规划许可文号")
+    private String planningLicenseNumber;
+
+    /** 密级处理 */
+    @Excel(name = "密级处理")
+    private String classifiedTreatment;
+
+    /** 采购项目规模(㎡) */
+    @Excel(name = "采购项目规模(㎡)")
+    private BigDecimal procurementProjectScale;
+
+    /** 采购项目投资(万元) */
+    @Excel(name = "采购项目投资(万元)")
+    private BigDecimal procurementProjectInvestment;
+
+    /** 联系人 */
+    @Excel(name = "联系人")
+    private BigDecimal linkman;
+
+    /** 电话 */
+    @Excel(name = "电话")
+    private BigDecimal phone;
+
+    /** 项目类别 */
+    @Excel(name = "项目类别")
+    private String projectCategory;
+
+    /** 承包方式 */
+    @Excel(name = "承包方式")
+    private String contractingMode;
+
+    /** 施工图是否完成(0未完成,1完成) */
+    @Excel(name = "施工图是否完成(0未完成,1完成)")
+    private String constructionDrawing;
+
+    /** 设计单位 */
+    @Excel(name = "设计单位")
+    private BigDecimal designUnit;
+
+    /** 最高限价 */
+    @Excel(name = "最高限价")
+    private BigDecimal ceilingPrice;
+
+    /** 采购方式建议 */
+    @Excel(name = "采购方式建议")
+    private String procurementMethodSuggest;
+
+    /** 投标(报价)人资质等级要求 */
+    @Excel(name = "投标(报价)人资质等级要求")
+    private String qualificationLevelRequirement;
+
+    /** 供应商 */
+    @Excel(name = "供应商")
+    private Long supplierId;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 项目附件 */
+    @Excel(name = "项目附件")
+    private String projectFiles;
+
+    /** 逻辑删除字段--->(0:正常,1:已删除) */
+    @Excel(name = "逻辑删除字段--->", readConverterExp = "0=:正常,1:已删除")
+    private Integer isDelete;
+
+
+}

+ 87 - 0
purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandEquipResponseVo.java

@@ -0,0 +1,87 @@
+package com.ozs.pm.doman.vo.responseVo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 采购需求装备类对象 pm_demand_equip
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求装备类对象")
+public class PmDemandEquipResponseVo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long demandEquipId;
+
+    /** 需求ID */
+    @Excel(name = "需求ID")
+    private Long demandId;
+
+    /** 物资类别及品种名称 */
+    @Excel(name = "物资类别及品种名称")
+    private String typeAndName;
+
+    /** 规格型号长*宽*高 */
+    @Excel(name = "规格型号长*宽*高")
+    private String specification;
+
+    /** 质量技术标准(技术参数): */
+    @Excel(name = "质量技术标准(技术参数):")
+    private String qualityTechnicalStandard;
+
+    /** 计量单位 */
+    @Excel(name = "计量单位")
+    private String measurementUnit;
+
+    /** 采购数量 */
+    @Excel(name = "采购数量")
+    private BigDecimal procurementQuantity;
+
+    /** 单价(元) */
+    @Excel(name = "单价(元)")
+    private BigDecimal price;
+
+    /** 预算金额(万元) */
+    @Excel(name = "预算金额(万元)")
+    private BigDecimal budgetAmount;
+
+    /** 需求提报时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "需求提报时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date demandCommitTime;
+
+    /** 采购方式建议 */
+    @Excel(name = "采购方式建议")
+    private String procurementMethodSuggest;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 项目附件 */
+    @Excel(name = "项目附件")
+    private String projectFiles;
+
+    /** 逻辑删除字段--->(0:正常,1:已删除) */
+    @Excel(name = "逻辑删除字段--->", readConverterExp = "0=:正常,1:已删除")
+    private Integer isDelete;
+
+
+}

+ 113 - 0
purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandMaterialsResponseVo.java

@@ -0,0 +1,113 @@
+package com.ozs.pm.doman.vo.responseVo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 采购需求物资类对象 pm_demand_materials
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求物资类对象")
+public class PmDemandMaterialsResponseVo extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long demandMaterialsId;
+
+    /**
+     * 需求ID
+     */
+    @Excel(name = "需求ID")
+    private Long demandId;
+
+    /**
+     * 物资类别及品种名称
+     */
+    @Excel(name = "物资类别及品种名称")
+    private String typeAndName;
+
+    /**
+     * 规格型号长*宽*高
+     */
+    @Excel(name = "规格型号长*宽*高")
+    private String specification;
+
+    /**
+     * 质量技术标准(技术参数):
+     */
+    @Excel(name = "质量技术标准(技术参数):")
+    private String qualityTechnicalStandard;
+
+    /**
+     * 计量单位
+     */
+    @Excel(name = "计量单位")
+    private String measurementUnit;
+
+    /**
+     * 采购数量
+     */
+    @Excel(name = "采购数量")
+    private BigDecimal procurementQuantity;
+
+    /**
+     * 单价(元)
+     */
+    @Excel(name = "单价(元)")
+    private BigDecimal price;
+
+    /**
+     * 预算金额(万元)
+     */
+    @Excel(name = "预算金额(万元)")
+    private BigDecimal budgetAmount;
+
+    /**
+     * 需求提报时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "需求提报时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date demandCommitTime;
+
+    /**
+     * 采购方式建议
+     */
+    @Excel(name = "采购方式建议")
+    private String procurementMethodSuggest;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /**
+     * 项目附件
+     */
+    @Excel(name = "项目附件")
+    private String projectFiles;
+
+    /**
+     * 逻辑删除字段--->(0:正常,1:已删除)
+     */
+    @Excel(name = "逻辑删除字段--->", readConverterExp = "0=:正常,1:已删除")
+    private Integer isDelete;
+
+}

+ 142 - 0
purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandResponseVo.java

@@ -0,0 +1,142 @@
+package com.ozs.pm.doman.vo.responseVo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 采购需求对象 pm_demand
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求对象")
+public class PmDemandResponseVo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long demandId;
+
+    /** 计划ID */
+    @Excel(name = "计划ID")
+    private Long planId;
+
+    /** 采购单位(登录账号的单位) */
+    @Excel(name = "采购单位", readConverterExp = "登=录账号的单位")
+    private Long purchaseDeptId;
+
+    /** 项目名称 */
+    @Excel(name = "项目名称")
+    private String projectName;
+
+    /** 项目类型(0:装备类;1:物资类;2:服务类;3:工程类) */
+    @Excel(name = "项目类型", readConverterExp = "0=:装备类;1:物资类;2:服务类;3:工程类")
+    private String projectType;
+
+    /** 需求概况 */
+    @Excel(name = "需求概况")
+    private String demandOverview;
+
+    /** 概算金额(万元(保留小数点后两位) */
+    @Excel(name = "概算金额(万元", readConverterExp = "保=留小数点后两位")
+    private BigDecimal evaluation;
+
+    /** 是否为超限额计划(0:未超额,1:超额) */
+    @Excel(name = "是否为超限额计划(0:未超额,1:超额)")
+    private Integer isExcess;
+
+    /** 采购服务站 */
+    @Excel(name = "采购服务站")
+    private String purchaseServices;
+
+    /** 采购方式  (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价) */
+    @Excel(name = "采购方式  (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价)")
+    private String purchaseMode;
+
+    /** 计划提报需求时间--->需求单位成功提报采购需求的日期(具体到月) */
+    @Excel(name = "计划提报需求时间--->需求单位成功提报采购需求的日期", readConverterExp = "具=体到月")
+    private Date planDemandSubTime;
+
+    /** 计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到月) */
+    @Excel(name = "计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期", readConverterExp = "具=体到月")
+    private Date planPurchaseFinishTime;
+
+    /** 计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date planDeliverTime;
+
+    /** 项目属性(0:应急应战项目, 1:重大规划任务项目, 2:规划任务项目, 3:一般项目) */
+    @Excel(name = "项目属性", readConverterExp = "0=:应急应战项目,,1=:重大规划任务项目,,2=:规划任务项目,,3=:一般项目")
+    private String projectAttr;
+
+    /** 计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示该信息 */
+    @Excel(name = "计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示该信息")
+    private String adjustReason;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 实际提报需求时间--->需求单位成功提报采购需求的日期(具体到日) */
+    @Excel(name = "实际提报需求时间--->需求单位成功提报采购需求的日期", readConverterExp = "具=体到日")
+    private Date realDemandCommitTime;
+
+    /** 实际完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到日) */
+    @Excel(name = "实际完成采购时间--->公示中标结果的日期,即填制中标信息的日期", readConverterExp = "具=体到日")
+    private Date realPurchaseFinishTime;
+
+    /** 实际交付(实施)时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期 */
+    @Excel(name = "实际交付", readConverterExp = "实=施")
+    private Date realDeliverTime;
+
+    /** 审核时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date auditTime;
+
+    /** 预警状态(0:正常,1:预警) */
+    @Excel(name = "预警状态(0:正常,1:预警)")
+    private String warnStatus;
+
+    /** 项目状态(4:需求待填制,5:需求待提交,6:需求待审核,7:任务待下达,8:任务已下达,9:中标信息待填制,10:中标信息已填制,11:合同待填制,12:合同已填制,13:项目建设中,14:项目建设完成) */
+    @Excel(name = "项目状态(4:需求待填制,5:需求待提交,6:需求待审核,7:任务待下达,8:任务已下达,9:中标信息待填制,10:中标信息已填制,11:合同待填制,12:合同已填制,13:项目建设中,14:项目建设完成)")
+    private Long projectStatus;
+
+    /** 退回原因 */
+    @Excel(name = "退回原因")
+    private String refuseReason;
+
+    /** 滞后原因 */
+    @Excel(name = "滞后原因")
+    private String delayReason;
+
+    /** 调整建议 */
+    @Excel(name = "调整建议")
+    private String adjustAdvice;
+
+    /** 采购需求工程类对象 */
+    private PmDemandEngineeringResponseVo pmDemandEngineeringResponseVo;
+
+    /** 采购需求装备类对象 */
+    private PmDemandEquipResponseVo pmDemandEquipResponseVo;
+
+    /** 采购需求物资类对象 */
+    private PmDemandMaterialsResponseVo pmDemandMaterialsResponseVo;
+
+    /** 采购需求服务类对象 */
+    private PmDemandServeResponseVo pmDemandServeResponseVo;
+}

+ 83 - 0
purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandServeResponseVo.java

@@ -0,0 +1,83 @@
+package com.ozs.pm.doman.vo.responseVo;
+
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+/**
+ * 采购需求服务类对象 pm_demand_serve
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("采购需求服务类对象")
+public class PmDemandServeResponseVo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long demandServeId;
+
+    /** 需求ID */
+    @Excel(name = "需求ID")
+    private Long demandId;
+
+    /** 服务项目名称 */
+    @Excel(name = "服务项目名称")
+    private String serviceName;
+
+    /** 技术服务要求 */
+    @Excel(name = "技术服务要求")
+    private String technicalServiceRequirement;
+
+    /** 计量单位 */
+    @Excel(name = "计量单位")
+    private String measurementUnit;
+
+    /** 采购数量 */
+    @Excel(name = "采购数量")
+    private BigDecimal procurementQuantity;
+
+    /** 单价(元) */
+    @Excel(name = "单价(元)")
+    private BigDecimal price;
+
+    /** 预算金额(万元) */
+    @Excel(name = "预算金额(万元)")
+    private BigDecimal budgetAmount;
+
+    /** 交货期限 */
+    @Excel(name = "交货期限")
+    private String deliveryTimeLimit;
+
+    /** 采购方式建议 */
+    @Excel(name = "采购方式建议")
+    private String procurementMethodSuggest;
+
+    /** 供应商 */
+    @Excel(name = "供应商")
+    private Long supplierId;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 项目附件 */
+    @Excel(name = "项目附件")
+    private String projectFiles;
+
+    /** 逻辑删除字段--->(0:正常,1:已删除) */
+    @Excel(name = "逻辑删除字段--->", readConverterExp = "0=:正常,1:已删除")
+    private Integer isDelete;
+
+}

+ 49 - 0
purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandEngineeringMapper.java

@@ -0,0 +1,49 @@
+package com.ozs.pm.mapper;
+
+import com.ozs.pm.doman.PmDemandEngineering;
+
+import java.util.List;
+
+
+/**
+ * 采购需求工程类Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface PmDemandEngineeringMapper 
+{
+    /**
+     * 查询采购需求工程类
+     * 
+     * @param demandEngineeringId 采购需求工程类主键
+     * @return 采购需求工程类
+     */
+    public PmDemandEngineering selectPmDemandEngineeringByDemandEngineeringId(Long demandEngineeringId);
+
+    /**
+     * 查询采购需求工程类列表
+     * 
+     * @param pmDemandEngineering 采购需求工程类
+     * @return 采购需求工程类集合
+     */
+    public List<PmDemandEngineering> selectPmDemandEngineeringList(PmDemandEngineering pmDemandEngineering);
+
+    /**
+     * 新增采购需求工程类
+     * 
+     * @param pmDemandEngineering 采购需求工程类
+     * @return 结果
+     */
+    public int insertPmDemandEngineering(PmDemandEngineering pmDemandEngineering);
+
+    /**
+     * 修改采购需求工程类
+     * 
+     * @param pmDemandEngineering 采购需求工程类
+     * @return 结果
+     */
+    public int updatePmDemandEngineering(PmDemandEngineering pmDemandEngineering);
+
+
+}

+ 49 - 0
purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandEquipMapper.java

@@ -0,0 +1,49 @@
+package com.ozs.pm.mapper;
+
+import com.ozs.pm.doman.PmDemandEquip;
+
+import java.util.List;
+
+
+/**
+ * 采购需求装备类Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface PmDemandEquipMapper 
+{
+    /**
+     * 查询采购需求装备类
+     * 
+     * @param demandEquipId 采购需求装备类主键
+     * @return 采购需求装备类
+     */
+    public PmDemandEquip selectPmDemandEquipByDemandEquipId(Long demandEquipId);
+
+    /**
+     * 查询采购需求装备类列表
+     * 
+     * @param pmDemandEquip 采购需求装备类
+     * @return 采购需求装备类集合
+     */
+    public List<PmDemandEquip> selectPmDemandEquipList(PmDemandEquip pmDemandEquip);
+
+    /**
+     * 新增采购需求装备类
+     * 
+     * @param pmDemandEquip 采购需求装备类
+     * @return 结果
+     */
+    public int insertPmDemandEquip(PmDemandEquip pmDemandEquip);
+
+    /**
+     * 修改采购需求装备类
+     * 
+     * @param pmDemandEquip 采购需求装备类
+     * @return 结果
+     */
+    public int updatePmDemandEquip(PmDemandEquip pmDemandEquip);
+
+
+}

+ 49 - 0
purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandMapper.java

@@ -0,0 +1,49 @@
+package com.ozs.pm.mapper;
+
+import com.ozs.pm.doman.PmDemand;
+
+import java.util.List;
+
+
+/**
+ * 采购需求Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface PmDemandMapper 
+{
+    /**
+     * 查询采购需求
+     * 
+     * @param demandId 采购需求主键
+     * @return 采购需求
+     */
+    public PmDemand selectPmDemandByDemandId(Long demandId);
+
+    /**
+     * 查询采购需求列表
+     * 
+     * @param pmDemand 采购需求
+     * @return 采购需求集合
+     */
+    public List<PmDemand> selectPmDemandList(PmDemand pmDemand);
+
+    /**
+     * 新增采购需求
+     * 
+     * @param pmDemand 采购需求
+     * @return 结果
+     */
+    public int insertPmDemand(PmDemand pmDemand);
+
+    /**
+     * 修改采购需求
+     * 
+     * @param pmDemand 采购需求
+     * @return 结果
+     */
+    public int updatePmDemand(PmDemand pmDemand);
+
+
+}

+ 49 - 0
purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandMaterialsMapper.java

@@ -0,0 +1,49 @@
+package com.ozs.pm.mapper;
+
+import com.ozs.pm.doman.PmDemandMaterials;
+
+import java.util.List;
+
+
+/**
+ * 采购需求物资类Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface PmDemandMaterialsMapper 
+{
+    /**
+     * 查询采购需求物资类
+     * 
+     * @param demandMaterialsId 采购需求物资类主键
+     * @return 采购需求物资类
+     */
+    public PmDemandMaterials selectPmDemandMaterialsByDemandMaterialsId(Long demandMaterialsId);
+
+    /**
+     * 查询采购需求物资类列表
+     * 
+     * @param pmDemandMaterials 采购需求物资类
+     * @return 采购需求物资类集合
+     */
+    public List<PmDemandMaterials> selectPmDemandMaterialsList(PmDemandMaterials pmDemandMaterials);
+
+    /**
+     * 新增采购需求物资类
+     * 
+     * @param pmDemandMaterials 采购需求物资类
+     * @return 结果
+     */
+    public int insertPmDemandMaterials(PmDemandMaterials pmDemandMaterials);
+
+    /**
+     * 修改采购需求物资类
+     * 
+     * @param pmDemandMaterials 采购需求物资类
+     * @return 结果
+     */
+    public int updatePmDemandMaterials(PmDemandMaterials pmDemandMaterials);
+
+
+}

+ 48 - 0
purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandServeMapper.java

@@ -0,0 +1,48 @@
+package com.ozs.pm.mapper;
+
+import com.ozs.pm.doman.PmDemandServe;
+
+import java.util.List;
+
+/**
+ * 采购需求服务类Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface PmDemandServeMapper 
+{
+    /**
+     * 查询采购需求服务类
+     * 
+     * @param demandServeId 采购需求服务类主键
+     * @return 采购需求服务类
+     */
+    public PmDemandServe selectPmDemandServeByDemandServeId(Long demandServeId);
+
+    /**
+     * 查询采购需求服务类列表
+     * 
+     * @param pmDemandServe 采购需求服务类
+     * @return 采购需求服务类集合
+     */
+    public List<PmDemandServe> selectPmDemandServeList(PmDemandServe pmDemandServe);
+
+    /**
+     * 新增采购需求服务类
+     * 
+     * @param pmDemandServe 采购需求服务类
+     * @return 结果
+     */
+    public int insertPmDemandServe(PmDemandServe pmDemandServe);
+
+    /**
+     * 修改采购需求服务类
+     * 
+     * @param pmDemandServe 采购需求服务类
+     * @return 结果
+     */
+    public int updatePmDemandServe(PmDemandServe pmDemandServe);
+
+
+}

+ 48 - 0
purchase-system/src/main/java/com/ozs/pm/service/IPmDemandEngineeringService.java

@@ -0,0 +1,48 @@
+package com.ozs.pm.service;
+
+import com.ozs.pm.doman.PmDemandEngineering;
+
+import java.util.List;
+
+
+/**
+ * 采购需求工程类Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface IPmDemandEngineeringService 
+{
+    /**
+     * 查询采购需求工程类
+     * 
+     * @param demandEngineeringId 采购需求工程类主键
+     * @return 采购需求工程类
+     */
+    public PmDemandEngineering selectPmDemandEngineeringByDemandEngineeringId(Long demandEngineeringId);
+
+    /**
+     * 查询采购需求工程类列表
+     * 
+     * @param pmDemandEngineering 采购需求工程类
+     * @return 采购需求工程类集合
+     */
+    public List<PmDemandEngineering> selectPmDemandEngineeringList(PmDemandEngineering pmDemandEngineering);
+
+    /**
+     * 新增采购需求工程类
+     * 
+     * @param pmDemandEngineering 采购需求工程类
+     * @return 结果
+     */
+    public int insertPmDemandEngineering(PmDemandEngineering pmDemandEngineering);
+
+    /**
+     * 修改采购需求工程类
+     * 
+     * @param pmDemandEngineering 采购需求工程类
+     * @return 结果
+     */
+    public int updatePmDemandEngineering(PmDemandEngineering pmDemandEngineering);
+
+}

+ 47 - 0
purchase-system/src/main/java/com/ozs/pm/service/IPmDemandEquipService.java

@@ -0,0 +1,47 @@
+package com.ozs.pm.service;
+
+import com.ozs.pm.doman.PmDemandEquip;
+
+import java.util.List;
+
+/**
+ * 采购需求装备类Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface IPmDemandEquipService 
+{
+    /**
+     * 查询采购需求装备类
+     * 
+     * @param demandEquipId 采购需求装备类主键
+     * @return 采购需求装备类
+     */
+    public PmDemandEquip selectPmDemandEquipByDemandEquipId(Long demandEquipId);
+
+    /**
+     * 查询采购需求装备类列表
+     * 
+     * @param pmDemandEquip 采购需求装备类
+     * @return 采购需求装备类集合
+     */
+    public List<PmDemandEquip> selectPmDemandEquipList(PmDemandEquip pmDemandEquip);
+
+    /**
+     * 新增采购需求装备类
+     * 
+     * @param pmDemandEquip 采购需求装备类
+     * @return 结果
+     */
+    public int insertPmDemandEquip(PmDemandEquip pmDemandEquip);
+
+    /**
+     * 修改采购需求装备类
+     * 
+     * @param pmDemandEquip 采购需求装备类
+     * @return 结果
+     */
+    public int updatePmDemandEquip(PmDemandEquip pmDemandEquip);
+
+}

+ 48 - 0
purchase-system/src/main/java/com/ozs/pm/service/IPmDemandMaterialsService.java

@@ -0,0 +1,48 @@
+package com.ozs.pm.service;
+
+import com.ozs.pm.doman.PmDemandMaterials;
+
+import java.util.List;
+
+/**
+ * 采购需求物资类Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface IPmDemandMaterialsService 
+{
+    /**
+     * 查询采购需求物资类
+     * 
+     * @param demandMaterialsId 采购需求物资类主键
+     * @return 采购需求物资类
+     */
+    public PmDemandMaterials selectPmDemandMaterialsByDemandMaterialsId(Long demandMaterialsId);
+
+    /**
+     * 查询采购需求物资类列表
+     * 
+     * @param pmDemandMaterials 采购需求物资类
+     * @return 采购需求物资类集合
+     */
+    public List<PmDemandMaterials> selectPmDemandMaterialsList(PmDemandMaterials pmDemandMaterials);
+
+    /**
+     * 新增采购需求物资类
+     * 
+     * @param pmDemandMaterials 采购需求物资类
+     * @return 结果
+     */
+    public int insertPmDemandMaterials(PmDemandMaterials pmDemandMaterials);
+
+    /**
+     * 修改采购需求物资类
+     * 
+     * @param pmDemandMaterials 采购需求物资类
+     * @return 结果
+     */
+    public int updatePmDemandMaterials(PmDemandMaterials pmDemandMaterials);
+
+
+}

+ 49 - 0
purchase-system/src/main/java/com/ozs/pm/service/IPmDemandServeService.java

@@ -0,0 +1,49 @@
+package com.ozs.pm.service;
+
+import com.ozs.pm.doman.PmDemandServe;
+
+import java.util.List;
+
+
+/**
+ * 采购需求服务类Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface IPmDemandServeService 
+{
+    /**
+     * 查询采购需求服务类
+     * 
+     * @param demandServeId 采购需求服务类主键
+     * @return 采购需求服务类
+     */
+    public PmDemandServe selectPmDemandServeByDemandServeId(Long demandServeId);
+
+    /**
+     * 查询采购需求服务类列表
+     * 
+     * @param pmDemandServe 采购需求服务类
+     * @return 采购需求服务类集合
+     */
+    public List<PmDemandServe> selectPmDemandServeList(PmDemandServe pmDemandServe);
+
+    /**
+     * 新增采购需求服务类
+     * 
+     * @param pmDemandServe 采购需求服务类
+     * @return 结果
+     */
+    public int insertPmDemandServe(PmDemandServe pmDemandServe);
+
+    /**
+     * 修改采购需求服务类
+     * 
+     * @param pmDemandServe 采购需求服务类
+     * @return 结果
+     */
+    public int updatePmDemandServe(PmDemandServe pmDemandServe);
+
+
+}

+ 51 - 0
purchase-system/src/main/java/com/ozs/pm/service/IPmDemandService.java

@@ -0,0 +1,51 @@
+package com.ozs.pm.service;
+
+import com.ozs.pm.doman.PmDemand;
+import com.ozs.pm.doman.vo.requestVo.PmRequestVo;
+import com.ozs.pm.doman.vo.responseVo.PmDemandResponseVo;
+
+import java.util.List;
+
+
+/**
+ * 采购需求Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+public interface IPmDemandService 
+{
+    /**
+     * 查询采购需求
+     * 
+     * @param demandId 采购需求主键
+     * @return 采购需求
+     */
+    public PmDemandResponseVo selectPmDemandByDemandId(Long demandId);
+
+    /**
+     * 查询采购需求列表
+     * 
+     * @param pmDemand 采购需求
+     * @return 采购需求集合
+     */
+    public List<PmDemandResponseVo> selectPmDemandList(PmRequestVo pmDemand);
+
+    /**
+     * 新增采购需求
+     * 
+     * @param pmDemand 采购需求
+     * @return 结果
+     */
+    public int insertPmDemand(PmDemand pmDemand);
+
+    /**
+     * 修改采购需求
+     * 
+     * @param pmDemand 采购需求
+     * @return 结果
+     */
+    public int updatePmDemand(PmDemand pmDemand);
+
+
+}

+ 74 - 0
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandEngineeringServiceImpl.java

@@ -0,0 +1,74 @@
+package com.ozs.pm.service.impl;
+
+import java.util.List;
+import com.ozs.common.utils.DateUtils;
+import com.ozs.pm.doman.PmDemandEngineering;
+import com.ozs.pm.mapper.PmDemandEngineeringMapper;
+import com.ozs.pm.service.IPmDemandEngineeringService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 采购需求工程类Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Service
+public class PmDemandEngineeringServiceImpl implements IPmDemandEngineeringService
+{
+    @Autowired
+    private PmDemandEngineeringMapper pmDemandEngineeringMapper;
+
+    /**
+     * 查询采购需求工程类
+     *
+     * @param demandEngineeringId 采购需求工程类主键
+     * @return 采购需求工程类
+     */
+    @Override
+    public PmDemandEngineering selectPmDemandEngineeringByDemandEngineeringId(Long demandEngineeringId)
+    {
+        return pmDemandEngineeringMapper.selectPmDemandEngineeringByDemandEngineeringId(demandEngineeringId);
+    }
+
+    /**
+     * 查询采购需求工程类列表
+     *
+     * @param pmDemandEngineering 采购需求工程类
+     * @return 采购需求工程类
+     */
+    @Override
+    public List<PmDemandEngineering> selectPmDemandEngineeringList(PmDemandEngineering pmDemandEngineering)
+    {
+        return pmDemandEngineeringMapper.selectPmDemandEngineeringList(pmDemandEngineering);
+    }
+
+    /**
+     * 新增采购需求工程类
+     *
+     * @param pmDemandEngineering 采购需求工程类
+     * @return 结果
+     */
+    @Override
+    public int insertPmDemandEngineering(PmDemandEngineering pmDemandEngineering)
+    {
+        pmDemandEngineering.setCreateTime(DateUtils.getNowDate());
+        return pmDemandEngineeringMapper.insertPmDemandEngineering(pmDemandEngineering);
+    }
+
+    /**
+     * 修改采购需求工程类
+     *
+     * @param pmDemandEngineering 采购需求工程类
+     * @return 结果
+     */
+    @Override
+    public int updatePmDemandEngineering(PmDemandEngineering pmDemandEngineering)
+    {
+        pmDemandEngineering.setUpdateTime(DateUtils.getNowDate());
+        return pmDemandEngineeringMapper.updatePmDemandEngineering(pmDemandEngineering);
+    }
+
+}

+ 75 - 0
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandEquipServiceImpl.java

@@ -0,0 +1,75 @@
+package com.ozs.pm.service.impl;
+
+import java.util.List;
+import com.ozs.common.utils.DateUtils;
+import com.ozs.pm.doman.PmDemandEquip;
+import com.ozs.pm.mapper.PmDemandEquipMapper;
+import com.ozs.pm.service.IPmDemandEquipService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 采购需求装备类Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Service
+public class PmDemandEquipServiceImpl implements IPmDemandEquipService
+{
+    @Autowired
+    private PmDemandEquipMapper pmDemandEquipMapper;
+
+    /**
+     * 查询采购需求装备类
+     *
+     * @param demandEquipId 采购需求装备类主键
+     * @return 采购需求装备类
+     */
+    @Override
+    public PmDemandEquip selectPmDemandEquipByDemandEquipId(Long demandEquipId)
+    {
+        return pmDemandEquipMapper.selectPmDemandEquipByDemandEquipId(demandEquipId);
+    }
+
+    /**
+     * 查询采购需求装备类列表
+     *
+     * @param pmDemandEquip 采购需求装备类
+     * @return 采购需求装备类
+     */
+    @Override
+    public List<PmDemandEquip> selectPmDemandEquipList(PmDemandEquip pmDemandEquip)
+    {
+        return pmDemandEquipMapper.selectPmDemandEquipList(pmDemandEquip);
+    }
+
+    /**
+     * 新增采购需求装备类
+     *
+     * @param pmDemandEquip 采购需求装备类
+     * @return 结果
+     */
+    @Override
+    public int insertPmDemandEquip(PmDemandEquip pmDemandEquip)
+    {
+        pmDemandEquip.setCreateTime(DateUtils.getNowDate());
+        return pmDemandEquipMapper.insertPmDemandEquip(pmDemandEquip);
+    }
+
+    /**
+     * 修改采购需求装备类
+     *
+     * @param pmDemandEquip 采购需求装备类
+     * @return 结果
+     */
+    @Override
+    public int updatePmDemandEquip(PmDemandEquip pmDemandEquip)
+    {
+        pmDemandEquip.setUpdateTime(DateUtils.getNowDate());
+        return pmDemandEquipMapper.updatePmDemandEquip(pmDemandEquip);
+    }
+
+
+}

+ 74 - 0
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandMaterialsServiceImpl.java

@@ -0,0 +1,74 @@
+package com.ozs.pm.service.impl;
+
+import java.util.List;
+import com.ozs.common.utils.DateUtils;
+import com.ozs.pm.doman.PmDemandMaterials;
+import com.ozs.pm.mapper.PmDemandMaterialsMapper;
+import com.ozs.pm.service.IPmDemandMaterialsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 采购需求物资类Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Service
+public class PmDemandMaterialsServiceImpl implements IPmDemandMaterialsService
+{
+    @Autowired
+    private PmDemandMaterialsMapper pmDemandMaterialsMapper;
+
+    /**
+     * 查询采购需求物资类
+     *
+     * @param demandMaterialsId 采购需求物资类主键
+     * @return 采购需求物资类
+     */
+    @Override
+    public PmDemandMaterials selectPmDemandMaterialsByDemandMaterialsId(Long demandMaterialsId)
+    {
+        return pmDemandMaterialsMapper.selectPmDemandMaterialsByDemandMaterialsId(demandMaterialsId);
+    }
+
+    /**
+     * 查询采购需求物资类列表
+     *
+     * @param pmDemandMaterials 采购需求物资类
+     * @return 采购需求物资类
+     */
+    @Override
+    public List<PmDemandMaterials> selectPmDemandMaterialsList(PmDemandMaterials pmDemandMaterials)
+    {
+        return pmDemandMaterialsMapper.selectPmDemandMaterialsList(pmDemandMaterials);
+    }
+
+    /**
+     * 新增采购需求物资类
+     *
+     * @param pmDemandMaterials 采购需求物资类
+     * @return 结果
+     */
+    @Override
+    public int insertPmDemandMaterials(PmDemandMaterials pmDemandMaterials)
+    {
+        pmDemandMaterials.setCreateTime(DateUtils.getNowDate());
+        return pmDemandMaterialsMapper.insertPmDemandMaterials(pmDemandMaterials);
+    }
+
+    /**
+     * 修改采购需求物资类
+     *
+     * @param pmDemandMaterials 采购需求物资类
+     * @return 结果
+     */
+    @Override
+    public int updatePmDemandMaterials(PmDemandMaterials pmDemandMaterials)
+    {
+        pmDemandMaterials.setUpdateTime(DateUtils.getNowDate());
+        return pmDemandMaterialsMapper.updatePmDemandMaterials(pmDemandMaterials);
+    }
+
+}

+ 75 - 0
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServeServiceImpl.java

@@ -0,0 +1,75 @@
+package com.ozs.pm.service.impl;
+
+import java.util.List;
+import com.ozs.common.utils.DateUtils;
+import com.ozs.pm.doman.PmDemandServe;
+import com.ozs.pm.mapper.PmDemandServeMapper;
+import com.ozs.pm.service.IPmDemandServeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 采购需求服务类Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Service
+public class PmDemandServeServiceImpl implements IPmDemandServeService
+{
+    @Autowired
+    private PmDemandServeMapper pmDemandServeMapper;
+
+    /**
+     * 查询采购需求服务类
+     *
+     * @param demandServeId 采购需求服务类主键
+     * @return 采购需求服务类
+     */
+    @Override
+    public PmDemandServe selectPmDemandServeByDemandServeId(Long demandServeId)
+    {
+        return pmDemandServeMapper.selectPmDemandServeByDemandServeId(demandServeId);
+    }
+
+    /**
+     * 查询采购需求服务类列表
+     *
+     * @param pmDemandServe 采购需求服务类
+     * @return 采购需求服务类
+     */
+    @Override
+    public List<PmDemandServe> selectPmDemandServeList(PmDemandServe pmDemandServe)
+    {
+        return pmDemandServeMapper.selectPmDemandServeList(pmDemandServe);
+    }
+
+    /**
+     * 新增采购需求服务类
+     *
+     * @param pmDemandServe 采购需求服务类
+     * @return 结果
+     */
+    @Override
+    public int insertPmDemandServe(PmDemandServe pmDemandServe)
+    {
+        pmDemandServe.setCreateTime(DateUtils.getNowDate());
+        return pmDemandServeMapper.insertPmDemandServe(pmDemandServe);
+    }
+
+    /**
+     * 修改采购需求服务类
+     *
+     * @param pmDemandServe 采购需求服务类
+     * @return 结果
+     */
+    @Override
+    public int updatePmDemandServe(PmDemandServe pmDemandServe)
+    {
+        pmDemandServe.setUpdateTime(DateUtils.getNowDate());
+        return pmDemandServeMapper.updatePmDemandServe(pmDemandServe);
+    }
+
+
+}

+ 103 - 0
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServiceImpl.java

@@ -0,0 +1,103 @@
+package com.ozs.pm.service.impl;
+
+import java.util.*;
+
+import com.ozs.common.utils.DateUtils;
+import com.ozs.common.utils.bean.BeanUtils;
+import com.ozs.pm.doman.PmDemand;
+import com.ozs.pm.doman.vo.requestVo.PmRequestVo;
+import com.ozs.pm.doman.vo.responseVo.PmDemandResponseVo;
+import com.ozs.pm.mapper.PmDemandMapper;
+import com.ozs.pm.service.IPmDemandService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 采购需求Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-01-16
+ */
+@Service
+public class PmDemandServiceImpl implements IPmDemandService
+{
+    @Autowired
+    private PmDemandMapper pmDemandMapper;
+
+    /**
+     * 查询采购需求
+     *
+     * @param demandId 采购需求主键
+     * @return 采购需求
+     */
+    @Override
+    public PmDemandResponseVo selectPmDemandByDemandId(Long demandId)
+    {
+        PmDemand pmDemand = pmDemandMapper.selectPmDemandByDemandId(demandId);
+        if(pmDemand != null){
+            PmDemandResponseVo vo = new PmDemandResponseVo();
+            BeanUtils.copyProperties(pmDemand, vo);
+
+            return vo;
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * 查询采购需求列表
+     *
+     * @param requestVo
+     * @return 采购需求
+     */
+    @Override
+    public List<PmDemandResponseVo> selectPmDemandList(PmRequestVo requestVo)
+    {
+        PmDemand pmDemand = new PmDemand();
+        pmDemand.setProjectName(requestVo.getProjectName());
+        pmDemand.setPurchaseServices(requestVo.getPurchaseServiceStation());
+        pmDemand.setProjectStatus(requestVo.getProjectStatus());
+        Map<String,Object> params = new HashMap<>();
+        params.put("beginDate",requestVo.getBeginDate());
+        params.put("endDate",requestVo.getEndDate());
+        pmDemand.setParams(params);
+        List<PmDemand> pmDemandList = pmDemandMapper.selectPmDemandList(pmDemand);
+        List<PmDemandResponseVo> pmDemandResponseVoList = new ArrayList<>();
+        if(pmDemandList != null && !pmDemandList.isEmpty()){
+            for(PmDemand pmDemand1 : pmDemandList){
+                PmDemandResponseVo vo = new PmDemandResponseVo();
+                BeanUtils.copyBeanProp(pmDemand1,vo);
+                pmDemandResponseVoList.add(vo);
+            }
+        }
+        return pmDemandResponseVoList;
+    }
+
+    /**
+     * 新增采购需求
+     *
+     * @param pmDemand 采购需求
+     * @return 结果
+     */
+    @Override
+    public int insertPmDemand(PmDemand pmDemand)
+    {
+        pmDemand.setCreateTime(DateUtils.getNowDate());
+        return pmDemandMapper.insertPmDemand(pmDemand);
+    }
+
+    /**
+     * 修改采购需求
+     *
+     * @param pmDemand 采购需求
+     * @return 结果
+     */
+    @Override
+    public int updatePmDemand(PmDemand pmDemand)
+    {
+        pmDemand.setUpdateTime(DateUtils.getNowDate());
+        return pmDemandMapper.updatePmDemand(pmDemand);
+    }
+
+}

+ 43 - 0
purchase-system/src/main/java/com/ozs/system/domain/SysFileRef.java

@@ -0,0 +1,43 @@
+package com.ozs.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.vo.BaseDto;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 附件关联对象 sys_file_ref
+ *
+ * @author ruoyi
+ * @date 2023-01-17
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class SysFileRef extends BaseDto
+{
+
+
+    /** 主键id */
+    @ApiModelProperty("主键ID")
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /** 关联id */
+    @Excel(name = "关联id")
+    private Long redId;
+
+    /** 附件主键 */
+    @Excel(name = "附件主键")
+    private Long fileId;
+
+    /** 来源类型:年度1;季度2;临时3,项目4 */
+    @Excel(name = "来源类型:年度1;季度2;临时3,项目4")
+    private Integer type;
+
+
+}

+ 14 - 0
purchase-system/src/main/java/com/ozs/system/mapper/SysFileRefMapper.java

@@ -0,0 +1,14 @@
+package com.ozs.system.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ozs.base.domain.BaseNotice;
+import com.ozs.system.domain.SysFileRef;
+import org.apache.ibatis.annotations.Mapper;
+
+
+@Mapper
+public interface SysFileRefMapper extends BaseMapper<SysFileRef>
+{
+
+}

+ 7 - 0
purchase-system/src/main/java/com/ozs/system/service/SysFileRefService.java

@@ -0,0 +1,7 @@
+package com.ozs.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ozs.system.domain.SysFileRef;
+
+public interface SysFileRefService  extends IService<SysFileRef> {
+}

+ 12 - 0
purchase-system/src/main/java/com/ozs/system/service/impl/SysFileRefServiceImpl.java

@@ -0,0 +1,12 @@
+package com.ozs.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ozs.system.domain.SysFileRef;
+import com.ozs.system.mapper.SysFileRefMapper;
+import com.ozs.system.service.SysFileRefService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class SysFileRefServiceImpl  extends ServiceImpl<SysFileRefMapper, SysFileRef> implements SysFileRefService {
+
+}

+ 86 - 0
purchase-system/src/main/resources/mapper/base/BaseExpertMapper.xml

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ozs.base.mapper.BaseExpertMapper">
+    <resultMap type="com.ozs.base.domain.BaseExpert" id="BaseExpertResult">
+        <id property="id" column="id"/>
+        <result property="expertName" column="expert_name"/>
+        <result property="expertGender" column="expert_gender"/>
+        <result property="expertDateBirth" column="expert_date_birth"/>
+        <result property="expertTel" column="expert_tel"/>
+        <result property="majorType" column="major_type"/>
+        <result property="unitInformation" column="unit_information"/>
+        <result property="majorGrade" column="major_grade"/>
+        <result property="varietyPurchase" column="variety_purchase"/>
+        <result property="professionalTitle" column="professional_title"/>
+        <result property="status" column="status"/>
+    </resultMap>
+
+    <insert id="insertExpert" parameterType="com.ozs.base.domain.BaseExpert">
+        insert into base_expert (
+        <if test="expertName != null and expertName != '' ">
+            expert_name,
+        </if>
+        <if test="expertGender != null and expertGender != '' ">
+            expert_gender,
+        </if>
+        <if test="expertDateBirth != null and expertDateBirth != '' ">
+            expert_date_birth,
+        </if>
+        <if test="expertTel != null and expertTel != '' ">
+            expert_tel,
+        </if>
+        <if test="majorType != null and majorType != ''">
+            major_type,
+        </if>
+        <if test="unitInformation != null and unitInformation != ''">
+            unit_information,
+        </if>
+        <if test="majorGrade != null and majorGrade != '' ">
+            major_grade,
+        </if>
+        <if test="varietyPurchase != null and varietyPurchase != '' ">
+            variety_purchase,
+        </if>
+        <if test="professionalTitle != null and professionalTitle != ''">
+            professional_title,
+        </if>
+        <if test="status != null and status != ''">
+            status
+        </if>
+        ) values (
+        <if test="expertName != null and expertName != ''">
+            #{expertName},
+        </if>
+        <if test="expertGender != null and expertGender != ''">
+            #{expertGender},
+        </if>
+        <if test="expertDateBirth != null and expertDateBirth != ''">
+            #{expertDateBirth},
+        </if>
+        <if test="expertTel != null and expertTel != ''">
+            #{expertTel},
+        </if>
+        <if test="majorType != null and majorType != ''">
+            #{majorType},
+        </if>
+        <if test="unitInformation != null and unitInformation != ''">
+            #{unitInformation},
+        </if>
+        <if test="majorGrade != null and majorGrade != ''">
+            #{majorGrade},
+        </if>
+        <if test="varietyPurchase != null and varietyPurchase != ''">
+            #{varietyPurchase},
+        </if>
+        <if test="professionalTitle != null and professionalTitle != ''">
+            #{professionalTitle},
+        </if>
+        <if test="status != null and status != ''">
+            #{status}
+        </if>
+        )
+    </insert>
+
+</mapper>

+ 36 - 33
purchase-system/src/main/resources/mapper/plan/PlanYearsMapper.xml

@@ -6,7 +6,7 @@
 
 	<resultMap type="com.ozs.plan.doman.PlanYears" id="PlanYearsResult">
 		<id property="plan_year_id" column="planYearId"/>
-		<result property="purchase_unit" column="purchaseUnit"/>
+		<result property="purchase_dept_id" column="purchaseDeptId"/>
 		<result property="project_name" column="projectName"/>
 		<result property="project_type" column="projectType"/>
 		<result property="demand_overview" column="demandOverview"/>
@@ -14,36 +14,38 @@
 		<result property="is_excess" column="isExcess"/>
 		<result property="purchase_services" column="purchaseServices"/>
 		<result property="purchase_mode" column="purchaseMode"/>
-		<result property="demand_commit_time" column="demandCommitTime"/>
-		<result property="purchase_finish_time" column="purchaseFinishTime"/>
-		<result property="deliver_time" column="deliverTime"/>
-		<result property="project_attribute" column="projectAttribute"/>
-		<result property="readjust_of_plan" column="readjustOfPlan"/>
+		<result property="plan_demand_sub_time" column="planDemandSubTime"/>
+		<result property="plan_purchase_finish_time" column="planPurchaseFinishTime"/>
+		<result property="plan_deliver_time" column="planDeliverTime"/>
+		<result property="project_attr" column="projectAtt"/>
+		<result property="adjust_reason" column="adjustReason"/>
 		<result property="remarks" column="remarks"/>
 		<result property="project_status" column="projectStatus"/>
-		<result property="create_by" column="createBy"/>
+		<result property="created" column="created"/>
 		<result property="create_time" column="createTime"/>
-		<result property="reason_of_return" column="reasonOfReturn"/>
-		<result property="is_delete" column="isDelete"/>
+		<result property="updated" column="updated"/>
+		<result property="update_time" column="updateTime"/>
+		<result property="refuse_reason" column="refuseReason"/>
+		<result property="del_flay" column="delFlay"/>
 	</resultMap>
 
 	<update id="updateById" parameterType="com.ozs.plan.doman.PlanYears">
 		update plan_years
-		set purchase_unit=#{purchaseUnit},
-			project_name=#{projectName},
+		set project_name=#{projectName},
 			project_type=#{projectType},
 			demand_overview=#{demandOverview},
 			evaluation=#{evaluation},
 			is_excess=#{isExcess},
 			purchase_services=#{purchaseServices},
 			purchase_mode=#{purchaseMode},
-			demand_commit_time=#{demandCommitTime},
-			purchase_finish_time=#{purchaseFinishTime},
-			deliver_time=#{deliverTime},
-			project_attribute=#{projectAttribute},
-			readjust_of_plan=#{readjustOfPlan},
+			plan_demand_sub_time=#{planDemandSubTime},
+			plan_purchase_finish_time=#{planPurchaseFinishTime},
+			plan_deliver_time=#{planDeliverTime},
+			project_attr=#{projectAtt},
+			adjust_reason=#{adjustReason},
 			remarks=#{remarks},
-			project_status=#{projectStatus}
+			updated=#{updated},
+			update_time=#{updateTime}
 		where plan_year_id = #{planYearId}
 	</update>
 
@@ -63,12 +65,12 @@
 				AND project_status = #{projectStatus}
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(demand_commit_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+				and date_format(plan_demand_sub_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 			</if>
 			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				and date_format(demand_commit_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+				and date_format(plan_demand_sub_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 			</if>
-			and is_delete=0
+			and del_flay=0
 		</where>
 		order by create_time desc
 	</select>
@@ -77,14 +79,14 @@
 		select *
 		from plan_years
 		where project_name = #{projectName}
-		  and is_delete = 0
+		  and del_flay = 0
 	</select>
 
 	<select id="getById" resultType="com.ozs.plan.doman.PlanYears" parameterType="java.lang.Long">
 		select *
 		from plan_years
 		where plan_year_id = #{planYearId}
-		  and is_delete = 0
+		  and del_flay = 0
 	</select>
 
 	<select id="countProjectNameOther" resultType="java.lang.Integer" parameterType="java.lang.String">
@@ -92,23 +94,24 @@
 		from plan_years
 		where project_name = #{projectName}
 		  and plan_year_id != #{planYearId}
-		  and is_delete = 0
+		  and del_flay = 0
 	</select>
 
 	<!--	创建计划信息-->
 	<insert id="insertPlanYears" parameterType="com.ozs.plan.doman.PlanYears">
-		insert into plan_years (purchase_unit, project_name, project_type, demand_overview, evaluation, is_excess,
-								purchase_services, purchase_mode, demand_commit_time, purchase_finish_time,
-								deliver_time, project_attribute, readjust_of_plan, remarks, project_status,
-								create_by, create_time, is_delete)
-		values (#{purchaseUnit}, #{projectName}, #{projectType}, #{demandOverview}, #{evaluation}, #{isExcess},
-				#{purchaseServices}, #{purchaseMode}, #{demandCommitTime}, #{purchaseFinishTime}, #{deliverTime},
-				#{projectAttribute}, #{readjustOfPlan}, #{remarks}, #{projectStatus}, #{createBy}, #{createTime}, 0)
+		insert into plan_years (purchase_dept_id, project_name, project_type, demand_overview, evaluation, is_excess,
+								purchase_services, purchase_mode, plan_demand_sub_time, plan_purchase_finish_time,
+								plan_deliver_time, project_attr, adjust_reason, remarks, project_status,
+								created, create_time, del_flay)
+		values (#{purchaseDeptId}, #{projectName}, #{projectType}, #{demandOverview}, #{evaluation}, #{isExcess},
+				#{purchaseServices}, #{purchaseMode}, #{planDemandSubTime}, #{planPurchaseFinishTime},
+				#{planDeliverTime},
+				#{projectAtt}, #{adjustReason}, #{remarks}, #{projectStatus}, #{created}, #{createTime}, 0)
 	</insert>
 
 	<!--	计划删除-->
 	<update id="deletePlanYearsByIds" parameterType="java.lang.Long">
-		update plan_years set is_delete=1 where plan_year_id in
+		update plan_years set del_flay=1 where plan_year_id in
 		<foreach collection="array" item="item" open="(" separator="," close=")">
 			#{item}
 		</foreach>
@@ -116,7 +119,7 @@
 
 	<update id="deletePlanYearsById" parameterType="java.lang.Long">
 		update plan_years
-		set is_delete=1
+		set del_flay=1
 		where plan_year_id = #{plan_year_id}
 	</update>
 
@@ -130,7 +133,7 @@
 	<!--	计划审核-->
 	<update id="review" parameterType="com.ozs.plan.doman.PlanYears">
 		update plan_years
-		set reason_of_return=#{reasonOfReturn},
+		set refuse_reason=#{refuseReason},
 			project_status=#{projectStatus}
 		where plan_year_id = #{planYearId}
 	</update>

File diff suppressed because it is too large
+ 172 - 0
purchase-system/src/main/resources/mapper/pm/PmDemandEngineeringMapper.xml


+ 117 - 0
purchase-system/src/main/resources/mapper/pm/PmDemandEquipMapper.xml

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ozs.pm.mapper.PmDemandEquipMapper">
+    
+    <resultMap type="com.ozs.pm.doman.PmDemandEquip" id="PmDemandEquipResult">
+        <result property="demandEquipId"    column="demand_equip_id"    />
+        <result property="demandId"    column="demand_id"    />
+        <result property="typeAndName"    column="type_and_name"    />
+        <result property="specification"    column="specification"    />
+        <result property="qualityTechnicalStandard"    column="quality_technical_standard"    />
+        <result property="measurementUnit"    column="measurement_unit"    />
+        <result property="procurementQuantity"    column="procurement_quantity"    />
+        <result property="price"    column="price"    />
+        <result property="budgetAmount"    column="budget_amount"    />
+        <result property="demandCommitTime"    column="demand_commit_time"    />
+        <result property="procurementMethodSuggest"    column="procurement_method_suggest"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="projectFiles"    column="project_files"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectPmDemandEquipVo">
+        select demand_equip_id, demand_id, type_and_name, specification, quality_technical_standard, measurement_unit, procurement_quantity, price, budget_amount, demand_commit_time, procurement_method_suggest, remarks, project_files, create_by, create_time, update_by, update_time from pm_demand_equip
+    </sql>
+
+    <select id="selectPmDemandEquipList" parameterType="com.ozs.pm.doman.PmDemandEquip" resultMap="PmDemandEquipResult">
+        <include refid="selectPmDemandEquipVo"/>
+        <where>  
+            <if test="demandId != null "> and demand_id = #{demandId}</if>
+            <if test="typeAndName != null  and typeAndName != ''"> and type_and_name like concat('%', #{typeAndName}, '%')</if>
+            <if test="specification != null  and specification != ''"> and specification = #{specification}</if>
+            <if test="qualityTechnicalStandard != null  and qualityTechnicalStandard != ''"> and quality_technical_standard = #{qualityTechnicalStandard}</if>
+            <if test="measurementUnit != null  and measurementUnit != ''"> and measurement_unit = #{measurementUnit}</if>
+            <if test="procurementQuantity != null "> and procurement_quantity = #{procurementQuantity}</if>
+            <if test="price != null "> and price = #{price}</if>
+            <if test="budgetAmount != null "> and budget_amount = #{budgetAmount}</if>
+            <if test="demandCommitTime != null "> and demand_commit_time = #{demandCommitTime}</if>
+            <if test="procurementMethodSuggest != null  and procurementMethodSuggest != ''"> and procurement_method_suggest = #{procurementMethodSuggest}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="projectFiles != null  and projectFiles != ''"> and project_files = #{projectFiles}</if>
+        </where>
+    </select>
+    
+    <select id="selectPmDemandEquipByDemandEquipId" parameterType="Long" resultMap="PmDemandEquipResult">
+        <include refid="selectPmDemandEquipVo"/>
+        where demand_equip_id = #{demandEquipId}
+    </select>
+        
+    <insert id="insertPmDemandEquip" parameterType="com.ozs.pm.doman.PmDemandEquip" useGeneratedKeys="true" keyProperty="demandEquipId">
+        insert into pm_demand_equip
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="demandId != null">demand_id,</if>
+            <if test="typeAndName != null">type_and_name,</if>
+            <if test="specification != null">specification,</if>
+            <if test="qualityTechnicalStandard != null">quality_technical_standard,</if>
+            <if test="measurementUnit != null and measurementUnit != ''">measurement_unit,</if>
+            <if test="procurementQuantity != null">procurement_quantity,</if>
+            <if test="price != null">price,</if>
+            <if test="budgetAmount != null">budget_amount,</if>
+            <if test="demandCommitTime != null">demand_commit_time,</if>
+            <if test="procurementMethodSuggest != null">procurement_method_suggest,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="projectFiles != null">project_files,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="demandId != null">#{demandId},</if>
+            <if test="typeAndName != null">#{typeAndName},</if>
+            <if test="specification != null">#{specification},</if>
+            <if test="qualityTechnicalStandard != null">#{qualityTechnicalStandard},</if>
+            <if test="measurementUnit != null and measurementUnit != ''">#{measurementUnit},</if>
+            <if test="procurementQuantity != null">#{procurementQuantity},</if>
+            <if test="price != null">#{price},</if>
+            <if test="budgetAmount != null">#{budgetAmount},</if>
+            <if test="demandCommitTime != null">#{demandCommitTime},</if>
+            <if test="procurementMethodSuggest != null">#{procurementMethodSuggest},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="projectFiles != null">#{projectFiles},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePmDemandEquip" parameterType="com.ozs.pm.doman.PmDemandEquip">
+        update pm_demand_equip
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="demandId != null">demand_id = #{demandId},</if>
+            <if test="typeAndName != null">type_and_name = #{typeAndName},</if>
+            <if test="specification != null">specification = #{specification},</if>
+            <if test="qualityTechnicalStandard != null">quality_technical_standard = #{qualityTechnicalStandard},</if>
+            <if test="measurementUnit != null and measurementUnit != ''">measurement_unit = #{measurementUnit},</if>
+            <if test="procurementQuantity != null">procurement_quantity = #{procurementQuantity},</if>
+            <if test="price != null">price = #{price},</if>
+            <if test="budgetAmount != null">budget_amount = #{budgetAmount},</if>
+            <if test="demandCommitTime != null">demand_commit_time = #{demandCommitTime},</if>
+            <if test="procurementMethodSuggest != null">procurement_method_suggest = #{procurementMethodSuggest},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="projectFiles != null">project_files = #{projectFiles},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where demand_equip_id = #{demandEquipId}
+    </update>
+
+</mapper>

+ 186 - 0
purchase-system/src/main/resources/mapper/pm/PmDemandMapper.xml

@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ozs.pm.mapper.PmDemandMapper">
+    
+    <resultMap type="com.ozs.pm.doman.PmDemand" id="PmDemandResult">
+        <result property="demandId"    column="demand_id"    />
+        <result property="planId"    column="plan_id"    />
+        <result property="purchaseDeptId"    column="purchase_dept_id"    />
+        <result property="projectName"    column="project_name"    />
+        <result property="projectType"    column="project_type"    />
+        <result property="demandOverview"    column="demand_overview"    />
+        <result property="evaluation"    column="evaluation"    />
+        <result property="isExcess"    column="is_excess"    />
+        <result property="purchaseServices"    column="purchase_services"    />
+        <result property="purchaseMode"    column="purchase_mode"    />
+        <result property="planDemandSubTime"    column="plan_demand_sub_time"    />
+        <result property="planPurchaseFinishTime"    column="plan_purchase_finish_time"    />
+        <result property="planDeliverTime"    column="plan_deliver_time"    />
+        <result property="projectAttr"    column="project_attr"    />
+        <result property="adjustReason"    column="adjust_reason"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="realDemandCommitTime"    column="real_demand_commit_time"    />
+        <result property="realPurchaseFinishTime"    column="real_purchase_finish_time"    />
+        <result property="realDeliverTime"    column="real_deliver_time"    />
+        <result property="auditTime"    column="audit_time"    />
+        <result property="warnStatus"    column="warn_status"    />
+        <result property="projectStatus"    column="project_status"    />
+        <result property="refuseReason"    column="refuse_reason"    />
+        <result property="delayReason"    column="delay_reason"    />
+        <result property="adjustAdvice"    column="adjust_advice"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectPmDemandVo">
+        select demand_id, plan_id, purchase_dept_id, project_name, project_type, demand_overview, evaluation, is_excess, purchase_services, purchase_mode, plan_demand_sub_time, plan_purchase_finish_time, plan_deliver_time, project_attr, adjust_reason, remarks, real_demand_commit_time, real_purchase_finish_time, real_deliver_time, audit_time, warn_status, project_status, refuse_reason, delay_reason, adjust_advice, create_by, create_time, update_by, update_time from pm_demand
+    </sql>
+
+    <select id="selectPmDemandList" parameterType="com.ozs.pm.doman.PmDemand" resultMap="PmDemandResult">
+        <include refid="selectPmDemandVo"/>
+        <where>  
+            <if test="planId != null "> and plan_id = #{planId}</if>
+            <if test="purchaseDeptId != null "> and purchase_dept_id = #{purchaseDeptId}</if>
+            <if test="projectName != null  and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
+            <if test="projectType != null  and projectType != ''"> and project_type = #{projectType}</if>
+            <if test="demandOverview != null  and demandOverview != ''"> and demand_overview = #{demandOverview}</if>
+            <if test="evaluation != null "> and evaluation = #{evaluation}</if>
+            <if test="isExcess != null "> and is_excess = #{isExcess}</if>
+            <if test="purchaseServices != null  and purchaseServices != ''"> and purchase_services = #{purchaseServices}</if>
+            <if test="purchaseMode != null  and purchaseMode != ''"> and purchase_mode = #{purchaseMode}</if>
+            <if test="planDemandSubTime != null "> and plan_demand_sub_time = #{planDemandSubTime}</if>
+            <if test="planPurchaseFinishTime != null "> and plan_purchase_finish_time = #{planPurchaseFinishTime}</if>
+            <if test="planDeliverTime != null "> and plan_deliver_time = #{planDeliverTime}</if>
+            <if test="projectAttr != null  and projectAttr != ''"> and project_attr = #{projectAttr}</if>
+            <if test="adjustReason != null  and adjustReason != ''"> and adjust_reason = #{adjustReason}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="realDemandCommitTime != null "> and real_demand_commit_time = #{realDemandCommitTime}</if>
+            <if test="realPurchaseFinishTime != null "> and real_purchase_finish_time = #{realPurchaseFinishTime}</if>
+            <if test="realDeliverTime != null "> and real_deliver_time = #{realDeliverTime}</if>
+            <if test="auditTime != null "> and audit_time = #{auditTime}</if>
+            <if test="warnStatus != null  and warnStatus != ''"> and warn_status = #{warnStatus}</if>
+            <if test="projectStatus != null "> and project_status = #{projectStatus}</if>
+            <if test="refuseReason != null  and refuseReason != ''"> and refuse_reason = #{refuseReason}</if>
+            <if test="delayReason != null  and delayReason != ''"> and delay_reason = #{delayReason}</if>
+            <if test="adjustAdvice != null  and adjustAdvice != ''"> and adjust_advice = #{adjustAdvice}</if>
+            <if test="params.beginDate != null  and params.beginDate != ''">
+                and
+                (demand_commit_time >= #{params.beginDate} or purchase_finish_time >= #{params.beginDate} or deliver_time >= #{params.beginDate})
+            </if>
+            <if test="params.endDate != null  and params.endDate != ''">
+                and
+                (demand_commit_time &lt;= #{params.endDate} or purchase_finish_time &lt;= #{params.endDate} or deliver_time &lt;= #{params.endDate})
+            </if>
+            <if test="projectFiles != null  and projectFiles != ''"> and project_files = #{projectFiles}</if>
+        </where>
+    </select>
+    
+    <select id="selectPmDemandByDemandId" parameterType="Long" resultMap="PmDemandResult">
+        <include refid="selectPmDemandVo"/>
+        where demand_id = #{demandId}
+    </select>
+        
+    <insert id="insertPmDemand" parameterType="com.ozs.pm.doman.PmDemand" useGeneratedKeys="true" keyProperty="demandId">
+        insert into pm_demand
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="planId != null">plan_id,</if>
+            <if test="purchaseDeptId != null">purchase_dept_id,</if>
+            <if test="projectName != null and projectName != ''">project_name,</if>
+            <if test="projectType != null and projectType != ''">project_type,</if>
+            <if test="demandOverview != null">demand_overview,</if>
+            <if test="evaluation != null">evaluation,</if>
+            <if test="isExcess != null">is_excess,</if>
+            <if test="purchaseServices != null">purchase_services,</if>
+            <if test="purchaseMode != null and purchaseMode != ''">purchase_mode,</if>
+            <if test="planDemandSubTime != null">plan_demand_sub_time,</if>
+            <if test="planPurchaseFinishTime != null">plan_purchase_finish_time,</if>
+            <if test="planDeliverTime != null">plan_deliver_time,</if>
+            <if test="projectAttr != null and projectAttr != ''">project_attr,</if>
+            <if test="adjustReason != null">adjust_reason,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="realDemandCommitTime != null">real_demand_commit_time,</if>
+            <if test="realPurchaseFinishTime != null">real_purchase_finish_time,</if>
+            <if test="realDeliverTime != null">real_deliver_time,</if>
+            <if test="auditTime != null">audit_time,</if>
+            <if test="warnStatus != null">warn_status,</if>
+            <if test="projectStatus != null">project_status,</if>
+            <if test="refuseReason != null">refuse_reason,</if>
+            <if test="delayReason != null">delay_reason,</if>
+            <if test="adjustAdvice != null">adjust_advice,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="planId != null">#{planId},</if>
+            <if test="purchaseDeptId != null">#{purchaseDeptId},</if>
+            <if test="projectName != null and projectName != ''">#{projectName},</if>
+            <if test="projectType != null and projectType != ''">#{projectType},</if>
+            <if test="demandOverview != null">#{demandOverview},</if>
+            <if test="evaluation != null">#{evaluation},</if>
+            <if test="isExcess != null">#{isExcess},</if>
+            <if test="purchaseServices != null">#{purchaseServices},</if>
+            <if test="purchaseMode != null and purchaseMode != ''">#{purchaseMode},</if>
+            <if test="planDemandSubTime != null">#{planDemandSubTime},</if>
+            <if test="planPurchaseFinishTime != null">#{planPurchaseFinishTime},</if>
+            <if test="planDeliverTime != null">#{planDeliverTime},</if>
+            <if test="projectAttr != null and projectAttr != ''">#{projectAttr},</if>
+            <if test="adjustReason != null">#{adjustReason},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="realDemandCommitTime != null">#{realDemandCommitTime},</if>
+            <if test="realPurchaseFinishTime != null">#{realPurchaseFinishTime},</if>
+            <if test="realDeliverTime != null">#{realDeliverTime},</if>
+            <if test="auditTime != null">#{auditTime},</if>
+            <if test="warnStatus != null">#{warnStatus},</if>
+            <if test="projectStatus != null">#{projectStatus},</if>
+            <if test="refuseReason != null">#{refuseReason},</if>
+            <if test="delayReason != null">#{delayReason},</if>
+            <if test="adjustAdvice != null">#{adjustAdvice},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePmDemand" parameterType="com.ozs.pm.doman.PmDemand">
+        update pm_demand
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="planId != null">plan_id = #{planId},</if>
+            <if test="purchaseDeptId != null">purchase_dept_id = #{purchaseDeptId},</if>
+            <if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
+            <if test="projectType != null and projectType != ''">project_type = #{projectType},</if>
+            <if test="demandOverview != null">demand_overview = #{demandOverview},</if>
+            <if test="evaluation != null">evaluation = #{evaluation},</if>
+            <if test="isExcess != null">is_excess = #{isExcess},</if>
+            <if test="purchaseServices != null">purchase_services = #{purchaseServices},</if>
+            <if test="purchaseMode != null and purchaseMode != ''">purchase_mode = #{purchaseMode},</if>
+            <if test="planDemandSubTime != null">plan_demand_sub_time = #{planDemandSubTime},</if>
+            <if test="planPurchaseFinishTime != null">plan_purchase_finish_time = #{planPurchaseFinishTime},</if>
+            <if test="planDeliverTime != null">plan_deliver_time = #{planDeliverTime},</if>
+            <if test="projectAttr != null and projectAttr != ''">project_attr = #{projectAttr},</if>
+            <if test="adjustReason != null">adjust_reason = #{adjustReason},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="realDemandCommitTime != null">real_demand_commit_time = #{realDemandCommitTime},</if>
+            <if test="realPurchaseFinishTime != null">real_purchase_finish_time = #{realPurchaseFinishTime},</if>
+            <if test="realDeliverTime != null">real_deliver_time = #{realDeliverTime},</if>
+            <if test="auditTime != null">audit_time = #{auditTime},</if>
+            <if test="warnStatus != null">warn_status = #{warnStatus},</if>
+            <if test="projectStatus != null">project_status = #{projectStatus},</if>
+            <if test="refuseReason != null">refuse_reason = #{refuseReason},</if>
+            <if test="delayReason != null">delay_reason = #{delayReason},</if>
+            <if test="adjustAdvice != null">adjust_advice = #{adjustAdvice},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where demand_id = #{demandId}
+    </update>
+
+</mapper>

+ 118 - 0
purchase-system/src/main/resources/mapper/pm/PmDemandMaterialsMapper.xml

@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ozs.pm.mapper.PmDemandMaterialsMapper">
+    
+    <resultMap type="com.ozs.pm.doman.PmDemandMaterials" id="PmDemandMaterialsResult">
+        <result property="demandMaterialsId"    column="demand_materials_id"    />
+        <result property="demandId"    column="demand_id"    />
+        <result property="typeAndName"    column="type_and_name"    />
+        <result property="specification"    column="specification"    />
+        <result property="qualityTechnicalStandard"    column="quality_technical_standard"    />
+        <result property="measurementUnit"    column="measurement_unit"    />
+        <result property="procurementQuantity"    column="procurement_quantity"    />
+        <result property="price"    column="price"    />
+        <result property="budgetAmount"    column="budget_amount"    />
+        <result property="demandCommitTime"    column="demand_commit_time"    />
+        <result property="procurementMethodSuggest"    column="procurement_method_suggest"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="projectFiles"    column="project_files"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectPmDemandMaterialsVo">
+        select demand_materials_id, demand_id, type_and_name, specification, quality_technical_standard, measurement_unit, procurement_quantity, price, budget_amount, demand_commit_time, procurement_method_suggest, remarks, project_files, create_by, create_time, update_by, update_time from pm_demand_materials
+    </sql>
+
+    <select id="selectPmDemandMaterialsList" parameterType="com.ozs.pm.doman.PmDemandMaterials" resultMap="PmDemandMaterialsResult">
+        <include refid="selectPmDemandMaterialsVo"/>
+        <where>  
+            <if test="demandId != null "> and demand_id = #{demandId}</if>
+            <if test="typeAndName != null  and typeAndName != ''"> and type_and_name like concat('%', #{typeAndName}, '%')</if>
+            <if test="specification != null  and specification != ''"> and specification = #{specification}</if>
+            <if test="qualityTechnicalStandard != null  and qualityTechnicalStandard != ''"> and quality_technical_standard = #{qualityTechnicalStandard}</if>
+            <if test="measurementUnit != null  and measurementUnit != ''"> and measurement_unit = #{measurementUnit}</if>
+            <if test="procurementQuantity != null "> and procurement_quantity = #{procurementQuantity}</if>
+            <if test="price != null "> and price = #{price}</if>
+            <if test="budgetAmount != null "> and budget_amount = #{budgetAmount}</if>
+            <if test="demandCommitTime != null "> and demand_commit_time = #{demandCommitTime}</if>
+            <if test="procurementMethodSuggest != null  and procurementMethodSuggest != ''"> and procurement_method_suggest = #{procurementMethodSuggest}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="projectFiles != null  and projectFiles != ''"> and project_files = #{projectFiles}</if>
+
+        </where>
+    </select>
+    
+    <select id="selectPmDemandMaterialsByDemandMaterialsId" parameterType="Long" resultMap="PmDemandMaterialsResult">
+        <include refid="selectPmDemandMaterialsVo"/>
+        where demand_materials_id = #{demandMaterialsId}
+    </select>
+        
+    <insert id="insertPmDemandMaterials" parameterType="com.ozs.pm.doman.PmDemandMaterials" useGeneratedKeys="true" keyProperty="demandMaterialsId">
+        insert into pm_demand_materials
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="demandId != null">demand_id,</if>
+            <if test="typeAndName != null">type_and_name,</if>
+            <if test="specification != null">specification,</if>
+            <if test="qualityTechnicalStandard != null">quality_technical_standard,</if>
+            <if test="measurementUnit != null">measurement_unit,</if>
+            <if test="procurementQuantity != null">procurement_quantity,</if>
+            <if test="price != null">price,</if>
+            <if test="budgetAmount != null">budget_amount,</if>
+            <if test="demandCommitTime != null">demand_commit_time,</if>
+            <if test="procurementMethodSuggest != null">procurement_method_suggest,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="projectFiles != null">project_files,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="demandId != null">#{demandId},</if>
+            <if test="typeAndName != null">#{typeAndName},</if>
+            <if test="specification != null">#{specification},</if>
+            <if test="qualityTechnicalStandard != null">#{qualityTechnicalStandard},</if>
+            <if test="measurementUnit != null">#{measurementUnit},</if>
+            <if test="procurementQuantity != null">#{procurementQuantity},</if>
+            <if test="price != null">#{price},</if>
+            <if test="budgetAmount != null">#{budgetAmount},</if>
+            <if test="demandCommitTime != null">#{demandCommitTime},</if>
+            <if test="procurementMethodSuggest != null">#{procurementMethodSuggest},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="projectFiles != null">#{projectFiles},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePmDemandMaterials" parameterType="com.ozs.pm.doman.PmDemandMaterials">
+        update pm_demand_materials
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="demandId != null">demand_id = #{demandId},</if>
+            <if test="typeAndName != null">type_and_name = #{typeAndName},</if>
+            <if test="specification != null">specification = #{specification},</if>
+            <if test="qualityTechnicalStandard != null">quality_technical_standard = #{qualityTechnicalStandard},</if>
+            <if test="measurementUnit != null">measurement_unit = #{measurementUnit},</if>
+            <if test="procurementQuantity != null">procurement_quantity = #{procurementQuantity},</if>
+            <if test="price != null">price = #{price},</if>
+            <if test="budgetAmount != null">budget_amount = #{budgetAmount},</if>
+            <if test="demandCommitTime != null">demand_commit_time = #{demandCommitTime},</if>
+            <if test="procurementMethodSuggest != null">procurement_method_suggest = #{procurementMethodSuggest},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="projectFiles != null">project_files = #{projectFiles},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where demand_materials_id = #{demandMaterialsId}
+    </update>
+
+</mapper>

+ 117 - 0
purchase-system/src/main/resources/mapper/pm/PmDemandServeMapper.xml

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ozs.pm.mapper.PmDemandServeMapper">
+    
+    <resultMap type="com.ozs.pm.doman.PmDemandServe" id="PmDemandServeResult">
+        <result property="demandServeId"    column="demand_serve_id"    />
+        <result property="demandId"    column="demand_id"    />
+        <result property="serviceName"    column="service_name"    />
+        <result property="technicalServiceRequirement"    column="technical_service_requirement"    />
+        <result property="measurementUnit"    column="measurement_unit"    />
+        <result property="procurementQuantity"    column="procurement_quantity"    />
+        <result property="price"    column="price"    />
+        <result property="budgetAmount"    column="budget_amount"    />
+        <result property="deliveryTimeLimit"    column="delivery_time_limit"    />
+        <result property="procurementMethodSuggest"    column="procurement_method_suggest"    />
+        <result property="supplierId"    column="supplier_id"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="projectFiles"    column="project_files"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectPmDemandServeVo">
+        select demand_serve_id, demand_id, service_name, technical_service_requirement, measurement_unit, procurement_quantity, price, budget_amount, delivery_time_limit, procurement_method_suggest, supplier_id, remarks, project_files, create_by, create_time, update_by, update_time from pm_demand_serve
+    </sql>
+
+    <select id="selectPmDemandServeList" parameterType="com.ozs.pm.doman.PmDemandServe" resultMap="PmDemandServeResult">
+        <include refid="selectPmDemandServeVo"/>
+        <where>  
+            <if test="demandId != null "> and demand_id = #{demandId}</if>
+            <if test="serviceName != null  and serviceName != ''"> and service_name like concat('%', #{serviceName}, '%')</if>
+            <if test="technicalServiceRequirement != null  and technicalServiceRequirement != ''"> and technical_service_requirement = #{technicalServiceRequirement}</if>
+            <if test="measurementUnit != null  and measurementUnit != ''"> and measurement_unit = #{measurementUnit}</if>
+            <if test="procurementQuantity != null "> and procurement_quantity = #{procurementQuantity}</if>
+            <if test="price != null "> and price = #{price}</if>
+            <if test="budgetAmount != null "> and budget_amount = #{budgetAmount}</if>
+            <if test="deliveryTimeLimit != null  and deliveryTimeLimit != ''"> and delivery_time_limit = #{deliveryTimeLimit}</if>
+            <if test="procurementMethodSuggest != null  and procurementMethodSuggest != ''"> and procurement_method_suggest = #{procurementMethodSuggest}</if>
+            <if test="supplierId != null "> and supplier_id = #{supplierId}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="projectFiles != null  and projectFiles != ''"> and project_files = #{projectFiles}</if>
+        </where>
+    </select>
+    
+    <select id="selectPmDemandServeByDemandServeId" parameterType="Long" resultMap="PmDemandServeResult">
+        <include refid="selectPmDemandServeVo"/>
+        where demand_serve_id = #{demandServeId}
+    </select>
+        
+    <insert id="insertPmDemandServe" parameterType="com.ozs.pm.doman.PmDemandServe" useGeneratedKeys="true" keyProperty="demandServeId">
+        insert into pm_demand_serve
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="demandId != null">demand_id,</if>
+            <if test="serviceName != null">service_name,</if>
+            <if test="technicalServiceRequirement != null">technical_service_requirement,</if>
+            <if test="measurementUnit != null">measurement_unit,</if>
+            <if test="procurementQuantity != null">procurement_quantity,</if>
+            <if test="price != null">price,</if>
+            <if test="budgetAmount != null">budget_amount,</if>
+            <if test="deliveryTimeLimit != null">delivery_time_limit,</if>
+            <if test="procurementMethodSuggest != null">procurement_method_suggest,</if>
+            <if test="supplierId != null">supplier_id,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="projectFiles != null">project_files,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="demandId != null">#{demandId},</if>
+            <if test="serviceName != null">#{serviceName},</if>
+            <if test="technicalServiceRequirement != null">#{technicalServiceRequirement},</if>
+            <if test="measurementUnit != null">#{measurementUnit},</if>
+            <if test="procurementQuantity != null">#{procurementQuantity},</if>
+            <if test="price != null">#{price},</if>
+            <if test="budgetAmount != null">#{budgetAmount},</if>
+            <if test="deliveryTimeLimit != null">#{deliveryTimeLimit},</if>
+            <if test="procurementMethodSuggest != null">#{procurementMethodSuggest},</if>
+            <if test="supplierId != null">#{supplierId},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="projectFiles != null">#{projectFiles},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePmDemandServe" parameterType="com.ozs.pm.doman.PmDemandServe">
+        update pm_demand_serve
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="demandId != null">demand_id = #{demandId},</if>
+            <if test="serviceName != null">service_name = #{serviceName},</if>
+            <if test="technicalServiceRequirement != null">technical_service_requirement = #{technicalServiceRequirement},</if>
+            <if test="measurementUnit != null">measurement_unit = #{measurementUnit},</if>
+            <if test="procurementQuantity != null">procurement_quantity = #{procurementQuantity},</if>
+            <if test="price != null">price = #{price},</if>
+            <if test="budgetAmount != null">budget_amount = #{budgetAmount},</if>
+            <if test="deliveryTimeLimit != null">delivery_time_limit = #{deliveryTimeLimit},</if>
+            <if test="procurementMethodSuggest != null">procurement_method_suggest = #{procurementMethodSuggest},</if>
+            <if test="supplierId != null">supplier_id = #{supplierId},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="projectFiles != null">project_files = #{projectFiles},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where demand_serve_id = #{demandServeId}
+    </update>
+
+</mapper>