Sfoglia il codice sorgente

提交注册返回认证路径接口

zhangding 4 anni fa
parent
commit
b219db627e
15 ha cambiato i file con 1109 aggiunte e 9 eliminazioni
  1. 16 1
      suishenbang-api/src/test/java/test/MyTest.java
  2. 163 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/CustomersExt.java
  3. 48 2
      suishenbang-system/src/main/java/com/dgtly/system/domain/SysUser.java
  4. 61 0
      suishenbang-system/src/main/java/com/dgtly/system/mapper/CustomersExtMapper.java
  5. 61 0
      suishenbang-system/src/main/java/com/dgtly/system/service/ICustomersExtService.java
  6. 3 0
      suishenbang-system/src/main/java/com/dgtly/system/service/ISysUserService.java
  7. 94 0
      suishenbang-system/src/main/java/com/dgtly/system/service/impl/CustomersExtServiceImpl.java
  8. 6 0
      suishenbang-system/src/main/java/com/dgtly/system/service/impl/SysUserServiceImpl.java
  9. 99 0
      suishenbang-system/src/main/resources/mapper/system/CustomersExtMapper.xml
  10. 11 1
      suishenbang-system/src/main/resources/mapper/system/SysUserMapper.xml
  11. 138 2
      suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxPortalController.java
  12. 43 1
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/ESignService.java
  13. 146 1
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/ESignServiceImpl.java
  14. 6 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/ESign/ESignUrl.java
  15. 214 1
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/pdf/PDFUtil.java

+ 16 - 1
suishenbang-api/src/test/java/test/MyTest.java

@@ -3,6 +3,8 @@ package test;
 
 import com.alibaba.fastjson.JSONObject;
 import com.dgtly.ApiApplication;
+import com.dgtly.system.domain.CustomersExt;
+import com.dgtly.system.domain.SysUser;
 import com.dgtly.wxportal.service.ESignService;
 import com.dgtly.wxportal.utils.ESign.ESignHttpUtil;
 import com.dgtly.wxportal.utils.ESign.ESignUploadUtil;
@@ -30,7 +32,20 @@ public class MyTest {
 
 
         //创建文件
-        String result = eSignService.upload("D:/SZSM/工作交接表.docx");
+       /* SysUser user = new SysUser();
+        user.setUserName("乔小明");
+        user.setLoginName("qiaoxiaoming4");
+        int result = eSignService.createPersonalAccount(user);*/
+
+
+        CustomersExt customersExt = new CustomersExt();
+        customersExt.setChainsCode("qiaoxiaomingqiye");
+        customersExt.setCreator("7303abf8d1e54308a889ee61db2639da");
+        customersExt.setCustomersName("乔小明企业");
+
+        CustomersExt result = eSignService.createThirdParty(customersExt);
+
+
         System.out.println(result);
         System.out.println("111111");
 

+ 163 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/CustomersExt.java

@@ -0,0 +1,163 @@
+package com.dgtly.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.dgtly.common.annotation.Excel;
+import com.dgtly.common.core.domain.BaseEntity;
+
+/**
+ * 经销商扩展对象 customers_ext
+ * 
+ * @author dgtly
+ * @date 2020-10-12
+ */
+public class CustomersExt extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private String chainsCode;
+
+    /** 创建人个人账号id */
+    @Excel(name = "创建人个人账号id")
+    private String creator;
+
+    /** 经销商认证名称 */
+    @Excel(name = "经销商认证名称")
+    private String customersName;
+
+    /** 经销商注册后id */
+    @Excel(name = "经销商注册后id")
+    private String orgId;
+
+    /** 证件类型 */
+    @Excel(name = "证件类型")
+    private String idType;
+
+    /** 证件号 */
+    @Excel(name = "证件号")
+    private String idNumber;
+
+    /** 企业法定代表人证件号 */
+    @Excel(name = "企业法定代表人证件号")
+    private String orgLegalidNumber;
+
+    /** 企业法定代表人名称 */
+    @Excel(name = "企业法定代表人名称")
+    private String orgLegalName;
+
+    /** 是否认证(0:否1:是) */
+    @Excel(name = "是否认证", readConverterExp = "0=:否1:是")
+    private String isAuthentication;
+
+    /** 接收认证的手机号 */
+    @Excel(name = "接收认证的手机号")
+    private String receiveUrlMobileNo;
+
+    public void setChainsCode(String chainsCode) 
+    {
+        this.chainsCode = chainsCode;
+    }
+
+    public String getChainsCode() 
+    {
+        return chainsCode;
+    }
+    public void setCreator(String creator) 
+    {
+        this.creator = creator;
+    }
+
+    public String getCreator() 
+    {
+        return creator;
+    }
+    public void setCustomersName(String customersName) 
+    {
+        this.customersName = customersName;
+    }
+
+    public String getCustomersName() 
+    {
+        return customersName;
+    }
+    public void setOrgId(String orgId) 
+    {
+        this.orgId = orgId;
+    }
+
+    public String getOrgId() 
+    {
+        return orgId;
+    }
+    public void setIdType(String idType) 
+    {
+        this.idType = idType;
+    }
+
+    public String getIdType() 
+    {
+        return idType;
+    }
+    public void setIdNumber(String idNumber) 
+    {
+        this.idNumber = idNumber;
+    }
+
+    public String getIdNumber() 
+    {
+        return idNumber;
+    }
+    public void setOrgLegalidNumber(String orgLegalidNumber) 
+    {
+        this.orgLegalidNumber = orgLegalidNumber;
+    }
+
+    public String getOrgLegalidNumber() 
+    {
+        return orgLegalidNumber;
+    }
+    public void setOrgLegalName(String orgLegalName) 
+    {
+        this.orgLegalName = orgLegalName;
+    }
+
+    public String getOrgLegalName() 
+    {
+        return orgLegalName;
+    }
+    public void setIsAuthentication(String isAuthentication) 
+    {
+        this.isAuthentication = isAuthentication;
+    }
+
+    public String getIsAuthentication() 
+    {
+        return isAuthentication;
+    }
+    public void setReceiveUrlMobileNo(String receiveUrlMobileNo) 
+    {
+        this.receiveUrlMobileNo = receiveUrlMobileNo;
+    }
+
+    public String getReceiveUrlMobileNo() 
+    {
+        return receiveUrlMobileNo;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("chainsCode", getChainsCode())
+            .append("creator", getCreator())
+            .append("customersName", getCustomersName())
+            .append("orgId", getOrgId())
+            .append("idType", getIdType())
+            .append("idNumber", getIdNumber())
+            .append("orgLegalidNumber", getOrgLegalidNumber())
+            .append("orgLegalName", getOrgLegalName())
+            .append("isAuthentication", getIsAuthentication())
+            .append("receiveUrlMobileNo", getReceiveUrlMobileNo())
+            .toString();
+    }
+}

