|
@@ -2333,7 +2333,29 @@ router.route('/deleteEvaluation').all((req, res, next) => {
|
|
|
postmysql(req, res, "delete_evaluation");
|
|
|
// id评价id
|
|
|
});
|
|
|
-
|
|
|
+//批量添加学校
|
|
|
+router.route('/batchRegistrationSchool').post(function(req, res, next) {
|
|
|
+ let users = req.body[0];
|
|
|
+ let arr = JSON.parse(req.body[0].arr);
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ let _school = arr[i].school;
|
|
|
+ let _org = users.org;
|
|
|
+ //用戶數據
|
|
|
+ let _ata = [
|
|
|
+ _school,
|
|
|
+ _org,
|
|
|
+ '',
|
|
|
+ '',
|
|
|
+ '',
|
|
|
+ ];
|
|
|
+ //參數拼接,註冊
|
|
|
+ _userdata.unshift(_mysqluser[0], _mysqluser[1], "insertSchoolByOrg");
|
|
|
+ //用戶註冊處理
|
|
|
+ mysql.usselect(_userdata, function(ret) {
|
|
|
+ res.end(JSON.stringify({ success: 1 }));
|
|
|
+ });
|
|
|
+ }
|
|
|
+});
|
|
|
//批量添加学生
|
|
|
router.route('/batchRegistrationMore').post(function(req, res, next) {
|
|
|
let users = req.body[0];
|