Commit ada40899 authored by sml's avatar sml

冲突解决

parent 2bc8399b
...@@ -51,13 +51,15 @@ public class DmpNavigationTreeController { ...@@ -51,13 +51,15 @@ public class DmpNavigationTreeController {
return this.dmpNavigationTreeService.queryById(id); return this.dmpNavigationTreeService.queryById(id);
} }
/**列表查询DMP资源导航树 /**
* 列表查询DMP资源导航树
*
* @param dmpNavigationTreeRequest * @param dmpNavigationTreeRequest
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/findList") @RequestMapping(method = RequestMethod.POST, value = "/findList")
@ApiOperation(value = "列表查询DMP资源导航树", notes = "列表查询DMP资源导航树") @ApiOperation(value = "列表查询DMP资源导航树", notes = "列表查询DMP资源导航树")
public BaseBeanResponse<DmpNavigationTreeDto> findList(@RequestBody DmpNavigationTreeRequest dmpNavigationTreeRequest, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpNavigationTreeDto> findList(@RequestBody DmpNavigationTreeRequest dmpNavigationTreeRequest, HttpServletRequest httpRequest) {
BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponse = new BaseBeanResponse<DmpNavigationTreeDto>(); BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponse = new BaseBeanResponse<DmpNavigationTreeDto>();
try { try {
baseBeanResponse = dmpNavigationTreeService.findList(dmpNavigationTreeRequest, httpRequest); baseBeanResponse = dmpNavigationTreeService.findList(dmpNavigationTreeRequest, httpRequest);
...@@ -70,25 +72,25 @@ public class DmpNavigationTreeController { ...@@ -70,25 +72,25 @@ public class DmpNavigationTreeController {
return baseBeanResponse; return baseBeanResponse;
} }
/**新增DMP资源导航树 /**
* 新增DMP资源导航树
*
* @param dmpNavigationTreeRequest * @param dmpNavigationTreeRequest
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/add")
@ApiOperation(value = "新增DMP资源导航树", notes = "新增DMP资源导航树") @ApiOperation(value = "新增DMP资源导航树", notes = "新增DMP资源导航树")
public BaseBeanResponse<DmpNavigationTree> add(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest)throws Exception{ public BaseBeanResponse<DmpNavigationTree> add(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest) throws Exception {
BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>(); BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>();
//树名称去重 //树名称去重
DmpNavigationTreeRequest dmpNavigationTreeRequest = new DmpNavigationTreeRequest(); DmpNavigationTreeRequest dmpNavigationTreeRequest = new DmpNavigationTreeRequest();
dmpNavigationTreeRequest.setName(dmpNavigationTree.getName()); dmpNavigationTreeRequest.setName(dmpNavigationTree.getName());
BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponseRe = dmpNavigationTreeService.findList(dmpNavigationTreeRequest, httpRequest); BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponseRe = dmpNavigationTreeService.findList(dmpNavigationTreeRequest, httpRequest);
if (baseBeanResponseRe.getDatas()!=null && baseBeanResponseRe.getDatas().size()>0) { if (baseBeanResponseRe.getDatas() != null && baseBeanResponseRe.getDatas().size() > 0) {
baseBeanResponse.setCode(StatuConstant.CODE_ERROR_PARAMETER); baseBeanResponse.setCode(StatuConstant.CODE_ERROR_PARAMETER);
baseBeanResponse.setMessage("树名称不能重复"); baseBeanResponse.setMessage("树名称不能重复");
return baseBeanResponse; return baseBeanResponse;
} }
try { try {
DmpNavigationTree dmpNavigationTreeDb = dmpNavigationTreeService.insert(dmpNavigationTree); DmpNavigationTree dmpNavigationTreeDb = dmpNavigationTreeService.insert(dmpNavigationTree);
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE); baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
...@@ -103,7 +105,9 @@ public class DmpNavigationTreeController { ...@@ -103,7 +105,9 @@ public class DmpNavigationTreeController {
return baseBeanResponse; return baseBeanResponse;
} }
/**删除DMP资源导航树 /**
* 删除DMP资源导航树
*
* @param id * @param id
* @return * @return
*/ */
...@@ -111,7 +115,7 @@ public class DmpNavigationTreeController { ...@@ -111,7 +115,7 @@ public class DmpNavigationTreeController {
@RequestMapping(method = RequestMethod.GET, value = "/deleteById") @RequestMapping(method = RequestMethod.GET, value = "/deleteById")
@ApiOperation(value = "删除DMP资源导航树", notes = "删除DMP资源导航树") @ApiOperation(value = "删除DMP资源导航树", notes = "删除DMP资源导航树")
@ApiImplicitParam(name = "id", value = "DMP资源导航树主键") @ApiImplicitParam(name = "id", value = "DMP资源导航树主键")
public BaseResponse deleteById(@RequestParam(name = "id", required = true ) Integer id, HttpServletRequest httpRequest){ public BaseResponse deleteById(@RequestParam(name = "id", required = true) Integer id, HttpServletRequest httpRequest) {
BaseResponse baseResponse = new BaseResponse(); BaseResponse baseResponse = new BaseResponse();
try { try {
boolean flag = dmpNavigationTreeService.deleteById(id); boolean flag = dmpNavigationTreeService.deleteById(id);
...@@ -131,14 +135,16 @@ public class DmpNavigationTreeController { ...@@ -131,14 +135,16 @@ public class DmpNavigationTreeController {
return baseResponse; return baseResponse;
} }
/**修改DMP资源导航树 /**
* 修改DMP资源导航树
*
* @param dmpNavigationTreeRequest * @param dmpNavigationTreeRequest
* @return * @return
*/ */
@MethodCallLogPrint @MethodCallLogPrint
@RequestMapping(method = RequestMethod.POST, value = "/edit") @RequestMapping(method = RequestMethod.POST, value = "/edit")
@ApiOperation(value = "修改DMP资源导航树", notes = "修改DMP资源导航树") @ApiOperation(value = "修改DMP资源导航树", notes = "修改DMP资源导航树")
public BaseBeanResponse<DmpNavigationTree> edit(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpNavigationTree> edit(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest) {
BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>(); BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>();
try { try {
DmpNavigationTree dmpNavigationTreeDb = dmpNavigationTreeService.update(dmpNavigationTree); DmpNavigationTree dmpNavigationTreeDb = dmpNavigationTreeService.update(dmpNavigationTree);
...@@ -153,5 +159,4 @@ public class DmpNavigationTreeController { ...@@ -153,5 +159,4 @@ public class DmpNavigationTreeController {
return baseBeanResponse; return baseBeanResponse;
} }
} }
\ No newline at end of file
package com.jz.dmp.modules.controller.bean; package com.jz.dmp.modules.controller.bean;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -56,6 +58,8 @@ public class MyDmpDevelopTaskConverter { ...@@ -56,6 +58,8 @@ public class MyDmpDevelopTaskConverter {
flowPro.setPublishedToProjectId(dmpDevelopTask.getProjectId().longValue()); flowPro.setPublishedToProjectId(dmpDevelopTask.getProjectId().longValue());
//dmp里生成的任务id //dmp里生成的任务id
flowPro.setTaskId(dmpDevelopTask.getId().longValue()); flowPro.setTaskId(dmpDevelopTask.getId().longValue());
//dmp生成树ID
flowPro.setTreeId(dmpDevelopTask.getTreeId().longValue());
//是否带版本号进行节点变更查询? //是否带版本号进行节点变更查询?
//检查节点名称要用到的参数? //检查节点名称要用到的参数?
...@@ -72,4 +76,20 @@ public class MyDmpDevelopTaskConverter { ...@@ -72,4 +76,20 @@ public class MyDmpDevelopTaskConverter {
return flowPro; return flowPro;
} }
/**
* @Title: scriptToFlowProJson
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param @param script
* @param @return 参数
* @return String 返回类型
* @throws
*/
private String scriptToFlowProJson(String script) {
Map<String, Object> map = new HashMap<String, Object>();
JSONObject jsonObject = JSONObject.parseObject(script);
map.put("flowPro", jsonObject);
return JSONObject.toJSONString(map);
}
} }
...@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.projconfig.bean; ...@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.projconfig.bean;
import com.jz.dmp.modules.model.DmpProjectConfigInfo; import com.jz.dmp.modules.model.DmpProjectConfigInfo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**项目配置表Dto /**项目配置表Dto
* @author ybz * @author ybz
...@@ -10,4 +11,20 @@ import io.swagger.annotations.ApiModel; ...@@ -10,4 +11,20 @@ import io.swagger.annotations.ApiModel;
@ApiModel(value = "项目配置表Dto", description = "项目配置表Dto") @ApiModel(value = "项目配置表Dto", description = "项目配置表Dto")
public class DmpProjectConfigInfoDto extends DmpProjectConfigInfo { public class DmpProjectConfigInfoDto extends DmpProjectConfigInfo {
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "公共配置")
private DmpPublicConfigInfoDto dmpPublicConfigInfoDto;
public DmpPublicConfigInfoDto getDmpPublicConfigInfoDto() {
return dmpPublicConfigInfoDto;
}
public void setDmpPublicConfigInfoDto(DmpPublicConfigInfoDto dmpPublicConfigInfoDto) {
this.dmpPublicConfigInfoDto = dmpPublicConfigInfoDto;
}
} }
...@@ -155,6 +155,30 @@ public class DmpPublicConfigInfoRequest extends BasePageBean { ...@@ -155,6 +155,30 @@ public class DmpPublicConfigInfoRequest extends BasePageBean {
@ApiModelProperty(value = "元数据服务web地址") @ApiModelProperty(value = "元数据服务web地址")
private String atlasMonitorUrl; private String atlasMonitorUrl;
/**
* 远程连接默认SERVER地址
*/
@ApiModelProperty(value = "远程连接默认SERVER地址")
private String shellCmdServer;
/**
* 远程连接默认用户
*/
@ApiModelProperty(value = "远程连接默认用户")
private String shellCmdUser;
/**
* 远程连接默认用户密码
*/
@ApiModelProperty(value = "远程连接默认用户密码")
private String shellCmdPassword;
/**
* 上传配置的SFTP端口
*/
@ApiModelProperty(value = "上传配置的SFTP端口")
private Integer shellSftpPort;
/** /**
* 备注 * 备注
*/ */
...@@ -395,6 +419,34 @@ public class DmpPublicConfigInfoRequest extends BasePageBean { ...@@ -395,6 +419,34 @@ public class DmpPublicConfigInfoRequest extends BasePageBean {
this.atlasMonitorUrl = atlasMonitorUrl; this.atlasMonitorUrl = atlasMonitorUrl;
} }
public void setShellCmdServer(String shellCmdServer) {
this.shellCmdServer = shellCmdServer;
}
public String getShellCmdUser() {
return shellCmdUser;
}
public void setShellCmdUser(String shellCmdUser) {
this.shellCmdUser = shellCmdUser;
}
public String getShellCmdPassword() {
return shellCmdPassword;
}
public void setShellCmdPassword(String shellCmdPassword) {
this.shellCmdPassword = shellCmdPassword;
}
public Integer getShellSftpPort() {
return shellSftpPort;
}
public void setShellSftpPort(Integer shellSftpPort) {
this.shellSftpPort = shellSftpPort;
}
public String getRemark() { public String getRemark() {
return remark; return remark;
} }
......
...@@ -17,6 +17,7 @@ import org.springframework.util.StringUtils; ...@@ -17,6 +17,7 @@ import org.springframework.util.StringUtils;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.common.persistence.BaseService; import com.jz.common.persistence.BaseService;
import com.jz.common.utils.CommonUtils;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto; import com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest; import com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest;
import com.jz.dmp.modules.controller.bean.MyDmpNavigationTreeConverter; import com.jz.dmp.modules.controller.bean.MyDmpNavigationTreeConverter;
...@@ -74,6 +75,7 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi ...@@ -74,6 +75,7 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi
dmpNavigationTree.setCreateUserId(getHttpRequestUserId(null).toString()); dmpNavigationTree.setCreateUserId(getHttpRequestUserId(null).toString());
// 创建时间 // 创建时间
dmpNavigationTree.setCreateTime(new Date()); dmpNavigationTree.setCreateTime(new Date());
dmpNavigationTree.setIsLevel("0");
this.dmpNavigationTreeDao.insertSelective(dmpNavigationTree); this.dmpNavigationTreeDao.insertSelective(dmpNavigationTree);
return dmpNavigationTree; return dmpNavigationTree;
} }
...@@ -165,7 +167,9 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi ...@@ -165,7 +167,9 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi
List<DmpNavigationTreeDto> dtos = MyDmpNavigationTreeConverter.INSTANCE().domain2dto(list); List<DmpNavigationTreeDto> dtos = MyDmpNavigationTreeConverter.INSTANCE().domain2dto(list);
if (dmpNavigationTreeRequest.getParentId()!=null){
dtos = dmpArrangeTree(dmpNavigationTreeRequest.getParentId(), dtos); dtos = dmpArrangeTree(dmpNavigationTreeRequest.getParentId(), dtos);
}
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE); baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("查询成功"); baseBeanResponse.setMessage("查询成功");
......
...@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse; import com.jz.common.bean.BaseResponse;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.common.utils.FlowParseTool; import com.jz.common.utils.FlowParseTool;
...@@ -16,6 +17,7 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro; ...@@ -16,6 +17,7 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.flow.FlowPro;
import com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto; import com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto;
import com.jz.dmp.modules.dao.DmpProjectDao; import com.jz.dmp.modules.dao.DmpProjectDao;
import com.jz.dmp.modules.dao.DmpWorkFlowSubmitDetailsDao; import com.jz.dmp.modules.dao.DmpWorkFlowSubmitDetailsDao;
import com.jz.dmp.modules.dao.projconfig.DmpProjectConfigInfoMapper;
import com.jz.dmp.modules.model.DmpProject; import com.jz.dmp.modules.model.DmpProject;
import com.jz.dmp.modules.model.DmpProjectSystemInfo; import com.jz.dmp.modules.model.DmpProjectSystemInfo;
import com.jz.dmp.modules.model.DmpWorkFlowSubmitDetails; import com.jz.dmp.modules.model.DmpWorkFlowSubmitDetails;
...@@ -24,6 +26,7 @@ import com.jz.dmp.modules.service.DmpNavigationTreeService; ...@@ -24,6 +26,7 @@ import com.jz.dmp.modules.service.DmpNavigationTreeService;
import com.jz.dmp.modules.service.DmpProjectService; import com.jz.dmp.modules.service.DmpProjectService;
import com.jz.dmp.modules.service.DmpWorkFlowSubmitDetailsService; import com.jz.dmp.modules.service.DmpWorkFlowSubmitDetailsService;
import com.jz.dmp.modules.service.FlowService; import com.jz.dmp.modules.service.FlowService;
import com.jz.dmp.modules.service.projconfig.DmpProjectConfigInfoService;
/** /**
* @ClassName: FlowServiceImpl * @ClassName: FlowServiceImpl
...@@ -52,6 +55,9 @@ public class FlowServiceImpl implements FlowService { ...@@ -52,6 +55,9 @@ public class FlowServiceImpl implements FlowService {
@Autowired @Autowired
private DmpWorkFlowSubmitDetailsDao dmpWorkFlowSubmitDetailsDao; private DmpWorkFlowSubmitDetailsDao dmpWorkFlowSubmitDetailsDao;
@Autowired
private DmpProjectConfigInfoService dmpProjectConfigInfoService;
/** /**
*工作流发布 *工作流发布
*/ */
...@@ -63,9 +69,12 @@ public class FlowServiceImpl implements FlowService { ...@@ -63,9 +69,12 @@ public class FlowServiceImpl implements FlowService {
flowPro.setCheckVerion(true); flowPro.setCheckVerion(true);
Long publishedToProjectId = flowPro.getPublishedToProjectId(); Long publishedToProjectId = flowPro.getPublishedToProjectId();
DmpProject publishToProject = dmpProjectDao.get(publishedToProjectId); DmpProject publishToProject = dmpProjectDao.get(publishedToProjectId);
DmpProjectSystemInfo publishToProjectSystemInfo = dmpProjectService.getProjectSystemInfo(publishedToProjectId); //DmpProjectSystemInfo publishToProjectSystemInfo = dmpProjectService.getProjectSystemInfo(publishedToProjectId);
//DmpProjectConfigInfoDto dmpProjectConfigInfoDto = BaseBeanResponse<DmpProjectConfigInfoDto> baseBeanResponse = dmpProjectConfigInfoService.findByProjectId(publishedToProjectId.intValue(), null);
DmpProjectConfigInfoDto dmpProjectConfigInfoDto = baseBeanResponse.getData();
try { try {
/*
FlowParseTool flowParseTool = new FlowParseTool(flowPro, FlowParseTool flowParseTool = new FlowParseTool(flowPro,
publishToProject, publishToProject,
publishToProjectSystemInfo, publishToProjectSystemInfo,
...@@ -73,6 +82,15 @@ public class FlowServiceImpl implements FlowService { ...@@ -73,6 +82,15 @@ public class FlowServiceImpl implements FlowService {
dmpNavigationTreeService, dmpNavigationTreeService,
dmpWorkFlowSubmitDetailsService dmpWorkFlowSubmitDetailsService
); );
*/
FlowParseTool flowParseTool = new FlowParseTool(flowPro,
publishToProject,
dmpProjectConfigInfoDto,
dmpDevelopTaskService,
dmpNavigationTreeService,
dmpWorkFlowSubmitDetailsService
);
//保存发布信息 //保存发布信息
List<FlowNodeChangeInfo> flowNodeChangeList = flowParseTool.getChangedNodes(); List<FlowNodeChangeInfo> flowNodeChangeList = flowParseTool.getChangedNodes();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment