|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.glxp.api.admin.controller.inventory;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.glxp.api.admin.annotation.AuthRuleAnnotation;
|
|
|
|
|
import com.glxp.api.admin.entity.inout.WarehouseBussinessTypeEntity;
|
|
|
|
|
import com.glxp.api.admin.entity.inventory.InvBusUserEntity;
|
|
|
|
@ -9,6 +10,7 @@ import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
|
|
|
|
|
import com.glxp.api.admin.req.inout.DeleteRequest;
|
|
|
|
|
import com.glxp.api.admin.req.inventory.FilterInvBusUserRequest;
|
|
|
|
|
import com.glxp.api.admin.req.inventory.UpdateRelBusRequset;
|
|
|
|
|
import com.glxp.api.admin.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.api.admin.service.inout.WarehouseBussinessTypeService;
|
|
|
|
|
import com.glxp.api.admin.service.inventory.InvBusUserService;
|
|
|
|
|
import com.glxp.api.admin.service.inventory.InvSubWarehouseService;
|
|
|
|
@ -26,6 +28,7 @@ import javax.annotation.Resource;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
public class InvBusUserController {
|
|
|
|
@ -60,6 +63,25 @@ public class InvBusUserController {
|
|
|
|
|
return ResultVOUtils.success(warehouseBussinessTypeEntities);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询用户关联的单据类型
|
|
|
|
|
*
|
|
|
|
|
* @param filterInvBusUserRequest
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@GetMapping("spms/bus/user/filterUserBusList")
|
|
|
|
|
public BaseResponse filterUserBusList(FilterInvBusUserRequest filterInvBusUserRequest) {
|
|
|
|
|
List<InvBusUserEntity> responses = invBusUserService.filterInvBusUser(filterInvBusUserRequest);
|
|
|
|
|
PageInfo<InvBusUserEntity> pageInfo = new PageInfo<>(responses);
|
|
|
|
|
List<String> actions = responses.stream().map(InvBusUserEntity::getScAction).collect(Collectors.toList());
|
|
|
|
|
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities = warehouseBussinessTypeService.selectByActions(filterInvBusUserRequest.getSubInvCode(), actions);
|
|
|
|
|
PageSimpleResponse<WarehouseBussinessTypeEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
|
|
|
|
pageSimpleResponse.setList(warehouseBussinessTypeEntities);
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@PostMapping("/spms/bus/user/warehouse/update")
|
|
|
|
|
public BaseResponse updateRes(@RequestBody UpdateRelBusRequset relBusRequset) {
|
|
|
|
|