Bläddra i källkod

修改承接地审核流程

Administrator 2 år sedan
förälder
incheckning
0ee576a7c2

+ 6 - 19
ruoyi-admin/src/main/java/com/ruoyi/web/controller/projectV2/common/ZsyzCommonController.java

@@ -1,31 +1,19 @@
 package com.ruoyi.web.controller.projectV2.common;
 
-import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.core.redis.RedisCache;
-import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.SecurityUtils;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.system.domain.projectV2.*;
-import com.ruoyi.system.service.projectV2.IZsyzFjService;
+import com.ruoyi.system.domain.projectV2.Vo.ZpVo;
 import com.ruoyi.system.service.projectV2.IZsyzLcjlService;
 import com.ruoyi.system.service.projectV2.IZsyzProjectDeptService;
 import com.ruoyi.system.service.projectV2.IZsyzSbbzbService;
 import com.ruoyi.system.service.projectV2.common.IZsyzCommonService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
 import static com.ruoyi.common.constant.CommonConstants.*;
 
 /**
@@ -93,14 +81,14 @@ public class ZsyzCommonController extends BaseController {
 
 
     /**
-     * 线索指派给承接地的接口
-     * todo 增加指派给协同单位
+     * 项目指派接口
      * @return
      */
     @PostMapping("/xszp")
     @PreAuthorize("@ss.hasPermi('projectV2:common:xszp')")
-    public AjaxResult xszp(@RequestBody ZsyzSbbzb zsyzSbbzb) {
-        String zpType = zsyzSbbzb.getZpType();
+    public AjaxResult xszp(@RequestBody ZpVo zpVo) {
+        return  zsyzCommonService.xszp(zpVo);
+/*        String zpType = zsyzSbbzb.getZpType();
         if (ONE.equals(zpType)){
             ArrayList<SysDept> deptList = zsyzSbbzb.getDeptList();
             if (deptList != null && deptList.size() > 0){
@@ -177,8 +165,7 @@ public class ZsyzCommonController extends BaseController {
         String deptName = dept.getDeptName();
         zsyzLcjl.setDeptName(deptName);
         zsyzLcjl.setProgress(zsyzSbbzb.getProgress());
-        zsyzLcjlService.insertZsyzLcjl(zsyzLcjl);
-        return AjaxResult.success();
+        zsyzLcjlService.insertZsyzLcjl(zsyzLcjl);*/
     }
 
     /**

+ 5 - 4
ruoyi-common/src/main/java/com/ruoyi/common/constant/CommonConstants.java

@@ -26,10 +26,11 @@ public class CommonConstants {
     public static final String ELE = "11";
     public static final String TWE = "12";
     //项目进度
-    public static final String  XMJD_XS= "线索阶段";
-    public static final String  XMJD_QY= "签约阶段";
-    public static final String  XMJD_KG= "开工阶段";
-    public static final String  XMJD_TC= "投产阶段";
+    public static final String  XMJD_ST= "项目首谈";
+    public static final String  XMJD_CJ= "项目承接";
+    public static final String  XMJD_QY= "项目签约";
+    public static final String  XMJD_KG= "项目开工";
+    public static final String  XMJD_TC= "项目投产 ";
 
     //角色权限
     //超级管理员

+ 95 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/Vo/ZpVo.java

@@ -0,0 +1,95 @@
+package com.ruoyi.system.domain.projectV2.Vo;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.system.domain.projectV2.ZsyzProjectDept;
+
+import java.util.List;
+
+/**
+ * @Author: tjf 指派接受的参数
+ * @Date: 2023/3/3 15:18
+ * @Describe:
+ */
+public class ZpVo extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+    /** 项目ID */
+    @Excel(name = "项目ID")
+    private Long xmId;
+
+    /** 项目编号 */
+    @Excel(name = "项目编号")
+    private String xmbh;
+
+    //名称
+    private String xmmc;
+
+    //要素部门
+    private List<ZsyzProjectDept> ysbmList;
+    //承接地
+
+    private List<ZsyzProjectDept> cjdList;
+
+    //招商引荐单位
+    private List<ZsyzProjectDept> yqdwList;
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public Long getXmId() {
+        return xmId;
+    }
+
+    public void setXmId(Long xmId) {
+        this.xmId = xmId;
+    }
+
+    public String getXmbh() {
+        return xmbh;
+    }
+
+    public void setXmbh(String xmbh) {
+        this.xmbh = xmbh;
+    }
+
+    public List<ZsyzProjectDept> getYsbmList() {
+        return ysbmList;
+    }
+
+    public void setYsbmList(List<ZsyzProjectDept> ysbmList) {
+        this.ysbmList = ysbmList;
+    }
+
+    public List<ZsyzProjectDept> getCjdList() {
+        return cjdList;
+    }
+
+    public void setCjdList(List<ZsyzProjectDept> cjdList) {
+        this.cjdList = cjdList;
+    }
+
+    public List<ZsyzProjectDept> getYqdwList() {
+        return yqdwList;
+    }
+
+    public void setYqdwList(List<ZsyzProjectDept> yqdwList) {
+        this.yqdwList = yqdwList;
+    }
+
+    @Override
+    public String toString() {
+        return "ZpVo{" +
+                "xmId=" + xmId +
+                ", xmbh='" + xmbh + '\'' +
+                ", xmmc='" + xmmc + '\'' +
+                ", ysbmList=" + ysbmList +
+                ", cjdList=" + cjdList +
+                ", yqdwList=" + yqdwList +
+                '}';
+    }
+}

+ 13 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/ZsyzLcjl.java

@@ -48,8 +48,20 @@ public class ZsyzLcjl extends BaseEntity
     /** 项目进度 1:项目首谈待审核 2:项目首谈已审核 3:线索分发要素部门 4:线索已指派 5:线索已承接 6:签约待审核 7:签约已审核 8:开工待审核 9:开工已审核 10:投产待审核 11:投产已审核 12:项目已入归 */
     @Excel(name = "项目进度 1:项目首谈待审核 2:项目首谈已审核 3:线索分发要素部门 4:线索已指派 5:线索已承接 6:签约待审核 7:签约已审核 8:开工待审核 9:开工已审核 10:投产待审核 11:投产已审核 12:项目已入归")
     private String progress;
+    /**
+     * 项目状态 1:待审核 2:已通过 3:被退回
+     */
+    private String xmStatus;
 
-    public void setId(Long id) 
+    public String getXmStatus() {
+        return xmStatus;
+    }
+
+    public void setXmStatus(String xmStatus) {
+        this.xmStatus = xmStatus;
+    }
+
+    public void setId(Long id)
     {
         this.id = id;
     }

+ 64 - 14
ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/ZsyzProjectDept.java

@@ -45,6 +45,56 @@ public class ZsyzProjectDept extends BaseEntity
      * 是否回复
      */
     private String isHf;
+    /**
+     * 部门类型(1:承接地 2:要素部门 3:招商引荐单位)
+     */
+    private String deptType;
+    /**
+     * 是否删除当项目重新指派的时候删除原来指派的部门,打上标记 成为历史指派
+     */
+    private String isDel;
+    /**
+     * 审核结果
+     * 审核结果(是否通过  1:待审核,2:通过 3:不通过)
+     */
+
+    private String shjg;
+    /**
+     * 审核意见
+     */
+    private String shyj;
+
+    public String getDeptType() {
+        return deptType;
+    }
+
+    public void setDeptType(String deptType) {
+        this.deptType = deptType;
+    }
+
+    public String getIsDel() {
+        return isDel;
+    }
+
+    public void setIsDel(String isDel) {
+        this.isDel = isDel;
+    }
+
+    public String getShjg() {
+        return shjg;
+    }
+
+    public void setShjg(String shjg) {
+        this.shjg = shjg;
+    }
+
+    public String getShyj() {
+        return shyj;
+    }
+
+    public void setShyj(String shyj) {
+        this.shyj = shyj;
+    }
 
     public String getIsHf() {
         return isHf;
@@ -120,19 +170,19 @@ public class ZsyzProjectDept extends BaseEntity
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("xmId", getXmId())
-            .append("xmbh", getXmbh())
-            .append("xmmc", getXmmc())
-            .append("deptId", getDeptId())
-            .append("deptName", getDeptName())
-            .append("ancestors", getAncestors())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
+        return "ZsyzProjectDept{" +
+                "id=" + id +
+                ", xmId=" + xmId +
+                ", xmbh='" + xmbh + '\'' +
+                ", xmmc='" + xmmc + '\'' +
+                ", deptId=" + deptId +
+                ", deptName='" + deptName + '\'' +
+                ", ancestors='" + ancestors + '\'' +
+                ", isHf='" + isHf + '\'' +
+                ", deptType='" + deptType + '\'' +
+                ", isDel='" + isDel + '\'' +
+                ", shjg='" + shjg + '\'' +
+                ", shyj='" + shyj + '\'' +
+                '}';
     }
 }

+ 15 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/ZsyzSbbzb.java

@@ -161,10 +161,15 @@ public class ZsyzSbbzb extends BaseEntity
     //@Excel(name = "申报状态 1:正常 2:暂缓")
     private String type;
 
-    /** 项目进度 1:项目首谈待审核 2:项目首谈已审核 3:线索分发要素部门 4:线索已指派 5:线索已承接 6:签约待审核 7:签约已审核 8:开工待审核 9:开工已审核 10:投产待审核 11:投产已审核 12:项目已入归 */
+    /** 项目进度 1:项目首谈 2:项目承接 3:项目签约 4:项目开工 5:项目投产  */
     //@Excel(name = "项目进度 1:项目首谈待审核 2:项目首谈已审核 3:线索分发要素部门 4:线索已指派 5:线索已承接 6:签约待审核 7:签约已审核 8:开工待审核 9:开工已审核 10:投产待审核 11:投产已审核 12:项目已入归")
     private String progress;
 
+    /**
+     * 项目状态 1:待审核 2:已通过 3:被退回
+     */
+    private String xmStatus;
+
     /** 申请人部门ID */
    // @Excel(name = "申请人部门ID")
     private Long deptId;
@@ -274,6 +279,14 @@ public class ZsyzSbbzb extends BaseEntity
     })
     private ZsyzTcxx zsyzTcxx;*/
 
+    public String getXmStatus() {
+        return xmStatus;
+    }
+
+    public void setXmStatus(String xmStatus) {
+        this.xmStatus = xmStatus;
+    }
+
     public String getShjg() {
         return shjg;
     }
