public TDefSku checkSku(TDefSku sku) {

		String store = sku.getStore();
		String sql = "SELECT a.Sku, a.PName, a.Clr, a.Size, b.Style, b.StyleName, b.Attrib22 as isStarProduct,  b.Attrib23 as isFinger, b.SkuPrintMoud as remark, b.SafetySort as description FROM [" + ConfigurationManager.getDbName() + "].[dbo].[TDefSku] AS a left join  [" + ConfigurationManager.getDbName() + "].[dbo].[TDefStyle] AS b ON b.Style=a.Style WHERE a.Sku='"
		        + sku.getSku() + "';";
		System.out.println(sql);
		List<Map<String, Object>> results = dao.listBySql(sql);

		if (results.isEmpty()) {
			throw new ResponseException("条形码不存在");
		}
		
		
		Map<String, Object> result = results.get(0);
		if (result.get("isStarProduct") != null && result.get("isStarProduct").toString().equalsIgnoreCase("1")) {
			result.put("isStarProduct", true);
		} else {
			result.put("isStarProduct", false);
		}

		if (result.get("isFinger") != null && result.get("isFinger").toString().equalsIgnoreCase("1")) {
			result.put("isFinger", true);
		} else {
			result.put("isFinger", false);
		}

		sku = (TDefSku) ApiUtil.toEntity(results.get(0), TDefSku.class);

		
		String sizeSql = "SELECT a.Sku, a.Size, b.SizeName FROM [" + ConfigurationManager.getDbName() + "].[dbo].[TDefSku] AS a left join  [" + ConfigurationManager.getDbName() + "].[dbo].[TDefSize] AS b ON b.Size=a.Size WHERE a.Style='"
		        + sku.getStyle() + "' and a.Clr ='" + sku.getClr() + "'" + ";";
		
		List<Map<String, Object>> skuSizeList = dao.listBySql(sizeSql);
		
		System.out.println(sizeSql);
		List<TDefSku> skuList = ApiUtil.toJsonList(skuSizeList, TDefSku.class, null);

		Map<String, Object> sizeMap = new HashMap<String, Object>();

		for (TDefSku defsku : skuList) {

			String contSql = "SELECT a.Qty FROM [" + ConfigurationManager.getDbName() + "].[dbo].[TAccStock] AS a WHERE a.Sku='" + defsku.getSku() + "' and a.Store ='" + store + "'" + ";";
			List<Map<String, Object>> contSqlResults = dao.listBySql(contSql);

			if (contSqlResults.size() > 0) {
				sizeMap.put(defsku.getSizeName(), ApiUtil.getInteger(contSqlResults.get(0).get("Qty"), 0, false));
			}else{
				sizeMap.put(defsku.getSizeName(), 0);
			}

		}

		sku.setSizeMap(sizeMap);
		return sku;

	}