瀏覽代碼

知识分享及bug调整

sangwenwei 1 年之前
父節點
當前提交
8ffdb6a1b1
共有 44 個文件被更改,包括 1477 次插入4813 次删除
  1. 19 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/service/dto/UserDTO.java
  2. 85 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/controller/KnowledgeShareInfoController.java
  3. 78 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/controller/TypeController.java
  4. 33 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/domain/KnowledgeShareComment.java
  5. 26 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/domain/KnowledgeShareDetail.java
  6. 26 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/domain/KnowledgeShareType.java
  7. 45 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/domain/KnowledgeShareVisit.java
  8. 8 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/KnowledgeShareCommentMapper.java
  9. 20 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/KnowledgeShareDetailMapper.java
  10. 19 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/KnowledgeShareTypeMapper.java
  11. 12 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/KnowledgeShareVisitMapper.java
  12. 48 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/xml/KnowledgeShareDetailMapper.xml
  13. 51 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/xml/KnowledgeShareTypeMapper.xml
  14. 16 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/xml/KnowledgeShareVisitMapper.xml
  15. 336 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/KnowledgeShareInfoService.java
  16. 66 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/TypeService.java
  17. 93 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/dto/KnowledgeShareInfoDto.java
  18. 67 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/dto/KnowledgeShareListDto.java
  19. 57 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/dto/KnowledgeShareTypeDto.java
  20. 2 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/meetingRoom/mapper/MeetingRoomMapper.java
  21. 6 113
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/controller/JyProjectController.java
  22. 1 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/JyProjectMapper.java
  23. 99 51
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectService.java
  24. 5 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/domain/Signet.java
  25. 1 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/mapper/SignetMapper.java
  26. 2 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/mapper/xml/SignetMapper.xml
  27. 33 21
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/SignetService.java
  28. 6 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/dto/SignetDTO.java
  29. 2 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/xml/JyWorkClientLinkmanMapper.xml
  30. 0 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/controller/JyWorkContractController.java
  31. 3 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/domain/JyWorkContractInfo.java
  32. 1 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/mapper/JyWorkContractInfoMapper.java
  33. 3 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/mapper/xml/JyWorkContractInfoMapper.xml
  34. 8 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/JyWorkContractService.java
  35. 2 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/dto/JyWorkContractInfoDto.java
  36. 1 1
      jeeplus-modules/jeeplus-business/src/main/resources/freemarker/firstAudit.ftl
  37. 0 2278
      jeeplus-modules/jeeplus-business/src/main/resources/freemarker/secondAudit.ftl
  38. 0 2278
      jeeplus-modules/jeeplus-business/src/main/resources/freemarker/thirdAudit.ftl
  39. 85 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyExecutionListener.java
  40. 31 11
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyProjectArchiveListener.java
  41. 19 11
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyProjectExecutionListener.java
  42. 3 1
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java
  43. 50 36
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/DictTypeService.java
  44. 9 3
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

+ 19 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/service/dto/UserDTO.java

@@ -314,6 +314,25 @@ public class UserDTO extends BaseDTO implements Serializable {
         }
     }
 
