guantao 3 سال پیش
والد
کامیت
7fb3d2fb2e

+ 1 - 1
wxdks/src/main/java/com/c3/wxdks/controller/OrgInfoController.java

@@ -115,7 +115,7 @@ public class OrgInfoController {
 //            return SendUtil.send(false, ConstString.REQUEST_WRONGPARAMS, null);
 //        }
         Map<String, Object> param = new HashMap<>();
-        param.put("columnId", columnId);
+        param.put("columnId", columnId == null ? null : columnId.split(","));
         param.put("classification", classification == null ? null : classification.split(","));
         param.put("keyword", keyword);
         param.put("type", type);

+ 2 - 2
wxdks/src/main/java/com/c3/wxdks/controller/RecruitController.java

@@ -131,8 +131,8 @@ public class RecruitController {
 //        map.put("page", (page - 1) * limit);
 //        map.put("limit", limit);
         map.put("releaseSort", releaseSort);
-        map.put("workExperience", recruit.getWorkExperience());
-        map.put("education", recruit.getEducation());
+        map.put("workExperience", recruit.getWorkExperience() != null ? recruit.getWorkExperience().split(",") : null);
+        map.put("education", recruit.getEducation() != null ? recruit.getEducation().split(",") : null);
         map.put("orgNature", recruit.getOrgNature());
         map.put("scale", recruit.getScale());
         map.put("minSalary", recruit.getMinSalary());

+ 33 - 33
wxdks/src/main/java/com/c3/wxdks/service/impl/OrgInfoServiceImpl.java

@@ -246,39 +246,39 @@ public class OrgInfoServiceImpl implements OrgInfoService {
 
     @Override
     public Map<String, Object> getFrontListPage(Map<String, Object> param) {
-        List<Integer> classifications = Convert.toList(Integer.class, param.get("classification"));
-        Integer type = Convert.toInt(param.get("type"));
-        if (Blank.isNotEmpty(classifications)){
-            List<Map<String, Object>> list = orgInfoMapper.getClassQueryNum(classifications);
-            if (Blank.isNotEmpty(list)) {
-                for (int i = 0; i < classifications.size(); i++) {
-                    Integer item = classifications.get(i);
-                    boolean hasEqual = true;
-                    for (int j = 0; j < list.size(); j++) {
-                        Map<String, Object> map = list.get(j);
-                        Integer classId = Convert.toInt(map.get("classId"));
-                        Integer num = Convert.toInt(map.get("num"));
-                        Integer id = Convert.toInt(map.get("id"));
-                        if (item.equals(classId)){
-                            // 更新
-                            orgInfoMapper.updateQueryClassNum(id, num + 1);
-                            break;
-                        } else if (j == list.size() - 1){
-                            hasEqual = false;
-                        }
-                    }
-
-                    // 没有相等则插入
-                    if (!hasEqual) {
-                        // 插入
-                        orgInfoMapper.saveQueryClassNum(item, type);
-                    }
-                }
-            } else {
-                // 批量插入
-                orgInfoMapper.batchSaveQueryClassNum(classifications, type);
-            }
-        }
+//        List<Integer> classifications = Convert.toList(Integer.class, param.get("classification"));
+//        Integer type = Convert.toInt(param.get("type"));
+//        if (Blank.isNotEmpty(classifications)){
+//            List<Map<String, Object>> list = orgInfoMapper.getClassQueryNum(classifications);
+//            if (Blank.isNotEmpty(list)) {
+//                for (int i = 0; i < classifications.size(); i++) {
+//                    Integer item = classifications.get(i);
+//                    boolean hasEqual = true;
+//                    for (int j = 0; j < list.size(); j++) {
+//                        Map<String, Object> map = list.get(j);
+//                        Integer classId = Convert.toInt(map.get("classId"));
+//                        Integer num = Convert.toInt(map.get("num"));
+//                        Integer id = Convert.toInt(map.get("id"));
+//                        if (item.equals(classId)){
+//                            // 更新
+//                            orgInfoMapper.updateQueryClassNum(id, num + 1);
+//                            break;
+//                        } else if (j == list.size() - 1){
+//                            hasEqual = false;
+//                        }
+//                    }
+//
+//                    // 没有相等则插入
+//                    if (!hasEqual) {
+//                        // 插入
+//                        orgInfoMapper.saveQueryClassNum(item, type);
+//                    }
+//                }
+//            } else {
+//                // 批量插入
+//                orgInfoMapper.batchSaveQueryClassNum(classifications, type);
+//            }
+//        }
 
         return SendUtil.send(true, "", orgInfoMapper.getFrontListPage(param));
     }

+ 5 - 2
wxdks/src/main/resources/com/c3/wxdks/mapper/OrgInfoMapper.xml

@@ -180,8 +180,11 @@
             t_org_info
         where
               1=1
-            <if test="columnId != null and columnId != ''">
-                and CONCAT(column_id, ',') like CONCAT('%', #{columnId}, ',', '%')
+            <if test="columnId != null and columnId.length > 0">
+                <foreach item="item" collection="columnId">
+                    and CONCAT(column_id, ',') like CONCAT('%', #{item}, ',', '%')
+                </foreach>
+                <!-- and CONCAT(column_id, ',') like CONCAT('%', #{columnId}, ',', '%') -->
             </if>
             <if test="classification != null and classification.length > 0">
                 <foreach item="item" collection="classification">

+ 10 - 4
wxdks/src/main/resources/com/c3/wxdks/mapper/RecruitMapper.xml

@@ -124,11 +124,17 @@
             LEFT JOIN t_dict td2 ON tri.education = td2.dict_id
         WHERE
             1 = 1
-            <if test="workExperience != null and workExperience != ''">
-                and work_experience = #{workExperience}
+            <if test="workExperience != null and workExperience.length > 0">
+                <foreach item="item" collection="workExperience">
+                    and CONCAT(work_experience, ',') like CONCAT('%', #{item}, ',', '%')
+                </foreach>
+                <!-- and work_experience = #{workExperience} -->
             </if>
-            <if test="education != null and education != ''">
-                and education = #{education}
+            <if test="education != null and education.length > 0">
+                <foreach item="item" collection="education">
+                    and CONCAT(education, ',') like CONCAT('%', #{item}, ',', '%')
+                </foreach>
+                <!-- and education = #{education} -->
             </if>
             <if test="orgNature != null">
                 and org_nature = #{orgNature}

+ 5 - 1
wxdks/src/main/resources/static/zlhbw/jgjj/jgjj.css

@@ -175,4 +175,8 @@
 
 .layui-laypage-em {
     background-color: #006DB8 !important;
-}
+}
+
+.xlcontent{
+    width: 100% !important;
+}

+ 41 - 15
wxdks/src/main/resources/static/zlhbw/jrwm/jrwm.js

@@ -98,28 +98,54 @@ function initPageClick() {
 	$(".xz-content").on('click', 'span', function(){
 		var hasExpClass = $(this).parent().hasClass('work-exp');
 		var hasEduClass = $(this).parent().hasClass('education-require');
-		if (hasExpClass) {
-			var hasActive = $(this).hasClass('textActive');
-			if (hasActive) {
-				$(this).removeClass('textActive');
-				condition.workExperience = '';
+		var dataValue = $(this).attr('data-value');
+
+		var hasActive = $(this).hasClass('textActive');
+		if (hasActive) {
+			$(this).removeClass('textActive');
+		} else {
+			if (dataValue) {
+				$(this).addClass('textActive');
+				$(this).siblings('span[data-value=""]').removeClass('textActive')
 			} else {
+				$(this).siblings().removeClass('textActive');
 				$(this).addClass('textActive');
-				condition.workExperience = $(this).attr('data-value');
 			}
-			// $(this).addClass("textActive").siblings("span").removeClass("textActive");
+		}
+
+		if (hasExpClass) {
+			var workExp = condition.workExperience.split(',');
+			if (workExp.length == 1 && workExp[0] == ''){
+				workExp = []
+			}
+			if (dataValue) {
+				if (hasActive) {
+					workExp.splice(workExp.indexOf(dataValue));
+				} else {
+					workExp.push(dataValue);
+				}
+			} else {
+				workExp = [];
+			}
+			condition.workExperience = workExp.join(',');
 			getRecruitList();
 		}
+
 		if (hasEduClass) {
-			var hasActive = $(this).hasClass('textActive');
-			if (hasActive) {
-				$(this).removeClass('textActive');
-				condition.education = '';
+			var edu = condition.education.split(',');
+			if (edu.length == 1 && edu[0] == ''){
+				edu = []
+			}
+			if (dataValue) {
+				if (hasActive) {
+					edu.splice(edu.indexOf(dataValue));
+				} else {
+					edu.push(dataValue);
+				}
 			} else {
-				$(this).addClass('textActive');
-				condition.education = $(this).attr('data-value');
+				edu = [];
 			}
-			// $(this).addClass("textActive").siblings("span").removeClass("textActive");
+			condition.education = edu.join(',');
 			getRecruitList();
 		}
 	})
@@ -147,7 +173,7 @@ function initPageClick() {
 			$('input[name=qsxz]').val("");
 			$('input[name=jsxz]').val("");
 		}
-		
+
 	})
 
 	$('.xzconfirm').on('click', function () {

+ 1 - 1
wxdks/src/main/resources/static/zlhbw/js/base.js

@@ -165,4 +165,4 @@ if (searchVal == '') {
 // 		clickable: true,
 // 	},
 //
-// });
+// });

+ 2 - 2
wxdks/src/main/resources/static/zlhbw/js/search.js

@@ -76,7 +76,7 @@ function initPageList() {
                         '<div class="btname ' + (data[i].stype == 2 ? 'jgname' : '') + '">' + (keyword ? data[i].title.replaceAll(keyword, '<span class="gjz">' + keyword + '</span>') : data[i].title) + '</div>' +
                         '</div>' +
                         '<div class="article-content">' +
-                        (keyword && data[i].summary ? data[i].summary.replaceAll(keyword, '<span class="gjz">' + keyword + '</span>') : data[i].summary) +
+                        (keyword && data[i].summary ? data[i].summary.replaceAll(keyword, '<span class="gjz">' + keyword + '</span>') : (data[i].summary ? data[i].summary : '暂无摘要')) +
                         '</div>' +
                         '<div class="article-end">' +
                         '<span class="source ' + (data[i].stype == 2 ? 'jgname' : '') + '">' + (data[i].editor ? data[i].editor : (data[i].stype == 1 ? '暂无来源' : "暂无联系地址")) + '</span>' +
@@ -135,4 +135,4 @@ var swiper = new Swiper(".topSwiper", {
         clickable: true,
     },
 
-});
+});

+ 3 - 1
wxdks/src/main/resources/static/zlhbw/xfz/xfz.js

@@ -45,8 +45,9 @@ layui.config({
         var checked = $(this)[0].checked;
         var dataId = $(this).attr('data-id');
         var tagText = $(this).attr('title');
+        var parentKey = $(this).attr('data-parentkey');
         if (checked) {
-            var html = '<li class="tag_item" data-id="' + dataId + '">' +
+            var html = '<li class="tag_item" data-id="' + dataId + '" data-conditionKey="' + parentKey + '">' +
                 '<span class="tag_text">' + tagText + '</span>' +
                 '<i class="layui-icon layui-icon-close"></i>' +
                 '</li>';
@@ -82,6 +83,7 @@ layui.config({
             $(this).removeClass('active_sort');
             if (group.length > 0) {
                 group.remove();
+                $('.tagi li[data-conditionkey="' + dataKey + '"]').remove();
             }
         } else {
             $(this).addClass('active_sort');