sangwenwei 1 年間 前
コミット
13f6f66ab5
16 ファイル変更908 行追加17 行削除
  1. 11 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/controller/JyProjectController.java
  2. 14 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/domain/JyProject.java
  3. 4 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/JyProjectMapper.java
  4. 87 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/xml/ProjectListMapper.xml
  5. 39 14
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectService.java
  6. 72 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/controller/SignetController.java
  7. 67 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/domain/Signet.java
  8. 29 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/mapper/SignetMapper.java
  9. 76 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/mapper/xml/SignetMapper.xml
  10. 337 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/SignetService.java
  11. 106 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/dto/SignetDTO.java
  12. 16 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/domain/JyWorkClientInfo.java
  13. 8 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/xml/JyWorkClientInfoMapper.xml
  14. 1 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/JeeplusPublicModulesApplication.java
  15. 11 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/DictController.java
  16. 30 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/DictTypeService.java

+ 11 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/controller/JyProjectController.java

@@ -129,6 +129,17 @@ public class JyProjectController {
         return ResponseEntity.ok ( "删除信息成功!" );
     }
 
+    /**
+     * 根据当前登录人获取登记的项目
+     */
+    @ApiOperation(value = "根据当前登录人获取登记的项目")
+    @GetMapping(value = "/getByCreate")
+    public ResponseEntity<IPage<JyProject>> getByCreate(JyProject info, Page<JyProject> page) throws Exception {
+        IPage<JyProject> list = jyProjectService.getByCreate(page, info);
+        return ResponseEntity.ok (list);
+    }
+
+
 
 
 

+ 14 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/domain/JyProject.java

@@ -166,6 +166,20 @@ public class JyProject extends BaseEntity implements Serializable {
     @TableField(exist = false)
     private String contractTypeFirst;
 
+    /**
+     * 联系人
+     */
+    @TableField(exist = false)
+    private String phone;
+    @TableField(exist = false)
+    private String mobile;
+    @TableField(exist = false)
+    private String position;
+    @TableField(exist = false)
+    private String linkId;
+    @TableField(exist = false)
+    private String projectId;
+
 
 
 

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

@@ -36,4 +36,8 @@ public interface JyProjectMapper extends BaseMapper<JyProject> {
     Integer findIsExit(@Param("id") String id, @Param("name")String name);
 
     void updateStatusById(@Param("id") String id, @Param("status")String status);
+
+    IPage<JyProject> getByCreate(@Param("id")String id, Page<JyProject> page, @Param(Constants.WRAPPER)QueryWrapper<JyProject> wrapper);
+
+    JyProject getByName(@Param("s")String s);
 }

+ 87 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/xml/ProjectListMapper.xml

@@ -149,13 +149,19 @@
            wci.contract_type,
            (SELECT dv.label FROM `sys_dict_value` dv
 			LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id
-			where dt.type='jy_contract_type_up' and wci.contract_type_first=dv.value) as contractTypeFirst
+			where dt.type='jy_contract_type_up' and wci.contract_type_first=dv.value) as contractTypeFirst,
+			cl.id as linkId,
+			cl.name as clientName,
+			cl.link_phone as phone,
+			cl.link_mobile as mobile,
+			cl.position as position
         FROM
             jy_project_record a
             LEFT JOIN sys_user b ON a.create_by_id = b.id
             LEFT JOIN sys_user c ON a.project_leader = c.id
             LEFT JOIN jy_work_contract_info wci ON wci.id = a.contract_id and wci.del_flag = '0'
             LEFT JOIN act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
+            left join jy_work_client_linkman cl on a.client=cl.id
         where a.id = #{id}
     </select>
 
@@ -592,5 +598,85 @@
 			AND attachment_name = #{name}
 	</select>
 
