Browse Source

特殊客户-居民和热心居民显示名称修改

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
f1fc9d552b
  1. 126
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubAttachmentDTO.java
  2. 136
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java
  3. 49
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java
  4. 5
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java
  5. 4
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java
  6. 40
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java
  7. 85
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubAttachmentController.java
  8. 85
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubProcessController.java
  9. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java
  10. 33
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubAttachmentDao.java
  11. 33
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java
  12. 96
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubAttachmentEntity.java
  13. 106
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java
  14. 95
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubAttachmentService.java
  15. 95
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java
  16. 10
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java
  17. 3
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  18. 100
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubAttachmentServiceImpl.java
  19. 100
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java
  20. 14
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java
  21. 28
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubAttachmentDao.xml
  22. 30
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml

126
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubAttachmentDTO.java

@ -0,0 +1,126 @@
/**
* 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 2021-03-17
*/
@Data
public class ProjectSubAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 项目ID
*/
private String projectId;
/**
* 子节点ID
*/
private String subId;
/**
* 事件ID
*/
private String taskId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件大小 单位b
*/
private Integer attachmentSize;
/**
* 文件格式
*/
private String attachmentFormat;
/**
* 类型
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 语音或视频时长
*/
private Integer duration;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

136
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java

@ -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 2021-03-17
*/
@Data
public class ProjectSubProcessDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 项目ID
*/
private String projectId;
/**
* 节点ID
*/
private String processId;
/**
* 项目人员关联表ID
*/
private String staffId;
/**
* 系统ID
*/
private String platformId;
/**
* 系统名
*/
private String platformName;
/**
* 第三方平台返回的项目关联ID事件Id
*/
private String taskId;
/**
* 事件处理详细内容
*/
private String result;
/**
* 外部状态:1待处理,2待核实,3已上报,4已完结,5处理中,6待分发,7归档,8催办,9超时
*/
private String externalStatus;
/**
* 外部状态描述
*/
private String externalStatusDesc;
/**
* 内部状态:待处理 pending结案closed
*/
private String internalStatus;
/**
* 处理日期
*/
private Date handleDate;
/**
* 处理人姓名
*/
private String handleUserName;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

49
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java

@ -0,0 +1,49 @@
package com.epmet.dto.form;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2021/3/17 14:31
*/
@Data
public class SendToFormDTO implements Serializable {
private static final long serialVersionUID = -2556534032778491105L;
@NotBlank(message = "项目Id不能为空")
private String projectId;
@NotBlank(message = "项目人员关联Id不能为空")
private String projectStaffId;
@Length(max=1000,message = "公开答复内容不能超过1000位")
private String publicReply;
@NotBlank(message = "内部备注不能为空")
@Length(max=1000,message = "内部备注不能超过1000位")
private String internalRemark;
@NotBlank(message = "外部系统ID不能为空")
private String platformId;
@NotBlank(message = "外部系统名不能为空")
private String platformName;
@Valid
private List<TickStaffFormDTO> staffList;
/**
* 公开答复对应文件集合
*/
private List<FileDTO> publicFile;
/**
* 内部备注对应文件集合
*/
private List<FileDTO> internalFile;
}

5
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java

