Commit d2b912fa by 王昆

gsb

parent d83af709
......@@ -24,7 +24,7 @@ class LaoActionApi extends APIBase {
yd: {
signCompanyIds: [10173],
payCompanyIds: ['1152185172836229121', '1152186076306087937', '1165922409285480450', '1169516233595670529', '1174219506669584386', '1197064800073707522', '1199605424102690818'],
compantInfo: {
companyInfo: {
companyName: "上海韵达货运有限公司",
taxType: "一般纳税人",
contactName: "陈梁",
......@@ -41,7 +41,7 @@ class LaoActionApi extends APIBase {
tfb: {
signCompanyIds: [11410],
payCompanyIds: ['1187270470698082306', '1187272600083308546', '1187274198010056705', '1202100969987661826'],
compantInfo: {
companyInfo: {
companyName: "杭州淘粉吧网络技术股份有限公司",
taxType: "一般纳税人",
contactName: "王萍",
......@@ -58,6 +58,7 @@ class LaoActionApi extends APIBase {
}
this.userConfig = {
26: this.companyConfig.yd,
29: this.companyConfig.yd,
30: this.companyConfig.tfb
}
......@@ -518,7 +519,7 @@ class LaoActionApi extends APIBase {
}
async notifyInterview(obj) {
if(!obj.userId) {
if (!obj.userId) {
return system.getResult(null, "用户id不存在");
}
......@@ -674,188 +675,6 @@ class LaoActionApi extends APIBase {
}
}
<<<<<<< HEAD
async ParamRecruitExcel(obj){
if (!obj.userId || !obj.ossUrl){
return system.getResult(null, "参数不能为空");
}
var userId = obj.userId;
var ossurl = obj.ossUrl;
var dataList = [];
var filePath = "/tmp/recruit_info_" + userId + ".xlsx";
try {
await this.restClient.execDownload("'" + ossurl + "'", filePath);
var sheets = xlsx.parse(filePath);
var rows = sheets[0].data;
for (var i = 5; i < rows.length; i++) {
var cells = rows[i];
if (cells[0]){
var data = {};
data.recruit_name = "" + cells[1];
data.recruit_type = "" + cells[2];
data.recruit_count = "" + cells[3];
data.pay_name = "" + cells[4];
if (data.pay_name == "月薪"){
data.pay_type = 1;
}
else if (data.pay_name == "日薪"){
data.pay_type = 2;
}
else if (data.pay_name == "时薪"){
data.pay_type = 3;
}
else{
data.pay_type = null;
}
data.pay_unit = null;//少一个薪资单价
var temp = "" + cells[5];
if (temp && temp != "—" && temp != "面议" && temp != "undefined"){
data.basic_salary = Number(temp) * 100;
}
else{
data.basic_salary = null;
}
temp = "" + cells[6];
if (temp && temp != "—" && temp != "面议" && temp != "undefined"){
data.compre_salary = Number(temp) * 100;
}
else{
data.compre_salary = null;
}
temp = "" + cells[7];
if (temp && temp != "—" && temp != "undefined"){
data.work_duration = Number(temp);
}
else{
data.work_duration = null;
}
temp = "" + cells[8];
if (temp == "面议"){
data.rfee_type = 0;
}
else if (temp == "月返"){
data.rfee_type = 1;
}
else if (temp == "日返"){
data.rfee_type = 2;
}
else if (temp == "时返"){
data.rfee_type = 3;
}
else if (temp == "一次返"){
data.rfee_type = 4;
}
else{
data.rfee_type = null;
}
temp = "" + cells[9];
if (temp && temp != "—" && temp != "undefined"){
var arr = temp.split("/");
if (arr.length ==2){
data.rfee_duration = arr[0];
data.rfee_time = arr[1];
}
else{
data.rfee_duration = null;
data.rfee_time = null;
}
}
else{
data.rfee_duration = null;
data.rfee_time = null;
}
temp = "" + cells[10];
if (temp && temp != "undefined"){
data.age_range = temp;
}
else{
data.age_range = null;
}
temp = "" + cells[11];
if (temp && temp != "undefined"){
data.work_address = temp;
}
else{
data.work_address = null;
}
data.publish_date = (new Date()).Format("yyyy-MM-dd");
temp = "" + cells[12];
if (temp && temp != "undefined"){
if (temp == "长期"){
data.end_date = "1970-01-01";
}
else{
data.end_date = temp;
}
}
else{
data.end_date = null;
}
temp = "" + cells[14];
if (temp && temp != "undefined"){
data.pic_path = temp;
}
else{
data.pic_path = null;
}
console.log("###############" + data.pic_path + "#############");
temp = "" + cells[15];
if (temp && temp != "undefined"){
data.recrui_require = temp;
}
else{
data.recrui_require = null;
}
temp = "" + cells[16];
if (temp && temp != "undefined"){
data.phone_no = temp;
}
else{
data.phone_no = null;
//data.user_id = null;
}
temp = "" + cells[14];
if (temp && temp != "undefined"){
var parm = {
user_name: temp,
find_type: 0,
real_status: "企业已认证"
}
var user_info = await this.usersSve.findUserInfo(parm);
if (user_info.status == -1) {
data.user_id = null;
}
else{
if (user_info.count > 0){
data.user_id = user_info.rows[0].id;
}
else{
data.user_id = null;
}
}
}
else{
data.user_id = null;
}
data.counter_mark = null;
data.cur_type = 1;
data.cur_status = "展示中";
dataList.push(data)
}
=======
async ParamRecruitExcel(obj) {
if (!obj.userId || !obj.ossUrl) {
return system.getResult(null, "参数不能为空");
......@@ -887,19 +706,19 @@ class LaoActionApi extends APIBase {
}
data.pay_unit = null;//少一个薪资单价
var temp = "" + cells[5];
if (temp && temp != "—" && temp != "面议") {
if (temp && temp != "—" && temp != "面议" && temp != "undefined") {
data.basic_salary = Number(temp) * 100;
} else {
data.basic_salary = null;
}
temp = "" + cells[6];
if (temp && temp != "—" && temp != "面议") {
if (temp && temp != "—" && temp != "面议" && temp != "undefined") {
data.compre_salary = Number(temp) * 100;
} else {
data.compre_salary = null;
}
temp = "" + cells[7];
if (temp && temp != "—") {
if (temp && temp != "—" && temp != "undefined") {
data.work_duration = Number(temp);
} else {
data.work_duration = null;
......@@ -919,7 +738,7 @@ class LaoActionApi extends APIBase {
data.rfee_type = null;
}
temp = "" + cells[9];
if (temp && temp != "—") {
if (temp && temp != "—" && temp != "undefined") {
var arr = temp.split("/");
if (arr.length == 2) {
data.rfee_duration = arr[0];
......@@ -934,14 +753,14 @@ class LaoActionApi extends APIBase {
}
temp = "" + cells[10];
if (temp) {
if (temp && temp != "undefined") {
data.age_range = temp;
} else {
data.age_range = null;
}
temp = "" + cells[11];
if (temp) {
if (temp && temp != "undefined") {
data.work_address = temp;
} else {
data.work_address = null;
......@@ -949,28 +768,31 @@ class LaoActionApi extends APIBase {
data.publish_date = (new Date()).Format("yyyy-MM-dd");
temp = "" + cells[12];
if (temp) {
if (temp && temp != "undefined") {
if (temp == "长期") {
data.end_date = "1970-01-01";
} else {
data.end_date = temp;
>>>>>>> aaa393d880fbd1c02cf33d739ab56187e35bce65
}
} else {
data.end_date = null;
}
temp = "" + cells[14];
if (temp && temp != "undefined") {
data.pic_path = temp;
} else {
data.pic_path = null;
}
temp = "" + cells[14];
if (temp) {
temp = "" + cells[15];
if (temp && temp != "undefined") {
data.recrui_require = temp;
} else {
data.recrui_require = null;
}
temp = "" + cells[15];
if (temp) {
temp = "" + cells[16];
if (temp && temp != "undefined") {
data.phone_no = temp;
} else {
......@@ -979,7 +801,7 @@ class LaoActionApi extends APIBase {
}
temp = "" + cells[14];
if (temp) {
if (temp && temp != "undefined") {
var parm = {
user_name: temp,
find_type: 0,
......@@ -995,16 +817,12 @@ class LaoActionApi extends APIBase {
} else {
data.user_id = null;
}
}
} else {
data.user_id = null;
}
data.counter_mark = null;
data.cur_type = 1;
data.cur_status = "展示中";
dataList.push(data)
......@@ -1022,11 +840,12 @@ class LaoActionApi extends APIBase {
console.log(e);
return system.getResult(null, "接口异常");
}
}
// 工作量确认单
async paramXlsx(obj) {
if(!obj.userId) {
if (!obj.userId) {
return system.getResult(null, "用户未登录");
}
try {
......@@ -1043,7 +862,7 @@ class LaoActionApi extends APIBase {
// 列表
async workLoadPage(obj) {
if(!obj.userId) {
if (!obj.userId) {
return system.getResult(null, "用户未登录");
}
......@@ -1058,7 +877,7 @@ class LaoActionApi extends APIBase {
}
async workLoadHistoryInfo(obj) {
if(!obj.userId) {
if (!obj.userId) {
return system.getResult(null, "用户未登录");
}
......@@ -1073,7 +892,7 @@ class LaoActionApi extends APIBase {
// 确认/全部
async workloadConfirm(obj) {
if(!obj.userId) {
if (!obj.userId) {
return system.getResult(null, "用户未登录");
}
......@@ -1087,7 +906,7 @@ class LaoActionApi extends APIBase {
}
async workloadTotal(obj) {
if(!obj.userId) {
if (!obj.userId) {
return system.getResult(null, "用户未登录");
}
......@@ -1095,7 +914,7 @@ class LaoActionApi extends APIBase {
obj.pageSize = 1;
obj.status = 1;
var rs = await this.workloadSve.pageByCondition(obj);
if(!rs || !rs.count) {
if (!rs || !rs.count) {
return system.getResultSuccess(0);
}
return system.getResultSuccess(rs.count);
......@@ -1108,7 +927,7 @@ class LaoActionApi extends APIBase {
// 确认列表
async workloadHistory(obj) {
if(!obj.userId) {
if (!obj.userId) {
return system.getResult(null, "用户未登录");
}
......@@ -1126,7 +945,7 @@ class LaoActionApi extends APIBase {
async companyInfo(qobj) {
try {
let config = this.userConfig[qobj.userId];
if(!config) {
if (!config) {
return system.getResultSuccess({});
}
return system.getResultSuccess(config.companyInfo);
......@@ -1202,7 +1021,7 @@ class LaoActionApi extends APIBase {
module.exports = LaoActionApi;
var tesk = new LaoActionApi();
// var tesk = new LaoActionApi();
// var parm = {
// userId:4,
// ossUrl:"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1576396810278.xlsx"
......
......@@ -14,7 +14,7 @@ class XbgApi extends apiBase {
yd: {
signCompanyIds: [10173],
payCompanyIds: ['1152185172836229121', '1152186076306087937', '1165922409285480450', '1169516233595670529', '1174219506669584386', '1197064800073707522', '1199605424102690818'],
compantInfo: {
companyInfo: {
companyName: "上海韵达货运有限公司",
taxType: "一般纳税人",
contactName: "陈梁",
......@@ -31,7 +31,7 @@ class XbgApi extends apiBase {
tfb: {
signCompanyIds: [11410],
payCompanyIds: ['1187270470698082306', '1187272600083308546', '1187274198010056705', '1202100969987661826'],
compantInfo: {
companyInfo: {
companyName: "杭州淘粉吧网络技术股份有限公司",
taxType: "一般纳税人",
contactName: "王萍",
......@@ -48,6 +48,7 @@ class XbgApi extends apiBase {
}
this.userConfig = {
26: this.companyConfig.yd,
29: this.companyConfig.yd,
30: this.companyConfig.tfb
}
......@@ -60,7 +61,7 @@ class XbgApi extends apiBase {
}
async setCompanyIds(qobj) {
var config = this.this.userConfig[qobj.userId];
var config = this .userConfig[qobj.userId];
if (!config) {
return;
}
......
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