+ 48 - 2
suishenbang-system/src/main/java/com/dgtly/system/domain/SysUser.java

@@ -98,8 +98,16 @@ public class SysUser extends BaseEntity
 
     /** 岗位组 */
     private Long[] postIds;
-
-
+    /** 证件类型 */
+    private String idType;
+    /** 证件号 */
+    private String idNumber;
+    /** 注册后id */
+    private String accountId;
+    /** 是否认证 */
+    private String isAuthentication;
+    /** 接受认证的手机号 */
+    private String receiveUrlMobileNo;
     /** 用户销售信息扩展 */
     private SysUserExt  sysUserExt;
 
@@ -408,7 +416,45 @@ public class SysUser extends BaseEntity
         this.sysUserExt = sysUserExt;
     }
 
+    public String getIdType() {
+        return idType;
+    }
+
+    public void setIdType(String idType) {
+        this.idType = idType;
+    }
+
+    public String getIdNumber() {
+        return idNumber;
+    }
+
+    public void setIdNumber(String idNumber) {
+        this.idNumber = idNumber;
+    }
+
+    public String getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(String accountId) {
+        this.accountId = accountId;
+    }
+
+    public String getIsAuthentication() {
+        return isAuthentication;
+    }
 
+    public void setIsAuthentication(String isAuthentication) {
+        this.isAuthentication = isAuthentication;
+    }
+
+    public String getReceiveUrlMobileNo() {
+        return receiveUrlMobileNo;
+    }
+
+    public void setReceiveUrlMobileNo(String receiveUrlMobileNo) {
+        this.receiveUrlMobileNo = receiveUrlMobileNo;
+    }
 
     @Override
     public String toString() {

+ 61 - 0
suishenbang-system/src/main/java/com/dgtly/system/mapper/CustomersExtMapper.java

@@ -0,0 +1,61 @@
+package com.dgtly.system.mapper;
+
+import com.dgtly.system.domain.CustomersExt;
+import java.util.List;
+
+/**
+ * 经销商扩展Mapper接口
+ * 
+ * @author dgtly
+ * @date 2020-10-12
+ */
+public interface CustomersExtMapper 
+{
+    /**
+     * 查询经销商扩展
+     * 
+     * @param chainsCode 经销商扩展ID
+     * @return 经销商扩展
+     */
+    public CustomersExt selectCustomersExtById(String chainsCode);
+
+    /**
+     * 查询经销商扩展列表
+     * 
+     * @param customersExt 经销商扩展
+     * @return 经销商扩展集合
+     */
+    public List<CustomersExt> selectCustomersExtList(CustomersExt customersExt);
+
+    /**
+     * 新增经销商扩展
+     * 
+     * @param customersExt 经销商扩展
+     * @return 结果
+     */
+    public int insertCustomersExt(CustomersExt customersExt);
+
+    /**
+     * 修改经销商扩展
+     * 
+     * @param customersExt 经销商扩展
+     * @return 结果
+     */
+    public int updateCustomersExt(CustomersExt customersExt);
+
+    /**
+     * 删除经销商扩展
+     * 
+     * @param chainsCode 经销商扩展ID
+     * @return 结果
+     */
+    public int deleteCustomersExtById(String chainsCode);
+
+    /**
+     * 批量删除经销商扩展
+     * 
+     * @param chainsCodes 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomersExtByIds(String[] chainsCodes);
+}

+ 61 - 0
suishenbang-system/src/main/java/com/dgtly/system/service/ICustomersExtService.java

@@ -0,0 +1,61 @@
+package com.dgtly.system.service;
+
+import com.dgtly.system.domain.CustomersExt;
+import java.util.List;
+
+/**
+ * 经销商扩展Service接口
+ * 
+ * @author dgtly
+ * @date 2020-10-12
+ */
+public interface ICustomersExtService 
+{
+    /**
+     * 查询经销商扩展
+     * 
+     * @param chainsCode 经销商扩展ID
+     * @return 经销商扩展
+     */
+    public CustomersExt selectCustomersExtById(String chainsCode);
+
+    /**
+     * 查询经销商扩展列表
+     * 
+     * @param customersExt 经销商扩展
+     * @return 经销商扩展集合
+     */
+    public List<CustomersExt> selectCustomersExtList(CustomersExt customersExt);
+
+    /**
+     * 新增经销商扩展
+     * 
+     * @param customersExt 经销商扩展
+     * @return 结果
+     */
+    public int insertCustomersExt(CustomersExt customersExt);
+
+    /**
+     * 修改经销商扩展
+     * 
+     * @param customersExt 经销商扩展
+     * @return 结果
+     */
+    public int updateCustomersExt(CustomersExt customersExt);
+
+    /**
+     * 批量删除经销商扩展
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomersExtByIds(String ids);
+
+    /**
+     * 删除经销商扩展信息
+     * 
+     * @param chainsCode 经销商扩展ID
+     * @return 结果
+     */
+    public int deleteCustomersExtById(String chainsCode);
+}

+ 3 - 0
suishenbang-system/src/main/java/com/dgtly/system/service/ISysUserService.java

@@ -5,6 +5,7 @@ import java.util.Map;
 import java.util.Set;
 
 import com.dgtly.common.exception.BusinessException;
+import com.dgtly.common.json.JSONObject;
 import com.dgtly.system.domain.SysUser;
 
 /**
@@ -233,4 +234,6 @@ public interface ISysUserService
      * @return 结果
      */
     Map<String,Map<String,Object>> selectLoginNamesByCostumerCode(Set<String> customerCodes);
+
+    public int insertPersonalAccount(SysUser user);
 }

+ 94 - 0
suishenbang-system/src/main/java/com/dgtly/system/service/impl/CustomersExtServiceImpl.java

@@ -0,0 +1,94 @@
+package com.dgtly.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.dgtly.system.mapper.CustomersExtMapper;
+import com.dgtly.system.domain.CustomersExt;
+import com.dgtly.system.service.ICustomersExtService;
+import com.dgtly.common.core.text.Convert;
+
+/**
+ * 经销商扩展Service业务层处理
+ * 
+ * @author dgtly
+ * @date 2020-10-12
+ */
+@Service
+public class CustomersExtServiceImpl implements ICustomersExtService 
+{
+    @Autowired
+    private CustomersExtMapper customersExtMapper;
+
+    /**
+     * 查询经销商扩展
+     * 
+     * @param chainsCode 经销商扩展ID
+     * @return 经销商扩展
+     */
+    @Override
+    public CustomersExt selectCustomersExtById(String chainsCode)
+    {
+        return customersExtMapper.selectCustomersExtById(chainsCode);
+    }
+
+    /**
+     * 查询经销商扩展列表
+     * 
+     * @param customersExt 经销商扩展
+     * @return 经销商扩展
+     */
+    @Override
+    public List<CustomersExt> selectCustomersExtList(CustomersExt customersExt)
+    {
+        return customersExtMapper.selectCustomersExtList(customersExt);
+    }
+
+    /**
+     * 新增经销商扩展
+     * 
+     * @param customersExt 经销商扩展
+     * @return 结果
+     */
+    @Override
+    public int insertCustomersExt(CustomersExt customersExt)
+    {
+        return customersExtMapper.insertCustomersExt(customersExt);
+    }
+
+    /**
+     * 修改经销商扩展
+     * 
+     * @param customersExt 经销商扩展
+     * @return 结果
+     */
+    @Override
+    public int updateCustomersExt(CustomersExt customersExt)
+    {
+        return customersExtMapper.updateCustomersExt(customersExt);
+    }
+
+    /**
+     * 删除经销商扩展对象
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomersExtByIds(String ids)
+    {
+        return customersExtMapper.deleteCustomersExtByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除经销商扩展信息
+     * 
+     * @param chainsCode 经销商扩展ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomersExtById(String chainsCode)
+    {
+        return customersExtMapper.deleteCustomersExtById(chainsCode);
+    }
+}

+ 6 - 0
suishenbang-system/src/main/java/com/dgtly/system/service/impl/SysUserServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import com.dgtly.common.json.JSONObject;
 import com.dgtly.system.domain.*;
 import com.dgtly.system.mapper.*;
 import org.slf4j.Logger;
@@ -595,4 +596,9 @@ public class SysUserServiceImpl implements ISysUserService
         return userMapper.selectLoginNamesByCostumerCode(a);
     }
 
+    @Override
+    public int insertPersonalAccount(SysUser user) {
+        return userMapper.updateUser(user);
+    }
+
 }

+ 99 - 0
suishenbang-system/src/main/resources/mapper/system/CustomersExtMapper.xml

@@ -0,0 +1,99 @@
+<?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.dgtly.system.mapper.CustomersExtMapper">
+    
+    <resultMap type="CustomersExt" id="CustomersExtResult">
+        <result property="chainsCode"    column="chains_code"    />
+        <result property="creator"    column="creator"    />
+        <result property="customersName"    column="customers_name"    />
+        <result property="orgId"    column="org_id"    />
+        <result property="idType"    column="id_type"    />
+        <result property="idNumber"    column="id_number"    />
+        <result property="orgLegalidNumber"    column="org_legalId_number"    />
+        <result property="orgLegalName"    column="org_legal_name"    />
+        <result property="isAuthentication"    column="is_authentication"    />
+        <result property="receiveUrlMobileNo"    column="receive_url_mobile_no"    />
+    </resultMap>
+
+    <sql id="selectCustomersExtVo">
+        select chains_code, creator, customers_name, org_id, id_type, id_number, org_legalId_number, org_legal_name, is_authentication, receive_url_mobile_no from customers_ext
+    </sql>
+
+    <select id="selectCustomersExtList" parameterType="CustomersExt" resultMap="CustomersExtResult">
+        <include refid="selectCustomersExtVo"/>
+        <where>  
+            <if test="creator != null  and creator != ''"> and creator = #{creator}</if>
+            <if test="customersName != null  and customersName != ''"> and customers_name like concat('%', #{customersName}, '%')</if>
+            <if test="orgId != null  and orgId != ''"> and org_id = #{orgId}</if>
+            <if test="idType != null  and idType != ''"> and id_type = #{idType}</if>
+            <if test="idNumber != null  and idNumber != ''"> and id_number = #{idNumber}</if>
+            <if test="orgLegalidNumber != null  and orgLegalidNumber != ''"> and org_legalId_number = #{orgLegalidNumber}</if>
+            <if test="orgLegalName != null  and orgLegalName != ''"> and org_legal_name like concat('%', #{orgLegalName}, '%')</if>
+            <if test="isAuthentication != null  and isAuthentication != ''"> and is_authentication = #{isAuthentication}</if>
+            <if test="receiveUrlMobileNo != null  and receiveUrlMobileNo != ''"> and receive_url_mobile_no = #{receiveUrlMobileNo}</if>
+        </where>
+    </select>
+    
+    <select id="selectCustomersExtById" parameterType="String" resultMap="CustomersExtResult">
+        <include refid="selectCustomersExtVo"/>
+        where chains_code = #{chainsCode}
+    </select>
+        
+    <insert id="insertCustomersExt" parameterType="CustomersExt">
+        insert into customers_ext
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="chainsCode != null  and chainsCode != ''">chains_code,</if>
+            <if test="creator != null  and creator != ''">creator,</if>
+            <if test="customersName != null  and customersName != ''">customers_name,</if>
+            <if test="orgId != null  and orgId != ''">org_id,</if>
+            <if test="idType != null  and idType != ''">id_type,</if>
+            <if test="idNumber != null  and idNumber != ''">id_number,</if>
+            <if test="orgLegalidNumber != null  and orgLegalidNumber != ''">org_legalId_number,</if>
+            <if test="orgLegalName != null  and orgLegalName != ''">org_legal_name,</if>
+            <if test="isAuthentication != null  and isAuthentication != ''">is_authentication,</if>
+            <if test="receiveUrlMobileNo != null  and receiveUrlMobileNo != ''">receive_url_mobile_no,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="chainsCode != null  and chainsCode != ''">#{chainsCode},</if>
+            <if test="creator != null  and creator != ''">#{creator},</if>
+            <if test="customersName != null  and customersName != ''">#{customersName},</if>
+            <if test="orgId != null  and orgId != ''">#{orgId},</if>
+            <if test="idType != null  and idType != ''">#{idType},</if>
+            <if test="idNumber != null  and idNumber != ''">#{idNumber},</if>
+            <if test="orgLegalidNumber != null  and orgLegalidNumber != ''">#{orgLegalidNumber},</if>
+            <if test="orgLegalName != null  and orgLegalName != ''">#{orgLegalName},</if>
+            <if test="isAuthentication != null  and isAuthentication != ''">#{isAuthentication},</if>
+            <if test="receiveUrlMobileNo != null  and receiveUrlMobileNo != ''">#{receiveUrlMobileNo},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCustomersExt" parameterType="CustomersExt">
+        update customers_ext
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="creator != null  and creator != ''">creator = #{creator},</if>
+            <if test="customersName != null  and customersName != ''">customers_name = #{customersName},</if>
+            <if test="orgId != null  and orgId != ''">org_id = #{orgId},</if>
+            <if test="idType != null  and idType != ''">id_type = #{idType},</if>
+            <if test="idNumber != null  and idNumber != ''">id_number = #{idNumber},</if>
+            <if test="orgLegalidNumber != null  and orgLegalidNumber != ''">org_legalId_number = #{orgLegalidNumber},</if>
+            <if test="orgLegalName != null  and orgLegalName != ''">org_legal_name = #{orgLegalName},</if>
+            <if test="isAuthentication != null  and isAuthentication != ''">is_authentication = #{isAuthentication},</if>
+            <if test="receiveUrlMobileNo != null  and receiveUrlMobileNo != ''">receive_url_mobile_no = #{receiveUrlMobileNo},</if>
+        </trim>
+        where chains_code = #{chainsCode}
+    </update>
+
+    <delete id="deleteCustomersExtById" parameterType="String">
+        delete from customers_ext where chains_code = #{chainsCode}
+    </delete>
+
+    <delete id="deleteCustomersExtByIds" parameterType="String">
+        delete from customers_ext where chains_code in 
+        <foreach item="chainsCode" collection="array" open="(" separator="," close=")">
+            #{chainsCode}
+        </foreach>
+    </delete>
+    
+</mapper>

+ 11 - 1
suishenbang-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -16,6 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="avatar"       column="avatar"       />
 		<result property="password"     column="password"     />
 		<result property="salt"         column="salt"         />
+		<result property="idType"         column="id_type"         />
+		<result property="idNumber"         column="id_number"         />
+		<result property="accountId"         column="account_id"         />
+		<result property="isAuthentication"         column="is_authentication"         />
+		<result property="receiveUrlMobileNo"         column="receive_url_mobile_no"         />
 		<result property="status"       column="status"       />
 		<result property="delFlag"      column="del_flag"     />
 		<result property="loginIp"      column="login_ip"     />
@@ -73,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 	
 	<sql id="selectUserVo">
-        select  u.user_id,u.company_id, u.dept_id, u.login_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status,
+        select  u.user_id,u.company_id, u.dept_id, u.login_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt,u.id_type,u.id_number,u.account_id,u.is_authentication,u.receive_url_mobile_no, u.status,
         		u.del_flag, u.login_ip, u.login_date, u.create_time, u.remark,
         		c.company_name,
        		    d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,
@@ -233,6 +238,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
  			<if test="password != null and password != ''">password = #{password},</if>
  			<if test="salt != null and salt != ''">salt = #{salt},</if>
+ 			<if test="idType != null and idType != ''">id_type = #{idType},</if>
+ 			<if test="idNumber != null and idNumber != ''">id_number = #{idNumber},</if>
+ 			<if test="accountId != null and accountId != ''">account_id = #{accountId},</if>
+ 			<if test="isAuthentication != null and isAuthentication != ''">is_authentication = #{isAuthentication},</if>
+ 			<if test="receiveUrlMobileNo != null and receiveUrlMobileNo != ''">receive_url_mobile_no = #{receiveUrlMobileNo},</if>
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
  			<if test="loginDate != null">login_date = #{loginDate},</if>

+ 138 - 2
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxPortalController.java

@@ -6,10 +6,13 @@ import com.dgtly.common.annotation.ApiPassToken;
 import com.dgtly.common.core.controller.ApiBaseController;
 import com.dgtly.common.core.domain.AjaxResult;
 import com.dgtly.common.core.domain.ParameterObject;
+import com.dgtly.system.domain.CustomersExt;
+import com.dgtly.system.domain.SysUser;
+import com.dgtly.system.service.ICustomersExtService;
+import com.dgtly.system.service.ISysUserService;
 import com.dgtly.wxportal.domain.WxBanner;
 import com.dgtly.wxportal.domain.WxMagnet;
-import com.dgtly.wxportal.service.IWxBannerService;
-import com.dgtly.wxportal.service.IWxMagnetService;
+import com.dgtly.wxportal.service.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -17,8 +20,10 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
 import java.util.List;
 
 @Api(tags = "微信门户相关接口")
@@ -32,6 +37,16 @@ public class WxPortalController extends ApiBaseController {
 
     @Autowired
     private IWxBannerService wxBannerService;
+    @Autowired
+    private ESignService eSignService;
+    @Autowired
+    private ISysUserService userService;
+    @Autowired
+    private ICustomersExtService customersExtService;
+    @Autowired
+    private IEsignPersonRealnVerifyService personRealnVerifyService;
+    @Autowired
+    private IEsignOrganRealVerifyService organRealVerifyService;
 
     @ApiOperation(value = "微信门户首页",notes = "参数:{userId:1}")
     @ApiImplicitParams({
@@ -46,5 +61,126 @@ public class WxPortalController extends ApiBaseController {
         List<WxBanner> wxBannerList = wxBannerService.selectWxBannerList(wxBanner);
         return AjaxResult.success().putKV("magnets",wxMagnetList).putKV("banners",wxBannerList);
     }
+    /**
+     * @descption: 个人注册
+     * @param:
+     * @return:
+     * @auther: ZhangDing
+     * @date: 2020-10-12 14:04
+     */
+
+    @ApiOperation(value = "绑定微信用户和系统用户",
+            notes = "参数:{" +
+                    "username:'admin',loginName:'admin'}" +
+                    "错误:" +
+                    "301  用户已经注册且认证" +
+                    "500 注册失败" +
+                    "")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params" , paramType = "body")
+    })
+    @ApiPassToken
+    @PostMapping("/createPersonalAccount")
+    public Object createPersonalAccount(){
+        ParameterObject obj =  getParameterObject();
+        //判断参数
+        obj.checkParameterNotNull("loginName");
+        String loginName = obj.getString("loginName");
+//        SysUser user = obj.parseBean(SysUser.class);
+        //根据用户loginName查询用户信息
+        SysUser user = userService.selectUserByLoginName(loginName);
+        //判断是否注册
+        if (user.getAccountId()!=null&&user.getAccountId()!=""){//已经注册
+            //判断是否认证
+            if ("1".equals(user.getIsAuthentication())){//已经认证
+                return AjaxResult.error(301,"用户已经注册且认证");
+            }else {//没有认证
+                //获取认证路径
+                String url = personRealnVerifyService.personRealnVerify(user.getAccountId());
+                return AjaxResult.success("url",url);
+            }
+        }else {//没有注册
+            //去注册
+            SysUser euser = eSignService.createPersonalAccount(user);
+            if (euser!=null) {
+                //注册完以后获取认证路径
+                String url = personRealnVerifyService.personRealnVerify(euser.getAccountId());
+                return AjaxResult.success("url", url);
+            }else {
+                return AjaxResult.error(500,"注册失败");
+            }
+        }
+    }
+
+    /**
+     * @descption: 公司注册
+     * @param:
+     * @return:
+     * @auther: ZhangDing
+     * @date: 2020-10-12 15:26
+     */
+    @ResponseBody
+    @RequestMapping("/createThirdParty")
+    public Object createThirdParty(){
+        ParameterObject obj =  getParameterObject();
+        obj.checkParameterNotNull("chainsCode,creator,customersName");
+        String chainsCode = obj.getString("chainsCode");
+//        CustomersExt customersExt = obj.parseBean(CustomersExt.class);
+        CustomersExt customersExt = customersExtService.selectCustomersExtById(chainsCode);
+        //判断是否注册
+        if (customersExt.getOrgId()!=null&&customersExt.getOrgId()!=""){//已经注册
+            //判断是否认证
+            if ("1".equals(customersExt.getIsAuthentication())){//已认证
+                return AjaxResult.error(301,"经销商已经注册且认证");
+            }else {//未认证
+                //获取认证路径
+                String url = organRealVerifyService.organRealVerify(customersExt.getOrgId(),customersExt.getCreator());
+                return AjaxResult.success("url",url);
+            }
+        }else {//未注册
+            //去注册
+            CustomersExt ecustomersExt = eSignService.createThirdParty(customersExt);
+            if (ecustomersExt!=null) {
+                //注册完以后获取认证路径
+                String url = organRealVerifyService.organRealVerify(ecustomersExt.getOrgId(),ecustomersExt.getCreator());
+                return AjaxResult.success("url", url);
+            }else {
+                return AjaxResult.error(500,"注册失败");
+            }
+        }
+    }
+
+    /**
+     * @descption: e签宝修改个人信息
+     * @param:
+     * @return:
+     * @auther: ZhangDing
+     * @date: 2020-10-13 13:31
+     */
+    @ResponseBody
+    @RequestMapping("/updatePersonalAccount")
+    public Object updatePersonalAccount(){
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("accountId");
+        SysUser user = obj.parseBean(SysUser.class);
+        return toAjax(eSignService.updatePersonalAccount(user));
+    }
+
+    /**
+     * @descption: e签宝修改公司信息
+     * @param:
+     * @return:
+     * @auther: ZhangDing
+     * @date: 2020-10-13 14:32
+     */
+    @ResponseBody
+    @RequestMapping("/updateThirdParty")
+    public Object updateThirdParty(){
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("orgId");
+        CustomersExt customersExt = obj.parseBean(CustomersExt.class);
+        return toAjax(eSignService.updateThirdParty(customersExt));
+    }
+
 
 }