@ -13,6 +13,7 @@ import java.util.List;
@Data
public class ProcessListV2ResultDTO implements Serializable {
private static final long serialVersionUID = 5762152044573235897L;
/**
* 项目ID
*/
@ -47,6 +48,10 @@ public class ProcessListV2ResultDTO implements Serializable {
* 内部备注
*/
private String internalRemark;
/**
* 子节点
*/
private List<SubProcessDTO> subProcess;
/**
*

4
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java

@ -60,6 +60,10 @@ public class ProjectDetailResultDTO implements Serializable {
* 当前跟进部门
*/
private List<DepartmentNameListBean> departmentList;
/**
* 是否能发送到外部系统
*/
private Boolean isSend;
@NoArgsConstructor
@Data

40
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java

@ -0,0 +1,40 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2021/3/17 14:45
*/
@Data
public class SubProcessDTO implements Serializable {
private static final long serialVersionUID = -3292921180067385861L;
/**
* 外部平台名
*/
private String platformName;
/**
* 处理状态
*/
private String externalStatus;
/**
* 处理时间
*/
private String processTime;
/**
* 处理人
*/
private String handleUserName;
/**
* 处理内容
*/
private String result;
private List<PublicAndInternalFileResultDTO> subFile;
}

85
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubAttachmentController.java

@ -0,0 +1,85 @@
/**
* 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.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.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.ProjectSubAttachmentDTO;
import com.epmet.service.ProjectSubAttachmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 外部系统事件附件
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-03-17
*/
@RestController
@RequestMapping("projectsubattachment")
public class ProjectSubAttachmentController {
@Autowired
private ProjectSubAttachmentService projectSubAttachmentService;
@GetMapping("page")
public Result<PageData<ProjectSubAttachmentDTO>> page(@RequestParam Map<String, Object> params){
PageData<ProjectSubAttachmentDTO> page = projectSubAttachmentService.page(params);
return new Result<PageData<ProjectSubAttachmentDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<ProjectSubAttachmentDTO> get(@PathVariable("id") String id){
ProjectSubAttachmentDTO data = projectSubAttachmentService.get(id);
return new Result<ProjectSubAttachmentDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody ProjectSubAttachmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
projectSubAttachmentService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody ProjectSubAttachmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
projectSubAttachmentService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
projectSubAttachmentService.delete(ids);
return new Result();
}
}

85
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubProcessController.java

@ -0,0 +1,85 @@
/**
* 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.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.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.ProjectSubProcessDTO;
import com.epmet.service.ProjectSubProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 节点事件关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-03-17
*/
@RestController
@RequestMapping("projectsubprocess")
public class ProjectSubProcessController {
@Autowired
private ProjectSubProcessService projectSubProcessService;
@GetMapping("page")
public Result<PageData<ProjectSubProcessDTO>> page(@RequestParam Map<String, Object> params){
PageData<ProjectSubProcessDTO> page = projectSubProcessService.page(params);
return new Result<PageData<ProjectSubProcessDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<ProjectSubProcessDTO> get(@PathVariable("id") String id){
ProjectSubProcessDTO data = projectSubProcessService.get(id);
return new Result<ProjectSubProcessDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody ProjectSubProcessDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
projectSubProcessService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody ProjectSubProcessDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
projectSubProcessService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
projectSubProcessService.delete(ids);
return new Result();
}
}

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java

@ -319,5 +319,21 @@ public class ProjectTraceController {
return new Result();
}
/**
* 发送到外部平台
* @author zhaoqifeng
* @date 2021/3/17 14:34
* @param tokenDTO
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("sendto")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PROJECT_TRACE_TRANSFER)
public Result sendTo(@LoginUser TokenDto tokenDTO, @RequestBody SendToFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
projectTraceService.sendTo(tokenDTO, formDTO);
return new Result();
}
}

33
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubAttachmentDao.java

@ -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.ProjectSubAttachmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 外部系统事件附件
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-03-17
*/
@Mapper
public interface ProjectSubAttachmentDao extends BaseDao<ProjectSubAttachmentEntity> {
}

33
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java

@ -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.ProjectSubProcessEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 节点事件关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-03-17
*/
@Mapper
public interface ProjectSubProcessDao extends BaseDao<ProjectSubProcessEntity> {
}

96
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubAttachmentEntity.java

@ -0,0 +1,96 @@
/**
* 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 2021-03-17
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("project_sub_attachment")
public class ProjectSubAttachmentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 项目ID
*/
private String projectId;
/**
* 子节点ID
*/
private String subId;
/**
* 事件ID
*/
private String taskId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件大小 单位b
*/
private Integer attachmentSize;
/**
* 文件格式
*/
private String attachmentFormat;
/**
* 类型
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 语音或视频时长
*/
private Integer duration;
/**
* 排序
*/
private Integer sort;
}

106
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java

@ -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 2021-03-17
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("project_sub_process")
public class ProjectSubProcessEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 项目ID
*/
private String projectId;
/**
* 节点ID
*/
private String processId;
/**
* 项目人员关联表ID
*/
private String staffId;
/**
* 系统ID
*/
private String platformId;
/**
* 系统名
*/
private String platformName;
/**
* 第三方平台返回的项目关联ID事件Id
*/
private String taskId;
/**
* 事件处理详细内容
*/
private String result;
/**
* 外部状态:1待处理,2待核实,3已上报,4已完结,5处理中,6待分发,7归档,8催办,9超时
*/
private String externalStatus;
/**
* 外部状态描述
*/
private String externalStatusDesc;
/**
* 内部状态:待处理 pending结案closed
*/
private String internalStatus;
/**
* 处理日期
*/
private Date handleDate;
/**
* 处理人姓名
*/
private String handleUserName;
}

95
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubAttachmentService.java

@ -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.ProjectSubAttachmentDTO;
import com.epmet.entity.ProjectSubAttachmentEntity;
import java.util.List;
import java.util.Map;
/**
* 外部系统事件附件
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-03-17
*/
public interface ProjectSubAttachmentService extends BaseService<ProjectSubAttachmentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ProjectSubAttachmentDTO>
* @author generator
* @date 2021-03-17
*/
PageData<ProjectSubAttachmentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ProjectSubAttachmentDTO>
* @author generator
* @date 2021-03-17
*/
List<ProjectSubAttachmentDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ProjectSubAttachmentDTO
* @author generator
* @date 2021-03-17
*/
ProjectSubAttachmentDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-03-17
*/
void save(ProjectSubAttachmentDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-03-17
*/
void update(ProjectSubAttachmentDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-03-17
*/
void delete(String[] ids);
}

95
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java

@ -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.ProjectSubProcessDTO;
import com.epmet.entity.ProjectSubProcessEntity;
import java.util.List;
import java.util.Map;
/**
* 节点事件关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-03-17
*/
public interface ProjectSubProcessService extends BaseService<ProjectSubProcessEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ProjectSubProcessDTO>
* @author generator
* @date 2021-03-17
*/
PageData<ProjectSubProcessDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ProjectSubProcessDTO>
* @author generator
* @date 2021-03-17
*/
List<ProjectSubProcessDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ProjectSubProcessDTO
* @author generator
* @date 2021-03-17
*/
ProjectSubProcessDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-03-17
*/
void save(ProjectSubProcessDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-03-17
*/
void update(ProjectSubProcessDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-03-17
*/
void delete(String[] ids);
}

10
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java

@ -149,4 +149,14 @@ public interface ProjectTraceService {
* @author sun
*/
void responseV2(TokenDto tokenDto, ProjectResponseFormDTO formDTO);
/**
* 发送到外部平台
* @author zhaoqifeng
* @date 2021/3/17 14:33
* @param tokenDto
* @param formDTO
* @return void
*/
void sendTo(TokenDto tokenDto, SendToFormDTO formDTO);
}

3
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -280,6 +280,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
@Override
public ProjectDetailResultDTO getProjectDetail(ProjectDetailFromDTO fromDTO) {
//TODO 获取 customer_project_parameter表key值external_system的value,如果为0,isSend为false,值为1则跟processable的值一样
ProjectDetailResultDTO resultDTO = baseDao.selectProjectDetail(fromDTO.getProjectId());
if (ProjectConstant.CLOSED.equals(resultDTO.getProjectStatus())) {
resultDTO.setProcessable(false);
@ -291,6 +292,8 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
projectStaffDTO.setStaffId(fromDTO.getUserId());
List<DepartmentResultDTO> departmentList = projectStaffService.getDepartmentNameList(projectStaffDTO);
if (null != departmentList && departmentList.size() > NumConstant.ZERO) {
//TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录,如果没有记录或者INTERNAL_STATUS是closed,processable
// 的值为true
resultDTO.setProcessable(true);
} else {
resultDTO.setProcessable(false);

100
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubAttachmentServiceImpl.java

@ -0,0 +1,100 @@
/**
* 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.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.ProjectSubAttachmentDao;
import com.epmet.dto.ProjectSubAttachmentDTO;
import com.epmet.entity.ProjectSubAttachmentEntity;
import com.epmet.service.ProjectSubAttachmentService;
import org.apache.commons.lang3.StringUtils;
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 2021-03-17
*/
@Service
public class ProjectSubAttachmentServiceImpl extends BaseServiceImpl<ProjectSubAttachmentDao, ProjectSubAttachmentEntity> implements ProjectSubAttachmentService {
@Override
public PageData<ProjectSubAttachmentDTO> page(Map<String, Object> params) {
IPage<ProjectSubAttachmentEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ProjectSubAttachmentDTO.class);
}
@Override
public List<ProjectSubAttachmentDTO> list(Map<String, Object> params) {
List<ProjectSubAttachmentEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ProjectSubAttachmentDTO.class);
}
private QueryWrapper<ProjectSubAttachmentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ProjectSubAttachmentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ProjectSubAttachmentDTO get(String id) {
ProjectSubAttachmentEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ProjectSubAttachmentDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ProjectSubAttachmentDTO dto) {
ProjectSubAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ProjectSubAttachmentEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ProjectSubAttachmentDTO dto) {
ProjectSubAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ProjectSubAttachmentEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

100
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java

@ -0,0 +1,100 @@
/**
* 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.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.ProjectSubProcessDao;
import com.epmet.dto.ProjectSubProcessDTO;
import com.epmet.entity.ProjectSubProcessEntity;
import com.epmet.service.ProjectSubProcessService;
import org.apache.commons.lang3.StringUtils;
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 2021-03-17
*/
@Service
public class ProjectSubProcessServiceImpl extends BaseServiceImpl<ProjectSubProcessDao, ProjectSubProcessEntity> implements ProjectSubProcessService {
@Override
public PageData<ProjectSubProcessDTO> page(Map<String, Object> params) {
IPage<ProjectSubProcessEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ProjectSubProcessDTO.class);
}
@Override
public List<ProjectSubProcessDTO> list(Map<String, Object> params) {
List<ProjectSubProcessEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ProjectSubProcessDTO.class);
}
private QueryWrapper<ProjectSubProcessEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ProjectSubProcessEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ProjectSubProcessDTO get(String id) {
ProjectSubProcessEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ProjectSubProcessDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ProjectSubProcessDTO dto) {
ProjectSubProcessEntity entity = ConvertUtils.sourceToTarget(dto, ProjectSubProcessEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ProjectSubProcessDTO dto) {
ProjectSubProcessEntity entity = ConvertUtils.sourceToTarget(dto, ProjectSubProcessEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

14
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java

@ -182,4 +182,18 @@ public class ProjectTraceServiceImpl implements ProjectTraceService {
projectService.responseV2(formDTO);
}
/**
* 发送到外部平台
*
* @param tokenDto
* @param formDTO
* @return void
* @author zhaoqifeng
* @date 2021/3/17 14:33
*/
@Override
public void sendTo(TokenDto tokenDto, SendToFormDTO formDTO) {
}
}

28
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubAttachmentDao.xml

@ -0,0 +1,28 @@
<?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.ProjectSubAttachmentDao">
<resultMap type="com.epmet.entity.ProjectSubAttachmentEntity" id="projectSubAttachmentMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="projectId" column="PROJECT_ID"/>
<result property="subId" column="SUB_ID"/>
<result property="taskId" column="TASK_ID"/>
<result property="attachmentName" column="ATTACHMENT_NAME"/>
<result property="attachmentSize" column="ATTACHMENT_SIZE"/>
<result property="attachmentFormat" column="ATTACHMENT_FORMAT"/>
<result property="attachmentType" column="ATTACHMENT_TYPE"/>
<result property="attachmentUrl" column="ATTACHMENT_URL"/>
<result property="duration" column="DURATION"/>
<result property="sort" column="SORT"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

30
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml

@ -0,0 +1,30 @@
<?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.ProjectSubProcessDao">
<resultMap type="com.epmet.entity.ProjectSubProcessEntity" id="projectSubProcessMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="projectId" column="PROJECT_ID"/>
<result property="processId" column="PROCESS_ID"/>
<result property="staffId" column="STAFF_ID"/>
<result property="platformId" column="PLATFORM_ID"/>
<result property="platformName" column="PLATFORM_NAME"/>
<result property="taskId" column="TASK_ID"/>
<result property="result" column="RESULT"/>
<result property="externalStatus" column="EXTERNAL_STATUS"/>
<result property="externalStatusDesc" column="EXTERNAL_STATUS_DESC"/>
<result property="internalStatus" column="INTERNAL_STATUS"/>
<result property="handleDate" column="HANDLE_DATE"/>
<result property="handleUserName" column="HANDLE_USER_NAME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>
Loading…
Cancel
Save