|
@ -1,7 +1,7 @@ |
|
|
'use strict'; |
|
|
'use strict'; |
|
|
const moment = require('moment') |
|
|
const moment = require('moment') |
|
|
|
|
|
|
|
|
async function add(ctx) { |
|
|
async function add (ctx) { |
|
|
try { |
|
|
try { |
|
|
const { models } = ctx.fs.dc; |
|
|
const { models } = ctx.fs.dc; |
|
|
const { |
|
|
const { |
|
@ -44,7 +44,7 @@ async function add(ctx) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async function edit(ctx) { |
|
|
async function edit (ctx) { |
|
|
try { |
|
|
try { |
|
|
const { models } = ctx.fs.dc; |
|
|
const { models } = ctx.fs.dc; |
|
|
const { |
|
|
const { |
|
@ -84,7 +84,7 @@ async function edit(ctx) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async function searchPepMember(ctx) { |
|
|
async function searchPepMember (ctx) { |
|
|
try { |
|
|
try { |
|
|
const { models } = ctx.fs.dc; |
|
|
const { models } = ctx.fs.dc; |
|
|
const { clickHouse } = ctx.app.fs |
|
|
const { clickHouse } = ctx.app.fs |
|
@ -160,7 +160,7 @@ async function searchPepMember(ctx) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async function del(ctx) { |
|
|
async function del (ctx) { |
|
|
try { |
|
|
try { |
|
|
const { models } = ctx.fs.dc; |
|
|
const { models } = ctx.fs.dc; |
|
|
const { pepUserId } = ctx.query |
|
|
const { pepUserId } = ctx.query |
|
@ -183,7 +183,7 @@ async function del(ctx) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async function list(ctx) { |
|
|
async function list (ctx) { |
|
|
try { |
|
|
try { |
|
|
const { models } = ctx.fs.dc; |
|
|
const { models } = ctx.fs.dc; |
|
|
const { judgeHoliday } = ctx.app.fs.utils |
|
|
const { judgeHoliday } = ctx.app.fs.utils |
|
@ -524,7 +524,10 @@ async function exportData (ctx) { |
|
|
ctx.body = { |
|
|
ctx.body = { |
|
|
message: typeof error == 'string' ? error : undefined |
|
|
message: typeof error == 'string' ? error : undefined |
|
|
} |
|
|
} |
|
|
async function addMembersBulk(ctx) { |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async function addMembersBulk (ctx) { |
|
|
let errorMsg = { message: '批量添加员工信息失败' }; |
|
|
let errorMsg = { message: '批量添加员工信息失败' }; |
|
|
const transaction = await ctx.fs.dc.orm.transaction(); |
|
|
const transaction = await ctx.fs.dc.orm.transaction(); |
|
|
try { |
|
|
try { |
|
@ -601,4 +604,4 @@ module.exports = { |
|
|
vacateStatistics, |
|
|
vacateStatistics, |
|
|
exportData, |
|
|
exportData, |
|
|
addMembersBulk |
|
|
addMembersBulk |
|
|
}; |
|
|
} |