Browse Source
# Conflicts: # epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.javadev_shibei_match
41 changed files with 2581 additions and 15 deletions
@ -0,0 +1,136 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ProjectProcessAttachmentDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 唯一标识 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 项目ID |
||||
|
*/ |
||||
|
private String projectId; |
||||
|
|
||||
|
/** |
||||
|
* 项目进展表ID |
||||
|
*/ |
||||
|
private String processId; |
||||
|
|
||||
|
/** |
||||
|
* 文件所属内容(内部备注: public 公开答复:internal) |
||||
|
*/ |
||||
|
private String filePlace; |
||||
|
|
||||
|
/** |
||||
|
* 文件名 |
||||
|
*/ |
||||
|
private String fileName; |
||||
|
|
||||
|
/** |
||||
|
* 附件名(uuid随机生成) |
||||
|
*/ |
||||
|
private String attachmentName; |
||||
|
|
||||
|
/** |
||||
|
* 文件大小 |
||||
|
*/ |
||||
|
private Integer attachmentSize; |
||||
|
|
||||
|
/** |
||||
|
* 文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV) |
||||
|
*/ |
||||
|
private String attachmentFormat; |
||||
|
|
||||
|
/** |
||||
|
* 文件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) |
||||
|
*/ |
||||
|
private String attachmentType; |
||||
|
|
||||
|
/** |
||||
|
* url地址 |
||||
|
*/ |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
/** |
||||
|
* 排序(需求确定,按上传顺序排序) |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 语音或视频时长,秒 |
||||
|
*/ |
||||
|
private Integer duration; |
||||
|
|
||||
|
/** |
||||
|
* 是否强制发布(0:否 1:是) |
||||
|
*/ |
||||
|
private Integer isRelease; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,104 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件安全校验任务表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ProjectProcessScanTaskDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 唯一标识 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 项目ID |
||||
|
*/ |
||||
|
private String projectId; |
||||
|
|
||||
|
/** |
||||
|
* 项目进展表(project_process)ID |
||||
|
*/ |
||||
|
private String processId; |
||||
|
|
||||
|
/** |
||||
|
* 项目附件表主键,对应dataId |
||||
|
*/ |
||||
|
private String projectProcessAttachmentId; |
||||
|
|
||||
|
/** |
||||
|
* 阿里云审核任务Id |
||||
|
*/ |
||||
|
private String taskId; |
||||
|
|
||||
|
/** |
||||
|
* 审核状态【auditing: 审核中; |
||||
|
auto_passed: 自动通过; |
||||
|
review:结果不确定,需要人工审核; |
||||
|
block: 结果违规;】 |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* 附件类型(视频 - video、 语音 - voice 文件 - doc) |
||||
|
*/ |
||||
|
private String attachmentType; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,42 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2020/12/21 15:37 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class FileDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -5307959406648243353L; |
||||
|
/** |
||||
|
* 文件名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
/** |
||||
|
* url地址 |
||||
|
*/ |
||||
|
private String url; |
||||
|
/** |
||||
|
* 文件类型(图片 - image、 视频 - video、 语音 - voice、 文档 - doc) |
||||
|
*/ |
||||
|
private String type; |
||||
|
/** |
||||
|
* 后缀名 |
||||
|
*/ |
||||
|
private String format; |
||||
|
/** |
||||
|
* 文件大小 kb |
||||
|
*/ |
||||
|
private Integer size; |
||||
|
/** |
||||
|
* 语音或视频文件时长,单位秒 |
||||
|
*/ |
||||
|
private Integer duration; |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/12/21 下午3:24 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ProcessListV2FormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -7922290706507984148L; |
||||
|
|
||||
|
public interface ProcessListV2Form{} |
||||
|
|
||||
|
@NotBlank(message = "项目ID不能为空",groups = {ProcessListV2Form.class}) |
||||
|
private String projectId; |
||||
|
} |
||||
@ -0,0 +1,72 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/12/21 下午3:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ProcessListV2ResultDTO implements Serializable { |
||||
|
|
||||
|
/** |
||||
|
* 项目ID |
||||
|
*/ |
||||
|
private String projectId; |
||||
|
|
||||
|
/** |
||||
|
* 进展Id |
||||
|
*/ |
||||
|
private String processId; |
||||
|
|
||||
|
/** |
||||
|
* 处理进展名称 |
||||
|
*/ |
||||
|
private String processName; |
||||
|
|
||||
|
/** |
||||
|
* 处理进展时间 |
||||
|
*/ |
||||
|
private Long processTime; |
||||
|
|
||||
|
/** |
||||
|
* 处理部门 |
||||
|
*/ |
||||
|
private String departmentName; |
||||
|
|
||||
|
/** |
||||
|
* 公开答复 |
||||
|
*/ |
||||
|
private String publicReply; |
||||
|
|
||||
|
/** |
||||
|
* 内部备注 |
||||
|
*/ |
||||
|
private String internalRemark; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private List<PublicAndInternalFileResultDTO> publicFile; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private List<PublicAndInternalFileResultDTO> internalFile; |
||||
|
|
||||
|
public ProcessListV2ResultDTO() { |
||||
|
this.projectId = ""; |
||||
|
this.processId = ""; |
||||
|
this.processName = ""; |
||||
|
this.processTime = 0L; |
||||
|
this.departmentName = ""; |
||||
|
this.publicReply = ""; |
||||
|
this.internalRemark = ""; |
||||
|
this.publicFile = new ArrayList<>(); |
||||
|
this.internalFile = new ArrayList<>(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/12/21 下午3:44 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PublicAndInternalFileResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -4258868880494403603L; |
||||
|
|
||||
|
/** |
||||
|
* 文件名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* url地址 |
||||
|
*/ |
||||
|
private String url; |
||||
|
|
||||
|
/** |
||||
|
* 文件类型(图片 - image、 视频 - video、 语音 - voice、 文档 - doc) |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 后缀名 |
||||
|
*/ |
||||
|
private String format; |
||||
|
|
||||
|
/** |
||||
|
* 文件大小 kb |
||||
|
*/ |
||||
|
private Integer size; |
||||
|
|
||||
|
/** |
||||
|
* 语音或视频文件时长,单位秒 |
||||
|
*/ |
||||
|
private Long duration; |
||||
|
|
||||
|
@JsonIgnore |
||||
|
private String processId; |
||||
|
|
||||
|
@JsonIgnore |
||||
|
private String filePlace; |
||||
|
|
||||
|
public PublicAndInternalFileResultDTO() { |
||||
|
this.name = ""; |
||||
|
this.url = ""; |
||||
|
this.type = ""; |
||||
|
this.format = ""; |
||||
|
this.size = 0; |
||||
|
this.duration = 0L; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,94 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.dto.ProjectProcessAttachmentDTO; |
||||
|
import com.epmet.excel.ProjectProcessAttachmentExcel; |
||||
|
import com.epmet.service.ProjectProcessAttachmentService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("projectprocessattachment") |
||||
|
public class ProjectProcessAttachmentController { |
||||
|
|
||||
|
@Autowired |
||||
|
private ProjectProcessAttachmentService projectProcessAttachmentService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<ProjectProcessAttachmentDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<ProjectProcessAttachmentDTO> page = projectProcessAttachmentService.page(params); |
||||
|
return new Result<PageData<ProjectProcessAttachmentDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<ProjectProcessAttachmentDTO> get(@PathVariable("id") String id){ |
||||
|
ProjectProcessAttachmentDTO data = projectProcessAttachmentService.get(id); |
||||
|
return new Result<ProjectProcessAttachmentDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody ProjectProcessAttachmentDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
projectProcessAttachmentService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody ProjectProcessAttachmentDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
projectProcessAttachmentService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
projectProcessAttachmentService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<ProjectProcessAttachmentDTO> list = projectProcessAttachmentService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, ProjectProcessAttachmentExcel.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,94 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.dto.ProjectProcessScanTaskDTO; |
||||
|
import com.epmet.excel.ProjectProcessScanTaskExcel; |
||||
|
import com.epmet.service.ProjectProcessScanTaskService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件安全校验任务表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("projectprocessscantask") |
||||
|
public class ProjectProcessScanTaskController { |
||||
|
|
||||
|
@Autowired |
||||
|
private ProjectProcessScanTaskService projectProcessScanTaskService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<ProjectProcessScanTaskDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<ProjectProcessScanTaskDTO> page = projectProcessScanTaskService.page(params); |
||||
|
return new Result<PageData<ProjectProcessScanTaskDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<ProjectProcessScanTaskDTO> get(@PathVariable("id") String id){ |
||||
|
ProjectProcessScanTaskDTO data = projectProcessScanTaskService.get(id); |
||||
|
return new Result<ProjectProcessScanTaskDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody ProjectProcessScanTaskDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
projectProcessScanTaskService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody ProjectProcessScanTaskDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
projectProcessScanTaskService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
projectProcessScanTaskService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<ProjectProcessScanTaskDTO> list = projectProcessScanTaskService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, ProjectProcessScanTaskExcel.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.result.PublicAndInternalFileResultDTO; |
||||
|
import com.epmet.entity.ProjectProcessAttachmentEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ProjectProcessAttachmentDao extends BaseDao<ProjectProcessAttachmentEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @Description 根据项目ID查询附件 |
||||
|
* @Param projectId |
||||
|
* @author zxc |
||||
|
* @date 2020/12/21 下午4:33 |
||||
|
*/ |
||||
|
List<PublicAndInternalFileResultDTO> selectAttachByProjectId(@Param("projectId")String projectId); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.ProjectProcessScanTaskEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件安全校验任务表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ProjectProcessScanTaskDao extends BaseDao<ProjectProcessScanTaskEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,106 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("project_process_attachment") |
||||
|
public class ProjectProcessAttachmentEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 项目ID |
||||
|
*/ |
||||
|
private String projectId; |
||||
|
|
||||
|
/** |
||||
|
* 项目进展表ID |
||||
|
*/ |
||||
|
private String processId; |
||||
|
|
||||
|
/** |
||||
|
* 文件所属内容(内部备注: public 公开答复:internal) |
||||
|
*/ |
||||
|
private String filePlace; |
||||
|
|
||||
|
/** |
||||
|
* 文件名 |
||||
|
*/ |
||||
|
private String fileName; |
||||
|
|
||||
|
/** |
||||
|
* 附件名(uuid随机生成) |
||||
|
*/ |
||||
|
private String attachmentName; |
||||
|
|
||||
|
/** |
||||
|
* 文件大小 |
||||
|
*/ |
||||
|
private Integer attachmentSize; |
||||
|
|
||||
|
/** |
||||
|
* 文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV) |
||||
|
*/ |
||||
|
private String attachmentFormat; |
||||
|
|
||||
|
/** |
||||
|
* 文件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) |
||||
|
*/ |
||||
|
private String attachmentType; |
||||
|
|
||||
|
/** |
||||
|
* url地址 |
||||
|
*/ |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
/** |
||||
|
* 排序(需求确定,按上传顺序排序) |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 语音或视频时长,秒 |
||||
|
*/ |
||||
|
private Integer duration; |
||||
|
|
||||
|
/** |
||||
|
* 是否强制发布(0:否 1:是) |
||||
|
*/ |
||||
|
private Integer isRelease; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件安全校验任务表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("project_process_scan_task") |
||||
|
public class ProjectProcessScanTaskEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 项目ID |
||||
|
*/ |
||||
|
private String projectId; |
||||
|
|
||||
|
/** |
||||
|
* 项目进展表(project_process)ID |
||||
|
*/ |
||||
|
private String processId; |
||||
|
|
||||
|
/** |
||||
|
* 项目附件表主键,对应dataId |
||||
|
*/ |
||||
|
private String projectProcessAttachmentId; |
||||
|
|
||||
|
/** |
||||
|
* 阿里云审核任务Id |
||||
|
*/ |
||||
|
private String taskId; |
||||
|
|
||||
|
/** |
||||
|
* 审核状态【auditing: 审核中; |
||||
|
auto_passed: 自动通过; |
||||
|
review:结果不确定,需要人工审核; |
||||
|
block: 结果违规;】 |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* 附件类型(视频 - video、 语音 - voice 文件 - doc) |
||||
|
*/ |
||||
|
private String attachmentType; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ProjectProcessAttachmentExcel { |
||||
|
|
||||
|
@Excel(name = "唯一标识") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户ID") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "项目ID") |
||||
|
private String projectId; |
||||
|
|
||||
|
@Excel(name = "项目进展表ID") |
||||
|
private String processId; |
||||
|
|
||||
|
@Excel(name = "文件所属内容(内部备注: public 公开答复:internal)") |
||||
|
private String filePlace; |
||||
|
|
||||
|
@Excel(name = "文件名") |
||||
|
private String fileName; |
||||
|
|
||||
|
@Excel(name = "附件名(uuid随机生成)") |
||||
|
private String attachmentName; |
||||
|
|
||||
|
@Excel(name = "文件大小") |
||||
|
private Integer attachmentSize; |
||||
|
|
||||
|
@Excel(name = "文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV)") |
||||
|
private String attachmentFormat; |
||||
|
|
||||
|
@Excel(name = "文件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))") |
||||
|
private String attachmentType; |
||||
|
|
||||
|
@Excel(name = "url地址") |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
@Excel(name = "排序(需求确定,按上传顺序排序)") |
||||
|
private Integer sort; |
||||
|
|
||||
|
@Excel(name = "语音或视频时长,秒") |
||||
|
private Integer duration; |
||||
|
|
||||
|
@Excel(name = "是否强制发布(0:否 1:是)") |
||||
|
private Integer isRelease; |
||||
|
|
||||
|
@Excel(name = "删除标识:0.未删除 1.已删除") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,75 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件安全校验任务表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ProjectProcessScanTaskExcel { |
||||
|
|
||||
|
@Excel(name = "唯一标识") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户ID") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "项目ID") |
||||
|
private String projectId; |
||||
|
|
||||
|
@Excel(name = "项目进展表(project_process)ID") |
||||
|
private String processId; |
||||
|
|
||||
|
@Excel(name = "项目附件表主键,对应dataId") |
||||
|
private String projectProcessAttachmentId; |
||||
|
|
||||
|
@Excel(name = "阿里云审核任务Id") |
||||
|
private String taskId; |
||||
|
|
||||
|
@Excel(name = "审核状态【auditing: 审核中; auto_passed: 自动通过;"+ |
||||
|
"review:结果不确定,需要人工审核;block: 结果违规;】") |
||||
|
private String status; |
||||
|
|
||||
|
@Excel(name = "附件类型(视频 - video、 语音 - voice 文件 - doc)") |
||||
|
private String attachmentType; |
||||
|
|
||||
|
@Excel(name = "删除标识:0.未删除 1.已删除") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class ProjectProcessAttachmentRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件安全校验任务表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class ProjectProcessScanTaskRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.ProjectProcessAttachmentDTO; |
||||
|
import com.epmet.entity.ProjectProcessAttachmentEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
public interface ProjectProcessAttachmentService extends BaseService<ProjectProcessAttachmentEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<ProjectProcessAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
PageData<ProjectProcessAttachmentDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<ProjectProcessAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
List<ProjectProcessAttachmentDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return ProjectProcessAttachmentDTO |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
ProjectProcessAttachmentDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
void save(ProjectProcessAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
void update(ProjectProcessAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.ProjectProcessScanTaskDTO; |
||||
|
import com.epmet.entity.ProjectProcessScanTaskEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件安全校验任务表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
public interface ProjectProcessScanTaskService extends BaseService<ProjectProcessScanTaskEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<ProjectProcessScanTaskDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
PageData<ProjectProcessScanTaskDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<ProjectProcessScanTaskDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
List<ProjectProcessScanTaskDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return ProjectProcessScanTaskDTO |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
ProjectProcessScanTaskDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
void save(ProjectProcessScanTaskDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
void update(ProjectProcessScanTaskDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-21 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,104 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.dao.ProjectProcessAttachmentDao; |
||||
|
import com.epmet.dto.ProjectProcessAttachmentDTO; |
||||
|
import com.epmet.entity.ProjectProcessAttachmentEntity; |
||||
|
import com.epmet.redis.ProjectProcessAttachmentRedis; |
||||
|
import com.epmet.service.ProjectProcessAttachmentService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class ProjectProcessAttachmentServiceImpl extends BaseServiceImpl<ProjectProcessAttachmentDao, ProjectProcessAttachmentEntity> implements ProjectProcessAttachmentService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ProjectProcessAttachmentRedis projectProcessAttachmentRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<ProjectProcessAttachmentDTO> page(Map<String, Object> params) { |
||||
|
IPage<ProjectProcessAttachmentEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, ProjectProcessAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ProjectProcessAttachmentDTO> list(Map<String, Object> params) { |
||||
|
List<ProjectProcessAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, ProjectProcessAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<ProjectProcessAttachmentEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<ProjectProcessAttachmentEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ProjectProcessAttachmentDTO get(String id) { |
||||
|
ProjectProcessAttachmentEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, ProjectProcessAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(ProjectProcessAttachmentDTO dto) { |
||||
|
ProjectProcessAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ProjectProcessAttachmentEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(ProjectProcessAttachmentDTO dto) { |
||||
|
ProjectProcessAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ProjectProcessAttachmentEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,104 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.dao.ProjectProcessScanTaskDao; |
||||
|
import com.epmet.dto.ProjectProcessScanTaskDTO; |
||||
|
import com.epmet.entity.ProjectProcessScanTaskEntity; |
||||
|
import com.epmet.redis.ProjectProcessScanTaskRedis; |
||||
|
import com.epmet.service.ProjectProcessScanTaskService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 项目节点附件安全校验任务表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-21 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class ProjectProcessScanTaskServiceImpl extends BaseServiceImpl<ProjectProcessScanTaskDao, ProjectProcessScanTaskEntity> implements ProjectProcessScanTaskService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ProjectProcessScanTaskRedis projectProcessScanTaskRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<ProjectProcessScanTaskDTO> page(Map<String, Object> params) { |
||||
|
IPage<ProjectProcessScanTaskEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, ProjectProcessScanTaskDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ProjectProcessScanTaskDTO> list(Map<String, Object> params) { |
||||
|
List<ProjectProcessScanTaskEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, ProjectProcessScanTaskDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<ProjectProcessScanTaskEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<ProjectProcessScanTaskEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ProjectProcessScanTaskDTO get(String id) { |
||||
|
ProjectProcessScanTaskEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, ProjectProcessScanTaskDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(ProjectProcessScanTaskDTO dto) { |
||||
|
ProjectProcessScanTaskEntity entity = ConvertUtils.sourceToTarget(dto, ProjectProcessScanTaskEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(ProjectProcessScanTaskDTO dto) { |
||||
|
ProjectProcessScanTaskEntity entity = ConvertUtils.sourceToTarget(dto, ProjectProcessScanTaskEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,41 @@ |
|||||
|
|
||||
|
CREATE TABLE `project_process_attachment` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '唯一标识', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`PROJECT_ID` varchar(64) NOT NULL COMMENT '项目ID', |
||||
|
`PROCESS_ID` varchar(64) NOT NULL COMMENT '项目进展表ID', |
||||
|
`FILE_PLACE` varchar(64) NOT NULL COMMENT '文件所属位置(内部备注: internal 公开答复:public)', |
||||
|
`FILE_NAME` varchar(255) DEFAULT NULL COMMENT '文件名', |
||||
|
`ATTACHMENT_NAME` varchar(255) DEFAULT NULL COMMENT '附件名(uuid随机生成)', |
||||
|
`ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小', |
||||
|
`ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV)', |
||||
|
`ATTACHMENT_TYPE` varchar(64) DEFAULT NULL COMMENT '文件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', |
||||
|
`ATTACHMENT_URL` varchar(255) NOT NULL COMMENT 'url地址', |
||||
|
`SORT` int(11) NOT NULL COMMENT '排序(需求确定,按上传顺序排序)', |
||||
|
`DURATION` int(11) unsigned zerofill DEFAULT '00000000000' COMMENT '语音或视频时长,秒', |
||||
|
`IS_RELEASE` int(1) NOT NULL DEFAULT '0' COMMENT '是否强制发布(0:否 1:是)', |
||||
|
`DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目节点附件表'; |
||||
|
|
||||
|
CREATE TABLE `project_process_scan_task` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '唯一标识', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`PROJECT_ID` varchar(64) NOT NULL COMMENT '项目ID', |
||||
|
`PROCESS_ID` varchar(64) NOT NULL COMMENT '项目进展表(project_process)ID', |
||||
|
`PROJECT_PROCESS_ATTACHMENT_ID` varchar(64) NOT NULL COMMENT '项目附件表主键,对应dataId', |
||||
|
`TASK_ID` varchar(64) NOT NULL COMMENT '阿里云审核任务Id', |
||||
|
`STATUS` varchar(32) NOT NULL COMMENT '审核状态【auditing: 审核中;\r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;】', |
||||
|
`ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型(视频 - video、 语音 - voice 文件 - doc)', |
||||
|
`DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目节点附件安全校验任务表'; |
||||
@ -0,0 +1,22 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.ProjectProcessAttachmentDao"> |
||||
|
|
||||
|
<!-- 根据项目ID查询附件 --> |
||||
|
<select id="selectAttachByProjectId" resultType="com.epmet.dto.result.PublicAndInternalFileResultDTO"> |
||||
|
SELECT |
||||
|
ATTACHMENT_NAME AS name, |
||||
|
ATTACHMENT_URL AS url, |
||||
|
ATTACHMENT_TYPE AS type, |
||||
|
ATTACHMENT_FORMAT AS format, |
||||
|
ATTACHMENT_SIZE AS size, |
||||
|
DURATION, |
||||
|
PROCESS_ID, |
||||
|
FILE_PLACE |
||||
|
FROM project_process_attachment |
||||
|
WHERE DEL_FLAG = '0' |
||||
|
AND PROJECT_ID = #{projectId} |
||||
|
order by sort |
||||
|
</select> |
||||
|
</mapper> |
||||
@ -0,0 +1,8 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.ProjectProcessScanTaskDao"> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
Loading…
Reference in new issue