Browse Source

年度计划提交审核

buzhanyi 2 năm trước cách đây
mục cha
commit
d8efd731fb

+ 31 - 7
purchase-admin/src/main/java/com/ozs/web/controller/plan/PlanOfYearsController.java

@@ -2,12 +2,13 @@ package com.ozs.web.controller.plan;
 
 import com.ozs.common.core.controller.BaseController;
 import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.common.core.domain.entity.SysUser;
 import com.ozs.common.core.domain.model.LoginUser;
 import com.ozs.common.core.page.TableDataInfo;
+import com.ozs.common.utils.poi.ExcelUtil;
 import com.ozs.framework.web.service.TokenService;
 import com.ozs.plan.doman.PlanOfYears;
 import com.ozs.plan.doman.vo.requestVo.PlanOfYearsStandardVo;
-import com.ozs.plan.doman.vo.responseVo.PlanOfYearsResponseVo;
 import com.ozs.plan.service.PlanOfYearsService;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.List;
@@ -56,23 +58,45 @@ public class PlanOfYearsController extends BaseController {
         return planOfYearsService.update(yearsStandardVo);
     }
 
+    @ApiOperation(value = "提交年度计划")
+    @PostMapping("/commit")
+    public AjaxResult commit(@RequestBody PlanOfYearsStandardVo yearsStandardVo) {
+        return planOfYearsService.commit(yearsStandardVo);
+    }
+
     @ApiOperation(value = "删除年度计划")
     @PostMapping("/delete")
     public AjaxResult delete(@RequestBody PlanOfYearsStandardVo yearsStandardVo) {
         return planOfYearsService.deletePlanOfYearsById(yearsStandardVo.getPlanYearId());
     }
 
-    //@ApiOperation(value = "删除年度计划")
-    //@PostMapping("/delete")
-    //public AjaxResult delete(@RequestBody Long[] planIds) {
-    //    return planOfYearsService.deletePlanOfYearsByIds(planIds);
-    //}
-
     @ApiOperation(value = "根据id获取年度计划信息")
     @PostMapping("/view")
     public AjaxResult view(@RequestBody PlanOfYearsStandardVo yearsStandardVo) {
         return planOfYearsService.view(yearsStandardVo);
     }
 
+    @ApiOperation(value = "审核年度计划通过")
+    @PostMapping("/reviewTo")
+    public AjaxResult reviewTo(@RequestBody PlanOfYearsStandardVo yearsStandardVo) {
+        return planOfYearsService.reviewTo(yearsStandardVo);
+    }
+
+    @ApiOperation(value = "审核年度计划退回")
+    @PostMapping("/reviewReturn")
+    public AjaxResult reviewReturn(@RequestBody PlanOfYearsStandardVo yearsStandardVo) {
+        return planOfYearsService.reviewReturn(yearsStandardVo);
+    }
+
+    @ApiOperation(value = "导入年度计划数据")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
+        ExcelUtil<PlanOfYears> util = new ExcelUtil<>(PlanOfYears.class);
+        List<PlanOfYears> planOfYears = util.importExcel(file.getInputStream());
+        String operName = getUsername();
+        String message = planOfYearsService.importPlanOfYears(planOfYears, updateSupport, operName);
+        return success(message);
+    }
+
 
 }

+ 22 - 4
purchase-system/src/main/java/com/ozs/plan/doman/PlanOfYears.java

@@ -2,6 +2,7 @@ package com.ozs.plan.doman;
 
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ozs.common.annotation.Excel;
 import com.ozs.common.core.domain.BaseEntity;
 import lombok.Data;
 
