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>
|
<ureport2.version>2.2.9</ureport2.version>
|
||||||
<IJPay.version>2.7.1</IJPay.version>
|
<IJPay.version>2.7.1</IJPay.version>
|
||||||
<yawei-pso.version>2.0.2</yawei-pso.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>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.renren</groupId>
|
<groupId>io.renren</groupId>
|
||||||
<artifactId>renren-common</artifactId>
|
<artifactId>renren-common</artifactId>
|
||||||
<version>2.9.0</version>
|
<version>${renren.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.renren</groupId>
|
<groupId>io.renren</groupId>
|
||||||
<artifactId>renren-dynamic-datasource</artifactId>
|
<artifactId>renren-dynamic-datasource</artifactId>
|
||||||
<version>2.9.0</version>
|
<version>${renren.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
|
@ -179,7 +182,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.codehaus.groovy</groupId>
|
||||||
<artifactId>groovy-all</artifactId>
|
<artifactId>groovy-all</artifactId>
|
||||||
<version>2.4.17</version>
|
<version>${groovy-all.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.activiti</groupId>
|
<groupId>org.activiti</groupId>
|
||||||
|
@ -213,43 +216,110 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.belerweb</groupId>
|
<groupId>com.belerweb</groupId>
|
||||||
<artifactId>pinyin4j</artifactId>
|
<artifactId>pinyin4j</artifactId>
|
||||||
<version>2.5.1</version>
|
<version>${pinyin4j.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<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>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<includeSystemScope>true</includeSystemScope>
|
<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>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<!--关键插件,maven提供的assembly插件,需要放在最后-->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<configuration>
|
<executions>
|
||||||
<skipTests>true</skipTests>
|
<execution>
|
||||||
</configuration>
|
<id>make-tar.gz</id>
|
||||||
</plugin>
|
<!--绑定的maven操作-->
|
||||||
<plugin>
|
<phase>package</phase>
|
||||||
<groupId>com.spotify</groupId>
|
<!--运行一次-->
|
||||||
<artifactId>docker-maven-plugin</artifactId>
|
<goals>
|
||||||
<version>${docker.plugin.version}</version>
|
<goal>single</goal>
|
||||||
<configuration>
|
</goals>
|
||||||
<imageName>renren/${project.artifactId}</imageName>
|
<configuration>
|
||||||
<dockerDirectory>${project.basedir}/</dockerDirectory>
|
|
||||||
<resources>
|
<!--如果不想在打包的后缀加上assembly.xml中设置的id,可以加上下面的配置-->
|
||||||
<resource>
|
<!--<appendAssemblyId>false</appendAssemblyId>-->
|
||||||
<targetPath>/</targetPath>
|
|
||||||
<directory>${project.build.directory}</directory>
|
<!--指定assembly插件对应的assembly.xml配置文件-->
|
||||||
<include>${project.build.finalName}.jar</include>
|
<descriptors>
|
||||||
</resource>
|
<descriptor>src/main/resources/assembly/assembly.xml</descriptor>
|
||||||
</resources>
|
</descriptors>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
|
@ -80,6 +80,10 @@ public class AbilityCenterController {
|
||||||
tAbilityApplicationDTO.setResourceId(index.get("resourceId"));
|
tAbilityApplicationDTO.setResourceId(index.get("resourceId"));
|
||||||
tAbilityApplicationDTO.setUser(abilityBatchApplicationDTO.getUser());
|
tAbilityApplicationDTO.setUser(abilityBatchApplicationDTO.getUser());
|
||||||
tAbilityApplicationDTO.setSystem(index.get("resourceName"));
|
tAbilityApplicationDTO.setSystem(index.get("resourceName"));
|
||||||
|
tAbilityApplicationDTO.setEnclosure(abilityBatchApplicationDTO.getEnclosure()); // 附件
|
||||||
|
tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId());
|
||||||
|
tAbilityApplicationDTO.setApproveStatus("审核中");
|
||||||
|
tAbilityApplicationDTO.setDelFlag(0);
|
||||||
// 仿照请求接口 /processForm/tabilityapplication
|
// 仿照请求接口 /processForm/tabilityapplication
|
||||||
ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class);
|
ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class);
|
||||||
tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据
|
tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据
|
||||||
|
|
|
@ -74,6 +74,7 @@ public class ResourceMountController {
|
||||||
tResourceMountApplyDTO.setParameterContent(JSONObject.toJSONString(index));
|
tResourceMountApplyDTO.setParameterContent(JSONObject.toJSONString(index));
|
||||||
tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index)));
|
tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index)));
|
||||||
tResourceMountApplyDTO.setResourceDTO(index);
|
tResourceMountApplyDTO.setResourceDTO(index);
|
||||||
|
tResourceMountApplyDTO.setEnclosure(index.getEnclosure());
|
||||||
|
|
||||||
ValidatorUtils.validateEntity(tResourceMountApplyDTO, AddGroup.class, DefaultGroup.class);
|
ValidatorUtils.validateEntity(tResourceMountApplyDTO, AddGroup.class, DefaultGroup.class);
|
||||||
tResourceMountApplyService.save(tResourceMountApplyDTO); // 保存单条资源申请记录
|
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.activiti.dto.TaskDTO;
|
||||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
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.security.user.SecurityUser;
|
||||||
import io.renren.modules.sys.dto.SysUserDTO;
|
import io.renren.modules.sys.dto.SysUserDTO;
|
||||||
import io.renren.modules.sys.service.SysUserService;
|
import io.renren.modules.sys.service.SysUserService;
|
||||||
|
@ -65,6 +67,9 @@ public class ActHistoryService {
|
||||||
@Autowired
|
@Autowired
|
||||||
protected TaskService taskService;
|
protected TaskService taskService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TResourceMountApplyService tResourceMountApplyService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysUserService sysUserService;
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
|
@ -257,6 +262,12 @@ public class ActHistoryService {
|
||||||
if (abilityApplicationDTO1 != null) {
|
if (abilityApplicationDTO1 != null) {
|
||||||
dto.setName(abilityApplicationDTO1.getSystem());
|
dto.setName(abilityApplicationDTO1.getSystem());
|
||||||
dto.setResourceId(abilityApplicationDTO.getResourceId());
|
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()) { // 已结束
|
if (dto.isEnded()) { // 已结束
|
||||||
|
|
|
@ -48,7 +48,8 @@ public class TDemandDataController {
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "creator", value = "创建者id", paramType = "query", dataType = "Long"),
|
@ApiImplicitParam(name = "creator", value = "创建者id", paramType = "query", dataType = "Long"),
|
||||||
@ApiImplicitParam(name = "flag", value = "状态", paramType = "query", dataType = "Int"),
|
@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")
|
// @RequiresPermissions("demanData:tdemanddata:page")
|
||||||
public Result<PageData<TDemandDataDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
public Result<PageData<TDemandDataDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package io.renren.modules.demanData.service.impl;
|
package io.renren.modules.demanData.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import io.renren.common.constant.Constant;
|
||||||
import io.renren.common.service.impl.CrudServiceImpl;
|
import io.renren.common.service.impl.CrudServiceImpl;
|
||||||
import io.renren.modules.demanData.dao.TDemandDataDao;
|
import io.renren.modules.demanData.dao.TDemandDataDao;
|
||||||
import io.renren.modules.demanData.dto.TDemandDataDTO;
|
import io.renren.modules.demanData.dto.TDemandDataDTO;
|
||||||
|
@ -34,6 +35,9 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
|
||||||
case "detailsType":
|
case "detailsType":
|
||||||
wrapper.eq("details_type", params.get("detailsType").toString());
|
wrapper.eq("details_type", params.get("detailsType").toString());
|
||||||
break;
|
break;
|
||||||
|
case Constant.SEARCHKEY:
|
||||||
|
wrapper.like("demand_subject", params.get(Constant.SEARCHKEY));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!params.containsKey("creator")) {
|
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.dto.TDemandCommentDTO;
|
||||||
import io.renren.modules.demandComment.excel.TDemandCommentExcel;
|
import io.renren.modules.demandComment.excel.TDemandCommentExcel;
|
||||||
import io.renren.modules.demandComment.service.TDemandCommentService;
|
import io.renren.modules.demandComment.service.TDemandCommentService;
|
||||||
|
import io.renren.modules.security.user.SecurityUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
@ -26,6 +27,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
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.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", 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")
|
// @RequiresPermissions("demandComment:tdemandcomment:page")
|
||||||
public Result<PageData<TDemandCommentDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
public Result<PageData<TDemandCommentDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
PageData<TDemandCommentDTO> page = tDemandCommentService.page(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);
|
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}")
|
@GetMapping("/{id}")
|
||||||
@ApiOperation("信息")
|
@ApiOperation("信息")
|
||||||
// @RequiresPermissions("demandComment:tdemandcomment:info")
|
// @RequiresPermissions("demandComment:tdemandcomment:info")
|
||||||
public Result<TDemandCommentDTO> get(@PathVariable("id") Long id) {
|
public Result<TDemandCommentDTO> get(@PathVariable("id") Long id) {
|
||||||
TDemandCommentDTO data = tDemandCommentService.get(id);
|
TDemandCommentDTO data = tDemandCommentService.get(id);
|
||||||
|
|
||||||
|
data.setDemandDataDTO(tDemandDataService.get(data.getTargetId()));
|
||||||
|
|
||||||
return new Result<TDemandCommentDTO>().ok(data);
|
return new Result<TDemandCommentDTO>().ok(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package io.renren.modules.demandComment.dto;
|
package io.renren.modules.demandComment.dto;
|
||||||
|
|
||||||
|
import io.renren.modules.demanData.dto.TDemandDataDTO;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -8,11 +9,11 @@ import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需求评论
|
* 需求评论
|
||||||
*
|
*
|
||||||
* @author wangliwen wangliwen2@hisense.com
|
* @author wangliwen wangliwen2@hisense.com
|
||||||
* @since 1.0 2022-04-26
|
* @since 1.0 2022-04-26
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "需求评论")
|
@ApiModel(value = "需求评论")
|
||||||
public class TDemandCommentDTO implements Serializable {
|
public class TDemandCommentDTO implements Serializable {
|
||||||
|
@ -42,4 +43,7 @@ public class TDemandCommentDTO implements Serializable {
|
||||||
@ApiModelProperty(value = "备用字段")
|
@ApiModelProperty(value = "备用字段")
|
||||||
private String note5;
|
private String note5;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "评论所属需求主题")
|
||||||
|
private TDemandDataDTO demandDataDTO;
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,14 +1,20 @@
|
||||||
package io.renren.modules.demandComment.service.impl;
|
package io.renren.modules.demandComment.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.common.service.impl.CrudServiceImpl;
|
||||||
|
import io.renren.modules.demanData.service.TDemandDataService;
|
||||||
import io.renren.modules.demandComment.dao.TDemandCommentDao;
|
import io.renren.modules.demandComment.dao.TDemandCommentDao;
|
||||||
import io.renren.modules.demandComment.dto.TDemandCommentDTO;
|
import io.renren.modules.demandComment.dto.TDemandCommentDTO;
|
||||||
import io.renren.modules.demandComment.entity.TDemandCommentEntity;
|
import io.renren.modules.demandComment.entity.TDemandCommentEntity;
|
||||||
import io.renren.modules.demandComment.service.TDemandCommentService;
|
import io.renren.modules.demandComment.service.TDemandCommentService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需求评论
|
* 需求评论
|
||||||
|
@ -18,13 +24,33 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao, TDemandCommentEntity, TDemandCommentDTO> implements TDemandCommentService {
|
public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao, TDemandCommentEntity, TDemandCommentDTO> implements TDemandCommentService {
|
||||||
|
@Autowired
|
||||||
|
private TDemandDataService tDemandDataService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QueryWrapper<TDemandCommentEntity> getWrapper(Map<String, Object> params) {
|
public QueryWrapper<TDemandCommentEntity> getWrapper(Map<String, Object> params) {
|
||||||
QueryWrapper<TDemandCommentEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<TDemandCommentEntity> wrapper = new QueryWrapper<>();
|
||||||
if (params.containsKey("targetId")) {
|
params.keySet().stream().filter(index -> null != params.get(index)).forEach(index -> {
|
||||||
wrapper.eq("target_id", params.get("targetId"));
|
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;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
@ -26,13 +25,13 @@ import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通知管理
|
* 通知管理
|
||||||
*
|
*
|
||||||
* @author Mark sunlightcs@gmail.com
|
* @author Mark sunlightcs@gmail.com
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("sys/notice")
|
@RequestMapping("sys/notice")
|
||||||
@Api(tags="通知管理")
|
@Api(tags = "通知管理")
|
||||||
public class SysNoticeController {
|
public class SysNoticeController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysNoticeService sysNoticeService;
|
private SysNoticeService sysNoticeService;
|
||||||
|
@ -42,13 +41,13 @@ public class SysNoticeController {
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@ApiOperation("分页")
|
@ApiOperation("分页")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
|
@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.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String")
|
||||||
})
|
})
|
||||||
// @RequiresPermissions("sys:notice:all")
|
// @RequiresPermissions("sys:notice:all")
|
||||||
public Result<PageData<SysNoticeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<PageData<SysNoticeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
PageData<SysNoticeDTO> page = sysNoticeService.page(params);
|
PageData<SysNoticeDTO> page = sysNoticeService.page(params);
|
||||||
|
|
||||||
return new Result<PageData<SysNoticeDTO>>().ok(page);
|
return new Result<PageData<SysNoticeDTO>>().ok(page);
|
||||||
|
@ -57,13 +56,13 @@ public class SysNoticeController {
|
||||||
@GetMapping("user/page")
|
@GetMapping("user/page")
|
||||||
@ApiOperation("获取被通知的用户")
|
@ApiOperation("获取被通知的用户")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
|
@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.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String"),
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||||
})
|
})
|
||||||
// @RequiresPermissions("sys:notice:all")
|
// @RequiresPermissions("sys:notice:all")
|
||||||
public Result<PageData<SysNoticeDTO>> userPage(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<PageData<SysNoticeDTO>> userPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
PageData<SysNoticeDTO> page = sysNoticeService.getNoticeUserPage(params);
|
PageData<SysNoticeDTO> page = sysNoticeService.getNoticeUserPage(params);
|
||||||
|
|
||||||
return new Result<PageData<SysNoticeDTO>>().ok(page);
|
return new Result<PageData<SysNoticeDTO>>().ok(page);
|
||||||
|
@ -72,12 +71,12 @@ public class SysNoticeController {
|
||||||
@GetMapping("mynotice/page")
|
@GetMapping("mynotice/page")
|
||||||
@ApiOperation("获取我的通知")
|
@ApiOperation("获取我的通知")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
|
@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.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String"),
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||||
})
|
})
|
||||||
public Result<PageData<SysNoticeDTO>> myNoticePage(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<PageData<SysNoticeDTO>> myNoticePage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
PageData<SysNoticeDTO> page = sysNoticeService.getMyNoticePage(params);
|
PageData<SysNoticeDTO> page = sysNoticeService.getMyNoticePage(params);
|
||||||
|
|
||||||
return new Result<PageData<SysNoticeDTO>>().ok(page);
|
return new Result<PageData<SysNoticeDTO>>().ok(page);
|
||||||
|
@ -85,7 +84,7 @@ public class SysNoticeController {
|
||||||
|
|
||||||
@PutMapping("mynotice/read/{noticeId}")
|
@PutMapping("mynotice/read/{noticeId}")
|
||||||
@ApiOperation("标记我的通知为已读")
|
@ApiOperation("标记我的通知为已读")
|
||||||
public Result read(@PathVariable("noticeId") Long noticeId){
|
public Result read(@PathVariable("noticeId") Long noticeId) {
|
||||||
sysNoticeUserService.updateReadStatus(SecurityUser.getUserId(), noticeId);
|
sysNoticeUserService.updateReadStatus(SecurityUser.getUserId(), noticeId);
|
||||||
|
|
||||||
return new Result();
|
return new Result();
|
||||||
|
@ -93,7 +92,7 @@ public class SysNoticeController {
|
||||||
|
|
||||||
@GetMapping("mynotice/unread")
|
@GetMapping("mynotice/unread")
|
||||||
@ApiOperation("我的通知未读读")
|
@ApiOperation("我的通知未读读")
|
||||||
public Result<Integer> unRead(){
|
public Result<Integer> unRead() {
|
||||||
int count = sysNoticeUserService.getUnReadNoticeCount(SecurityUser.getUserId());
|
int count = sysNoticeUserService.getUnReadNoticeCount(SecurityUser.getUserId());
|
||||||
|
|
||||||
return new Result<Integer>().ok(count);
|
return new Result<Integer>().ok(count);
|
||||||
|
@ -102,7 +101,7 @@ public class SysNoticeController {
|
||||||
@GetMapping("{id}")
|
@GetMapping("{id}")
|
||||||
@ApiOperation("信息")
|
@ApiOperation("信息")
|
||||||
// @RequiresPermissions("sys:notice:all")
|
// @RequiresPermissions("sys:notice:all")
|
||||||
public Result<SysNoticeDTO> get(@PathVariable("id") Long id){
|
public Result<SysNoticeDTO> get(@PathVariable("id") Long id) {
|
||||||
SysNoticeDTO data = sysNoticeService.get(id);
|
SysNoticeDTO data = sysNoticeService.get(id);
|
||||||
|
|
||||||
return new Result<SysNoticeDTO>().ok(data);
|
return new Result<SysNoticeDTO>().ok(data);
|
||||||
|
@ -112,7 +111,7 @@ public class SysNoticeController {
|
||||||
@ApiOperation("保存")
|
@ApiOperation("保存")
|
||||||
@LogOperation("保存")
|
@LogOperation("保存")
|
||||||
// @RequiresPermissions("sys:notice:all")
|
// @RequiresPermissions("sys:notice:all")
|
||||||
public Result save(@RequestBody SysNoticeDTO dto){
|
public Result save(@RequestBody SysNoticeDTO dto) {
|
||||||
//效验数据
|
//效验数据
|
||||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||||
|
|
||||||
|
@ -125,7 +124,7 @@ public class SysNoticeController {
|
||||||
@ApiOperation("修改")
|
@ApiOperation("修改")
|
||||||
@LogOperation("修改")
|
@LogOperation("修改")
|
||||||
// @RequiresPermissions("sys:notice:all")
|
// @RequiresPermissions("sys:notice:all")
|
||||||
public Result update(@RequestBody SysNoticeDTO dto){
|
public Result update(@RequestBody SysNoticeDTO dto) {
|
||||||
//效验数据
|
//效验数据
|
||||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||||
|
|
||||||
|
@ -138,7 +137,7 @@ public class SysNoticeController {
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@LogOperation("删除")
|
@LogOperation("删除")
|
||||||
// @RequiresPermissions("sys:notice:all")
|
// @RequiresPermissions("sys:notice:all")
|
||||||
public Result delete(@RequestBody Long[] ids){
|
public Result delete(@RequestBody Long[] ids) {
|
||||||
//效验数据
|
//效验数据
|
||||||
AssertUtils.isArrayEmpty(ids, "id");
|
AssertUtils.isArrayEmpty(ids, "id");
|
||||||
|
|
||||||
|
|
|
@ -42,4 +42,13 @@ public class TAbilityApplicationDTO implements Serializable {
|
||||||
@ApiModelProperty(value = "用户id")
|
@ApiModelProperty(value = "用户id")
|
||||||
private String userId;
|
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;
|
private String resourceId;
|
||||||
@ApiModelProperty(value = "用户id")
|
@ApiModelProperty(value = "用户id")
|
||||||
private String userId;
|
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 userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态:审核中,通过,不通过
|
||||||
|
*/
|
||||||
|
private String approveStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标记:0:正常使用;1:已删除;9:其他
|
||||||
|
*/
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件
|
||||||
|
*/
|
||||||
|
private String enclosure;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程通过后api网关注册的认证code,用于三方接口调用
|
* 流程通过后api网关注册的认证code,用于三方接口调用
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package io.renren.modules.processForm.listener;
|
package io.renren.modules.processForm.listener;
|
||||||
|
|
||||||
import cn.hutool.core.lang.UUID;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||||
import io.renren.modules.processForm.service.ApiGatewayService;
|
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.dto.ResourceDTO;
|
||||||
import io.renren.modules.resource.entity.ResourceEntity;
|
import io.renren.modules.resource.entity.ResourceEntity;
|
||||||
import io.renren.modules.resource.service.ResourceService;
|
import io.renren.modules.resource.service.ResourceService;
|
||||||
|
@ -57,6 +57,8 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResourceService resourceService;
|
private ResourceService resourceService;
|
||||||
|
@Autowired
|
||||||
|
private TAbilityApplicationService tAbilityApplicationService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notify(DelegateTask delegateTask) {
|
public void notify(DelegateTask delegateTask) {
|
||||||
|
@ -66,9 +68,6 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
||||||
case EVENTNAME_CREATE:
|
case EVENTNAME_CREATE:
|
||||||
create(delegateTask);
|
create(delegateTask);
|
||||||
break;
|
break;
|
||||||
case EVENTNAME_COMPLETE:
|
|
||||||
complete(delegateTask);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
logger.error("-------------------------结束部门动态审批人流程-------------------------------");
|
logger.error("-------------------------结束部门动态审批人流程-------------------------------");
|
||||||
|
@ -76,12 +75,14 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notify(DelegateExecution delegateExecution) throws Exception {
|
public void notify(DelegateExecution delegateExecution) throws Exception {
|
||||||
// logger.error("事件:" + delegateExecution.getEventName());
|
logger.error("----------------------进入部门审批结束节点---------------------------");
|
||||||
// delegateExecution.getVariableNames().stream().forEach(index -> logger.error("variable:" + index));
|
delegateExecution.getProcessBusinessKey();
|
||||||
// delegateExecution.getVariables().values().stream().filter(index -> index != null).forEach(value -> logger.error(value.toString()));
|
final String eventName = delegateExecution.getEventName();
|
||||||
// // taskService.setAssignee(delegateExecution.getProcessInstanceId(), "1516307964617076737");// 可以设置
|
switch (eventName) {
|
||||||
//
|
case EVENTNAME_END:
|
||||||
// logger.error("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey());
|
endTake(delegateExecution.getVariables());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -100,6 +101,24 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
||||||
logger.error("异常", delegateExecution);
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 节点创建时动态分配资源部门审核人
|
* 节点创建时动态分配资源部门审核人
|
||||||
*
|
*
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class ResourceController {
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
@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.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = "type", value = "类型", paramType = "query", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "type", value = "类型", paramType = "query", required = true, dataType = "String"),
|
||||||
@ApiImplicitParam(name = "name", value = "资源名称", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = "name", value = "资源名称", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "creator", value = "创建者用户id", paramType = "query", dataType = "String")
|
@ApiImplicitParam(name = "creator", value = "创建者用户id", paramType = "query", dataType = "String")
|
||||||
|
|
|
@ -90,4 +90,7 @@ public class ResourceDTO implements Serializable {
|
||||||
@ApiModelProperty(value = "属性信息")
|
@ApiModelProperty(value = "属性信息")
|
||||||
private List<AttrEntity> infoList;
|
private List<AttrEntity> infoList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "附件")
|
||||||
|
private String enclosure;
|
||||||
|
|
||||||
}
|
}
|
|
@ -128,4 +128,10 @@ public class ResourceEntity extends BaseEntity {
|
||||||
* 备用字段
|
* 备用字段
|
||||||
*/
|
*/
|
||||||
private String note5;
|
private String note5;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件
|
||||||
|
*/
|
||||||
|
private String enclosure;
|
||||||
}
|
}
|
|
@ -77,7 +77,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
// .orderByDesc("create_date")
|
// .orderByDesc("create_date")
|
||||||
// .eq(StringUtils.isNotBlank(params.get("creator").toString()),"creator", params.get("creator").toString())
|
// .eq(StringUtils.isNotBlank(params.get("creator").toString()),"creator", params.get("creator").toString())
|
||||||
// .eq("del_flag", 0);
|
// .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;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,4 +33,7 @@ public class TResourceBatchMountApplyDTO implements Serializable {
|
||||||
@ApiModelProperty(value = "资源信息的信息")
|
@ApiModelProperty(value = "资源信息的信息")
|
||||||
private List<ResourceDTO> resourceDTO;
|
private List<ResourceDTO> resourceDTO;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "附件")
|
||||||
|
private String enclosure;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,9 @@ public class TResourceMountApplyDTO implements Serializable {
|
||||||
@ApiModelProperty(value = "申请的资源信息")
|
@ApiModelProperty(value = "申请的资源信息")
|
||||||
private ResourceDTO resourceDTO;
|
private ResourceDTO resourceDTO;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "附件")
|
||||||
|
private String enclosure;
|
||||||
|
|
||||||
public ResourceDTO getResourceDTO() {
|
public ResourceDTO getResourceDTO() {
|
||||||
if (this.parameterContent != null) {
|
if (this.parameterContent != null) {
|
||||||
return JSON.parseObject(this.parameterContent, ResourceDTO.class);
|
return JSON.parseObject(this.parameterContent, ResourceDTO.class);
|
||||||
|
|
|
@ -52,4 +52,9 @@ public class TResourceMountApplyEntity extends BaseEntity {
|
||||||
* 参数内容 md5
|
* 参数内容 md5
|
||||||
*/
|
*/
|
||||||
private String parameterContentMd5;
|
private String parameterContentMd5;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件
|
||||||
|
*/
|
||||||
|
private String enclosure;
|
||||||
}
|
}
|
|
@ -53,10 +53,11 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
||||||
@Override
|
@Override
|
||||||
public void notify(DelegateExecution execution) throws Exception {
|
public void notify(DelegateExecution execution) throws Exception {
|
||||||
logger.error("----------------------进入审批通过节点---------------------------");
|
logger.error("----------------------进入审批通过节点---------------------------");
|
||||||
|
logger.error("事件类型:" + execution.getEventName());
|
||||||
final String eventName = execution.getEventName();
|
final String eventName = execution.getEventName();
|
||||||
|
|
||||||
switch (eventName) {
|
switch (eventName) {
|
||||||
case EVENTNAME_TAKE: {
|
case EVENTNAME_END: {
|
||||||
endTake(execution.getVariables());
|
endTake(execution.getVariables());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -120,6 +121,8 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
||||||
if (re != null) {
|
if (re != null) {
|
||||||
re.setDelFlag(0);
|
re.setDelFlag(0);
|
||||||
resourceService.update(re);
|
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()); // 搜出审批人
|
userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); // 搜出审批人
|
||||||
}
|
}
|
||||||
if (userDTO != null) {
|
if (userDTO != null) {
|
||||||
logger.error("审批人id:" + userDTO.getId());
|
logger.error("审批人id:" + userDTO.getId() + "姓名:" + userDTO.getRealName());
|
||||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||||
} else {
|
} else {
|
||||||
logger.error("未查到该部门对应的 " + roleName);
|
logger.error("未查到该部门对应的 " + roleName);
|
||||||
|
@ -174,7 +177,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
||||||
} else if (resourceMountApplyDTO.getDeptId() != null) {
|
} else if (resourceMountApplyDTO.getDeptId() != null) {
|
||||||
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(Long.valueOf(resourceMountApplyDTO.getDeptId()), roleDTO.getId());
|
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(Long.valueOf(resourceMountApplyDTO.getDeptId()), roleDTO.getId());
|
||||||
if (userDTO != null) {
|
if (userDTO != null) {
|
||||||
logger.error("审批人id:" + userDTO.getId());
|
logger.error("审批人id:" + userDTO.getId() + "姓名:" + userDTO.getRealName());
|
||||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||||
} else {
|
} else {
|
||||||
taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
|
taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
|
||||||
|
@ -187,7 +190,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
||||||
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
|
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
|
||||||
|
|
||||||
if (userDTO != null) {
|
if (userDTO != null) {
|
||||||
logger.error("大数据审批人id:" + userDTO.getId());
|
logger.error("大数据审批人id:" + userDTO.getId() + "姓名:" + userDTO.getRealName());
|
||||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||||
} else {
|
} else {
|
||||||
taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
|
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>
|
<file>${LOG_HOME}/info.log</file>
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<fileNamePattern>${LOG_HOME}/info.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
<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">
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||||
<maxFileSize>50MB</maxFileSize>
|
<maxFileSize>50MB</maxFileSize>
|
||||||
</timeBasedFileNamingAndTriggeringPolicy>
|
</timeBasedFileNamingAndTriggeringPolicy>
|
||||||
|
@ -27,9 +27,9 @@
|
||||||
<file>${LOG_HOME}/error.log</file>
|
<file>${LOG_HOME}/error.log</file>
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<fileNamePattern>${LOG_HOME}/error.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
<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">
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||||
<maxFileSize>500MB</maxFileSize>
|
<maxFileSize>50MB</maxFileSize>
|
||||||
</timeBasedFileNamingAndTriggeringPolicy>
|
</timeBasedFileNamingAndTriggeringPolicy>
|
||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
<!-- 过滤日志 -->
|
<!-- 过滤日志 -->
|
||||||
|
|
|
@ -2,9 +2,12 @@ package io.renren.common.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 常量
|
* 常量
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public interface Constant {
|
public interface Constant {
|
||||||
|
/**
|
||||||
|
* 模糊查询时key
|
||||||
|
*/
|
||||||
|
String SEARCHKEY = "searchKey";
|
||||||
/**
|
/**
|
||||||
* 成功
|
* 成功
|
||||||
*/
|
*/
|
||||||
|
@ -34,7 +37,7 @@ public interface Constant {
|
||||||
*/
|
*/
|
||||||
Long DICT_ROOT = 0L;
|
Long DICT_ROOT = 0L;
|
||||||
/**
|
/**
|
||||||
* 升序
|
* 升序
|
||||||
*/
|
*/
|
||||||
String ASC = "asc";
|
String ASC = "asc";
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue