泛微E8版本解决方案
<h1>泛微E8版本解决方案</h1>
<p>本文档主要说明泛微E8版本的对接业务,对接解决方案,对接过程中需要特别注意点,以及实施过程中如何进行初始化以及对应的FAQ</p>
<p>泛微E8版本解决方案对接业务对接条件(必须满足以下条件)标准接口文档实施初始化步骤泛微E8对接过程中可能遇到的问题</p>
<h2>对接业务</h2>
<table>
<thead>
<tr>
<th>业务</th>
<th>协议</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>组织人员岗位同步</td>
<td>webservice</td>
<td>岗位与泛微的操作不一致,一般不会对接,具体看客户要求</td>
</tr>
<tr>
<td>待办同步</td>
<td>webservice</td>
<td></td>
</tr>
<tr>
<td>同步管理组类别</td>
<td>webservice</td>
<td>这个不是标准的,需要根据情况客户联系泛微开发</td>
</tr>
</tbody>
</table>
<h2>对接条件(必须满足以下条件)</h2>
<p>1.组织同步</p>
<p>1.1 组织用编码作为唯一标识,DHG的组织层级和编码必须保持一致,否则会出现组织错乱,此问题是泛微标准功能。如果客户希望不出现此问题,需要跟泛微沟通开发。</p>
<p>1.2 此处需要注意在进行组织合并转移时不要去修改对应的组织编码,否则会影响泛微生成重复的组织</p>
<p>1.3 E8版本OA组织架构里面,不支持部门直接放到顶级的集团根节点下面,需要在顶级根节点下面先建立公司,然后放部门。 在进行第三方接口配置时最高级的集团不要勾选,集团不用同步</p>
<p>1.4 E8版本OA组织架构里面,不支持部门下面建公司!!否则同步后这个公司会“找不到上级“直接跑到集团根节点下面去。(原因是因为向OA同步组织档案的时候,会把它的上级组织一起推给OA,但是这个公司的上级不是”公司“(分部)属性,然后”找不到上级“就这样了。所以公司、子公司需要层层递进,不能在部门下面建公司同步给OA。</p>
<p>2.人员同步</p>
<p>2.1 泛微的上级组织是必填的,这时要跟客户沟通下我们这边的上级领导需要必填,如果需要去掉这个限制,需要泛微进行开发</p>
<p>3.同步岗位</p>
<p>泛微的岗位设计与我们是不一样的,这个建议不做同步,影响不大,同步过去也无法知道这个岗位是哪个部门的,会造成岗位重复</p>
<p>4.同步管理组类别</p>
<p>这里DHG支持配置,但是泛微的矩阵接口需要泛微进行定制开发,泛微没有对应的标准接口 这里前期 要跟客户确认好。</p>
<h2>标准接口文档</h2>
<p>这里提供泛微E8版本提供的标准接口文档</p>
<p>一.同步公司
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=49a54da035db665c4229d49ab9d9c074&file=file.png" alt="" /></p>
<p>示例:<br />
请求报文: </p>
<pre><code class="language-xml"><soapenv:Envelope
xmlns:soapenv\="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:hrm\="http://localhost/services/HrmService"\>
<soapenv:Header/>
<soapenv:Body\>
<hrm:SynSubCompany\>
<hrm:in0\></hrm:in0\>
<hrm:in1\>
<!\[CDATA\[
<?xml version="1.0" encoding="UTF-8"?>
<root>
<orglist>
<org action="add">
<code>001</code>
<shortname>测试分部一</shortname>
<fullname>测试分部一</fullname>
<parent\_code>0</parent\_code>
<canceled>0</canceled>
<order>0</order>
</org>
</orglist>
</root>
\]\]>
</hrm:in1\>
</hrm:SynSubCompany\>
</soapenv:Body\>
</soapenv:Envelope\> </code></pre>
<p>返回报文: </p>
<pre><code class="language-xml"><soap:Envelope xmlns:soap\="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd\="http://www.w3.org/2001/XMLSchema" xmlns:xsi\="http://www.w3.org/2001/XMLSchema-instance"\>
<soap:Body\>
<ns1:SynSubCompanyResponse xmlns:ns1\="http://localhost/services/HrmService"\>
<ns1:out\><?xml version="1.0" encoding="UTF-8"?><result><message value="1">插入成功</message></result></ns1:out\>
</ns1:SynSubCompanyResponse\>
</soap:Body\>
</soap:Envelope\> </code></pre>
<p><br />
<br />
示例:<br />
请求报文 </p>
<pre><code class="language-xml"><soapenv:Envelope xmlns:soapenv\="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hrm\="http://localhost/services/HrmService"\>
<soapenv:Header/>
<soapenv:Body\>
<hrm:SynSubCompany\>
<hrm:in0\></hrm:in0\>
<hrm:in1\>
<!\[CDATA\[
<?xml version="1.0" encoding="UTF-8"?>
<root>
<orglist>
<org action="delete">
<code>001</code>
<canceled>0</canceled>
</org>
</orglist>
</root>
\]\]>
</hrm:in1\>
</hrm:SynSubCompany\>
</soapenv:Body\>
</soapenv:Envelope\> </code></pre>
<p>返回报文 </p>
<pre><code class="language-xml"><soap:Envelope xmlns:soap\="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd\="http://www.w3.org/2001/XMLSchema" xmlns:xsi\="http://www.w3.org/2001/XMLSchema-instance"\>
<soap:Body\>
<ns1:SynSubCompanyResponse xmlns:ns1\="http://localhost/services/HrmService"\>
<ns1:out\><?xml version="1.0" encoding="UTF-8"?><result><message value="1">删除成功</message></result></ns1:out\>
</ns1:SynSubCompanyResponse\>
</soap:Body\>
</soap:Envelope\> </code></pre>
<p>二.同步部门
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=9be51aefafbd8ca3400891b58e451d48&file=file.png" alt="" /></p>
<pre><code class="language-xml">
<?xml version="1.0" encoding="UTF-8"?>
<root\>
<orglist\>
<org action\="add"\>
<code\>001</code\>
<shortname\>测试部门</shortname\>
<fullname\>测试部门</fullname\>
<org\_code\>test\_sub\_code</org\_code\>
<parent\_code\>0</parent\_code\>
<canceled\>0</canceled\>
<order\>0</order\>
<custom\_data\>
<zzjgbmfzr\>测试人员1</zzjgbmfzr\>
</custom\_data\>
</org\>
</orglist\>
</root\>
<?xml version="1.0" encoding="UTF-8"?>
<root\>
<orglist\>
<org action\="edit"\>
<code\>001</code\>
<shortname\>测试部门</shortname\>
<fullname\>测试部门</fullname\>
<org\_code\>test\_sub\_code</org\_code\>
<parent\_code\>0</parent\_code\>
<canceled\>0</canceled\>
<order\>0</order\>
<custom\_data\>
<zzjgbmfzr\>测试人员1</zzjgbmfzr\>
</custom\_data\>
</org\>
</orglist\>
</root\></code></pre>
<p>三.同步人员
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=15fa61fae22eb0576e01571ebdc80d87&file=file.png" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=9c76a22f41e081990ed823f3e21a9530&file=file.png" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=87151722c8c2ad38bcfd72d24b4a4b66&file=file.png" alt="" />
示例<br />
请求报文 </p>
<pre><code class="language-xml"><soapenv:Envelope xmlns:soapenv\="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hrm\="http://localhost/services/HrmService"\>
<soapenv:Header/>
<soapenv:Body\>
<hrm:SynHrmResource\>
<hrm:in0\></hrm:in0\>
<hrm:in1\>
<!\[CDATA\[
<?xml version='1.0' encoding='UTF-8'?>
<root>
<hrmlist>
<hrm action='edit'>
<workcode>xy0036</workcode>
<subcompany>{JSON}{"subcompanycode":"md1jt"}</subcompany>
<department>{JSON}{"departmentcode":"zjbyj"}</department>
<lastname>xy测试0036</lastname>
<loginid>xytest0036</loginid>
<password>1</password>
<seclevel>100</seclevel>
<sex>男</sex>
<jobtitle>{JSON}{"jobtitlecode":"jszj175"}</jobtitle>
<accounttype>主账号</accounttype>
<belongto>YJ001</belongto>
<jobcall>初级</jobcall>
<joblevel>1</joblevel>
<jobactivitydesc>职责的具体要求</jobactivitydesc>
<managerid></managerid>
<assistantid></assistantid>
<status>正式</status>
<locationid>北京</locationid>
<workroom>北京</workroom>
<telephone>55667788</telephone>
<mobile>13911223344</mobile>
<mobilecall>55443322</mobilecall>
<fax>000-22222222</fax>
<email>1@1.com</email>
<systemlanguage>简体中文</systemlanguage>
<birthday>1990-01-01</birthday>
<folk>汉</folk>
<nativeplace>上海</nativeplace>
<regresidentplace>上海</regresidentplace>
<certificatenum>123132142253443</certificatenum>
<maritalstatus>未婚</maritalstatus>
<policy>无</policy>
<bememberdate>1990-01-01</bememberdate>
<bepartydate>1990-01-01</bepartydate>
<islabouunion>公会会员</islabouunion>
<educationlevel>本科</educationlevel>
<degree>学士</degree>
<healthinfo>良好</healthinfo>
<height>67</height>
<weight>175</weight>
<residentplace>上海市卢湾区</residentplace>
<homeaddress>上海市卢湾区XX号</homeaddress>
<tempresidentnumber>无</tempresidentnumber>
</hrm>
</hrmlist>
</root>
\]\]>
</hrm:in1\>
</hrm:SynHrmResource\>
</soapenv:Body\>
</soapenv:Envelope\>
返回报文
<soap:Envelope xmlns:soap\="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd\="http://www.w3.org/2001/XMLSchema" xmlns:xsi\="http://www.w3.org/2001/XMLSchema-instance"\>
<soap:Body\>
<ns1:SynHrmResourceResponse xmlns:ns1\="http://localhost/services/HrmService"\>
<ns1:out\><?xml version="1.0" encoding="UTF-8"?><result><message value="0">xxy0036|xy测试0036|创建成功</message></result></ns1:out\>
</ns1:SynHrmResourceResponse\>
</soap:Body\>
</soap:Envelope\> </code></pre>
<p></p>
<h2>实施初始化步骤</h2>
<p>一.下载脚本(根据不同数据库)
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=4b7fd50bc09c6633ac915a586b99308a&file=file.png" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=9de86157b44139e4d1b1da753e42e503&file=file.png" alt="" /></p>
<p>二.将脚本刷到数据中</p>
<p>在数据库中执行操作如下步骤:</p>
<p>A, 把上面下载的脚本语句粘贴到查询窗口</p>
<p>B, 在查询窗口点击右键,选择执行—执行SQL脚本 ,工具自动把查询窗口中的所有语句归集起来,然后点击确定。</p>
<p>执行完成后,会在生成接口列表数据,E8和E9的区别如下</p>
<p>三.在“第三方接口“ 接口参数里面设置OA服务的IP和端口,E8版本对接只需要IP和端口</p>
<p>A, 重点维护要同步的公司范围/人员范围(默认全公司),新增了公司要记得来这里勾。</p>
<p>B, 只需要填写OA服务的服务器地址和端口</p>
<p>到这里,接口配置工作已经完成了。</p>
<h2>泛微E8对接过程中可能遇到的问题</h2>
<p>一.1、泛微待办返回结果为空</p>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=b6222396b4b66e3a269bc459eb4c4e2f&file=file.png" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=9b27579b98f20035f21a09666e3abcc2&file=file.png" alt="" />
解决方案:</p>
<p>1、先排查泛微的服务是否有开启 排除方法 <a href="http://${webserviceIp}:${webservicePort}/services/OfsTodoDataWebService?wsdl">http://${webserviceIp}:${webservicePort}/services/OfsTodoDataWebService?wsdl</a> 看是能够访问到</p>
<p>如果返回是这个
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=7173d119462772de351e3bf6611eb388&file=file.png" alt="" />
说明服务没有注册</p>
<p>注册方式</p>
<p>在泛微中找到一下/ecology/classbean/META-INF/xfire/services.xml 这个文件 参照附件的文档</p>
<p>第二种方法</p>
<p>如果还是无法返回,参照这个方法</p>
<p>WEB-INF/securityXML/weaver_security_customer_rules_1.xml</p>
<p>找到这个配置文件
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=64f07a6ba875dfb35339e1b27a22d81a&file=file.png" alt="" />
配置好hr的地址ip。</p>
<p>这里需要重启泛微oa</p>
<p>请大家遇到与文件不一样的问题,或者其他的文档中没有场景,欢迎提问题到服务组来进行完善!</p>