@@ -23,83 +24,100 @@ public class PlanOfYears extends BaseEntity {
      * 采购单位(登录账号的单位)
      */
     @NotNull(message = "采购单位不能为空")
+    @Excel(name = "采购单位")
     private Long purchaseUnit;
     /**
      * 项目名称
      */
+    @Excel(name = "项目名称")
     @NotNull(message = "项目名称不能为空")
     private String projectName;
     /**
-     * 项目类型(1:装备类;2:物资类;3:服务类;
+     * 项目类型(0:装备类;1:物资类;2:服务类;3:工程类
      */
+    @Excel(name = "项目类型")
     @NotNull(message = "项目类型不能为空")
     private String projectType;
     /**
      * 需求概况
      */
+    @Excel(name = "需求概况")
     @NotNull(message = "需求概况不能为空")
     private String demandOverview;
     /**
      * 概算金额(万元(保留小数点后两位)
      */
+    @Excel(name = "概算金额")
     @NotNull(message = "概算金额不能为空")
     private BigDecimal evaluation;
     /**
-     * 是否为超限额计划()
+     * 是否为超限额计划(0:未超额,1:超额)
      */
+    @Excel(name = "是否为超限额计划")
     @NotNull(message = "是否为超限额计划不能为空")
     private String isExcess;
     /**
      * 采购服务站
      */
+    @Excel(name = "采购服务站")
     @NotNull(message = "采购服务站不能为空")
     private String purchaseServices;
     /**
-     * 采购方式
+     * 采购方式 (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价)
      */
+    @Excel(name = "采购方式")
     @NotNull(message = "采购方式不能为空")
     private String purchaseMode;
     /**
      * 计划提报需求时间--->需求单位成功提报采购需求的日期(具体到月)
      */
+    @Excel(name = "计划提报需求时间")
     @NotNull(message = "计划提报需求时间不能为空")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date demandCommitTime;
     /**
      * 计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到月)
      */
+    @Excel(name = "计划完成采购时间")
     @NotNull(message = "计划完成采购时间不能为空")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date purchaseFinishTime;
     /**
      * 计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期
      */
+    @Excel(name = "计划交付时间")
     @NotNull(message = "计划交付时间不能为空")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date deliverTime;
     /**
      * 项目属性--->应急应战项目、重大规划任务项目、规划任务项目或一般项目
      */
+    @Excel(name = "项目属性")
     @NotNull(message = "项目属性不能为空")
     private String projectAttribute;
     /**
      * 计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示
      */
+    @Excel(name = "计划调整情况及理由")
     @NotNull(message = "计划调整情况及理由不能为空")
     private String readjustOfPlan;
     /**
      * 备注
      */
+    @Excel(name = "备注")
     private String remarks;
 
     /**
      * 项目状态--->包括计划待提交、计划待审核、计划已退回、计划已审核
+     * (0:计划待提交,1:计划待审核,2:计划已退回,3:计划已审核)
      */
+    @Excel(name = "项目状态")
     private String projectStatus;
     /**
      * 退回原因--->审核不通过就是退回
      */
-    private String reason_of_return;
+    @Excel(name = "退回原因")
+    private String reasonOfReturn;
     /**
      * 创建者
      */

+ 21 - 5
purchase-system/src/main/java/com/ozs/plan/doman/vo/requestVo/PlanOfYearsStandardVo.java

@@ -6,8 +6,6 @@ import com.ozs.common.core.domain.BaseEntity;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -34,6 +32,7 @@ public class PlanOfYearsStandardVo extends BaseEntity {
      */
     @ApiModelProperty(value = "项目名称")
     private String projectName;
+
     /**
      * 项目类型(1:装备类;2:物资类;3:服务类;)
      */
@@ -45,59 +44,76 @@ public class PlanOfYearsStandardVo extends BaseEntity {
      */
     @ApiModelProperty(value = "需求概况")
     private String demandOverview;
+
     /**
      * 概算金额(万元(保留小数点后两位)
      */
     @ApiModelProperty(value = "概算金额")
     private BigDecimal evaluation;
+
     /**
      * 是否为超限额计划(0:未超额,1:超额)
      */
     @ApiModelProperty(value = "是否为超限额计划(0:未超额,1:超额)")
     private String isExcess;
+
     /**
      * 采购服务站
      */
     @ApiModelProperty(value = "采购服务站")
     private String purchaseServices;
+
     /**
-     * 采购方式
+     * 采购方式 (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价)
      */
-    @ApiModelProperty(value = "采购方式")
+    @ApiModelProperty(value = "采购方式 (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价)")
     private String purchaseMode;
+
     /**
      * 计划提报需求时间--->需求单位成功提报采购需求的日期(具体到月)
      */
     @ApiModelProperty(value = "计划提报需求时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date demandCommitTime;
+
     /**
      * 计划完成采购时间--->公示中标结果的日期,即填制中标信息的日期(具体到月)
      */
     @ApiModelProperty(value = "计划完成采购时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date purchaseFinishTime;
+
     /**
      * 计划交付时间--->供应商完成并交付后,使用单位收到标的日期,即填制建设文档的日期
      */
     @ApiModelProperty(value = "计划交付时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date deliverTime;
+
     /**
      * 项目属性--->应急应战项目、重大规划任务项目、规划任务项目或一般项目
      */
     @ApiModelProperty(value = "项目属性")
     private String projectAttribute;
+
     /**
      * 项目状态--->包括计划待提交、计划待审核、计划已退回、计划已审核
      */
-    @ApiModelProperty(value = "项目状态")
+    @ApiModelProperty(value = "项目状态(0:计划待提交,1:计划待审核,2:计划已退回,3:计划已审核)")
     private String projectStatus;
+
     /**
      * 备注
      */
     @ApiModelProperty(value = "备注")
     private String remarks;
+
+    /**
+     * 退回原因--->审核不通过就是退回
+     */
+    @ApiModelProperty(value = "退回原因")
+    private String reasonOfReturn;
+
     /**
      * 创建者
      */

+ 8 - 24
purchase-system/src/main/java/com/ozs/plan/doman/vo/responseVo/PlanOfYearsResponseVo.java

@@ -29,6 +29,11 @@ public class PlanOfYearsResponseVo {
      */
     @Excel(name = "项目名称")
     private String projectName;
+    /**
+     * 项目名称
+     */
+    @Excel(name = "项目类型")
+    private String projectType;
     /**
      * 需求概况
      */
@@ -40,7 +45,7 @@ public class PlanOfYearsResponseVo {
     @Excel(name = "概算金额")
     private BigDecimal evaluation;
     /**
-     * 是否为超限额计划
+     * 是否为超限额计划(0:未超额,1:超额)
      */
     @Excel(name = "是否为超限额计划")
     private String isExcess;
@@ -50,7 +55,7 @@ public class PlanOfYearsResponseVo {
     @Excel(name = "采购服务站")
     private String purchaseServices;
     /**
-     * 采购方式
+     * 采购方式 (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价)
      */
     @Excel(name = "采购方式")
     private String purchaseMode;
@@ -89,30 +94,9 @@ public class PlanOfYearsResponseVo {
     private String remarks;
     /**
      * 项目状态--->包括计划待提交、计划待审核、计划已退回、计划已审核
+     * (0:计划待提交,1:计划待审核,2:计划已退回,3:计划已审核)
      */
     @Excel(name = "项目状态")
     private String projectStatus;
 
-
-    @Override
-    public String toString() {
-        return "PlanOfYears{" +
-                "planYearId=" + planYearId +
-                ", purchaseUnit=" + purchaseUnit +
-                ", projectName='" + projectName + '\'' +
-                ", demandOverview='" + demandOverview + '\'' +
-                ", evaluation=" + evaluation +
-                ", isExcess=" + isExcess +
-                ", purchaseServices=" + purchaseServices +
-                ", purchaseMode=" + purchaseMode +
-                ", demandCommitTime=" + demandCommitTime +
-                ", purchaseFinishTime=" + purchaseFinishTime +
-                ", deliverTime=" + deliverTime +
-                ", projectAttribute=" + projectAttribute +
-                ", readjustOfPlan='" + readjustOfPlan + '\'' +
-                ", remarks='" + remarks + '\'' +
-                ", projectStatus='" + projectStatus +
-
-                '}';
-    }
 }

+ 18 - 3
purchase-system/src/main/java/com/ozs/plan/mapper/PlanOfYearsMapper.java

@@ -45,9 +45,15 @@ public interface PlanOfYearsMapper {
      * @param projectName 项目名称
      * @return 结果
      */
-    public int countProjectName(String projectName);
+    public List<PlanOfYears> countProjectName(String projectName);
 
-    PlanOfYears getById(Long planYearId);
+    /**
+     * 查询年度计划
+     *
+     * @param planYearId 年度计划ID
+     * @return 结果
+     */
+    public PlanOfYears getById(Long planYearId);
 
     /**
      * 查询项目名称是否存在(除自己以外)
@@ -57,8 +63,17 @@ public interface PlanOfYearsMapper {
      */
     public int countProjectNameOther(@Param("projectName") String projectName, @Param("planYearId") String planYearId);
 
+    /**
+     * 修改年度计划
+     *
+     * @param ofYears 年度计划
+     * @return 结果
+     */
     public int updateById(PlanOfYears ofYears);
 
-
     public int deletePlanOfYearsById(Long planId);
+
+    public int commit(Long planYearId);
+
+    public int review(PlanOfYears ofYears);
 }

+ 49 - 0
purchase-system/src/main/java/com/ozs/plan/service/PlanOfYearsService.java

@@ -38,9 +38,58 @@ public interface PlanOfYearsService {
      */
     public AjaxResult deletePlanOfYearsByIds(Long[] planIds);
 
+    /**
+     * 批量删除年度计划
+     *
+     * @param planYearId 需要删除的年度计划ID
+     * @return 结果
+     */
     public AjaxResult deletePlanOfYearsById(Long planYearId);
 
+    /**
+     * 根据id获取年度计划信息
+     *
+     * @param yearsStandardVo 年度计划请求对象
+     * @return 结果
+     */
     public AjaxResult view(PlanOfYearsStandardVo yearsStandardVo);
 
+    /**
+     * 修改年度计划
+     *
+     * @param yearsStandardVo 修改年度计划请求对象
+     * @return 结果
+     */
     public AjaxResult update(PlanOfYearsStandardVo yearsStandardVo);
+
+    /**
+     * 导入年度计划数据
+     *
+     * @return 结果
+     */
+    public String importPlanOfYears(List<PlanOfYears> planOfYears, boolean isUpdateSupport, String operName);
+
+    /**
+     * 提交年度计划
+     *
+     * @param yearsStandardVo 提交年度计划请求对象
+     * @return 结果
+     */
+    public AjaxResult commit(PlanOfYearsStandardVo yearsStandardVo);
+
+    /**
+     * 审核年度计划
+     *
+     * @param yearsStandardVo 需要审核的年度计划
+     * @return 结果
+     */
+    public AjaxResult reviewTo(PlanOfYearsStandardVo yearsStandardVo);
+
+    /**
+     * 审核年度计划退回
+     *
+     * @param yearsStandardVo 需要审核的年度计划
+     * @return 结果
+     */
+    public AjaxResult reviewReturn(PlanOfYearsStandardVo yearsStandardVo);
 }

+ 94 - 2
purchase-system/src/main/java/com/ozs/plan/service/impl/PlanOfYearsServiceImpl.java

@@ -2,15 +2,22 @@ package com.ozs.plan.service.impl;
 
 import com.ozs.common.core.domain.AjaxResult;
 import com.ozs.common.enums.ProjectStatus;
+import com.ozs.common.exception.ServiceException;
+import com.ozs.common.utils.StringUtils;
 import com.ozs.common.utils.bean.BeanUtils;
+import com.ozs.common.utils.bean.BeanValidators;
 import com.ozs.plan.doman.PlanOfYears;
 import com.ozs.plan.doman.vo.requestVo.PlanOfYearsStandardVo;
 import com.ozs.plan.doman.vo.responseVo.PlanOfYearsResponseVo;
 import com.ozs.plan.mapper.PlanOfYearsMapper;
 import com.ozs.plan.service.PlanOfYearsService;
+import com.ozs.system.service.impl.SysUserServiceImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.validation.Validator;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -20,9 +27,12 @@ import java.util.List;
  */
 @Service
 public class PlanOfYearsServiceImpl implements PlanOfYearsService {
+    private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
 
     @Autowired
     PlanOfYearsMapper planOfYearsMapper;
+    @Autowired
+    protected Validator validator;
 
     @Override
     public List<PlanOfYears> selectPlanOfYearsList(PlanOfYearsStandardVo vo) {
@@ -39,7 +49,7 @@ public class PlanOfYearsServiceImpl implements PlanOfYearsService {
 
     @Override
     public AjaxResult insertPlanOfYears(PlanOfYearsStandardVo yearsStandardVo) {
-        if (planOfYearsMapper.countProjectName(yearsStandardVo.getProjectName()) > 0) {
+        if (planOfYearsMapper.countProjectName(yearsStandardVo.getProjectName()).size() > 0) {
             return AjaxResult.error("该项目名称已经存在");
         }
         PlanOfYears ofYears = new PlanOfYears();
@@ -70,11 +80,13 @@ public class PlanOfYearsServiceImpl implements PlanOfYearsService {
 
     @Override
     public AjaxResult view(PlanOfYearsStandardVo yearsStandardVo) {
+        PlanOfYearsResponseVo planOfYearsResponseVo = new PlanOfYearsResponseVo();
         PlanOfYears byId = planOfYearsMapper.getById(yearsStandardVo.getPlanYearId());
         if (byId == null) {
             return AjaxResult.error("数据查询失败");
         }
-        return AjaxResult.success(byId);
+        BeanUtils.copyProperties(byId, planOfYearsResponseVo);
+        return AjaxResult.success(planOfYearsResponseVo);
     }
 
     @Override
@@ -92,4 +104,84 @@ public class PlanOfYearsServiceImpl implements PlanOfYearsService {
         return AjaxResult.success();
     }
 
+    @Override
+    public String importPlanOfYears(List<PlanOfYears> planOfYears, boolean isUpdateSupport, String operName) {
+        if (StringUtils.isNull(planOfYears) || planOfYears.size() == 0) {
+            throw new ServiceException("导入年度计划数据不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        for (PlanOfYears ofYear : planOfYears) {
+            try {
+                //验证项目名称是否重复导入
+                List<PlanOfYears> plan = planOfYearsMapper.countProjectName(ofYear.getProjectName());
+                if (plan.size() == 0) {
+                    planOfYearsMapper.insertPlanOfYears(ofYear);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、项目 " + ofYear.getProjectName() + " 导入成功");
+                } else if (isUpdateSupport) {
+                    PlanOfYears years = plan.get(0);
+                    BeanValidators.validateWithException(validator, ofYear);
+                    years.setCreateBy(operName);
+                    years.setCreateTime(new Date());
+                    years.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
+                    planOfYearsMapper.updateById(years);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、项目 " + ofYear.getProjectName() + " 更新成功");
+                } else {
+                    failureNum++;
+                    successMsg.append("<br/>" + successNum + "、项目 " + ofYear.getProjectName() + " 已存在");
+                }
+            } catch (Exception exc) {
+                failureNum++;
+                String msg = "<br/>" + successNum + "、项目 " + ofYear.getProjectName() + " 导入失败";
+                failureMsg.append(msg + exc.getMessage());
+                log.error(msg, exc);
+            }
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        } else {
+            successMsg.insert(0, "导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        return successMsg.toString();
+    }
+
+    @Override
+    public AjaxResult commit(PlanOfYearsStandardVo yearsStandardVo) {
+
+        int commit = planOfYearsMapper.commit(yearsStandardVo.getPlanYearId());
+        if (commit != 1) {
+            return AjaxResult.error("项目状态数据异常");
+        }
+        return AjaxResult.success();
+    }
+
+    @Override
+    public AjaxResult reviewTo(PlanOfYearsStandardVo vo) {
+        PlanOfYears ofYears = new PlanOfYears();
+        ofYears.setPlanYearId(vo.getPlanYearId());
+        ofYears.setProjectStatus(ProjectStatus.PLANTOEXAMINE.getCode());
+        int review = planOfYearsMapper.review(ofYears);
+        if (review != 1) {
+            return AjaxResult.error("项目状态数据异常");
+        }
+        return AjaxResult.success();
+    }
+
+    @Override
+    public AjaxResult reviewReturn(PlanOfYearsStandardVo vo) {
+        PlanOfYears ofYears = new PlanOfYears();
+        BeanUtils.copyProperties(vo, ofYears);
+        ofYears.setProjectStatus(ProjectStatus.PLANTOBACK.getCode());
+        int review = planOfYearsMapper.review(ofYears);
+        if (review != 1) {
+            return AjaxResult.error("项目状态数据异常");
+        }
+        return AjaxResult.success();
+    }
+
 }

+ 25 - 6
purchase-system/src/main/resources/mapper/plan/PlanOfYearsMapper.xml

@@ -23,6 +23,7 @@
 		<result property="project_status" column="projectStatus"/>
 		<result property="create_by" column="createBy"/>
 		<result property="create_time" column="createTime"/>
+		<result property="reason_of_return" column="reasonOfReturn"/>
 		<result property="is_delete" column="isDelete"/>
 	</resultMap>
 
@@ -56,7 +57,7 @@
 				AND purchase_services = #{purchaseServices}
 			</if>
 			<if test="isExcess != null and isExcess != ''">
-				AND is_excess like = #{isExcess}
+				AND is_excess = #{isExcess}
 			</if>
 			<if test="projectStatus != null and projectStatus != ''">
 				AND project_status = #{projectStatus}
@@ -67,20 +68,23 @@
 			<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')
 			</if>
+			and is_delete=0
 		</where>
 		order by create_time desc
 	</select>
 
-	<select id="countProjectName" resultType="java.lang.Integer" parameterType="java.lang.String">
-		select count(plan_of_years.plan_year_id)
+	<select id="countProjectName" resultType="com.ozs.plan.doman.PlanOfYears" parameterType="java.lang.String">
+		select *
 		from plan_of_years
 		where project_name = #{projectName}
+		  and is_delete = 0
 	</select>
 
 	<select id="getById" resultType="com.ozs.plan.doman.PlanOfYears" parameterType="java.lang.Long">
 		select *
 		from plan_of_years
 		where plan_year_id = #{planYearId}
+		  and is_delete = 0
 	</select>
 
 	<select id="countProjectNameOther" resultType="java.lang.Integer" parameterType="java.lang.String">
@@ -88,8 +92,10 @@
 		from plan_of_years
 		where project_name = #{projectName}
 		  and plan_year_id != #{planYearId}
+		  and is_delete = 0
 	</select>
 
+	<!--	创建计划信息-->
 	<insert id="insertPlanOfYears" parameterType="com.ozs.plan.doman.PlanOfYears">
 		insert into plan_of_years (purchase_unit, project_name, project_type, demand_overview, evaluation, is_excess,
 								   purchase_services, purchase_mode, demand_commit_time, purchase_finish_time,
@@ -100,6 +106,7 @@
 				#{projectAttribute}, #{readjustOfPlan}, #{remarks}, #{projectStatus}, #{createBy}, #{createTime}, 0)
 	</insert>
 
+	<!--	计划删除-->
 	<update id="deletePlanOfYearsByIds" parameterType="java.lang.Long">
 		update plan_of_years set is_delete=1 where plan_year_id in
 		<foreach collection="array" item="item" open="(" separator="," close=")">
@@ -113,8 +120,20 @@
 		where plan_year_id = #{plan_year_id}
 	</update>
 
-	<!--    <update id="cleanLogininfor">-->
-	<!--        truncate table sys_logininfor-->
-	<!--    </update>-->
+	<!--	计划提交-->
+	<update id="commit" parameterType="java.lang.Long">
+		update plan_of_years
+		set project_status=1
+		where plan_year_id = #{plan_year_id}
+	</update>
+
+	<!--	计划审核-->
+	<update id="review" parameterType="com.ozs.plan.doman.PlanOfYears">
+		update plan_of_years
+		set reason_of_return=#{reasonOfReturn},
+			project_status=#{projectStatus}
+		where plan_year_id = #{planYearId}
+	</update>
+
 
 </mapper>