Browse Source

项目管理

suntianwu 2 years ago
parent
commit
d9509bba93

+ 10 - 2
purchase-admin/src/main/java/com/ozs/web/controller/pm/PmDemandController.java

@@ -66,14 +66,22 @@ public class PmDemandController extends BaseController {
     }
 
     /**
-     * 查看流程图
+     * 查看流程图,获取当前阶段名字
      */
-    @ApiOperation(value = "查看流程图", notes = "必传demandId,其他字段不传")
+    @ApiOperation(value = "查看流程图,获取当前阶段名字", notes = "必传demandId,其他字段不传")
     @PostMapping("/viewFlowChart")
     public AjaxResult viewFlowChart(@RequestBody PmDemandReqVo pmRequestVo) {
         return success(pmDemandService.viewFlowChart(pmRequestVo.getDemandId()));
     }
 
+    /**
+     * 查看流程图,鼠标移到对应模块后,显示悬浮框提示
+     */
+    @ApiOperation(value = "查看流程图,鼠标移到对应模块后,显示悬浮框提示", notes = "必传demandId,模块名称,其他字段不传")
+    @PostMapping("/getModuleInfo")
+    public AjaxResult getModuleInfo(@RequestBody PmDemandReqVo pmRequestVo) {
+        return success(pmDemandService.getModuleInfo(pmRequestVo.getDemandId(),pmRequestVo.getModuleName()));
+    }
 
     @ApiOperation(value = "提交采购需求", notes = "必传demandId,其他字段不传")
     @PostMapping("/commit")

+ 5 - 7
purchase-common/src/main/java/com/ozs/common/enums/PmProjectStatus.java

@@ -9,14 +9,12 @@ public enum PmProjectStatus {
     DEMAND_WAIT_FILL("4", "需求待填制"),
     DEMAND_WAIT_COMMIT("5", "需求待提交"),
     DEMAND_WAIT_AUDIT("6", "需求待审核"),
-    TASK_WAIT_RELEASE("7", "任务待下达"),
-    TASK_RELEASED("8", "任务已下达"),
+    DEMAND_AUDIT_RETURN("7", "需求已退回"),
+    TASK_WAIT_RELEASE("8", "任务待下达"),
     BID_INFO_WAIT_FILL("9", "中标信息待填制"),
-    BID_INFO_FILLED("10", "中标信息已填制"),
-    CONTRACT_WAIT_FILL("11", "合同待填制"),
-    CONTRACT_FILLED("12", "合同已填制"),
-    UNDER_CONSTRUCTION("13", "项目建设中"),
-    COMPLETION_CONSTRUCTION("14", "项目建设完成");
+    CONTRACT_WAIT_FILL("10", "合同待填制"),
+    UNDER_CONSTRUCTION("11", "项目建设中"),
+    COMPLETION_CONSTRUCTION("12", "项目已完成");
 
     private final String code;
     private final String info;

+ 42 - 0
purchase-system/src/main/java/com/ozs/pm/doman/PmFlowChart.java

@@ -0,0 +1,42 @@
+package com.ozs.pm.doman;
+
+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_flow_chart
+ *
+ * @author ruoyi
+ * @date 2023-01-25
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("流程图对象")
+public class PmFlowChart extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long flowChartId;
+
+    /** 模块名称 */
+    @Excel(name = "模块名称")
+    private String moduleName;
+
+    /** 部门角色 */
+    @Excel(name = "部门角色")
+    private String deptRole;
+
+    /** 提示文案 */
+    @Excel(name = "提示文案")
+    private String promptWords;
+
+
+}

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

@@ -68,4 +68,8 @@ public class PmDemandReqVo extends PageVo
      */
     @ApiModelProperty("上传附件")
     private List<SysFileRef> sysFileRefs;
+
+    /** 模块名称 */
+    @ApiModelProperty("模块名称")
+    private String moduleName;
 }

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

@@ -164,6 +164,7 @@ public class PmDemandEngineeringResVo extends BaseEntity
     /**
      * 上传附件的URL
      */
+    @ApiModelProperty("上传附件的URL")
     HashMap<String, String> fileMap;
 
 }

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

@@ -96,5 +96,6 @@ public class PmDemandEquipResVo extends BaseEntity
     /**
      * 上传附件的URL
      */
+    @ApiModelProperty("上传附件的URL")
     HashMap<String, String> fileMap;
 }

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

@@ -119,5 +119,6 @@ public class PmDemandMaterialsResVo extends BaseEntity {
     /**
      * 上传附件的URL
      */
+    @ApiModelProperty("上传附件的URL")
     HashMap<String, String> fileMap;
 }

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

