Browse Source

Merge branch 'hot-fix-0801' into feature-201820-wangcz

wangyc 7 years ago
parent
commit
d60220301c

+ 12 - 0
src/main/java/com/uas/platform/b2c/core/config/SysConf.java

@@ -172,6 +172,9 @@ public class SysConf {
 	@Value(("#{sys.messageServiceUrl}"))
 	private String messageServiceUrl;
 
+	@Value(("#{sys.profile}"))
+	private String profile;
+
 	public Boolean getRebuildIndexesOnRefresh() {
 		return rebuildIndexesOnRefresh;
 	}
@@ -375,4 +378,13 @@ public class SysConf {
 	public void setMessageServiceUrl(String messageServiceUrl) {
 		this.messageServiceUrl = messageServiceUrl;
 	}
+
+	public String getProfile() {
+		return profile;
+	}
+
+	public SysConf setProfile(String profile) {
+		this.profile = profile;
+		return this;
+	}
 }

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/controller/ReleaseProductByBatchController.java

@@ -238,7 +238,7 @@ public class ReleaseProductByBatchController {
             long l = System.currentTimeMillis();
             map = releaseProductByBatchService.releaseByWorkbook(workbook, selfSale, currency, isPerson, repeatImport, false);
             long l1 = System.currentTimeMillis();
-            logger.log("批量上架模块", "l1 ------------l" + (l1 - 1));
+           System.err.println("批量上架总时间 ------------" + (l1 - l));
         } catch (IOException e) {
             e.printStackTrace();
         }

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/dao/ReleaseProductByBatchDao.java

@@ -107,7 +107,7 @@ public interface ReleaseProductByBatchDao
 	 * @param batchid
 	 */
 	@Procedure(procedureName = "PRODUCT_RELEASE_VALID_V2_PCB")
-	String callValidProcedurePcb(Long publisherUu, String batchid);
+	void callValidProcedurePcb(Long publisherUu, String batchid);
 
     /**
      * 创建时间 :2017年1月6日 下午8:25:57

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/model/PCBPropertyValue.java

@@ -93,7 +93,7 @@ public class PCBPropertyValue implements Serializable{
     }
 
     public PCBPropertyValue(Long propertyid, String value) {
-        this.productid = propertyid;
+        this.propertyid = propertyid;
         this.value = value;
     }
 }

+ 17 - 11
src/main/java/com/uas/platform/b2c/prod/commodity/model/ReleaseProductByBatch.java

@@ -290,7 +290,7 @@ public class ReleaseProductByBatch implements Serializable {
 	 * 尺寸(pcb)
 	 */
 	@Column(name = "rel_size")
-	private String size;
+	private String sizePcb;
 
 	/**
 	 * 颜色(pcb)
@@ -836,9 +836,11 @@ public class ReleaseProductByBatch implements Serializable {
 	public void setSizeByExcel(Object value) {
 		String str = StringUtilB2C.getStr(value);
 		try {
-			if (!StringUtilB2C.isEmpty(str) && str.getBytes("GBK").length <= 256) {
-				setSize(str);
+			if (!StringUtilB2C.isEmpty(str)) {
+				str = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(str, 256);
+				setSizePcb(str);
 			}
+			setSizePcb(com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(str, 256));
 		} catch (UnsupportedEncodingException e) {
 			throw new RuntimeException(e + "指定字符集不支持");
 		}
@@ -847,7 +849,8 @@ public class ReleaseProductByBatch implements Serializable {
 	public void setColorByExcel(Object value) {
 		String str = StringUtilB2C.getStr(value);
 		try {
-			if (!StringUtilB2C.isEmpty(str) && str.getBytes("GBK").length <= 256) {
+			if (!StringUtilB2C.isEmpty(str)) {
+				str = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(str, 256);
 				setColor(str);
 			}
 		} catch (UnsupportedEncodingException e) {
@@ -858,7 +861,8 @@ public class ReleaseProductByBatch implements Serializable {
 	public void setThickCopperByExcel(Object value) {
 		String str = StringUtilB2C.getStr(value);
 		try {
-			if (!StringUtilB2C.isEmpty(str) && str.getBytes("GBK").length <= 256) {
+			if (!StringUtilB2C.isEmpty(str)) {
+				str = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(str, 256);
 				setThickCopper(str);
 			}
 		} catch (UnsupportedEncodingException e) {
@@ -869,7 +873,8 @@ public class ReleaseProductByBatch implements Serializable {
 	public void setThickByExcel(Object value) {
 		String str = StringUtilB2C.getStr(value);
 		try {
-			if (!StringUtilB2C.isEmpty(str) && str.getBytes("GBK").length <= 256) {
+			if (!StringUtilB2C.isEmpty(str)) {
+				str = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(str, 256);
 				setThick(str);
 			}
 		} catch (UnsupportedEncodingException e) {
@@ -1793,12 +1798,13 @@ public class ReleaseProductByBatch implements Serializable {
 		return this;
 	}
 
-	public String getSize() {
-		return size;
+	public String getSizePcb() {
+		return sizePcb;
 	}
 
-	public void setSize(String size) {
-		this.size = size;
+	public ReleaseProductByBatch setSizePcb(String sizePcb) {
+		this.sizePcb = sizePcb;
+		return this;
 	}
 
 	public String getColor() {
@@ -1910,7 +1916,7 @@ public class ReleaseProductByBatch implements Serializable {
 				", selfMinDelivery=" + selfMinDelivery +
 				", selfMaxDeliveryStr='" + selfMaxDeliveryStr + '\'' +
 				", selfMinDeliveryStr='" + selfMinDeliveryStr + '\'' +
-				", size='" + size + '\'' +
+				", sizePcb='" + sizePcb + '\'' +
 				", color='" + color + '\'' +
 				", thickCopper='" + thickCopper + '\'' +
 				", thick='" + thick + '\'' +

+ 8 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/service/ProductService.java

@@ -331,6 +331,14 @@ public interface ProductService {
     List<Product> findProductsByProdNums(List<String> prodNums);
 
 
+    /**
+     * 根物料标号,获取物料编号和物料id
+     * @param prodNums  物料编号list
+     * @return 返回物料信息。
+     */
+    List<Product> findProductIdAndProdnumsByProdNums(List<String> prodNums);
+
+
     /**
      * 批量保存
      * @param list

+ 2 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductPrivateServiceImpl.java

@@ -86,13 +86,14 @@ public class ProductPrivateServiceImpl implements ProductPrivateService {
         List<ProductPrivate> privateList = findByPrIds(prIds);
         Boolean isExist = false;
         ProductPrivate productPrivate = null;
-        int batchCount = 0;
+        Integer batchCount = 0;
         Map<Long, Integer> goodsCountByProductId = goodsService.batchGetCountByProductId(prIds);
         for (Long productId : prIds) {
             isExist = false;
             batchCount = 0;
             if ((goodsCountByProductId != null) && (goodsCountByProductId.size() != 0)) {
                 batchCount = goodsCountByProductId.get(productId);
+                batchCount = (batchCount == null) ? 0 : batchCount;
             }
             for (ProductPrivate productPri : privateList) {
                 if (productPri.getPrId().longValue() == productId.longValue()) {

+ 41 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -63,6 +63,7 @@ import com.uas.platform.core.persistence.criteria.SimpleExpression;
 import com.uas.platform.core.util.serializer.FlexJsonUtils;
 import org.apache.commons.beanutils.ConvertUtils;
 import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.map.HashedMap;
 import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -2225,12 +2226,51 @@ public class ProductServiceImpl implements ProductService {
     @Override
     public List<Product> findProductsByProdNums(List<String> prodNums) {
         if (CollectionUtils.isNotEmpty(prodNums)) {
-            return productDao.findByProdNums(prodNums);
+            List<Product> productDaoByProdNums = productDao.findByProdNums(prodNums);
+            return productDaoByProdNums;
         } else {
             return new ArrayList<>();
         }
     }
 
+    /**
+     * 根物料标号,获取物料编号和物料id(单独写这个方法是为了解决,从主数据库保存之后,马上获取信息,获取不到的问题,主从同步需要时间)
+     *
+     * @param prodNums 物料编号list
+     * @return 返回物料信息。
+     */
+    @Override
+    public List<Product> findProductIdAndProdnumsByProdNums(List<String> prodNums) {
+        if (CollectionUtils.isEmpty(prodNums)) {
+            return new ArrayList<>();
+        }
+        if (sysConf.getProfile().equals("prod")) {
+            String sql = "/*#mycat:db_type=master*/ select p.pr_id, p.pr_code from products p where p.pr_code in (:prodNums);";
+            Map<String, Object> map = new HashedMap();
+            map.put("prodNums", prodNums);
+            List<Map<String, Object>> maps = namedParameterJdbcTemplate.queryForList(sql, map);
+            List<Product> list = new ArrayList<>();
+            Product product = null;
+            for (Map<String, Object> stringObjectMap : maps) {
+                product = new Product();
+                Object pr_id = stringObjectMap.get("pr_id");
+                if (pr_id != null) {
+                    product.setId((Long) pr_id);
+                }
+                Object pr_code = stringObjectMap.get("pr_code");
+                if (pr_code != null) {
+                    product.setProdNum((String) pr_code);
+                }
+                if ((pr_code != null) && (pr_id != null)) {
+                    list.add(product);
+                }
+            }
+            return list;
+        } else {
+            return findProductsByProdNums(prodNums);
+        }
+    }
+
     /**
      * 批量保存,通过jdbctemplate
      *

+ 72 - 37
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -1,5 +1,7 @@
 package com.uas.platform.b2c.prod.commodity.service.impl;
 
+import static com.uas.platform.b2c.core.utils.NumberUtil.fractionNumCeil;
+
 import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.common.base.dao.CommonDao;
 import com.uas.platform.b2c.core.config.SysConf;
@@ -11,9 +13,27 @@ import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.core.utils.RegexConstant;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
-import com.uas.platform.b2c.prod.commodity.constant.*;
-import com.uas.platform.b2c.prod.commodity.dao.*;
-import com.uas.platform.b2c.prod.commodity.model.*;
+import com.uas.platform.b2c.prod.commodity.constant.DoubleConstant;
+import com.uas.platform.b2c.prod.commodity.constant.ErrorInfoConstant;
+import com.uas.platform.b2c.prod.commodity.constant.ModifyConstant;
+import com.uas.platform.b2c.prod.commodity.constant.ShortConstant;
+import com.uas.platform.b2c.prod.commodity.constant.UploadConstant;
+import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
+import com.uas.platform.b2c.prod.commodity.dao.PCBDao;
+import com.uas.platform.b2c.prod.commodity.dao.PcbPropertyvalueDao;
+import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
+import com.uas.platform.b2c.prod.commodity.dao.ProductPersonDao;
+import com.uas.platform.b2c.prod.commodity.dao.ProductPrivateDao;
+import com.uas.platform.b2c.prod.commodity.dao.ReleaseProductByBatchDao;
+import com.uas.platform.b2c.prod.commodity.dao.V_ProductPrivateDao;
+import com.uas.platform.b2c.prod.commodity.model.Goods;
+import com.uas.platform.b2c.prod.commodity.model.GoodsQtyPrice;
+import com.uas.platform.b2c.prod.commodity.model.PCB;
+import com.uas.platform.b2c.prod.commodity.model.PCBPropertyValue;
+import com.uas.platform.b2c.prod.commodity.model.Product;
+import com.uas.platform.b2c.prod.commodity.model.ProductPerson;
+import com.uas.platform.b2c.prod.commodity.model.ProductPrivate;
+import com.uas.platform.b2c.prod.commodity.model.ReleaseProductByBatch;
 import com.uas.platform.b2c.prod.commodity.service.GoodsService;
 import com.uas.platform.b2c.prod.commodity.service.ProductPrivateService;
 import com.uas.platform.b2c.prod.commodity.service.ProductService;
@@ -38,12 +58,41 @@ import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.persistence.criteria.CriterionExpression;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
+import java.math.BigDecimal;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.map.HashedMap;
 import org.apache.log4j.Logger;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
-import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.DateUtil;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.dao.DataAccessException;
@@ -58,25 +107,6 @@ import org.springframework.ui.ModelMap;
 import org.springframework.util.StringUtils;
 import org.springframework.web.client.RestTemplate;
 
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import java.math.BigDecimal;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import static com.uas.platform.b2c.core.utils.NumberUtil.fractionNumCeil;
-
 @Service
 public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchService {
 
@@ -179,6 +209,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	 */
 	@Override
 	public ModelMap releaseByWorkbook(Workbook workbook, Boolean selfSale, String currency, Integer isPerson, Integer repeatImport, boolean isPcb) {
+		long l = System.currentTimeMillis();
 		// 是否上传个人物料
 		boolean isAPerson = false;
 		boolean isImport = false;
@@ -210,7 +241,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		Row headerRow = sheet.getRow(0);
 		int total = 0;
 		int blankNum = 0;
-		long l = System.currentTimeMillis();
 		if (headerRow != null) {
 			// 验证模板是否为商城模板
 			validateTemplate(headerRow, colNum, currency, isAPerson, isPcb);
@@ -303,9 +333,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			}
 		}
 		Long l5 = 0l;
-		String strCount = "";
+		String strCount = "0";
 		if (isPcb) {
-			strCount = releaseProductByBatchDao.callValidProcedurePcb(enUU, batch);
+			 releaseProductByBatchDao.callValidProcedurePcb(enUU, batch);
 		} else {
 			final Object[] obj = new Object[]{enUU, batch};
 			String sql = "/*#mycat:db_type=master*/ set @enuu = %s; set @batch = '%s'; call PRODUCT_RELEASE_VALID_V5(@enuu, @batch, @out); select @out";
@@ -348,6 +378,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		modelMap.put("failure", failure);
 		modelMap.put("filter", filter);
 		modelMap.put("batch", batch);
+		long l6 = System.currentTimeMillis();
+		System.err.println("l6--------------l6 testyuj" + (l6 - l5));
 		return modelMap;
 	}
 
@@ -1065,7 +1097,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		aProduct.setBrandEnByExcel(brandValue);
 		// pcb模块判断类目是否为商城标准品牌
 		if (isPcb && !StringUtils.isEmpty(aProduct.getBrandNameEn())) {
-			List<BrandInfo> brandInfos = brandInfoDao.findByNameEn(aProduct.getBrandNameEn());
+			List<BrandInfo> brandInfos = brandInfoDao.findByName(aProduct.getBrandNameEn());
 			if (CollectionUtils.isNotEmpty(brandInfos)) {
 				BrandInfo brandInfo = brandInfos.get(0);
 				if (brandInfo != null && brandInfo.getId() != null) {
@@ -1712,7 +1744,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		List<ReleaseProductByBatch> releaseProductByBatchList =
 				releaseProductByBatchDao.findByRelbatchid(batch);
 		long l1 = System.currentTimeMillis();
-		System.err.println("l1 -------------------l " + (l1 - l));
 		if (CollectionUtils.isEmpty(releaseProductByBatchList)) {
 			return String.valueOf(IntegerConstant.NO_SHORT);
 		}
@@ -1777,11 +1808,14 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				}
 			}
 
-			List<PCBPropertyValue> propertyValues = (List<PCBPropertyValue>) map.get(product.getEnUU().toString().concat(product.getProdNum()));
-			if (CollectionUtils.isNotEmpty(propertyValues)) {
-				for (PCBPropertyValue propertyValue : propertyValues) {
-					propertyValue.setProductid(prId);
-					propertyValueList.add(propertyValue);
+			if (map.get("propertyvalues") != null) {
+				Map<String, List<PCBPropertyValue>> pcbPropertyValueMap = (Map<String, List<PCBPropertyValue>>) map.get("propertyvalues");
+				List<PCBPropertyValue> propertyValues = pcbPropertyValueMap.get(product.getEnUU().toString().concat(product.getProdNum()));
+				if (CollectionUtils.isNotEmpty(propertyValues)) {
+					for (PCBPropertyValue propertyValue : propertyValues) {
+						propertyValue.setProductid(prId);
+						propertyValueList.add(propertyValue);
+					}
 				}
 			}
 		}
@@ -1845,8 +1879,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 
 				if (isPcb) {
 					List<PCBPropertyValue> propertyValues = new ArrayList<>();
-					if (!StringUtils.isEmpty(releaseProductByBatch.getSize())) {
-						PCBPropertyValue propertyValue = new PCBPropertyValue(sizeProId, releaseProductByBatch.getSize());
+					if (!StringUtils.isEmpty(releaseProductByBatch.getSizePcb())) {
+						PCBPropertyValue propertyValue = new PCBPropertyValue(sizeProId, releaseProductByBatch.getSizePcb());
 						propertyValues.add(propertyValue);
 					}
 					if (!StringUtils.isEmpty(releaseProductByBatch.getColor())) {
@@ -1872,7 +1906,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		List<ReleaseProductByBatch> reList = new ArrayList<>();
 		if (productsfromRelease.size() != 0) {
             productService.saveByJdbcTemplate(productsfromRelease);
-			List<Product> productes = productService.findProductsByProdNums(proNums);
+			List<Product> productes = productService.findProductIdAndProdnumsByProdNums(proNums);
+            System.err.println("新增物料之后,获取物料的个数=" + productes.size() + "新增物料的个数 =" + productsfromRelease.size());
 			for (Product producte : productes) {
 				ProductPrivate productPrivate = new ProductPrivate();
 				productPrivate.setB2cEnabled(IntegerConstant.YES_SHORT);
@@ -1882,7 +1917,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 
 				prIds.add(producte.getId());
 
-				for (ReleaseProductByBatch releaseProductByBatch : releaseProductByBatchList) {
+				for (ReleaseProductByBatch releaseProductByBatch : productsfromRelease) {
 					if (StringUtilB2C.equals(releaseProductByBatch.getProductNum(), producte.getProdNum())) {
 						releaseProductByBatch.setProductid(producte.getId());
 						reList.add(releaseProductByBatch);

+ 12 - 10
src/main/java/com/uas/platform/b2c/prod/product/brand/dao/BrandInfoDao.java

@@ -1,18 +1,12 @@
 package com.uas.platform.b2c.prod.product.brand.dao;
 
-import java.util.List;
-
-import javax.persistence.QueryHint;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Modifying;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.jpa.repository.QueryHints;
+import com.uas.platform.b2c.prod.product.brand.modal.BrandInfo;
+import org.springframework.data.jpa.repository.*;
 import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
-import com.uas.platform.b2c.prod.product.brand.modal.BrandInfo;
+import javax.persistence.QueryHint;
+import java.util.List;
 
 /**
  * 品牌简易信息
@@ -50,6 +44,14 @@ public interface BrandInfoDao extends JpaSpecificationExecutor<BrandInfo>, JpaRe
 	@QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value = "true") })
 	public List<BrandInfo> findByNameCn(String nameCn);
 
+	/**
+	 * 根据品牌中文名和英文名 获取品牌信息
+	 * @param name 品牌名称
+	 * @return List<BrandInfo>
+	 */
+	@Query(value = "select b from BrandInfo b where b.nameCn = :name or b.nameEn = :name")
+	List<BrandInfo> findByName(@Param("name") String name);
+
 	/**
 	 * 根据品牌英文名查找品牌信息
 	 * 

BIN
src/main/resources/jxls-tpl/trade/releasePCBByBatchError-rmb.xls


BIN
src/main/resources/jxls-tpl/trade/releasePCBByBatchError-usd.xls


+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_delivery_rule.html

@@ -260,7 +260,7 @@
 	[ui-tour] > li {
 		display: none;
 	}
-	.active {
+	.com_tab .active {
 		display: block !important;
 	}