Browse Source

电签相关

huangjn 3 years ago
parent
commit
0e5f4a9a98
18 changed files with 734 additions and 2 deletions
  1. 55 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/MakeSealDTO.java
  2. 34 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/SignPfxFileDTO.java
  3. 93 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/SignPfxFile.java
  4. 47 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/SignPfxFileVO.java
  5. 27 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/SingPfxManagementVO.java
  6. 8 0
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java
  7. 6 0
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java
  8. 6 2
      blade-service/blade-manager/pom.xml
  9. 170 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/SignPfxFileController.java
  10. 4 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ProjectInfoMapper.java
  11. 20 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ProjectInfoMapper.xml
  12. 41 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.java
  13. 36 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.xml
  14. 3 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IProjectInfoService.java
  15. 48 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/ISignPfxFileService.java
  16. 7 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ProjectInfoServiceImpl.java
  17. 123 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/SignPfxFileServiceImpl.java
  18. 6 0
      blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java

+ 55 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/MakeSealDTO.java

@@ -0,0 +1,55 @@
+package org.springblade.manager.dto;
+
+import lombok.Data;
+
+@Data
+public class MakeSealDTO {
+
+    //image地址
+    private String imageUrl;
+
+    //证书文件地址
+    private String pfxFileUrl;
+
+    //证书文件密码
+    private String pfxPassword;
+
+    //1:个人 2:企业
+    private String customerType = "1";
+
+    // 构造seal码
+    private String sealCode;
+
+    // 构造seal密码
+    private String sealPassword;
+
+    // 构造seal名
+    private String sealName;
+
+    //签章名称
+    private String userName;
+
+    //签章名称  IdType.JUMINSHENFENZHENG.getCode()
+    private String idType;
+
+    //签章名称
+    private String idNo;
+
+    private String operationCode = "gy003";
+
+    @Override
+    public String toString() {
+        return "MakeSealDto{" +
+                "imageUrl='" + imageUrl + '\'' +
+                ", pfxFileUrl='" + pfxFileUrl + '\'' +
+                ", pfxPassword='" + pfxPassword + '\'' +
+                ", customerType='" + customerType + '\'' +
+                ", sealCode='" + sealCode + '\'' +
+                ", sealPassword='" + sealPassword + '\'' +
+                ", sealName='" + sealName + '\'' +
+                ", userName='" + userName + '\'' +
+                ", idType='" + idType + '\'' +
+                ", idNo='" + idNo + '\'' +
+                '}';
+    }
+}

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/SignPfxFileDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.dto;
+
+import org.springblade.manager.entity.SignPfxFile;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 个人/企业证书信息表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-06-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SignPfxFileDTO extends SignPfxFile {
+	private static final long serialVersionUID = 1L;
+
+}

+ 93 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/SignPfxFile.java

@@ -0,0 +1,93 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 个人/企业证书信息表实体类
+ *
+ * @author BladeX
+ * @since 2022-06-24
+ */
+@Data
+@TableName("m_sign_pfx_file")
+@EqualsAndHashCode(callSuper = true)
+public class SignPfxFile extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 证书所有者
+     */
+    @ApiModelProperty("证书所有者")
+    private String certificateUserName;
+    /**
+     * 关联的用户ID
+     */
+    @ApiModelProperty("关联的用户ID")
+    private Long certificateUserId;
+    /**
+     * 证书ID
+     */
+    @ApiModelProperty("证书ID")
+    private Long certificateId;
+    /**
+     * 证书编号
+     */
+    @ApiModelProperty("证书编号")
+    private String certificateNumber;
+    /**
+     * 证书密码
+     */
+    @ApiModelProperty("证书密码")
+    private String certificatePassword;
+    /**
+     * 证书文件路径
+     */
+    @ApiModelProperty("证书文件路径")
+    private String certificateFileUrl;
+    /**
+     * 签名文件路径
+     */
+    @ApiModelProperty("签名文件路径")
+    private String signatureFileUrl;
+    /**
+     * 证书类型,1个人、2企业
+     */
+    @ApiModelProperty("证书类型,1个人、2企业")
+    private Integer certificateType;
+    /**
+     * 是否注册,0未注册、1已注册
+     */
+    @ApiModelProperty("是否注册,0未注册、1已注册")
+    private Integer isRegister;
+
+    @ApiModelProperty("项目ID")
+    private Long projectId;
+
+    @ApiModelProperty("合同段ID")
+    private Long contractId;
+
+}

+ 47 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/SignPfxFileVO.java

@@ -0,0 +1,47 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.manager.entity.SignPfxFile;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 个人/企业证书信息表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-06-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SignPfxFileVO extends SignPfxFile {
+	private static final long serialVersionUID = 1L;
+
+	@ApiModelProperty("当前页")
+	private Integer current;
+
+	@ApiModelProperty("当前页总数")
+	private Integer size;
+
+	@ApiModelProperty("转义后证书类型")
+	private String certificateTypeValue;
+
+	@ApiModelProperty("是否注册,true为已注册")
+	private Boolean isRegisterBoolean;
+
+}

+ 27 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/SingPfxManagementVO.java

@@ -0,0 +1,27 @@
+package org.springblade.manager.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class SingPfxManagementVO {
+
+    @ApiModelProperty("项目ID")
+    private Long projectId;
+
+    @ApiModelProperty("项目名称")
+    private String projectName;
+
+    @ApiModelProperty("项目企业章总数")
+    private String enterpriseCount;
+
+    @ApiModelProperty("项目个人章总数")
+    private String personalCount;
+
+    @ApiModelProperty("当前页")
+    private Integer current;
+
+    @ApiModelProperty("当前页总数")
+    private Integer size;
+
+}

+ 8 - 0
blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java

@@ -19,6 +19,7 @@ package org.springblade.system.feign;
 import org.springblade.core.launch.constant.AppConstant;
 import org.springblade.core.tool.api.R;
 import org.springblade.system.entity.*;
+import org.springblade.system.vo.RoleVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -61,6 +62,13 @@ public interface ISysClient {
 	String PARAM = API_PREFIX + "/param";
 	String PARAM_VALUE = API_PREFIX + "/param-value";
 	String REGION = API_PREFIX + "/region";
+	String SEARCH = API_PREFIX + "/search";
+
+	/**
+	 * 角色信息查询
+	 */
+	@GetMapping(SEARCH)
+	R<List<RoleVO>> search(@RequestParam("roleName")String roleName, @RequestParam("parentId")Long parentId);
 
 	/**
 	 * 获取菜单

+ 6 - 0
blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java

@@ -18,6 +18,7 @@ package org.springblade.system.feign;
 
 import org.springblade.core.tool.api.R;
 import org.springblade.system.entity.*;
+import org.springblade.system.vo.RoleVO;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -30,6 +31,11 @@ import java.util.List;
 @Component
 public class ISysClientFallback implements ISysClient {
 
+	@Override
+	public R<List<RoleVO>> search(String roleName, Long parentId) {
+		return R.fail("获取数据失败");
+	}
+
 	@Override
 	public R<Menu> getMenu(Long id) {
 		return R.fail("获取数据失败");

+ 6 - 2
blade-service/blade-manager/pom.xml

@@ -96,8 +96,12 @@
             <artifactId>pinyin4j</artifactId>
             <version>2.5.1</version>
         </dependency>
-
-
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-system-api</artifactId>
+            <version>2.9.1.RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
 
 
     </dependencies>

+ 170 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/SignPfxFileController.java

@@ -0,0 +1,170 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.controller;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import io.swagger.annotations.*;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.manager.entity.ProjectInfo;
+import org.springblade.manager.service.IProjectInfoService;
+import org.springblade.manager.vo.SingPfxManagementVO;
+import org.springblade.system.feign.ISysClient;
+import org.springblade.system.vo.RoleVO;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.entity.SignPfxFile;
+import org.springblade.manager.vo.SignPfxFileVO;
+import org.springblade.manager.service.ISignPfxFileService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
+
+/**
+ * 个人/企业证书信息表 控制器
+ *
+ * @author BladeX
+ * @since 2022-06-24
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/signPfxFile")
+@Api(value = "个人/企业证书信息表", tags = "个人/企业证书信息表接口")
+public class SignPfxFileController extends BladeController {
+
+	private final ISignPfxFileService signPfxFileService;
+
+	private final IProjectInfoService projectInfoService;
+
+	private final ISysClient sysClient;
+
+	/**
+	 * 获取系统所有角色划分
+	 */
+	@GetMapping("/queryAllRoleList")
+	@ApiOperationSupport(order = 9)
+	@ApiOperation(value = "获取系统所有角色划分")
+	public R<List<RoleVO>> queryAllRoleList(){
+		return this.sysClient.search(null, null);
+	}
+
+	/**
+	 * 获取所有有效项目
+	 */
+	@GetMapping("/queryProjectList")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "获取所有有效项目")
+	public R<List<ProjectInfo>> queryProjectList(){
+		return R.data(this.projectInfoService.list(Wrappers.<ProjectInfo>lambdaQuery().eq(ProjectInfo::getIsDeleted, 0)));
+	}
+
+	/**
+	 * 证书管理分页
+	 */
+	@PostMapping("/singPfxManagementPage")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "证书管理分页")
+	@ApiImplicitParam(name = "vo", value = "必传current、size, 选传projectId")
+	public R<IPage<SingPfxManagementVO>> singPfxManagementPage(SingPfxManagementVO vo){
+		Query query = new Query();
+		query.setSize(vo.getSize());
+		query.setCurrent(vo.getCurrent());
+
+		return R.data(this.signPfxFileService.singPfxManagementPage(Condition.getPage(query), vo));
+	}
+
+	/**
+	 * 详情
+	 */
+	@PostMapping("/getById")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "获取详情数据")
+	@ApiImplicitParam(name = "id", value = "列表数据主键ID", required = true)
+	public R<SignPfxFile> getById(Long id){
+		return R.data(this.signPfxFileService.getById(id));
+	}
+
+	/**
+	 * 注册证书
+	 * @return 结果
+	 */
+	@PostMapping("/goRegister")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "注册(先对接接口,功能未完成)")
+	@ApiImplicitParam(name = "id", value = "列表数据主键ID", required = true)
+	public R<Boolean> goRegister(Long id){
+		return this.signPfxFileService.goRegister(id);
+	}
+
+	/**
+	 * 自定义分页 个人/企业证书信息表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "分页")
+	@ApiImplicitParams({
+			@ApiImplicitParam(name = "current", value = "当前页", required = true),
+			@ApiImplicitParam(name = "size", value = "当前页数量", required = true)
+	})
+	public R<IPage<SignPfxFileVO>> page(SignPfxFileVO vo) {
+		Query query = new Query();
+		query.setSize(vo.getSize());
+		query.setCurrent(vo.getCurrent());
+
+		IPage<SignPfxFileVO> pages = this.signPfxFileService.selectSignPfxFilePage(Condition.getPage(query), vo);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 个人/企业证书信息表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "新增", notes = "传入signPfxFile")
+	public R save(@Valid @RequestBody SignPfxFile signPfxFile) {
+		return R.status(this.signPfxFileService.save(signPfxFile));
+	}
+
+	/**
+	 * 修改 个人/企业证书信息表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "修改", notes = "传入signPfxFile")
+	public R update(@Valid @RequestBody SignPfxFile signPfxFile) {
+		return R.status(this.signPfxFileService.updateById(signPfxFile));
+	}
+	
+	/**
+	 * 删除 个人/企业证书信息表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(this.signPfxFileService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 4 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ProjectInfoMapper.java

@@ -21,6 +21,8 @@ import org.springblade.manager.entity.ProjectInfo;
 import org.springblade.manager.vo.ProjectInfoVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.vo.SingPfxManagementVO;
+
 import java.util.List;
 
 /**
@@ -31,6 +33,8 @@ import java.util.List;
  */
 public interface ProjectInfoMapper extends BaseMapper<ProjectInfo> {
 
+	List<SingPfxManagementVO> singPfxManagementPage(@Param("current") Long current, @Param("size") Integer size, @Param("vo") SingPfxManagementVO vo);
+
 	List<ProjectInfo> selectProjectList(@Param("projectIds") List<String> projectIds);
 
 	/**

+ 20 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ProjectInfoMapper.xml

@@ -33,6 +33,26 @@
         <result column="reference_wbs_template_type" property="referenceWbsTemplateType"/>
     </resultMap>
 
+    <resultMap id="singPfxManagementResultMap" type="org.springblade.manager.vo.SingPfxManagementVO">
+        <result column="id" property="projectId"/>
+        <result column="project_name" property="projectName"/>
+        <result column="personalCount" property="personalCount"/>
+        <result column="project_name" property="projectName"/>
+    </resultMap>
+
+    <select id="singPfxManagementPage" resultMap="singPfxManagementResultMap">
+        select
+            pi.id,
+            pi.project_name,
+            count(select id from m_sign_pfx_file where is_deleted = 0 and project_id = pi.id and certificate_type = 1) AS personalCount,
+            count(select id from m_sign_pfx_file where is_deleted = 0 and project_id = pi.id and certificate_type = 2) AS enterpriseCount
+        from m_project_info AS pi where pi.is_deleted = 0
+        <if test="vo.projectId != null">
+            and pi.id = #{vo.projectId}
+        </if>
+        limit #{current},#{size}
+    </select>
+
     <select id="selectProjectList" resultMap="projectInfoResultMap">
         select id, project_name, project_alias, project_number from m_project_info where is_deleted = 0 and id in
         <foreach collection="projectIds" item="projectId" open="(" separator="," close=")">

+ 41 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.manager.entity.SignPfxFile;
+import org.springblade.manager.vo.SignPfxFileVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 个人/企业证书信息表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-06-24
+ */
+public interface SignPfxFileMapper extends BaseMapper<SignPfxFile> {
+
+	Integer countSignPfxFile(@Param("vo") SignPfxFileVO vo);
+
+	/**
+	 * 自定义分页
+	 */
+	List<SignPfxFile> selectSignPfxFilePage(@Param("current") Long current, @Param("size") Long size, @Param("vo") SignPfxFileVO vo);
+
+}

+ 36 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.xml

@@ -0,0 +1,36 @@
+<?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="org.springblade.manager.mapper.SignPfxFileMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="signPfxFileResultMap" type="org.springblade.manager.entity.SignPfxFile">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="certificate_user_name" property="certificateUserName"/>
+        <result column="certificate_user_id" property="certificateUserId"/>
+        <result column="certificate_id" property="certificateId"/>
+        <result column="certificate_number" property="certificateNumber"/>
+        <result column="certificate_password" property="certificatePassword"/>
+        <result column="certificate_file_url" property="certificateFileUrl"/>
+        <result column="signature_file_url" property="signatureFileUrl"/>
+        <result column="certificate_type" property="certificateType"/>
+        <result column="is_register" property="isRegister"/>
+        <result column="project_id" property="projectId"/>
+        <result column="contract_id" property="contractId"/>
+    </resultMap>
+
+    <select id="countSignPfxFile" resultType="java.lang.Integer">
+        select count(id) from m_sign_pfx_file where is_deleted = 0
+    </select>
+
+    <select id="selectSignPfxFilePage" resultMap="signPfxFileResultMap">
+        select * from m_sign_pfx_file where is_deleted = 0 order by create_time DESC limit #{current},#{size}
+    </select>
+
+</mapper>

+ 3 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IProjectInfoService.java

@@ -22,6 +22,7 @@ import org.springblade.manager.vo.ProjectInfoVO;
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.manager.vo.ProjectInfoVO2;
+import org.springblade.manager.vo.SingPfxManagementVO;
 
 import java.util.List;
 
@@ -33,6 +34,8 @@ import java.util.List;
  */
 public interface IProjectInfoService extends BaseService<ProjectInfo> {
 
+	List<SingPfxManagementVO> singPfxManagementPage(SingPfxManagementVO vo);
+
 	/**
 	 * 客户端首页获取项目列表
 	 * @return 结果集

+ 48 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/ISignPfxFileService.java

@@ -0,0 +1,48 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.manager.entity.SignPfxFile;
+import org.springblade.manager.vo.SignPfxFileVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.vo.SingPfxManagementVO;
+
+import java.util.List;
+
+/**
+ * 个人/企业证书信息表 服务类
+ *
+ * @author BladeX
+ * @since 2022-06-24
+ */
+public interface ISignPfxFileService extends BaseService<SignPfxFile> {
+
+	IPage<SingPfxManagementVO> singPfxManagementPage(IPage<SingPfxManagementVO> page, SingPfxManagementVO vo);
+
+	/**
+	 * 注册
+	 */
+	R<Boolean> goRegister(Long id);
+
+	/**
+	 * 自定义分页
+	 */
+	IPage<SignPfxFileVO> selectSignPfxFilePage(IPage<SignPfxFileVO> page, SignPfxFileVO signPfxFile);
+
+}

+ 7 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ProjectInfoServiceImpl.java

@@ -25,6 +25,7 @@ import org.springblade.manager.vo.ProjectInfoVO;
 import org.springblade.manager.service.IProjectInfoService;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.manager.vo.ProjectInfoVO2;
+import org.springblade.manager.vo.SingPfxManagementVO;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
@@ -47,6 +48,12 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, P
     @Resource
     private WbsTreePrivateMapper wbsTreePrivateMapper;
 
+    @Override
+    public List<SingPfxManagementVO> singPfxManagementPage(SingPfxManagementVO vo) {
+        long current = (vo.getCurrent() - 1L) * vo.getSize();
+        return this.baseMapper.singPfxManagementPage(current, vo.getSize(), vo);
+    }
+
     @Override
     public List<ProjectInfo> selectProjectList(List<String> projectIds) {
         return this.baseMapper.selectProjectList(projectIds);

+ 123 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/SignPfxFileServiceImpl.java

@@ -0,0 +1,123 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.service.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.AllArgsConstructor;
+import org.apache.commons.lang.StringUtils;
+import org.springblade.core.tool.api.R;
+import org.springblade.manager.dto.MakeSealDTO;
+import org.springblade.manager.entity.ProjectInfo;
+import org.springblade.manager.entity.SignPfxFile;
+import org.springblade.manager.service.IProjectInfoService;
+import org.springblade.manager.vo.SignPfxFileVO;
+import org.springblade.manager.mapper.SignPfxFileMapper;
+import org.springblade.manager.service.ISignPfxFileService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.manager.vo.SingPfxManagementVO;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 个人/企业证书信息表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-06-24
+ */
+@Service
+@AllArgsConstructor
+public class SignPfxFileServiceImpl extends BaseServiceImpl<SignPfxFileMapper, SignPfxFile> implements ISignPfxFileService {
+
+	private final IUserClient userClient;
+
+	private final IProjectInfoService projectInfoService;
+
+	@Override
+	public IPage<SingPfxManagementVO> singPfxManagementPage(IPage<SingPfxManagementVO> page, SingPfxManagementVO vo) {
+		//获取项目列表
+		List<SingPfxManagementVO> voResult = this.projectInfoService.singPfxManagementPage(vo);
+		//获取项目列表总数
+		long count = this.projectInfoService.count(Wrappers.<ProjectInfo>lambdaQuery().eq(ProjectInfo::getIsDeleted, 0));
+		page.setTotal(count);
+
+		return page.setRecords(voResult);
+	}
+
+	@Override
+	public R<Boolean> goRegister(Long id) {
+		//获取信息
+		SignPfxFile singPfx = this.getById(id);
+		if(singPfx == null){
+			return R.data(-1, false, "找不到证书");
+		}
+		if(new Integer("1").equals(singPfx.getCertificateType())){
+			//个人证书
+			//获取个人信息
+			User user = this.userClient.userInfoById(singPfx.getCertificateUserId()).getData();
+			if(user == null){
+				return R.data(-1, false, "找不到用户");
+			}
+			if(StringUtils.isEmpty(user.getIdNumber())){
+				return R.data(-1, false, "用户身份证号为空");
+			}
+
+			boolean ust = false;
+			boolean usw = false;
+
+			//判断是否存在个人签名文件
+			if(StringUtils.isNotEmpty(singPfx.getSignatureFileUrl()) && !"null".equals(singPfx.getSignatureFileUrl())){
+				if(!singPfx.getSignatureFileUrl().contains("png")){
+					return R.data(-1, false, "用户签名不是PNG图片");
+				}
+
+				ust = true;
+				//设置信息
+				MakeSealDTO makeSeal = new MakeSealDTO();
+
+
+			}
+
+		}
+
+		return null;
+	}
+
+	@Override
+	public IPage<SignPfxFileVO> selectSignPfxFilePage(IPage<SignPfxFileVO> page, SignPfxFileVO vo) {
+		long current = (page.getCurrent() - 1L) * page.getSize();
+		//汇总
+		Integer count = this.baseMapper.countSignPfxFile(vo);
+		//设置总数
+		page.setTotal(count);
+
+		List<SignPfxFile> signPfxFileList = this.baseMapper.selectSignPfxFilePage(current, page.getSize(), vo);
+		List<SignPfxFileVO> result = JSONArray.parseArray(JSONObject.toJSONString(signPfxFileList), SignPfxFileVO.class);
+		result.forEach(vos -> {
+			vos.setIsRegisterBoolean(new Integer("1").equals(vos.getIsRegister()));
+			vos.setCertificateTypeValue(new Integer("1").equals(vos.getCertificateType()) ? "个人证书" : "企业证书");
+		});
+
+		return page.setRecords(result);
+	}
+
+}

+ 6 - 0
blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java

@@ -21,6 +21,7 @@ import org.springblade.core.tenant.annotation.NonDS;
 import org.springblade.core.tool.api.R;
 import org.springblade.system.entity.*;
 import org.springblade.system.service.*;
+import org.springblade.system.vo.RoleVO;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
@@ -54,6 +55,11 @@ public class SysClient implements ISysClient {
 
 	private final IRegionService regionService;
 
+	@Override
+	public R<List<RoleVO>> search(String roleName, Long parentId) {
+		return R.data(this.roleService.search(roleName, parentId));
+	}
+
 	@Override
 	@GetMapping(MENU)
 	public R<Menu> getMenu(Long id) {