@Override
	public ResultMessage addGoodsClass(GoodsClassPO goodsClassPO) {
		if(goodsClassPO.goodsClassName.equals("")) return ResultMessage.add_failure;
		boolean hasFather = false;
		gcIter = goodsClassList.iterator();
		GoodsClassPO gcp;
		System.out.println(goodsClassPO.fatherGoodsClassNum);
		if(goodsClassPO.fatherGoodsClassNum == 0)
			hasFather = true;
		while(gcIter.hasNext()) {
			gcp = gcIter.next();
			if(gcp.goodsClassName.equals(goodsClassPO.goodsClassName))
				return ResultMessage.add_failure;
			hasFather = hasFather || (gcp.Num == goodsClassPO.fatherGoodsClassNum);
		}
		if(hasFather) {
			System.out.println("ca");
			if(goodsClassList.size() != 0) {
				goodsClassPO.Num = goodsClassList.get(goodsClassList.size() - 1).Num + 1;
			}
			else {
				goodsClassPO.Num = 1;
			}
			goodsClassList.add(goodsClassPO);
			writeFile();
			return ResultMessage.add_success;
		}
		return ResultMessage.add_failure;
		
	}