+    <select id="getByCreate" resultType="com.jeeplus.business.project.domain.JyProject">
+        SELECT
+           a.id,
+           a.create_by_id as create_by,
+           a.create_time,
+           a.update_by_id,
+           a.update_time,
+           a.del_flag,
+           a.name,
+           a.no,
+           a.contract_id,
+           a.contract_name,
+           a.client,
+           a.client_name,
+           a.status,
+           a.first_instance_status,
+           a.second_instance_status,
+           a.third_instance_status,
+           a.report_issuance,
+           a.out_instance,
+           a.reports_submit,
+           a.review_status,
+           a.contract_status,
+           a.project_place,
+           a.build_place,
+           a.project_overview,
+           a.special,
+           a.contract_project_no,
+           c.name as projectLeader,
+           a.proc_ins_id,
+           a.process_definition_id,
+           b.name AS create_by_id
+        FROM
+            jy_project_record a
+            LEFT JOIN sys_user b ON a.create_by_id = b.id
+            LEFT JOIN sys_user c ON a.project_leader = c.id
+             ${ew.customSqlSegment}
+        and a.create_by_id = #{id}
+    </select>
+    <select id="getByName" resultType="com.jeeplus.business.project.domain.JyProject">
+        SELECT
+           a.id,
+           a.create_by_id as create_by,
+           a.create_time,
+           a.update_by_id,
+           a.update_time,
+           a.del_flag,
+           a.name,
+           a.no,
+           a.contract_id,
+           a.contract_name,
+           a.client,
+           a.client_name,
+           a.status,
+           a.first_instance_status,
+           a.second_instance_status,
+           a.third_instance_status,
+           a.report_issuance,
+           a.out_instance,
+           a.reports_submit,
+           a.review_status,
+           a.contract_status,
+           a.project_place,
+           a.build_place,
+           a.project_overview,
+           a.special,
+           a.contract_project_no,
+           c.name as projectLeader,
+           a.proc_ins_id,
+           a.process_definition_id,
+           b.name AS create_by_id
+        FROM
+            jy_project_record a
+            LEFT JOIN sys_user b ON a.create_by_id = b.id
+            LEFT JOIN sys_user c ON a.project_leader = c.id
+        where a.name = #{s} ORDER BY a.update_time DESC
+    </select>
+
+
+
 
 </mapper>

+ 39 - 14
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectService.java

