| | |
| | | import com.consum.model.po.FinSysTenantDepartment; |
| | | import com.consum.model.po.SDictData; |
| | | 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 java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description 仓库管理 |
| | |
| | | @Autowired |
| | | private FinSysTenantServiceImpl finSysTenantService; |
| | | @Autowired |
| | | private FinSysTenantDepartmentServiceImpl departmentService; |
| | | @Autowired |
| | | private FinSysTenantUserServiceImpl userService; |
| | | private FinSysTenantDepartmentService departmentService; |
| | | @Autowired |
| | | private SDictDataServiceImpl sDictDataService; |
| | | |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public BaseWarehouse getWarehouseByAgencyId(Long agencyId, String warehouseName) { |
| | | StringBuilder sql = new StringBuilder("SELECT * FROM base_warehouse WHERE STATES= 1"); |
| | | Map<String, Object> param = new HashMap<>(); |
| | | if (agencyId != null) { |
| | | sql.append(" and AGENCY_ID =:agencyId "); |
| | | param.put("agencyId", agencyId); |
| | | } |
| | | if (StringUtils.isNotEmpty(warehouseName)) { |
| | | sql.append(" and WAREHOUSE_NAME =:warehouseName "); |
| | | param.put("warehouseName", warehouseName); |
| | | } |
| | | sql.append(" limit 1"); |
| | | List<BaseWarehouse> select = select(sql.toString(), param, new BaseWarehouse()); |
| | | if (CollectionUtils.isEmpty(select)) { |
| | | return null; |
| | | } |
| | | return select.get(0); |
| | | } |
| | | } |