Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	h5app/src/components/postSelection.vue
#	h5app/src/views/pages/post/edit.vue
#	src/main/java/com/hz/employmentsite/vo/companyService/CompanyVo.java
liao-sea 10 months ago
parent
commit
93ad6f7201

+ 26 - 6
h5app/src/components/postSelection.vue

@@ -61,6 +61,26 @@ ion-segment-button {
 /*  --border-radius: 0px;*/
 /*  --border-width: 0 0 0 0;*/
 /*}*/
+
+.custom-scroll {
+  overflow-y: auto; /* 显示垂直滚动条 */
+  max-height: 200px; /* 设置最大高度,超出部分会出现滚动条 */
+}
+
+/* 可以根据需要自定义滚动条的样式 */
+.custom-scroll::-webkit-scrollbar {
+  width: 8px;
+}
+
+.custom-scroll::-webkit-scrollbar-thumb {
+  background-color: #888;
+  border-radius: 4px;
+}
+
+.custom-scroll::-webkit-scrollbar-thumb:hover {
+  background-color: #555;
+}
+
 </style>
 
 <template>
@@ -84,8 +104,8 @@ ion-segment-button {
           </ion-item>
           <ion-item>
             <ion-segment value="0">
-              <ion-segment-button v-for="(item) in selectModelList" @click="onSelectType(item.index)"
-                                  :disabled="item.disabled" :value="item.index" :key="item.professionID">
+              <ion-segment-button v-for="(item,key) in selectModelList" :key="key" @click="onSelectType(item.index)"
+                                  :disabled="item.disabled" :value="item.index">
                 <ion-label :style="{color:item.isSelect?'#1a65eb':'#000000'}">{{ item.name }}</ion-label>
               </ion-segment-button>
             </ion-segment>
@@ -93,7 +113,7 @@ ion-segment-button {
         </ion-toolbar>
         <div class="bw-vue-list">
           <div class="list-content">
-            <ion-list v-show="selectModelList[selectType.one].isSelect">
+            <ion-list class="custom-scroll" v-show="selectModelList[selectType.one].isSelect">
               <ion-item v-for="(item, index) in selectModelList[selectType.one].professionList" :key="index">
                 <ion-label :style="{color:item.isSelect?'#1a65eb':'#000000'}"
                            @click="onSelect(item,selectType.one)">
@@ -101,7 +121,7 @@ ion-segment-button {
                 </ion-label>
               </ion-item>
             </ion-list>
-            <ion-list v-show="selectModelList[selectType.two].isSelect">
+            <ion-list class="custom-scroll" v-show="selectModelList[selectType.two].isSelect">
               <ion-item v-for="(item, index) in selectModelList[selectType.two].professionList" :key="index">
                 <ion-label :style="{color:item.isSelect?'#1a65eb':'#000000'}"
                            @click="onSelect(item,selectType.two)">
@@ -109,7 +129,7 @@ ion-segment-button {
                 </ion-label>
               </ion-item>
             </ion-list>
-            <ion-list v-show="selectModelList[selectType.three].isSelect">
+            <ion-list class="custom-scroll" v-show="selectModelList[selectType.three].isSelect">
               <ion-item v-for="(item, index) in selectModelList[selectType.three].professionList" :key="index">
                 <ion-label :style="{color:item.isSelect?'#1a65eb':'#000000'}"
                            @click="onSelect(item,selectType.three)">
@@ -285,7 +305,7 @@ export default defineComponent({
 
     const onSelect = (item: any, type: any) => {
       selectModelList[type].professionList.forEach((x: any) => {
-        x.isSelect = x.professionID == item.professionID;
+        x.isSelect = x.professionID == item.professionID
       });
       selectModelList[type].professionName = item.professionName;
       selectModelList[type].professionID = item.professionID;

+ 0 - 31
h5app/src/views/pages/jobhunt/recommend/list.vue

@@ -193,34 +193,3 @@ export default defineComponent({
   }
 });
 </script>
-
-<style lang="less">
-.custom{
-  --placeholder-color: gray;
-  --placeholder-opacity: 0.5;
-}
-
-.recommend-list-page {
-  .list-content {
-    margin: 0px 15px !important;
-    background-color: white !important;
-    border-radius: 0 !important;
-
-    ion-item {
-      margin-top: 10px;
-      font-size: 14px;
-      border: 1px solid rgb(242, 242, 245);
-
-      p {
-        font-size: 12px;
-      }
-    }
-  }
-}
-
-.container {
-  display: flex;
-  justify-content: center; /* 水平居中 */
-  align-items: center; /* 垂直居中 */
-}
-</style>

+ 2 - 4
h5app/src/views/pages/post/edit.vue

@@ -195,7 +195,7 @@ import {useRoute, useRouter} from "vue-router";
 import {alertController, onIonViewDidEnter} from "@ionic/vue";
 import {useVuelidate} from "@vuelidate/core";
 import {getPostByID, savePost} from "@/api/post";
-import {minLength, required} from "@vuelidate/validators";
+import { required} from "@vuelidate/validators";
 import {getSysDictionaryList} from "@/api/system/dictionary";
 import {getCompanyBySiteID} from "@/api/company";
 import {useUserStore} from '@/store/modules/user';
@@ -204,9 +204,7 @@ import PostSelection from "@/components/postSelection.vue";
 
 export default defineComponent({
   name: 'PostEdit',
-  components:{
-    PostSelection
-  },
+  components:{PostSelection},
   setup() {
     const router = useRouter();
     const route = useRoute();

+ 5 - 0
src/main/java/com/hz/employmentsite/AppConfig.java

@@ -78,6 +78,11 @@ public class AppConfig {
     @Value("${appconfig.wxconfig.accessScope}")
     public String wxAccessScope;
 
+    @Value("${appconfig.ztndatagdgovConfig.paasId}")
+    public String gdgov_paasId;
+    @Value("${appconfig.ztndatagdgovConfig.passToken}")
+    public String gdgov_passToken;
+
 
 
     /**

+ 1 - 0
src/main/java/com/hz/employmentsite/config/WebConfiguration.java

@@ -80,6 +80,7 @@ public class WebConfiguration implements WebMvcConfigurer {
 
 
         excludePath.add("/api/wx/**");
+        excludePath.add("/gdgovMapApi");
         excludePath.add("/static/**");  //静态资源
         excludePath.add("/mobile/**");  //静态资源
         excludePath.add("/web/**");  //静态资源

+ 3 - 3
src/main/java/com/hz/employmentsite/controller/companyService/CompanyController.java

@@ -72,20 +72,20 @@ public class CompanyController {
             data = new CompanyVo();
             data.companyID = UUID.randomUUID().toString();
             data.recordStatus = 1;
-            data.validDate = dateUtils.StrToDate("2099-12-31 00:00:00") ;
+            data.validDate = dateUtils.StrToDate("2099-12-31 00:00:00");
             data.isShortage = 1;
             PcSiteUserExample siteUserExp = new PcSiteUserExample();
             PcSiteUserExample.Criteria siteUserCro = siteUserExp.createCriteria();
             siteUserCro.andUserIDEqualTo(loginUserID);
             //siteUserCro.andUserIDEqualTo(accountService.getLoginUserID());
             var curSiteUserInfo = pcSiteUserMapper.selectByExample(siteUserExp).stream().findFirst().orElse(null);
-            if(curSiteUserInfo != null){
+            if (curSiteUserInfo != null) {
                 data.setSiteID(curSiteUserInfo.getSiteID());
                 PcSiteExample siteExp = new PcSiteExample();
                 PcSiteExample.Criteria siteCro = siteExp.createCriteria();
                 siteCro.andSiteIDEqualTo(curSiteUserInfo.getSiteID());
                 var curSiteInfo = pcSiteMapper.selectByExample(siteExp).stream().findFirst().orElse(null);
-                if(curSiteInfo != null){
+                if (curSiteInfo != null) {
                     data.setRegionCode(curSiteInfo.getRegionCode());
                     data.setStreetCode(curSiteInfo.getStreetCode());
                 }

+ 80 - 0
src/main/java/com/hz/employmentsite/model/PcCompany.java

@@ -53,6 +53,22 @@ public class PcCompany {
 
     private String openId;
 
+    private Date establishmentTime;
+
+    private String signInPoliticalArea;
+
+    private String website;
+
+    private String bonus;
+
+    private Integer registeredCapital;
+
+    private Integer professionID;
+
+    private Integer estateCategoryID;
+
+    private Integer tagID;
+
     public String getCompanyID() {
         return companyID;
     }
@@ -252,4 +268,68 @@ public class PcCompany {
     public void setOpenId(String openId) {
         this.openId = openId == null ? null : openId.trim();
     }
+
+    public Date getEstablishmentTime() {
+        return establishmentTime;
+    }
+
+    public void setEstablishmentTime(Date establishmentTime) {
+        this.establishmentTime = establishmentTime;
+    }
+
+    public String getSignInPoliticalArea() {
+        return signInPoliticalArea;
+    }
+
+    public void setSignInPoliticalArea(String signInPoliticalArea) {
+        this.signInPoliticalArea = signInPoliticalArea;
+    }
+
+    public String getWebsite() {
+        return website;
+    }
+
+    public void setWebsite(String website) {
+        this.website = website;
+    }
+
+    public String getBonus() {
+        return bonus;
+    }
+
+    public void setBonus(String bonus) {
+        this.bonus = bonus;
+    }
+
+    public Integer getRegisteredCapital() {
+        return registeredCapital;
+    }
+
+    public void setRegisteredCapital(Integer registeredCapital) {
+        this.registeredCapital = registeredCapital;
+    }
+
+    public Integer getProfessionID() {
+        return professionID;
+    }
+
+    public void setProfessionID(Integer professionID) {
+        this.professionID = professionID;
+    }
+
+    public Integer getEstateCategoryID() {
+        return estateCategoryID;
+    }
+
+    public void setEstateCategoryID(Integer estateCategoryID) {
+        this.estateCategoryID = estateCategoryID;
+    }
+
+    public Integer getTagID() {
+        return tagID;
+    }
+
+    public void setTagID(Integer tagID) {
+        this.tagID = tagID;
+    }
 }

+ 16 - 0
src/main/java/com/hz/employmentsite/services/impl/companyService/CompanyServiceImpl.java

@@ -135,6 +135,14 @@ public class CompanyServiceImpl implements CompanyService {
             dbData.setCreateUserID(userId);
             dbData.setModifyTime(new Date());
             dbData.setModifyUserID(userId);
+            dbData.setEstablishmentTime(data.getEstablishmentTime());
+            dbData.setRegisteredCapital(data.getRegisteredCapital());
+            dbData.setSignInPoliticalArea(data.getSignInPoliticalArea());
+            dbData.setWebsite(data.getWebsite());
+            dbData.setBonus(data.getBonus());
+            dbData.setProfessionID(data.getProfessionID());
+            dbData.setEstateCategoryID(data.getEstateCategoryID());
+            dbData.setTagID(data.getTagID());
             result = pcCompanyMapper.insert(dbData);
 
         } else {
@@ -162,6 +170,14 @@ public class CompanyServiceImpl implements CompanyService {
             dbData.setOpenId(data.getOpenId());
             dbData.setModifyTime(new Date());
             dbData.setModifyUserID(userId);
+            dbData.setEstablishmentTime(data.getEstablishmentTime());
+            dbData.setRegisteredCapital(data.getRegisteredCapital());
+            dbData.setSignInPoliticalArea(data.getSignInPoliticalArea());
+            dbData.setWebsite(data.getWebsite());
+            dbData.setBonus(data.getBonus());
+            dbData.setProfessionID(data.getProfessionID());
+            dbData.setEstateCategoryID(data.getEstateCategoryID());
+            dbData.setTagID(data.getTagID());
             result = pcCompanyMapper.updateByPrimaryKeySelective(dbData);
         }
         return result;

+ 15 - 1
src/main/java/com/hz/employmentsite/vo/companyService/CompanyVo.java

@@ -1,10 +1,11 @@
 package com.hz.employmentsite.vo.companyService;
 
+import com.hz.employmentsite.util.datarange.annotations.CompanyID;
 import com.hz.employmentsite.util.datarange.annotations.InstitutionID;
 import com.hz.employmentsite.util.datarange.annotations.RegionID;
 import com.hz.employmentsite.util.datarange.annotations.SiteID;
 import lombok.Data;
-import com.hz.employmentsite.util.datarange.annotations.CompanyID;
+
 import java.util.Date;
 
 @Data
@@ -77,6 +78,19 @@ public class CompanyVo {
     public String longitude;
     public String latitude;
 
+    public Date establishmentTime;
+    public Integer registeredCapital;
+    public String signInPoliticalArea;
+
+    public Integer professionID;
+    public String professionName;
+    public Integer estateCategoryID;
+    public String estateCategoryName;
+    public Integer tagID;
+    public String tagName;
+
+    public String website;
+    public String bonus;
     public String openId;
 
     public String errorMessage;

+ 299 - 0
src/main/java/com/hz/employmentsite/webservices/ztndata_gdgov/ProxyHandler.java

@@ -0,0 +1,299 @@
+package com.hz.employmentsite.webservices.ztndata_gdgov;
+
+import com.hz.employmentsite.AppConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Configurable;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+@Component
+public class ProxyHandler extends HttpServlet implements Serializable {
+    private static final long serialVersionUID = 3561079438115778584L;
+    private final static Logger logger = LoggerFactory.getLogger(ProxyHandler.class);
+    private static final String CHARSET_UTF8 = "UTF-8"; // 默认字符集常量 : UTF-8
+    public static final String CONTENT_URL_NAME = "url";
+
+    @Autowired
+    private AppConfig appConfig;
+
+    public ProxyHandler() {
+    }
+
+    /**
+     * SERVELT 初始化
+     */
+    @Override
+    public void init(ServletConfig config) throws ServletException {
+        super.init();
+    }
+
+    /**
+     * doGet 请求
+     */
+    public void doGet(HttpServletRequest req, HttpServletResponse resp)
+            throws ServletException, IOException {
+        noSecurityRequest(req, resp);
+    }
+
+    private void noSecurityRequest(HttpServletRequest req,
+                                   HttpServletResponse resp) throws IOException {
+        logger.info("ProxyHandler noSecurityRequest 请求类型: GET");
+        String url0 = "";
+        OutputStream out = null;
+        HttpURLConnection conn = null;
+        // 获取请求的类型与字符集
+        String requestContent = req.getContentType();
+
+        String requestCharset = req.getCharacterEncoding();
+        StringBuffer requestContentType = new StringBuffer();
+        if (null != requestContent) {
+            requestContentType.append(requestContent);
+            if (null != requestCharset) {
+                requestContentType.append(";charset=").append(requestCharset);
+            }
+        }
+        try {
+            // 获取请求参数的字符串
+            String params = req.getQueryString();
+            params = params.replace("+", "%2B");
+            Map<String, String> paramValues = GetParamters(params);
+            url0 = URLDecoder.decode(paramValues.get("url"),"UTF-8");
+
+            // 请求转发
+            URL url = new URL(url0);
+
+            conn = (HttpURLConnection) url.openConnection();
+            conn.setRequestMethod("GET");
+            if (!requestContentType
+                    .toString().equals("")) {
+                conn.setRequestProperty("Content-Type", requestContentType
+                        .toString());
+            }
+            //添加请求头,paasId 与 paasToken 可从前端传递或者读取后端配置文件
+            String paasId = appConfig.gdgov_paasId, paasToken = appConfig.gdgov_passToken;
+            if (paramValues.containsKey("paasId")) {
+                paasId = paramValues.get("paasId");
+                paasToken = paramValues.get("paasToken");
+            }
+            HashMap<String, String> map = Signature.computeSignatureHeaders(paasId, paasToken);
+            if (paramValues.containsKey("serviceCode")) {
+
+                map.put("x-tif-signature", map.get("x-tif-signature").toUpperCase());
+                map.put("x-tif-serviceId", paramValues.get("serviceCode"));
+            }
+            for (String key : map.keySet()) {
+                conn.setRequestProperty(key, map.get(key));
+            }
+            logger.info("计算网关签名为:\n" + map);
+            conn.setDoOutput(true);
+            conn.setDoInput(true);
+            conn.setUseCaches(false);
+            // 获取请求的类型与字符集设置
+            String contentType = conn.getContentType();
+            String encoding = conn.getContentEncoding();
+            out = resp.getOutputStream();
+            // 设置返回的类型与字符集
+            resp.setContentType(contentType);
+            resp.setHeader("Content-Encoding", encoding);//正文解压缩方式
+            InputStream in = null;
+            if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
+                in = conn.getInputStream();
+            } else {
+                in = conn.getErrorStream();
+            }
+            out = resp.getOutputStream();
+            int len = 0;
+            byte[] b = new byte[1024];
+            while ((len = in.read(b)) > 0) {
+                out.write(b, 0, len);
+            }
+            out.flush();
+            logger.info("\n 请求地址: " + url0 + "\n 请求成功!");
+        } catch (Exception e) {
+            logger.error("请求地址: " + url0 + "\n 请求失败: " + e);
+        } finally {
+            try {
+                if (out != null) {
+                    out.close();
+                }
+                if (conn != null) {
+                    conn.disconnect();
+                }
+            } catch (Exception e) {
+                logger.error(e.toString());
+            }
+
+        }
+    }
+
+    private Map<String, String> GetParamters(String queryString) {
+        Map<String, String> pramValues = new HashMap<String, String>();
+        String[] paramNames = queryString.split("&");
+
+        for (int i = 0; i < paramNames.length; i++) {
+            String[] paramName = paramNames[i].split("=");
+
+            pramValues.put(paramName[0], paramName.length > 0 ? paramName[1] : "");
+        }
+
+        return pramValues;
+    }
+
+    public Map<String, Object> toMap(String url) {
+        Map<String, Object> map = null;
+        if ((url != null) && (url.indexOf("&") > -1) && (url.indexOf("=") > -1)) {
+            map = new HashMap<String, Object>();
+            String[] arrTemp = url.split("&");
+
+            for (String str : arrTemp) {
+                String[] qs = str.split("=", 2);
+                if (qs[0].indexOf("http://") == -1) {
+                    if (qs.length == 2)
+                        map.put(qs[0], qs[1]);
+                } else {
+                    String[] temp = qs[0].split("\\?");
+                    map.put(temp[(temp.length - 1)], qs[1]);
+                }
+            }
+        }
+        return map;
+    }
+
+    /**
+     * doPost 请求
+     */
+    public void doPost(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        logger.info("请求类型: POST");
+        InputStream indoc = request.getInputStream();
+        // 获取请求参数
+        String url0 = request.getQueryString();
+
+        // 对请求参数进行解码操作
+        if (null != url0)
+            url0 = URLDecoder.decode(url0, CHARSET_UTF8);
+        // 获取请求类型与字符集
+        String requestContent = request.getContentType();
+        String requestCharset = request.getCharacterEncoding();
+        StringBuffer requestContentType = new StringBuffer();
+        if (null != requestContent) {
+            requestContentType.append(requestContent);
+            if (null != requestCharset) {
+                requestContentType.append(";charset=").append(requestCharset);
+            }
+        }
+        OutputStream out = response.getOutputStream();
+        try {
+            Map<String, String> paramValues = GetParamters(url0);
+            int urlIndex = url0.indexOf("url=");
+            if (urlIndex > 0) {
+                url0 = url0.substring(urlIndex);
+            }
+            if (url0.startsWith("url=")) {
+                String urlString = url0.substring(4);
+                URL url = new URL(urlString);
+                BufferedInputStream in = null;
+                HttpURLConnection connection = null;
+                byte[] bs = null;
+                if (url != null) {
+                    try {
+                        // 转发请求
+                        connection = (HttpURLConnection) url.openConnection();
+                        connection.setRequestMethod("POST");
+                        connection.setRequestProperty("Content-Type",
+                                requestContentType.toString());
+                        connection.setDoInput(true);
+                        connection.setDoOutput(true);
+                        //添加请求头,paasId 与 paasToken 可从前端传递或者读取后端配置文件
+                        String paasId = "", paasToken = "";
+                        if (paramValues.containsKey("paasId")) {
+                            paasId = paramValues.get("paasId");
+                            paasToken = paramValues.get("paasToken");
+                        } else {
+                            /*paasId = gatewayConfig.getPaasId();
+                            paasToken = gatewayConfig.getPaasToken();*/
+                            paasId = appConfig.gdgov_paasId;
+                            paasToken = appConfig.gdgov_passToken;
+                        }
+
+                        HashMap<String, String> map = Signature.computeSignatureHeaders(paasId, paasToken);
+                        if (paramValues.containsKey("serviceCode")) {
+                            map.put("x-tif-signature", map.get("x-tif-signature").toUpperCase());
+                            map.put("x-tif-serviceId", paramValues.get("serviceCode"));
+                        }
+                        for (String key : map.keySet()) {
+                            connection.setRequestProperty(key, map.get(key));
+                        }
+                        OutputStream toserver = connection.getOutputStream();
+                        int l = 0;
+                        while ((l = indoc.read()) != -1) {
+                            toserver.write(l);
+                        }
+                        toserver.flush();
+                        toserver.close();
+                        // 获取转发返回的类型与字符集
+                        String responseContentType = connection
+                                .getContentType();
+                        String responseCharset = connection
+                                .getContentEncoding();
+                        // 将转发返回的类型与字符集设置到返回的参数中
+                        response.setContentType(responseContentType);
+
+                        response.setCharacterEncoding(responseCharset);
+                        // 读取响应信息,并将响应发送到客户端
+                        in = new BufferedInputStream(connection
+                                .getInputStream());
+                        bs = new byte[1024];
+                        int startpos = 0;
+                        int num = 0;
+                        num = in.read(bs, startpos, 1024);
+                        logger.info("返回信息:");
+                        while (num != -1) {
+                            out.write(bs, 0, num);
+                            logger.info(new String(bs));
+                            num = in.read(bs, 0, 1024);
+                        }
+                        logger.info("\n 请求地址: " + url0 + "\n 请求成功!");
+                    } catch (IOException e) {
+                        logger.error("请求地址: " + url0 + "\n 请求失败!" + e);
+                    } finally {
+                        if (in != null) {
+                            try {
+                                in.close();
+                            } catch (Exception ex) {
+                            }
+                        }
+                        if (connection != null) {
+                            try {
+                                connection.disconnect();
+                            } catch (Exception ex) {
+                            }
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            logger.error(e.toString());
+        } finally {
+            if (out != null) {
+                out.flush();
+                out.close();
+            }
+        }
+    }
+}

+ 25 - 0
src/main/java/com/hz/employmentsite/webservices/ztndata_gdgov/ServletConfig.java

@@ -0,0 +1,25 @@
+package com.hz.employmentsite.webservices.ztndata_gdgov;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.web.servlet.ServletRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class ServletConfig {
+
+    @Autowired
+    private ProxyHandler proxyHandler;
+
+
+    @Bean
+    public ServletRegistrationBean getServletRegistrationBean() {
+        //写请求前缀
+        String format = String.format("/%s/*", "gdgovMapApi");
+        ServletRegistrationBean bean = new ServletRegistrationBean(proxyHandler);
+        bean.addUrlMappings(format);
+        return bean;
+    }
+
+
+}

+ 62 - 0
src/main/java/com/hz/employmentsite/webservices/ztndata_gdgov/Signature.java

@@ -0,0 +1,62 @@
+package com.hz.employmentsite.webservices.ztndata_gdgov;
+
+import org.springframework.stereotype.Component;
+
+import java.security.MessageDigest;
+import java.util.Date;
+import java.util.HashMap;
+
+public class Signature {
+    /**
+     * 计算签名,返回请求求需要使用的参数
+     */
+    public static HashMap<String, String> computeSignatureHeaders(String paasId, String paasToken) throws
+            Exception {
+        if (paasId == null || paasId.isEmpty() || paasToken == null || paasToken.isEmpty()) {
+            throw new Exception("paasId,paasToken must be set");
+        }
+        HashMap<String, String> map = new HashMap<String, String>();
+        long now = new Date().getTime();
+        String timestamp = Long.toString((long) Math.floor(now / 1000));
+        String nonce = Long.toHexString(now) + "-" + Long.toHexString((long) Math.floor(Math.random() *
+                0xFFFFFF));
+        map.put("x-tif-paasId", paasId);
+        map.put("x-tif-timestamp", timestamp);
+        map.put("x-tif-nonce", nonce);
+        map.put("x-tif-signature", toSHA256(timestamp + paasToken + nonce + timestamp));
+        return map;
+    }
+
+    /**
+     * 签名计算
+     */
+    protected static String toSHA256(String str) throws Exception {
+        MessageDigest messageDigest;
+        String encodeStr = "";
+        try {
+            messageDigest = MessageDigest.getInstance("SHA-256");
+            messageDigest.update(str.getBytes("UTF-8"));
+            encodeStr = byte2Hex(messageDigest.digest());
+        } catch (Exception e) {
+            throw e;
+        }
+        return encodeStr;
+    }
+
+    /**
+     * byte 转换成 16 进制
+     */
+    protected static String byte2Hex(byte[] bytes) {
+        StringBuffer stringBuffer = new StringBuffer();
+        String temp = null;
+        for (int i = 0; i < bytes.length; i++) {
+            temp = Integer.toHexString(bytes[i] & 0xFF);
+            if (temp.length() == 1) {
+                stringBuffer.append("0");
+            }
+            stringBuffer.append(temp);
+        }
+        return stringBuffer.toString();
+    }
+
+}

+ 3 - 0
src/main/resources/application.yml

@@ -123,5 +123,8 @@ appconfig:
     appSecret: '0d37c99bf2edd9ef3d839869bfa724ad'
     wxMessageBaseUrl: 'http://www.bowintek.com/hzyz/mobile/index.html/#'
     accessScope: 'snsapi_base'
+  ztndatagdgovConfig:
+    paasId: 'C90-44000930'
+    passToken: '7499876b824144c3b1675f8c1412c24c'
 
 

+ 292 - 150
src/main/resources/mapping/PcCompanyMapper.xml

@@ -2,31 +2,38 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.hz.employmentsite.mapper.PcCompanyMapper">
   <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.PcCompany">
-    <id column="CompanyID" jdbcType="VARCHAR" property="companyID" />
-    <result column="SiteID" jdbcType="VARCHAR" property="siteID" />
-    <result column="RegionCode" jdbcType="VARCHAR" property="regionCode" />
-    <result column="InsuredCount" jdbcType="INTEGER" property="insuredCount" />
-    <result column="StreetCode" jdbcType="VARCHAR" property="streetCode" />
-    <result column="CompanyName" jdbcType="VARCHAR" property="companyName" />
-    <result column="CompanyCode" jdbcType="VARCHAR" property="companyCode" />
-    <result column="CompanyModel" jdbcType="INTEGER" property="companyModel" />
-    <result column="WorkSituation" jdbcType="VARCHAR" property="workSituation" />
-    <result column="CompanyType" jdbcType="INTEGER" property="companyType" />
-    <result column="CompanyAddress" jdbcType="VARCHAR" property="companyAddress" />
-    <result column="UserName" jdbcType="VARCHAR" property="userName" />
-    <result column="UserMobile" jdbcType="VARCHAR" property="userMobile" />
-    <result column="CompanyEmail" jdbcType="VARCHAR" property="companyEmail" />
-    <result column="FrName" jdbcType="VARCHAR" property="frName" />
-    <result column="ValidDate" jdbcType="TIMESTAMP" property="validDate" />
-    <result column="IsShortage" jdbcType="INTEGER" property="isShortage" />
-    <result column="RecordStatus" jdbcType="INTEGER" property="recordStatus" />
-    <result column="CreateUserID" jdbcType="VARCHAR" property="createUserID" />
-    <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="ModifyUserID" jdbcType="VARCHAR" property="modifyUserID" />
-    <result column="ModifyTime" jdbcType="TIMESTAMP" property="modifyTime" />
-    <result column="Longitude" jdbcType="VARCHAR" property="longitude" />
-    <result column="Latitude" jdbcType="VARCHAR" property="latitude" />
-    <result column="openId" jdbcType="VARCHAR" property="openId" />
+    <id column="CompanyID" jdbcType="VARCHAR" property="companyID"/>
+    <result column="SiteID" jdbcType="VARCHAR" property="siteID"/>
+    <result column="RegionCode" jdbcType="VARCHAR" property="regionCode"/>
+    <result column="InsuredCount" jdbcType="INTEGER" property="insuredCount"/>
+    <result column="StreetCode" jdbcType="VARCHAR" property="streetCode"/>
+    <result column="CompanyName" jdbcType="VARCHAR" property="companyName"/>
+    <result column="CompanyCode" jdbcType="VARCHAR" property="companyCode"/>
+    <result column="CompanyModel" jdbcType="INTEGER" property="companyModel"/>
+    <result column="WorkSituation" jdbcType="VARCHAR" property="workSituation"/>
+    <result column="CompanyType" jdbcType="INTEGER" property="companyType"/>
+    <result column="CompanyAddress" jdbcType="VARCHAR" property="companyAddress"/>
+    <result column="UserName" jdbcType="VARCHAR" property="userName"/>
+    <result column="UserMobile" jdbcType="VARCHAR" property="userMobile"/>
+    <result column="CompanyEmail" jdbcType="VARCHAR" property="companyEmail"/>
+    <result column="FrName" jdbcType="VARCHAR" property="frName"/>
+    <result column="ValidDate" jdbcType="TIMESTAMP" property="validDate"/>
+    <result column="IsShortage" jdbcType="INTEGER" property="isShortage"/>
+    <result column="RecordStatus" jdbcType="INTEGER" property="recordStatus"/>
+    <result column="CreateUserID" jdbcType="VARCHAR" property="createUserID"/>
+    <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime"/>
+    <result column="ModifyUserID" jdbcType="VARCHAR" property="modifyUserID"/>
+    <result column="ModifyTime" jdbcType="TIMESTAMP" property="modifyTime"/>
+    <result column="Longitude" jdbcType="VARCHAR" property="longitude"/>
+    <result column="Latitude" jdbcType="VARCHAR" property="latitude"/>
+    <result column="EstablishmentTime" jdbcType="TIMESTAMP" property="establishmentTime"/>
+    <result column="SignInPoliticalArea" jdbcType="VARCHAR" property="signInPoliticalArea"/>
+    <result column="Website" jdbcType="VARCHAR" property="website"/>
+    <result column="Bonus" jdbcType="VARCHAR" property="bonus"/>
+    <result column="RegisteredCapital" jdbcType="INTEGER" property="registeredCapital"/>
+    <result column="ProfessionID" jdbcType="INTEGER" property="professionID"/>
+    <result column="EstateCategoryID" jdbcType="INTEGER" property="estateCategoryID"/>
+    <result column="TagID" jdbcType="INTEGER" property="tagID"/>
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hz.employmentsite.model.PcCompanyWithBLOBs">
     <result column="BusinScope" jdbcType="LONGVARCHAR" property="businScope" />
@@ -91,10 +98,11 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    CompanyID, SiteID, RegionCode, InsuredCount, StreetCode, CompanyName, CompanyCode, 
-    CompanyModel, WorkSituation, CompanyType, CompanyAddress, UserName, UserMobile, CompanyEmail, 
-    FrName, ValidDate, IsShortage, RecordStatus, CreateUserID, CreateTime, ModifyUserID, 
-    ModifyTime, Longitude, Latitude, openId
+    CompanyID
+    , SiteID, RegionCode, InsuredCount, StreetCode, CompanyName, CompanyCode,
+    CompanyModel, WorkSituation, CompanyType, CompanyAddress, UserName, UserMobile, CompanyEmail,
+    FrName, ValidDate, IsShortage, RecordStatus, CreateUserID, CreateTime, ModifyUserID,
+    ModifyTime, Longitude, Latitude, EstablishmentTime,SignInPoliticalArea,Website,Bonus,RegisteredCapital,ProfessionID,EstateCategoryID,TagID
   </sql>
   <sql id="Blob_Column_List">
     BusinScope, CompanyDesc
@@ -130,7 +138,7 @@
     </if>
   </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
-    select 
+    select
     <include refid="Base_Column_List" />
     ,
     <include refid="Blob_Column_List" />
@@ -148,26 +156,31 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.hz.employmentsite.model.PcCompanyWithBLOBs">
-    insert into pc_company (CompanyID, SiteID, RegionCode, 
-      InsuredCount, StreetCode, CompanyName, 
-      CompanyCode, CompanyModel, WorkSituation, 
-      CompanyType, CompanyAddress, UserName, 
-      UserMobile, CompanyEmail, FrName, 
-      ValidDate, IsShortage, RecordStatus, 
-      CreateUserID, CreateTime, ModifyUserID, 
-      ModifyTime, Longitude, Latitude, 
-      openId, BusinScope, CompanyDesc
-      )
-    values (#{companyID,jdbcType=VARCHAR}, #{siteID,jdbcType=VARCHAR}, #{regionCode,jdbcType=VARCHAR}, 
-      #{insuredCount,jdbcType=INTEGER}, #{streetCode,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, 
-      #{companyCode,jdbcType=VARCHAR}, #{companyModel,jdbcType=INTEGER}, #{workSituation,jdbcType=VARCHAR}, 
-      #{companyType,jdbcType=INTEGER}, #{companyAddress,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, 
-      #{userMobile,jdbcType=VARCHAR}, #{companyEmail,jdbcType=VARCHAR}, #{frName,jdbcType=VARCHAR}, 
-      #{validDate,jdbcType=TIMESTAMP}, #{isShortage,jdbcType=INTEGER}, #{recordStatus,jdbcType=INTEGER}, 
-      #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyUserID,jdbcType=VARCHAR}, 
-      #{modifyTime,jdbcType=TIMESTAMP}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, 
-      #{openId,jdbcType=VARCHAR}, #{businScope,jdbcType=LONGVARCHAR}, #{companyDesc,jdbcType=LONGVARCHAR}
-      )
+    insert into pc_company (CompanyID, SiteID, RegionCode,
+                            InsuredCount, StreetCode, CompanyName,
+                            CompanyCode, CompanyModel, WorkSituation,
+                            CompanyType, CompanyAddress, UserName,
+                            UserMobile, CompanyEmail, FrName,
+                            ValidDate, IsShortage, RecordStatus,
+                            CreateUserID, CreateTime, ModifyUserID,
+                            ModifyTime, Longitude, Latitude,
+                            openId, BusinScope, CompanyDesc,
+                            EstablishmentTime, RegisteredCapital, SignInPoliticalArea,
+                            ProfessionID, EstateCategoryID, TagID,
+                            Website, Bonus)
+    values (#{companyID,jdbcType=VARCHAR}, #{siteID,jdbcType=VARCHAR}, #{regionCode,jdbcType=VARCHAR},
+            #{insuredCount,jdbcType=INTEGER}, #{streetCode,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR},
+            #{companyCode,jdbcType=VARCHAR}, #{companyModel,jdbcType=INTEGER}, #{workSituation,jdbcType=VARCHAR},
+            #{companyType,jdbcType=INTEGER}, #{companyAddress,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR},
+            #{userMobile,jdbcType=VARCHAR}, #{companyEmail,jdbcType=VARCHAR}, #{frName,jdbcType=VARCHAR},
+            #{validDate,jdbcType=TIMESTAMP}, #{isShortage,jdbcType=INTEGER}, #{recordStatus,jdbcType=INTEGER},
+            #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyUserID,jdbcType=VARCHAR},
+            #{modifyTime,jdbcType=TIMESTAMP}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR},
+            #{openId,jdbcType=VARCHAR}, #{businScope,jdbcType=LONGVARCHAR}, #{companyDesc,jdbcType=LONGVARCHAR},
+            #{establishmentTime,jdbcType=TIMESTAMP}, #{registeredCapital,jdbcType=INTEGER},
+            #{signInPoliticalArea,jdbcType=VARCHAR}, #{professionID,jdbcType=INTEGER},
+            #{estateCategoryID,jdbcType=INTEGER},
+            #{tagID,jdbcType=INTEGER}, #{website,jdbcType=VARCHAR}, #{bonus,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcCompanyWithBLOBs">
     insert into pc_company
@@ -253,6 +266,30 @@
       <if test="companyDesc != null">
         CompanyDesc,
       </if>
+      <if test="establishmentTime != null">
+        establishmentTime,
+      </if>
+      <if test="signInPoliticalArea != null">
+        signInPoliticalArea,
+      </if>
+      <if test="website != null">
+        website,
+      </if>
+      <if test="bonus != null">
+        bonus,
+      </if>
+      <if test="registeredCapital != null">
+        registeredCapital,
+      </if>
+      <if test="professionID != null">
+        professionID,
+      </if>
+      <if test="estateCategoryID != null">
+        estateCategoryID,
+      </if>
+      <if test="tagID != null">
+        tagID,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="companyID != null">
@@ -336,6 +373,30 @@
       <if test="companyDesc != null">
         #{companyDesc,jdbcType=LONGVARCHAR},
       </if>
+      <if test="establishmentTime != null">
+        #{establishmentTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="signInPoliticalArea != null">
+        #{signInPoliticalArea,jdbcType=VARCHAR},
+      </if>
+      <if test="website != null">
+        #{website,jdbcType=VARCHAR},
+      </if>
+      <if test="bonus != null">
+        #{bonus,jdbcType=VARCHAR},
+      </if>
+      <if test="registeredCapital != null">
+        #{registeredCapital,jdbcType=INTEGER},
+      </if>
+      <if test="professionID != null">
+        #{professionID,jdbcType=INTEGER},
+      </if>
+      <if test="estateCategoryID != null">
+        #{estateCategoryID,jdbcType=INTEGER},
+      </if>
+      <if test="tagID != null">
+        #{tagID,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.hz.employmentsite.model.PcCompanyExample" resultType="java.lang.Long">
@@ -428,6 +489,30 @@
       <if test="row.companyDesc != null">
         CompanyDesc = #{row.companyDesc,jdbcType=LONGVARCHAR},
       </if>
+      <if test="row.establishmentTime != null">
+        EstablishmentTime = #{row.establishmentTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="row.signInPoliticalArea != null">
+        SignInPoliticalArea = #{row.signInPoliticalArea,jdbcType=VARCHAR},
+      </if>
+      <if test="row.website != null">
+        Website = #{row.website,jdbcType=VARCHAR},
+      </if>
+      <if test="row.bonus != null">
+        Bonus = #{row.bonus,jdbcType=VARCHAR},
+      </if>
+      <if test="row.registeredCapital != null">
+        RegisteredCapital = #{row.registeredCapital,jdbcType=INTEGER},
+      </if>
+      <if test="row.professionID != null">
+        ProfessionID = #{row.professionID,jdbcType=INTEGER},
+      </if>
+      <if test="row.estateCategoryID != null">
+        EstateCategoryID = #{row.estateCategoryID,jdbcType=INTEGER},
+      </if>
+      <if test="row.tagID != null">
+        TagID = #{row.tagID,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -436,32 +521,40 @@
   <update id="updateByExampleWithBLOBs" parameterType="map">
     update pc_company
     set CompanyID = #{row.companyID,jdbcType=VARCHAR},
-      SiteID = #{row.siteID,jdbcType=VARCHAR},
-      RegionCode = #{row.regionCode,jdbcType=VARCHAR},
-      InsuredCount = #{row.insuredCount,jdbcType=INTEGER},
-      StreetCode = #{row.streetCode,jdbcType=VARCHAR},
-      CompanyName = #{row.companyName,jdbcType=VARCHAR},
-      CompanyCode = #{row.companyCode,jdbcType=VARCHAR},
-      CompanyModel = #{row.companyModel,jdbcType=INTEGER},
-      WorkSituation = #{row.workSituation,jdbcType=VARCHAR},
-      CompanyType = #{row.companyType,jdbcType=INTEGER},
-      CompanyAddress = #{row.companyAddress,jdbcType=VARCHAR},
-      UserName = #{row.userName,jdbcType=VARCHAR},
-      UserMobile = #{row.userMobile,jdbcType=VARCHAR},
-      CompanyEmail = #{row.companyEmail,jdbcType=VARCHAR},
-      FrName = #{row.frName,jdbcType=VARCHAR},
-      ValidDate = #{row.validDate,jdbcType=TIMESTAMP},
-      IsShortage = #{row.isShortage,jdbcType=INTEGER},
-      RecordStatus = #{row.recordStatus,jdbcType=INTEGER},
-      CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
-      CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
-      ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
-      Longitude = #{row.longitude,jdbcType=VARCHAR},
-      Latitude = #{row.latitude,jdbcType=VARCHAR},
-      openId = #{row.openId,jdbcType=VARCHAR},
-      BusinScope = #{row.businScope,jdbcType=LONGVARCHAR},
-      CompanyDesc = #{row.companyDesc,jdbcType=LONGVARCHAR}
+    SiteID = #{row.siteID,jdbcType=VARCHAR},
+    RegionCode = #{row.regionCode,jdbcType=VARCHAR},
+    InsuredCount = #{row.insuredCount,jdbcType=INTEGER},
+    StreetCode = #{row.streetCode,jdbcType=VARCHAR},
+    CompanyName = #{row.companyName,jdbcType=VARCHAR},
+    CompanyCode = #{row.companyCode,jdbcType=VARCHAR},
+    CompanyModel = #{row.companyModel,jdbcType=INTEGER},
+    WorkSituation = #{row.workSituation,jdbcType=VARCHAR},
+    CompanyType = #{row.companyType,jdbcType=INTEGER},
+    CompanyAddress = #{row.companyAddress,jdbcType=VARCHAR},
+    UserName = #{row.userName,jdbcType=VARCHAR},
+    UserMobile = #{row.userMobile,jdbcType=VARCHAR},
+    CompanyEmail = #{row.companyEmail,jdbcType=VARCHAR},
+    FrName = #{row.frName,jdbcType=VARCHAR},
+    ValidDate = #{row.validDate,jdbcType=TIMESTAMP},
+    IsShortage = #{row.isShortage,jdbcType=INTEGER},
+    RecordStatus = #{row.recordStatus,jdbcType=INTEGER},
+    CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
+    CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
+    ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
+    ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
+    Longitude = #{row.longitude,jdbcType=VARCHAR},
+    Latitude = #{row.latitude,jdbcType=VARCHAR},
+    openId = #{row.openId,jdbcType=VARCHAR},
+    BusinScope = #{row.businScope,jdbcType=LONGVARCHAR},
+    CompanyDesc = #{row.companyDesc,jdbcType=LONGVARCHAR},
+    EstablishmentTime = #{row.establishmentTime,jdbcType=TIMESTAMP},
+    SignInPoliticalArea = #{row.signInPoliticalArea,jdbcType=VARCHAR},
+    Website = #{row.website,jdbcType=VARCHAR},
+    Bonus = #{row.bonus,jdbcType=VARCHAR},
+    RegisteredCapital = #{row.registeredCapital,jdbcType=INTEGER},
+    ProfessionID = #{row.professionID,jdbcType=INTEGER},
+    EstateCategoryID = #{row.estateCategoryID,jdbcType=INTEGER},
+    TagID = #{row.tagID,jdbcType=INTEGER}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -469,30 +562,38 @@
   <update id="updateByExample" parameterType="map">
     update pc_company
     set CompanyID = #{row.companyID,jdbcType=VARCHAR},
-      SiteID = #{row.siteID,jdbcType=VARCHAR},
-      RegionCode = #{row.regionCode,jdbcType=VARCHAR},
-      InsuredCount = #{row.insuredCount,jdbcType=INTEGER},
-      StreetCode = #{row.streetCode,jdbcType=VARCHAR},
-      CompanyName = #{row.companyName,jdbcType=VARCHAR},
-      CompanyCode = #{row.companyCode,jdbcType=VARCHAR},
-      CompanyModel = #{row.companyModel,jdbcType=INTEGER},
-      WorkSituation = #{row.workSituation,jdbcType=VARCHAR},
-      CompanyType = #{row.companyType,jdbcType=INTEGER},
-      CompanyAddress = #{row.companyAddress,jdbcType=VARCHAR},
-      UserName = #{row.userName,jdbcType=VARCHAR},
-      UserMobile = #{row.userMobile,jdbcType=VARCHAR},
-      CompanyEmail = #{row.companyEmail,jdbcType=VARCHAR},
-      FrName = #{row.frName,jdbcType=VARCHAR},
-      ValidDate = #{row.validDate,jdbcType=TIMESTAMP},
-      IsShortage = #{row.isShortage,jdbcType=INTEGER},
-      RecordStatus = #{row.recordStatus,jdbcType=INTEGER},
-      CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
-      CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
-      ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
-      Longitude = #{row.longitude,jdbcType=VARCHAR},
-      Latitude = #{row.latitude,jdbcType=VARCHAR},
-      openId = #{row.openId,jdbcType=VARCHAR}
+    SiteID = #{row.siteID,jdbcType=VARCHAR},
+    RegionCode = #{row.regionCode,jdbcType=VARCHAR},
+    InsuredCount = #{row.insuredCount,jdbcType=INTEGER},
+    StreetCode = #{row.streetCode,jdbcType=VARCHAR},
+    CompanyName = #{row.companyName,jdbcType=VARCHAR},
+    CompanyCode = #{row.companyCode,jdbcType=VARCHAR},
+    CompanyModel = #{row.companyModel,jdbcType=INTEGER},
+    WorkSituation = #{row.workSituation,jdbcType=VARCHAR},
+    CompanyType = #{row.companyType,jdbcType=INTEGER},
+    CompanyAddress = #{row.companyAddress,jdbcType=VARCHAR},
+    UserName = #{row.userName,jdbcType=VARCHAR},
+    UserMobile = #{row.userMobile,jdbcType=VARCHAR},
+    CompanyEmail = #{row.companyEmail,jdbcType=VARCHAR},
+    FrName = #{row.frName,jdbcType=VARCHAR},
+    ValidDate = #{row.validDate,jdbcType=TIMESTAMP},
+    IsShortage = #{row.isShortage,jdbcType=INTEGER},
+    RecordStatus = #{row.recordStatus,jdbcType=INTEGER},
+    CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
+    CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
+    ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
+    ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
+    Longitude = #{row.longitude,jdbcType=VARCHAR},
+    Latitude = #{row.latitude,jdbcType=VARCHAR},
+    openId = #{row.openId,jdbcType=VARCHAR},
+    EstablishmentTime = #{row.establishmentTime,jdbcType=TIMESTAMP},
+    SignInPoliticalArea = #{row.signInPoliticalArea,jdbcType=VARCHAR},
+    Website = #{row.website,jdbcType=VARCHAR},
+    Bonus = #{row.bonus,jdbcType=VARCHAR},
+    RegisteredCapital = #{row.registeredCapital,jdbcType=INTEGER},
+    ProfessionID = #{row.professionID,jdbcType=INTEGER},
+    EstateCategoryID = #{row.estateCategoryID,jdbcType=INTEGER},
+    TagID = #{row.tagID,jdbcType=INTEGER}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -578,65 +679,106 @@
       <if test="companyDesc != null">
         CompanyDesc = #{companyDesc,jdbcType=LONGVARCHAR},
       </if>
+      <if test="establishmentTime != null">
+        EstablishmentTime = #{establishmentTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="signInPoliticalArea != null">
+        SignInPoliticalArea = #{signInPoliticalArea,jdbcType=VARCHAR},
+      </if>
+      <if test="website != null">
+        Website = #{website,jdbcType=VARCHAR},
+      </if>
+      <if test="bonus != null">
+        Bonus = #{bonus,jdbcType=VARCHAR},
+      </if>
+      <if test="registeredCapital != null">
+        RegisteredCapital = #{registeredCapital,jdbcType=INTEGER},
+      </if>
+      <if test="professionID != null">
+        ProfessionID = #{professionID,jdbcType=INTEGER},
+      </if>
+      <if test="estateCategoryID != null">
+        EstateCategoryID = #{estateCategoryID,jdbcType=INTEGER},
+      </if>
+      <if test="tagID != null">
+        TagID = #{tagID,jdbcType=INTEGER},
+      </if>
     </set>
     where CompanyID = #{companyID,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.hz.employmentsite.model.PcCompanyWithBLOBs">
     update pc_company
-    set SiteID = #{siteID,jdbcType=VARCHAR},
-      RegionCode = #{regionCode,jdbcType=VARCHAR},
-      InsuredCount = #{insuredCount,jdbcType=INTEGER},
-      StreetCode = #{streetCode,jdbcType=VARCHAR},
-      CompanyName = #{companyName,jdbcType=VARCHAR},
-      CompanyCode = #{companyCode,jdbcType=VARCHAR},
-      CompanyModel = #{companyModel,jdbcType=INTEGER},
-      WorkSituation = #{workSituation,jdbcType=VARCHAR},
-      CompanyType = #{companyType,jdbcType=INTEGER},
-      CompanyAddress = #{companyAddress,jdbcType=VARCHAR},
-      UserName = #{userName,jdbcType=VARCHAR},
-      UserMobile = #{userMobile,jdbcType=VARCHAR},
-      CompanyEmail = #{companyEmail,jdbcType=VARCHAR},
-      FrName = #{frName,jdbcType=VARCHAR},
-      ValidDate = #{validDate,jdbcType=TIMESTAMP},
-      IsShortage = #{isShortage,jdbcType=INTEGER},
-      RecordStatus = #{recordStatus,jdbcType=INTEGER},
-      CreateUserID = #{createUserID,jdbcType=VARCHAR},
-      CreateTime = #{createTime,jdbcType=TIMESTAMP},
-      ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
-      Longitude = #{longitude,jdbcType=VARCHAR},
-      Latitude = #{latitude,jdbcType=VARCHAR},
-      openId = #{openId,jdbcType=VARCHAR},
-      BusinScope = #{businScope,jdbcType=LONGVARCHAR},
-      CompanyDesc = #{companyDesc,jdbcType=LONGVARCHAR}
+    set SiteID              = #{siteID,jdbcType=VARCHAR},
+        RegionCode          = #{regionCode,jdbcType=VARCHAR},
+        InsuredCount        = #{insuredCount,jdbcType=INTEGER},
+        StreetCode          = #{streetCode,jdbcType=VARCHAR},
+        CompanyName         = #{companyName,jdbcType=VARCHAR},
+        CompanyCode         = #{companyCode,jdbcType=VARCHAR},
+        CompanyModel        = #{companyModel,jdbcType=INTEGER},
+        WorkSituation       = #{workSituation,jdbcType=VARCHAR},
+        CompanyType         = #{companyType,jdbcType=INTEGER},
+        CompanyAddress      = #{companyAddress,jdbcType=VARCHAR},
+        UserName            = #{userName,jdbcType=VARCHAR},
+        UserMobile          = #{userMobile,jdbcType=VARCHAR},
+        CompanyEmail        = #{companyEmail,jdbcType=VARCHAR},
+        FrName              = #{frName,jdbcType=VARCHAR},
+        ValidDate           = #{validDate,jdbcType=TIMESTAMP},
+        IsShortage          = #{isShortage,jdbcType=INTEGER},
+        RecordStatus        = #{recordStatus,jdbcType=INTEGER},
+        CreateUserID        = #{createUserID,jdbcType=VARCHAR},
+        CreateTime          = #{createTime,jdbcType=TIMESTAMP},
+        ModifyUserID        = #{modifyUserID,jdbcType=VARCHAR},
+        ModifyTime          = #{modifyTime,jdbcType=TIMESTAMP},
+        Longitude           = #{longitude,jdbcType=VARCHAR},
+        Latitude            = #{latitude,jdbcType=VARCHAR},
+        openId              = #{openId,jdbcType=VARCHAR},
+        BusinScope          = #{businScope,jdbcType=LONGVARCHAR},
+        CompanyDesc         = #{companyDesc,jdbcType=LONGVARCHAR},
+        EstablishmentTime   = #{establishmentTime,jdbcType=TIMESTAMP},
+        SignInPoliticalArea = #{signInPoliticalArea,jdbcType=VARCHAR},
+        Website             = #{website,jdbcType=VARCHAR},
+        Bonus               = #{bonus,jdbcType=VARCHAR},
+        RegisteredCapital   = #{registeredCapital,jdbcType=INTEGER},
+        ProfessionID        = #{professionID,jdbcType=INTEGER},
+        EstateCategoryID    = #{estateCategoryID,jdbcType=INTEGER},
+        TagID               = #{tagID,jdbcType=INTEGER}
     where CompanyID = #{companyID,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.PcCompany">
     update pc_company
-    set SiteID = #{siteID,jdbcType=VARCHAR},
-      RegionCode = #{regionCode,jdbcType=VARCHAR},
-      InsuredCount = #{insuredCount,jdbcType=INTEGER},
-      StreetCode = #{streetCode,jdbcType=VARCHAR},
-      CompanyName = #{companyName,jdbcType=VARCHAR},
-      CompanyCode = #{companyCode,jdbcType=VARCHAR},
-      CompanyModel = #{companyModel,jdbcType=INTEGER},
-      WorkSituation = #{workSituation,jdbcType=VARCHAR},
-      CompanyType = #{companyType,jdbcType=INTEGER},
-      CompanyAddress = #{companyAddress,jdbcType=VARCHAR},
-      UserName = #{userName,jdbcType=VARCHAR},
-      UserMobile = #{userMobile,jdbcType=VARCHAR},
-      CompanyEmail = #{companyEmail,jdbcType=VARCHAR},
-      FrName = #{frName,jdbcType=VARCHAR},
-      ValidDate = #{validDate,jdbcType=TIMESTAMP},
-      IsShortage = #{isShortage,jdbcType=INTEGER},
-      RecordStatus = #{recordStatus,jdbcType=INTEGER},
-      CreateUserID = #{createUserID,jdbcType=VARCHAR},
-      CreateTime = #{createTime,jdbcType=TIMESTAMP},
-      ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
-      Longitude = #{longitude,jdbcType=VARCHAR},
-      Latitude = #{latitude,jdbcType=VARCHAR},
-      openId = #{openId,jdbcType=VARCHAR}
+    set SiteID              = #{siteID,jdbcType=VARCHAR},
+        RegionCode          = #{regionCode,jdbcType=VARCHAR},
+        InsuredCount        = #{insuredCount,jdbcType=INTEGER},
+        StreetCode          = #{streetCode,jdbcType=VARCHAR},
+        CompanyName         = #{companyName,jdbcType=VARCHAR},
+        CompanyCode         = #{companyCode,jdbcType=VARCHAR},
+        CompanyModel        = #{companyModel,jdbcType=INTEGER},
+        WorkSituation       = #{workSituation,jdbcType=VARCHAR},
+        CompanyType         = #{companyType,jdbcType=INTEGER},
+        CompanyAddress      = #{companyAddress,jdbcType=VARCHAR},
+        UserName            = #{userName,jdbcType=VARCHAR},
+        UserMobile          = #{userMobile,jdbcType=VARCHAR},
+        CompanyEmail        = #{companyEmail,jdbcType=VARCHAR},
+        FrName              = #{frName,jdbcType=VARCHAR},
+        ValidDate           = #{validDate,jdbcType=TIMESTAMP},
+        IsShortage          = #{isShortage,jdbcType=INTEGER},
+        RecordStatus        = #{recordStatus,jdbcType=INTEGER},
+        CreateUserID        = #{createUserID,jdbcType=VARCHAR},
+        CreateTime          = #{createTime,jdbcType=TIMESTAMP},
+        ModifyUserID        = #{modifyUserID,jdbcType=VARCHAR},
+        ModifyTime          = #{modifyTime,jdbcType=TIMESTAMP},
+        Longitude           = #{longitude,jdbcType=VARCHAR},
+        Latitude            = #{latitude,jdbcType=VARCHAR},
+        openId              = #{openId,jdbcType=VARCHAR},
+        EstablishmentTime   = #{establishmentTime,jdbcType=TIMESTAMP},
+        SignInPoliticalArea = #{signInPoliticalArea,jdbcType=VARCHAR},
+        Website             = #{website,jdbcType=VARCHAR},
+        Bonus               = #{bonus,jdbcType=VARCHAR},
+        RegisteredCapital   = #{registeredCapital,jdbcType=INTEGER},
+        ProfessionID        = #{professionID,jdbcType=INTEGER},
+        EstateCategoryID    = #{estateCategoryID,jdbcType=INTEGER},
+        TagID               = #{tagID,jdbcType=INTEGER}
+
     where CompanyID = #{companyID,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 12 - 2
src/main/resources/mapping/cquery/CompanyCQuery.xml

@@ -4,10 +4,20 @@
     <select id="getList" resultType="com.hz.employmentsite.vo.companyService.CompanyVo">
         select company.*,city.name as regionName,area.name as streetName,sys_cmodel.Name as companyModelType,
         (select count(*) from pc_post where CompanyID=company.CompanyID) as postCount,u.`Name` as createUserName
-        ,inSites.InstitutionID as institutionID,site.SiteName
+        ,inSites.InstitutionID as institutionID,site.SiteName,com_status.Name as recordStatusName,
+        com_profession.Name as professionName, com_estate.Name as estateCategoryName,com_type.Name as companyTypeName
         from pc_company company
         left join sys_user u on u.UserID = company.CreateUserID
-        left join (select * from sys_dictionary_item where DictionaryCode ='CompanyModel') sys_cmodel on company.CompanyModel = sys_cmodel.Value
+        left join (select * from sys_dictionary_item where DictionaryCode ='CompanyModel') sys_cmodel on
+        company.CompanyModel = sys_cmodel.Value
+        left join (select * from sys_dictionary_item where DictionaryCode ='CompanyType') com_type on
+        company.CompanyType = com_type.Value
+        left join (select * from sys_dictionary_item where DictionaryCode ='CompanyStatus') com_status on
+        company.RecordStatus = com_status.Value
+        left join (select * from sys_dictionary_item where DictionaryCode ='CompanyProfession') com_profession on
+        company.ProfessionID = com_profession.Value
+        left join (select * from sys_dictionary_item where DictionaryCode ='CompanyEstateCategory') com_estate on
+        company.EstateCategoryID = com_estate.Value
         left join area_code city on company.RegionCode = city.code
         left join area_code area on company.StreetCode = area.code
         left join pc_site site on company.siteID = site.siteID

+ 2 - 2
vue/src/api/companyService/company.ts

@@ -14,11 +14,11 @@ export function getList(params: any) {
   );
 }
 
-export function getCompanyById(id: string,loginUserID:string) {
+export function getCompanyById(id: string, loginUserID: any) {
   return request({
     url: 'companyService/company/getCompanyByID',
     method: 'get',
-    params: {id,loginUserID}
+    params: {id, loginUserID}
   }, {
     isNew: true
   })

+ 21 - 2
vue/src/views/companyService/company/detail.vue

@@ -12,6 +12,16 @@
       <a-descriptions-item label="是否缺工">{{ companyInfo.isShortage == 0 ? '否' : '是' }}</a-descriptions-item>
       <a-descriptions-item label="企业所在经度">{{ companyInfo.longitude }}</a-descriptions-item>
       <a-descriptions-item label="企业所在纬度">{{ companyInfo.latitude }}</a-descriptions-item>
+      <a-descriptions-item label="企业成立日期">
+        {{ companyInfo.establishmentTime ? dayjs(companyInfo.establishmentTime).format('YYYY-MM-DD') : '' }}
+      </a-descriptions-item>
+      <a-descriptions-item label="注册资本">{{ companyInfo.registeredCapital }}万元</a-descriptions-item>
+      <a-descriptions-item label="注册地行政区划">{{ companyInfo.signInPoliticalArea }}</a-descriptions-item>
+      <a-descriptions-item label="所属行业">{{ companyInfo.professionName }}</a-descriptions-item>
+      <a-descriptions-item label="所属产业分类">{{ companyInfo.estateCategoryName }}</a-descriptions-item>
+      <a-descriptions-item label="企业标签">{{ companyInfo.tagName }}</a-descriptions-item>
+      <a-descriptions-item :span="3" label="官网网址">{{ companyInfo.website }}</a-descriptions-item>
+      <a-descriptions-item :span="3" label="企业福利">{{ companyInfo.bonus }}</a-descriptions-item>
     </a-descriptions>
     <a-divider orientation="left">附件照片</a-divider>
     <b-upload-file :fileRefId="companyInfo.companyID" :readonly="true" :multiple="true" style="width: 100%;"
@@ -23,7 +33,7 @@
         {{ companyInfo.validDate ? dayjs(companyInfo.validDate).format('YYYY-MM-DD') : '' }}
       </a-descriptions-item>
       <a-descriptions-item label="企业邮箱">{{ companyInfo.companyEmail }}</a-descriptions-item>
-      <a-descriptions-item label="企业分类">{{ companyInfo.companyType }}</a-descriptions-item>
+      <a-descriptions-item label="经济类型">{{ companyInfo.companyTypeName }}</a-descriptions-item>
       <a-descriptions-item label="所属县区">{{ companyInfo.regionName }}</a-descriptions-item>
       <a-descriptions-item label="所属街道">{{ companyInfo.streetName }}</a-descriptions-item>
       <a-descriptions-item label="企业规模">{{ companyInfo.companyModel }}</a-descriptions-item>
@@ -59,6 +69,7 @@ const companyInfo = reactive({
   validDate: "",
   companyEmail: "",
   companyType: "",
+  companyTypeName: "",
   regionName: "",
   streetName: "",
   companyModel: "",
@@ -66,13 +77,21 @@ const companyInfo = reactive({
   insuredCount: "",
   businScope: "",
   companyDesc: "",
+  establishmentTime: "",
+  registeredCapital: "",
+  signInPoliticalArea: "",
+  professionName: "",
+  estateCategoryName: "",
+  tagName: "",
+  website: "",
+  bonus: "",
 })
 // 文件数据
 const fileList = ref();
 
 // 数据加载
 function loadData(id: any) {
-  getCompanyById(id).then(result => {
+  getCompanyById(id, "").then(result => {
     Object.keys(companyInfo).forEach(key => {
       companyInfo[key] = result[key]
     })

+ 114 - 11
vue/src/views/companyService/company/edit.vue

@@ -119,10 +119,97 @@
           >
             <a-input v-model:value="dataModel.latitude" placeholder=""/>
           </a-form-item>
-
         </a-col>
         <a-col :span="8">
-
+          <a-form-item
+            label="企业成立日期"
+            :label-col="{ span: 8 }"
+            name="establishmentTime"
+          >
+            <a-date-picker v-model:value="dataModel.establishmentTime" value-format="YYYY-MM-DD"/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="注册资本"
+            :label-col="{ span: 8 }"
+            name="registeredCapital"
+          >
+            <a-input-number style="width: 100%" v-model:value="dataModel.registeredCapital" addon-after="万元"
+                            :controls="false"></a-input-number>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="注册地址行政区划"
+            :label-col="{ span: 8 }"
+            name="signInPoliticalArea"
+          >
+            <a-input v-model:value="dataModel.signInPoliticalArea"></a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="所属行业"
+            :label-col="{ span: 8 }"
+            name="professionID"
+          >
+            <a-select
+              ref="select"
+              v-model:value="dataModel.professionID"
+              :options="professionList"
+              :field-names="{ label: 'name', value: 'value' }"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="所属产业分类"
+            :label-col="{ span: 8 }"
+            name="estateCategoryID"
+          >
+            <a-select
+              ref="select"
+              v-model:value="dataModel.estateCategoryID"
+              :options="estateCategoryList"
+              :field-names="{ label: 'name', value: 'value' }"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="企业标签"
+            :label-col="{ span: 8 }"
+            name="tagID"
+          >
+            <a-select
+              ref="select"
+              v-model:value="dataModel.tagID"
+              :options="tagList"
+              :field-names="{ label: 'name', value: 'value' }"
+            >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="官网网址"
+            :label-col="{ span: 8 }"
+            name="website"
+          >
+            <a-input v-model:value="dataModel.website"></a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-item
+            label="企业福利"
+            :label-col="{ span: 8 }"
+            name="bonus"
+          >
+            <a-textarea v-model:value="dataModel.bonus" placeholder="" :rows="4"/>
+          </a-form-item>
         </a-col>
       </a-row>
       <a-divider orientation="left">附件图片上传</a-divider>
@@ -170,10 +257,10 @@
       <a-row>
         <a-col :span="8">
           <a-form-item
-            label="企业分类"
+            label="经济类型"
             :label-col="{ span: 8 }"
             name="companyType"
-            :rules="[{ required: false, message: '请选择企业分类!' }]"
+            :rules="[{ required: false, message: '请选择经济类型!' }]"
           >
             <a-select
               ref="select"
@@ -293,6 +380,7 @@ import {getSysDictionaryList} from '@/api/system/dictionary';
 import {getInfo} from '@/api/account';
 import dayjs from "dayjs";
 import {message} from "ant-design-vue";
+import {useUserStore} from "@/store/modules/user";
 
 interface FormState {
   dataModel: any;
@@ -302,6 +390,8 @@ export default defineComponent(
   {
     components: {BUploadFile},
     setup() {
+      const userStore = useUserStore();
+      const userInfo = ref(userStore.getUserInfo)
       const router = useRouter();
       const isAllowCommit = ref(true);
       const formState = reactive<FormState>({dataModel: {}});
@@ -317,10 +407,8 @@ export default defineComponent(
       //   let toDay = new Date();
       //   showDateTime.value = dayjs(new Date().toLocaleDateString().replaceAll("/", "-"));
       // }
-      const companyStatusList = ref<SelectProps['options']>([
-        {value: 1, name: '在营'},
-        {value: 0, name: '停业'},
-      ]);
+      const companyStatusList = ref<SelectProps['options']>();
+      const estateCategoryList = ref<SelectProps['options']>();
       const shortageStatusList = ref<SelectProps['options']>([
         {value: 1, name: '是'},
         {value: 0, name: '否'},
@@ -367,6 +455,16 @@ export default defineComponent(
         // console.log("companyCategoryList", companyCategoryList.value);
       }
 
+      const getCompanyStatusList = async function () {
+        const data: any = await getSysDictionaryList("CompanyStatus");
+        companyStatusList.value = data;
+      }
+
+      const getEstateCategoryList = async function () {
+        const data: any = await getSysDictionaryList("CompanyEstateCategory");
+        estateCategoryList.value = data;
+      }
+
       const siteChange = async function () {
         const curSiteData: any = await getSiteByID(formState.dataModel.siteID);
         formState.dataModel.regionCode = curSiteData.regionCode;
@@ -414,7 +512,8 @@ export default defineComponent(
 
       const inputDataValidate = () =>{
         const mobileReg = /^1[3|4|5|6|7|8|9]\d{9}$/;
-        if(!mobileReg.test(formState.dataModel.userMobile)){
+        const landlineReg = /[0-9-()()]{7,18}/;
+        if (!mobileReg.test(formState.dataModel.userMobile) && !landlineReg.test(formState.dataModel.userMobile)) {
           message.error("输入的联系电话有误!");
           isAllowCommit.value = false;
         }
@@ -455,6 +554,8 @@ export default defineComponent(
         getRegionList();
         getCompanyModelList();
         getCompanyTypeList();
+        getCompanyStatusList();
+        getEstateCategoryList();
         getInfo().then((loginUserInfo:any)=>{
           console.log("userInfo",loginUserInfo.userID);
           getCompanyById(id,loginUserInfo.userID).then(result => {
@@ -486,10 +587,12 @@ export default defineComponent(
         showDateTime,
         regionChange,
         setFileList,
-        shortageStatusList
+        shortageStatusList,
+        userInfo,
+        estateCategoryList
       }
     },
-    created() {
+    mounted() {
       const id = history.state.params?.id;
       this.loadData(id);
     }