ソースを参照

Merge branch 'master' of http://git.dayaedu.com/yonge/edu-saas

zouxuan 5 年 前
コミット
d4268a21dc
33 ファイル変更545 行追加154 行削除
  1. 7 0
      edu-auth/edu-auth-api/pom.xml
  2. 11 0
      edu-auth/edu-auth-api/src/main/java/com/keao/edu/auth/api/client/SysMessageFeignService.java
  3. 10 0
      edu-auth/edu-auth-api/src/main/java/com/keao/edu/auth/api/client/fallback/SysMessageFeignServiceFallback.java
  4. 109 0
      edu-auth/edu-auth-api/src/main/java/com/keao/edu/auth/api/entity/SysMessageParams.java
  5. 1 1
      edu-auth/edu-auth-server/src/main/java/com/keao/edu/auth/service/SysMessageService.java
  6. 37 0
      edu-auth/edu-auth-server/src/main/java/com/keao/edu/auth/web/controller/SysMessageController.java
  7. 104 98
      edu-thirdparty/pom.xml
  8. 29 0
      edu-thirdparty/src/main/java/com/keao/edu/thirdparty/ocr/Ocr.java
  9. 16 5
      edu-user/edu-user-client-api/src/main/java/com/keao/edu/user/api/entity/ExamRoom.java
  10. 1 1
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/config/ResourceServerConfig.java
  11. 6 3
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamLocationController.java
  12. 1 1
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamOrganizationRelationController.java
  13. 15 0
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamRegistrationController.java
  14. 2 2
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamSongController.java
  15. 10 0
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/dao/ExamRoomStudentRelationDao.java
  16. 12 1
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/dao/ExamTeacherSalaryDao.java
  17. 12 1
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/ExamSong.java
  18. 3 3
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/page/ExamLocationQueryInfo.java
  19. 9 0
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/ExamTeacherSalaryService.java
  20. 2 0
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/SysConfigService.java
  21. 26 5
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamOrganizationRelationServiceImpl.java
  22. 3 3
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamRoomServiceImpl.java
  23. 26 1
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamSongServiceImpl.java
  24. 36 2
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamTeacherSalaryServiceImpl.java
  25. 8 3
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ShortUrlServiceImpl.java
  26. 1 1
      edu-user/edu-user-server/src/main/resources/application.yml
  27. 3 3
      edu-user/edu-user-server/src/main/resources/config/mybatis/ExamLocationMapper.xml
  28. 16 9
      edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRoomMapper.xml
  29. 13 1
      edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRoomStudentRelationMapper.xml
  30. 11 8
      edu-user/edu-user-server/src/main/resources/config/mybatis/ExamSongMapper.xml
  31. 3 0
      edu-user/edu-user-server/src/main/resources/config/mybatis/ExamTeacherSalaryMapper.xml
  32. 1 1
      edu-user/edu-user-server/src/main/resources/config/mybatis/ExaminationBasicMapper.xml
  33. 1 1
      edu-util/src/main/java/com/keao/edu/util/string/MessageFormatter.java

+ 7 - 0
edu-auth/edu-auth-api/pom.xml

@@ -30,5 +30,12 @@
 				</exclusion>
 			</exclusions>
 		</dependency>
+
+		<dependency>
+			<groupId>com.keao.edu</groupId>
+			<artifactId>edu-thirdparty</artifactId>
+			<version>1.0</version>
+			<scope>compile</scope>
+		</dependency>
 	</dependencies>
 </project>

+ 11 - 0
edu-auth/edu-auth-api/src/main/java/com/keao/edu/auth/api/client/SysMessageFeignService.java

@@ -1,10 +1,21 @@
 package com.keao.edu.auth.api.client;
 
 import com.keao.edu.auth.api.client.fallback.SysMessageFeignServiceFallback;
+import com.keao.edu.auth.api.entity.SysMessageParams;
 import com.keao.edu.common.config.FeignConfiguration;
+import com.keao.edu.common.enums.MessageTypeEnum;
+import com.keao.edu.thirdparty.message.MessageSenderPluginContext;
 import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+
+import java.util.Date;
+import java.util.Map;
 
 @FeignClient(contextId = "SysMessageFeignService", name = "auth-server", configuration = { FeignConfiguration.class }, fallback = SysMessageFeignServiceFallback.class)
 public interface SysMessageFeignService {
 
+
+    @GetMapping(value = "sysMessage/batchSendMessage", consumes = MediaType.APPLICATION_JSON_VALUE)
+    void batchSendMessage(SysMessageParams sysMessageParams);
 }

+ 10 - 0
edu-auth/edu-auth-api/src/main/java/com/keao/edu/auth/api/client/fallback/SysMessageFeignServiceFallback.java

@@ -1,9 +1,19 @@
 package com.keao.edu.auth.api.client.fallback;
 
 import com.keao.edu.auth.api.client.SysMessageFeignService;
+import com.keao.edu.auth.api.entity.SysMessageParams;
+import com.keao.edu.common.enums.MessageTypeEnum;
+import com.keao.edu.thirdparty.message.MessageSenderPluginContext;
 import org.springframework.stereotype.Component;
 
+import java.util.Date;
+import java.util.Map;
+
 @Component
 public class SysMessageFeignServiceFallback implements SysMessageFeignService {
 
+    @Override
+    public void batchSendMessage(SysMessageParams sysMessageParams) {
+
+    }
 }

+ 109 - 0
edu-auth/edu-auth-api/src/main/java/com/keao/edu/auth/api/entity/SysMessageParams.java

