Browse Source

预报名学员接口

小么熊🐻 2 years ago
parent
commit
8622f7800d

+ 17 - 5
jsjp-admin/src/main/java/com/miaxis/app/controller/tms/TmsStudentInfoController.java

@@ -8,11 +8,9 @@ import com.miaxis.common.core.page.ResponsePageInfo;
 import com.miaxis.tms.dto.TmsStudentInfoDTO;
 import com.miaxis.tms.dto.TmsStudentInfoIdDTO;
 import com.miaxis.tms.dto.TmsStudentInfoQrDTO;
+import com.miaxis.tms.dto.TmsStudentInfoTempDTO;
 import com.miaxis.tms.service.ITmsStudentInfoService;
-import com.miaxis.tms.vo.TmsLogFaceVo;
-import com.miaxis.tms.vo.TmsSignVo;
-import com.miaxis.tms.vo.TmsStudentInfoIdVo;
-import com.miaxis.tms.vo.TmsStudentInfoVo;
+import com.miaxis.tms.vo.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -49,12 +47,26 @@ public class TmsStudentInfoController extends BaseController {
             @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
             @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
     })
-    public ResponsePageInfo<TmsStudentInfoVo> list(@ModelAttribute TmsStudentInfoDTO studentInfoDTO) throws Exception {
+    public ResponsePageInfo<TmsStudentInfoVo> list(@ModelAttribute TmsStudentInfoDTO studentInfoDTO) {
         startPage();
         List<TmsStudentInfoVo> stuInfoList = studentInfoService.getTmsStudentInfoList(studentInfoDTO);
         return toResponsePageInfo(stuInfoList);
     }
 
+    /**
+     * 查询学员预报名列表
+     */
+    @GetMapping("/studenTempList")
+    @ApiOperation("查询学员预报名列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<TmsStudentInfoTempVo> studenTempList(@ModelAttribute TmsStudentInfoTempDTO studentInfoTempDTO) {
+        startPage();
+        List<TmsStudentInfoTempVo> stuInfoTempList = studentInfoService.getTmsStudentInfoTempList(studentInfoTempDTO);
+        return toResponsePageInfo(stuInfoTempList);
+    }
 
     /**
      * 根据学员id获取详细信息

+ 29 - 0
jsjp-service/src/main/java/com/miaxis/tms/dto/TmsStudentInfoTempDTO.java

@@ -0,0 +1,29 @@
+package com.miaxis.tms.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+@Data
+public class TmsStudentInfoTempDTO implements Serializable {
+
+
+    @ApiModelProperty(value = "身份证号或姓名或手机")
+    private String field;
+
+    @ApiModelProperty(value = "驾校ID")
+    private Long schoolId;
+
+    @ApiModelProperty(value = "教练员ID")
+    private Long coachId;
+
+    @ApiModelProperty(value = "APP教练员ID")
+    private Long appCoachId;
+
+    @ApiModelProperty(value = "地区编号",required = true)
+    private String city;
+
+
+}

+ 4 - 4
jsjp-service/src/main/java/com/miaxis/tms/mapper/TmsStudentInfoMapper.java

@@ -4,10 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.miaxis.tms.dto.TmsStudentInfoDTO;
 import com.miaxis.tms.dto.TmsStudentInfoIdDTO;
 import com.miaxis.tms.dto.TmsStudentInfoQrDTO;
-import com.miaxis.tms.vo.TmsLogFaceVo;
-import com.miaxis.tms.vo.TmsSignVo;
-import com.miaxis.tms.vo.TmsStudentInfoIdVo;
-import com.miaxis.tms.vo.TmsStudentInfoVo;
+import com.miaxis.tms.dto.TmsStudentInfoTempDTO;
+import com.miaxis.tms.vo.*;
 
 import java.util.List;
 
@@ -31,4 +29,6 @@ public interface TmsStudentInfoMapper extends BaseMapper<TmsStudentInfoVo> {
     List<TmsLogFaceVo> getTmsLogFacListByStuId(TmsStudentInfoIdDTO studentInfoIdDTO);
 
     List<TmsSignVo> getTmsSignListByStuId(TmsStudentInfoIdDTO studentInfoIdDTO);
+
+    List<TmsStudentInfoTempVo> getTmsStudentInfoTempList(TmsStudentInfoTempDTO studentInfoDto);
 }

+ 4 - 4
jsjp-service/src/main/java/com/miaxis/tms/service/ITmsStudentInfoService.java

@@ -4,10 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.miaxis.tms.dto.TmsStudentInfoDTO;
 import com.miaxis.tms.dto.TmsStudentInfoIdDTO;
 import com.miaxis.tms.dto.TmsStudentInfoQrDTO;
-import com.miaxis.tms.vo.TmsLogFaceVo;
-import com.miaxis.tms.vo.TmsSignVo;
-import com.miaxis.tms.vo.TmsStudentInfoIdVo;
-import com.miaxis.tms.vo.TmsStudentInfoVo;
+import com.miaxis.tms.dto.TmsStudentInfoTempDTO;
+import com.miaxis.tms.vo.*;
 
 import java.util.List;
 
@@ -25,6 +23,8 @@ public interface ITmsStudentInfoService extends IService<TmsStudentInfoVo> {
 
     List<TmsStudentInfoVo> getTmsStudentInfoList(TmsStudentInfoDTO studentInfoDTO);
 
+    List<TmsStudentInfoTempVo> getTmsStudentInfoTempList(TmsStudentInfoTempDTO studentInfoTempDTO);
+
     TmsStudentInfoIdVo getTmsStudentInfoById(TmsStudentInfoIdDTO stuIdDTO);
 
     int upStuAppCoachIdById(TmsStudentInfoQrDTO studentInfoQrDTO);

+ 8 - 4
jsjp-service/src/main/java/com/miaxis/tms/service/impl/TmsStudentInfoServiceImpl.java

@@ -6,12 +6,10 @@ import com.miaxis.common.enums.DataSourceTypeEnum;
 import com.miaxis.tms.dto.TmsStudentInfoDTO;
 import com.miaxis.tms.dto.TmsStudentInfoIdDTO;
 import com.miaxis.tms.dto.TmsStudentInfoQrDTO;
+import com.miaxis.tms.dto.TmsStudentInfoTempDTO;
 import com.miaxis.tms.mapper.TmsStudentInfoMapper;
 import com.miaxis.tms.service.ITmsStudentInfoService;
-import com.miaxis.tms.vo.TmsLogFaceVo;
-import com.miaxis.tms.vo.TmsSignVo;
-import com.miaxis.tms.vo.TmsStudentInfoIdVo;
-import com.miaxis.tms.vo.TmsStudentInfoVo;
+import com.miaxis.tms.vo.*;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -40,6 +38,12 @@ public class TmsStudentInfoServiceImpl extends ServiceImpl<TmsStudentInfoMapper,
         return list;
     }
 
+    @Override
+    public List<TmsStudentInfoTempVo> getTmsStudentInfoTempList(TmsStudentInfoTempDTO studentInfoTempDto) {
+        List<TmsStudentInfoTempVo> list =  mapper.getTmsStudentInfoTempList(studentInfoTempDto);
+        return list;
+    }
+
     @Override
     public TmsStudentInfoIdVo getTmsStudentInfoById(TmsStudentInfoIdDTO stuIdDTO) {
         return mapper.getTmsStudentInfoById(stuIdDTO);

+ 47 - 0
jsjp-service/src/main/java/com/miaxis/tms/vo/TmsStudentInfoTempVo.java

@@ -0,0 +1,47 @@
+package com.miaxis.tms.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class TmsStudentInfoTempVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "学员ID")
+    private Long id;
+
+    @ApiModelProperty(value = "身份证号码")
+    private String idcard;
+
+    @ApiModelProperty(value = "学员姓名")
+    private String name;
+
+    @ApiModelProperty(value = "手机号码")
+    private String phone;
+
+    @ApiModelProperty(value = "报名时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date applydate;
+
+    @ApiModelProperty(value = "学驾状态 1 第一阶段 2 第二阶段 3 第三阶段 4 第四阶段 5已结业")
+    private String state;
+
+    @ApiModelProperty(value = "培训车型(下列编码单选:A1,A2,A3,B1,B2,C1,C2,C3,C4,C5,D,E,F,M,N,P)")
+    private String trainType;
+
+    @ApiModelProperty(value = "照片保存地址")
+    private String photoPath;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+
+}

+ 19 - 17
jsjp-service/src/main/java/com/miaxis/tms/vo/TmsStudentInfoVo.java

@@ -3,6 +3,7 @@ package com.miaxis.tms.vo;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -16,58 +17,59 @@ public class TmsStudentInfoVo implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId("TSO_ID")
+    @ApiModelProperty(value = "学员ID")
     private Long id;
 
-    @TableField("TSO_IDCARD")
+    @ApiModelProperty(value = "身份证号码")
     private String idcard;
 
-    @TableField("TSO_NAME")
+    @ApiModelProperty(value = "学员姓名")
     private String name;
 
-    @TableField("TSO_PHONE")
+    @ApiModelProperty(value = "手机号码")
     private String phone;
 
-    @TableField("TSO_APPLYDATE")
+    @ApiModelProperty(value = "报名时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date applydate;
 
-    @TableField("TSO_STATE")
+    @ApiModelProperty(value = "学驾状态 1 第一阶段 2 第二阶段 3 第三阶段 4 第四阶段 5已结业")
     private String state;
 
-    @TableField("TSO_TRAINTYPE")
+    @ApiModelProperty(value = "培训车型(下列编码单选:A1,A2,A3,B1,B2,C1,C2,C3,C4,C5,D,E,F,M,N,P)")
     private String trainType;
 
-    @TableField("TSO_PHOTO_PATH")
+    @ApiModelProperty(value = "照片保存地址")
     private String photoPath;
 
-    @TableField("TSO_REMARK")
+    @ApiModelProperty(value = "备注")
     private String remark;
 
-    @TableField("SRI_TRAIN_ONE_EXAM_STATUS")
+    @ApiModelProperty(value = "第一阶段学时考核状态 0 未考核 1 考核通过 2 考核不通过")
     private String trainOneExamStatus;
 
-    @TableField("SRI_TRAIN_ONE_EXAM_TIME")
+    @ApiModelProperty(value = "第一阶段学时考核时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date trainOneExamTime;
 
-    @TableField("SRI_TRAIN_TWO_EXAM_STATUS")
+    @ApiModelProperty(value = "第二阶段学时考核状态 0 未考核 1 考核通过 2 考核不通过")
     private String trainTwoExamStatus;
 
-    @TableField("SRI_TRAIN_TWO_EXAM_TIME")
+    @ApiModelProperty(value = "第二阶段学时考核时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date trainTwoExamTime;
 
-    @TableField("SRI_TRAIN_THREE_EXAM_STATUS")
+    @ApiModelProperty(value = "第三阶段学时考核状态 0 未考核 1 考核通过 2 考核不通过")
     private String trainThreeExamStatus;
 
-    @TableField("SRI_TRAIN_THREE_EXAM_TIME")
+    @ApiModelProperty(value = "第三阶段学时考核时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date trainThreeExamTime;
 
-    @TableField("SRI_TRAIN_FOUR_EXAM_STATUS")
+    @ApiModelProperty(value = "第四阶段学时考核状态 0 未考核 1 考核通过 2 考核不通过")
     private String trainFourExamStatus;
 
-    @TableField("SRI_TRAIN_FOUR_EXAM_TIME")
+    @ApiModelProperty(value = "第四阶段学时考核时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date trainFourExamTime;
 

+ 33 - 0
jsjp-service/src/main/resources/mapper/tms/TmsStudentInfoMapper.xml

@@ -23,6 +23,20 @@
     </resultMap>
 
 
+    <resultMap id="TmsStudentInfoTempResultMap" type="com.miaxis.tms.vo.TmsStudentInfoTempVo">
+        <id property="id" column="TSO_ID" />
+        <result property="idcard" column="TSO_IDCARD" />
+        <result property="name" column="TSO_NAME" />
+        <result property="phone" column="TSO_PHONE" />
+        <result property="applydate" column="TSO_APPLYDATE" />
+        <result property="state" column="TSO_STATE" />
+        <result property="trainType" column="TSO_TRAINTYPE" />
+        <result property="photoPath" column="TSO_PHOTO_PATH" />
+        <result property="remark" column="TSO_REMARK" />
+    </resultMap>
+
+
+
     <resultMap id="TmsStudentInfoIdResultMap" type="com.miaxis.tms.vo.TmsStudentInfoIdVo">
         <id property="id" column="TSO_ID" />
         <result property="cardType" column="TSO_CARDTYPE" />
@@ -101,6 +115,25 @@
     </select>
 
 
+    <select id="getTmsStudentInfoTempList"  parameterType="com.miaxis.tms.dto.TmsStudentInfoTempDTO" resultMap="TmsStudentInfoTempResultMap">
+        select t1.TSO_ID, t1.TSO_IDCARD, t1.TSO_NAME,t1.Tso_Phone,t1.TSO_APPLYDATE, t1.TSO_STATE , t1.TSO_TRAINTYPE, t1.tso_photo_path, t1.TSO_REMARK
+        from tms_student_info_temp@tms${city} t1
+        <where>
+            AND t1.TSO_HISTORY = '0'
+            AND t1.TSO_BUSITYPE in ('0', '1')
+            AND t1.TSO_LOGOUT = 0
+            <if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
+            <if test="appCoachId!=null" > AND t1.TSO_APP_COACH_ID = #{appCoachId,jdbcType=NUMERIC } </if>
+            <if test="field != null  and field != ''"> AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{field,jdbcType=VARCHAR} || '%') </if>
+            <if test="schoolId != null "> and t1.TSO_SCHOOL_ID = #{schoolId,,jdbcType=NUMERIC} </if>
+        </where>
+        ORDER BY t1.TSO_ID desc
+    </select>
+
+
+
+
+
     <select id="getTmsStudentInfoById"  parameterType="com.miaxis.tms.dto.TmsStudentInfoIdDTO" resultMap="TmsStudentInfoIdResultMap">
         SELECT t.tso_cardtype,
                t.tso_Idcard,