| | |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.pojo.BaseWarehouseParam; |
| | | import com.consum.base.pojo.FinSysTenantDepartmentParam; |
| | | import com.consum.base.service.BaseWarehouseServiceImpl; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantDepartment; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description 仓库管理 |
| | |
| | | //TODO 加权限 省级管理员录入所有仓库信息 |
| | | |
| | | int result = this.baseWarehouseService.add(param); |
| | | if (result > 0) return ResponseValue.success(1); |
| | | if (result > 0) { |
| | | return ResponseValue.success(1); |
| | | } |
| | | return ResponseValue.error("新增失败!"); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 根据仓库id查询仓库详情 |
| | | * |
| | | * @author 卢庆阳 |
| | | * @Date 2023/10/26 |
| | | */ |
| | |
| | | return ResponseValue.error("仓库id为空"); |
| | | } |
| | | BaseWarehouse baseWarehouse = this.baseWarehouseService.getById(id); |
| | | if (baseWarehouse == null) return ResponseValue.error("查询失败!"); |
| | | if (baseWarehouse == null) { |
| | | return ResponseValue.error("查询失败!"); |
| | | } |
| | | return ResponseValue.success("查询成功!", baseWarehouse); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("/select/userList") |
| | | public ResponseValue queryList(Long baseWarehouseId) { |
| | | if (baseWarehouseId == null){ |
| | | if (baseWarehouseId == null) { |
| | | return ResponseValue.error("仓库id为空"); |
| | | } |
| | | this.baseWarehouseService.queryUserList(baseWarehouseId); |
| | |
| | | } |
| | | |
| | | /** |
| | | * @Description 根据机构id查询机构仓库 |
| | | * @Description 根据机构id查询机构仓库 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/27 |
| | | */ |
| | | @GetMapping("/select/tenant_warehouse") |
| | | public ResponseValue getByAgencyId(Long agencyId) { |
| | | if (agencyId == null) { |
| | | return ResponseValue.error("机构id为空"); |
| | | } |
| | | // TODO 暂无机构 |
| | | // if (agencyId == null) { |
| | | // return ResponseValue.error("机构id为空"); |
| | | // } |
| | | List<BaseWarehouse> list = this.baseWarehouseService.getByAgencyId(agencyId); |
| | | if (list == null) return ResponseValue.error("查询失败!"); |
| | | if (list == null) { |
| | | return ResponseValue.error("查询失败!"); |
| | | } |
| | | return ResponseValue.success("查询成功!", list); |
| | | } |
| | | |