@@ -259,8 +259,6 @@ public class JyProjectService {
         jyProject.setBuildPlace(dto.getBuildPlace());//建设地点
         jyProjectMapper.insert(jyProject);
         //保存项目组成员
-
-
         List<String> strings = new ArrayList<>();
         strings.add(userDTO.getId());
         strings.add(dto.getProjectLeader());
@@ -347,7 +345,7 @@ public class JyProjectService {
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());
-                i.setAttachmentFlag("workcontract");
+                i.setAttachmentFlag("jyProject");
                 i.setFileSize(dto.getSize());
                 i.setSort(j);
                 Map<String,String> map = new HashMap<>();
@@ -387,7 +385,7 @@ public class JyProjectService {
             }
             i.setAttachmentId(id);
             i.setAttachmentName(dto.getName());
-            i.setAttachmentFlag("workcontract");
+            i.setAttachmentFlag("jyProject");
             i.setFileSize(dto.getSize());
             i.setSort(j);
             Map<String,String> map = new HashMap<>();
@@ -430,15 +428,18 @@ public class JyProjectService {
             jyProjectDTO.setProjectMembers(members);
         }
         //合同类型查询
-        String type="";
-        if (!info.getContractType().contains(",")){
-            jyProjectDTO.setContractType(info.getContractType());
-        }else {
-            String[] split = info.getContractType().split(",");
-            for (String s : split) {
-                DictValue dictValue = dictValueMapper.selectById(s);
-                type=dictValue.getLabel()+",";
-                jyProjectDTO.setContractType(type);
+        if (StringUtils.isNotBlank(info.getContractId())){
+            String type="";
+            if (!info.getContractType().contains(",")){
+                jyProjectDTO.setContractType(info.getContractType());
+            }else {
+                String[] split = info.getContractType().split(",");
+                for (String s : split) {
+                    DictValue dictValue = dictValueMapper.selectById(s);
+                    type=dictValue.getLabel()+",";
+                    String newType=type.substring(0,type.lastIndexOf(","));
+                    jyProjectDTO.setContractType(newType);
+                }
             }
         }
 
@@ -473,5 +474,29 @@ public class JyProjectService {
         return "删除项目成功";
     }
 
-
+    /**
+     * 根据当前登录人获取项目信息
+     * @param page
+     * @param info
+     * @return
+     */
+    public IPage<JyProject> getByCreate(Page<JyProject> page, JyProject info) throws Exception {
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        QueryWrapper<JyProject> wrapper = QueryWrapperGenerator.buildQueryCondition(info, JyProject.class);
+        //创建时间
+        if (info.getCreateDates() != null && info.getCreateDates().length > 0) {
+            wrapper.between("a.create_time", info.getCreateDates()[0], info.getCreateDates()[1]);
+        }
+        //项目编号
+        if (StringUtils.isNotBlank(info.getNo())){
+            wrapper.like("a.no",info.getNo());
+        }
+        //项目名称
+        if (StringUtils.isNotBlank(info.getName())){
+            wrapper.like("a.name",info.getName());
+        }
+        IPage<JyProject> projectIPage=jyProjectMapper.getByCreate(userDTO.getId(),page,wrapper);
+        return projectIPage;
+    }
 }

+ 72 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/controller/SignetController.java

@@ -0,0 +1,72 @@
+package com.jeeplus.business.useSeal.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.project.service.dto.JyProjectDTO;
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.business.useSeal.service.SignetService;
+import com.jeeplus.business.useSeal.service.dto.SignetDTO;
+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(tags ="用印")
+@RequestMapping(value = "/useSeal")
+public class SignetController {
+
+    @Resource
+    private SignetService signetService;
+
+
+    /**
+     * 列表查询
+     */
+    @ApiOperation(value = "用印列表查询")
+    @GetMapping("/findList")
+    public ResponseEntity<IPage<SignetDTO>> findList(Page<SignetDTO> signetDTOPage, SignetDTO dto) throws Exception {
+       IPage<SignetDTO> signetDTOS= signetService.findList(signetDTOPage,dto);
+        return ResponseEntity.ok(signetDTOS);
+    }
+
+
+    /**
+     * 新增/修改
+     */
+    @ApiOperation(value = "新增、修改")
+    @PostMapping("/saveForm")
+    public ResponseEntity save(@RequestBody SignetDTO dto) throws Exception{
+        String id = signetService.save(dto);
+        return ResponseUtil.newInstance().add("businessTable", "jy_user_signet").add("businessId", id).ok ("操作成功");
+    }
+
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id查询")
+    @GetMapping(value = "/findById")
+    public ResponseEntity<SignetDTO> save(@RequestParam String id){
+        SignetDTO dto = signetService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 根据id修改状态status
+     * @param jyProjectDTO
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "/updateStatusById")
+    public void updateStatusById(String id,String status) {
+        signetService.updateStatusById(id,status);
+    }
+
+
+
+
+}

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

@@ -0,0 +1,67 @@
+package com.jeeplus.business.useSeal.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName("jy_user_signet")
+public class Signet extends BaseEntity {
+    //用印编号(字典值)
+    public static final String BIZ_CODE = "37";
+
+    private String procInsId;
+
+    private String processDefinitionId;
+    /**
+     * 审核状态
+     */
+    private String status;
+
+    /**
+     * 用印编号
+     */
+    private String no;
+
+    /**
+     * 用印类型(大类)
+     */
+    private String firstType;
+
+    /**
+     * 用印类型(小类)
+     */
+    private String type;
+
+    /**
+     * 用印份数
+     */
+    private Integer number;
+
+    /**
+     * 关联项目
+     */
+    private String projectId;
+
+    /**
+     * 关联项目名称
+     */
+    private String projectName;
+
+    /*
+    说明
+     */
+    private String remarks;
+
+    /**
+     * 申请人部门
+     */
+    @TableField(exist = false)
+    private String office;
+
+
+
+
+
+}

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

@@ -0,0 +1,29 @@
+package com.jeeplus.business.useSeal.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;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.useSeal.domain.Signet;
+import com.jeeplus.business.useSeal.service.dto.SignetDTO;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface SignetMapper extends BaseMapper<Signet> {
+
+    IPage<SignetDTO> findPageList(Page<SignetDTO> signetDTOPage,@Param(Constants.WRAPPER) QueryWrapper<SignetDTO> queryWrapper);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<WorkAttachmentInfo> findFileList(@Param("id") String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    Integer findIsExit(@Param("id") String id, @Param("name")String name);
+
+    SignetDTO findById(String id);
+
+    void updateStatusById(@Param("id")String id,@Param("status") String status);
+}

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

@@ -0,0 +1,76 @@
+<?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.useSeal.mapper.SignetMapper">
+    <select id="findPageList" resultType="com.jeeplus.business.useSeal.service.dto.SignetDTO">
+        select
+            a.id,
+            a.create_by_id,
+            su.name as createByName,
+            a.create_time as createDate,
+            a.project_id,
+            a.project_name,
+            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,
+            a.number,
+            a.status,
+            a.remarks,
+            so.name as office,
+            so.id,
+            a.proc_ins_id,
+            a.process_definition_id,
+            art.ID_ as task_id
+            from  jy_user_signet a
+            left join sys_user su on a.create_by_id = su.id
+            left join sys_office so on su.office_id=so.id
+            left join act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
+            ${ew.customSqlSegment}
+            ORDER BY a.update_time DESC
+    </select>
+
+    <select id="findFileList" resultType="com.jeeplus.sys.domain.WorkAttachmentInfo">
+		SELECT * FROM work_attachment WHERE del_flag = 0 AND attachment_id = #{id}
+	</select>
+
+    <select id="findIsExit" resultType="java.lang.Integer">
+		SELECT
+			COUNT( 0 )
+		FROM
+			work_attachment
+		WHERE
+			del_flag = 0
+			AND attachment_id = #{id}
+			AND attachment_name = #{name}
+	</select>
+
+    <select id="findById" resultType="com.jeeplus.business.useSeal.service.dto.SignetDTO">
+        select
+            a.id,
+            a.create_by_id,
+            su.name as createByName,
+            a.create_time as createDate,
+            a.project_id,
+            a.project_name,
+            a.no,
+            a.type,
+            a.first_type,
+            a.number,
+            a.status,
+            a.remarks,
+            a.proc_ins_id,
+            a.process_definition_id,
+            so.name as office,
+            so.id,
+            art.ID_ as task_id
+            from  jy_user_signet a
+            left join sys_user su on a.create_by_id = su.id
+            left join sys_office so on su.office_id=so.id
+            left join act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
+            where a.id=#{id}
+    </select>
+
+    <update id="updateStatusById">
+        update jy_user_signet set status=#{status} where id=#{id}
+    </update>
+
+</mapper>

+ 337 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/SignetService.java

@@ -0,0 +1,337 @@
+package com.jeeplus.business.useSeal.service;
+
+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;
+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.project.domain.JyProject;
+import com.jeeplus.business.project.mapper.JyProjectMapper;
+import com.jeeplus.business.project.service.dto.JyProjectDTO;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.pubmodules.oss.domain.WorkAttachment;
+import com.jeeplus.pubmodules.oss.service.dto.WorkAttachmentDto;
+import com.jeeplus.pubmodules.serialNumTpl.service.SerialnumTplService;
+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.IUserApi;
+import com.jeeplus.sys.feign.IWorkAttachmentApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.utils.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+@Service
+@Transactional
+public class SignetService {
+
+    @Resource
+    private SignetMapper signetMapper;
+
+    @Resource
+    private SerialnumTplService serialnumTplService;
+
+    @Resource
+    private JyProjectMapper jyProjectMapper;
+
+
+
+    /**
+     * 列表查询
+     * @param signetDTOPage
+     * @param dto
+     * @return
+     * @throws Exception
+     */
+    public IPage<SignetDTO> findList(Page<SignetDTO> signetDTOPage, SignetDTO dto) throws Exception {
+        QueryWrapper<SignetDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, SignetDTO.class);
+        queryWrapper.eq("a.del_flag",0);
+        //关联项目
+        if (StringUtils.isNotBlank(dto.getProjectName())){
+            queryWrapper.like("a.project_name",dto.getProjectName());
+        }
+        //用印类型
+        if (null != dto.getTypes() && dto.getTypes().size()>0){
+            if (dto.getTypes().size() ==1){
+                queryWrapper.eq("a.first_type",dto.getTypes().get(0));
+            }else {
+                queryWrapper.eq("a.type",dto.getTypes().get(1));
+            }
+        }
+        //申请人
+        if (StringUtils.isNotBlank(dto.getCreateById())){
+            queryWrapper.eq("a.create_by_id", dto.getCreateById());
+        }
+        //创建时间
+        if (dto.getCreateDates() != null && dto.getCreateDates().length > 0) {
+            queryWrapper.between("a.create_time", dto.getCreateDates()[0], dto.getCreateDates()[1]);
+        }
+        //申请人部门
+        if (StringUtils.isNotBlank(dto.getOffice())){
+            queryWrapper.eq("so.id",dto.getOffice());
+        }
+        IPage<SignetDTO> signetList=signetMapper.findPageList(signetDTOPage,queryWrapper);
+        signetList.getRecords().stream().forEach(item->{
+            if (StringUtils.isNotBlank(item.getProjectName())){
+                String project=item.getProjectName().substring(0,item.getProjectName().lastIndexOf(","));
+                item.setProjectName(project);
+            }
+            //用印类型
+            if (StringUtils.isNotBlank(item.getType())){
+                item.setType("项目-"+item.getType());
+            }else {
+                item.setType(item.getFirstType());
+            }
+            //关联项目
+            if (StringUtils.isNotBlank(item.getProjectId())){
+                String[] split = item.getProjectId().split(",");
+                ArrayList<JyProject> jyProjects = new ArrayList<>();
+                for (String s : split) {
+                    JyProject byId = jyProjectMapper.getById(s);
+                    jyProjects.add(byId);
+                }
+                item.setProjectList(jyProjects);
+            }
+        });
+        return signetList;
+
+    }
+
+    public String save(SignetDTO dto) throws Exception{
+        // 获取当前登录人信息
+//        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken (TokenProvider.getCurrentToken ( ));
+        if (StringUtils.isNotEmpty(dto.getId())) {
+            return update(dto, userDTO);
+        } else {
+            return add(dto, userDTO);
+        }
+    }
+
+    public synchronized String add(SignetDTO dto, UserDTO userDTO) throws Exception{
+        // 生成id
+        String id = UUID.randomUUID().toString().replace("-", "");
+        // 生成编号
+        String no = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), dto.BIZ_CODE,TokenProvider.getCurrentToken());
+        // 保存基础信息表信息
+        Signet signet = new Signet();
+        BeanUtils.copyProperties(dto, signet);
+        signet.setId(id);
+        signet.setNo(no);
+        signet.setCreateById(userDTO.getId());
+        signet.setCreateTime(new Date());
+        signet.setUpdateById(userDTO.getId());
+        signet.setUpdateTime(new Date());
+        signet.setDelFlag(0);
+        //保存关联项目信息
+        String projectId="";
+        String projectName="";
+        if (ObjectUtil.isNotEmpty(dto.getProjectList())){
+            for (JyProject jyProject : dto.getProjectList()) {
+                projectId+=jyProject.getProjectId()+",";
+                projectName+=jyProject.getName()+",";
+            }
+        }
+        signet.setProjectId(projectId);
+        signet.setProjectName(projectName);
+        //保存用印类型
+        if (null != dto.getTypes()&&dto.getTypes().size()>0){
+            if (dto.getTypes().size()==1){
+                signet.setFirstType(dto.getTypes().get(0));
+            }else {
+                signet.setFirstType(dto.getTypes().get(0));
+                signet.setType(dto.getTypes().get(1));
+            }
+        }
+
+        signet.setRemarks(dto.getRemarks());//说明
+        signet.setStatus(dto.getStatus());//状态
+        signet.setNumber(dto.getNumber()); //份数
+        signetMapper.insert(signet);
+        // 保存附件列表信息
+        if (CollectionUtils.isNotEmpty(dto.getFiles())) {
+            saveFiles(dto.getFiles(), userDTO, id);
+        }
+        return id;
+    }
+
+    public String update(SignetDTO dto, UserDTO userDTO) {
+        Signet signet = new Signet();
+        BeanUtils.copyProperties(dto, signet);
+        signet.setUpdateTime(new Date());
+        //保存关联项目信息
+        String projectId="";
+        String projectName="";
+        if (ObjectUtil.isNotEmpty(dto.getProjectList())){
+            for (JyProject jyProject : dto.getProjectList()) {
+                projectId=jyProject.getId()+",";
+                projectName=jyProject.getName()+",";
+            }
+        }
+        signet.setProjectId(projectId);
+        signet.setProjectName(projectName);
+        //保存用印类型
+        if (ObjectUtil.isNotEmpty(dto.getTypes())){
+            if (StringUtils.isNotBlank(dto.getTypes().get(1))){
+                signet.setType(dto.getTypes().get(1));
+            }
+            if (StringUtils.isNotBlank(dto.getTypes().get(0))){
+                signet.setFirstType(dto.getTypes().get(0));
+            }
+        }
+        signet.setRemarks(dto.getRemarks());//说明
+        signet.setStatus(dto.getStatus());//状态
+        signet.setNumber(dto.getNumber()); //份数
+        signetMapper.updateById(signet);
+        return dto.getId();
+    }
+
+    /**
+     * 保存附件信息
+     * @param list 待保存的附件列表
+     * @param userDTO 当前登录用户
+     * @param id 关联id
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void saveFiles(List<WorkAttachmentDto> list, UserDTO userDTO, String id) {
+        int j = 1;
+        for (WorkAttachmentDto dto : list) {
+            WorkAttachment i = new WorkAttachment();
+            //包含了url、size、name
+            i.setId(UUID.randomUUID().toString().replace("-", ""));
+//            i.getCreateBy().setId(userDTO.getId());
+            i.setCreateTime(new Date());
+//            i.getUpdateBy().setId(userDTO.getId());
+            i.setUpdateTime(new Date());
+            i.setDelFlag(0);
+            i.setUrl(dto.getUrl());
+            //文件类型处理
+            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.setAttachmentId(id);
+            i.setAttachmentName(dto.getName());
+            i.setAttachmentFlag("jySeal");
+            i.setFileSize(dto.getSize());
+            i.setSort(j);
+            Map<String,String> map = new HashMap<>();
+            String workAttachment = JSON.toJSONString((i));
+            String userDTOInfo = JSON.toJSONString((userDTO));
+            map.put("workAttachment",workAttachment);
+            map.put("userDTO",userDTOInfo);
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).insertWorkAttachment(map);
+//            ossServiceMapper.insertWorkAttachment(i, userDTO);
+            j++;
+        }
+    }
+
+    /**
+     * 修改附件信息
+     * @param list 待修改的附件列表
+     * @param userDTO 当前登录用户
+     * @param id 关联id
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void updateFiles(List<WorkAttachmentDto> list, UserDTO userDTO, String id) {
+        int j = 1;
+        String names = new String();
+        //表中存在,但是传过来不存在,说明已删除,表中数据也要删除
+        for (WorkAttachmentDto dto : list) {
+            names = names + "," +dto.getUrl();
+        }
+        //查询保存的附件信息
+        List<WorkAttachmentInfo> infoList = signetMapper.findFileList(id);
+        if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(infoList)) {
+            for (WorkAttachmentInfo i : infoList) {
+                if (!names.contains(i.getUrl())) {
+//                    ossServiceMapper.deleteById(i.getId());
+                    SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteById(i.getId());
+                }
+            }
+        }
+        //保存信息
+        for (WorkAttachmentDto dto : list) {
+            //判断是否存在
+            Integer isExit = signetMapper.findIsExit(id, dto.getName());
+            if (isExit == 0) {
+                WorkAttachment i = new WorkAttachment();
+                //包含了url、size、name
+                i.setId(UUID.randomUUID().toString().replace("-", ""));
+//                i.getCreateBy().setId(userDTO.getId());
+                i.setCreateTime(new Date());
+//                i.getUpdateBy().setId(userDTO.getId());
+                i.setUpdateTime(new Date());
+                i.setDelFlag(0);
+                i.setUrl(dto.getUrl());
+                //文件类型处理
+                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.setAttachmentId(id);
+                i.setAttachmentName(dto.getName());
+                i.setAttachmentFlag("jySeal");
+                i.setFileSize(dto.getSize());
+                i.setSort(j);
+                Map<String,String> map = new HashMap<>();
+                String workAttachment = JSON.toJSONString((i));
+                String userDTOInfo = JSON.toJSONString((userDTO));
+                map.put("workAttachment",workAttachment);
+                map.put("userDTO",userDTOInfo);
+                SpringUtil.getBean ( IWorkAttachmentApi.class ).insertWorkAttachment(map);
+//                ossServiceMapper.insertWorkAttachment(i, userDTO);
+                j++;
+            }
+        }
+    }
+
+    /**
+     * 根据id查询用印
+     * @param id
+     * @return
+     */
+    public SignetDTO findById(String id) {
+        SignetDTO signetDTO = new SignetDTO();
+        SignetDTO dto = signetMapper.findById(id);
+        BeanUtils.copyProperties(dto, signetDTO);
+        //查询项目信息
+        if (StringUtils.isNotBlank(dto.getProjectId())){
+            String[] split = dto.getProjectId().split(",");
+            ArrayList<JyProject> signetDTOS = new ArrayList<>();
+            for (String s : split) {
+                JyProject jyProject=jyProjectMapper.getById(s);
+                signetDTOS.add(jyProject);
+            }
+            signetDTO.setProjectList(signetDTOS);
+        }
+        List<String> stringList = new ArrayList<>();
+        if (StringUtils.isNotBlank(dto.getType())){
+            stringList.add(dto.getFirstType());
+            stringList.add(dto.getType());
+        }else {
+            stringList.add(dto.getFirstType());
+        }
+        signetDTO.setTypes(stringList);
+        signetDTO.setCreateById(dto.getCreateById());
+        return  signetDTO;
+    }
+
+    /**
+     * 根据id修改状态
+     * @param id
+     * @param status
+     */
+    public void updateStatusById(String id,String status) {
+        signetMapper.updateStatusById(id,status);
+    }
+}

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

