diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index 2252cec..cbeb712 100644 --- a/api/app/lib/controllers/member/index.js +++ b/api/app/lib/controllers/member/index.js @@ -2,7 +2,7 @@ const moment = require('moment') const fs = require('fs'); -async function add(ctx) { +async function add (ctx) { try { const { models } = ctx.fs.dc; const { @@ -45,7 +45,7 @@ async function add(ctx) { } } -async function edit(ctx) { +async function edit (ctx) { try { const { models } = ctx.fs.dc; const { @@ -85,7 +85,7 @@ async function edit(ctx) { } } -async function searchPepMember(ctx) { +async function searchPepMember (ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -161,7 +161,7 @@ async function searchPepMember(ctx) { } } -async function del(ctx) { +async function del (ctx) { try { const { models } = ctx.fs.dc; const { pepUserId } = ctx.query @@ -184,7 +184,7 @@ async function del(ctx) { } } -async function list(ctx) { +async function list (ctx) { try { const { models } = ctx.fs.dc; const { judgeHoliday, memberList } = ctx.app.fs.utils @@ -250,7 +250,7 @@ async function list(ctx) { } } -async function overTimeStatistics(ctx) { +async function overTimeStatistics (ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -319,7 +319,7 @@ async function overTimeStatistics(ctx) { } } -async function vacateStatistics(ctx) { +async function vacateStatistics (ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -379,7 +379,7 @@ async function vacateStatistics(ctx) { } } -async function exportData(ctx) { +async function exportData (ctx) { try { const { models } = ctx.fs.dc; const { clickHouse, opts: { qiniu } } = ctx.app.fs @@ -447,7 +447,7 @@ async function exportData(ctx) { let header = [].concat(preHeader) for (let k in tableAttributes) { const comment = tableAttributes[k].comment - if (k != 'id' && comment) { + if (k != 'id' && k != 'pepUserId' && comment) { if ([].includes(k)) { // 截住不想导出的字段 continue @@ -499,8 +499,8 @@ async function exportData(ctx) { d.departmrnt = d.departmrnt.map(dep => dep.name).join('、') d.role = d.role.map(r => r.name).join('、') - d.idPhoto ? d.idPhoto = qiniu.domain + d.idPhoto : '' - d.vitae ? d.vitae = qiniu.domain + d.vitae : '' + d.idPhoto ? d.idPhoto = qiniu.domain + '/' + d.idPhoto : '' + d.vitae ? d.vitae = qiniu.domain + '/' + d.vitae : '' const corOverTime = statisticOvertimeRes.find(so => so.pepUserId == d.pepUserId) d.overTimeCount = corOverTime ? corOverTime.count : 0 @@ -527,7 +527,7 @@ async function exportData(ctx) { } } -async function addMembersBulk(ctx) { +async function addMembersBulk (ctx) { let errorMsg = { message: '导入员工信息失败' }; const transaction = await ctx.fs.dc.orm.transaction(); try {