+ 43 - 1
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/ESignService.java

@@ -1,5 +1,9 @@
 package com.dgtly.wxportal.service;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.dgtly.system.domain.CustomersExt;
+import com.dgtly.system.domain.SysUser;
 import org.springframework.stereotype.Service;
 
 /**
@@ -19,8 +23,46 @@ public interface ESignService {
      * @auther: ZhangDing
      * @date: 2020-10-10 11:31
      */
-    public String upload(String orderId);
+     String upload(String orderId);
 
 
+     String verificationUser();
+
+     /**
+      * @descption: 个人注册,存储信息
+      * @param:
+      * @return:
+      * @auther: ZhangDing
+      * @date: 2020-10-12 15:46
+      */
+     SysUser createPersonalAccount (SysUser user);
+
+     /**
+      * @descption: 经销商注册,存储信息
+      * @param:
+      * @return:
+      * @auther: ZhangDing
+      * @date: 2020-10-12 15:46
+      */
+     CustomersExt createThirdParty (CustomersExt customersExt);
+
+     /**
+      * @descption: 修改e签宝个人信息
+      * @param:
+      * @return:
+      * @auther: ZhangDing
+      * @date: 2020-10-13 9:47
+      */
+     int updatePersonalAccount (SysUser user);
+
+     /**
+      * @descption: 修改e签宝公司信息
+      * @param:
+      * @return:
+      * @auther: ZhangDing
+      * @date: 2020-10-13 9:47
+      */
+     int updateThirdParty(CustomersExt customersExt);
+
 
     }

+ 146 - 1
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/ESignServiceImpl.java

@@ -1,14 +1,24 @@
 package com.dgtly.wxportal.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.dgtly.system.domain.CustomersExt;
+import com.dgtly.system.domain.SysUser;
+import com.dgtly.system.service.ICustomersExtService;
+import com.dgtly.system.service.ISysUserService;
 import com.dgtly.wxportal.service.ESignService;
 import com.dgtly.wxportal.utils.ESign.ESignHttpUtil;
 import com.dgtly.wxportal.utils.ESign.ESignUploadUtil;
 import com.dgtly.wxportal.utils.ESign.ESignUrl;
+import com.dgtly.wxportal.utils.pdf.PDFUtil;
+import com.dgtly.wxportal.utils.pdf.Watermark;
+import com.itextpdf.text.Document;
+import com.itextpdf.text.PageSize;
+import com.itextpdf.text.pdf.PdfWriter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.io.File;
+import java.io.FileOutputStream;
 
 /**
  * @author ZhangDing
@@ -24,6 +34,10 @@ public class ESignServiceImpl implements ESignService {
 
     @Autowired
     private ESignHttpUtil eSignHttpUtil;
+    @Autowired
+    private ISysUserService userService;
+    @Autowired
+    private ICustomersExtService customersExtService;
 
     @Override
     public String upload(String orderId) {
@@ -46,6 +60,105 @@ public class ESignServiceImpl implements ESignService {
         return res;
     }
 
+    @Override
+    public String verificationUser() {
+        return null;
+    }
+
+    @Override
+    public SysUser createPersonalAccount(SysUser user) {
+        JSONObject json = new JSONObject();
+
+        json.put("thirdPartyUserId",user.getLoginName());
+        json.put("name",user.getUserName());
+//        json.put("idType","CRED_PSN_CH_IDCARD");
+//        json.put("idNumber",user.getIdNumber());
+//        json.put("mobile",user.getPhonenumber());
+//        json.put("email",user.getEmail());
+        JSONObject resule = eSignHttpUtil.doPostGetJson(ESignUrl.CreatePersonalAccount,json);
+        user.setAccountId(resule.getJSONObject("data").getString("accountId"));
+        int isok = userService.insertPersonalAccount(user);
+        if (isok>0){
+            return user;
+        }else {
+            return null;
+        }
+    }
+
+    @Override
+    public CustomersExt createThirdParty(CustomersExt customersExt) {
+        JSONObject json = new JSONObject();
+        int isok = 1;
+        json.put("thirdPartyUserId",customersExt.getChainsCode());
+        json.put("creator",customersExt.getCreator());
+        json.put("name",customersExt.getCustomersName());
+//        json.put("idType","CRED_ORG_USCC");
+//        json.put("idNumber",customersExt.getIdNumber());
+//        json.put("orgLegalIdNumber",customersExt.getOrgLegalidNumber());
+//        json.put("orgLegalName",customersExt.getOrgLegalName());
+        JSONObject resule = eSignHttpUtil.doPostGetJson(ESignUrl.CreateThirdParty,json);
+        customersExt.setOrgId(resule.getJSONObject("data").getString("orgId"));
+        isok = customersExtService.insertCustomersExt(customersExt);
+        if (isok>0){
+            return customersExt;
+        }else {
+            return null;
+        }
+    }
+
+    @Override
+    public int updatePersonalAccount(SysUser user) {
+        JSONObject json = new JSONObject();
+        int isok = 0;
+        JSONObject resule = null;
+        if (user.getUserName()!=null) {
+            json.put("name", user.getUserName());
+        }
+        if (user.getIdNumber()!=null) {
+            json.put("idNumber", user.getIdNumber());
+        }
+        if (user.getPhonenumber()!=null) {
+            json.put("mobile", user.getPhonenumber());
+        }
+        if (user.getEmail()!=null) {
+            json.put("email", user.getEmail());
+        }
+        if (user.getAccountId()!=null) {
+            resule  = eSignHttpUtil.doPutGetJson(ESignUrl.updatePersonalAccount, json, user.getAccountId());
+            if (resule.getInteger("code")==0){
+                isok = 1;
+            }
+        }
+
+        return isok;
+    }
+
+    @Override
+    public int updateThirdParty(CustomersExt customersExt) {
+        JSONObject json = new JSONObject();
+        int isok = 0;
+        JSONObject resule = null;
+        if (customersExt.getCustomersName()!=null) {
+            json.put("name", customersExt.getCustomersName());
+        }
+        if (customersExt.getIdNumber()!=null) {
+            json.put("idNumber", customersExt.getIdNumber());
+        }
+        if (customersExt.getOrgLegalidNumber()!=null) {
+            json.put("orgLegalIdNumber", customersExt.getOrgLegalidNumber());
+        }
+        if (customersExt.getOrgLegalName()!=null) {
+            json.put("orgLegalName", customersExt.getOrgLegalName());
+        }
+        if (customersExt.getOrgId()!=null) {
+            resule  = eSignHttpUtil.doPutGetJson(ESignUrl.updateThirdParty, json, customersExt.getOrgId());
+            if (resule.getInteger("code")==0){
+                isok = 1;
+            }
+        }
+        return isok;
+    }
+
     /**
      * 创建收货单pdf文件
      * @param orderId
@@ -53,7 +166,39 @@ public class ESignServiceImpl implements ESignService {
      */
     private String creatPdf(String orderId){
 
-        return "C:/Users/14471/Desktop/test.pdf";
+        String fileUrl = "";
+        try {
+            // 1.新建document对象
+            Document document = new Document(PageSize.A4);// 建立一个Document对象
+
+            // 2.建立一个书写器(Writer)与document对象关联
+            String uploadPath = "D:/szsm/uploadPath";
+            File file = new File(uploadPath+File.separator+"PDFDemo.pdf");
+            fileUrl = uploadPath+"/PDFDemo.pdf";
+            file.createNewFile();
+
+            PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(file));
+            writer.setPageEvent(new Watermark("我是水印"));// 水印
+//                writer.setPageEvent(new MyHeaderFooter());// 页眉/页脚
+
+            // 3.打开文档
+            document.open();
+            document.addTitle("E    签   宝   租  铺  合  同 ");// 标题
+            document.addAuthor("");// 作者
+            document.addSubject("");// 主题
+            document.addKeywords("");// 关键字
+            document.addCreator("");// 创建者
+
+            // 4.向文档中添加内容
+            PDFUtil.generatePDF(document);
+
+            // 5.关闭文档
+            document.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return fileUrl;
     }
 
     /**

+ 6 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/ESign/ESignUrl.java

@@ -12,8 +12,10 @@ import java.util.Formatter;
 public enum ESignUrl {
     //获取token方法
     AccessToken("/v1/oauth2/access_token?appId=%s&secret=%s&grantType=client_credentials")
+    //个人注册
     ,CreatePersonalAccount("/v1/accounts/createByThirdPartyUserId")
     ,GetPersonalAddress("/v2/identity/auth/web/%s/indivIdentityUrl")
+    //企业注册
     ,CreateThirdParty("/v1/organizations/createByThirdPartyUserId")
     ,uploadCreateFile("/v1/files/getUploadUrl")
     //个人认证
@@ -40,6 +42,10 @@ public enum ESignUrl {
     ,ProcessArchivUrl("/v1/signflows/%s/archive")
 //    //8、签署的文件下载
     ,ProcessDocumentDownloadUrl("/v1/signflows/%s/documents")
+    //个人信息修改
+    ,updatePersonalAccount("/v1/accounts/%s")
+    //公司信息修改
+    ,updateThirdParty("/v1/organizations/%s")
     ;
     private String url;
     private ESignConfig eSignConfig ;

+ 214 - 1
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/pdf/PDFUtil.java

@@ -166,7 +166,7 @@ public class PDFUtil {
                 Document document = new Document(PageSize.A4);// 建立一个Document对象
 
                 // 2.建立一个书写器(Writer)与document对象关联
-                String uploadPath = "E:/szsm/uploadPath";
+                String uploadPath = "D:/szsm/uploadPath";
                 File file = new File(uploadPath+File.separator+"PDFDemo.pdf");
                 file.createNewFile();
 
@@ -214,6 +214,219 @@ public class PDFUtil {
             }
         }
 
+
+    public  static void generateEPDF(Document document,String name) throws Exception {
+
+        // 段落
+        Paragraph paragraph = new Paragraph("立    邦   随   身  邦  订  单 ", titlefont);
+        paragraph.setAlignment(1); //设置文字居中 0靠左   1,居中     2,靠右
+        paragraph.setIndentationLeft(12); //设置左缩进
+        paragraph.setIndentationRight(12); //设置右缩进
+        paragraph.setFirstLineIndent(24); //设置首行缩进
+        paragraph.setLeading(20f); //行间距
+        paragraph.setSpacingBefore(5f); //设置段落上空白
+        paragraph.setSpacingAfter(10f); //设置段落下空白
+        document.add(paragraph);
+        // 直线
+        Paragraph p1 = new Paragraph();
+        p1.add(new Chunk(new LineSeparator()));
+        document.add(p1);
+        Paragraph paragraph1 = new Paragraph("客户名称: " +name+"", textfont);
+        paragraph1.setLeading(20f); //行间距
+        paragraph1.setSpacingBefore(5f); //设置段落上空白
+        paragraph1.setSpacingAfter(10f); //设置段落下空白
+        document.add(paragraph1);
+        // 点线
+        Paragraph p2 = new Paragraph();
+        p2.add(new Chunk(new DottedLineSeparator()));
+        //document.add(p2);
+
+        //添加空行
+        Paragraph p3 = new Paragraph();
+        p3.setSpacingBefore(5f); //设置段落上空白
+        p3.setSpacingAfter(5f); //设置段落下空白
+        // 超链接
+        Anchor anchor = new Anchor("baidu");
+        anchor.setReference("www.baidu.com");
+        //document.add(anchor);
+        // 定位
+        Anchor gotoP = new Anchor("goto");
+        gotoP.setReference("#top");
+        //document.add(gotoP);
+        // 添加图片
+        Image image = Image.getInstance("https://img-blog.csdn.net/20180801174617455?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zNzg0ODcxMA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70");
+        image.setAlignment(Image.ALIGN_CENTER);
+        image.scalePercent(40); //依照比例缩放
+        //document.add(image);
+        // 表格
+        PdfPTable table = createTable(new float[] { 80, 80, 80, 80, 80, 80 ,80,80});
+        table.addCell(createCell("采购单信息", headfont, Element.ALIGN_LEFT, 8, false));
+        table.addCell(createCell("采购单号", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("项目名称", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("采购分类", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("申请人", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("申请部门", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("采购员", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("预估总价", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("申请日期", keyfont, Element.ALIGN_CENTER));
+
+
+        table.addCell(createCell("20200813131", textfont));
+        table.addCell(createCell("丁小改测试数据01", textfont));
+        table.addCell(createCell("打印机", textfont));
+        table.addCell(createCell("业务用户1", textfont));
+        table.addCell(createCell("南京工厂", textfont));
+        table.addCell(createCell("cg000005", textfont));
+        table.addCell(createCell("100000", textfont));
+        table.addCell(createCell("2020-08-13", textfont));
+//            document.add(table);
+
+        table = createTable(new float[] { 80, 80, 80, 80, 80, 80 ,80});
+        table.addCell(createCell("明细名称", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("采购数量", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("单位", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("预估单价", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("金额小计", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("规格", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("采购时间", keyfont, Element.ALIGN_CENTER));
+
+        table.addCell(createCell("笔记本", textfont));
+        table.addCell(createCell("5", textfont));
+        table.addCell(createCell("台", textfont));
+        table.addCell(createCell("2490", textfont));
+        table.addCell(createCell("12450", textfont));
+        table.addCell(createCell("适配", textfont));
+        table.addCell(createCell("2020-08-13",textfont));
+
+//            document.add(table);
+        document.add(p1);
+
+        paragraph = new Paragraph("中标供应商信息", titlefont);
+        paragraph.setAlignment(0); //设置文字居中 0靠左   1,居中     2,靠右
+        paragraph.setIndentationLeft(12); //设置左缩进
+        paragraph.setIndentationRight(12); //设置右缩进
+        paragraph.setFirstLineIndent(24); //设置首行缩进
+        paragraph.setLeading(20f); //行间距
+        paragraph.setSpacingBefore(5f); //设置段落上空白
+        paragraph.setSpacingAfter(10f); //设置段落下空白
+//            document.add(paragraph);
+
+        table = createTable(new float[] { 80, 80, 80, 80});
+        table.addCell(createCell("供应商名称", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("联系人", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("联系方式", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("邮箱", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("测试供应商", textfont));
+        table.addCell(createCell("张三", textfont));
+        table.addCell(createCell("8337971871", textfont));
+        table.addCell(createCell("langss@dgtis.com", textfont));
+//            document.add(table);
+
+        table = createTable(new float[] { 80, 80, 80, 80});
+        table.addCell(createCell("报价编号", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("总价", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("报价时间", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("状态", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("P20200812104", textfont));
+        table.addCell(createCell("70000.0", textfont));
+        table.addCell(createCell("2020-08-12", textfont));
+        table.addCell(createCell("已报价", textfont));
+        table.addCell(createCell("P20200812104", textfont));
+        table.addCell(createCell("70000.0", textfont));
+        table.addCell(createCell("2020-08-12", textfont));
+        table.addCell(createCell("已作废", textfont));
+//            document.add(table);
+//            document.add(p3);
+        table = createTable(new float[] { 80, 80, 80, 80});
+        table.addCell(createCell("供应商名称", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("联系人", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("联系方式", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("邮箱", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("测试供应商", textfont));
+        table.addCell(createCell("张三", textfont));
+        table.addCell(createCell("8337971871", textfont));
+        table.addCell(createCell("langss@dgtis.com", textfont));
+//            document.add(table);
+
+        table = createTable(new float[] { 80, 80, 80, 80});
+        table.addCell(createCell("报价编号", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("总价", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("报价时间", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("状态", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("P20200812104", textfont));
+        table.addCell(createCell("70000.0", textfont));
+        table.addCell(createCell("2020-08-12", textfont));
+        table.addCell(createCell("已报价", textfont));
+        table.addCell(createCell("P20200812104", textfont));
+        table.addCell(createCell("70000.0", textfont));
+        table.addCell(createCell("2020-08-12", textfont));
+        table.addCell(createCell("已作废", textfont));
+//            document.add(table);
+
+        document.add(p1);//添加实线
+
+        paragraph = new Paragraph("未中标供应商信息", titlefont);
+        paragraph.setAlignment(0); //设置文字居中 0靠左   1,居中     2,靠右
+        paragraph.setIndentationLeft(12); //设置左缩进
+        paragraph.setIndentationRight(12); //设置右缩进
+        paragraph.setFirstLineIndent(24); //设置首行缩进
+        paragraph.setLeading(20f); //行间距
+        paragraph.setSpacingBefore(5f); //设置段落上空白
+        paragraph.setSpacingAfter(10f); //设置段落下空白
+        document.add(paragraph);
+        table = createTable(new float[] { 80, 80, 80, 80});
+        table.addCell(createCell("供应商名称", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("联系人", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("联系方式", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("邮箱", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("测试供应商", textfont));
+        table.addCell(createCell("张三", textfont));
+        table.addCell(createCell("8337971871", textfont));
+        table.addCell(createCell("langss@dgtis.com", textfont));
+//            document.add(table);
+
+        table = createTable(new float[] { 80, 80, 80, 80});
+        table.addCell(createCell("报价编号", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("总价", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("报价时间", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("状态", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("P20200812104", textfont));
+        table.addCell(createCell("70000.0", textfont));
+        table.addCell(createCell("2020-08-12", textfont));
+        table.addCell(createCell("已报价", textfont));
+        table.addCell(createCell("P20200812104", textfont));
+        table.addCell(createCell("70000.0", textfont));
+        table.addCell(createCell("2020-08-12", textfont));
+        table.addCell(createCell("已作废", textfont));
+//            document.add(table);
+
+        table = createTable(new float[] { 80, 80, 80, 80});
+        table.addCell(createCell("供应商名称", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("联系人", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("联系方式", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("邮箱", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("测试供应商", textfont));
+        table.addCell(createCell("张三", textfont));
+        table.addCell(createCell("8337971871", textfont));
+        table.addCell(createCell("langss@dgtis.com", textfont));
+//            document.add(table);
+        document.add(p3);
+        table = createTable(new float[] { 80, 80, 80, 80});
+        table.addCell(createCell("报价编号", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("总价", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("报价时间", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("状态", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("P20200812104", textfont));
+        table.addCell(createCell("70000.0", textfont));
+        table.addCell(createCell("2020-08-12", textfont));
+        table.addCell(createCell("已报价", textfont));
+        table.addCell(createCell("P20200812104", textfont));
+        table.addCell(createCell("70000.0", textfont));
+        table.addCell(createCell("2020-08-12", textfont));
+        table.addCell(createCell("已作废", textfont));
+//            document.add(table);
+    }
+
         // 生成PDF文件
         public  static void generatePDF(Document document) throws Exception {