Pārlūkot izejas kodu

Merge branch 'master' of http://git.cc-lotus.info/new_train/service-center

liuyu 5 gadi atpakaļ
vecāks
revīzija
abed7119ac

+ 46 - 0
app/controller/.apply.js

@@ -0,0 +1,46 @@
+module.exports = {
+  create: {
+    requestBody: [
+      '!termid',
+      '!lesson',
+      '!teacherid',
+      'reason'
+    ]
+  },
+  destroy: {
+    params: ['!id'],
+    service: 'delete'
+  },
+  update: {
+    params: ['!id'],
+    requestBody: [
+      'termid',
+      'lesson',
+      'teacherid',
+      'reason'
+    ]
+  },
+  show: {
+    parameters: {
+      params: ['!id']
+    },
+    service: 'fetch'
+  },
+  index: {
+    parameters: {
+      query: {
+        termid :'termid',
+        lesson :'lesson',
+        teacherid :'teacherid',
+        reason :'reason'
+      }
+    },
+    service: 'query',
+    options: {
+      query: ['skip', 'limit'],
+      sort: ['meta.createdAt'],
+      desc: true,
+      count: true
+    }
+  },
+};

+ 49 - 0
app/controller/.attendance.js

@@ -0,0 +1,49 @@
+module.exports = {
+  create: {
+    requestBody: [
+      'termid',
+      'batchid',
+      'classid',
+      'studentid',
+      'attend'
+    ]
+  },
+  destroy: {
+    params: ['!id'],
+    service: 'delete'
+  },
+  update: {
+    params: ['!id'],
+    requestBody: [
+      'termid',
+      'batchid',
+      'classid',
+      'studentid',
+      'attend'
+    ]
+  },
+  show: {
+    parameters: {
+      params: ['!id']
+    },
+    service: 'fetch'
+  },
+  index: {
+    parameters: {
+      query: {
+        termid :'termid',
+        batchid:'batchid',
+        classid :'classid',
+        studentid :'studentid',
+        attend :'attend'
+      }
+    },
+    service: 'query',
+    options: {
+      query: ['skip', 'limit'],
+      sort: ['meta.createdAt'],
+      desc: true,
+      count: true
+    }
+  },
+};

+ 12 - 0
app/controller/.class.js

@@ -7,6 +7,10 @@ module.exports = {
       'termid',
       'headteacherid',
       'lyteacherid',
+      'yclocationid',
+      'kzjhlocationid',
+      'kbyslocationid',
+      'lessonid',
       'type'
     ]
   },
@@ -23,6 +27,10 @@ module.exports = {
       'termid',
       'headteacherid',
       'lyteacherid',
+      'yclocationid',
+      'kzjhlocationid',
+      'kbyslocationid',
+      'lessonid',
       'type'
     ]
   },
@@ -41,6 +49,10 @@ module.exports = {
         termid: 'termid',
         headteacherid : 'headteacherid',
         lyteacherid : 'lyteacherid',
+        yclocationid:'yclocationid',
+        kzjhlocationid :'kzjhlocationid',
+        kbyslocationid :'kbyslocationid',
+        lessonid :'lessonid',
         type: 'type'
       }
     },

+ 40 - 0
app/controller/.duty.js

@@ -0,0 +1,40 @@
+module.exports = {
+  create: {
+    requestBody: [
+      'bzduty',
+      'xwduty'
+    ]
+  },
+  destroy: {
+    params: ['!id'],
+    service: 'delete'
+  },
+  update: {
+    params: ['!id'],
+    requestBody: [
+      'bzduty',
+      'xwduty'
+    ]
+  },
+  show: {
+    parameters: {
+      params: ['!id']
+    },
+    service: 'fetch'
+  },
+  index: {
+    parameters: {
+      query: {
+        bzduty :'bzduty',
+        xwduty:'xwduty'
+      }
+    },
+    service: 'query',
+    options: {
+      query: ['skip', 'limit'],
+      sort: ['meta.createdAt'],
+      desc: true,
+      count: true
+    }
+  },
+};

