Explorar o código

短信、教材等脚本

cehn hai 4 meses
pai
achega
aeac5810c3

+ 2 - 2
projects/textbook/src/modules/nav-admin/page-process/process-list/process-list.component.html

@@ -20,7 +20,7 @@
         </button>
       }
 
-      <button
+      <!-- <button
         style="background: #c6233f; border: 1px #c6233f"
         *nzSpaceItem
         nz-button
@@ -28,7 +28,7 @@
         (click)="sendNoticeMSG()"
       >
         批量提醒
-      </button>
+      </button> -->
       <button
         style="background: #3e49b3; border: 1px #3e49b3"
         *nzSpaceItem

+ 30 - 11
projects/textbook/src/services/textbook.ts

@@ -437,7 +437,24 @@ export class textbookServer {
   //导出表格
   async exportEduTextbook() {
     try {
-      let query = new Parse.Query('EduTextbook');
+      let queryParams: any = {
+        where: {
+          $or: [
+            {
+              childrens: {
+                $inQuery: {
+                  where: {
+                    "editionUnit": '高等教育出版社',
+                  },
+                  className: 'EduTextbookVolume',
+                }
+              },
+            },
+          ],
+        },
+      };
+      let query = Parse.Query.fromJSON('EduTextbook', queryParams);
+      // let query = new Parse.Query('EduTextbook');
       query.notEqualTo('isDeleted', true);
       query.notEqualTo('discard', true);
       query.equalTo('render', true);
@@ -457,14 +474,14 @@ export class textbookServer {
         // 'eduProcess.profileSubmitted.user.name',
         // 'eduProcess.profileSubmitted.user.phone'
       );
-      query.containedIn('status', ['102', '103', '200', '201', '400']);
-      // query.containedIn('status',['400'])
+      // query.containedIn('status', ['102', '103', '200', '201', '400']);
+      query.containedIn('status',['400'])
       // query.containedIn('objectId',updateDept.list5)
       query.ascending('createdAt');
       let count = await query.count();
       console.log(count);
       query.limit(2000);
-      query.skip(2000);
+      query.skip(0);
       let data = await query.find();
       let table = `<table border="1px" cellspacing="0" cellpadding="0">
           <thead>
@@ -644,7 +661,7 @@ export class textbookServer {
     //   });
     // })
 
-    return
+    // return
     let queryParams: any = {
       where: {
         $or: [
@@ -674,12 +691,14 @@ export class textbookServer {
       }
     })
     let unitPhoneArr = Array.from(unitPhoneList)
-    // Parse.Cloud.run('aliSmsSend', {
-    //   mobileList: [unitPhoneArr],
-    //   templateCode: 'SMS_474290139',
-    //   params: {end_date:'2024-10-20 16:00'},
-    //   signName: '普通高等教育教材网',
-    // });
+    unitPhoneArr.push(...['13581837652','13407973043','18510409671'])
+    
+    Parse.Cloud.run('aliSmsSend', {
+      mobileList: [unitPhoneArr],
+      templateCode: 'SMS_474290139',
+      params: {end_date:'2024-10-20 16:00'},
+      signName: '普通高等教育教材网',
+    });
     console.log('出版社电话:',unitPhoneArr);
     
   }