| | |
| | | return queryForInt(sql.toString(), paramts); |
| | | } |
| | | |
| | | @Override |
| | | public int queryGoodsModelInWareHouseNum(Integer warehouseType, List<Long> warehouseId, Long baseGoodsModelsId, |
| | | Integer states, Integer buyType) { |
| | | StringBuilder sql = new StringBuilder(query_Goods_Model_Num); |
| | | Map<String, Object> paramts = new HashMap<>(); |
| | | |
| | | if (warehouseType != null) { |
| | | sql.append(" and WAREHOUSE_TYPE=:warehouseType"); |
| | | paramts.put("warehouseType", warehouseType); |
| | | } |
| | | if (warehouseId != null) { |
| | | sql.append(" and WAREHOUSE_ID in (:warehouseId)"); |
| | | paramts.put("warehouseId", warehouseId); |
| | | } |
| | | if (baseGoodsModelsId != null) { |
| | | sql.append(" and BASE_GOODS_MODELS_ID=:baseGoodsModelsId"); |
| | | paramts.put("baseGoodsModelsId", baseGoodsModelsId); |
| | | } |
| | | if (states != null) { |
| | | sql.append(" and STATES=:states"); |
| | | paramts.put("states", states); |
| | | } |
| | | if (buyType != null) { |
| | | sql.append(" and BUY_TYPE=:buyType"); |
| | | paramts.put("buyType", buyType); |
| | | } |
| | | return queryForInt(sql.toString(), paramts); |
| | | } |
| | | |
| | | /** |
| | | * 出库时候,先入库的先出库,同时入库的,按价格高的先出库 |
| | | * |