@@ -0,0 +1,106 @@
+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.pubmodules.oss.service.dto.WorkAttachmentDto;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class SignetDTO  {
+    //用印编号(字典值)
+    public static final String BIZ_CODE = "37";
+
+    private String procInsId;
+
+    private String processDefinitionId;
+
+    private String taskId;
+    /**
+     * 审核状态
+     */
+    private String status;
+
+    /**
+     * 用印id
+     */
+    private String id;
+
+    /**
+     * 用印编号
+     */
+    private String no;
+
+    /**
+     * 用印类型(大类)
+     */
+    private String firstType;
+
+    /**
+     * 用印类型(小类)
+     */
+    private String type;
+
+    /**
+     * 用印份数
+     */
+    private Integer number;
+
+    /**
+     * 关联项目
+     */
+    private String projectId;
+
+    /**
+     * 关联项目名称
+     */
+    private String projectName;
+
+    /*
+    说明
+     */
+    private String remarks;
+
+    /**
+     * 申请人部门
+     */
+    @TableField(exist = false)
+    private String office;
+
+    /**
+     * 创建人
+     */
+    private String createById;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createDate;
+    private String createByName;
+
+    /**
+     * 修改人
+     */
+    private String updateById;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date updateTime;
+
+
+    /**
+     *创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String[] createDates;
+
+    /**
+     * 附件
+     */
+    private List<WorkAttachmentDto> files;
+
+    private List<JyProject> projectList;
+    /**
+     * 用印类型集合
+     */
+    private List<String> types;
+
+}

