lsc 9 months ago
parent
commit
59a8a8ddd1
1 changed files with 67 additions and 0 deletions
  1. 67 0
      pbl.js

+ 67 - 0
pbl.js

@@ -1391,6 +1391,42 @@ router.route("/addWorkNew2AI2").all((req, res, next) => {
     }
 });
 
+router.route("/addWorkNew2AI3").all((req, res, next) => {
+    if (req.body[0]) {
+        p = [
+            req.body[0].uid,
+            req.body[0].title,
+            req.body[0].brief,
+            req.body[0].cover,
+            req.body[0].evaId,
+            req.body[0].astudent,
+            req.body[0].see,
+            req.body[0].chapters,
+            req.body[0].template,
+            req.body[0].ateacher,
+            req.body[0].refile,
+            req.body[0].reBrief,
+            req.body[0].cpote,
+            req.body[0].setting,
+            req.body[0].iresearch,
+        ];
+        p.unshift(_mysqlLabor[0], _mysqlLabor[1], "insert_teacher_work_new2_ai3"); //執行存儲過程
+        mysql.usselect(p, function(ret) {
+            let course = req.body[0].courseType;
+            let courseId = ret[0][0].courseId;
+            let userid = req.body[0].uid;
+            delCourseType(course, courseId, userid);
+            res.end(
+                JSON.stringify({
+                    ordernumber: ret[0][0].ordernumber,
+                    courseId: ret[0][0].courseId,
+                    success: 1,
+                })
+            );
+        });
+    }
+});
+
 
 router.route("/addWorkNew2New").all((req, res, next) => {
     if (req.body[0]) {
@@ -2120,6 +2156,37 @@ router.route("/updateWorkNew2AI2").all((req, res, next) => {
     }
 });
 
+router.route("/updateWorkNew2AI3").all((req, res, next) => {
+    if (req.body[0]) {
+        p = [
+            req.body[0].cid,
+            req.body[0].title,
+            req.body[0].brief,
+            req.body[0].cover,
+            req.body[0].evaId,
+            req.body[0].astudent,
+            req.body[0].see,
+            req.body[0].chapters,
+            req.body[0].template,
+            req.body[0].ateacher,
+            req.body[0].refile,
+            req.body[0].reBrief,
+            req.body[0].cpote,
+            req.body[0].setting,
+            req.body[0].iresearch,
+        ];
+        p.unshift(_mysqlLabor[0], _mysqlLabor[1], "update_teacher_work_new2_ai3"); //執行存儲過程
+        mysql.usselect(p, function(ret) {
+            let course = req.body[0].courseType;
+            let courseId = req.body[0].cid;
+            let userid = req.body[0].uid;
+            delCourseType(course, courseId, userid);
+            res.end(JSON.stringify({ success: 1 }));
+        });
+    }
+});
+
+
 router.route("/updateWorkNew2New").all((req, res, next) => {
     if (req.body[0]) {
         p = [