+    /**
+     * 获取包含岗位名称的集合
+     */
+    public List <String> getPostNameList() {
+        if ( postDTOList == null ) {
+            return Lists.newArrayList ( );
+        }
+        List <String> postNameList = postDTOList.stream ( ).map ( postDTO -> postDTO.getName ( ) ).collect ( Collectors.toList ( ) );
+        return postNameList;
+    }
+
+    public void setPostNameList(List <String> postNameList) {
+        for (String postName : postNameList) {
+            PostDTO postDTO = new PostDTO ( postName );
+            postDTOList.add ( postDTO );
+        }
+    }
+
+
 
     /**
      * 用户拥有的角色名称字符串, 多个角色名称用','分隔.

+ 85 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/controller/KnowledgeShareInfoController.java

@@ -0,0 +1,85 @@
+package com.jeeplus.business.knowledge.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareComment;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareDetail;
+import com.jeeplus.business.knowledge.service.KnowledgeShareInfoService;
+import com.jeeplus.business.knowledge.service.dto.KnowledgeShareInfoDto;
+import com.jeeplus.business.knowledge.service.dto.KnowledgeShareListDto;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+@RestController
+@Api("/知识分享")
+@RequestMapping(value = "/knowledgeShare/info")
+public class KnowledgeShareInfoController {
+
+    @Resource
+    private KnowledgeShareInfoService service;
+
+    /**
+     * 列表
+     */
+    @GetMapping("list")
+    @ApiOperation(value = "列表")
+    public ResponseEntity<IPage<KnowledgeShareListDto>> list(Page<KnowledgeShareListDto> page, KnowledgeShareDetail detail) {
+        IPage<KnowledgeShareListDto> iPage = service.list(page, detail);
+        return ResponseEntity.ok(iPage);
+    }
+
+    /**
+     * 新增/修改
+     */
+    @PostMapping("save")
+    @ApiOperation(value = "新增/修改")
+    public ResponseEntity<String> save(@RequestBody KnowledgeShareInfoDto dto) {
+        String s = service.save(dto);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
+     * 查看
+     */
+    @GetMapping("/findById")
+    @ApiOperation(value = "查看")
+    public ResponseEntity<KnowledgeShareInfoDto> findById(String id, String method,Integer size) {
+        KnowledgeShareInfoDto dto = service.findById(id, method,size);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 删除知识分享
+     */
+    @GetMapping("/removeById")
+    @ApiOperation(value = "删除")
+    public ResponseEntity<String> removeById(String id) {
+        String s = service.removeById(id);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
+     * 评论
+     */
+    @PostMapping("/addComment")
+    @ApiOperation(value = "添加评论")
+    public ResponseEntity<String> addComment(@RequestBody KnowledgeShareComment comment) {
+        String s = service.addComment(comment);
+        return ResponseEntity.ok(s);
+    }
+
+    /**
+     * 删除评论
+     */
+    @GetMapping("/delComment")
+    @ApiOperation(value = "删除评论")
+    public ResponseEntity<String> delComment(String id) {
+        String s = service.delComment(id);
+        return ResponseEntity.ok(s);
+    }
+
+}

+ 78 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/controller/TypeController.java

@@ -0,0 +1,78 @@
+package com.jeeplus.business.knowledge.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareType;
+import com.jeeplus.business.knowledge.mapper.KnowledgeShareTypeMapper;
+import com.jeeplus.business.knowledge.service.TypeService;
+import com.jeeplus.business.knowledge.service.dto.KnowledgeShareTypeDto;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+@RestController
+@Api("/知识分享类型")
+@RequestMapping(value = "/knowledgeShare/type")
+public class TypeController {
+
+    @Resource
+    private TypeService service;
+
+    @Resource
+    private KnowledgeShareTypeMapper mapper;
+
+    /**
+     * 列表查询
+     * @param type
+     * @return
+     */
+    @ApiOperation(value = "列表")
+    @GetMapping("/list")
+    public ResponseEntity<IPage<KnowledgeShareTypeDto>> list(Page<KnowledgeShareTypeDto> page, KnowledgeShareType type) {
+        return ResponseEntity.ok(service.list(page, type));
+    }
+
+    /**
+     * 新增/修改
+     * @param type
+     * @return
+     */
+    @ApiOperation(value = "新增/修改")
+    @PostMapping("/save")
+    public ResponseEntity<String> save(@RequestBody KnowledgeShareType type) {
+        Boolean b = service.save(type);
+        if (b) {
+            return ResponseEntity.ok("操作成功");
+        } else {
+            return ResponseEntity.badRequest().body("该类型已存在,请重新输入");
+        }
+    }
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id查询")
+    @GetMapping("/findById")
+    public ResponseEntity<KnowledgeShareType> findById(String id) {
+        KnowledgeShareType knowledgeShareType = mapper.selectById(id);
+        return ResponseEntity.ok(knowledgeShareType);
+    }
+
+    /**
+     * 根据id删除
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id删除")
+    @GetMapping("/remove")
+    public ResponseEntity<String> remove(String id) {
+        mapper.deleteById(id);
+        return ResponseEntity.ok("操作完成");
+    }
+
+}

+ 33 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/domain/KnowledgeShareComment.java

@@ -0,0 +1,33 @@
+package com.jeeplus.business.knowledge.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName(value = "knowledge_share_comment")
+public class KnowledgeShareComment extends BaseEntity {
+
+    /**
+     * 知识分享详情id
+     */
+    private String detailId;
+
+    /**
+     * 评论人id
+     */
+    private String userId;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 时间差
+     */
+    @TableField(exist = false)
+    private String deff;
+
+}

+ 26 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/domain/KnowledgeShareDetail.java

@@ -0,0 +1,26 @@
+package com.jeeplus.business.knowledge.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName(value = "knowledge_share_detail")
+public class KnowledgeShareDetail extends BaseEntity {
+
+    /**
+     * 知识分享类型id
+     */
+    private String typeId;
+
+    /**
+     * 主题
+     */
+    private String title;
+
+    /**
+     * 内容
+     */
+    private String detail;
+
+}

+ 26 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/domain/KnowledgeShareType.java

@@ -0,0 +1,26 @@
+package com.jeeplus.business.knowledge.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName("knowledge_share_type")
+public class KnowledgeShareType extends BaseEntity {
+
+    /**
+     * 分享类型key值
+     */
+    private String klgsKey;
+
+    /**
+     * 分享类型
+     */
+    private String klgsType;
+
+    /**
+     * 排序
+     */
+    private Integer klgsSort;
+
+}

+ 45 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/domain/KnowledgeShareVisit.java

@@ -0,0 +1,45 @@
+package com.jeeplus.business.knowledge.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@TableName(value = "knowledge_share_visit")
+public class KnowledgeShareVisit extends BaseEntity {
+
+    /**
+     * 知识分享详情id
+     */
+    private String detailId;
+
+    /**
+     * 访问人id
+     */
+    private String userId;
+
+    /**
+     * 初次访问时间
+     */
+    private Date firstTime;
+
+    /**
+     * 最近访问时间
+     */
+    private Date lastTime;
+
+    /**
+     * 访问次数
+     */
+    private Integer num;
+
+    /**
+     * 访问人
+     */
+    @TableField(exist = false)
+    private String userName;
+
+}

+ 8 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/KnowledgeShareCommentMapper.java

@@ -0,0 +1,8 @@
+package com.jeeplus.business.knowledge.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareComment;
+
+
+public interface KnowledgeShareCommentMapper extends BaseMapper<KnowledgeShareComment> {
+}

+ 20 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/KnowledgeShareDetailMapper.java

@@ -0,0 +1,20 @@
+package com.jeeplus.business.knowledge.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareDetail;
+import com.jeeplus.business.knowledge.service.dto.KnowledgeShareListDto;
+import com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto;
+import com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+public interface KnowledgeShareDetailMapper extends BaseMapper<KnowledgeShareDetail> {
+
+    IPage<KnowledgeShareListDto> findList(Page<KnowledgeShareListDto> page, @Param("detail") KnowledgeShareDetail detail);
+
+    List<WorkAttachmentInfoDTO> findDtos(@Param("id")String id);
+}

+ 19 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/KnowledgeShareTypeMapper.java

@@ -0,0 +1,19 @@
+package com.jeeplus.business.knowledge.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import com.jeeplus.business.knowledge.domain.KnowledgeShareType;
+import com.jeeplus.business.knowledge.service.dto.KnowledgeShareTypeDto;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface KnowledgeShareTypeMapper extends BaseMapper<KnowledgeShareType> {
+
+    IPage<KnowledgeShareTypeDto> findList(Page<KnowledgeShareTypeDto> page, @Param("type") String type);
+
+    List<KnowledgeShareType> checkList(@Param("type")KnowledgeShareType type);
+
+}

+ 12 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/KnowledgeShareVisitMapper.java

@@ -0,0 +1,12 @@
+package com.jeeplus.business.knowledge.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareVisit;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+public interface KnowledgeShareVisitMapper extends BaseMapper<KnowledgeShareVisit> {
+    List<KnowledgeShareVisit> selectByDetailId(@Param("size") Integer size, @Param("id") String id);
+}

+ 48 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/xml/KnowledgeShareDetailMapper.xml

@@ -0,0 +1,48 @@
+<?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.jeeplus.business.knowledge.mapper.KnowledgeShareDetailMapper">
+
+	<select id="findList" resultType="com.jeeplus.business.knowledge.service.dto.KnowledgeShareListDto">
+		SELECT
+			a.id,
+			a.create_by_id,
+			b.`name` AS createName,
+			a.create_time,
+			a.update_by_id,
+			a.update_time,
+			a.del_flag,
+			a.type_id,
+			a.title,
+			a.detail,
+			(SELECT count(0) FROM knowledge_share_visit b WHERE a.id = b.detail_id AND b.del_flag = 0) AS visit_num,
+			(SELECT count(0) FROM knowledge_share_comment c WHERE a.id = c.detail_id AND c.del_flag = 0) AS comment_num
+		FROM knowledge_share_detail a
+		LEFT JOIN sys_user b ON a.create_by_id = b.id
+		WHERE a.del_flag = 0
+		<if test="detail.typeId != null and detail.typeId != ''">
+			AND a.type_id = #{detail.typeId}
+		</if>
+		<if test="detail.title != null and detail.title != ''">
+			AND a.title LIKE CONCAT ('%', #{detail.title}, '%')
+		</if>
+		<if test="detail.createById != null and detail.createById != ''">
+			AND b.id = #{detail.createById}
+		</if>
+		ORDER BY a.update_time DESC
+	</select>
+
+	<select id="findDtos" resultType="com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO">
+		SELECT
+			id,
+			url,
+			attachment_name AS `name`,
+			create_by_id AS `by`,
+			create_time
+		FROM
+			work_attachment
+		WHERE
+			del_flag = 0
+			AND attachment_id = #{id}
+	</select>
+
+</mapper>

+ 51 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/xml/KnowledgeShareTypeMapper.xml

@@ -0,0 +1,51 @@
+<?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.jeeplus.business.knowledge.mapper.KnowledgeShareTypeMapper">
+
+	<select id="findList" resultType="com.jeeplus.business.knowledge.service.dto.KnowledgeShareTypeDto">
+		SELECT
+			a.id,
+			a.create_by_id,
+			b.`name` AS createName,
+			a.create_time,
+			a.update_by_id,
+			a.update_time,
+			a.del_flag,
+			a.klgs_key,
+			a.klgs_type,
+			a.klgs_sort
+		FROM
+			knowledge_share_type a
+			LEFT JOIN sys_user b ON a.create_by_id = b.id
+		WHERE
+			a.del_flag = 0
+			<if test="type != null and type != ''">
+				AND a.klgs_type LIKE CONCAT ('%', #{type}, '%')
+			</if>
+		ORDER BY
+			a.klgs_sort
+	</select>
+
+	<select id="checkList" resultType="com.jeeplus.business.knowledge.domain.KnowledgeShareType">
+		SELECT
+			id,
+			create_by_id,
+			create_time,
+			update_by_id,
+			update_time,
+			del_flag,
+			klgs_key,
+			klgs_type,
+			klgs_sort
+		FROM
+			knowledge_share_type
+		WHERE
+			del_flag =0
+			AND klgs_key = #{type.klgsKey}
+			AND klgs_type = #{type.klgsType}
+			<if test="type.id != null and type.id != ''">
+				AND id != #{type.id}
+			</if>
+	</select>
+
+</mapper>

+ 16 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/mapper/xml/KnowledgeShareVisitMapper.xml

@@ -0,0 +1,16 @@
+<?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.jeeplus.business.knowledge.mapper.KnowledgeShareVisitMapper">
+    <select id="selectByDetailId" resultType="com.jeeplus.business.knowledge.domain.KnowledgeShareVisit">
+        select
+            sv.user_id,
+            sv.first_time,
+            sv.last_time,
+            sv.num,
+            su.name as userName
+        from knowledge_share_visit sv
+        left join sys_user su on sv.user_id=su.id
+        where sv.detail_id=#{id} and sv.del_flag=0
+        order By sv.last_time DESC limit #{size}
+    </select>
+</mapper>

+ 336 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/KnowledgeShareInfoService.java

@@ -0,0 +1,336 @@
+package com.jeeplus.business.knowledge.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.editor.domain.EditorFiles;
+import com.jeeplus.business.editor.service.EditorFilesService;
+import com.jeeplus.business.editor.service.dto.EditorFilesDTO;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareComment;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareDetail;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareVisit;
+import com.jeeplus.business.knowledge.mapper.KnowledgeShareCommentMapper;
+import com.jeeplus.business.knowledge.mapper.KnowledgeShareDetailMapper;
+import com.jeeplus.business.knowledge.mapper.KnowledgeShareTypeMapper;
+import com.jeeplus.business.knowledge.mapper.KnowledgeShareVisitMapper;
+import com.jeeplus.business.knowledge.service.dto.KnowledgeShareInfoDto;
+import com.jeeplus.business.knowledge.service.dto.KnowledgeShareListDto;
+import com.jeeplus.business.workContractInfo.mapper.JyWorkContractInfoMapper;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.service.dto.BaseDTO;
+import com.jeeplus.pubmodules.oss.domain.WorkAttachment;
+import com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.feign.IWorkAttachmentApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO;
+import com.jeeplus.sys.utils.UserUtils;
+
+import io.swagger.models.auth.In;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+
+@Service
+public class KnowledgeShareInfoService {
+
+    @Resource
+    private KnowledgeShareDetailMapper detailMapper;
+
+    @Resource
+    private KnowledgeShareVisitMapper visitMapper;
+
+    @Resource
+    private KnowledgeShareCommentMapper commentMapper;
+
+    @Resource
+    private KnowledgeShareTypeMapper typeMapper;
+
+
+
+
+
+
+
+    @Resource
+    private EditorFilesService editorFilesService;
+
+    public IPage<KnowledgeShareListDto> list(Page<KnowledgeShareListDto> page, KnowledgeShareDetail detail) {
+        return detailMapper.findList(page, detail);
+    }
+
+    public String save(KnowledgeShareInfoDto dto) {
+        if (StringUtils.isNotEmpty(dto.getId())) {
+            return update(dto);
+        } else {
+            return add(dto);
+        }
+    }
+
+    public String add(KnowledgeShareInfoDto dto) {
+        // 获取当前登录人信息
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        // 生成id
+        String id = UUID.randomUUID().toString().replace("-", "");
+        // 保存知识分享详情信息
+        KnowledgeShareDetail detail = new KnowledgeShareDetail();
+        BeanUtils.copyProperties(dto, detail);
+        detail.setId(id);
+        detail.setCreateById(userDTO.getId());
+        detail.setCreateTime(new Date());
+        detail.setUpdateById(userDTO.getId());
+        detail.setUpdateTime(new Date());
+        detail.setDelFlag(0);
+        detailMapper.insert(detail);
+        // 保存富文本中的文件
+        editorFilesService.remove(new QueryWrapper<EditorFiles>().lambda().eq(EditorFiles::getSourceId,id));
+        if (CollectionUtil.isNotEmpty(dto.getEditorFilesDTOList())) {
+            dto.getEditorFilesDTOList().stream().forEach(item->{
+                editorFilesService.saveUrl(item.getTemporaryUrl(),item.getUrl(),id);
+            });
+        }
+        // 保存附件信息
+        if (ObjectUtil.isNotEmpty(dto.getFiles())) {
+            AtomicInteger sort = new AtomicInteger(1);
+            dto.getFiles().stream().forEach(item->{
+                //保存附件信息
+                WorkAttachmentInfo workAttachmentDto = new WorkAttachmentInfo();
+                workAttachmentDto.setName(item.getName());
+                workAttachmentDto.setSize(item.getSize());
+                workAttachmentDto.setUrl(item.getUrl());
+                Map<String,String> map = new HashMap<>();
+                String workAttachmentDtoInfo = JSON.toJSONString(workAttachmentDto);
+                String userDTOInfo = JSON.toJSONString(userDTO);
+                String attachmentId = id;
+                String attachmentFlag = "knowledgeShare";
+                String sortInfo = Integer.toString(sort.get());
+                map.put("workAttachmentDtoInfo",workAttachmentDtoInfo);
+                map.put("userDTOInfo",userDTOInfo);
+                map.put("attachmentId",attachmentId);
+                map.put("attachmentFlag",attachmentFlag);
+                map.put("sortInfo",sortInfo);
+                String fileId = SpringUtil.getBean ( IWorkAttachmentApi.class ).saveFile(map);
+                sort.getAndIncrement();
+            });
+        }
+        return "操作完成";
+    }
+
+    public String update(KnowledgeShareInfoDto dto) {
+        // 获取当前登录人信息
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        // 保存知识分享详情信息
+        KnowledgeShareDetail detail = new KnowledgeShareDetail();
+        BeanUtils.copyProperties(dto, detail);
+        detail.setUpdateById(userDTO.getId());
+        detail.setUpdateTime(new Date());
+        detailMapper.updateById(detail);
+        // 保存富文本中的文件
+        editorFilesService.remove(new QueryWrapper<EditorFiles>().lambda().eq(EditorFiles::getSourceId,dto.getId()));
+        if (CollectionUtil.isNotEmpty(dto.getEditorFilesDTOList())) {
+            dto.getEditorFilesDTOList().stream().forEach(item->{
+                editorFilesService.saveUrl(item.getTemporaryUrl(),item.getUrl(),dto.getId());
+            });
+        }
+        // 保存附件信息
+        if (ObjectUtil.isNotEmpty(dto.getFiles())) {
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(dto.getId());
+            AtomicInteger sort = new AtomicInteger(1);
+            dto.getFiles().stream().forEach(item->{
+                //保存附件信息
+                WorkAttachmentInfo workAttachmentDto = new WorkAttachmentInfo();
+                workAttachmentDto.setName(item.getName());
+                workAttachmentDto.setSize(item.getSize());
+                workAttachmentDto.setUrl(item.getUrl());
+                Map<String,String> map = new HashMap<>();
+                String workAttachmentDtoInfo = JSON.toJSONString(workAttachmentDto);
+                String userDTOInfo = JSON.toJSONString(userDTO);
+                String attachmentId = dto.getId();
+                String attachmentFlag = "knowledgeShare";
+                String sortInfo = Integer.toString(sort.get());
+                map.put("workAttachmentDtoInfo",workAttachmentDtoInfo);
+                map.put("userDTOInfo",userDTOInfo);
+                map.put("attachmentId",attachmentId);
+                map.put("attachmentFlag",attachmentFlag);
+                map.put("sortInfo",sortInfo);
+                String fileId = SpringUtil.getBean ( IWorkAttachmentApi.class ).saveFile(map);
+                sort.getAndIncrement();
+            });
+        }
+        return "操作完成";
+    }
+
+    public KnowledgeShareInfoDto findById(String id, String method, Integer size) {
+        KnowledgeShareInfoDto dto = new KnowledgeShareInfoDto();
+        // 获取当前登录人信息
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        if ("view".equals(method)) {
+            // 保存访问信息
+            saveVisit(id, userDTO);
+        }
+        // 查询数据
+        KnowledgeShareDetail detail = detailMapper.selectById(id);
+        BeanUtils.copyProperties(detail, dto);
+        dto.setTypeName(typeMapper.selectById(detail.getTypeId()).getKlgsType());
+
+        // 富文本图片查询
+        if (ObjectUtil.isNotEmpty(detail)) {
+            if(StringUtils.isNotBlank(detail.getDetail())){
+                String newContent = editorFilesService.getNewContent(detail.getDetail(), id);
+                dto.setDetail(newContent);
+                KnowledgeShareDetail k = new KnowledgeShareDetail();
+                k.setId(id);
+                k.setDetail(newContent);
+                detailMapper.update(k, new QueryWrapper<KnowledgeShareDetail>().lambda().eq(KnowledgeShareDetail::getId, id));
+                List<EditorFiles> list = editorFilesService.list(new QueryWrapper<EditorFiles>().lambda().eq(EditorFiles::getSourceId, id));
+                List<EditorFilesDTO> editorFilesDTOList = new ArrayList<>();
+                list.stream().forEach(item->{
+                    EditorFilesDTO editorFilesDTO = new EditorFilesDTO();
+                    editorFilesDTO.setSourceId(item.getSourceId());
+                    editorFilesDTO.setTemporaryUrl(item.getTemporaryUrl());
+                    editorFilesDTO.setUrl(item.getUrl());
+                    editorFilesDTOList.add(editorFilesDTO);
+                });
+                dto.setEditorFilesDTOList(editorFilesDTOList);
+            }
+        }
+
+        // 查询访问记录
+        LambdaQueryWrapper<KnowledgeShareVisit> visitWrapper = new LambdaQueryWrapper<>();
+        visitWrapper.eq(KnowledgeShareVisit::getDetailId, id).eq(BaseEntity::getDelFlag, 0);
+        List<KnowledgeShareVisit> visits = visitMapper.selectByDetailId(size,id);
+        if (CollectionUtils.isNotEmpty(visits)) {
+            visits.stream().forEach(i -> {
+                UserDTO visitUser = UserUtils.get(i.getUserId());
+                i.setUserId(visitUser.getName());
+            });
+        }
+        dto.setVisits(visits);
+        //查询访问人数
+        Integer integer = visitMapper.selectCount(visitWrapper);
+        dto.setVisitNum(integer);
+
+        // 查询回复记录
+        LambdaQueryWrapper<KnowledgeShareComment> commentWrapper = new LambdaQueryWrapper<>();
+        commentWrapper.eq(KnowledgeShareComment::getDetailId, id).eq(BaseEntity::getDelFlag, 0).orderByDesc(BaseEntity::getCreateTime);
+        List<KnowledgeShareComment> comments = commentMapper.selectList(commentWrapper);
+        if (CollectionUtils.isNotEmpty(comments)) {
+            comments.stream().forEach(i -> {
+                UserDTO commentUser = UserUtils.get(i.getUserId());
+                i.setUserId(commentUser.getName());
+                i.setDeff(timeDef(i.getCreateTime()));
+            });
+        }
+        dto.setComments(comments);
+        // 查询附件信息
+        List<WorkAttachmentInfoDTO> files = detailMapper.findDtos(id);
+        if (CollectionUtils.isNotEmpty(files)) {
+            for (WorkAttachmentInfoDTO i : files) {
+                i.setCreateBy(SpringUtil.getBean ( IUserApi.class ).getById(i.getBy()));
+            }
+            dto.setFiles(files);
+        }
+        return dto;
+    }
+
+    public String removeById(String id) {
+        // 删除知识分享主表
+        detailMapper.deleteById(id);
+        // 删除知识分享浏览记录表
+        LambdaQueryWrapper<KnowledgeShareVisit> visitWrapper = new LambdaQueryWrapper<>();
+        visitWrapper.eq(KnowledgeShareVisit::getDetailId, id).eq(BaseEntity::getDelFlag, 0);
+        visitMapper.delete(visitWrapper);
+        // 删除知识分享评论表
+        LambdaQueryWrapper<KnowledgeShareComment> commentWrapper = new LambdaQueryWrapper<>();
+        commentWrapper.eq(KnowledgeShareComment::getDetailId, id).eq(BaseEntity::getDelFlag, 0);
+        commentMapper.delete(commentWrapper);
+        // 删除附件信息表
+        SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(id);
+        return "操作完成";
+    }
+
+    public String addComment(KnowledgeShareComment comment) {
+        // 获取当前登录人
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        // 生成id
+        String id = UUID.randomUUID().toString().replace("-", "");
+        comment.setId(id);
+        comment.setCreateById(userDTO.getId());
+        comment.setCreateTime(new Date());
+        comment.setUpdateById(userDTO.getId());
+        comment.setUpdateTime(new Date());
+        comment.setDelFlag(0);
+        comment.setUserId(userDTO.getId());
+        commentMapper.insert(comment);
+        return "操作完成";
+    }
+
+    public String delComment(String id) {
+        commentMapper.deleteById(id);
+        return "操作完成";
+    }
+
+    /**
+     * 保存访问记录
+     */
+    public Boolean saveVisit(String id, UserDTO userDTO) {
+        LambdaQueryWrapper<KnowledgeShareVisit> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(BaseEntity::getDelFlag, 0).eq(KnowledgeShareVisit::getDetailId, id).eq(KnowledgeShareVisit::getUserId, userDTO.getId());
+        KnowledgeShareVisit visit = visitMapper.selectOne(wrapper);
+        if (visit != null) {
+            // 访问记录存在,则增加访问次数和更改最近访问时间
+            visit.setNum(visit.getNum() + 1);
+            visit.setLastTime(new Date());
+            visitMapper.updateById(visit);
+        } else {
+            // 访问记录不存在,则新增访问记录
+            visit = new KnowledgeShareVisit();
+            // 生成id
+            String visitId = UUID.randomUUID().toString().replace("-", "");
+            visit.setId(visitId);
+            visit.setCreateById(userDTO.getId());
+            visit.setCreateTime(new Date());
+            visit.setUpdateById(userDTO.getId());
+            visit.setUpdateTime(new Date());
+            visit.setDelFlag(0);
+            visit.setDetailId(id);
+            visit.setUserId(userDTO.getId());
+            visit.setFirstTime(new Date());
+            visit.setLastTime(new Date());
+            visit.setNum(1);
+            visitMapper.insert(visit);
+        }
+        return true;
+    }
+
+    /**
+     * 计算时间差
+     */
+    public String timeDef(Date time) {
+        Long def = new Date().getTime() - time.getTime();
+        // 计算天数
+        long day = def / (1000 * 60 * 60 * 24);
+        if (day != 0) {
+            return day + "天前";
+        }
+        // 计算小时
+        long house = def / (1000 * 60 * 60);
+        if (house != 0) {
+            return house + "小时前";
+        }
+        // 计算分钟
+        long min = def / (1000 * 60);
+        return min + "分钟前";
+    }
+}

+ 66 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/TypeService.java

@@ -0,0 +1,66 @@
+package com.jeeplus.business.knowledge.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareType;
+import com.jeeplus.business.knowledge.mapper.KnowledgeShareTypeMapper;
+import com.jeeplus.business.knowledge.service.dto.KnowledgeShareTypeDto;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.UserUtils;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+@Service
+public class TypeService {
+
+    @Resource
+    private KnowledgeShareTypeMapper mapper;
+
+    public IPage<KnowledgeShareTypeDto> list(Page<KnowledgeShareTypeDto> page, KnowledgeShareType type) {
+        return mapper.findList(page, type.getKlgsType());
+    }
+
+    public Boolean save(KnowledgeShareType type) {
+        List<KnowledgeShareType> list = mapper.checkList(type);
+        if (CollectionUtils.isNotEmpty(list)) {
+            return false;
+        }
+        if (StringUtils.isNotEmpty(type.getId())) {
+            return update(type);
+        } else {
+            return add(type);
+        }
+    }
+
+    public Boolean update(KnowledgeShareType type) {
+        // 获取当前登录人
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        type.setUpdateById(userDTO.getId());
+        type.setUpdateTime(new Date());
+        mapper.updateById(type);
+        return true;
+    }
+
+    public Boolean add(KnowledgeShareType type) {
+        // 获取当前登录人
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        // 生成id
+        String id = UUID.randomUUID().toString().replace("-", "");
+        type.setId(id);
+        type.setCreateById(userDTO.getId());
+        type.setCreateTime(new Date());
+        type.setUpdateById(userDTO.getId());
+        type.setUpdateTime(new Date());
+        type.setDelFlag(0);
+        mapper.insert(type);
+        return true;
+    }
+
+}

+ 93 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/dto/KnowledgeShareInfoDto.java

@@ -0,0 +1,93 @@
+package com.jeeplus.business.knowledge.service.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.business.editor.service.dto.EditorFilesDTO;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareComment;
+import com.jeeplus.business.knowledge.domain.KnowledgeShareVisit;
+import com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto;
+import com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class KnowledgeShareInfoDto {
+
+    /**
+     * 主键
+     */
+    private String id;
+
+    /**
+     * 创建人
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createDate;
+
+    /**
+     * 更新人
+     */
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    private Date updateDate;
+
+    /**
+     * 删除状态
+     */
+    private Integer delFlag;
+
+    /**
+     * 知识分享类型id
+     */
+    private String typeId;
+
+    /**
+     * 知识分享类型名称
+     */
+    private String typeName;
+
+    /**
+     * 主题
+     */
+    private String title;
+
+    /**
+     * 内容
+     */
+    private String detail;
+
+    /**
+     * 访问记录
+     */
+    private List<KnowledgeShareVisit> visits;
+
+    /**
+     * 评论记录
+     */
+    private List<KnowledgeShareComment> comments;
+
+    /**
+     * 附件列表
+     */
+    private List<WorkAttachmentInfoDTO> files;
+
+    /**
+     * 富文本图片集合
+     */
+    private List<EditorFilesDTO> editorFilesDTOList;
+
+    /**
+     * 阅读量
+     */
+    private Integer visitNum;
+
+}

+ 67 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/dto/KnowledgeShareListDto.java

@@ -0,0 +1,67 @@
+package com.jeeplus.business.knowledge.service.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class KnowledgeShareListDto {
+
+    /**
+     * 主键
+     */
+    private String id;
+
+    /**
+     * 创建人
+     */
+    private String createName;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:dd")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private String updateById;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 删除状态
+     */
+    private Integer delFlag;
+
+    /**
+     * 知识分享类型id
+     */
+    private String typeId;
+
+    /**
+     * 主题
+     */
+    private String title;
+
+    /**
+     * 内容
+     */
+    private String detail;
+
+    /**
+     * 阅读量
+     */
+    private Integer visitNum;
+
+    /**
+     * 回复量
+     */
+    private Integer commentNum;
+
+}

+ 57 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/knowledge/service/dto/KnowledgeShareTypeDto.java

@@ -0,0 +1,57 @@
+package com.jeeplus.business.knowledge.service.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class KnowledgeShareTypeDto {
+
+    /**
+     * 主键
+     */
+    private String id;
+
+    /**
+     * 创建人
+     */
+    private String createName;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private String updateById;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 删除状态
+     */
+    private Integer delFlag;
+
+    /**
+     * 分享类型key值
+     */
+    private String klgsKey;
+
+    /**
+     * 分享类型
+     */
+    private String klgsType;
+
+    /**
+     * 排序
+     */
+    private Integer klgsSort;
+
+}

+ 2 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/meetingRoom/mapper/MeetingRoomMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.meetingRoom.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -15,6 +16,7 @@ import java.util.List;
 
 @Mapper
 public interface MeetingRoomMapper extends BaseMapper<MeetingRoom> {
+    @InterceptorIgnore(tenantLine = "true")
     IPage<MeetingRoom> findPageList(Page<MeetingRoom> page, @Param(Constants.WRAPPER) QueryWrapper<MeetingRoom> meetingRoomQueryWrapper);
 
     MeetingRoomDTO findById(@Param("id") String id);

+ 6 - 113
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/controller/JyProjectController.java

@@ -225,7 +225,7 @@ public class JyProjectController {
     }
 
     /**
-     * 下载一级校审表
+     * 下载报告质量内审单
      * @param response
      * @param info
      */
@@ -233,7 +233,7 @@ public class JyProjectController {
     @ResponseBody
     public void downloadFirstAuditTpl(HttpServletResponse response, JyProject info)  {
         Map data = jyProjectService.getAuditInfoMap(info);
-
+        Object projectName = data.get("projectName");
 
         //模板对象
         Template template=null;
@@ -252,131 +252,24 @@ public class JyProjectController {
             cfg.setDirectoryForTemplateLoading(path);
             //选择对应的ftl文件
             template = cfg.getTemplate("firstAudit.ftl","UTF-8");
-
-            File docFile = new File("嘉溢一级校审.doc");
-            FreemarkerUtil.generateFile(data,template,docFile);
-            JyResponseUtil.docResponse("嘉溢一级校审.doc",docFile,response);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }finally {
-
-            if(System.getProperty("os.name").toLowerCase().contains("win")){
-                //获取tomcat的路径
-                String tomcatFilePath=System.getProperty("catalina.home");
-                //删除tomcat目录下的处理后的文件信息
-                File tomcatFile = new File(tomcatFilePath+"/bin/"+"嘉溢一级校审.doc");
-                if (tomcatFile.isFile()) {
-                    tomcatFile.delete();
-                }
-            }else{
-                //删除目录下的处理后的文件信息
-                File tomcatFile = new File("/mnt/project/cloud/"+"嘉溢一级校审.doc");
-                if (tomcatFile.isFile()) {
-                    tomcatFile.delete();
-                }
-            }
-        }
-
-    }
-
-    /**
-     * 下载二级校审表
-     * @param response
-     * @param info
-     */
-    @RequestMapping(value="downloadSecondAuditTpl")
-    @ResponseBody
-    public void downloadSecondAuditTpl(HttpServletResponse response, JyProject info)  {
-        Map data = jyProjectService.getAuditInfoMap(info);
-
-
-        //模板对象
-        Template template=null;
-        //下载文件地址
-        String filePath = null;
-        if(System.getProperty("os.name").toLowerCase().contains("win")){
-            filePath = this.getClass().getResource("/").getPath()+"/freemarker";
-        }else{
-            filePath = "/mnt/project/cloud/freemarker";
-        }
-        //freemaker模板路径
-        File path = new File(filePath);
-        Configuration cfg = new Configuration();
-        try {
-            cfg.setDirectoryForTemplateLoading(path);
-            //选择对应的ftl文件
-            template = cfg.getTemplate("secondAudit.ftl","UTF-8");
-
-            File docFile = new File("嘉溢二级校审.doc");
+            File docFile = new File(projectName+"报告质量内审单.doc");
             FreemarkerUtil.generateFile(data,template,docFile);
-            JyResponseUtil.docResponse("嘉溢二级校审.doc",docFile,response);
+            JyResponseUtil.docResponse(projectName+"报告质量内审单.doc",docFile,response);
         } catch (IOException e) {
             e.printStackTrace();
         }finally {
-            if(System.getProperty("os.name").toLowerCase().contains("win")){
-                //获取tomcat的路径
-                String tomcatFilePath=System.getProperty("catalina.home");
-                //删除tomcat目录下的处理后的文件信息
-                File tomcatFile = new File(tomcatFilePath+"/bin/"+"嘉溢二级校审.doc");
-                if (tomcatFile.isFile()) {
-                    tomcatFile.delete();
-                }
-            }else{
-                //删除目录下的处理后的文件信息
-                File tomcatFile = new File("/mnt/project/cloud/"+"嘉溢二级校审.doc");
-                if (tomcatFile.isFile()) {
-                    tomcatFile.delete();
-                }
-            }
-        }
-
-    }
-
-    /**
-     * 下载三级校审表
-     * @param response
-     * @param info
-     */
-    @RequestMapping(value="downloadThirdlyAuditTpl")
-    @ResponseBody
-    public void downloadThirdlyAuditTpl(HttpServletResponse response, JyProject info)  {
-        Map data = jyProjectService.getAuditInfoMap(info);
-
 
-        //模板对象
-        Template template=null;
-        //下载文件地址
-        String filePath = null;
-        if(System.getProperty("os.name").toLowerCase().contains("win")){
-            filePath = this.getClass().getResource("/").getPath()+"/freemarker";
-        }else{
-            filePath = "/mnt/project/cloud/freemarker";
-        }
-        //freemaker模板路径
-        File path = new File(filePath);
-        Configuration cfg = new Configuration();
-        try {
-            cfg.setDirectoryForTemplateLoading(path);
-            //选择对应的ftl文件
-            template = cfg.getTemplate("thirdAudit.ftl","UTF-8");
-
-            File docFile = new File("嘉溢三级校审.doc");
-            FreemarkerUtil.generateFile(data,template,docFile);
-            JyResponseUtil.docResponse("嘉溢三级校审.doc",docFile,response);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }finally {
             if(System.getProperty("os.name").toLowerCase().contains("win")){
                 //获取tomcat的路径
                 String tomcatFilePath=System.getProperty("catalina.home");
                 //删除tomcat目录下的处理后的文件信息
-                File tomcatFile = new File(tomcatFilePath+"/bin/"+"嘉溢三级校审.doc");
+                File tomcatFile = new File(tomcatFilePath+"/bin/"+projectName+"报告质量内审单.doc");
                 if (tomcatFile.isFile()) {
                     tomcatFile.delete();
                 }
             }else{
                 //删除目录下的处理后的文件信息
-                File tomcatFile = new File("/mnt/project/cloud/"+"嘉溢三级校审.doc");
+                File tomcatFile = new File("/mnt/project/cloud/"+projectName+"报告质量内审单.doc");
                 if (tomcatFile.isFile()) {
                     tomcatFile.delete();
                 }

+ 1 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/JyProjectMapper.java

@@ -17,7 +17,7 @@ import java.util.List;
 
 
 public interface JyProjectMapper extends BaseMapper<JyProject> {
-
+    @InterceptorIgnore(tenantLine = "true")
     IPage<JyProject> findPageList(Page<JyProject> page, @Param(Constants.WRAPPER) QueryWrapper<JyProject> wrapper);
 
     List<String> getHaveProjectIds(@Param("currentUser")UserDTO userDTO);

+ 99 - 51
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectService.java

@@ -35,8 +35,10 @@ import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.feign.IWorkAttachmentApi;
 
 //import com.jeeplus.sys.mapper.DictValueMapper;
+import com.jeeplus.sys.service.dto.DictValueDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO;
+import com.jeeplus.sys.utils.DictUtils;
 import org.apache.commons.compress.utils.Lists;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -50,6 +52,8 @@ import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 
 @Service
@@ -178,6 +182,10 @@ public class JyProjectService {
             wrapper.eq("par.status", info.getReviewStatus());
         }
         IPage<JyProject> pageList = jyProjectMapper.findPageList(page, wrapper);
+        //获取用印id
+        QueryWrapper<Signet> queryWrapper = new QueryWrapper<>();
+        queryWrapper.orderByDesc("create_time");
+        List<Signet> signets = signetMapper.selectList(queryWrapper);
         pageList.getRecords().stream().forEach(item ->{
             // 项目登记
             if (StringUtils.isNotBlank(item.getTaskId()) && StringUtils.isNotBlank(item.getStatus())) {
@@ -186,42 +194,30 @@ public class JyProjectService {
                 }
             }
             //合同名称及委托方联系人
-            if (StringUtils.isEmpty(item.getContractName())){
-                item.setContractName("暂无合同");
-            }
-            //获取用印id
-            List<Signet> signets = signetMapper.selectList(new QueryWrapper<Signet>());
+//            if (StringUtils.isEmpty(item.getContractName())){
+//                item.setContractName("暂无合同");
+//            }
             for (Signet signet : signets) {
                 if (StringUtils.isNotBlank(signet.getProjectId())){
                     String[] split = signet.getProjectId().split(",");
                     for (String s : split) {
                         if (StringUtils.isNotBlank(s)){
-                            if (s.equals(item.getId())){
-                                item.setSealId(signet.getId());
-                            }
-                        }
-                    }
-                }
-            }
-            //获取报批签发信息
-            List<JyProjectReportsSubmit> jyProjectReportsSubmits = jyProjectReportsSubmitMapper.selectList(new QueryWrapper<JyProjectReportsSubmit>());
-            for (JyProjectReportsSubmit jyProjectReportsSubmit : jyProjectReportsSubmits) {
-                if (StringUtils.isNotBlank(jyProjectReportsSubmit.getProjectId())){
-                    String[] split = jyProjectReportsSubmit.getProjectId().split(",");
-                    for (String s : split) {
-                        if (StringUtils.isNotBlank(s)){
-                            if (s.equals(item.getId())){
-                                item.setReportsSubmitId(jyProjectReportsSubmit.getId());
-                                item.setProcInsIdReports(jyProjectReportsSubmit.getProcInsId());
-                                item.setReportsSubmit(jyProjectReportsSubmit.getStatus());
+                            if (StringUtils.isNotBlank(signet.getTypeStatus())){
+                                //用印类型为报告,则获取报告签发
+                                if ( s.equals(item.getId()) && signet.getTypeStatus().equals("1") ){
+                                    item.setSealId(signet.getId());
+                                }
+                                if (s.equals(item.getId()) && signet.getTypeStatus().equals("2")){
+                                    //用印类型为报批,则设置报批签发所需信息
+                                    item.setReportsSubmitId(signet.getId());
+                                    item.setProcInsIdReports(signet.getProcInsId());
+                                    item.setReportsSubmit(signet.getStatus());
+                                }
                             }
                         }
                     }
                 }
-
             }
-
-
         });
         return pageList;
     }
@@ -297,7 +293,12 @@ public class JyProjectService {
             if (projectNum == 0){
                 projectNo=byId.getNo()+"-0"+(count+1);
             }else {
-                projectNo=byId.getNo()+"-0"+(projectNum+1);
+                if (projectNum<10){
+                    projectNo=byId.getNo()+"-0"+(projectNum+1);
+                }else {
+                    projectNo=byId.getNo()+"-"+(projectNum+1);
+                }
+
             }
         }
         jyProject.setId(id);//生成主键id
@@ -392,21 +393,72 @@ public class JyProjectService {
         //获取合同编号
         JyWorkContractInfo contractInfo = jyWorkContractInfoMapper.findById(dto.getContractId());
         // 修改项目管理列表主表信息
-        if (dto.getContractStatus().equals("1")){
-            //获取项目编号
-            JyProject project = jyProjectMapper.getById(dto.getId());
-            Integer projectNum=jyProjectMapper.getProByContractId(dto.getContractId());
-            //生成新的项目编号   合同编号+合同下的项目数量+(项目编号)
-            Integer count=0;
-            //判断当前合同下是否有项目
-            if (projectNum==0){
-                projectNo=contractInfo.getNo()+"-0"+(count+1)+"("+project.getNo()+")";
+        //获取项目编号
+        JyProject project = jyProjectMapper.getById(dto.getId());
+        //获取合同下的项目数量
+        Integer projectNum=jyProjectMapper.getProByContractId(dto.getContractId());
+        //生成新的项目编号   合同编号+合同下的项目数量+(项目编号)
+        Integer count=0;
+        //判断是否选择了合同
+        if (!dto.getContractStatus().equals("0")){
+            //判断修改前的项目是否有合同
+            if (StringUtils.isNotBlank(project.getContractId())){
+                //判断前端传入的合同名称与已有的名称是否相同,相同则不对编号进行修改,不同则修改
+                if (!dto.getContractId().equals(project.getContractId())){
+                    //判断已有的项目编号中是否包含 "项目-"
+                    if (project.getNo().contains("项目")){
+                        //通过正则表达式将包含(项目- -)找出来
+                        String regex = "\\((.*?)\\)";
+                        Pattern pattern = Pattern.compile(regex);
+                        Matcher matcher = pattern.matcher(project.getNo());
+                        String result="";
+                        if (matcher.find()) {
+                            result = matcher.group(1);
+                        }
+                        //判断当前合同下是否有项目
+                        if (projectNum==0){
+                            projectNo=contractInfo.getNo()+"-0"+(count+1)+"("+result+")";
+                        }else {
+                            if (projectNum<10){
+                                projectNo=contractInfo.getNo()+"-0"+(projectNum+1)+"("+result+")";
+                            }else {
+                                projectNo=contractInfo.getNo()+"-"+(projectNum+1)+"("+result+")";
+                            }
+
+                        }
+                    }else {
+                        if (projectNum==0){
+                            projectNo=contractInfo.getNo()+"-0"+(count+1);
+                        }else {
+                            if (projectNum<10){
+                                projectNo=contractInfo.getNo()+"-0"+(projectNum+1);
+                            }else {
+                                projectNo=contractInfo.getNo()+"-"+(projectNum+1);
+                            }
+
+                        }
+                    }
+                }else {
+                    projectNo=project.getNo();
+                }
             }else {
-                projectNo=contractInfo.getNo()+"-0"+(projectNum+1)+"("+project.getNo()+")";
+                //无合同 -> 有合同
+                if (projectNum==0){
+                    projectNo=contractInfo.getNo()+"-0"+(count+1)+"("+project.getNo()+")";
+                }else {
+                    if (projectNum<10){
+                        projectNo=contractInfo.getNo()+"-0"+(projectNum+1)+"("+project.getNo()+")";
+                    }else {
+                        projectNo=contractInfo.getNo()+"-"+(projectNum+1)+"("+project.getNo()+")";
+                    }
+
+                }
             }
         }else {
             projectNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), JyProjectDTO.BIZ_CODE,currentToken);
         }
+
+
         JyProject jyProject = new JyProject();
         BeanUtils.copyProperties(dto, jyProject);
         List<JyWorkClientLinkman> clientList = dto.getClientList();
@@ -466,7 +518,7 @@ public class JyProjectService {
                 //文件类型处理
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 if (CollectionUtil.isNotEmpty(strings)) {
-                    i.setType(strings.get(1));
+                    i.setType(strings.get(strings.size() - 1));
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());
@@ -506,7 +558,7 @@ public class JyProjectService {
             //文件类型处理
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             if (CollectionUtil.isNotEmpty(strings)) {
-                i.setType(strings.get(1));
+                i.setType(strings.get(strings.size() - 1));
             }
             i.setAttachmentId(id);
             i.setAttachmentName(dto.getName());
@@ -550,7 +602,7 @@ public class JyProjectService {
         memberWrapper.eq(JyProjectMembers::getDelFlag, 0);
         List<JyProjectMembers> members = jyProjectMemberMapper.selectList(memberWrapper);
         if (CollectionUtils.isNotEmpty(members)) {
-            members.stream().forEach(member -> {
+            members.stream().distinct().forEach(member -> {
                 if (StringUtils.isNotBlank(member.getUserId())) {
                     UserDTO byId = SpringUtil.getBean ( IUserApi.class ).getById(member.getUserId());
                     if (ObjectUtil.isNotEmpty(byId)) {
@@ -820,7 +872,7 @@ public class JyProjectService {
     }
 
     /**
-     * 查询项目一级校审中逾期未发起的项目
+     * 查询项目一级校审中未发起的项目
      * @return
      */
     public List<JyProjectAudit> selectAuditInTime() {
@@ -878,17 +930,13 @@ public class JyProjectService {
             data.put("buildPlace","");
         }
         //建设单位
-        if (StringUtils.isNotBlank(projectDTO.getClientName())){
-            data.put("clientName",projectDTO.getClientName());
+        if (StringUtils.isNotBlank(projectDTO.getPrimaryLinkman())){
+            data.put("primaryLinkman",projectDTO.getPrimaryLinkman());
         }else {
-            data.put("clientName","");
+            data.put("primaryLinkman","");
         }
         //审批部门
-        if (StringUtils.isNotBlank(projectDTO.getAuditOffice())){
-            data.put("auditOffice",projectDTO.getAuditOffice());
-        }else {
-            data.put("auditOffice","");
-        }
+        data.put("auditOffice","/");
         //项目负责人
         if(StringUtils.isBlank(projectDTO.getLeader())){
             data.put("projectLeader","");
@@ -1428,7 +1476,7 @@ public class JyProjectService {
             //文件类型处理
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
-                i.setType(strings.get(1));
+                i.setType(strings.get(strings.size() - 1));
             }
             i.setAttachmentId(id);
             i.setAttachmentName(dto.getName());
@@ -1487,7 +1535,7 @@ public class JyProjectService {
                 //文件类型处理
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
-                    i.setType(strings.get(1));
+                    i.setType(strings.get(strings.size() - 1));
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());

+ 5 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/domain/Signet.java

@@ -55,6 +55,11 @@ public class Signet extends BaseEntity {
     private String remarks;
 
     /**
+     * 类型状态(1:报告 2:报批)
+     */
+    private String typeStatus;
+
+    /**
      * 申请人部门
      */
     @TableField(exist = false)

+ 1 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/mapper/SignetMapper.java

@@ -15,7 +15,7 @@ import java.util.Date;
 import java.util.List;
 
 public interface SignetMapper extends BaseMapper<Signet> {
-
+    @InterceptorIgnore(tenantLine = "true")
     IPage<SignetDTO> findPageList(Page<SignetDTO> signetDTOPage,@Param(Constants.WRAPPER) QueryWrapper<SignetDTO> queryWrapper);
 
     @InterceptorIgnore(tenantLine = "true")

+ 2 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/mapper/xml/SignetMapper.xml

@@ -9,6 +9,7 @@
             a.create_time as createDate,
             a.project_id,
             a.project_name,
+            a.type_status,
             a.no,
             (select dv.label from sys_dict_value dv where a.type=dv.id) as type,
             (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.first_type and dt.type='jy_signet_type') as firstType,
@@ -58,6 +59,7 @@
             a.status,
             a.remarks,
             a.proc_ins_id,
+            a.type_status,
             a.process_definition_id,
             so.name as office,
             so.id,

+ 33 - 21
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/SignetService.java

@@ -22,9 +22,12 @@ import com.jeeplus.business.useSeal.domain.Signet;
 import com.jeeplus.business.useSeal.mapper.SignetMapper;
 import com.jeeplus.business.useSeal.service.dto.SignetDTO;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import com.jeeplus.sys.feign.IDictApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.feign.IWorkAttachmentApi;
+import com.jeeplus.sys.service.dto.DictValueDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.DictUtils;
 import com.jeeplus.utils.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -177,6 +180,8 @@ public class SignetService {
         }
         signet.setProjectId(projectId);
         signet.setProjectName(projectName);
+        List<DictValueDTO> projectType = DictUtils.getDictDTOList("jy_signet_project_type");
+
         //保存用印类型
         if (null != dto.getTypes()&&dto.getTypes().size()>0){
             if (dto.getTypes().size()==1){
@@ -184,9 +189,20 @@ public class SignetService {
             }else {
                 signet.setFirstType(dto.getTypes().get(0));
                 signet.setType(dto.getTypes().get(1));
+                //修改类型状态 1:报告  2:报批
+                projectType.stream().forEach(item->{
+                    if (dto.getTypes().get(1).equals(item.getId()) && item.getLabel().equals("报告签发")){
+                        signet.setTypeStatus("1");
+                    }
+                    if (dto.getTypes().get(1).equals(item.getId()) && item.getLabel().equals("报批签发")){
+                        signet.setTypeStatus("2");
+                    }
+                });
+
             }
         }
 
+
         signet.setRemarks(dto.getRemarks());//说明
         signet.setStatus(dto.getStatus());//状态
         signet.setNumber(dto.getNumber()); //份数
@@ -195,16 +211,6 @@ public class SignetService {
         if (CollectionUtils.isNotEmpty(dto.getFiles())) {
             saveFiles(dto.getFiles(), userDTO, id);
         }
-        //修改项目中的报告签发状态
-        if (StringUtils.isNotBlank(projectId)){
-            String[] split = projectId.split(",");
-            for (String s : split) {
-                if (StringUtils.isNotBlank(s)){
-                    jyProjectMapper.updateReportIssuanceById(s,signet.getStatus());
-                }
-
-            }
-        }
 
         return id;
     }
@@ -247,14 +253,16 @@ public class SignetService {
         if (CollectionUtils.isNotEmpty(dto.getFiles())) {
             updateFiles(dto.getFiles(), userDTO, dto.getId());
         }
-        //修改项目中的报告签发状态
-        if (StringUtils.isNotBlank(projectId)){
-            String[] split = projectId.split(",");
+        //修改项目中的报告签发状态或报批签发状态
+        if (StringUtils.isNotBlank(signet.getProjectId())){
+            String[] split = signet.getProjectId().split(",");
             for (String s : split) {
-                if (StringUtils.isNotBlank(s)){
-                    jyProjectMapper.updateReportIssuanceById(s,signet.getStatus());
-                }
-
+                    if (StringUtils.isNotBlank(s) && signet.getTypeStatus().equals("1")){
+                        jyProjectMapper.updateReportIssuanceById(s,signet.getStatus());
+                    }
+                    if (StringUtils.isNotBlank(s) && signet.getTypeStatus().equals("2")){
+                        jyProjectMapper.updateReportsSubmit(s,signet.getStatus());
+                    }
             }
         }
         return dto.getId();
@@ -411,12 +419,16 @@ public class SignetService {
         if (StringUtils.isNotBlank(signetDTO.getProjectId())){
             String[] split = signetDTO.getProjectId().split(",");
             for (String s : split) {
-                if (StringUtils.isNotBlank(s)){
-                    jyProjectMapper.updateReportIssuanceById(s,signetDTO.getStatus());
-                }
-
+                    if (StringUtils.isNotBlank(s) && signetDTO.getTypeStatus().equals("1")){
+                        jyProjectMapper.updateReportIssuanceById(s,signetDTO.getStatus());
+                    }
+                    if (StringUtils.isNotBlank(s) && signetDTO.getTypeStatus().equals("2")){
+                        jyProjectMapper.updateReportsSubmit(s,signetDTO.getStatus());
+                    }
             }
         }
+
+
     }
 
     /**

+ 6 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/dto/SignetDTO.java

@@ -3,6 +3,7 @@ package com.jeeplus.business.useSeal.service.dto;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.business.project.domain.JyProject;
+import com.jeeplus.business.useSeal.domain.Signet;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
 import lombok.Data;
 
@@ -65,6 +66,11 @@ public class SignetDTO  {
     private String remarks;
 
     /**
+     * 类型状态(1:报告 2:报批)
+     */
+    private String typeStatus;
+
+    /**
      * 申请人部门
      */
     @TableField(exist = false)

+ 2 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/xml/JyWorkClientLinkmanMapper.xml

@@ -13,7 +13,7 @@
             email
         from
             jy_work_client_linkman
-        where client_id=#{client} and del_flag=0 LIMIT 1
+        where client_id=#{client} and del_flag=0 order by update_time DESC  LIMIT 1
     </select>
 
     <select id="selectByClientName" resultType="com.jeeplus.business.workClientInfo.domain.JyWorkClientLinkman">
@@ -28,7 +28,7 @@
             email
         from
             jy_work_client_linkman
-        where name=#{clientName} and del_flag=0 LIMIT 1
+        where name=#{clientName} and del_flag=0 order by update_time DESC  LIMIT 1
     </select>
 
 

+ 0 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/controller/JyWorkContractController.java

@@ -41,7 +41,6 @@ public class JyWorkContractController {
         String[] contractDates = jyWorkContractInfo.getContractDates();
         String[] contractAmounts = jyWorkContractInfo.getContractAmounts();
         String[] createDates= jyWorkContractInfo.getCreateDates();
-        String statusList = jyWorkContractInfo.getStatusList();
         String filedType = jyWorkContractInfo.getFiledType();
         String name=jyWorkContractInfo.getName();
         String createById=jyWorkContractInfo.getCreateById();

+ 3 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/domain/JyWorkContractInfo.java

@@ -183,6 +183,9 @@ public class JyWorkContractInfo extends BaseEntity {
     private String createId;
 
     @TableField(exist = false)
+    private String createName;
+
+    @TableField(exist = false)
     private String contractFileId;
 
     @TableField(exist = false)

+ 1 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/mapper/JyWorkContractInfoMapper.java

@@ -19,7 +19,7 @@ import java.util.List;
 
 @Mapper
 public interface JyWorkContractInfoMapper extends BaseMapper<JyWorkContractInfo> {
-
+    @InterceptorIgnore(tenantLine = "true")
     IPage<JyWorkContractInfo> findPageList(Page<JyWorkContractInfo> page, @Param(Constants.WRAPPER)QueryWrapper queryWrapper);
 
     JyWorkContractInfo findById (@Param("id") String id);

+ 3 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/mapper/xml/JyWorkContractInfoMapper.xml

@@ -84,12 +84,14 @@
 			a.filed_type,
 			a.primary_linkman,
 			so.id as department,
-			art.ID_ as taskId
+			art.ID_ as taskId,
+			su.name as createName
 		FROM
 			jy_work_contract_info a
 			left join jy_work_client_info jy_ci on a.primary_linkman=jy_ci.name
 			left join sys_office so on a.department=so.id
 			left join act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
+			left join sys_user su on a.create_by_id = su.id
 		WHERE
 			a.id = #{id}
 			AND a.del_flag = 0

+ 8 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/JyWorkContractService.java

@@ -1,6 +1,7 @@
 package com.jeeplus.business.workContractInfo.service;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -270,6 +271,7 @@ public class JyWorkContractService {
             dto.setContractDate(info.getContractDate()); //签订日期
             dto.setTaskId(info.getTaskId());
             dto.setDepartment(info.getDepartment());
+            dto.setCreateName(info.getCreateName());
             //获取委托人列表
             List<JyContractParticipant> list = new ArrayList<>();
             List<JyContractParticipant> byInfoId = jyContractParticipantMapper.findByInfoId(id);
@@ -501,8 +503,12 @@ public class JyWorkContractService {
 //        info.setNo(serialNum);
         info.setUpdateById(userDTO.getId());
         info.setUpdateTime(new Date());
-        if (userDTO.getOfficeDTO().getName().equals("办公室")){
-            info.setFiledNo(workContractInfoDto.getFiledNo());
+        if (ObjectUtil.isNotEmpty(userDTO.getPostNameList())){
+            userDTO.getPostNameList().stream().forEach(item->{
+                if (item.equals("办公室(嘉溢)")){
+                    info.setFiledNo(workContractInfoDto.getFiledNo());
+                }
+            });
         }
         jyWorkContractInfoMapper.updateContractById(info.getUpdateById(),info.getUpdateTime(),workContractInfoDto.getFiledType(),info.getFiledNo(),workContractInfoDto.getId());
         return workContractInfoDto.getId();

+ 2 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/dto/JyWorkContractInfoDto.java

@@ -169,4 +169,6 @@ public class JyWorkContractInfoDto extends BaseDTO implements Serializable {
 
     private String taskId;
 
+    private String createName;
+
 }

+ 1 - 1
jeeplus-modules/jeeplus-business/src/main/resources/freemarker/firstAudit.ftl

@@ -665,7 +665,7 @@
 									<w:sz w:val="24"/>
 									<w:sz-cs w:val="24"/>
 								</w:rPr>
-								<w:t>${clientName}</w:t>
+								<w:t>${primaryLinkman}</w:t>
 							</w:r>
 						</w:p>
 					</w:tc>

文件差異過大導致無法顯示
+ 0 - 2278
jeeplus-modules/jeeplus-business/src/main/resources/freemarker/secondAudit.ftl


文件差異過大導致無法顯示
+ 0 - 2278
jeeplus-modules/jeeplus-business/src/main/resources/freemarker/thirdAudit.ftl


+ 85 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyExecutionListener.java

@@ -0,0 +1,85 @@
+package com.jeeplus.modules.flowable.listener;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.jeeplus.flowable.model.ActRuTaskInfo;
+import com.jeeplus.flowable.model.Flow;
+import com.jeeplus.flowable.service.FlowTaskService;
+import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import lombok.SneakyThrows;
+import org.flowable.engine.RuntimeService;
+import org.flowable.engine.delegate.DelegateExecution;
+import org.flowable.engine.delegate.ExecutionListener;
+import org.flowable.engine.runtime.ProcessInstance;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+@Component("JyExecutionListener")
+public class JyExecutionListener implements ExecutionListener {
+
+    @SneakyThrows
+    public void notify(DelegateExecution delegateExecution) {
+        String eventName = delegateExecution.getEventName ( );
+        System.out.println("--------- delegateExecution -----------" + delegateExecution);
+
+        if ( "start".equals ( eventName ) ) {
+            System.out.println ( "start=========" );
+        } else if ( "end".equals ( eventName ) ) {
+            //根据这里的 delegateExecution的id去act_ru_task表中查该流程的数据 对应表中的EXECUTION_ID_
+            ActRuTaskInfo task = SpringUtil.getBean(MyNoticeService.class).getTaskInfoByID(delegateExecution.getId());
+
+            if (null != task) {
+                List<Flow> flows = SpringUtil.getBean(FlowTaskService.class).historicTaskList(task.getProcInstId());
+                //根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
+                String substring = task.getProcDefId().substring(0, task.getProcDefId().indexOf(":"));
+                String actName = SpringUtil.getBean(FlowTaskService.class).getActNameByDefId(substring);
+
+                String titleName = "";
+                // 根据流程定义ID查询流程实例
+                ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class).createProcessInstanceQuery()
+                        .processInstanceId(task.getProcInstId())
+                        .singleResult();
+
+                if (processInstance != null) {
+                    // 获取流程实例标题变量名(假设标题存储在名为"title"的变量中)
+                    String titleVariableName = "title";
+
+                    // 查询流程实例的标题变量
+                    Object title = SpringUtil.getBean(RuntimeService.class).getVariable(processInstance.getId(), titleVariableName);
+
+                    if (title != null) {
+                        titleName = title.toString()+"已完成";
+                    } else {
+                        // 如果标题变量不存在或者没有值,可以返回默认标题
+                        titleName = "";
+                    }
+                }
+                Flow flow = new Flow();
+                for (int i=0;i<flows.size();i++){
+                    if (flows.get(i).getComment().getMessage().equals("发起流程")){
+                        flow = flows.get(i);
+                    }
+                }
+
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+                //获取执行人id
+                UserDTO dto = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
+                if(null != dto){
+                    //给发起人发送通知
+                    SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
+                            dto.getName(),format.format(flow.getHistIns().getEndTime()),
+                            dto.getName(),dto.getId(),dto.getId());
+                }
+
+            }
+
+            System.out.println ( "end=========" );
+        } else if ( "take".equals ( eventName ) ) {//连线监听
+            System.out.println ( "take=========" );
+        }
+    }
+}

+ 31 - 11
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyProjectArchiveListener.java

@@ -1,13 +1,16 @@
 package com.jeeplus.modules.flowable.listener;
 
 import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.jeeplus.extension.domain.FlowCopy;
 import com.jeeplus.extension.service.FlowCopyService;
 import com.jeeplus.flowable.model.ActRuTaskInfo;
 import com.jeeplus.flowable.model.Flow;
 import com.jeeplus.flowable.service.FlowTaskService;
 import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IOfficeApi;
 import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.OfficeDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
 import lombok.SneakyThrows;
 import org.flowable.engine.RuntimeService;
@@ -71,17 +74,34 @@ public class JyProjectArchiveListener implements ExecutionListener {
 
                 UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
                 //获取到总经办下的人员信息
-                List<UserDTO> listByOfficeId = SpringUtil.getBean(IUserApi.class).findListByOfficeId("1711993014494048258");
-                //获取角色为“总经办”的角色对应人员信息
-                for (UserDTO dto : listByOfficeId) {
-                    FlowCopy flowCopy = new FlowCopy();
-                    flowCopy.setProcDefId(task.getProcDefId());
-                    flowCopy.setProcInsName(titleName);
-                    flowCopy.setProcInsId(task.getProcInstId());
-                    flowCopy.setUserId(dto.getId());
-                    //将项目信息进行抄送
-                    SpringUtil.getBean(FlowCopyService.class).save(flowCopy);
-                }
+                IPage<UserDTO> page = SpringUtil.getBean(IUserApi.class).findPage();
+                String finalTitleName = titleName;
+                //将项目信息抄送给分管领导
+                page.getRecords().stream().forEach(item->{
+                    String manageOfficeIds = item.getManageOfficeIds();
+                    String[] split = manageOfficeIds.split(",");
+                    //获取分管领导所分管的部门
+                    for (String s : split) {
+                        List<UserDTO> listByOfficeId = SpringUtil.getBean(IUserApi.class).findListByOfficeId(s);
+                        listByOfficeId.stream().forEach(da->{
+                            OfficeDTO office = SpringUtil.getBean(IOfficeApi.class).getOfficeById(da.getName());
+                            //判断分管部门与项目创建人所在的部门是否一致
+                            if (office.getName().equals(userDTO.getOfficeDTO().getName())){
+                                FlowCopy flowCopy = new FlowCopy();
+                                flowCopy.setProcDefId(task.getProcDefId());
+                                flowCopy.setProcInsName(finalTitleName);
+                                flowCopy.setProcInsId(task.getProcInstId());
+                                flowCopy.setUserId(item.getId());
+                                //将项目信息进行抄送
+                                SpringUtil.getBean(FlowCopyService.class).save(flowCopy);
+                            }
+                        });
+
+                    }
+
+
+
+                });
 
 
             }

+ 19 - 11
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyProjectExecutionListener.java

@@ -1,12 +1,15 @@
 package com.jeeplus.modules.flowable.listener;
 
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.jeeplus.extension.domain.FlowCopy;
 import com.jeeplus.extension.service.FlowCopyService;
 import com.jeeplus.flowable.model.ActRuTaskInfo;
 import com.jeeplus.flowable.model.Flow;
 import com.jeeplus.flowable.service.FlowTaskService;
 import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IOfficeApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.OfficeDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
@@ -70,19 +73,24 @@ public class JyProjectExecutionListener implements ExecutionListener {
                 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
                 UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
-                //获取到办公室下的人员信息
-                List<UserDTO> listByOfficeId = SpringUtil.getBean(IUserApi.class).findListByOfficeId("1706589732237684737");
-                //如果是嘉溢发送的项目登记,则会给办公室进行抄送
-                    //获取角色为“办公室”的角色对应人员信息
-                    for (UserDTO dto : listByOfficeId) {
-                        FlowCopy flowCopy = new FlowCopy();
-                        flowCopy.setProcDefId(task.getProcDefId());
+                //获取到岗位为办公室下的人员信息
+                List<UserDTO> allUserInfo = SpringUtil.getBean(IUserApi.class).getAllUserInfo();
+                String finalTitleName = titleName;
+                allUserInfo.stream().forEach(item->{
+                    if (ObjectUtil.isNotEmpty(item.getPostNameList())){
+                        item.getPostNameList().stream().forEach(data->{
+                            if (data.equals("办公室(嘉溢)")){
+                                FlowCopy flowCopy = new FlowCopy();
+                                flowCopy.setProcDefId(task.getProcDefId());
 //                        flowCopy.setProcDefId(task.getProcDefId());
-                        flowCopy.setProcInsName(titleName);
-                        flowCopy.setProcInsId(task.getProcInstId());
-                        flowCopy.setUserId(dto.getId());
-                        SpringUtil.getBean(FlowCopyService.class).save(flowCopy);
+                                flowCopy.setProcInsName(finalTitleName);
+                                flowCopy.setProcInsId(task.getProcInstId());
+                                flowCopy.setUserId(item.getId());
+                                SpringUtil.getBean(FlowCopyService.class).save(flowCopy);
+                            }
+                        });
                     }
+                });
 
 
             }

+ 3 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -758,7 +758,9 @@ public class UserController {
     @ApiLog("获取嘉溢机构JSON数据")
     @GetMapping("treeUserDataJyOffice")
     public ResponseEntity treeUserDataJyOffice(@RequestParam(required = false) String officeName,@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
-        officeName = "嘉溢";
+       //获取当前登陆人所在的公司名称
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        officeName = userDTO.getCompanyDTO().getName();
         List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
         if(list.size()>0){
             List<String> officeIds = Lists.newArrayList();

+ 50 - 36
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/DictTypeService.java

@@ -44,6 +44,8 @@ public class DictTypeService extends ServiceImpl <DictTypeMapper, DictType> {
     private DictTypeWrapper dictTypeWrapper;
     @Autowired
     private DictValueWrapper dictValueWrapper;
+    @Autowired
+    private DictTypeService dictTypeService;
 
     @Transactional(readOnly = true)
     public DictTypeDTO get(String id) {
@@ -99,23 +101,29 @@ public class DictTypeService extends ServiceImpl <DictTypeMapper, DictType> {
     public List<Map<String, Object>> getListData() {
         List<Map<String, Object>> list=new ArrayList<>();
         //首先获取合同类型的大类
-        DictTypeDTO dictTypeDTO = this.get("1706920812493086722");
-        for (DictValueDTO dictValueDTO : dictTypeDTO.getDictValueDTOList()) {
-            Map<String, Object> map=new HashMap<>();
-            map.put("value",dictValueDTO.getValue());
-            map.put("label",dictValueDTO.getLabel());
-            String id = dictValueDTO.getId();
-            List<DictValue> listChild = this.getList(id);
-            List<Map<String, String>> arrChild=new ArrayList<>();
-            for (DictValue dictValue : listChild) {
-                Map<String, String> mapChild=new HashMap<>();
-                mapChild.put("value",dictValue.getId());
-                mapChild.put("label",dictValue.getLabel());
-                arrChild.add(mapChild);
+        List<DictTypeDTO> dict = dictTypeService.getDict();
+        dict.stream().forEach(item->{
+            if (item.getType().equals("jy_contract_type_up")){
+                DictTypeDTO dictTypeDTO = this.get(item.getId());
+                for (DictValueDTO dictValueDTO : dictTypeDTO.getDictValueDTOList()) {
+                    Map<String, Object> map=new HashMap<>();
+                    map.put("value",dictValueDTO.getValue());
+                    map.put("label",dictValueDTO.getLabel());
+                    String id = dictValueDTO.getId();
+                    List<DictValue> listChild = this.getList(id);
+                    List<Map<String, String>> arrChild=new ArrayList<>();
+                    for (DictValue dictValue : listChild) {
+                        Map<String, String> mapChild=new HashMap<>();
+                        mapChild.put("value",dictValue.getId());
+                        mapChild.put("label",dictValue.getLabel());
+                        arrChild.add(mapChild);
+                    }
+                    map.put("children",arrChild);
+                    list.add(map);
+                }
             }
-            map.put("children",arrChild);
-            list.add(map);
-        }
+        });
+
         return list;
     }
 
@@ -126,27 +134,33 @@ public class DictTypeService extends ServiceImpl <DictTypeMapper, DictType> {
     public List<Map<String, Object>> getSealType() {
         List<Map<String, Object>> list=new ArrayList<>();
         //首先获取用印类型的大类
-        DictTypeDTO dictTypeDTO = this.get("1713750553254629378");
-        for (DictValueDTO dictValueDTO : dictTypeDTO.getDictValueDTOList()) {
-            Map<String, Object> map=new HashMap<>();
-            //存入到map集合中
-            map.put("value",dictValueDTO.getValue());
-            map.put("label",dictValueDTO.getLabel());
-            String id = dictValueDTO.getId();
-            //通过id找到子类
-            List<DictValue> listChild = this.getList(id);
-            List<Map<String, String>> arrChild=new ArrayList<>();
-            //遍历子类
-            for (DictValue dictValue : listChild) {
-                //存入到list中
-                Map<String, String> mapChild=new HashMap<>();
-                mapChild.put("value",dictValue.getId());
-                mapChild.put("label",dictValue.getLabel());
-                arrChild.add(mapChild);
+        List<DictTypeDTO> dict = dictTypeService.getDict();
+        dict.stream().forEach(item->{
+            if (item.getType().equals("jy_signet_type")){
+                DictTypeDTO dictTypeDTO = this.get(item.getId());
+                for (DictValueDTO dictValueDTO : dictTypeDTO.getDictValueDTOList()) {
+                    Map<String, Object> map=new HashMap<>();
+                    //存入到map集合中
+                    map.put("value",dictValueDTO.getValue());
+                    map.put("label",dictValueDTO.getLabel());
+                    String id = dictValueDTO.getId();
+                    //通过id找到子类
+                    List<DictValue> listChild = this.getList(id);
+                    List<Map<String, String>> arrChild=new ArrayList<>();
+                    //遍历子类
+                    for (DictValue dictValue : listChild) {
+                        //存入到list中
+                        Map<String, String> mapChild=new HashMap<>();
+                        mapChild.put("value",dictValue.getId());
+                        mapChild.put("label",dictValue.getLabel());
+                        arrChild.add(mapChild);
+                    }
+                    map.put("children",arrChild);
+                    list.add(map);
+                }
             }
-            map.put("children",arrChild);
-            list.add(map);
-        }
+        });
+
         return list;
     }
 }

+ 9 - 3
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

@@ -104,10 +104,12 @@ public class SampleXxlJob {
             //计算天数之差
             int interval1 = Integer.parseInt(this.getInterval(currentDate, newDate));
             //如果当前时间小于项目通过一个月后的时间且距离到期时间在五天之内,则发送通知
+            taskName = "项目【"+ jyAudit.getProjectName()+"】项目校审";
             if(newDate.after(new Date()) && interval1 <= 5 && interval1 >=0){
-                taskName = "嘉溢-项目一级校审";
                 titleStr = "项目【"+ jyAudit.getProjectName()+"】即将逾期,";
                 titleStr = titleStr + "剩余:" + interval1 + "天。请尽快发起!";
+            }else {
+                titleStr = "项目【"+ jyAudit.getProjectName()+"】已逾期";
             }
             Set<String> noticeUserSet = new HashSet<String>();
             if(StringUtils.isNotBlank(jyAudit.getCreateById())){
@@ -224,10 +226,12 @@ public class SampleXxlJob {
             //计算天数之差
             int interval1 = Integer.parseInt(this.getInterval(currentDate, newDate));
             //如果当前时间小于用印修改两个月后的时间且在期限时间三天之内
+            taskName = "嘉溢-项目用印申请";
             if(newDate.after(new Date()) && interval1 <= 3 && interval1 >=0){
-                taskName = "嘉溢-项目用印申请";
                 titleStr = "项目【"+ outInstance.getProjectName().substring(0,outInstance.getProjectName().lastIndexOf(","))+"】即将逾期,";
                 titleStr = titleStr + "剩余:" + interval1 + "天。请尽快发起!";
+            }else {
+                titleStr = "项目【"+ outInstance.getProjectName().substring(0,outInstance.getProjectName().lastIndexOf(","))+"】已逾期";
             }
 
             Set<String> noticeUserSet = new HashSet<String>();
@@ -327,10 +331,12 @@ public class SampleXxlJob {
             //计算天数之差
             int interval1 = Integer.parseInt(this.getInterval(new Date(), newDate));
             //如果当前时间小于首次发起报批签发两个月后的时间且在期限时间七天之内
+            taskName = "嘉溢-报批签发";
             if(newDate.after(new Date()) && interval1 <= 7 && interval1 >=0){
-                taskName = "嘉溢-报批签发";
                 titleStr = "项目【"+ jyProjectReportsSubmitInfo.getProjectName().substring(0,jyProjectReportsSubmitInfo.getProjectName().lastIndexOf(","))+"】还未完成,";
                 titleStr = titleStr + "剩余:" + interval1 + "天。请尽快发起!";
+            }else {
+                titleStr = "项目【"+ jyProjectReportsSubmitInfo.getProjectName().substring(0,jyProjectReportsSubmitInfo.getProjectName().lastIndexOf(","))+"】还未完成";
             }
 
             Set<String> noticeUserSet = new HashSet<String>();