Переглянути джерело

考试关联培训兼容新版

wy 6 місяців тому
батько
коміт
32785f3ca1

+ 16 - 3
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/sqlzdy/Service/SwdlServiceImpl.java

@@ -18,6 +18,7 @@ import com.lc.ibps.cloud.provider.GenericProvider;
 import com.lc.ibps.org.api.IPartyPositionService;
 import com.lc.ibps.org.party.persistence.entity.PartyPositionPo;
 import com.lc.ibps.sysdata.dao.UpdateDataTableDao;
+import com.lc.ibps.untils.settingUtil;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -125,9 +126,21 @@ public class SwdlServiceImpl extends GenericProvider implements SwdlService {
                 map.put("locationId", getDiDian());
             }
             Map mapDeal = getMap(map);
-            List<Map<String, Object>> list = updateDataTableDao.selectExInfoByLocation(mapDeal);
-            int totalCount = updateDataTableDao.selectExInfoByLocationCount(mapDeal);
-            int totalCountNull = updateDataTableDao.selectExInfoByLocationCountNull(mapDeal);
+            List<Map<String, Object>> list = new ArrayList<>();
+            String px = settingUtil.getPx();
+            int totalCount = 0;
+            int totalCountNull = 0;
+            if(BeanUtils.isNotEmpty(px) && "1".equals(px)){
+                list = updateDataTableDao.selectExInfoByNLocation(mapDeal);
+                totalCount = updateDataTableDao.selectExInfoByNLocationCount(mapDeal);
+                totalCountNull = updateDataTableDao.selectExInfoByNLocationCountNull(mapDeal);
+            }else{
+               list = updateDataTableDao.selectExInfoByLocation(mapDeal);
+                totalCount = updateDataTableDao.selectExInfoByLocationCount(mapDeal);
+                totalCountNull = updateDataTableDao.selectExInfoByLocationCountNull(mapDeal);
+            }
+            // totalCount = updateDataTableDao.selectExInfoByLocationCount(mapDeal);
+             //totalCountNull = updateDataTableDao.selectExInfoByLocationCountNull(mapDeal);
             APIPageList<Map<String, Object>> pageList = getAPIPageList(list);
             APIPageResult pageResult = new APIPageResult();
             pageResult.setTotalCount(totalCount+totalCountNull);

+ 6 - 0
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/sysdata/dao/UpdateDataTableDao.java

@@ -83,14 +83,20 @@ public interface UpdateDataTableDao {
 
     List<Map<String, Object>> selectExInfoByLocation(@Param("map") Map<String, Object> map);
 
+    List<Map<String, Object>>  selectExInfoByNLocation(@Param("map") Map<String, Object> map);
+
     int selectExInfoByLocationCount(@Param("map") Map<String,Object> map);
 
+    int selectExInfoByNLocationCount(@Param("map") Map<String,Object> map);
+
     List<Map<String, Object>> selectMobileInspection(@Param("map") Map<String, Object> map);
 
     int selectMobileInspectionCount(@Param("map") Map<String, Object> map);
 
     int selectExInfoByLocationCountNull(@Param("map") Map mapDeal);
 
+    int selectExInfoByNLocationCountNull(@Param("map") Map mapDeal);
+
     List<Map<String, Object>> selectMobileExInfo(@Param("map") Map mapDeal);
 
     int selectMobileExInfoCount(@Param("map") Map mapDeal);

+ 131 - 0
ibps-provider-root/modules/provider-business/src/main/resources/com/lc/ibps/klimsibps/mapping/UpdateDataTableMapper.xml

@@ -350,6 +350,76 @@
             </if>
         </where>
     </select>
+
+    <select id="selectExInfoByNLocation" resultType="java.util.Map" parameterType="java.util.Map">
+        select
+        qb.ti_ku_ming_cheng_ as bankName,
+        f.pei_xun_nei_rong_ as trainId,
+        ex.id_ as examId,
+        ex.ti_ku_id_ as bankId,
+        e.id_ as paperId,
+        ex.zhuang_tai_ as examState,
+        e.zhuang_tai_ as paperState,
+        qb.ti_shu_ as questionCount,
+        qb.zong_fen_ as totalScore,
+        ex.kao_shi_ming_chen as examName,
+        ex.kao_shi_lei_xing_ as examType,
+        ex.can_kao_ren_yuan_ as examinee,
+        e.kao_shi_ren_ as examineeId,
+        ex.create_by_ as createBy,
+        ex.chuang_jian_shi_j as createTime,
+        ex.fa_bu_shi_jian_ as publishDate,
+        ex.fa_bu_ren_ as publisher,
+        ex.xian_kao_shi_jian as limitDate,
+        ex.kao_shi_shi_chang as duration,
+        ex.xian_kao_ci_shu_ as limitCount,
+        ex.da_biao_zhan_bi_ as qualifiedRadio,
+        ex.ji_fen_fang_shi_ as scoringType,
+        ex.yun_xu_bao_ming_ as allowRegist,
+        ex.kao_shi_miao_shu_ as examDesc,
+        ex.shu_ju_yong_tu_ as dataType,
+        ex.sui_ji_chou_ti_ as isRand,
+        ex.chou_ti_fang_shi_ as randWay,
+        ex.sui_ji_ti_shu_ as randNumber,
+        ex.chou_ti_zong_fen_ as randScore,
+        ex.ti_mu_zong_shu_ as randTotal,
+        e.de_fen_ as score,
+        e.bao_ming_shi_jian as applyTime,
+        e.kai_shi_shi_jian_ as startTime,
+        e.jie_shu_shi_jian_ as endTime
+
+        from t_exams ex left join t_question_bank qb on ex.ti_ku_id_ = qb.id_
+        left join t_examination e on e.exam_id_ = ex.id_
+        left join t_lhrypxjlb f on f.id_=ex.guan_lian_id_
+        <where>
+            ex.di_dian_ = #{map.locationId}
+            <if test="@o.Ognl@isNotEmpty(map.kaoShiMingChen)">
+                and ex.kao_shi_ming_chen like CONCAT('%', #{map.kaoShiMingChen}, '%')
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.kaoShiLeiXing)">
+                AND FIND_IN_SET(ex.kao_shi_lei_xing_,#{map.kaoShiLeiXing})
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.zhuangTai)">
+                AND FIND_IN_SET(ex.zhuang_tai_,#{map.zhuangTai})
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.tiKuId)">
+                AND FIND_IN_SET(ex.ti_ku_id_,#{map.tiKuId})
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.chuangJianShiJUp)">
+                AND (ex.chuang_jian_shi_j >= #{map.chuangJianShiJUp} OR ex.chuang_jian_shi_j is null)
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.chuangJianShiJLower)">
+                AND (ex.chuang_jian_shi_j <![CDATA[ <= ]]> #{map.chuangJianShiJLower} OR ex.chuang_jian_shi_j is null)
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.faBuShiJianUp)">
+                AND (ex.fa_bu_shi_jian_ >= #{map.faBuShiJianUp} OR ex.chuang_jian_shi_j is null)
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.faBuShiJianLower)">
+                AND (ex.fa_bu_shi_jian_ <![CDATA[ <= ]]> #{map.faBuShiJianLower} OR ex.chuang_jian_shi_j is null)
+            </if>
+        </where>
+    </select>
+
     <select id="selectExInfoByLocationCount" resultType="java.lang.Integer" parameterType="java.util.Map">
         select
         count(*) as count
@@ -384,6 +454,42 @@
             </if>
         </where>
     </select>
+
+    <select id="selectExInfoByNLocationCount" resultType="java.lang.Integer" parameterType="java.util.Map">
+        select
+        count(*) as count
+        from t_exams ex left join t_question_bank qb on ex.ti_ku_id_ = qb.id_
+        left join t_examination e on e.exam_id_ = ex.id_
+        left join t_lhrypxjlb f on f.id_=ex.guan_lian_id_
+        <where>
+            ex.di_dian_ = #{map.locationId}
+            <if test="@o.Ognl@isNotEmpty(map.kaoShiMingChen)">
+                and ex.kao_shi_ming_chen like CONCAT('%', #{map.kaoShiMingChen}, '%')
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.kaoShiLeiXing)">
+                AND FIND_IN_SET(ex.kao_shi_lei_xing_,#{map.kaoShiLeiXing})
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.zhuangTai)">
+                AND FIND_IN_SET(ex.zhuang_tai_,#{map.zhuangTai})
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.tiKuId)">
+                AND FIND_IN_SET(ex.ti_ku_id_,#{map.tiKuId})
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.chuangJianShiJUp)">
+                AND ex.chuang_jian_shi_j >= #{map.chuangJianShiJUp}
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.chuangJianShiJLower)">
+                AND ex.chuang_jian_shi_j <![CDATA[ <= ]]> #{map.chuangJianShiJLower}
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.faBuShiJianUp)">
+                AND ex.fa_bu_shi_jian_ >= #{map.faBuShiJianUp}
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.faBuShiJianLower)">
+                AND ex.fa_bu_shi_jian_ <![CDATA[ <= ]]> #{map.faBuShiJianLower}
+            </if>
+        </where>
+    </select>
+
     <select id="selectExInfoByLocationCountNull" resultType="java.lang.Integer" parameterType="java.util.Map">
         select
         count(*) as count
@@ -407,6 +513,31 @@
             and ex.chuang_jian_shi_j is null or ex.fa_bu_shi_jian_ is null
         </where>
     </select>
+
+    <select id="selectExInfoByNLocationCountNull" resultType="java.lang.Integer" parameterType="java.util.Map">
+        select
+        count(*) as count
+        from t_exams ex left join t_question_bank qb on ex.ti_ku_id_ = qb.id_
+        left join t_examination e on e.exam_id_ = ex.id_
+        left join t_lhrypxjlb f on f.id_=ex.guan_lian_id_
+        <where>
+            ex.di_dian_ = #{map.locationId}
+            <if test="@o.Ognl@isNotEmpty(map.kaoShiMingChen)">
+                and ex.kao_shi_ming_chen like CONCAT('%', #{map.kaoShiMingChen}, '%')
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.kaoShiLeiXing)">
+                AND FIND_IN_SET(ex.kao_shi_lei_xing_,#{map.kaoShiLeiXing})
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.zhuangTai)">
+                AND FIND_IN_SET(ex.zhuang_tai_,#{map.zhuangTai})
+            </if>
+            <if test="@o.Ognl@isNotEmpty(map.tiKuId)">
+                AND FIND_IN_SET(ex.ti_ku_id_,#{map.tiKuId})
+            </if>
+            and ex.chuang_jian_shi_j is null or ex.fa_bu_shi_jian_ is null
+        </where>
+    </select>
+
     <select id="selectMobileInspection" resultType="java.util.Map" parameterType="java.util.Map">
         select
         *