+ 16 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/domain/JyWorkClientInfo.java

@@ -174,4 +174,20 @@ public class JyWorkClientInfo extends BaseEntity {
     @TableField(exist = false)
     private List<JyWorkClientBank> backs;
 
+    /**
+     * 联系人
+     */
+    @TableField(exist = false)
+    private String clientName;
+    @TableField(exist = false)
+    private String phone;
+    @TableField(exist = false)
+    private String mobile;
+    @TableField(exist = false)
+    private String position;
+    @TableField(exist = false)
+    private String linkId;
+
+
+
 }

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

@@ -116,15 +116,21 @@
 					c.job_type_id = d.VALUE
 					AND e.id = d.dict_type_id
 					AND e.type = 'representative'
-					AND c.work_client_id = a.id) AS deputy
+					AND c.work_client_id = a.id) AS deputy,
+			cl.id as linkId,
+			cl.name as clientName,
+			cl.link_phone as phone,
+			cl.link_mobile as mobile,
+			cl.position as position
 		FROM
 			jy_work_client_info a
 		LEFT JOIN sys_area b ON a.area_id = b.`code`
 		LEFT JOIN sys_user su ON su.id = a.create_by_id
 		LEFT JOIN work_client_job_type_info f ON a.id = f.work_client_id
+		left join jy_work_client_linkman cl on a.id=cl.client_id
 		${ew.customSqlSegment}
 		ORDER BY