+ 52 - 0
app/controller/.group.js

@@ -0,0 +1,52 @@
+module.exports = {
+  create: {
+    requestBody: [
+      '!name',
+      'termid',
+      'batchid',
+      'classid',
+      'studentid',
+      'score'
+    ]
+  },
+  destroy: {
+    params: ['!id'],
+    service: 'delete'
+  },
+  update: {
+    params: ['!id'],
+    requestBody: [
+      'name',
+      'termid',
+      'batchid',
+      'classid',
+      'studentid',
+      'score'
+    ]
+  },
+  show: {
+    parameters: {
+      params: ['!id']
+    },
+    service: 'fetch'
+  },
+  index: {
+    parameters: {
+      query: {
+        name :'name',
+        termid :'termid',
+        batchid:'batchid',
+        classid :'classid',
+        studentid :'studentid',
+        score :'score'
+      }
+    },
+    service: 'query',
+    options: {
+      query: ['skip', 'limit'],
+      sort: ['meta.createdAt'],
+      desc: true,
+      count: true
+    }
+  },
+};

+ 52 - 0
app/controller/.leave.js

@@ -0,0 +1,52 @@
+module.exports = {
+  create: {
+    requestBody: [
+      '!studentid',
+      '!starttime',
+      '!endtime',
+      'reason',
+      'ispass',
+      'refcause'
+    ]
+  },
+  destroy: {
+    params: ['!id'],
+    service: 'delete'
+  },
+  update: {
+    params: ['!id'],
+    requestBody: [
+      'studentid',
+      'starttime',
+      'endtime',
+      'reason',
+      'ispass',
+      'refcause'
+    ]
+  },
+  show: {
+    parameters: {
+      params: ['!id']
+    },
+    service: 'fetch'
+  },
+  index: {
+    parameters: {
+      query: {
+        studentid :'studentid',
+        starttime :'starttime',
+        endtime :'endtime',
+        reason :'reason',
+        ispass :'ispass',
+        refcause :'refcause'
+      }
+    },
+    service: 'query',
+    options: {
+      query: ['skip', 'limit'],
+      sort: ['meta.createdAt'],
+      desc: true,
+      count: true
+    }
+  },
+};

+ 15 - 3
app/controller/.student.js