@@ -749,6 +762,7 @@ public class ZsyzSbbzb extends BaseEntity
             .append("createBy", getCreateBy())
             .append("type", getType())
             .append("progress", getProgress())
+            .append("xmStatus", getXmStatus())
             .append("deptId", getDeptId())
             .append("createTime", getCreateTime())
             .append("updateBy", getUpdateBy())

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/ZsyzShyj.java

@@ -47,8 +47,8 @@ public class ZsyzShyj extends BaseEntity
     @Excel(name = "项目阶段")
     private String xmjd;
 
-    /** 审核结果(是否通过  1:通过,2:拒绝) */
-    @Excel(name = "审核结果", readConverterExp = "1=通过,2=拒绝")
+    /** 审核结果(是否通过  1:待审核,2:通过 3:不通过) */
+    @Excel(name = "审核结果", readConverterExp = "1=待审核,2=通过,3=不通过")
     private String shjg;
 
     /** 审核意见 */

+ 158 - 40
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/projectV2/common/ZsyzCommonServiceImpL.java

@@ -10,10 +10,8 @@ import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.projectV2.*;
-import com.ruoyi.system.mapper.projectV2.ZsyzLcjlMapper;
-import com.ruoyi.system.mapper.projectV2.ZsyzSbbzbMapper;
-import com.ruoyi.system.mapper.projectV2.ZsyzShyjMapper;
-import com.ruoyi.system.mapper.projectV2.ZsyzSkxmMapper;
+import com.ruoyi.system.domain.projectV2.Vo.ZpVo;
+import com.ruoyi.system.mapper.projectV2.*;
 import com.ruoyi.system.service.projectV2.IZsyzProjectDeptService;
 import com.ruoyi.system.service.projectV2.IZsyzSbbzbService;
 import com.ruoyi.system.service.projectV2.IZsyzShyjService;
@@ -25,7 +23,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
 
 import static com.ruoyi.common.constant.CommonConstants.*;
 
@@ -59,6 +57,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
     @Autowired
     private ZsyzLcjlMapper zsyzLcjlMapper;
 
+
     //主要功能, 对线索进度进行控制
     @Override
     public AjaxResult xssh(ZsyzShyj zsyzShyj) {
@@ -135,40 +134,85 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
         if (CJD.equals(roleName)) {
             return AjaxResult.error("当前用户不是承接地角色");
         }
-        //获取审核结果
-        String shjg = zsyzShyj.getShjg();
+
         //判断项目阶段
         String progress = zsyzShyj.getXmjd();
-        if (!FOR.equals(progress)) {
-            return AjaxResult.error("当前项目状态异常,承接地无法审核");
+        if (!TWO.equals(progress)) {
+            return AjaxResult.error("当前项目进度异常,承接地无法审核");
         }
-        //根据角色和项目进度来判断能不能审核,判断是否通过
+        //获取审核结果
+        String shjg = zsyzShyj.getShjg();
+        //需要判断是否已经回复过该条指派
+        ZsyzProjectDept zsyzProjectDept = new ZsyzProjectDept();
+        zsyzProjectDept.setXmId(zsyzShyj.getXmId());
+        zsyzProjectDept.setDeptId(SecurityUtils.getDeptId());
+        zsyzProjectDept.setDeptType(ONE);
+        zsyzProjectDept.setIsDel("N");
+
+        List<ZsyzProjectDept> zsyzProjectDepts = projectDeptService.selectZsyzProjectDeptList(zsyzProjectDept);
+        ZsyzProjectDept zsyzProjectDept1 = zsyzProjectDepts.get(0);
+
+        zsyzProjectDept1.setShjg(shjg);
+        zsyzProjectDept1.setShyj(zsyzShyj.getShyj());
+
+        String isHf = zsyzProjectDept1.getIsHf();
+        if (StringUtils.isNotEmpty(isHf) && "Y".equals(isHf)) {
+            return AjaxResult.error("当前项目已经回复过");
+        }
+        zsyzProjectDept1.setIsHf("Y");
+        //更改主表信息
         ZsyzSbbzb zsyzSbbzb = new ZsyzSbbzb();
         zsyzSbbzb.setId(zsyzShyj.getXmId());
 
-        {
-            if (ONE.equals(shjg)) {
-                //通过
-                //审核通过需要进入下一阶段/要素部门审核通过,不进行进度前进
-                //判断项目进度
-                String progressResult = changeProgress(progress, roleName);
-                if (ERROR.equals(progressResult)) {
-                    return AjaxResult.error("当前状态下您没有审核权限");
+        //获取该项目要素部门的指派信息
+        zsyzProjectDept.setDeptId(null);
+        zsyzProjectDept.setDeptType(TWO);
+        zsyzProjectDept.setIsDel("N");
+        List<ZsyzProjectDept> zsyzProjectDeptsYsbm = projectDeptService.selectZsyzProjectDeptList(zsyzProjectDept);
+
+
+        if (TWO.equals(shjg)) {
+            //承接地审核通过去查询中间表 是否所有指派的要素部门都回复且通过
+            if (zsyzProjectDeptsYsbm != null){
+                Map<String, List<ZsyzProjectDept>> collect = zsyzProjectDeptsYsbm.stream().collect(Collectors.groupingBy(ZsyzProjectDept::getIsHf));
+                List<ZsyzProjectDept> yList = collect.get("Y");
+                if (yList != null && zsyzProjectDeptsYsbm.size() == yList.size()){
+                    //说明都回复过
+                    Map<String, List<ZsyzProjectDept>> shjpMap = yList.stream().collect(Collectors.groupingBy(ZsyzProjectDept::getShjg));
+                    // 判断是否都同意
+                    if (shjpMap != null && shjpMap.size()  == 1 && shjpMap.get(TWO) != null){
+                        // 全部同意 项目进入承接已审核,清空承接地信息
+                        zsyzSbbzb.setProgress(TWO);
+                        zsyzSbbzb.setXmStatus(TWO);
+                    }else {
+                        //说明都回复过 没有都同意 项目回到 项目首谈已审核,清空承接地信息
+                        zsyzSbbzb.setProgress(ONE);
+                        zsyzSbbzb.setXmStatus(TWO);
+                    }
                 }
-                zsyzSbbzb.setProgress(progressResult);
-                zsyzSbbzb.setShjg(ONE);
-                zsyzSbbzbMapper.updateZsyzSbbzbProgress(zsyzSbbzb);
-            } else if (TWO.equals(shjg)) {
-                String progressResult = changeProgressBack(progress, roleName);
-                if (ERROR.equals(progressResult)) {
-                    return AjaxResult.error("当前状态下您没有审核权限");
+            }
+        } else if (THR.equals(shjg)) {
+            //承接地不通过 不改变项目进度 改变项目状态为3:被退回.
+            //驳回
+            zsyzSbbzb.setXmStatus(THR);
+            zsyzSbbzb.setShjg(TWO);
+            //需要去中间表zsyz_project_dept判断要素部门是否都回复过
+            if (zsyzProjectDeptsYsbm != null) {
+                Map<String, List<ZsyzProjectDept>> collect = zsyzProjectDeptsYsbm.stream().collect(Collectors.groupingBy(ZsyzProjectDept::getIsHf));
+                List<ZsyzProjectDept> yList = collect.get("Y");
+                if (yList != null && zsyzProjectDeptsYsbm.size() == yList.size()) {
+                    //说明都回复过 项目回到 项目首谈已审核,清空承接地信息
+                    zsyzSbbzb.setProgress(ONE);
+                    zsyzSbbzb.setXmStatus(TWO);
                 }
-                //驳回
-                zsyzSbbzb.setProgress(progressResult);
-                zsyzSbbzb.setShjg(TWO);
-                zsyzSbbzbMapper.updateZsyzSbbzbProgress(zsyzSbbzb);
             }
         }
+
+        //修改中间表数据
+        projectDeptService.updateZsyzProjectDept(zsyzProjectDept1);
+        //修改主表数据
+        zsyzSbbzbMapper.updateZsyzSbbzbProgress(zsyzSbbzb);
+
         //往审核意见表插入数据
         LoginUser loginUser = SecurityUtils.getLoginUser();
         SysDept dept = loginUser.getUser().getDept();
@@ -185,6 +229,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
         String deptName = dept.getDeptName();
         zsyzLcjl.setDeptName(deptName);
         zsyzLcjl.setProgress(zsyzSbbzb.getProgress());
+        zsyzLcjl.setXmStatus(zsyzSbbzb.getXmStatus());
         zsyzLcjlMapper.insertZsyzLcjl(zsyzLcjl);
         return AjaxResult.success();
     }
@@ -369,7 +414,8 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
         Map map = new HashMap(2);
         map.put("x", dates);
         Map<String, List<Integer>> yMpa = new HashMap();
-        List<Integer> xs = new ArrayList();
+        List<Integer> st = new ArrayList();
+        List<Integer> cj = new ArrayList();
         List<Integer> qy = new ArrayList();
         List<Integer> kg = new ArrayList();
         List<Integer> tc = new ArrayList();
@@ -398,15 +444,18 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
             zsyzSbbzb.setParams(dateList.get(i));
             List<ZsyzSbbzb> zsyzSbbzbs = zsyzSbbzbService.selectZsyzSbbzbList(zsyzSbbzb);
             if (zsyzSbbzbs != null && zsyzSbbzbs.size() > 0) {
-                int xsNub = 0;
+                int stNub = 0;
+                int cjNub = 0;
                 int qyNub = 0;
                 int kgNub = 0;
                 int tcNub = 0;
                 for (ZsyzSbbzb sbbzb : zsyzSbbzbs) {
                     String progress = sbbzb.getProgress();
                     String xmjd = xmjd(progress);
-                    if (XMJD_XS.equals(xmjd)) {
-                        xsNub = xsNub + 1;
+                    if (XMJD_ST.equals(xmjd)) {
+                        stNub = stNub + 1;
+                    } else if (XMJD_CJ.equals(xmjd)) {
+                        cjNub = cjNub + 1;
                     } else if (XMJD_QY.equals(xmjd)) {
                         qyNub = qyNub + 1;
                     } else if (XMJD_KG.equals(xmjd)) {
@@ -415,13 +464,15 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
                         tcNub = tcNub + 1;
                     }
                 }
-                xs.add(xsNub);
+                st.add(stNub);
+                cj.add(cjNub);
                 qy.add(qyNub);
                 kg.add(kgNub);
                 tc.add(tcNub);
             }
         }
-        yMpa.put("xs", xs);
+        yMpa.put("st", st);
+        yMpa.put("cj", cj);
         yMpa.put("qy", qy);
         yMpa.put("kg", kg);
         yMpa.put("tc", tc);
@@ -429,6 +480,71 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
         return AjaxResult.success(map);
     }
 
+
+    /**
+     * 项目指派
+     *
+     * @return
+     */
+    @Override
+    public AjaxResult xszp(ZpVo zpVo) {
+        //项目指派接口
+        //必须指派给承接地
+        //先去查主表有没有承接地id
+        List<ZsyzProjectDept> cjdList = zpVo.getCjdList();
+        if (cjdList != null) {
+            ZsyzSbbzb zsyzSbbzb = zsyzSbbzbMapper.selectZsyzSbbzbById(cjdList.get(0).getXmId());
+            if (zsyzSbbzb != null) {
+                Long cjdId = zsyzSbbzb.getCjdId();
+                if (cjdId != null) {
+                    return AjaxResult.error("该线索已指派了承接地,请勿重复指派");
+                }
+            }
+            for (ZsyzProjectDept zsyzProjectDept : cjdList) {
+                zsyzProjectDept.setDeptType(ONE);
+                //说明没有指派过承接地
+                projectDeptService.insertZsyzProjectDept(zsyzProjectDept);
+                //更改项目进度和状态,为承接地赋值
+                ZsyzSbbzb zsyzSbbzbCjd = new ZsyzSbbzb();
+                zsyzSbbzbCjd.setId(zsyzProjectDept.getXmId());
+                zsyzSbbzbCjd.setCjdId(zsyzProjectDept.getDeptId());
+                zsyzSbbzbCjd.setCjdName(zsyzProjectDept.getDeptName());
+                zsyzSbbzbCjd.setProgress(TWO);
+                zsyzSbbzbCjd.setXmStatus(ONE);
+                zsyzSbbzbMapper.updateZsyzSbbzbCjd(zsyzSbbzbCjd);
+            }
+        }
+        //要素部门
+        List<ZsyzProjectDept> ysbmList = zpVo.getYsbmList();
+        if (ysbmList != null) {
+            for (ZsyzProjectDept zsyzProjectDept : ysbmList) {
+                zsyzProjectDept.setDeptType(TWO);
+                projectDeptService.insertZsyzProjectDept(zsyzProjectDept);
+            }
+        }
+        List<ZsyzProjectDept> yqdwList = zpVo.getYqdwList();
+        if (yqdwList != null) {
+            for (ZsyzProjectDept zsyzProjectDept : yqdwList) {
+                zsyzProjectDept.setDeptType(THR);
+                projectDeptService.insertZsyzProjectDept(zsyzProjectDept);
+            }
+        }
+        //插入流程记录表
+        SysDept dept = SecurityUtils.getLoginUser().getUser().getDept();
+        ZsyzLcjl zsyzLcjl = new ZsyzLcjl();
+        zsyzLcjl.setXmId(zpVo.getXmId());
+        zsyzLcjl.setXmmc(zpVo.getXmmc());
+        zsyzLcjl.setXmbh(zpVo.getXmbh());
+        zsyzLcjl.setDeptId(dept.getDeptId());
+        String deptName = dept.getDeptName();
+        zsyzLcjl.setDeptName(deptName);
+        zsyzLcjl.setProgress(TWO);
+        zsyzLcjl.setXmStatus(ONE);
+        zsyzLcjlMapper.insertZsyzLcjl(zsyzLcjl);
+        return AjaxResult.success();
+    }
+
+
     //更改项目进度前进
     public String changeProgress(String progress, String roleName) {
         if (ONE.equals(progress) && (MANAGE.equals(roleName) || ADMIN.equals(roleName))) {
@@ -469,13 +585,15 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
 
     //根据项目进度判断项目阶段
     public String xmjd(String code) {
-        if (ONE.equals(code) || TWO.equals(code) || THR.equals(code) || FOR.equals(code) || FIV.equals(code)) {
-            return XMJD_XS;
-        } else if (SIX.equals(code) || SEV.equals(code)) {
+        if (ONE.equals(code)) {
+            return XMJD_ST;
+        } else if (TWO.equals(code)) {
+            return XMJD_CJ;
+        } else if (THR.equals(code)) {
             return XMJD_QY;
-        } else if (EIG.equals(code) || NIN.equals(code)) {
+        } else if (FOR.equals(code)) {
             return XMJD_KG;
-        } else if (TEN.equals(code) || ELE.equals(code)) {
+        } else if (FIV.equals(code)) {
             return XMJD_TC;
         }
         return "入归阶段";

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/projectV2/common/IZsyzCommonService.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service.projectV2.common;
 
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.system.domain.projectV2.Vo.ZpVo;
 import com.ruoyi.system.domain.projectV2.ZsyzSbbzb;
 import com.ruoyi.system.domain.projectV2.ZsyzShyj;
 import com.ruoyi.system.domain.projectV2.common.SendSms;
@@ -38,4 +39,10 @@ public interface IZsyzCommonService
 
     //首页统计折线图
   public AjaxResult censusXy();
+
+  /**
+   * 项目指派
+   * @return
+   */
+  public AjaxResult xszp(ZpVo zpVo);
 }

+ 6 - 1
ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzLcjlMapper.xml

@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptName"    column="dept_name"    />
         <result property="clTime"    column="cl_time"    />
         <result property="progress"    column="progress"    />
+        <result property="xmStatus"    column="xm_status"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
@@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectZsyzLcjlVo">
-        select id, xm_id, xmbh, xmmc, dept_id, dept_name, cl_time, progress, create_by, create_time, update_by, update_time, remark from zsyz_lcjl
+        select id, xm_id, xmbh, xmmc, dept_id, dept_name, cl_time, progress,xm_status, create_by, create_time, update_by, update_time, remark from zsyz_lcjl
     </sql>
 
     <select id="selectZsyzLcjlList" parameterType="ZsyzLcjl" resultMap="ZsyzLcjlResult">
@@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
             <if test="clTime != null "> and cl_time = #{clTime}</if>
             <if test="progress != null  and progress != ''"> and progress = #{progress}</if>
+            <if test="xmStatus != null  and xmStatus != ''"> and xm_status = #{xmStatus}</if>
         </where>
     </select>
     
@@ -65,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id,</if>
             <if test="deptName != null and deptName != ''">dept_name,</if>
             <if test="progress != null">progress,</if>
+            <if test="xmStatus != null">xm_status,</if>
             <if test="createBy != null">create_by,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
@@ -79,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">#{deptId},</if>
             <if test="deptName != null and deptName != ''">#{deptName},</if>
             <if test="progress != null">#{progress},</if>
+            <if test="xmStatus != null">#{xmStatus},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
@@ -98,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
             <if test="clTime != null">cl_time = #{clTime},</if>
             <if test="progress != null">progress = #{progress},</if>
+            <if test="xmStatus != null">xm_status = #{xmStatus},</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>

+ 27 - 6
ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzProjectDeptMapper.xml

@@ -13,6 +13,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptName"    column="dept_name"    />
         <result property="ancestors"    column="ancestors"    />
         <result property="isHf"    column="is_hf"    />
+        <result property="deptType"    column="dept_type"    />
+        <result property="isDel"    column="is_del"    />
+        <result property="shjg"    column="shjg"    />
+        <result property="shyj"    column="shyj"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
@@ -21,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectZsyzProjectDeptVo">
-        select id, xm_id, xmbh, xmmc, dept_id, dept_name, ancestors,is_hf, create_by, create_time, update_by, update_time, remark from zsyz_project_dept
+        select id, xm_id, xmbh, xmmc, dept_id, dept_name, ancestors,is_hf,dept_type,is_del,shjg,shyj, create_by, create_time, update_by, update_time, remark from zsyz_project_dept
     </sql>
 
     <select id="selectZsyzProjectDeptList" parameterType="ZsyzProjectDept" resultMap="ZsyzProjectDeptResult">
@@ -31,7 +35,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="xmbh != null  and xmbh != ''"> and xmbh = #{xmbh}</if>
             <if test="xmmc != null  and xmmc != ''"> and xmmc = #{xmmc}</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="isHf != null and isHf != ''"> and is_hf = #{isHf}</if>
+            <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
+            <if test="deptType != null and deptType != ''"> and dept_type = #{deptType}</if>
+            <if test="shjg != null and shjg != ''"> and shjg = #{shjg}</if>
             <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
             <if test="ancestors != null  and ancestors != ''"> and ancestors = #{ancestors}</if>
         </where>
@@ -50,6 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="xmmc != null  and xmmc != ''"> and xmmc = #{xmmc}</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="isHf != null and isHf != ''"> and is_hf = #{isHf}</if>
+            <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
+            <if test="deptType != null and deptType != ''"> and dept_type = #{deptType}</if>
+            <if test="shjg != null and shjg != ''"> and shjg = #{shjg}</if>
             <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
             <if test="ancestors != null  and ancestors != ''"> and ancestors = #{ancestors}</if>
         </where>
@@ -66,12 +75,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptName != null">dept_name,</if>
             <if test="ancestors != null">ancestors,</if>
             <if test="isHf != null">is_hf,</if>
+            <if test="deptType != null">dept_type,</if>
+            <if test="isDel != null">isDel,</if>
+            <if test="shjg != null">shjg,</if>
+            <if test="shyj != null">shyj,</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>
             <if test="remark != null">remark,</if>
-         </trim>
+            create_time
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="xmId != null">#{xmId},</if>
             <if test="xmbh != null">#{xmbh},</if>
@@ -80,11 +93,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptName != null">#{deptName},</if>
             <if test="ancestors != null">#{ancestors},</if>
             <if test="isHf != null">#{isHf},</if>
+            <if test="deptType != null">#{deptType},</if>
+            <if test="isDel != null">#{isDel},</if>
+            <if test="shjg != null">#{shjg},</if>
+            <if test="shyj != null">#{shyj},</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>
             <if test="remark != null">#{remark},</if>
+            sysdate()
          </trim>
     </insert>
 
@@ -97,7 +114,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="deptName != null">dept_name = #{deptName},</if>
             <if test="ancestors != null">ancestors = #{ancestors},</if>
-            <if test="isHf != null and is_hf != ''">is_hf = #{isHf},</if>
+            <if test="isHf != null and isHf != ''">is_hf = #{isHf},</if>
+            <if test="deptType != null and deptType != ''">dept_type = #{deptType},</if>
+            <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
+            <if test="shjg != null and shjg != ''">shjg = #{shjg},</if>
+            <if test="shyj != null and shyj != ''">shyj = #{shyj},</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>

+ 24 - 13
ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzSbbzbMapper.xml

@@ -42,6 +42,7 @@
         <result property="createBy" column="create_by"/>
         <result property="type" column="type"/>
         <result property="progress" column="progress"/>
+        <result property="xmStatus" column="xm_status"/>
         <result property="deptId" column="dept_id"/>
         <result property="createTime" column="create_time"/>
         <result property="updateBy" column="update_by"/>
@@ -215,6 +216,7 @@
                create_by,
                type,
                progress,
+               xm_status,
                dept_id,
                create_time,
                update_by,
@@ -234,7 +236,7 @@
         s.ntze, s.cylx_id, s.cylx_name, s.xmlb,
         s.tzlb, s.nlhd, s.czpt, s.tzzt, s.xmjz, s.gtzzrsfzhm, s.qytzrxyzdm, s.qybj, s.tzfjj, s.sndxse, s.sndnse,
         s.tzrxm, s.tzrzw, s.tzrdh, s.xmjj, s.name,
-        s.strq, s.phone, s.zw, s.user_id, s.create_by, s.type, s.progress, s.dept_id, s.create_time, s.update_by,
+        s.strq, s.phone, s.zw, s.user_id, s.create_by, s.type, s.progress,s.xm_status, s.dept_id, s.create_time, s.update_by,
         s.is_del, s.update_time, s.remark, s.cjd_id,
         s.cjd_name, s.is_meet, s.meet_remark,s.shjg,
         q.id, q.xm_id, q.xmbh, q.xmmc, q.dfqyr, q.wfqyr, q.tbrq, q.qyrq,q.xytzely, q.xytze, q.swzj, q.gdzctze,
@@ -292,6 +294,7 @@
             <if test="userId != null ">and s.user_id = #{userId}</if>
             <if test="type != null  and type != ''">and s.type = #{type}</if>
             <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
+            <if test="xmStatus != null  and xmStatus != ''">and xm_status = #{xmStatus})</if>
             <if test="isDel != null  and isDel != ''">and s.is_del = #{isDel}</if>
             <if test="cjdId != null ">and s.cjd_id = #{cjdId}</if>
             <if test="cjdName != null  and cjdName != ''">and s.cjd_name like concat('%', #{cjdName}, '%')</if>
@@ -315,7 +318,7 @@
         s.ntze, s.cylx_id, s.cylx_name, s.xmlb,
         s.tzlb, s.nlhd, s.czpt, s.tzzt, s.xmjz, s.gtzzrsfzhm, s.qytzrxyzdm, s.qybj, s.tzfjj, s.sndxse, s.sndnse,
         s.tzrxm, s.tzrzw, s.tzrdh, s.xmjj, s.name,
-        s.strq, s.phone, s.zw, s.user_id, s.create_by, s.type, s.progress, s.dept_id, s.create_time, s.update_by,
+        s.strq, s.phone, s.zw, s.user_id, s.create_by, s.type, s.progress,s.xm_status, s.dept_id, s.create_time, s.update_by,
         s.is_del, s.update_time, s.remark, s.cjd_id,
         s.cjd_name, s.is_meet, s.meet_remark,s.shjg
         from zsyz_sbbzb s
@@ -327,7 +330,7 @@
         s.ntze, s.cylx_id, s.cylx_name, s.xmlb,
         s.tzlb, s.nlhd, s.czpt, s.tzzt, s.xmjz, s.gtzzrsfzhm, s.qytzrxyzdm, s.qybj, s.tzfjj, s.sndxse, s.sndnse,
         s.tzrxm, s.tzrzw, s.tzrdh, s.xmjj, s.name,
-        s.strq, s.phone, s.zw, s.user_id, s.create_by, s.type, s.progress, s.dept_id, s.create_time, s.update_by,
+        s.strq, s.phone, s.zw, s.user_id, s.create_by, s.type, s.progress,s.xm_status, s.dept_id, s.create_time, s.update_by,
         s.is_del, s.update_time, s.remark, s.cjd_id,
         s.cjd_name, s.is_meet, s.meet_remark,
         q.id, q.xm_id, q.xmbh, q.xmmc, q.dfqyr, q.wfqyr, q.tbrq, q.qyrq,q.xytzely, q.xytze, q.swzj, q.gdzctze,
@@ -384,7 +387,8 @@
             <if test="zw != null  and zw != ''">and s.zw = #{zw}</if>
             <if test="userId != null ">and s.user_id = #{userId}</if>
             <if test="type != null  and type != ''">and s.type = #{type}</if>
-            <if test="progress != null  and progress != ''">and s.progress = #{progress}</if>
+            <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
+            <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
             <if test="deptId != null ">and s.dept_id = #{deptId}</if>
             <if test="isDel != null  and isDel != ''">and s.is_del = #{isDel}</if>
             <if test="cjdId != null ">and s.cjd_id = #{cjdId}</if>
@@ -441,6 +445,7 @@
         s.create_by,
         s.type,
         s.progress,
+        s.xm_status,
         s.dept_id,
         s.create_time,
         s.update_by,
@@ -457,6 +462,7 @@
         and d.dept_id = #{deptId}
         <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc = #{xmxsmc}</if>
         <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
+        <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
         <if test="cjdId != null ">and cjd_id = #{cjdId}</if>
         <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
             AND date_format(s.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
@@ -471,7 +477,7 @@
         s.ntze, s.cylx_id, s.cylx_name, s.xmlb,
         s.tzlb, s.nlhd, s.czpt, s.tzzt, s.xmjz, s.gtzzrsfzhm, s.qytzrxyzdm, s.qybj, s.tzfjj, s.sndxse, s.sndnse,
         s.tzrxm, s.tzrzw, s.tzrdh, s.xmjj, s.name,
-        s.strq, s.phone, s.zw, s.user_id, s.create_by, s.type, s.progress, s.dept_id, s.create_time, s.update_by,
+        s.strq, s.phone, s.zw, s.user_id, s.create_by, s.type, s.progress,s.xm_status, s.dept_id, s.create_time, s.update_by,
         s.is_del, s.update_time, s.remark, s.cjd_id,
         s.cjd_name, s.is_meet, s.meet_remark,
         j.id,j.xm_id,j.xmbh,j.xmmc,j.dept_id,j.shrxm,j.xmjd,j.shjg,j.shyj,j.shsj
@@ -514,8 +520,8 @@
             <if test="zw != null  and zw != ''">and s.zw = #{zw}</if>
             <if test="userId != null ">and s.user_id = #{userId}</if>
             <if test="type != null  and type != ''">and s.type = #{type}</if>
-            <if test="progress != null  and progress != ''">and s.progress in (#{progress})</if>
-            <if test="isDel != null  and isDel != ''">and s.is_del = #{isDel}</if>
+            <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
+            <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
             <if test="cjdId != null ">and s.cjd_id = #{cjdId}</if>
             <if test="cjdName != null  and cjdName != ''">and s.cjd_name like concat('%', #{cjdName}, '%')</if>
             <if test="isMeet != null  and isMeet != ''">and s.is_meet = #{isMeet}</if>
@@ -572,8 +578,8 @@
         <if test="zw != null  and zw != ''">and s.zw = #{zw}</if>
         <if test="userId != null ">and s.user_id = #{userId}</if>
         <if test="type != null  and type != ''">and s.type = #{type}</if>
-        <if test="progress != null  and progress != ''">and s.progress in (#{progress})</if>
-        <if test="isDel != null  and isDel != ''">and s.is_del = #{isDel}</if>
+        <if test="progress != null  and progress != ''">and and find_in_set(s.progress , #{progress})</if>
+        <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
         <if test="cjdId != null ">and s.cjd_id = #{cjdId}</if>
         <if test="cjdName != null  and cjdName != ''">and s.cjd_name like concat('%', #{cjdName}, '%')</if>
         <if test="isMeet != null  and isMeet != ''">and s.is_meet = #{isMeet}</if>
@@ -628,8 +634,8 @@
             <if test="zw != null  and zw != ''">and s.zw = #{zw}</if>
             <if test="userId != null ">and s.user_id = #{userId}</if>
             <if test="type != null  and type != ''">and s.type = #{type}</if>
-            <if test="progress != null  and progress != ''">and s.progress in (#{progress})</if>
-            <if test="isDel != null  and isDel != ''">and s.is_del = #{isDel}</if>
+            <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
+            <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
             <if test="cjdId != null ">and s.cjd_id = #{cjdId}</if>
             <if test="cjdName != null  and cjdName != ''">and s.cjd_name like concat('%', #{cjdName}, '%')</if>
             <if test="isMeet != null  and isMeet != ''">and s.is_meet = #{isMeet}</if>
@@ -699,6 +705,7 @@
             <if test="createBy != null">create_by,</if>
             <if test="type != null">type,</if>
             <if test="progress != null">progress,</if>
+            <if test="xmStatus != null">xm_status,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
@@ -748,6 +755,7 @@
             <if test="createBy != null">#{createBy},</if>
             <if test="type != null">#{type},</if>
             <if test="progress != null">#{progress},</if>
+            <if test="xmStatus != null">#{xmStatus},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
@@ -801,6 +809,7 @@
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="type != null">type = #{type},</if>
             <if test="progress != null">progress = #{progress},</if>
+            <if test="xmStatus != null">xm_status = #{xmStatus},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
@@ -819,6 +828,7 @@
         update zsyz_sbbzb
         <trim prefix="SET" suffixOverrides=",">
             <if test="progress != null">progress = #{progress},</if>
+            <if test="xmStatus != null">xm_status = #{xmStatus},</if>
             <if test="cjdId != null">cjd_id = #{cjdId},</if>
             <if test="cjdName != null">cjd_name = #{cjdName},</if>
         </trim>
@@ -836,9 +846,10 @@
         update zsyz_sbbzb
         <trim prefix="SET" suffixOverrides=",">
             <if test="progress != null and progress != ''">progress = #{progress},</if>
+            <if test="xmStatus != null and xmStatus != ''">xm_status = #{xmStatus},</if>
             <if test="shjg != null and shjg != ''">shjg = #{shjg},</if>
-            <if test=" progress == 2">cjd_id = null,</if>
-            <if test=" progress == 2">cjd_name = null,</if>
+            <if test=" progress == 1">cjd_id = null,</if>
+            <if test=" progress == 1">cjd_name = null,</if>
         </trim>
         where id = #{id}
     </update>