Merge remote-tracking branch 'origin/master'
# Conflicts: # renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java # renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java
This commit is contained in:
commit
917bd4521e
|
@ -29,18 +29,21 @@
|
|||
<ureport2.version>2.2.9</ureport2.version>
|
||||
<IJPay.version>2.7.1</IJPay.version>
|
||||
<yawei-pso.version>2.0.2</yawei-pso.version>
|
||||
<renren.version>2.9.0</renren.version>
|
||||
<groovy-all.version>2.4.17</groovy-all.version>
|
||||
<pinyin4j.version>2.5.1</pinyin4j.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.renren</groupId>
|
||||
<artifactId>renren-common</artifactId>
|
||||
<version>2.9.0</version>
|
||||
<version>${renren.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.renren</groupId>
|
||||
<artifactId>renren-dynamic-datasource</artifactId>
|
||||
<version>2.9.0</version>
|
||||
<version>${renren.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
|
@ -179,7 +182,7 @@
|
|||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<version>2.4.17</version>
|
||||
<version>${groovy-all.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
|
@ -213,43 +216,110 @@
|
|||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<version>${pinyin4j.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker.plugin.version}</version>
|
||||
<configuration>
|
||||
<imageName>renren/${project.artifactId}</imageName>
|
||||
<dockerDirectory>${project.basedir}/</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
<directory>src/main/resources</directory>
|
||||
<excludes>
|
||||
<!-- 排除生产环境配置 -->
|
||||
<exclude>application-prod.yml</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>application.properties</include>
|
||||
<include>application-${profile.env}.properties</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<classesDirectory>target/classes/</classesDirectory>
|
||||
<archive>
|
||||
<!--生成的jar包不包含maven描述相关文件-->
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
<manifest>
|
||||
<!--项目启动类-->
|
||||
<mainClass>io.renren.AdminApplication</mainClass>
|
||||
<useUniqueVersions>false</useUniqueVersions>
|
||||
<!--第三方JAR加入类构建的路径maven-dependency-plugin-->
|
||||
<addClasspath>true</addClasspath>
|
||||
<!--外部依赖jar包的位置-->
|
||||
<classpathPrefix>lib/</classpathPrefix>
|
||||
</manifest>
|
||||
<manifestEntries>
|
||||
<Class-Path>.</Class-Path>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!--关键插件,maven提供的assembly插件,需要放在最后-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-tar.gz</id>
|
||||
<!--绑定的maven操作-->
|
||||
<phase>package</phase>
|
||||
<!--运行一次-->
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
|
||||
<!--如果不想在打包的后缀加上assembly.xml中设置的id,可以加上下面的配置-->
|
||||
<!--<appendAssemblyId>false</appendAssemblyId>-->
|
||||
|
||||
<!--指定assembly插件对应的assembly.xml配置文件-->
|
||||
<descriptors>
|
||||
<descriptor>src/main/resources/assembly/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <includeSystemScope>true</includeSystemScope>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-surefire-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <skipTests>true</skipTests>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>com.spotify</groupId>-->
|
||||
<!-- <artifactId>docker-maven-plugin</artifactId>-->
|
||||
<!-- <version>${docker.plugin.version}</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <imageName>renren/${project.artifactId}</imageName>-->
|
||||
<!-- <dockerDirectory>${project.basedir}/</dockerDirectory>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <targetPath>/</targetPath>-->
|
||||
<!-- <directory>${project.build.directory}</directory>-->
|
||||
<!-- <include>${project.build.finalName}.jar</include>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </plugin>-->
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -80,6 +80,10 @@ public class AbilityCenterController {
|
|||
tAbilityApplicationDTO.setResourceId(index.get("resourceId"));
|
||||
tAbilityApplicationDTO.setUser(abilityBatchApplicationDTO.getUser());
|
||||
tAbilityApplicationDTO.setSystem(index.get("resourceName"));
|
||||
tAbilityApplicationDTO.setEnclosure(abilityBatchApplicationDTO.getEnclosure()); // 附件
|
||||
tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId());
|
||||
tAbilityApplicationDTO.setApproveStatus("审核中");
|
||||
tAbilityApplicationDTO.setDelFlag(0);
|
||||
// 仿照请求接口 /processForm/tabilityapplication
|
||||
ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class);
|
||||
tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据
|
||||
|
|
|
@ -74,6 +74,7 @@ public class ResourceMountController {
|
|||
tResourceMountApplyDTO.setParameterContent(JSONObject.toJSONString(index));
|
||||
tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index)));
|
||||
tResourceMountApplyDTO.setResourceDTO(index);
|
||||
tResourceMountApplyDTO.setEnclosure(index.getEnclosure());
|
||||
|
||||
ValidatorUtils.validateEntity(tResourceMountApplyDTO, AddGroup.class, DefaultGroup.class);
|
||||
tResourceMountApplyService.save(tResourceMountApplyDTO); // 保存单条资源申请记录
|
||||
|
|
|
@ -6,6 +6,8 @@ import io.renren.modules.activiti.dto.ProcessInstanceDTO;
|
|||
import io.renren.modules.activiti.dto.TaskDTO;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
|
||||
import io.renren.modules.resourceMountApply.service.TResourceMountApplyService;
|
||||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.renren.modules.sys.dto.SysUserDTO;
|
||||
import io.renren.modules.sys.service.SysUserService;
|
||||
|
@ -65,6 +67,9 @@ public class ActHistoryService {
|
|||
@Autowired
|
||||
protected TaskService taskService;
|
||||
|
||||
@Autowired
|
||||
private TResourceMountApplyService tResourceMountApplyService;
|
||||
|
||||
@Autowired
|
||||
private SysUserService sysUserService;
|
||||
|
||||
|
@ -257,6 +262,12 @@ public class ActHistoryService {
|
|||
if (abilityApplicationDTO1 != null) {
|
||||
dto.setName(abilityApplicationDTO1.getSystem());
|
||||
dto.setResourceId(abilityApplicationDTO.getResourceId());
|
||||
} else {
|
||||
TResourceMountApplyDTO resourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(dto.getBusinessKey()));
|
||||
if (resourceMountApplyDTO != null) {
|
||||
dto.setName(resourceMountApplyDTO.getResourceDTO().getName());
|
||||
dto.setResourceId(resourceMountApplyDTO.getResourceDTO().getId().toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dto.isEnded()) { // 已结束
|
||||
|
|
|
@ -48,7 +48,8 @@ public class TDemandDataController {
|
|||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "creator", value = "创建者id", paramType = "query", dataType = "Long"),
|
||||
@ApiImplicitParam(name = "flag", value = "状态", paramType = "query", dataType = "Int"),
|
||||
@ApiImplicitParam(name = "detailsType", value = "需求类型", paramType = "query", dataType = "String")
|
||||
@ApiImplicitParam(name = "detailsType", value = "需求类型", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = Constant.SEARCHKEY, value = "模糊查询关键字", paramType = "query", dataType = "String")
|
||||
})
|
||||
// @RequiresPermissions("demanData:tdemanddata:page")
|
||||
public Result<PageData<TDemandDataDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package io.renren.modules.demanData.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.renren.common.constant.Constant;
|
||||
import io.renren.common.service.impl.CrudServiceImpl;
|
||||
import io.renren.modules.demanData.dao.TDemandDataDao;
|
||||
import io.renren.modules.demanData.dto.TDemandDataDTO;
|
||||
|
@ -34,6 +35,9 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
|
|||
case "detailsType":
|
||||
wrapper.eq("details_type", params.get("detailsType").toString());
|
||||
break;
|
||||
case Constant.SEARCHKEY:
|
||||
wrapper.like("demand_subject", params.get(Constant.SEARCHKEY));
|
||||
break;
|
||||
}
|
||||
});
|
||||
if (!params.containsKey("creator")) {
|
||||
|
|
|
@ -15,6 +15,7 @@ import io.renren.modules.demanData.service.TDemandDataService;
|
|||
import io.renren.modules.demandComment.dto.TDemandCommentDTO;
|
||||
import io.renren.modules.demandComment.excel.TDemandCommentExcel;
|
||||
import io.renren.modules.demandComment.service.TDemandCommentService;
|
||||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
@ -26,6 +27,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -50,21 +52,51 @@ public class TDemandCommentController {
|
|||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "targetId", value = "评论主题id", paramType = "query", dataType = "Long")
|
||||
@ApiImplicitParam(name = "targetId", value = "评论主题id", paramType = "query", dataType = "Long"),
|
||||
@ApiImplicitParam(name = Constant.SEARCHKEY, value = "模糊查询关键字", paramType = "query", dataType = "String")
|
||||
})
|
||||
// @RequiresPermissions("demandComment:tdemandcomment:page")
|
||||
public Result<PageData<TDemandCommentDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
PageData<TDemandCommentDTO> page = tDemandCommentService.page(params);
|
||||
page.setList(page.getList().stream().map(index -> {
|
||||
index.setDemandDataDTO(tDemandDataService.get(index.getTargetId()));
|
||||
return index;
|
||||
}).collect(Collectors.toList()));
|
||||
|
||||
return new Result<PageData<TDemandCommentDTO>>().ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("/myComment/page")
|
||||
@ApiOperation("我的评论分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "targetId", value = "评论主题id", paramType = "query", dataType = "Long"),
|
||||
@ApiImplicitParam(name = Constant.SEARCHKEY, value = "模糊查询关键字", paramType = "query", dataType = "String")
|
||||
})
|
||||
// @RequiresPermissions("demandComment:tdemandcomment:page")
|
||||
public Result<PageData<TDemandCommentDTO>> myCommentPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
params.put("creator", SecurityUser.getUserId()); //
|
||||
PageData<TDemandCommentDTO> page = tDemandCommentService.page(params);
|
||||
page.setList(page.getList().stream().map(index -> {
|
||||
index.setDemandDataDTO(tDemandDataService.get(index.getTargetId()));
|
||||
return index;
|
||||
}).collect(Collectors.toList()));
|
||||
|
||||
return new Result<PageData<TDemandCommentDTO>>().ok(page);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation("信息")
|
||||
// @RequiresPermissions("demandComment:tdemandcomment:info")
|
||||
public Result<TDemandCommentDTO> get(@PathVariable("id") Long id) {
|
||||
TDemandCommentDTO data = tDemandCommentService.get(id);
|
||||
|
||||
data.setDemandDataDTO(tDemandDataService.get(data.getTargetId()));
|
||||
|
||||
return new Result<TDemandCommentDTO>().ok(data);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package io.renren.modules.demandComment.dto;
|
||||
|
||||
import io.renren.modules.demanData.dto.TDemandDataDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
@ -42,4 +43,7 @@ public class TDemandCommentDTO implements Serializable {
|
|||
@ApiModelProperty(value = "备用字段")
|
||||
private String note5;
|
||||
|
||||
@ApiModelProperty(value = "评论所属需求主题")
|
||||
private TDemandDataDTO demandDataDTO;
|
||||
|
||||
}
|
|
@ -1,14 +1,20 @@
|
|||
package io.renren.modules.demandComment.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import io.renren.common.constant.Constant;
|
||||
import io.renren.common.service.impl.CrudServiceImpl;
|
||||
import io.renren.modules.demanData.service.TDemandDataService;
|
||||
import io.renren.modules.demandComment.dao.TDemandCommentDao;
|
||||
import io.renren.modules.demandComment.dto.TDemandCommentDTO;
|
||||
import io.renren.modules.demandComment.entity.TDemandCommentEntity;
|
||||
import io.renren.modules.demandComment.service.TDemandCommentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 需求评论
|
||||
|
@ -18,13 +24,33 @@ import java.util.Map;
|
|||
*/
|
||||
@Service
|
||||
public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao, TDemandCommentEntity, TDemandCommentDTO> implements TDemandCommentService {
|
||||
@Autowired
|
||||
private TDemandDataService tDemandDataService;
|
||||
|
||||
@Override
|
||||
public QueryWrapper<TDemandCommentEntity> getWrapper(Map<String, Object> params) {
|
||||
QueryWrapper<TDemandCommentEntity> wrapper = new QueryWrapper<>();
|
||||
if (params.containsKey("targetId")) {
|
||||
params.keySet().stream().filter(index -> null != params.get(index)).forEach(index -> {
|
||||
switch (index) {
|
||||
case "targetId":
|
||||
wrapper.eq("target_id", params.get("targetId"));
|
||||
break;
|
||||
case "creator":
|
||||
wrapper.eq(StringUtils.isNotBlank(params.get("creator").toString()), "creator", params.get("creator").toString());
|
||||
break;
|
||||
case Constant.SEARCHKEY: {
|
||||
wrapper
|
||||
.in(StringUtils.isNotBlank(params.get("searchKey").toString()), "target_id", tDemandDataService.list(new HashMap<String, Object>() {
|
||||
{
|
||||
put(Constant.SEARCHKEY, params.get(Constant.SEARCHKEY).toString());
|
||||
}
|
||||
}).stream().map(index_ -> index_.getId()).collect(Collectors.toList()).toArray()) // 需求主题
|
||||
.or().like("comment", params.get(Constant.SEARCHKEY).toString()); // 评论内容
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
wrapper.orderByDesc("create_date");
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import io.swagger.annotations.Api;
|
|||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
|
|
@ -42,4 +42,13 @@ public class TAbilityApplicationDTO implements Serializable {
|
|||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "审核状态:审核中,通过,不通过")
|
||||
private String approveStatus;
|
||||
|
||||
@ApiModelProperty(value = "删除标记:0:正常使用;1:已删除;9:其他")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty(value = "附件")
|
||||
private String enclosure;
|
||||
|
||||
}
|
|
@ -38,4 +38,13 @@ public class TAbilityBatchApplicationDTO implements Serializable {
|
|||
private String resourceId;
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "审核状态:审核中,通过,不通过")
|
||||
private String approveStatus;
|
||||
|
||||
@ApiModelProperty(value = "删除标记:0:正常使用;1:已删除;9:其他")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty(value = "附件")
|
||||
private String enclosure;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,21 @@ public class TAbilityApplicationEntity {
|
|||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 审核状态:审核中,通过,不通过
|
||||
*/
|
||||
private String approveStatus;
|
||||
|
||||
/**
|
||||
* 删除标记:0:正常使用;1:已删除;9:其他
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String enclosure;
|
||||
|
||||
/**
|
||||
* 流程通过后api网关注册的认证code,用于三方接口调用
|
||||
*/
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package io.renren.modules.processForm.listener;
|
||||
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.service.ApiGatewayService;
|
||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||
import io.renren.modules.resource.dto.ResourceDTO;
|
||||
import io.renren.modules.resource.entity.ResourceEntity;
|
||||
import io.renren.modules.resource.service.ResourceService;
|
||||
|
@ -57,6 +57,8 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
|
||||
@Autowired
|
||||
private ResourceService resourceService;
|
||||
@Autowired
|
||||
private TAbilityApplicationService tAbilityApplicationService;
|
||||
|
||||
@Override
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
|
@ -66,9 +68,6 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
case EVENTNAME_CREATE:
|
||||
create(delegateTask);
|
||||
break;
|
||||
case EVENTNAME_COMPLETE:
|
||||
complete(delegateTask);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
logger.error("-------------------------结束部门动态审批人流程-------------------------------");
|
||||
|
@ -76,12 +75,14 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
|
||||
@Override
|
||||
public void notify(DelegateExecution delegateExecution) throws Exception {
|
||||
// logger.error("事件:" + delegateExecution.getEventName());
|
||||
// delegateExecution.getVariableNames().stream().forEach(index -> logger.error("variable:" + index));
|
||||
// delegateExecution.getVariables().values().stream().filter(index -> index != null).forEach(value -> logger.error(value.toString()));
|
||||
// // taskService.setAssignee(delegateExecution.getProcessInstanceId(), "1516307964617076737");// 可以设置
|
||||
//
|
||||
// logger.error("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey());
|
||||
logger.error("----------------------进入部门审批结束节点---------------------------");
|
||||
delegateExecution.getProcessBusinessKey();
|
||||
final String eventName = delegateExecution.getEventName();
|
||||
switch (eventName) {
|
||||
case EVENTNAME_END:
|
||||
endTake(delegateExecution.getVariables());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -100,6 +101,24 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
logger.error("异常", delegateExecution);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 结束审批
|
||||
*
|
||||
* @param kv
|
||||
*/
|
||||
private void endTake(Map<String, Object> kv) { // 进入最后结束节点
|
||||
Gson gson = new Gson();
|
||||
JsonElement jsonElement = gson.toJsonTree(kv);
|
||||
TAbilityApplicationDTO abilityApplicationDTO = gson.fromJson(jsonElement, TAbilityApplicationDTO.class);
|
||||
if (abilityApplicationDTO != null) {
|
||||
abilityApplicationDTO.setDelFlag(0);
|
||||
abilityApplicationDTO.setApproveStatus("通过");
|
||||
tAbilityApplicationService.update(abilityApplicationDTO);
|
||||
logger.error("审批通过!申请id:" + abilityApplicationDTO.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 节点创建时动态分配资源部门审核人
|
||||
*
|
||||
|
|
|
@ -90,4 +90,7 @@ public class ResourceDTO implements Serializable {
|
|||
@ApiModelProperty(value = "属性信息")
|
||||
private List<AttrEntity> infoList;
|
||||
|
||||
@ApiModelProperty(value = "附件")
|
||||
private String enclosure;
|
||||
|
||||
}
|
|
@ -128,4 +128,10 @@ public class ResourceEntity extends BaseEntity {
|
|||
* 备用字段
|
||||
*/
|
||||
private String note5;
|
||||
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String enclosure;
|
||||
}
|
|
@ -77,7 +77,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
// .orderByDesc("create_date")
|
||||
// .eq(StringUtils.isNotBlank(params.get("creator").toString()),"creator", params.get("creator").toString())
|
||||
// .eq("del_flag", 0);
|
||||
wrapper.orderByDesc("create_date").eq("del_flag", 0);
|
||||
wrapper.orderByDesc("create_date");
|
||||
if (!params.containsKey("creator")) {
|
||||
wrapper.eq("del_flag", params.get("del_flag") == null ? 0 : Integer.valueOf(params.get("del_flag").toString()));
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,4 +33,7 @@ public class TResourceBatchMountApplyDTO implements Serializable {
|
|||
@ApiModelProperty(value = "资源信息的信息")
|
||||
private List<ResourceDTO> resourceDTO;
|
||||
|
||||
@ApiModelProperty(value = "附件")
|
||||
private String enclosure;
|
||||
|
||||
}
|
||||
|
|
|
@ -40,6 +40,9 @@ public class TResourceMountApplyDTO implements Serializable {
|
|||
@ApiModelProperty(value = "申请的资源信息")
|
||||
private ResourceDTO resourceDTO;
|
||||
|
||||
@ApiModelProperty(value = "附件")
|
||||
private String enclosure;
|
||||
|
||||
public ResourceDTO getResourceDTO() {
|
||||
if (this.parameterContent != null) {
|
||||
return JSON.parseObject(this.parameterContent, ResourceDTO.class);
|
||||
|
|
|
@ -52,4 +52,9 @@ public class TResourceMountApplyEntity extends BaseEntity {
|
|||
* 参数内容 md5
|
||||
*/
|
||||
private String parameterContentMd5;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String enclosure;
|
||||
}
|
|
@ -53,10 +53,11 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
|||
@Override
|
||||
public void notify(DelegateExecution execution) throws Exception {
|
||||
logger.error("----------------------进入审批通过节点---------------------------");
|
||||
logger.error("事件类型:" + execution.getEventName());
|
||||
final String eventName = execution.getEventName();
|
||||
|
||||
switch (eventName) {
|
||||
case EVENTNAME_TAKE: {
|
||||
case EVENTNAME_END: {
|
||||
endTake(execution.getVariables());
|
||||
}
|
||||
break;
|
||||
|
@ -120,6 +121,8 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
|||
if (re != null) {
|
||||
re.setDelFlag(0);
|
||||
resourceService.update(re);
|
||||
logger.error("审批通过!资源id:" + re.getId());
|
||||
apiGatewayService.registerApi2Gateway(String.valueOf(re.getId())); // 发布到应用网关
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +168,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
|||
userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); // 搜出审批人
|
||||
}
|
||||
if (userDTO != null) {
|
||||
logger.error("审批人id:" + userDTO.getId());
|
||||
logger.error("审批人id:" + userDTO.getId() + "姓名:" + userDTO.getRealName());
|
||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||
} else {
|
||||
logger.error("未查到该部门对应的 " + roleName);
|
||||
|
@ -174,7 +177,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
|||
} else if (resourceMountApplyDTO.getDeptId() != null) {
|
||||
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(Long.valueOf(resourceMountApplyDTO.getDeptId()), roleDTO.getId());
|
||||
if (userDTO != null) {
|
||||
logger.error("审批人id:" + userDTO.getId());
|
||||
logger.error("审批人id:" + userDTO.getId() + "姓名:" + userDTO.getRealName());
|
||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||
} else {
|
||||
taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
|
||||
|
@ -187,7 +190,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
|||
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
|
||||
|
||||
if (userDTO != null) {
|
||||
logger.error("大数据审批人id:" + userDTO.getId());
|
||||
logger.error("大数据审批人id:" + userDTO.getId() + "姓名:" + userDTO.getRealName());
|
||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||
} else {
|
||||
taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
|
||||
<!--必填,会追加到打包文件名称的末尾-->
|
||||
<id>1.0</id>
|
||||
<!--打包类型,可以设置多种类型,打包的时候不同的类型都会打包打出来-->
|
||||
<formats>
|
||||
<format>tar.gz</format>
|
||||
<!--<format>zip</format>-->
|
||||
</formats>
|
||||
<!--第三方依赖设置-->
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<!-- 是否把当前项目的输出jar包并使用,true则会把当前项目输出为jar包到输出目录,false不输出 -->
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<scope>system</scope>
|
||||
<!-- 依赖输出目录,相对输出目录的根目录,当前示例把依赖输出到lib目录 -->
|
||||
<outputDirectory>lib</outputDirectory>
|
||||
</dependencySet>
|
||||
<dependencySet>
|
||||
<!-- 是否把当前项目的输出jar包并使用,true则会把当前项目输出为jar包到输出目录,false不输出 -->
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<scope>runtime</scope>
|
||||
<!-- 依赖输出目录,相对输出目录的根目录,当前示例把依赖输出到lib目录 -->
|
||||
<outputDirectory>lib</outputDirectory>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
<!--文件相关设置-->
|
||||
<fileSets>
|
||||
<!--src/main/assembly/bin文件下的所有脚本文件输出到打包后的bin目录下-->
|
||||
<fileSet>
|
||||
<directory>src/main/resources/assembly/bin</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<!--
|
||||
权限设置:
|
||||
0755->即用户具有读/写/执行权限,组用户和其它用户具有读写权限;
|
||||
0644->即用户具有读写权限,组用户和其它用户具有只读权限;
|
||||
-->
|
||||
<fileMode>0755</fileMode>
|
||||
<lineEnding>unix</lineEnding>
|
||||
<filtered>true</filtered>
|
||||
</fileSet>
|
||||
|
||||
<!-- src/main/resources/config目录下配置文件打包到config目录下 -->
|
||||
<fileSet>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>*.yml</include>
|
||||
<include>*.properties</include>
|
||||
<include>*.json</include>
|
||||
</includes>
|
||||
<filtered>true</filtered>
|
||||
<outputDirectory>${file.separator}config</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<!-- 将target目录下的启动jar打包到目录下-->
|
||||
<fileSet>
|
||||
<directory>target</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>*.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
|
@ -0,0 +1,40 @@
|
|||
#! /bin/bash
|
||||
#chkconfig: 2345 85 15
|
||||
#description:auto_run
|
||||
#processname:zf
|
||||
#JAR根位置
|
||||
JAR_ROOT=`pwd`
|
||||
#JAR位置
|
||||
JAR_PATH="$JAR_ROOT"/renren-admin.jar
|
||||
|
||||
#LOG位置
|
||||
LOG_PATH=/dev/null
|
||||
|
||||
#开始方法
|
||||
start() {
|
||||
cd $JAR_ROOT
|
||||
nohup java -Dfile.encoding=utf-8 -server -Xms256m -Xmx1g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./ -jar $JAR_PATH >$LOG_PATH 2>&1 &
|
||||
echo "$JAR_PATH start success."
|
||||
}
|
||||
|
||||
#结束方法
|
||||
stop() {
|
||||
kill -9 `ps -ef|grep $JAR_PATH|grep -v grep|grep -v stop|awk '{print $2}'`
|
||||
echo "$JAR_PATH stop success."
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Userage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
|
@ -12,7 +12,7 @@
|
|||
<file>${LOG_HOME}/info.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_HOME}/info.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<MaxHistory>120</MaxHistory>
|
||||
<MaxHistory>12</MaxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
|
@ -27,9 +27,9 @@
|
|||
<file>${LOG_HOME}/error.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_HOME}/error.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<MaxHistory>120</MaxHistory>
|
||||
<MaxHistory>12</MaxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<!-- 过滤日志 -->
|
||||
|
|
|
@ -2,9 +2,12 @@ package io.renren.common.constant;
|
|||
|
||||
/**
|
||||
* 常量
|
||||
*
|
||||
*/
|
||||
public interface Constant {
|
||||
/**
|
||||
* 模糊查询时key
|
||||
*/
|
||||
String SEARCHKEY = "searchKey";
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue