|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.glxp.api.controller.auth;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
@ -10,7 +11,9 @@ import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.entity.auth.AuthAdmin;
|
|
|
|
|
import com.glxp.api.entity.auth.DeptEntity;
|
|
|
|
|
import com.glxp.api.entity.auth.InvWarehouseEntity;
|
|
|
|
|
import com.glxp.api.entity.auth.WarehouseUserEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemParamConfigEntity;
|
|
|
|
|
import com.glxp.api.req.auth.FilterInvLinkDataRequest;
|
|
|
|
|
import com.glxp.api.req.auth.FilterInvSubWarehouseRequest;
|
|
|
|
|
import com.glxp.api.req.auth.FilterInvWarehouseRequest;
|
|
|
|
|
import com.glxp.api.req.system.DeleteRequest;
|
|
|
|
@ -18,11 +21,13 @@ import com.glxp.api.req.system.FilterBasicThirdSysRequest;
|
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.api.res.auth.InvSubWarehouseResponse;
|
|
|
|
|
import com.glxp.api.res.auth.InvWarehouseThirdSysResponse;
|
|
|
|
|
import com.glxp.api.res.auth.WarehouseUserResponse;
|
|
|
|
|
import com.glxp.api.service.auth.CustomerService;
|
|
|
|
|
import com.glxp.api.service.auth.DeptService;
|
|
|
|
|
import com.glxp.api.service.auth.InvWarehouseService;
|
|
|
|
|
import com.glxp.api.service.auth.WarehouseUserService;
|
|
|
|
|
import com.glxp.api.service.system.SystemParamConfigService;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
@ -31,6 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
@ -45,8 +51,6 @@ public class InvWarehouseController {
|
|
|
|
|
CustomerService customerService;
|
|
|
|
|
@Resource
|
|
|
|
|
private WarehouseUserService warehouseUserService;
|
|
|
|
|
// @Resource
|
|
|
|
|
// private InvSpaceService invSpaceService;
|
|
|
|
|
@Resource
|
|
|
|
|
private SystemParamConfigService systemParamConfigService;
|
|
|
|
|
|
|
|
|
@ -294,4 +298,32 @@ public class InvWarehouseController {
|
|
|
|
|
return ResultVOUtils.success(responses);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据仓位码获取关联用户数据
|
|
|
|
|
*/
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@PostMapping("/warehouse/inout/warehouseUserList")
|
|
|
|
|
public BaseResponse getWarehouseUserList(@RequestBody @Valid FilterInvLinkDataRequest filterInvLinkDataRequest, BindingResult bindingResult) {
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
|
}
|
|
|
|
|
List<WarehouseUserEntity> warehouseUserEntities = warehouseUserService.getWarehouseUserList(filterInvLinkDataRequest);
|
|
|
|
|
PageInfo<WarehouseUserEntity> pageInfo = new PageInfo<>(warehouseUserEntities);
|
|
|
|
|
|
|
|
|
|
List<WarehouseUserResponse> result = new ArrayList<>();
|
|
|
|
|
if (CollUtil.isNotEmpty(pageInfo.getList())) {
|
|
|
|
|
pageInfo.getList().forEach(warehouseUserEntity -> {
|
|
|
|
|
WarehouseUserResponse warehouseUserResponse = new WarehouseUserResponse();
|
|
|
|
|
BeanUtils.copyProperties(warehouseUserEntity, warehouseUserResponse);
|
|
|
|
|
warehouseUserResponse.setUserid(warehouseUserEntity.getUserid() + "");
|
|
|
|
|
result.add(warehouseUserResponse);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
PageSimpleResponse<WarehouseUserResponse> response = new PageSimpleResponse<>();
|
|
|
|
|
response.setList(result);
|
|
|
|
|
response.setTotal(pageInfo.getTotal());
|
|
|
|
|
return ResultVOUtils.success(response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|