Ver Fonte

fix 合并

he2802 há 3 anos atrás
pai
commit
f6fbf68fde

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserSubscribeQueryBo.java

@@ -120,4 +120,7 @@ public class UserSubscribeQueryBo extends BaseEntity {
 	/** 导入批次编号 */
 	@ApiModelProperty("导入批次编号")
 	private String importNo;
+
+	@ApiModelProperty("是否合并查询 0单查 1联合查")
+	private Integer searchType;
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserSubscribeServiceImpl.java

@@ -784,6 +784,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
             }
             //考点已申报人数
             Long sitePeopleNum = examApplyMapper.sitePeopleNum(queryTimeBo);
+            System.out.println(queryTimeBo);
             String siteTimeJson = examApplyMapper.siteTimeJson(queryTimeBo);
             if (Validator.isEmpty(siteTimeJson)) {
                 userSubscribeImport.setCause("考点数据错误");

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/exam/ExamApplyMapper.xml

@@ -425,6 +425,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             e1.apply_id = #{applyId}
           AND e1.exam_time = #{examTime}
           AND es.site_address = #{applySiteAddress}
-
+          AND ea.`status` = 1
     </select>
 </mapper>

+ 9 - 2
zhongzheng-system/src/main/resources/mapper/modules/user/UserSubscribeMapper.xml

@@ -104,15 +104,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="canExam != null and canExam == 1 ">
             and us.subscribe_status = 1
         </if>
-        <if test="searchKey != null and searchKey != '' ">
+        <if test="searchKey != null and searchKey != '' and searchType == 0 ">
             and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%'))
         </if>
-        <if test="idCards != null and idCards.size()!=0 ">
+        <if test="idCards != null and idCards.size()!=0 and searchType == 0" >
             AND u.id_card in
             <foreach collection="idCards" item="item" index="index" open="(" close=")" separator=",">
                 #{item}
             </foreach>
         </if>
+        <if test="searchType == 1" >
+            and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%') or
+            u.id_card in
+            <foreach collection="idCards" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>)
+        </if>
         <if test="userId != null and userId != '' ">
             and us.user_id = #{userId}
         </if>