| | |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.consum.base.pojo.query.WhWarningConfigQry; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | HashMap<String, Object> paramts = (HashMap<String, Object>) configListQueryMap.get("paramts"); |
| | | return selectSplit(sql.toString(), paramts, param.getPageNum(), param.getPageSize(), new MapperUtil()); |
| | | } |
| | | |
| | | |
| | | |
| | | private Map<String, Object> getConfigListQueryMap(WhWarningConfigQry param) { |
| | |
| | | return configListQueryMap; |
| | | } |
| | | |
| | | private String QUERY_MODEL_IS_EXIST = ""; |
| | | |
| | | public List<Map<String, Object>> queryModelIsExist(Integer warehouseType, Long baseWarehouseId, List<Long> modelIds) { |
| | | StringBuilder sql = new StringBuilder("select WAREHOUSE_TYPE, BASE_WAREHOUSE_ID, BASE_GOODS_MODELS_ID from WH_WARNING_CONFIG where 1=1"); |
| | | HashMap<String, Object> paramts = new HashMap<>(); |
| | | |
| | | //仓库类型 |
| | | if (warehouseType != null) { |
| | | sql.append(" AND WAREHOUSE_TYPE = :warehouseType"); |
| | | paramts.put("warehouseType", warehouseType); |
| | | } |
| | | if (baseWarehouseId != null) { |
| | | sql.append(" AND BASE_WAREHOUSE_ID = :warehouseId"); |
| | | paramts.put("warehouseId", baseWarehouseId); |
| | | } |
| | | if (!CollectionUtils.isEmpty(modelIds)) { |
| | | sql.append(" AND BASE_GOODS_MODELS_ID in(:modelIds)"); |
| | | paramts.put("modelIds", org.apache.commons.lang3.StringUtils.join(modelIds, ",")); |
| | | } |
| | | return select(sql.toString(), paramts, new MapperUtil()); |
| | | } |
| | | |
| | | |
| | | } |