|
@@ -2,6 +2,7 @@ package com.zjugis.business.flow.project.service;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.zjugis.business.bean.entity.Contract;
|
|
|
import com.zjugis.business.bean.entity.Project;
|
|
|
import com.zjugis.business.bean.entity.ProjectMilestone;
|
|
@@ -11,6 +12,7 @@ import com.zjugis.business.constants.FlowStatusConstants;
|
|
|
import com.zjugis.business.constants.XmztConstants;
|
|
|
import com.zjugis.business.converter.ProjectStatus.ProjectStatusConvert;
|
|
|
import com.zjugis.business.converter.common.SelectConvert;
|
|
|
+import com.zjugis.business.flow.contractRenew.entity.ContractRenewDO;
|
|
|
import com.zjugis.business.flow.project.controller.vo.ProjectVO;
|
|
|
import com.zjugis.business.mapper.ProjectMapper;
|
|
|
import com.zjugis.business.service.ContractService;
|
|
@@ -160,11 +162,22 @@ public class FlowProjectService {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
- public int updateById(Project project) {
|
|
|
- int res = projectMapper.updateById(project);
|
|
|
- String flowDesc = StringUtils.join(Arrays.asList(project.getXmmc(), project.getLxsj(), project.getXmjl()), "/");
|
|
|
- workflowClient.saveFlowDescribe(project.getInstanceId(), flowDesc);
|
|
|
- return res;
|
|
|
+ public Map updateById(Project project) {
|
|
|
+ Map map=new HashMap();
|
|
|
+ QueryWrapper<Project> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("xmmc", project.getXmmc()).ne("id",project.getId()).eq("FLOW_STATUS","90");
|
|
|
+ Project entity = projectMapper.selectOne(queryWrapper);
|
|
|
+ if(entity!=null){
|
|
|
+ map.put("code",999);
|
|
|
+ map.put("msg","项目名称已存在,请重新输入!");
|
|
|
+ }else{
|
|
|
+ int res = projectMapper.updateById(project);
|
|
|
+ String flowDesc = StringUtils.join(Arrays.asList(project.getXmmc(), project.getLxsj(), project.getXmjl()), "/");
|
|
|
+ workflowClient.saveFlowDescribe(project.getInstanceId(), flowDesc);
|
|
|
+ map.put("code",200);
|
|
|
+ map.put("msg","保存成功!");
|
|
|
+ }
|
|
|
+ return map;
|
|
|
}
|
|
|
|
|
|
public ProjectVO flowAdd(String flowInstanceId, String userId) {
|