@@ -99,5 +99,6 @@ public class PmDemandServeResVo extends BaseEntity
     /**
      * 上传附件的URL
      */
+    @ApiModelProperty("上传附件的URL")
     HashMap<String, String> fileMap;
 }

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

@@ -0,0 +1,55 @@
+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 io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * 流程图对象 pm_flow_chart
+ *
+ * @author ruoyi
+ * @date 2023-01-25
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("流程图对象")
+public class PmFlowChartResVo
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @ApiModelProperty("主键")
+    private Long flowChartId;
+
+    /** 模块名称 */
+    @Excel(name = "模块名称")
+    @ApiModelProperty("模块名称")
+    private String moduleName;
+
+    /** 部门角色 */
+    @Excel(name = "部门角色")
+    @ApiModelProperty("部门角色")
+    private String deptRole;
+
+    /** 提示文案 */
+    @Excel(name = "提示文案")
+    @ApiModelProperty("提示文案")
+    private String promptWords;
+
+    /**
+     * 上传附件的URL
+     */
+    @ApiModelProperty("上传附件的URL")
+    HashMap<String, String> fileMap;
+
+}

+ 63 - 0
purchase-system/src/main/java/com/ozs/pm/mapper/PmFlowChartMapper.java

@@ -0,0 +1,63 @@
+package com.ozs.pm.mapper;
+
+import com.ozs.pm.doman.PmFlowChart;
+
+import java.util.List;
+
+
+/**
+ * 流程图Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-25
+ */
+public interface PmFlowChartMapper 
+{
+    /**
+     * 查询流程图
+     * 
+     * @param flowChartId 流程图主键
+     * @return 流程图
+     */
+    public PmFlowChart selectPmFlowChartByFlowChartId(Long flowChartId);
+
+    /**
+     * 查询流程图列表
+     * 
+     * @param pmFlowChart 流程图
+     * @return 流程图集合
+     */
+    public List<PmFlowChart> selectPmFlowChartList(PmFlowChart pmFlowChart);
+
+    /**
+     * 新增流程图
+     * 
+     * @param pmFlowChart 流程图
+     * @return 结果
+     */
+    public int insertPmFlowChart(PmFlowChart pmFlowChart);
+
+    /**
+     * 修改流程图
+     * 
+     * @param pmFlowChart 流程图
+     * @return 结果
+     */
+    public int updatePmFlowChart(PmFlowChart pmFlowChart);
+
+    /**
+     * 删除流程图
+     * 
+     * @param flowChartId 流程图主键
+     * @return 结果
+     */
+    public int deletePmFlowChartByFlowChartId(Long flowChartId);
+
+    /**
+     * 批量删除流程图
+     * 
+     * @param flowChartIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletePmFlowChartByFlowChartIds(Long[] flowChartIds);
+}

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

@@ -5,6 +5,7 @@ import com.ozs.pm.doman.PmDemand;
 import com.ozs.pm.doman.vo.requestVo.PmBookBuildingReqVo;
 import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
 import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
+import com.ozs.pm.doman.vo.responseVo.PmFlowChartResVo;
 
 import java.util.List;
 
@@ -62,7 +63,15 @@ public interface IPmDemandService
      * @param demandId 采购需求主键
      * @return 采购需求
      */
-    public PmDemandResVo viewFlowChart(Long demandId);
+    public String viewFlowChart(Long demandId);
+
+    /**
+     * 查看流程图
+     *
+     * @param demandId 采购需求主键
+     * @return 采购需求
+     */
+    public PmFlowChartResVo getModuleInfo(Long demandId, String moduleName);
 
     /**
      * 提交采购需求

+ 63 - 0
purchase-system/src/main/java/com/ozs/pm/service/IPmFlowChartService.java

@@ -0,0 +1,63 @@
+package com.ozs.pm.service;
+
+import com.ozs.pm.doman.PmFlowChart;
+
+import java.util.List;
+
+
+/**
+ * 流程图Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-01-25
+ */
+public interface IPmFlowChartService 
+{
+    /**
+     * 查询流程图
+     * 
+     * @param flowChartId 流程图主键
+     * @return 流程图
+     */
+    public PmFlowChart selectPmFlowChartByFlowChartId(Long flowChartId);
+
+    /**
+     * 查询流程图列表
+     * 
+     * @param pmFlowChart 流程图
+     * @return 流程图集合
+     */
+    public List<PmFlowChart> selectPmFlowChartList(PmFlowChart pmFlowChart);
+
+    /**
+     * 新增流程图
+     * 
+     * @param pmFlowChart 流程图
+     * @return 结果
+     */
+    public int insertPmFlowChart(PmFlowChart pmFlowChart);
+
+    /**
+     * 修改流程图
+     * 
+     * @param pmFlowChart 流程图
+     * @return 结果
+     */
+    public int updatePmFlowChart(PmFlowChart pmFlowChart);
+
+    /**
+     * 批量删除流程图
+     * 
+     * @param flowChartIds 需要删除的流程图主键集合
+     * @return 结果
+     */
+    public int deletePmFlowChartByFlowChartIds(Long[] flowChartIds);
+
+    /**
+     * 删除流程图信息
+     * 
+     * @param flowChartId 流程图主键
+     * @return 结果
+     */
+    public int deletePmFlowChartByFlowChartId(Long flowChartId);
+}

+ 98 - 4
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServiceImpl.java

@@ -53,7 +53,8 @@ public class PmDemandServiceImpl implements IPmDemandService
     private SysFileService fileService;
     @Autowired
     private SysFileRefService sysFileRefService;
-
+    @Autowired
+    private IPmFlowChartService iPmFlowChartService;
     /**
      * 查询采购需求
      *
@@ -503,9 +504,102 @@ public class PmDemandServiceImpl implements IPmDemandService
      * @return 采购需求
      */
     @Override
-    public PmDemandResVo viewFlowChart(Long demandId) {
-        PmDemandResVo pmDemandResVo = new PmDemandResVo();
-        return pmDemandResVo;
+    public String viewFlowChart(Long demandId) {
+        PmDemand pmDemand = pmDemandMapper.selectPmDemandByDemandId(demandId);
+        String projectStatus = String.valueOf(pmDemand.getProjectStatus());
+        String moduleName = null;
+        //todo
+        if (PmProjectStatus.DEMAND_WAIT_FILL.getCode().equals(projectStatus) || PmProjectStatus.DEMAND_AUDIT_RETURN.getCode().equals(projectStatus)) {
+            moduleName = "需求填制";
+        } else if(PmProjectStatus.DEMAND_WAIT_COMMIT.getCode().equals(projectStatus)) {
+            moduleName = "需求提交";
+        } else if(PmProjectStatus.DEMAND_WAIT_AUDIT.getCode().equals(projectStatus)) {
+            moduleName = "需求审核";
+        } else if(PmProjectStatus.TASK_WAIT_RELEASE.getCode().equals(projectStatus)) {
+            moduleName = "任务下达";
+        } else if(PmProjectStatus.BID_INFO_WAIT_FILL.getCode().equals(projectStatus)) {
+            moduleName = "中标情况填制";
+        } else if(PmProjectStatus.CONTRACT_WAIT_FILL.getCode().equals(projectStatus)) {
+            moduleName = "合同填制";
+        } else if(PmProjectStatus.UNDER_CONSTRUCTION.getCode().equals(projectStatus)) {
+            moduleName = "建设文档填制";
+        } else if(PmProjectStatus.COMPLETION_CONSTRUCTION.getCode().equals(projectStatus)) {
+            moduleName = "项目归档";
+        }
+        return moduleName;
+    }
+
+    public PmFlowChartResVo getModuleInfo(Long demandId,String moduleName){
+        PmDemand pmDemand = pmDemandMapper.selectPmDemandByDemandId(demandId);
+        String projectType = pmDemand.getProjectType();
+
+        PmFlowChart pmFlowChartReq = new PmFlowChart();
+        pmFlowChartReq.setModuleName(moduleName);
+        List<PmFlowChart> pmFlowChartList = iPmFlowChartService.selectPmFlowChartList(pmFlowChartReq);
+        if(pmFlowChartList == null || pmFlowChartList.size() ==0){
+            return null;
+        }
+        PmFlowChartResVo vo = new PmFlowChartResVo();
+        BeanUtils.copyProperties(pmFlowChartList.get(0), vo);
+
+        if("需求填制".equals(moduleName)) {
+            HashMap<String, String> fileMap = getFileMap(demandId,SysFileRefEnum.PM_DEMAND.getType());
+            if(fileMap != null){
+                vo.setFileMap(fileMap);
+            }
+        } else if("需求提交".equals(moduleName)) {
+            if(ProjectTypes.EQUIPMENTTYPE.getCode().equals(projectType)){ //装备类
+                PmDemandEquip pmDemandEquipReq = new PmDemandEquip();
+                pmDemandEquipReq.setDemandId(demandId);
+                List<PmDemandEquip> pmDemandEquipList = iPmDemandEquipService.selectPmDemandEquipList(pmDemandEquipReq);
+                if(pmDemandEquipList != null && pmDemandEquipList.size() > 0){
+                    HashMap<String, String> fileMap = getFileMap(pmDemandEquipList.get(0).getDemandEquipId(),SysFileRefEnum.PM_DEMAND_EQUIP.getType());
+                    if(fileMap != null){
+                        vo.setFileMap(fileMap);
+                    }
+                }
+            } else if(ProjectTypes.MATERIALTYPE.getCode().equals(projectType)) { //物资类
+                PmDemandMaterials pmDemandMaterialsReq = new PmDemandMaterials();
+                pmDemandMaterialsReq.setDemandId(demandId);
+                List<PmDemandMaterials> pmDemandMaterialsList = iPmDemandMaterialsService.selectPmDemandMaterialsList(pmDemandMaterialsReq);
+                if(pmDemandMaterialsList != null && pmDemandMaterialsList.size() > 0){
+                    HashMap<String, String> fileMap = getFileMap(pmDemandMaterialsList.get(0).getDemandMaterialsId(),SysFileRefEnum.PM_DEMAND_MATERIALS.getType());
+                    if(fileMap != null){
+                        vo.setFileMap(fileMap);
+                    }
+                }
+            } else if(ProjectTypes.SERVICESTYPE.getCode().equals(projectType)) { //服务类
+                PmDemandServe pmDemandServeReq = new PmDemandServe();
+                pmDemandServeReq.setDemandId(demandId);
+                List<PmDemandServe> pmDemandServeList = iPmDemandServeService.selectPmDemandServeList(pmDemandServeReq);
+                if(pmDemandServeList != null && pmDemandServeList.size() > 0){
+                    HashMap<String, String> fileMap = getFileMap(pmDemandServeList.get(0).getDemandServeId(),SysFileRefEnum.PM_DEMAND_SERVE.getType());
+                    if(fileMap != null){
+                        vo.setFileMap(fileMap);
+                    }
+                }
+            } else if(ProjectTypes.PLANTOEXAMINETYPE.getCode().equals(projectType)) { //工程类
+                PmDemandEngineering pmDemandEngineeringReq = new PmDemandEngineering();
+                pmDemandEngineeringReq.setDemandId(demandId);
+                List<PmDemandEngineering> pmDemandEngineeringList = iPmDemandEngineeringService.selectPmDemandEngineeringList(pmDemandEngineeringReq);
+                if(pmDemandEngineeringList != null && pmDemandEngineeringList.size() > 0){
+                    HashMap<String, String> fileMap = getFileMap(pmDemandEngineeringList.get(0).getDemandEngineeringId(),SysFileRefEnum.PM_DEMAND_ENGINEERING.getType());
+                    if(fileMap != null){
+                        vo.setFileMap(fileMap);
+                    }
+                }
+            }
+
+        } else if("需求审核".equals(moduleName)) {
+            HashMap<String, String> fileMap = getFileMap(demandId,SysFileRefEnum.PM_DEMAND_EXAMINE.getType());
+            if(fileMap != null){
+                vo.setFileMap(fileMap);
+            }
+        } else if("任务下达".equals(moduleName)) {
+            //todo
+        }
+
+         return vo;
     }
 
     /**

+ 97 - 0
purchase-system/src/main/java/com/ozs/pm/service/impl/PmFlowChartServiceImpl.java

@@ -0,0 +1,97 @@
+package com.ozs.pm.service.impl;
+
+import java.util.List;
+import com.ozs.common.utils.DateUtils;
+import com.ozs.pm.doman.PmFlowChart;
+import com.ozs.pm.mapper.PmFlowChartMapper;
+import com.ozs.pm.service.IPmFlowChartService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 流程图Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-01-25
+ */
+@Service
+public class PmFlowChartServiceImpl implements IPmFlowChartService
+{
+    @Autowired
+    private PmFlowChartMapper pmFlowChartMapper;
+
+    /**
+     * 查询流程图
+     *
+     * @param flowChartId 流程图主键
+     * @return 流程图
+     */
+    @Override
+    public PmFlowChart selectPmFlowChartByFlowChartId(Long flowChartId)
+    {
+        return pmFlowChartMapper.selectPmFlowChartByFlowChartId(flowChartId);
+    }
+
+    /**
+     * 查询流程图列表
+     *
+     * @param pmFlowChart 流程图
+     * @return 流程图
+     */
+    @Override
+    public List<PmFlowChart> selectPmFlowChartList(PmFlowChart pmFlowChart)
+    {
+        return pmFlowChartMapper.selectPmFlowChartList(pmFlowChart);
+    }
+
+    /**
+     * 新增流程图
+     *
+     * @param pmFlowChart 流程图
+     * @return 结果
+     */
+    @Override
+    public int insertPmFlowChart(PmFlowChart pmFlowChart)
+    {
+        pmFlowChart.setCreateTime(DateUtils.getNowDate());
+        return pmFlowChartMapper.insertPmFlowChart(pmFlowChart);
+    }
+
+    /**
+     * 修改流程图
+     *
+     * @param pmFlowChart 流程图
+     * @return 结果
+     */
+    @Override
+    public int updatePmFlowChart(PmFlowChart pmFlowChart)
+    {
+        pmFlowChart.setUpdateTime(DateUtils.getNowDate());
+        return pmFlowChartMapper.updatePmFlowChart(pmFlowChart);
+    }
+
+    /**
+     * 批量删除流程图
+     *
+     * @param flowChartIds 需要删除的流程图主键
+     * @return 结果
+     */
+    @Override
+    public int deletePmFlowChartByFlowChartIds(Long[] flowChartIds)
+    {
+        return pmFlowChartMapper.deletePmFlowChartByFlowChartIds(flowChartIds);
+    }
+
+    /**
+     * 删除流程图信息
+     *
+     * @param flowChartId 流程图主键
+     * @return 结果
+     */
+    @Override
+    public int deletePmFlowChartByFlowChartId(Long flowChartId)
+    {
+        return pmFlowChartMapper.deletePmFlowChartByFlowChartId(flowChartId);
+    }
+}

+ 82 - 0
purchase-system/src/main/resources/mapper/pm/PmFlowChartMapper.xml

@@ -0,0 +1,82 @@
+<?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.PmFlowChartMapper">
+    
+    <resultMap type="com.ozs.pm.doman.PmFlowChart" id="PmFlowChartResult">
+        <result property="flowChartId"    column="flow_chart_id"    />
+        <result property="moduleName"    column="module_name"    />
+        <result property="deptRole"    column="dept_role"    />
+        <result property="promptWords"    column="prompt_words"    />
+        <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="selectPmFlowChartVo">
+        select flow_chart_id, module_name, dept_role, prompt_words, create_by, create_time, update_by, update_time from pm_flow_chart
+    </sql>
+
+    <select id="selectPmFlowChartList" parameterType="com.ozs.pm.doman.PmFlowChart" resultMap="PmFlowChartResult">
+        <include refid="selectPmFlowChartVo"/>
+        <where>  
+            <if test="moduleName != null  and moduleName != ''"> and module_name like concat('%', #{moduleName}, '%')</if>
+            <if test="deptRole != null  and deptRole != ''"> and dept_role = #{deptRole}</if>
+            <if test="promptWords != null  and promptWords != ''"> and prompt_words = #{promptWords}</if>
+        </where>
+    </select>
+    
+    <select id="selectPmFlowChartByFlowChartId" parameterType="Long" resultMap="PmFlowChartResult">
+        <include refid="selectPmFlowChartVo"/>
+        where flow_chart_id = #{flowChartId}
+    </select>
+        
+    <insert id="insertPmFlowChart" parameterType="com.ozs.pm.doman.PmFlowChart" useGeneratedKeys="true" keyProperty="flowChartId">
+        insert into pm_flow_chart
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="moduleName != null and moduleName != ''">module_name,</if>
+            <if test="deptRole != null">dept_role,</if>
+            <if test="promptWords != null">prompt_words,</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="moduleName != null and moduleName != ''">#{moduleName},</if>
+            <if test="deptRole != null">#{deptRole},</if>
+            <if test="promptWords != null">#{promptWords},</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="updatePmFlowChart" parameterType="com.ozs.pm.doman.PmFlowChart">
+        update pm_flow_chart
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="moduleName != null and moduleName != ''">module_name = #{moduleName},</if>
+            <if test="deptRole != null">dept_role = #{deptRole},</if>
+            <if test="promptWords != null">prompt_words = #{promptWords},</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 flow_chart_id = #{flowChartId}
+    </update>
+
+    <delete id="deletePmFlowChartByFlowChartId" parameterType="Long">
+        delete from pm_flow_chart where flow_chart_id = #{flowChartId}
+    </delete>
+
+    <delete id="deletePmFlowChartByFlowChartIds" parameterType="String">
+        delete from pm_flow_chart where flow_chart_id in 
+        <foreach item="flowChartId" collection="array" open="(" separator="," close=")">
+            #{flowChartId}
+        </foreach>
+    </delete>
+</mapper>