@@ -0,0 +1,109 @@
+package com.keao.edu.auth.api.entity;
+
+import com.keao.edu.common.enums.MessageTypeEnum;
+import com.keao.edu.thirdparty.message.MessageSenderPluginContext;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author Joburgess
+ * @Date 2020.07.02
+ */
+public class SysMessageParams {
+
+    private MessageSenderPluginContext.MessageSender messageSender;
+
+    private MessageTypeEnum messageType;
+
+    private Map<Integer, String> receivers;
+
+    private Date triggerTime;
+
+    private Integer readStatus;
+
+    private String url;
+
+    private String jpushType;
+
+    private Object[] args;
+
+    public SysMessageParams() {
+    }
+
+    public SysMessageParams(MessageSenderPluginContext.MessageSender messageSender, MessageTypeEnum messageType, Map<Integer, String> receivers, Date triggerTime, Integer readStatus, String url, String jpushType, Object... args) {
+        this.messageSender = messageSender;
+        this.messageType = messageType;
+        this.receivers = receivers;
+        this.triggerTime = triggerTime;
+        this.readStatus = readStatus;
+        this.url = url;
+        this.jpushType = jpushType;
+        this.args = args;
+    }
+
+    public MessageSenderPluginContext.MessageSender getMessageSender() {
+        return messageSender;
+    }
+
+    public void setMessageSender(MessageSenderPluginContext.MessageSender messageSender) {
+        this.messageSender = messageSender;
+    }
+
+    public MessageTypeEnum getMessageType() {
+        return messageType;
+    }
+
+    public void setMessageType(MessageTypeEnum messageType) {
+        this.messageType = messageType;
+    }
+
+    public Map<Integer, String> getReceivers() {
+        return receivers;
+    }
+
+    public void setReceivers(Map<Integer, String> receivers) {
+        this.receivers = receivers;
+    }
+
+    public Date getTriggerTime() {
+        return triggerTime;
+    }
+
+    public void setTriggerTime(Date triggerTime) {
+        this.triggerTime = triggerTime;
+    }
+
+    public Integer getReadStatus() {
+        return readStatus;
+    }
+
+    public void setReadStatus(Integer readStatus) {
+        this.readStatus = readStatus;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getJpushType() {
+        return jpushType;
+    }
+
+    public void setJpushType(String jpushType) {
+        this.jpushType = jpushType;
+    }
+
+    public Object[] getArgs() {
+        return args;
+    }
+
+    public void setArgs(Object[] args) {
+        this.args = args;
+    }
+}

+ 1 - 1
edu-auth/edu-auth-server/src/main/java/com/keao/edu/auth/service/SysMessageService.java

@@ -150,4 +150,4 @@ public interface SysMessageService extends BaseService<Long, SysMessage> {
 	 * @param content
 	 */
 	void sendNoAuthPrivateMessage(String sender, String receiver, String content);
-}
+}

+ 37 - 0
edu-auth/edu-auth-server/src/main/java/com/keao/edu/auth/web/controller/SysMessageController.java

@@ -0,0 +1,37 @@
+package com.keao.edu.auth.web.controller;
+
+import com.keao.edu.auth.api.entity.SysMessageParams;
+import com.keao.edu.auth.service.SysMessageService;
+import com.keao.edu.common.controller.BaseController;
+import com.keao.edu.common.enums.MessageTypeEnum;
+import com.keao.edu.thirdparty.message.MessageSenderPluginContext;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Author Joburgess
+ * @Date 2020.07.02
+ */
+@RestController
+@RequestMapping("sysMessage")
+@Api(tags = "消息推送服务")
+public class SysMessageController extends BaseController {
+
+    @Autowired
+    private SysMessageService sysMessageService;
+
+    @ApiOperation(value = "发送消息")
+    @PostMapping(value = "/batchSendMessage")
+    public void batchSendMessage(@RequestBody SysMessageParams sysMessageParams){
+        sysMessageService.batchSendMessage(sysMessageParams.getMessageSender(), sysMessageParams.getMessageType(), sysMessageParams.getReceivers(),
+                sysMessageParams.getTriggerTime(), sysMessageParams.getReadStatus(), sysMessageParams.getUrl(), sysMessageParams.getJpushType(),
+                sysMessageParams.getArgs());
+    }
+
+}

+ 104 - 98
edu-thirdparty/pom.xml

@@ -1,102 +1,108 @@
 <?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>com.keao.edu</groupId>
-    <artifactId>edu-saas</artifactId>
-    <version>1.0</version>
-  </parent>
-  <artifactId>edu-thirdparty</artifactId>
-  <name>edu-thirdparty</name>
-  <url>http://maven.apache.org</url>
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-  <dependencies>
-      <dependency>
-          <groupId>org.springframework</groupId>
-          <artifactId>spring-context</artifactId>
-          <scope>compile</scope>
-      </dependency>
-      <dependency>
-        <groupId>com.aliyun.oss</groupId>
-        <artifactId>aliyun-sdk-oss</artifactId>
-        <version>2.8.3</version>
-      </dependency>
-    <dependency>
-      <groupId>com.keao.edu</groupId>
-      <artifactId>edu-util</artifactId>
-    </dependency>
-		
-		<dependency>
-			<groupId>com.timevale</groupId>
-			<artifactId>tech-sdk</artifactId>
-			<version>2.1.20</version>
-			<scope>system</scope>
-			<systemPath>${project.basedir}/libs/tech-sdk-2.1.20.jar</systemPath>
-		</dependency>
-		
-		<dependency>
-			<groupId>com.timevale</groupId>
-			<artifactId>smUtil</artifactId>
-			<version>1.0</version>
-			<scope>system</scope>
-			<systemPath>${project.basedir}/libs/smUtil-1.0.jar</systemPath>
-		</dependency>
-		
-		<dependency>
-			<groupId>com.timevale</groupId>
-			<artifactId>tgtext</artifactId>
-			<version>3.2.14</version>
-			<scope>system</scope>
-			<systemPath>${project.basedir}/libs/tgtext-3.2.14.jar</systemPath>
-		</dependency>
-		
-		<dependency>
-			<groupId>com.timevale</groupId>
-			<artifactId>utils</artifactId>
-			<version>3.0.6</version>
-			<scope>system</scope>
-			<systemPath>${project.basedir}/libs/utils-3.0.6.jar</systemPath>
-		</dependency>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.keao.edu</groupId>
+        <artifactId>edu-saas</artifactId>
+        <version>1.0</version>
+    </parent>
+    <artifactId>edu-thirdparty</artifactId>
+    <name>edu-thirdparty</name>
+    <url>http://maven.apache.org</url>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>2.8.3</version>
+        </dependency>
+        <dependency>
+            <groupId>com.keao.edu</groupId>
+            <artifactId>edu-util</artifactId>
+        </dependency>
 
-		<dependency>
-			<groupId>cfca.sadk</groupId>
-			<artifactId>cfca.sadk</artifactId>
-			<version>1.0.0</version>
-			<scope>system</scope>
-			<systemPath>${project.basedir}/libs/SADK-3.2.5.2.jar</systemPath>
-		</dependency>
-		<dependency>
-			<groupId>adapay</groupId>
-			<artifactId>adapay-java-sdk</artifactId>
-			<version>1.0.2</version>
-			<scope>system</scope>
-			<systemPath>${project.basedir}/libs/adapay-java-sdk-1.0.2.jar
-			</systemPath>
-		</dependency>
-		<dependency>
-			<groupId>org.eclipse.paho</groupId>
-			<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
-			<version>1.2.0</version>
-		</dependency>
+        <dependency>
+            <groupId>com.timevale</groupId>
+            <artifactId>tech-sdk</artifactId>
+            <version>2.1.20</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/libs/tech-sdk-2.1.20.jar</systemPath>
+        </dependency>
 
-		<dependency>
-			<groupId>org.springframework.cloud</groupId>
-			<artifactId>spring-cloud-starter-openfeign</artifactId>
-		</dependency>
-		<!-- https://mvnrepository.com/artifact/io.github.openfeign.form/feign-form-spring -->
-		<dependency>
-			<groupId>io.github.openfeign.form</groupId>
-			<artifactId>feign-form-spring</artifactId>
-			<version>2.0.5</version>
-		</dependency>
-		<!-- https://mvnrepository.com/artifact/io.github.openfeign.form/feign-form-spring -->
-		<dependency>
-			<groupId>io.github.openfeign.form</groupId>
-			<artifactId>feign-form-spring</artifactId>
-			<version>2.0.5</version>
-		</dependency>
-  </dependencies>
+        <dependency>
+            <groupId>com.timevale</groupId>
+            <artifactId>smUtil</artifactId>
+            <version>1.0</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/libs/smUtil-1.0.jar</systemPath>
+        </dependency>
+
+        <dependency>
+            <groupId>com.timevale</groupId>
+            <artifactId>tgtext</artifactId>
+            <version>3.2.14</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/libs/tgtext-3.2.14.jar</systemPath>
+        </dependency>
+
+        <dependency>
+            <groupId>com.timevale</groupId>
+            <artifactId>utils</artifactId>
+            <version>3.0.6</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/libs/utils-3.0.6.jar</systemPath>
+        </dependency>
+
+        <dependency>
+            <groupId>cfca.sadk</groupId>
+            <artifactId>cfca.sadk</artifactId>
+            <version>1.0.0</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/libs/SADK-3.2.5.2.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>adapay</groupId>
+            <artifactId>adapay-java-sdk</artifactId>
+            <version>1.0.2</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/libs/adapay-java-sdk-1.0.2.jar
+            </systemPath>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.paho</groupId>
+            <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
+            <version>1.2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/io.github.openfeign.form/feign-form-spring -->
+        <dependency>
+            <groupId>io.github.openfeign.form</groupId>
+            <artifactId>feign-form-spring</artifactId>
+            <version>2.0.5</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/io.github.openfeign.form/feign-form-spring -->
+        <dependency>
+            <groupId>io.github.openfeign.form</groupId>
+            <artifactId>feign-form-spring</artifactId>
+            <version>2.0.5</version>
+        </dependency>
+        <dependency>
+            <groupId>com.baidu.aip</groupId>
+            <artifactId>java-sdk</artifactId>
+            <version>4.12.0</version>
+        </dependency>
+    </dependencies>
 </project>

+ 29 - 0
edu-thirdparty/src/main/java/com/keao/edu/thirdparty/ocr/Ocr.java

@@ -0,0 +1,29 @@
+package com.keao.edu.thirdparty.ocr;
+
+import com.baidu.aip.ocr.AipOcr;
+import org.json.JSONObject;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+
+public class Ocr {
+
+    public static final String APP_ID = "20569335";
+    public static final String API_KEY = "82FCqipUDtTqmy2qbrCRaHCo";
+    public static final String SECRET_KEY = "ab6QZclNrzzX1Hw8uQ05n787euLq7KXX";
+
+    public static JSONObject idcard(MultipartFile file, String idCardSide) throws IOException {
+        // 初始化一个AipOcr
+        AipOcr client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
+
+        // 可选:设置网络连接参数
+        client.setConnectionTimeoutInMillis(2000);
+        client.setSocketTimeoutInMillis(60000);
+        // 调用接口
+        byte[] imgBytes = file.getBytes();
+        JSONObject res = client.idcard(imgBytes, idCardSide, null);
+        return res;
+    }
+
+
+}

+ 16 - 5
edu-user/edu-user-client-api/src/main/java/com/keao/edu/user/api/entity/ExamRoom.java

@@ -31,7 +31,9 @@ public class ExamRoom {
 	private String assistantTeacherUserIdList;
 	
 	/** 考试时间 */
-	private Date examTime;
+	private Date examStartTime;
+
+	private Date examEndTime;
 
 	private Integer organId;
 
@@ -137,12 +139,21 @@ public class ExamRoom {
 		return this.updateTime;
 	}
 
-	public Date getExamTime() {
-		return examTime;
+
+	public Date getExamStartTime() {
+		return examStartTime;
+	}
+
+	public void setExamStartTime(Date examStartTime) {
+		this.examStartTime = examStartTime;
+	}
+
+	public Date getExamEndTime() {
+		return examEndTime;
 	}
 
-	public void setExamTime(Date examTime) {
-		this.examTime = examTime;
+	public void setExamEndTime(Date examEndTime) {
+		this.examEndTime = examEndTime;
 	}
 
 	public YesOrNoEnum getExamPlanPushFlag() {

+ 1 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/config/ResourceServerConfig.java

@@ -25,7 +25,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
 	@Override
 	public void configure(HttpSecurity http) throws Exception {
 		http.authorizeRequests()
-				.antMatchers("/v2/api-docs", "/su/**","/student/apply")
+				.antMatchers("/v2/api-docs", "/su/**","/student/apply","/examRegistration/ocr")
 				.permitAll()
 				.anyRequest().authenticated().and().csrf().disable().exceptionHandling().accessDeniedHandler(baseAccessDeniedHandler)
 				.authenticationEntryPoint(baseAuthenticationEntryPoint).and();

+ 6 - 3
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamLocationController.java

@@ -4,8 +4,10 @@ import com.keao.edu.common.controller.BaseController;
 import com.keao.edu.common.entity.HttpResponseResult;
 import com.keao.edu.common.page.PageInfo;
 import com.keao.edu.common.page.QueryInfo;
+import com.keao.edu.common.tenant.TenantContextHolder;
 import com.keao.edu.user.entity.ExamLocation;
 import com.keao.edu.user.entity.ExamSong;
+import com.keao.edu.user.page.ExamLocationQueryInfo;
 import com.keao.edu.user.service.ExamLocationService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -29,7 +31,7 @@ public class ExamLocationController extends BaseController {
 
     @ApiOperation("分页查询")
     @GetMapping(value = "/list")
-    public HttpResponseResult<PageInfo<ExamLocation>> getList(QueryInfo queryInfo) {
+    public HttpResponseResult<PageInfo<ExamLocation>> getList(ExamLocationQueryInfo queryInfo) {
         return succeed(examLocationService.queryPage(queryInfo));
     }
 
@@ -43,6 +45,7 @@ public class ExamLocationController extends BaseController {
     @ApiOperation("新增考点")
     @PostMapping(value = "/add")
     public HttpResponseResult add(ExamLocation examLocation) {
+        examLocation.setTenantId(TenantContextHolder.getTenantId().toString());
         examLocationService.insert(examLocation);
         return succeed();
     }
@@ -56,8 +59,8 @@ public class ExamLocationController extends BaseController {
     }
 
     @ApiOperation("删除考点")
-    @PostMapping(value = "/del/{id}")
-    public HttpResponseResult add(@PathVariable("id") Integer id) {
+    @PostMapping(value = "/del")
+    public HttpResponseResult add(Integer id) {
         return succeed(examLocationService.delete(id));
     }
 

+ 1 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamOrganizationRelationController.java

@@ -50,7 +50,7 @@ public class ExamOrganizationRelationController extends BaseController {
     }
 
     @ApiOperation("发送考级报名链接")
-    @GetMapping(value = "/sendUrl")
+    @PostMapping(value = "/sendUrl")
     public HttpResponseResult sendUrl(Integer examId, String organIds){
         examOrganizationRelationService.sendUrl(examId, organIds);
         return succeed();

+ 15 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamRegistrationController.java

@@ -5,16 +5,21 @@ import com.keao.edu.auth.api.entity.SysUser;
 import com.keao.edu.common.controller.BaseController;
 import com.keao.edu.common.entity.HttpResponseResult;
 import com.keao.edu.common.page.PageInfo;
+import com.keao.edu.thirdparty.ocr.Ocr;
 import com.keao.edu.user.dto.ExamRegistrationStatisticsDto;
 import com.keao.edu.user.entity.ExamRegistration;
 import com.keao.edu.user.page.ExamRegistrationQueryInfo;
 import com.keao.edu.user.service.ExamRegistrationService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.IOException;
 import java.util.Objects;
 
 /**
@@ -68,4 +73,14 @@ public class ExamRegistrationController extends BaseController {
         return succeed(examRegistrationService.getExamRegistrationStaticsInfo(sysUser.getId(), examId));
     }
 
+
+    @ApiOperation(value = "ocr")
+    @PostMapping(value = "ocr")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "file", value = "身份证图片", required = true, dataType = "file"),
+            @ApiImplicitParam(name = "idCardSide", value = "身份证(front-人像面 back-国徽面)", required = true, dataType = "String") })
+    public HttpResponseResult ocr(@RequestParam("file") MultipartFile file,String idCardSide) throws IOException {
+        return succeed(Ocr.idcard(file,idCardSide));
+    }
+
+
 }

+ 2 - 2
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamSongController.java

@@ -59,8 +59,8 @@ public class ExamSongController extends BaseController {
     }
 
     @ApiOperation("删除曲库")
-    @PostMapping(value = "/del/{id}")
-    public HttpResponseResult add(@PathVariable("id") Integer id) {
+    @PostMapping(value = "/del")
+    public HttpResponseResult add(Integer id) {
         return succeed(examSongService.delete(id));
     }
 }

+ 10 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/dao/ExamRoomStudentRelationDao.java

@@ -60,4 +60,14 @@ public interface ExamRoomStudentRelationDao extends BaseDAO<Long, ExamRoomStuden
      * @return
      */
     ExamRoomStudentRelation getExamRoomStudentRelation(@Param("basicId") Integer basicId, @Param("roomId") String roomId, @Param("studentId") Integer studentId);
+
+    /**
+     * 获取教室学员关联
+     * @param basicId
+     * @param roomId
+     * @param studentId
+     * @return
+     */
+    List<ExamRoomStudentRelation> getExamRoomStudentRelations(@Param("basicId") Integer basicId, @Param("roomId") String roomId, @Param("studentId") Integer studentId);
+
 }

+ 12 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/dao/ExamTeacherSalaryDao.java

@@ -3,8 +3,19 @@ package com.keao.edu.user.dao;
 
 import com.keao.edu.common.dal.BaseDAO;
 import com.keao.edu.user.entity.ExamTeacherSalary;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface ExamTeacherSalaryDao extends BaseDAO<Long, ExamTeacherSalary> {
 
-	
+    /**
+     * @describe 获取指定考级项目下的老师分润设置
+     * @author Joburgess
+     * @date 2020.07.02
+     * @param examId:
+     * @return java.util.List<com.keao.edu.user.entity.ExamTeacherSalary>
+     */
+    List<ExamTeacherSalary> queryWithExam(@Param("examId") Integer examId);
+
 }

+ 12 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/ExamSong.java

@@ -21,6 +21,9 @@ public class ExamSong {
 	@ApiModelProperty(value = "专业")
 	private String subjectList;
 
+	@ApiModelProperty(value = "专业名称")
+	private String subjectNames;
+
 	@ApiModelProperty(value = "级别")
 	private String levelList;
 
@@ -77,7 +80,15 @@ public class ExamSong {
 	public String getSubjectList(){
 		return this.subjectList;
 	}
-			
+
+	public String getSubjectNames() {
+		return subjectNames;
+	}
+
+	public void setSubjectNames(String subjectNames) {
+		this.subjectNames = subjectNames;
+	}
+
 	public void setLevelList(String levelList){
 		this.levelList = levelList;
 	}

+ 3 - 3
edu-user/edu-user-server/src/main/java/com/keao/edu/user/page/ExamLocationQueryInfo.java

@@ -12,13 +12,13 @@ import javax.management.Query;
 public class ExamLocationQueryInfo extends QueryInfo {
 
     @ApiModelProperty(value = "是否可用")
-    private boolean isAvailable;
+    private Integer isAvailable;
 
-    public boolean isAvailable() {
+    public Integer getIsAvailable() {
         return isAvailable;
     }
 
-    public void setAvailable(boolean available) {
+    public void setIsAvailable(Integer available) {
         isAvailable = available;
     }
 }

+ 9 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/ExamTeacherSalaryService.java

@@ -5,4 +5,13 @@ import com.keao.edu.user.entity.ExamTeacherSalary;
 
 public interface ExamTeacherSalaryService extends BaseService<Long, ExamTeacherSalary> {
 
+    /**
+     * @describe 结算指定考试中教师的薪酬
+     * @author Joburgess
+     * @date 2020.07.01
+     * @param examId:
+     * @return void
+     */
+    void teacherSalarySettlementWithExam(Integer examId);
+
 }

+ 2 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/SysConfigService.java

@@ -6,6 +6,8 @@ import com.keao.edu.common.service.BaseService;
 
 public interface SysConfigService extends BaseService<Long, SysConfig> {
 
+    String BASE_API_URL = "base_api_url";
+
     /**
      * @return com.keao.edu.biz.dal.entity.SysConfig
      * @params paramName

+ 26 - 5
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamOrganizationRelationServiceImpl.java

@@ -1,8 +1,11 @@
 package com.keao.edu.user.service.impl;
 
 import com.keao.edu.auth.api.client.SysMessageFeignService;
+import com.keao.edu.auth.api.client.SysUserFeignService;
+import com.keao.edu.auth.api.entity.SysMessageParams;
 import com.keao.edu.auth.api.entity.SysUser;
 import com.keao.edu.common.dal.BaseDAO;
+import com.keao.edu.common.entity.SysConfig;
 import com.keao.edu.common.enums.MessageTypeEnum;
 import com.keao.edu.common.exception.BizException;
 import com.keao.edu.common.page.PageInfo;
@@ -12,6 +15,7 @@ import com.keao.edu.common.tenant.TenantContextHolder;
 import com.keao.edu.thirdparty.message.MessageSenderPluginContext;
 import com.keao.edu.user.dao.ExamOrganizationRelationDao;
 import com.keao.edu.user.dao.ExaminationBasicDao;
+import com.keao.edu.user.dao.TeacherDao;
 import com.keao.edu.user.entity.ExamOrganizationRelation;
 import com.keao.edu.user.entity.ExaminationBasic;
 import com.keao.edu.user.entity.Organization;
@@ -21,6 +25,7 @@ import com.keao.edu.user.page.ExamOrganizationRelationQueryInfo;
 import com.keao.edu.user.service.ExamOrganizationRelationService;
 import com.keao.edu.user.service.OrganizationService;
 import com.keao.edu.user.service.ShortUrlService;
+import com.keao.edu.user.service.SysConfigService;
 import com.keao.edu.util.collection.MapUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.formula.functions.T;
@@ -46,7 +51,11 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 	@Autowired
 	private ShortUrlService shortUrlService;
 	@Autowired
+	private SysUserFeignService sysUserFeignService;
+	@Autowired
 	private SysMessageFeignService sysMessageFeignService;
+	@Autowired
+	private SysConfigService sysConfigService;
 
 	@Override
 	public BaseDAO<Long, ExamOrganizationRelation> getDAO() {
@@ -136,15 +145,27 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 			throw new BizException("考级项目不存在");
 		}
 
+		SysConfig baseUrlConfig = sysConfigService.findByParamName(SysConfigService.BASE_API_URL);
+		String baseUrl="";
+		if(Objects.nonNull(baseUrlConfig)){
+			baseUrl=baseUrlConfig.getParanValue();
+		}
+		baseUrl = baseUrl+"/#/signUp?";
+
 		for (ExamOrganizationRelation examOrgan : examOrgans) {
 			examOrgan.setUrl(shortUrlService.createShortUrl(""));
 			examOrgan.setSendUrlFlag(YesOrNoEnum.YES);
 
-//			SysUser student = teacherDao.getUser(practiceGroup.getStudentId());
-//			Map<Integer, String> userPhoneMap = new HashMap<>();
-//			userPhoneMap.put(practiceGroup.getStudentId(), student.getPhone());
-//			sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI, MessageTypeEnum.EXAM_REGISTRATION_URL_PUSH,
-//					userPhoneMap, null, 0, null, "STUDENT", groupStartTime, groupEndTime, teacherName, drillTimesOnWeek, firstCourseStartTime);
+			String registrationUrl = baseUrl + "organId=" + examOrgan.getOrganId();
+			String registShortUrl = shortUrlService.createShortUrl(registrationUrl);
+
+			SysUser student = sysUserFeignService.queryUserById(examOrgan.getOrganId());
+			Map<Integer, String> userPhoneMap = new HashMap<>();
+			userPhoneMap.put(examOrgan.getOrganId(), student.getPhone());
+
+			SysMessageParams sysMessageParams=new SysMessageParams(MessageSenderPluginContext.MessageSender.YIMEI, MessageTypeEnum.EXAM_REGISTRATION_URL_PUSH,
+					userPhoneMap, null, 0, null, null, registShortUrl);
+			sysMessageFeignService.batchSendMessage(sysMessageParams);
 		}
 
 		examOrganizationRelationDao.batchUpdate(examOrgans);

+ 3 - 3
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamRoomServiceImpl.java

@@ -81,7 +81,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
 		if(Objects.isNull(examRoom.getMainTeacherUserId())){
 			throw new BizException("请指定主考老师");
 		}
-		if(Objects.isNull(examRoom.getExamTime())){
+		if(Objects.isNull(examRoom.getExamStartTime())){
 			throw new BizException("请指定考试时间");
 		}
 		examRoom.setTenantId(TenantContextHolder.getTenantId().toString());
@@ -129,8 +129,8 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
 		List<ExamRoom> examRooms = examRoomDao.getWithExam(childOrganIds, examId);
 		if(!CollectionUtils.isEmpty(examRooms)){
 			examRoomStatisticsInfo.setExamRoomNum(examRooms.size());
-			examRoomStatisticsInfo.setFirstExamTime(examRooms.stream().min(Comparator.comparing(ExamRoom::getExamTime)).get().getExamTime());
-			examRoomStatisticsInfo.setLastExamTime(examRooms.stream().max(Comparator.comparing(ExamRoom::getExamTime)).get().getExamTime());
+			examRoomStatisticsInfo.setFirstExamTime(examRooms.stream().min(Comparator.comparing(ExamRoom::getExamStartTime)).get().getExamStartTime());
+			examRoomStatisticsInfo.setLastExamTime(examRooms.stream().max(Comparator.comparing(ExamRoom::getExamStartTime)).get().getExamStartTime());
 			int teacherNum=0;
 			for (ExamRoom examRoom : examRooms) {
 				if(Objects.nonNull(examRoom.getMainTeacherUserId())){

+ 26 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamSongServiceImpl.java

@@ -1,13 +1,22 @@
 package com.keao.edu.user.service.impl;
 
 import com.keao.edu.common.dal.BaseDAO;
+import com.keao.edu.common.page.PageInfo;
+import com.keao.edu.common.page.QueryInfo;
 import com.keao.edu.common.service.impl.BaseServiceImpl;
 import com.keao.edu.user.dao.ExamSongDao;
 import com.keao.edu.user.entity.ExamSong;
 import com.keao.edu.user.service.ExamSongService;
+import com.keao.edu.util.collection.MapUtil;
+import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 @Service
 public class ExamSongServiceImpl extends BaseServiceImpl<Integer, ExamSong> implements ExamSongService {
 	
@@ -18,5 +27,21 @@ public class ExamSongServiceImpl extends BaseServiceImpl<Integer, ExamSong> impl
 	public BaseDAO<Integer, ExamSong> getDAO() {
 		return examSongDao;
 	}
-	
+
+    @Override
+    public PageInfo<ExamSong> queryPage(QueryInfo queryInfo) {
+        PageInfo<ExamSong> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+        Map<String, Object> params = new HashMap<String, Object>();
+        MapUtil.populateMap(params, queryInfo);
+
+        List<ExamSong> dataList = new ArrayList<>();
+        int count = this.findCount(params);
+        if (count > 0) {
+            pageInfo.setTotal(count);
+            params.put("offset", pageInfo.getOffset());
+            dataList = this.getDAO().queryPage(params);
+        }
+        pageInfo.setRows(dataList);
+        return pageInfo;
+    }
 }

+ 36 - 2
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamTeacherSalaryServiceImpl.java

@@ -2,15 +2,34 @@ package com.keao.edu.user.service.impl;
 
 import com.keao.edu.common.dal.BaseDAO;
 import com.keao.edu.common.service.impl.BaseServiceImpl;
+import com.keao.edu.user.api.entity.ExamRoom;
+import com.keao.edu.user.api.entity.ExamRoomStudentRelation;
+import com.keao.edu.user.dao.ExamRoomDao;
+import com.keao.edu.user.dao.ExamRoomStudentRelationDao;
 import com.keao.edu.user.dao.ExamTeacherSalaryDao;
+import com.keao.edu.user.dao.ExaminationBasicDao;
 import com.keao.edu.user.entity.ExamTeacherSalary;
 import com.keao.edu.user.service.ExamTeacherSalaryService;
+import com.keao.edu.user.service.ExaminationBasicService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @Service
 public class ExamTeacherSalaryServiceImpl extends BaseServiceImpl<Long, ExamTeacherSalary> implements ExamTeacherSalaryService {
-	
+
+	@Autowired
+	private ExaminationBasicDao examinationBasicDao;
+	@Autowired
+	private ExamRoomDao examRoomDao;
+	@Autowired
+	private ExamRoomStudentRelationDao examRoomStudentRelationDao;
 	@Autowired
 	private ExamTeacherSalaryDao examTeacherSalaryDao;
 
@@ -18,5 +37,20 @@ public class ExamTeacherSalaryServiceImpl extends BaseServiceImpl<Long, ExamTeac
 	public BaseDAO<Long, ExamTeacherSalary> getDAO() {
 		return examTeacherSalaryDao;
 	}
-	
+
+	@Override
+	public void teacherSalarySettlementWithExam(Integer examId) {
+		List<ExamRoom> examRooms = examRoomDao.getWithExam(null, examId);
+		if(CollectionUtils.isEmpty(examRooms)){
+			return;
+		}
+		List<ExamRoomStudentRelation> examRoomStudentRelations = examRoomStudentRelationDao.getExamRoomStudentRelations(examId, null, null);
+		Map<Long, List<ExamRoomStudentRelation>> examRoomStudentsMap = new HashMap<>();
+		if(!CollectionUtils.isEmpty(examRoomStudentRelations)){
+			examRoomStudentsMap=examRoomStudentRelations.stream().collect(Collectors.groupingBy(ExamRoomStudentRelation::getExamRoomId));
+		}
+		List<ExamTeacherSalary> examTeacherSalaries = examTeacherSalaryDao.queryWithExam(examId);
+		Map<Integer, ExamTeacherSalary> teacherIdSalaryMap = examTeacherSalaries.stream().collect(Collectors.toMap(ExamTeacherSalary::getTeacherId, e -> e));
+
+	}
 }

+ 8 - 3
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ShortUrlServiceImpl.java

@@ -1,10 +1,12 @@
 package com.keao.edu.user.service.impl;
 
 import com.keao.edu.common.dal.BaseDAO;
+import com.keao.edu.common.entity.SysConfig;
 import com.keao.edu.common.service.impl.BaseServiceImpl;
 import com.keao.edu.user.dao.ShortUrlDao;
 import com.keao.edu.user.entity.ShortUrl;
 import com.keao.edu.user.service.ShortUrlService;
+import com.keao.edu.user.service.SysConfigService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -15,6 +17,8 @@ public class ShortUrlServiceImpl extends BaseServiceImpl<Long, ShortUrl> impleme
 	
 	@Autowired
 	private ShortUrlDao shortUrlDao;
+	@Autowired
+	private SysConfigService sysConfigService;
 
 	@Override
 	public BaseDAO<Long, ShortUrl> getDAO() {
@@ -30,9 +34,10 @@ public class ShortUrlServiceImpl extends BaseServiceImpl<Long, ShortUrl> impleme
 		ShortUrl shortUrl=new ShortUrl(sourceUrl);
 		shortUrlDao.insert(shortUrl);
 
-		String temp=sourceUrl.substring(sourceUrl.indexOf("//")+2);
-		StringBuffer returnUrl=new StringBuffer(sourceUrl.substring(0, sourceUrl.indexOf("//") + temp.indexOf("/") + 2));
-		returnUrl.append("/su/");
+		SysConfig baseUrlConfig = sysConfigService.findByParamName(SysConfigService.BASE_API_URL);
+
+		StringBuffer returnUrl=new StringBuffer(baseUrlConfig.getParanValue());
+		returnUrl.append(":8000/api-user/su/");
 		returnUrl.append(shortUrl.getId());
 
 		return returnUrl.toString();

+ 1 - 1
edu-user/edu-user-server/src/main/resources/application.yml

@@ -29,7 +29,7 @@ spring:
 #    url: jdbc:mysql://47.99.212.176:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
 #    username: edu_saas
 #    password: edu_saas
-    url: jdbc:mysql://47.114.176.40:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://47.114.176.40:3306/edu_saas?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
     username: edu_saas
     password: dayaDataOnline@2019
     # 使用druid数据源

+ 3 - 3
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamLocationMapper.xml

@@ -70,9 +70,9 @@
 	</update>
 	
 	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
-		DELETE FROM exam_location WHERE id_ = #{id} 
-	</delete>
+	<update id="delete" >
+		UPDATE exam_location SET del_flag_=1 WHERE id_ = #{id}
+	</update>
 
 	<sql id="queryCondition">
 		<where>

+ 16 - 9
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRoomMapper.xml

@@ -14,7 +14,8 @@
 		<result column="subject_id_list_" property="subjectIdList" />
 		<result column="main_teacher_user_id_" property="mainTeacherUserId" />
 		<result column="assistant_teacher_user_id_list_" property="assistantTeacherUserIdList" />
-		<result column="exam_time_" property="examTime" />
+		<result column="exam_start_time_" property="examStartTime" />
+		<result column="exam_end_time_" property="examEndTime" />
 		<result column="del_flag_" property="delFlag" />
 		<result column="organ_id_" property="organId"/>
 		<result column="exam_plan_push_flag_" property="examPlanPushFlag" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler"/>
@@ -36,9 +37,9 @@
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.keao.edu.user.api.entity.ExamRoom" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 		INSERT INTO exam_room (id_,examination_basic_id_,exam_mode_,exam_location_id_,subject_id_list_,main_teacher_user_id_,
-		assistant_teacher_user_id_list_,exam_time_,del_flag_,organ_id_,exam_plan_push_flag_,create_time_,update_time_,tenant_id_)
+		assistant_teacher_user_id_list_,exam_start_time_,exam_end_time_,del_flag_,organ_id_,exam_plan_push_flag_,create_time_,update_time_,tenant_id_)
 		VALUES(#{id},#{examinationBasicId},#{examMode},#{examLocationId},#{subjectIdList},#{mainTeacherUserId},#{assistantTeacherUserIdList},
-		#{examTime},#{delFlag},#{organId},#{examPlanPushFlag,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},NOW(),NOW(),#{tenantId})
+		#{examStartTime},#{examEndTime},#{delFlag},#{organId},#{examPlanPushFlag,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},NOW(),NOW(),#{tenantId})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->
@@ -51,8 +52,11 @@
 			<if test="examinationBasicId != null">
 				examination_basic_id_ = #{examinationBasicId},
 			</if>
-			<if test="examTimeJson != null">
-				exam_time_ = #{examTime},
+			<if test="examStartTime != null">
+				exam_start_time_ = #{examStartTime},
+			</if>
+			<if test="examEndTime != null">
+				exam_end_time_ = #{examEndTime},
 			</if>
 			<if test="subjectIdList != null">
 				subject_id_list_ = #{subjectIdList},
@@ -156,9 +160,12 @@
 	</select>
 	
     <select id="getWithExam" resultMap="ExamRoom">
-		SELECT * FROM exam_room WHERE examination_basic_id_=#{examId} AND organ_id_ IN
-		<foreach collection="organIds" item="organId" separator="," open="(" close=")">
-			#{organId}
-		</foreach>
+		SELECT * FROM exam_room WHERE examination_basic_id_=#{examId}
+		<if test="organIds!=null">
+			AND organ_id_ IN
+			<foreach collection="organIds" item="organId" separator="," open="(" close=")">
+				#{organId}
+			</foreach>
+		</if>
     </select>
 </mapper>

+ 13 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRoomStudentRelationMapper.xml

@@ -152,6 +152,18 @@
 		SELECT id_, examination_basic_id_, exam_room_id_, student_id_ FROM exam_room_student_relation WHERE exam_room_id_=#{examRoomId}
 	</select>
 	<select id="getExamRoomStudentRelation" resultMap="ExamRoomStudentRelation">
-		SELECT * FROM exam_room_student_relation WHERE exam_room_id_ = #{roomId} AND examination_basic_id_ = #{basicId} AND student_id_ = #{studentId} LIMIT 1
+		SELECT * FROM exam_room_student_relation
+		WHERE examination_basic_id_ = #{basicId} AND exam_room_id_ = #{roomId} AND student_id_ = #{studentId} LIMIT 1
+	</select>
+
+	<select id="getExamRoomStudentRelations" resultMap="ExamRoomStudentRelation">
+		SELECT * FROM exam_room_student_relation
+		WHERE examination_basic_id_ = #{basicId}
+		<if test="roomId!=null">
+			AND exam_room_id_ = #{roomId}
+		</if>
+		<if test="studentId">
+			AND student_id_ = #{studentId}
+		</if>
 	</select>
 </mapper>

+ 11 - 8
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamSongMapper.xml

@@ -11,6 +11,7 @@
 		<result column="song_name_" property="songName" />
 		<result column="song_author_" property="songAuthor" />
 		<result column="subject_list_" property="subjectList" />
+		<result column="subject_names_" property="subjectNames" />
 		<result column="level_list_" property="levelList" />
 		<result column="type_" property="type"  typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler"/>
 		<result column="file_url_list_" property="fileUrlList" />
@@ -74,33 +75,35 @@
 	</update>
 	
 	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
-		DELETE FROM exam_song WHERE id_ = #{id} 
-	</delete>
+	<update id="delete" >
+		UPDATE exam_song SET del_flag_=1 WHERE id_ = #{id}
+	</update>
 
 	<sql id="queryCondition">
 		<where>
-			del_flag_=0 AND tenant_id_ = #{tenantId}
+			es.del_flag_=0 AND es.tenant_id_ = #{tenantId}
 			<if test="subjectList!=null">
-				AND FIND_IN_SET(#{subjectList}, subject_list_)
+				AND FIND_IN_SET(#{subjectList}, es.subject_list_)
 			</if>
 			<if test="search!=null">
-				AND (id_=#{search} OR song_name_ LIKE CONCAT('%', #{search}, '%'))
+				AND (es.id_=#{search} OR es.song_name_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 		</where>
 	</sql>
 	
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="ExamSong" parameterType="map">
-		SELECT * FROM exam_song
+		SELECT es.*,GROUP_CONCAT(s.name_) subject_names_ FROM exam_song es
+		LEFT JOIN subject s ON FIND_IN_SET(s.id_, es.subject_list_)
 		<include refid="queryCondition"/>
+		GROUP BY es.id_
 		ORDER BY id_
 		<include refid="global.limit"/>
 	</select>
 	
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM exam_song
+		SELECT COUNT(*) FROM exam_song es
 		<include refid="queryCondition"/>
 	</select>
     <select id="getExamSongs" resultMap="ExamSong">

+ 3 - 0
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamTeacherSalaryMapper.xml

@@ -97,4 +97,7 @@
 		SELECT COUNT(*) FROM exam_teacher_salary
 		<include refid="queryPageCondition"/>
 	</select>
+    <select id="queryWithExam" resultMap="ExamTeacherSalary">
+		SELECT * FROM exam_teacher_salary WHERE examination_basic_id_=#{examId}
+	</select>
 </mapper>

+ 1 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExaminationBasicMapper.xml

@@ -33,7 +33,7 @@
 		SELECT * FROM examination_basic WHERE id_ = #{id}
 	</select>
 
-	<select id="getExaminationBasic" resultMap="ExaminationBasic" >
+	<select id="getExaminationBasic" resultMap="ExaminationBasicDto" >
 		SELECT * FROM examination_basic WHERE id_ = #{examId}
 	</select>
 

+ 1 - 1
edu-util/src/main/java/com/keao/edu/util/string/MessageFormatter.java

@@ -15,7 +15,7 @@ final public class MessageFormatter {
 	 * @param argArray
 	 * @return String
 	 */
-	final public static String arrayFormat(String messagePattern, Object... argArray) {
+	final public static String arrayFormat(String messagePattern, Object[] argArray) {
 		if (messagePattern == null) {
 			return "";
 		}