@@ -7,6 +7,8 @@ module.exports = {
       'gender',
       'nation',
       'school_name',
+      'schoolid',
+      'faculty',
       'major',
       'entry_year',
       'finish_year',
@@ -22,7 +24,9 @@ module.exports = {
       'batchid',
       'classid',
       'bedroomid',
-      'is_fine'
+      'is_fine',
+      'selfscore',
+      'score'
     ]
   },
   destroy: {
@@ -38,6 +42,8 @@ module.exports = {
       'gender',
       'nation',
       'school_name',
+      'schoolid',
+      'faculty',
       'major',
       'entry_year',
       'finish_year',
@@ -53,7 +59,9 @@ module.exports = {
       'batchid',
       'classid',
       'bedroomid',
-      'is_fine'
+      'is_fine',
+      'selfscore',
+      'score'
     ]
   },
   show: {
@@ -71,6 +79,8 @@ module.exports = {
         gender:'gender',
         nation:'nation',
         school_name:'school_name',
+        schoolid :'schoolid',
+        faculty :'faculty',
         major:'major',
         entry_year:'entry_year',
         finish_year:'finish_year',
@@ -86,7 +96,9 @@ module.exports = {
         batchid:'batchid',
         classid:'classid',
         bedroomid : 'bedroomid',
-        is_fine:'is_fine'
+        is_fine:'is_fine',
+        selfscore :'selfscore',
+        score :'score'
       }
     },
     service: 'query',

+ 58 - 0
app/controller/.uploadtask.js

@@ -0,0 +1,58 @@
+module.exports = {
+  create: {
+    requestBody: [
+      '!termid',
+      '!batchid',
+      '!classid',
+      '!lessonid',
+      '!studentid',
+      'picrul',
+      'taskid',
+      'score'
+    ]
+  },
+  destroy: {
+    params: ['!id'],
+    service: 'delete'
+  },
+  update: {
+    params: ['!id'],
+    requestBody: [
+      'termid',
+      'batchid',
+      'classid',
+      'lessonid',
+      'studentid',
+      'picrul',
+      'taskid',
+      'score'
+    ]
+  },
+  show: {
+    parameters: {
+      params: ['!id']
+    },
+    service: 'fetch'
+  },
+  index: {
+    parameters: {
+      query: {
+        termid : 'termid',
+        batchid: 'batchid',
+        classid : 'classid',
+        lessonid : 'lessonid',
+        studentid : 'studentid',
+        picrul : 'picrul',
+        taskid: 'taskid',
+        score: 'score'
+      }
+    },
+    service: 'query',
+    options: {
+      query: ['skip', 'limit'],
+      sort: ['meta.createdAt'],
+      desc: true,
+      count: true
+    }
+  },
+};

+ 19 - 0
app/controller/apply.js

@@ -0,0 +1,19 @@
+'use strict';
+
+const _ = require('lodash');
+const meta = require('./.apply.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 教师申请讲课表管理
+class ApplyController extends Controller {
+
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.apply;
+  }
+
+
+}
+
+module.exports = CrudController(ApplyController, meta);

+ 19 - 0
app/controller/attendance.js

@@ -0,0 +1,19 @@
+'use strict';
+
+const _ = require('lodash');
+const meta = require('./.attendance.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 考勤表管理
+class AttendanceController extends Controller {
+
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.attendance;
+  }
+
+
+}
+
+module.exports = CrudController(AttendanceController, meta);

+ 19 - 0
app/controller/duty.js

@@ -0,0 +1,19 @@
+'use strict';
+
+const _ = require('lodash');
+const meta = require('./.duty.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 职责说明管理
+class DutyController extends Controller {
+
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.duty;
+  }
+
+
+}
+
+module.exports = CrudController(DutyController, meta);

+ 19 - 0
app/controller/group.js

@@ -0,0 +1,19 @@
+'use strict';
+
+const _ = require('lodash');
+const meta = require('./.group.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 分组管理
+class GroupController extends Controller {
+
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.group;
+  }
+
+
+}
+
+module.exports = CrudController(GroupController, meta);

+ 19 - 0
app/controller/leave.js

@@ -0,0 +1,19 @@
+'use strict';
+
+const _ = require('lodash');
+const meta = require('./.leave.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 请假表管理
+class LeaveController extends Controller {
+
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.leave;
+  }
+
+
+}
+
+module.exports = CrudController(LeaveController, meta);

+ 19 - 0
app/controller/uploadtask.js

@@ -0,0 +1,19 @@
+'use strict';
+
+const _ = require('lodash');
+const meta = require('./.uploadtask.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 学生上传作业管理
+class UploadtaskController extends Controller {
+
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.uploadtask;
+  }
+
+
+}
+
+module.exports = CrudController(UploadtaskController, meta);

+ 21 - 0
app/model/apply.js

@@ -0,0 +1,21 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+
+// 教师申请讲课表
+const ApplySchema = {
+  termid: { type: String, required: true, maxLength: 200 }, // 申请期id
+  lesson: { type: String, required: true, maxLength: 200 }, // 申请所上课程
+  teacherid: { type: String, required: true, maxLength: 200 }, // 教师id
+  reason: { type: String, required: false, maxLength: 2000 }, // 申请原因
+};
+
+
+const schema = new Schema(ApplySchema, { toJSON: { virtuals: true } });
+schema.index({ id: 1 });
+schema.plugin(metaPlugin);
+
+module.exports = app => {
+  const { mongoose } = app;
+  return mongoose.model('Apply', schema, 'apply');
+};

+ 29 - 0
app/model/attendance.js

@@ -0,0 +1,29 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+
+// 考勤信息表
+const attendInfo = new Schema({
+  date: { type: String, required: false, maxLength: 200 }, // 日期
+  time: { type: String, required: false, maxLength: 200 }, // 时间
+  status: { type: String, required: false, maxLength: 200 }, // 是否签到,0-未签到,1-签到,2-迟到
+});
+
+// 考勤表
+const AttendanceSchema = {
+  termid: { type: String, required: false, maxLength: 200 }, // 期id
+  batchid: { type: String, required: false, maxLength: 200 }, // 批次id
+  classid: { type: String, required: false, maxLength: 200 }, // 班级id
+  studentid: { type: String, required: false, maxLength: 200 }, // 学生id
+  attend: { type: [ attendInfo ], select: true }, // 考勤信息
+};
+
+
+const schema = new Schema(AttendanceSchema, { toJSON: { virtuals: true } });
+schema.index({ id: 1 });
+schema.plugin(metaPlugin);
+
+module.exports = app => {
+  const { mongoose } = app;
+  return mongoose.model('Attendance', schema, 'attendance');
+};

+ 4 - 0
app/model/class.js

@@ -10,6 +10,10 @@ const ClassSchema = {
   termid: { type: String, required: false, maxLength: 200 }, // 期
   headteacherid: { type: String, required: false, maxLength: 200 }, // 班主任id
   lyteacherid: { type: String, required: false, maxLength: 200 }, // 礼仪课老师id
+  yclocationid: { type: String, required: false, maxLength: 200 }, // 用餐地点id
+  kzjhlocationid: { type: String, required: false, maxLength: 200 }, // 扩展计划地点id
+  kbyslocationid: { type: String, required: false, maxLength: 200 }, // 开班仪式地点id
+  lessonid: { type: String, required: false, maxLength: 200 }, // 课程表id
   type: { type: String, required: false, maxLength: 200 }, // 类型:0-正常,1-特殊
 };
 

+ 19 - 0
app/model/duty.js

@@ -0,0 +1,19 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+
+// 职责说明表
+const DutySchema = {
+  bzduty: { type: String, required: false, maxLength: 2000 }, // 班长职责
+  xwduty: { type: String, required: false, maxLength: 2000 }, // 学委职责
+};
+
+
+const schema = new Schema(DutySchema, { toJSON: { virtuals: true } });
+schema.index({ id: 1 });
+schema.plugin(metaPlugin);
+
+module.exports = app => {
+  const { mongoose } = app;
+  return mongoose.model('Duty', schema, 'duty');
+};

+ 23 - 0
app/model/group.js

@@ -0,0 +1,23 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+
+// 分组表
+const GroupSchema = {
+  name: { type: String, required: true, maxLength: 500 }, // 名称
+  termid: { type: String, required: false, maxLength: 500 }, // 期id
+  batchid: { type: String, required: false, maxLength: 500 }, // 批次id
+  classid: { type: String, required: false, maxLength: 500 }, // 班级id
+  studentid: [ String ], // 学生id
+  score: { type: String, required: false, maxLength: 500 }, // 分数
+};
+
+
+const schema = new Schema(GroupSchema, { toJSON: { virtuals: true } });
+schema.index({ id: 1 });
+schema.plugin(metaPlugin);
+
+module.exports = app => {
+  const { mongoose } = app;
+  return mongoose.model('Group', schema, 'group');
+};

+ 23 - 0
app/model/leave.js

@@ -0,0 +1,23 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+
+// 请假表
+const LeaveSchema = {
+  studentid: { type: String, required: true, maxLength: 200 }, // 学生id
+  starttime: { type: String, required: true, maxLength: 200 }, // 开始时间
+  endtime: { type: String, required: true, maxLength: 500 }, // 结束时间
+  reason: { type: String, required: false, maxLength: 2000 }, // 请假理由
+  ispass: { type: String, required: false, maxLength: 200 }, // 是否通过,0-未通过,1-通过
+  refcause: { type: String, required: false, maxLength: 2000 }, // 拒绝原因
+};
+
+
+const schema = new Schema(LeaveSchema, { toJSON: { virtuals: true } });
+schema.index({ id: 1 });
+schema.plugin(metaPlugin);
+
+module.exports = app => {
+  const { mongoose } = app;
+  return mongoose.model('Leave', schema, 'leave');
+};

+ 7 - 3
app/model/student.js

@@ -10,6 +10,8 @@ const StudentSchema = {
   gender: { type: String, required: false, maxLength: 200 }, // 性别
   nation: { type: String, required: false, maxLength: 200 }, // 民族
   school_name: { type: String, required: false, maxLength: 200 }, // 学校名称
+  schoolid: { type: String, required: false, maxLength: 200 }, // 学校id
+  faculty: { type: String, required: false, maxLength: 200 }, // 院系
   major: { type: String, required: false, maxLength: 200 }, // 专业
   entry_year: { type: String, required: false, maxLength: 200 }, // 入学年份
   finish_year: { type: String, required: false, maxLength: 200 }, // 毕业年份
@@ -21,12 +23,14 @@ const StudentSchema = {
   family_is_hard: { type: String, required: false, maxLength: 200 }, // 家庭是否困难,0-否,1-是
   have_grant: { type: String, required: false, maxLength: 200 }, // 是否获得过助学金,0-否,1-是
   job: { type: String, required: false, maxLength: 200 }, // 职务
-  termid: { type: String, required: false, maxLength: 200 }, // 期
-  batchid: { type: String, required: false, maxLength: 200 }, // 批次
-  classid: { type: String, required: false, maxLength: 200 }, // 班级
+  termid: { type: String, required: false, maxLength: 200 }, // 期id
+  batchid: { type: String, required: false, maxLength: 200 }, // 批次id
+  classid: { type: String, required: false, maxLength: 200 }, // 班级id
   bedroomid: { type: String, required: false, maxLength: 200 }, // 寝室id
   bedroom: { type: String, required: false, maxLength: 200 }, // 寝室号
   is_fine: { type: String, required: false, maxLength: 200 }, // 是否优秀,0-否,1-是
+  selfscore: { type: String, required: false, maxLength: 200 }, // 个人分
+  score: { type: String, required: false, maxLength: 200 }, // 总分
 }
   ;
 

+ 25 - 0
app/model/uploadtask.js

@@ -0,0 +1,25 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+
+// 学生上传作业表
+const UploadtaskSchema = {
+  termid: { type: String, required: true, maxLength: 200 }, // 期id
+  batchid: { type: String, required: true, maxLength: 200 }, // 批次id
+  classid: { type: String, required: true, maxLength: 200 }, // 班级id
+  lessonid: { type: String, required: true, maxLength: 200 }, // 课程信息id
+  studentid: { type: String, required: true, maxLength: 200 }, // 学生id
+  picrul: { type: String, required: false, maxLength: 200 }, // 上传图片地址
+  taskid: { type: String, required: false, maxLength: 200 }, // 作业id
+  score: { type: String, required: false, maxLength: 2000 }, // 分数
+};
+
+
+const schema = new Schema(UploadtaskSchema, { toJSON: { virtuals: true } });
+schema.index({ id: 1 });
+schema.plugin(metaPlugin);
+
+module.exports = app => {
+  const { mongoose } = app;
+  return mongoose.model('Uploadtask', schema, 'uploadtask');
+};

+ 24 - 0
app/router.js

@@ -84,4 +84,28 @@ module.exports = app => {
   // 班主任全年计划表设置路由
   router.resources('teaplan', '/api/train/teaplan', controller.teaplan); // index、create、show、destroy
   router.post('teaplan', '/api/train/teaplan/update/:id', controller.teaplan.update);
+
+  // 教师申请讲课表设置路由
+  router.resources('apply', '/api/train/apply', controller.apply); // index、create、show、destroy
+  router.post('apply', '/api/train/apply/update/:id', controller.apply.update);
+
+  // 请假表设置路由
+  router.resources('leave', '/api/train/leave', controller.leave); // index、create、show、destroy
+  router.post('leave', '/api/train/leave/update/:id', controller.leave.update);
+
+  // 分组表设置路由
+  router.resources('group', '/api/train/group', controller.group); // index、create、show、destroy
+  router.post('group', '/api/train/group/update/:id', controller.group.update);
+
+  // 职责说明表设置路由
+  router.resources('duty', '/api/train/duty', controller.duty); // index、create、show、destroy
+  router.post('duty', '/api/train/duty/update/:id', controller.duty.update);
+
+  // 学生上传作业表设置路由
+  router.resources('uploadtask', '/api/train/uploadtask', controller.uploadtask); // index、create、show、destroy
+  router.post('uploadtask', '/api/train/uploadtask/update/:id', controller.uploadtask.update);
+
+  // 考勤表设置路由
+  router.resources('attendance', '/api/train/attendance', controller.attendance); // index、create、show、destroy
+  router.post('attendance', '/api/train/attendance/update/:id', controller.attendance.update);
 };

+ 18 - 0
app/service/apply.js

@@ -0,0 +1,18 @@
+'use strict';
+
+
+const assert = require('assert');
+const _ = require('lodash');
+const { ObjectId } = require('mongoose').Types;
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+
+class ApplyService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'apply');
+    this.model = this.ctx.model.Apply;
+  }
+
+}
+
+module.exports = ApplyService;

