123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- 'use strict';
- /**
- * Created by Tony on 2019/9/26.
- */
- module.exports = app => {
- class ReportController extends app.BaseController {
- /**
- * 创建电子签名角色
- *
- * @param {Object} ctx - egg全局context
- * @return {void}
- */
- async createSignatureRole(ctx) {
- const params = JSON.parse(ctx.request.body.params);
- // console.log(params);
- const rst = await ctx.service.signatureRole.createRole(params.name, params.bind_acc_id, params.prj_id, params.tender_id);
- // console.log(rst);
- ctx.body = { data: rst };
- // ctx.body = { data: { msg: 'test the network' } };
- ctx.status = 201;
- }
- /**
- * 创建签名角色关联
- *
- * @param {Object} ctx - egg全局context
- * @return {void}
- */
- async createRoleRel(ctx) {
- const params = JSON.parse(ctx.request.body.params);
- // console.log(params);
- const rst = await ctx.service.roleRptRel.createRoleRelationship(params.tender_id, params.rpt_id, params.rel_content);
- // console.log(rst);
- ctx.body = { data: rst };
- // ctx.body = { data: { msg: 'test the network' } };
- ctx.status = 201;
- }
- /**
- * 更新签名角色关联
- *
- * @param {Object} ctx - egg全局context
- * @return {void}
- */
- async updateRoleRel(ctx) {
- const params = JSON.parse(ctx.request.body.params);
- // console.log(params);
- const rst = await ctx.service.roleRptRel.updateRoleRelationship(params.id, params.tender_id, params.rpt_id, params.rel_content);
- // console.log(rst);
- ctx.body = { data: rst };
- // ctx.body = { data: { msg: 'test the network' } };
- ctx.status = 201;
- }
- }
- return ReportController;
- };
|