初始化自定义表单

20231126-yw
yuanwei 1 year ago
parent 91be062416
commit 24125058bc

@ -11,6 +11,7 @@ import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.controller.BaseController;
import com.glxp.api.dto.DictDto;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.auth.DeptEntity;
import com.glxp.api.entity.auth.DeptUserEntity;
@ -69,6 +70,18 @@ public class DeptController extends BaseController {
return ResultVOUtils.success(invWarehouseEntities);
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterAllOptimize")
public BaseResponse filterAllInvWarehouseOptimize(FilterInvWarehouseRequest filterInvWarehouseRequest) {
filterInvWarehouseRequest.setPid(0);
filterInvWarehouseRequest.setStatus(1);
List<DeptEntity> invWarehouseEntities = deptService.filterInvWarehouse(filterInvWarehouseRequest);
List<DictDto> reList = invWarehouseEntities.stream().map(s-> {
DictDto dictDto = new DictDto(s.getCode(),s.getName());
return dictDto;
}).collect(Collectors.toList());
return ResultVOUtils.success(reList);
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterNext")
@ -100,6 +113,29 @@ public class DeptController extends BaseController {
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterByUserOptimize")
public BaseResponse filterByUserOptimize(FilterInvWarehouseRequest filterInvWarehouseRequest) {
if (isHosUser()) {
AuthAdmin authAdmin = customerService.getUserBean();
filterInvWarehouseRequest.setUserId(authAdmin.getId());
} else {
}
filterInvWarehouseRequest.setPid(0);
filterInvWarehouseRequest.setStatus(1);
List<DeptEntity> mInvWarehouseEntities = deptService.filterAllByUser(filterInvWarehouseRequest);
List<DictDto> reList = mInvWarehouseEntities.stream().map(s-> {
DictDto dictDto = new DictDto(s.getCode(),s.getName());
return dictDto;
}).collect(Collectors.toList());
return ResultVOUtils.success(reList);
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterAllLocInv")
public BaseResponse filterAllLocInv(FilterInvWarehouseRequest filterInvWarehouseRequest) {

@ -12,6 +12,7 @@ import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.controller.BaseController;
import com.glxp.api.dto.DictDto;
import com.glxp.api.entity.auth.*;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.req.auth.*;
@ -141,6 +142,29 @@ public class InvWarehouseController extends BaseController {
return ResultVOUtils.success(list);
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/findInvListByUserOptimize")
public BaseResponse findInvListByUserOptimize(FilterInvWarehouseRequest filterInvWarehouseRequest) {
Long userId = getUserId();
if (null == userId) {
return ResultVOUtils.error(ResultEnum.LOGIN_VERIFY_FALL);
}
if (isHosUser()) {
filterInvWarehouseRequest.setUserId(userId);
} else {
filterInvWarehouseRequest.setUserId(null);
filterInvWarehouseRequest.setSpUse(true);
}
List<InvWarehouseEntity> list = invWarehouseService.findInvListByUser(filterInvWarehouseRequest);
List<DictDto> reList = list.stream().map(s-> {
DictDto dictDto = new DictDto(s.getCode(),s.getName());
return dictDto;
}).collect(Collectors.toList());
return ResultVOUtils.success(reList);
}
/**
* ()
*

Loading…
Cancel
Save