-			a.update_time DESC
+			a.update_time DESC,cl.update_time DESC
 	</select>
 
 	<select id="isExist" resultType="java.lang.Integer">

+ 1 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/JeeplusPublicModulesApplication.java

@@ -3,6 +3,7 @@ package com.jeeplus.pubmodules;
 import com.jeeplus.core.annotation.JeeplusCloudApplication;
 import org.springframework.boot.SpringApplication;
 import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * 公共模块

+ 11 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/DictController.java

@@ -200,4 +200,15 @@ public class DictController {
     }
 
 
+    /**
+     * 获取用印类型
+     */
+    @ApiLog("获取用印类型")
+    @GetMapping("type/getSealType")
+    public ResponseEntity <List<Map<String,Object>>> getSealType() throws Exception {
+        List<Map<String,Object>> dictValues=dictTypeService.getSealType();
+        return ResponseEntity.ok ( dictValues );
+    }
+
+
 }

+ 30 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/DictTypeService.java

@@ -119,4 +119,34 @@ public class DictTypeService extends ServiceImpl <DictTypeMapper, DictType> {
         return list;
     }
 
+    /**
+     * 用印类型级联
+     * @return
+     */
+    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);
+            }
+            map.put("children",arrChild);
+            list.add(map);
+        }
+        return list;
+    }
 }