Commit ada40899 authored by sml's avatar sml

冲突解决

parent 2bc8399b
......@@ -50,108 +50,113 @@ public class DmpNavigationTreeController {
public DmpNavigationTree selectOne(Integer id) {
return this.dmpNavigationTreeService.queryById(id);
}
/**列表查询DMP资源导航树
* @param dmpNavigationTreeRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/findList")
@ApiOperation(value = "列表查询DMP资源导航树", notes = "列表查询DMP资源导航树")
public BaseBeanResponse<DmpNavigationTreeDto> findList(@RequestBody DmpNavigationTreeRequest dmpNavigationTreeRequest, HttpServletRequest httpRequest){
BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponse = new BaseBeanResponse<DmpNavigationTreeDto>();
try {
baseBeanResponse = dmpNavigationTreeService.findList(dmpNavigationTreeRequest, httpRequest);
} catch (Exception e) {
baseBeanResponse.setMessage("查询失败");
baseBeanResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
/**新增DMP资源导航树
* @param dmpNavigationTreeRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/add")
@ApiOperation(value = "新增DMP资源导航树", notes = "新增DMP资源导航树")
public BaseBeanResponse<DmpNavigationTree> add(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest)throws Exception{
BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>();
//树名称去重
DmpNavigationTreeRequest dmpNavigationTreeRequest = new DmpNavigationTreeRequest();
dmpNavigationTreeRequest.setName(dmpNavigationTree.getName());
BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponseRe = dmpNavigationTreeService.findList(dmpNavigationTreeRequest, httpRequest);
if (baseBeanResponseRe.getDatas()!=null && baseBeanResponseRe.getDatas().size()>0) {
baseBeanResponse.setCode(StatuConstant.CODE_ERROR_PARAMETER);
baseBeanResponse.setMessage("树名称不能重复");
return baseBeanResponse;
}
try {
DmpNavigationTree dmpNavigationTreeDb = dmpNavigationTreeService.insert(dmpNavigationTree);
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("新增成功");
baseBeanResponse.setData(dmpNavigationTreeDb);
} catch (Exception e) {
baseBeanResponse.setMessage("新增失败");
baseBeanResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
/**删除DMP资源导航树
* @param id
* @return
*/
@MethodCallLogPrint
@RequestMapping(method = RequestMethod.GET, value = "/deleteById")
@ApiOperation(value = "删除DMP资源导航树", notes = "删除DMP资源导航树")
@ApiImplicitParam(name = "id", value = "DMP资源导航树主键")
public BaseResponse deleteById(@RequestParam(name = "id", required = true ) Integer id, HttpServletRequest httpRequest){
BaseResponse baseResponse = new BaseResponse();
try {
boolean flag = dmpNavigationTreeService.deleteById(id);
if (flag) {
baseResponse.setMessage("删除成功");
baseResponse.setCode(StatuConstant.SUCCESS_CODE);
} else {
baseResponse.setMessage("删除失败");
baseResponse.setCode(StatuConstant.FAILURE_CODE);
}
} catch (Exception e) {
baseResponse.setMessage("删除失败");
baseResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseResponse;
}
/**修改DMP资源导航树
* @param dmpNavigationTreeRequest
* @return
*/
@MethodCallLogPrint
@RequestMapping(method = RequestMethod.POST, value = "/edit")
@ApiOperation(value = "修改DMP资源导航树", notes = "修改DMP资源导航树")
public BaseBeanResponse<DmpNavigationTree> edit(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest){
BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>();
try {
DmpNavigationTree dmpNavigationTreeDb = dmpNavigationTreeService.update(dmpNavigationTree);
baseBeanResponse.setMessage("修改成功");
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setData(dmpNavigationTreeDb);
} catch (Exception e) {
baseBeanResponse.setMessage("修改失败");
baseBeanResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
/**
* 列表查询DMP资源导航树
*
* @param dmpNavigationTreeRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/findList")
@ApiOperation(value = "列表查询DMP资源导航树", notes = "列表查询DMP资源导航树")
public BaseBeanResponse<DmpNavigationTreeDto> findList(@RequestBody DmpNavigationTreeRequest dmpNavigationTreeRequest, HttpServletRequest httpRequest) {
BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponse = new BaseBeanResponse<DmpNavigationTreeDto>();
try {
baseBeanResponse = dmpNavigationTreeService.findList(dmpNavigationTreeRequest, httpRequest);
} catch (Exception e) {
baseBeanResponse.setMessage("查询失败");
baseBeanResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
/**
* 新增DMP资源导航树
*
* @param dmpNavigationTreeRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/add")
@ApiOperation(value = "新增DMP资源导航树", notes = "新增DMP资源导航树")
public BaseBeanResponse<DmpNavigationTree> add(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest) throws Exception {
BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>();
//树名称去重
DmpNavigationTreeRequest dmpNavigationTreeRequest = new DmpNavigationTreeRequest();
dmpNavigationTreeRequest.setName(dmpNavigationTree.getName());
BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponseRe = dmpNavigationTreeService.findList(dmpNavigationTreeRequest, httpRequest);
if (baseBeanResponseRe.getDatas() != null && baseBeanResponseRe.getDatas().size() > 0) {
baseBeanResponse.setCode(StatuConstant.CODE_ERROR_PARAMETER);
baseBeanResponse.setMessage("树名称不能重复");
return baseBeanResponse;
}
try {
DmpNavigationTree dmpNavigationTreeDb = dmpNavigationTreeService.insert(dmpNavigationTree);
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("新增成功");
baseBeanResponse.setData(dmpNavigationTreeDb);
} catch (Exception e) {
baseBeanResponse.setMessage("新增失败");
baseBeanResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
/**
* 删除DMP资源导航树
*
* @param id
* @return
*/
@MethodCallLogPrint
@RequestMapping(method = RequestMethod.GET, value = "/deleteById")
@ApiOperation(value = "删除DMP资源导航树", notes = "删除DMP资源导航树")
@ApiImplicitParam(name = "id", value = "DMP资源导航树主键")
public BaseResponse deleteById(@RequestParam(name = "id", required = true) Integer id, HttpServletRequest httpRequest) {
BaseResponse baseResponse = new BaseResponse();
try {
boolean flag = dmpNavigationTreeService.deleteById(id);
if (flag) {
baseResponse.setMessage("删除成功");
baseResponse.setCode(StatuConstant.SUCCESS_CODE);
} else {
baseResponse.setMessage("删除失败");
baseResponse.setCode(StatuConstant.FAILURE_CODE);
}
} catch (Exception e) {
baseResponse.setMessage("删除失败");
baseResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseResponse;
}
/**
* 修改DMP资源导航树
*
* @param dmpNavigationTreeRequest
* @return
*/
@MethodCallLogPrint
@RequestMapping(method = RequestMethod.POST, value = "/edit")
@ApiOperation(value = "修改DMP资源导航树", notes = "修改DMP资源导航树")
public BaseBeanResponse<DmpNavigationTree> edit(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest) {
BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>();
try {
DmpNavigationTree dmpNavigationTreeDb = dmpNavigationTreeService.update(dmpNavigationTree);
baseBeanResponse.setMessage("修改成功");
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setData(dmpNavigationTreeDb);
} catch (Exception e) {
baseBeanResponse.setMessage("修改失败");
baseBeanResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
}
\ No newline at end of file
package com.jz.dmp.modules.controller.bean;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.BeanUtils;
......@@ -56,6 +58,8 @@ public class MyDmpDevelopTaskConverter {
flowPro.setPublishedToProjectId(dmpDevelopTask.getProjectId().longValue());
//dmp里生成的任务id
flowPro.setTaskId(dmpDevelopTask.getId().longValue());
//dmp生成树ID
flowPro.setTreeId(dmpDevelopTask.getTreeId().longValue());
//是否带版本号进行节点变更查询?
//检查节点名称要用到的参数?
......@@ -71,5 +75,21 @@ public class MyDmpDevelopTaskConverter {
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;
import com.jz.dmp.modules.model.DmpProjectConfigInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**项目配置表Dto
* @author ybz
......@@ -9,5 +10,21 @@ import io.swagger.annotations.ApiModel;
*/
@ApiModel(value = "项目配置表Dto", description = "项目配置表Dto")
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;
}
}
......@@ -154,6 +154,30 @@ public class DmpPublicConfigInfoRequest extends BasePageBean {
*/
@ApiModelProperty(value = "元数据服务web地址")
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;
/**
* 备注
......@@ -394,6 +418,34 @@ public class DmpPublicConfigInfoRequest extends BasePageBean {
public void setAtlasMonitorUrl(String 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() {
return remark;
......
......@@ -17,6 +17,7 @@ import org.springframework.util.StringUtils;
import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.constant.StatuConstant;
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.DmpNavigationTreeRequest;
import com.jz.dmp.modules.controller.bean.MyDmpNavigationTreeConverter;
......@@ -74,6 +75,7 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi
dmpNavigationTree.setCreateUserId(getHttpRequestUserId(null).toString());
// 创建时间
dmpNavigationTree.setCreateTime(new Date());
dmpNavigationTree.setIsLevel("0");
this.dmpNavigationTreeDao.insertSelective(dmpNavigationTree);
return dmpNavigationTree;
}
......@@ -164,9 +166,11 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi
List<DmpNavigationTree> list = dmpNavigationTreeDao.queryAll(dmpNavigationTree);
List<DmpNavigationTreeDto> dtos = MyDmpNavigationTreeConverter.INSTANCE().domain2dto(list);
dtos = dmpArrangeTree(dmpNavigationTreeRequest.getParentId(), dtos);
if (dmpNavigationTreeRequest.getParentId()!=null){
dtos = dmpArrangeTree(dmpNavigationTreeRequest.getParentId(), dtos);
}
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("查询成功");
baseBeanResponse.setDatas(dtos);
......
......@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse;
import com.jz.common.constant.StatuConstant;
import com.jz.common.utils.FlowParseTool;
......@@ -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.dao.DmpProjectDao;
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.DmpProjectSystemInfo;
import com.jz.dmp.modules.model.DmpWorkFlowSubmitDetails;
......@@ -24,6 +26,7 @@ import com.jz.dmp.modules.service.DmpNavigationTreeService;
import com.jz.dmp.modules.service.DmpProjectService;
import com.jz.dmp.modules.service.DmpWorkFlowSubmitDetailsService;
import com.jz.dmp.modules.service.FlowService;
import com.jz.dmp.modules.service.projconfig.DmpProjectConfigInfoService;
/**
* @ClassName: FlowServiceImpl
......@@ -51,6 +54,9 @@ public class FlowServiceImpl implements FlowService {
@Autowired
private DmpWorkFlowSubmitDetailsDao dmpWorkFlowSubmitDetailsDao;
@Autowired
private DmpProjectConfigInfoService dmpProjectConfigInfoService;
/**
*工作流发布
......@@ -63,9 +69,12 @@ public class FlowServiceImpl implements FlowService {
flowPro.setCheckVerion(true);
Long publishedToProjectId = flowPro.getPublishedToProjectId();
DmpProject publishToProject = dmpProjectDao.get(publishedToProjectId);
DmpProjectSystemInfo publishToProjectSystemInfo = dmpProjectService.getProjectSystemInfo(publishedToProjectId);
//DmpProjectConfigInfoDto dmpProjectConfigInfoDto =
//DmpProjectSystemInfo publishToProjectSystemInfo = dmpProjectService.getProjectSystemInfo(publishedToProjectId);
BaseBeanResponse<DmpProjectConfigInfoDto> baseBeanResponse = dmpProjectConfigInfoService.findByProjectId(publishedToProjectId.intValue(), null);
DmpProjectConfigInfoDto dmpProjectConfigInfoDto = baseBeanResponse.getData();
try {
/*
FlowParseTool flowParseTool = new FlowParseTool(flowPro,
publishToProject,
publishToProjectSystemInfo,
......@@ -73,6 +82,15 @@ public class FlowServiceImpl implements FlowService {
dmpNavigationTreeService,
dmpWorkFlowSubmitDetailsService
);
*/
FlowParseTool flowParseTool = new FlowParseTool(flowPro,
publishToProject,
dmpProjectConfigInfoDto,
dmpDevelopTaskService,
dmpNavigationTreeService,
dmpWorkFlowSubmitDetailsService
);
//保存发布信息
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