system-data-controller.js
10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
var express = require('express');
var router = express.Router();
var client = require('../../client');
var api = require('../api').url;
var Mock = require('mockjs');
router.get('/systemDictionary', function(req, res) {
var s=Mock.mock({
'data|1-5':[
{
'id|+1':1,
'type|0-1':0,
'number':'CSBH1',
'value':'参数1',
'status|0-1':0,
'note':'@csentence(10)'
}
],'totalPages|2-5':0
})
res.send(s);
});
router.post('/systemDictionary',function(req,res,next){
client.post(api.distributor_datadict_getAll, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
/*router.post('/systemDictionary',function(req,res){
var s=Mock.mock({
'errorCode':'0',
'id|100-200':0
})
res.send(s);
})*/
//数据
router.get('/dataDictionary',function(req,res){
var s=Mock.mock({
'data|1-5':[
{
'id|+1':1,
'type':'SYSRATYPE',//类型
'typevalue':'系统参数类型',//类型说明
'number':'1',//参数值
'datanumber':'业务类',//数据值说明
'value':'1',//数据值序号
'status|0-1':0,
'note':'@csentence(10)'
}
],'totalPages|2-5':0
})
res.send(s);
})
//distributor_datadict_getAll
router.post('/distributor/datadict/getAll',function(req,res,next){
/*var s=Mock.mock({
'errorCode':'0',
'id|100-200':0
})*/
//res.send(s);
client.post(api.distributor_datadict_getAll, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//distributor_datadict_delDict
router.post('/distributor/datadict/delDict',function(req,res,next){
client.post(api.distributor_datadict_delDict, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//distributor_datadict_addDict
router.post('/distributor/datadict/addDict',function(req,res,next){
client.post(api.distributor_datadict_addDict, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
router.post('/distributor/datadict/updateDict',function(req,res,next){
client.post(api.distributor_datadict_updateDict, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
// 开通恋链 查询
router.post('/getcsbr20sup',function(req,res,next){
client.post(api.distributor_datadict_getcsbr20sup, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
// 开通恋链 启用
router.post('/synccsbr20sup',function(req,res,next){
client.post(api.distributor_datadict_synccsbr20sup, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
// 开通恋链 关闭
router.post('/closecsbr20sup',function(req,res,next){
client.post(api.distributor_datadict_closecsbr20sup, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//系统参数
//distributor_sysparam_getAll
router.post('/distributor/sysparam/getAll',function(req,res,next){
client.post(api.distributor_sysparam_getAll, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//distributor_sysparam_updateParam
router.post('/distributor/sysparam/updateParam',function(req,res,next){
client.post(api.distributor_sysparam_updateParam, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//distributor_sysparam_delParam
router.post('/distributor/sysparam/delParam',function(req,res,next){
client.post(api.distributor_sysparam_delParam, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//distributor_sysparam_addParam
router.post('/distributor/sysparam/addParam',function(req,res,next){
client.post(api.distributor_sysparam_addParam, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//资料指标
//operator_infor_getAllIndexInforList
router.post('/operator/infor/getAllIndexInforList',function(req,res,next){
client.post(api.operator_infor_getAllIndexInforList, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_addIndexInforList
router.post('/operator/infor/addIndexInforList',function(req,res,next){
client.post(api.operator_infor_addIndexInforList, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_delIndexInforList
router.post('/operator/infor/delIndexInforList',function(req,res,next){
client.post(api.operator_infor_delIndexInforList, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_updateIndexInforList
router.post('/operator/infor/updateIndexInforList',function(req,res,next){
client.post(api.operator_infor_updateIndexInforList, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_updateAllIndexInforList
router.post('/operator/infor/updateAllIndexInforList',function(req,res,next){
client.post(api.operator_infor_updateAllIndexInforList, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//属性配置
//operator_infor_getProTabList
router.post('/operator/infor/getProTabList',function(req,res,next){
client.post(api.operator_infor_getProTabList, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_delProTab
router.post('/operator/infor/delProTab',function(req,res,next){
client.post(api.operator_infor_delProTab, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_addProTab
router.post('/operator/infor/addProTab',function(req,res,next){
client.post(api.operator_infor_addProTab, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_getProList
router.post('/operator/infor/getProList',function(req,res,next){
client.post(api.operator_infor_getProList, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_addPro
router.post('/operator/infor/addPro',function(req,res,next){
client.post(api.operator_infor_addPro, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_delPro
router.post('/operator/infor/delPro',function(req,res,next){
client.post(api.operator_infor_delPro, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//右边
router.post('/operator/infor/getLicClassList',function(req,res,next){
client.post(api.operator_infor_getLicClassList, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
router.post('/operator/infor/delLicClass',function(req,res,next){
client.post(api.operator_infor_delLicClass, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
router.post('/operator/infor/addLicClass',function(req,res,next){
client.post(api.operator_infor_addLicClass, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_getLicClassTab
router.post('/operator/infor/getLicClassTab',function(req,res,next){
client.post(api.operator_infor_getLicClassTab, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_setLicClassTab
router.post('/operator/infor/setLicClassTab',function(req,res,next){
client.post(api.operator_infor_setLicClassTab, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_addLicClassCol
router.post('/operator/infor/addLicClassCol',function(req,res,next){
client.post(api.operator_infor_addLicClassCol, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_delLicClassCol
router.post('/operator/infor/delLicClassCol',function(req,res,next){
client.post(api.operator_infor_delLicClassCol, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//operator_infor_getTabLicenseList
router.post('/operator/infor/getTabLicenseList',function(req,res,next){
client.post(api.operator_infor_getTabLicenseList, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
/*异常数据接口start*/
//异常标题列表
router.post('/getAbnormaldetail',function(req,res,next){
client.post(api.operator_abnormal_getAbnormaldetail, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//异常内容列表
router.post('/getAbnormallist',function(req,res,next){
client.post(api.operator_abnormal_getAbnormallist, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//保存新的sql
router.post('/saveMFAbnormalCheck',function(req,res,next){
client.post(api.operator_abnormal_saveMFAbnormalCheck, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//查询sql 列表
router.post('/getMFAbnormalChecklist',function(req,res,next){
client.post(api.operator_abnormal_getMFAbnormalChecklist, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//删除SQL查询
router.post('/deleteMFAbnormalChecklist',function(req,res,next){
client.post(api.operator_abnormal_deleteMFAbnormalChecklist, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
//删除SQL查询
router.post('/getAuditLog',function(req,res,next){
client.post(api.operator_operauditlog_getAuditLog, {data:req.body }, function (data) {
res.send(data);
}, req.session);
})
/*异常数据接口end*/
router.get('/dataIndicators',function(req,res){
var s=Mock.mock({
'data|1-5':[
{
'id|+1':1,
'name':'供应商企业资料',//名称
'status|0-1':0,
'power|0-1':1
}
],'totalPages|2-5':0
})
res.send(s);
})
router.post('/dataIndicators',function(req,res){
var s=Mock.mock({
'errorCode':'0',
'id|100-200':0
})
res.send(s);
})
router.get('/dataIndicatorslist',function(req,res){
var s=Mock.mock({
'data|1-5':[
{
'id|0-999':1,
'name|5-10':'表',//名称
'englishname|5-10':'a'
}
],'totalPages|2-5':0
})
res.send(s);
})
router.get('/dataIndicatorslistb',function(req,res){
var s=Mock.mock({
'data|5-10':[
{
'id|0-999':1,
'status|0-1':0,
'name|5-10':'表',//名称
'englishname|5-10':'a'
}
],'totalPages|2-5':0
})
res.send(s);
})
router.get('/dataadminSupplierAuditor',function(req,res){
var s=Mock.mock({
'data|5-10':[
{
'id|0-999':0,
'status|0':0,
'note':'',
'date':'@datetime()',
'company':'@csentence(10)',
'province':"@province",//省
'city':"@city()",
'county':"@county()",//区
'address':"@csentence(20)",
'adminname':'@string(10)',
'name':'@cname()',
'tel':/\d{11}/,
'email':'@email()'
}
],'totalPages|2-5':0
})
res.send(s);
})
//operator_sysparam_findmed
router.get('/getfindmed', function(req, res, next) {
client.get(api.operator_sysparam_findmed, { }, function (data) { res.send(data); }, req.session);
});
module.exports = router;