Quellcode durchsuchen

Merge branch 'pre'

dzx vor 1 Jahr
Ursprung
Commit
c55f26cf38

+ 2 - 2
src/main/java/com/xjrsoft/module/job/AttenDanceWarnNoticeTask.java

@@ -63,7 +63,7 @@ public class AttenDanceWarnNoticeTask {
 
     @Scheduled(cron = "0 */1 * * * ?")
     public void execute(){
-        //RefreshConnectionPool();
+        RefreshConnectionPool();
     }
     public void RefreshConnectionPool() {
         String active = SpringUtil.getActiveProfile();
@@ -131,7 +131,7 @@ public class AttenDanceWarnNoticeTask {
             return;
         }
         long minute = Math.abs(ChronoUnit.MINUTES.between(now, recentlyTime));
-        if(now.isAfter(recentlyTime) || minute >= 1){
+        if(minute >= 1){
             log.info("未到时间,不进行推送");
             return;
         }

+ 1 - 1
src/main/java/com/xjrsoft/module/schedule/util/ScheduleUtil.java

@@ -160,7 +160,7 @@ public class ScheduleUtil {
         Map<Integer, Integer> map = new HashMap<>();
         map.put(2, 1);
         map.put(3, 2);
-        map.put(5, 3);
+        map.put(4, 3);
         return map;
     }
 

+ 3 - 0
src/main/java/com/xjrsoft/module/student/controller/BaseStudentDevelopmentController.java

@@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -77,6 +78,7 @@ public class BaseStudentDevelopmentController {
     @SaCheckPermission("basestudentdevelopment:add")
     public RT<Boolean> add(@Valid @RequestBody AddBaseStudentDevelopmentDto dto){
         BaseStudentDevelopment baseStudentDevelopment = BeanUtil.toBean(dto, BaseStudentDevelopment.class);
+        baseStudentDevelopment.setCreateDate(new Date());
         boolean isSuccess = developmentService.save(baseStudentDevelopment);
         return RT.ok(isSuccess);
     }
@@ -87,6 +89,7 @@ public class BaseStudentDevelopmentController {
     public RT<Boolean> update(@Valid @RequestBody UpdateBaseStudentDevelopmentDto dto){
 
         BaseStudentDevelopment baseStudentDevelopment = BeanUtil.toBean(dto, BaseStudentDevelopment.class);
+        baseStudentDevelopment.setModifyDate(new Date());
         return RT.ok(developmentService.updateById(baseStudentDevelopment));
 
     }

+ 3 - 3
src/main/java/com/xjrsoft/module/student/dto/AddBaseStudentDevelopmentDto.java

@@ -53,8 +53,8 @@ public class AddBaseStudentDevelopmentDto implements Serializable {
     /**
     * 是否灵活就业(1:是 0:否)
     */
-    @ApiModelProperty("是否灵活就业(1:是 0:否)")
-    private Integer workContent;
+    @ApiModelProperty("工作内容")
+    private String workContent;
     /**
     * 是否校企合作单位(1:是 0:否)
     */
@@ -64,7 +64,7 @@ public class AddBaseStudentDevelopmentDto implements Serializable {
     * 企合作单位(company_coop),是校企合作单位
     */
     @ApiModelProperty("企合作单位(company_coop),是校企合作单位")
-    private Integer companyCoopId;
+    private Long companyCoopId;
     /**
     * 就业单位名称(非校企合作单位)
     */

+ 46 - 0
src/test/java/com/xjrsoft/module/form/service/impl/FormExecuteServiceImplTest.java

@@ -0,0 +1,46 @@
+package com.xjrsoft.module.form.service.impl;
+
+import cn.hutool.db.Entity;
+import com.xjrsoft.XjrSoftApplication;
+import com.xjrsoft.common.mybatis.SqlRunnerAdapter;
+import org.junit.jupiter.api.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+
+/**
+ * @author dzx
+ * @date 2024/8/8
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = XjrSoftApplication.class)
+class FormExecuteServiceImplTest {
+
+    @Test
+    void test(){
+        Map<String, Object> toSaveFormData = new HashMap<>();
+        toSaveFormData.put("shen_qing_ri_qi4752", "2024-08-08 11:20:54");
+        toSaveFormData.put("user_id", "14954803038533");
+        toSaveFormData.put("total_amount", "29131");
+        toSaveFormData.put("application_department", "1684107782861680030");
+        toSaveFormData.put("status", "0");
+        String tableName = "wf_subscription";
+
+        Entity where = Entity.create(tableName).set("id", "1821405513673912320");
+        where.putAll(toSaveFormData);
+        Entity findwhere = Entity.create(tableName);
+        findwhere.putAll(where);
+        findwhere.putAll(toSaveFormData);
+        Map<String, Object> objectMap = SqlRunnerAdapter.db().dynamicSelectOne(tableName, findwhere);
+        Boolean isUpdate = false;
+        if(objectMap == null){
+            isUpdate = true;
+        }
+        System.out.println("isUpdate:" + isUpdate);
+    }
+}

+ 14 - 3
src/test/java/com/xjrsoft/module/job/JianyuekbScheduleTaskTest.java

@@ -2,6 +2,8 @@ package com.xjrsoft.module.job;
 
 import cn.hutool.extra.spring.SpringUtil;
 import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
 import com.xjrsoft.XjrSoftApplication;
 import com.xjrsoft.common.mybatis.SqlRunnerAdapter;
 import com.xjrsoft.module.schedule.entity.CourseReceiveMsg;
@@ -38,7 +40,7 @@ class JianyuekbScheduleTaskTest {
         if(!"prod".equals(active)){
             return;
         }
-        String sql = "SELECT * FROM course_receive_msg WHERE delete_mark = 0 AND is_callback IS NULL";
+        String sql = "SELECT * FROM course_receive_msg WHERE delete_mark = 0 AND id in (1821034023531098114,1821034021123567617)";
         List<Map<String, Object>> receiveMsgs = SqlRunnerAdapter.db().selectList(sql, CourseReceiveMsg.class);
         for (Map<String, Object> receiveMsg : receiveMsgs) {
             String updSql = "update course_receive_msg set is_callback = 0 where id = " + receiveMsg.get("id").toString();
@@ -110,9 +112,18 @@ class JianyuekbScheduleTaskTest {
                 JsonArray scheduleInfo = dataUtil.getScheduleInfoByGrade(eduYearSerialNo, startDate, endDate);
                 allScheduleInfo.addAll(scheduleInfo);
             }
+            Map<String, Integer> courseTable = new HashMap<>();
+            for (JsonElement jsonElement : allScheduleInfo) {
+                JsonObject object = jsonElement.getAsJsonObject();
+                courseTable.put(object.get("courseClassName").getAsString(), object.get("timeOption").getAsInt());
+            }
+
+            for (String key : courseTable.keySet()) {
+                System.out.println(key+" ----> " + courseTable.get(key));
+            }
 
-            dataUtil.insertCourseTableEntiy(allScheduleInfo, classroomMap, courseMap, semesterMap, teacherMap, classMap);
-            dataUtil.insertClassTime(allScheduleInfo);
+            //dataUtil.insertCourseTableEntiy(allScheduleInfo, classroomMap, courseMap, semesterMap, teacherMap, classMap);
+            //dataUtil.insertClassTime(allScheduleInfo);
         } catch (Exception e) {
         }
     }