+ 18 - 0
app/service/attendance.js

@@ -0,0 +1,18 @@
+'use strict';
+
+
+const assert = require('assert');
+const _ = require('lodash');
+const { ObjectId } = require('mongoose').Types;
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+
+class AttendanceService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'attendance');
+    this.model = this.ctx.model.Attendance;
+  }
+
+}
+
+module.exports = AttendanceService;

+ 18 - 0
app/service/duty.js

@@ -0,0 +1,18 @@
+'use strict';
+
+
+const assert = require('assert');
+const _ = require('lodash');
+const { ObjectId } = require('mongoose').Types;
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+
+class DutyService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'duty');
+    this.model = this.ctx.model.Duty;
+  }
+
+}
+
+module.exports = DutyService;

+ 18 - 0
app/service/group.js

@@ -0,0 +1,18 @@
+'use strict';
+
+
+const assert = require('assert');
+const _ = require('lodash');
+const { ObjectId } = require('mongoose').Types;
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+
+class GroupService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'group');
+    this.model = this.ctx.model.Group;
+  }
+
+}
+
+module.exports = GroupService;

+ 18 - 0
app/service/leave.js

@@ -0,0 +1,18 @@
+'use strict';
+
+
+const assert = require('assert');
+const _ = require('lodash');
+const { ObjectId } = require('mongoose').Types;
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+
+class LeaveService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'leave');
+    this.model = this.ctx.model.Leave;
+  }
+
+}
+
+module.exports = LeaveService;

+ 18 - 0
app/service/uploadtask.js

@@ -0,0 +1,18 @@
+'use strict';
+
+
+const assert = require('assert');
+const _ = require('lodash');
+const { ObjectId } = require('mongoose').Types;
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+
+class UploadtaskService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'uploadtask');
+    this.model = this.ctx.model.Uploadtask;
+  }
+
+}
+
+module.exports = UploadtaskService;