Commit 936b0814 by 孙亚楠

Merge branch 'laowubao' of gitlab.gongsibao.com:jiangyong/zhichan into laowubao

parents 7f60eb97 bc382b69
...@@ -747,19 +747,37 @@ class LaoActionApi extends APIBase { ...@@ -747,19 +747,37 @@ class LaoActionApi extends APIBase {
temp = "" + cells[15]; temp = "" + cells[15];
if (temp){ if (temp){
data.phone_no = temp; data.phone_no = temp;
}
else{
data.phone_no = null;
//data.user_id = null;
}
temp = "" + cells[14];
if (temp){
var parm = { var parm = {
phone_no: temp user_name: temp,
find_type: 0,
real_status: "企业已认证"
} }
var user_info = await this.usersSve.findUserInfoByPhone(parm); var user_info = await this.usersSve.findUserInfo(parm);
if (user_info.status == -1) { if (user_info.status == -1) {
data.user_id = null; data.user_id = null;
} }
else{ else{
data.user_id = user_info.data.id; if (user_info.count > 0){
data.user_id = user_info.rows[0].id;
}
else{
data.user_id = null;
} }
}
} }
else{ else{
data.phone_no = null;
data.user_id = null; data.user_id = null;
} }
......
...@@ -8,7 +8,8 @@ class XbgApi extends apiBase { ...@@ -8,7 +8,8 @@ class XbgApi extends apiBase {
this.restClient = system.getObject("util.restClient"); this.restClient = system.getObject("util.restClient");
this.url = "https://bpohhr.gongsibao.com/api/xbgApi/"; this.url = "https://bpohhr.gongsibao.com/api/xbgApi/";
this.testCompanyIds = 12; this.testCompanyIds = 12;
this.ecompanyId = '1103817785420820481' this.ecompanyId = '1103817785420820481';
this.recruitSve = system.getObject("service.operator.recruitSve");
} }
async test(pobj, query) { async test(pobj, query) {
...@@ -112,8 +113,15 @@ class XbgApi extends apiBase { ...@@ -112,8 +113,15 @@ class XbgApi extends apiBase {
return system.getResult("参数ecompany_id为空") return system.getResult("参数ecompany_id为空")
} }
try { try {
var recruit_info = await this.recruitSve.findAllList(params);
var rs = await this.restClient.execPost(params, this.url+"dataOverview"); var rs = await this.restClient.execPost(params, this.url+"dataOverview");
return JSON.parse(rs.stdout); var resut = JSON.parse(rs.stdout);
var rcount = 0;
if (recruit_info.status == 0){
rcount = recruit_info.data.count;
}
resut.data["recruit_count"] = rcount;
return resut;
} catch (e) { } catch (e) {
console.log(e); console.log(e);
return system.getResult("接口异常"); return system.getResult("接口异常");
...@@ -159,3 +167,14 @@ class XbgApi extends apiBase { ...@@ -159,3 +167,14 @@ class XbgApi extends apiBase {
} }
module.exports = XbgApi; module.exports = XbgApi;
// var tesk = new XbgApi();
// var parm = {
// ecompany_id:""
// };
// tesk.dataOverview(parm).then(function(result){
// console.log(result);
// //console.log(result.data.rows);
// }).catch(function(e){
// console.log(e);
// });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment