From 4613e25ccfdf132a70bed3d308d306bf9bcb011f Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 22 Jul 2021 10:15:50 +0800
Subject: [PATCH] 1.考试成绩新增userId字段,查询接口新增条件查询 2.新增查询实时位置接口 3.指令接口修改

---
 src/main/java/org/springblade/modules/exam/entity/ExamScore.java                         |    4 ++
 src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.java              |    7 +++
 src/main/java/org/springblade/modules/directive/service/impl/DirectiveServiceImpl.java   |   10 +++++
 src/main/java/org/springblade/modules/location/service/LiveLocationService.java          |    6 +++
 src/main/java/org/springblade/modules/location/controller/LiveLocationController.java    |    9 ++++
 src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml                    |    6 +++
 src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java |   11 +++++
 src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.xml               |    9 ++++
 src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java           |    5 ++
 src/main/resources/application.yml                                                       |    1 
 src/main/java/org/springblade/modules/directive/entity/DirectiveFile.java                |   49 ++++++++++++++++++++++++
 11 files changed, 116 insertions(+), 1 deletions(-)

diff --git a/src/main/java/org/springblade/modules/directive/entity/DirectiveFile.java b/src/main/java/org/springblade/modules/directive/entity/DirectiveFile.java
new file mode 100644
index 0000000..b82436e
--- /dev/null
+++ b/src/main/java/org/springblade/modules/directive/entity/DirectiveFile.java
@@ -0,0 +1,49 @@
+package org.springblade.modules.directive.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 指令文件实体类
+ * @author zhongrj
+ * @time 2021-07-22
+ */
+@Data
+@TableName("sys_directive_file")
+public class DirectiveFile implements Serializable {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 指令文件主键id
+	 */
+	@TableId(value = "id",type = IdType.AUTO)
+	private Long id;
+
+	/**
+	 * 类型  1:图片  2:视频
+	 */
+	@TableField("type")
+	private Integer type;
+
+
+	/**
+	 * 指令id
+	 */
+	@TableField("directive_id")
+	private Long directive_id;
+
+
+	/**
+	 * url 路径
+	 */
+	private String url;
+
+}
diff --git a/src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.java b/src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.java
index 9c910b2..6845485 100644
--- a/src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.java
+++ b/src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.java
@@ -4,6 +4,7 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
 import org.springblade.modules.directive.entity.Directive;
+import org.springblade.modules.directive.entity.DirectiveFile;
 import org.springblade.modules.directive.vo.DirectiveVo;
 
 import java.util.List;
@@ -30,4 +31,10 @@
 	 */
 	DirectiveVo selectDirectiveInfo(@Param("directive") Directive directive);
 
+	/**
+	 * 查询指令图片信息集合
+	 * @param id 指令id
+	 * @return
+	 */
+    List<DirectiveFile> getDirectiveFileList(Long id);
 }
diff --git a/src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.xml b/src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.xml
index e244f00..be4dfe3 100644
--- a/src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.xml
+++ b/src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.xml
@@ -39,4 +39,13 @@
         </if>
     </select>
 
+    <!--查询指令图片信息集合-->
+    <select id="getDirectiveFileList" resultType="org.springblade.modules.directive.entity.DirectiveFile">
+        select * from sys_directive_file
+        where 1=1
+        <if test="id!=null and id!=''">
+            and directive_id = #{id}
+        </if>
+    </select>
+
 </mapper>
diff --git a/src/main/java/org/springblade/modules/directive/service/impl/DirectiveServiceImpl.java b/src/main/java/org/springblade/modules/directive/service/impl/DirectiveServiceImpl.java
index 5047fd4..72ef3c1 100644
--- a/src/main/java/org/springblade/modules/directive/service/impl/DirectiveServiceImpl.java
+++ b/src/main/java/org/springblade/modules/directive/service/impl/DirectiveServiceImpl.java
@@ -4,6 +4,7 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.AllArgsConstructor;
 import org.springblade.modules.directive.entity.Directive;
+import org.springblade.modules.directive.entity.DirectiveFile;
 import org.springblade.modules.directive.mapper.DirectiveMapper;
 import org.springblade.modules.directive.service.DirectiveService;
 import org.springblade.modules.directive.vo.DirectiveVo;
@@ -43,6 +44,15 @@
 				User user = userService.getById(receiveDirectiveId);
 				builder.append(user.getRealName()).append(",");
 			}
+			//查询图片
+			List<DirectiveFile> directiveFiles = baseMapper.getDirectiveFileList(record.getId());
+			if (directiveFiles.size()>0){
+				StringBuilder builderFile = new StringBuilder();
+				for (DirectiveFile directiveFile : directiveFiles) {
+					builderFile.append(directiveFile.getUrl()).append(",");
+				}
+				record.setUrl(builder.toString().substring(0, builderFile.toString().length() - 1));
+			}
 			record.setReceiveName(builder.toString().substring(0, builder.toString().length() - 1));
 		}
 		return directiveVoIPage;
diff --git a/src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java b/src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java
index 9331b8e..16500f9 100644
--- a/src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java
+++ b/src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java
@@ -8,10 +8,14 @@
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.apply.service.ApplyService;
 import org.springblade.modules.exam.entity.ExamScore;
 import org.springblade.modules.exam.service.ExamScoreService;
 import org.springblade.modules.exam.vo.ExamScoreVO;
+import org.springblade.modules.system.service.IUserService;
 import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * @author zhongrj
@@ -125,5 +129,4 @@
 		//返回
 		return R.data(detail);
 	}
-
 }
diff --git a/src/main/java/org/springblade/modules/exam/entity/ExamScore.java b/src/main/java/org/springblade/modules/exam/entity/ExamScore.java
index d3ca4cd..4e976ae 100644
--- a/src/main/java/org/springblade/modules/exam/entity/ExamScore.java
+++ b/src/main/java/org/springblade/modules/exam/entity/ExamScore.java
@@ -108,4 +108,8 @@
 	private Integer qualified;
 
 
+	@TableField("user_id")
+	private String userId;
+
+
 }
diff --git a/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml b/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
index dce17ed..3902239 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
@@ -21,6 +21,12 @@
         <if test="examScore.securityName!=null and  examScore.securityName!=''">
             and security_name like concat('%', #{examScore.securityName},'%')
         </if>
+        <if test="examScore.userId!=null and  examScore.userId!=''">
+            and user_id = #{examScore.userId}
+        </if>
+        <if test="examScore.candidateNo!=null and  examScore.candidateNo!=''">
+            and candidate_no = #{examScore.candidateNo}
+        </if>
 <!--        <if test="examScore.examType!=null">-->
 <!--            and exam_type = #{examScore.examType}-->
 <!--        </if>-->
diff --git a/src/main/java/org/springblade/modules/location/controller/LiveLocationController.java b/src/main/java/org/springblade/modules/location/controller/LiveLocationController.java
index 077bb7f..68cc163 100644
--- a/src/main/java/org/springblade/modules/location/controller/LiveLocationController.java
+++ b/src/main/java/org/springblade/modules/location/controller/LiveLocationController.java
@@ -149,4 +149,13 @@
 		return R.data(liveLocationService.getLocusInfoList(liveLocationVo));
 	}
 
+	/**
+	 * 首页实时定位
+	 * @return
+	 */
+	@GetMapping("/getLiveLocationVoList")
+	public R<List<LiveLocationVo>> getLiveLocationVoList(LiveLocationVo liveLocationVo){
+		return R.data(liveLocationService.getLiveLocationVoList(liveLocationVo));
+	}
+
 }
diff --git a/src/main/java/org/springblade/modules/location/service/LiveLocationService.java b/src/main/java/org/springblade/modules/location/service/LiveLocationService.java
index 8ea57a3..cf6f1c9 100644
--- a/src/main/java/org/springblade/modules/location/service/LiveLocationService.java
+++ b/src/main/java/org/springblade/modules/location/service/LiveLocationService.java
@@ -35,4 +35,10 @@
 	 * @return
 	 */
 	List<LocusVo> getLocusInfoList(LiveLocationVo liveLocationVo);
+
+	/**
+	 * 首页实时定位
+	 * @return
+	 */
+	List<LiveLocationVo> getLiveLocationVoList(LiveLocationVo liveLocationVo);
 }
diff --git a/src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java b/src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java
index 4a3c09c..369b1ad 100644
--- a/src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java
+++ b/src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java
@@ -47,4 +47,15 @@
 	public List<LocusVo> getLocusInfoList(LiveLocationVo liveLocationVo) {
 		return baseMapper.getLocusInfoList(liveLocationVo);
 	}
+
+
+
+	/**
+	 * 首页实时定位
+	 * @return
+	 */
+	@Override
+	public List<LiveLocationVo> getLiveLocationVoList(LiveLocationVo liveLocationVo) {
+		return baseMapper.selectLiveLocationPage(null,liveLocationVo);
+	}
 }
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 74b414b..acb7a62 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -195,6 +195,7 @@
       - /blade-test/**
       - /liveLocation/**
       - /locus/**
+      - /examScore/**
     #授权认证配置
     auth:
       - method: ALL

--
Gitblit v1.9.3