diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java index 72577538..db0e858e 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java @@ -278,25 +278,20 @@ public class StockOrderController { } List stockOrderEntityList; - if (StringUtils.isNotBlank(stockOrderFilterRequest.getCorpId())) { - Integer userId = customerService.getUserId(); - stockOrderFilterRequest.setUnitIdFk(null); - stockOrderFilterRequest.setUserId(customerService.getUserId()); - if (StrUtil.isNotEmpty(stockOrderFilterRequest.getLocStorageCode())) { - InvWarehouseEntity invWarehouseEntity = invWarehouseService.selectByCode(stockOrderFilterRequest.getLocStorageCode()); - FilterInvUserRequest filterInvUserRequest = new FilterInvUserRequest(); - filterInvUserRequest.setCode(invWarehouseEntity.getCode()); - filterInvUserRequest.setUserid(userId.longValue()); - filterInvUserRequest.setIsDirector(true); - List warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest); - if (CollUtil.isEmpty(warehouseUserEntities)) { - stockOrderFilterRequest.setUnionUser(userId); - } - } else { - return ResultVOUtils.error(500, "请先选择当前仓库"); - } - stockOrderFilterRequest.setCorpId(null); + Integer userId = customerService.getUserId(); + stockOrderFilterRequest.setUnitIdFk(null); + stockOrderFilterRequest.setUserId(customerService.getUserId()); + if (StrUtil.isNotEmpty(stockOrderFilterRequest.getLocStorageCode())) { + InvWarehouseEntity invWarehouseEntity = invWarehouseService.selectByCode(stockOrderFilterRequest.getLocStorageCode()); + FilterInvUserRequest filterInvUserRequest = new FilterInvUserRequest(); + filterInvUserRequest.setCode(invWarehouseEntity.getCode()); + filterInvUserRequest.setUserid(userId.longValue()); + filterInvUserRequest.setIsDirector(true); + List warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest); + } else { + return ResultVOUtils.error(500, "请先选择当前仓库"); } + stockOrderFilterRequest.setCorpId(null); stockOrderEntityList = stockOrderService.filterListOr(stockOrderFilterRequest); PageInfo pageInfo; diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java index c9306021..247d1d2b 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java @@ -205,9 +205,6 @@ public class OrderController { filterInvUserRequest.setUserid(userId.longValue()); filterInvUserRequest.setIsDirector(true); List warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest); - if (CollUtil.isEmpty(warehouseUserEntities)) { - orderFilterRequest.setUnionUser(userId); - } } else { return ResultVOUtils.error(500, "请先选择当前仓库"); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvSubWarehouseController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvSubWarehouseController.java index 3487f651..c93f7f0b 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvSubWarehouseController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvSubWarehouseController.java @@ -1,6 +1,7 @@ package com.glxp.api.admin.controller.inventory; import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; import com.glxp.api.admin.annotation.AuthRuleAnnotation; import com.glxp.api.admin.entity.auth.AuthAdmin; import com.glxp.api.admin.entity.inout.WarehouseBussinessTypeEntity; @@ -57,6 +58,8 @@ public class InvSubWarehouseController { // return ResultVOUtils.error(500, "用户或仓库不能未空!"); // } + + AuthAdmin authAdmin = customerService.getUserBean(); if (filterInvWarehouseRequest.getFilter() == null || filterInvWarehouseRequest.getFilter() == 1) { filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue()); diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/DlBasicService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/DlBasicService.java index 16e4381b..13b0a9fc 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/thread/DlBasicService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/thread/DlBasicService.java @@ -32,6 +32,7 @@ import com.glxp.api.admin.res.basic.SpsSyncDataResponse; import com.glxp.api.admin.res.basic.SpsSyncOrderResponse; import com.glxp.api.admin.service.basic.BasicDownloadService; import com.glxp.api.admin.service.basic.BussinessChangeTypeService; +import com.glxp.api.admin.service.basic.BussinessTypeService; import com.glxp.api.admin.service.basic.EntrustReceService; import com.glxp.api.admin.service.info.SystemParamConfigService; import com.glxp.api.admin.service.inout.OrderService; @@ -89,6 +90,8 @@ public class DlBasicService { @Resource private BasicDownloadService basicDownloadService; @Resource + private BussinessTypeService bussinessTypeService; + @Resource private SystemParamConfigService systemParamConfigService; private static final Logger logger = LoggerFactory.getLogger(DlBasicService.class); @@ -355,8 +358,17 @@ public class DlBasicService { List bussinessTypeEntities = syncDataResponse.getBussinessTypeEntities(); BussinessTypeDao mapper = batchSession.getMapper(BussinessTypeDao.class); for (BussinessTypeEntity bussinessTypeEntity : bussinessTypeEntities) { - bussinessTypeEntity.setUpdateTime(null); - mapper.insertBussinessType(bussinessTypeEntity); + + //更新或覆盖 + BussinessTypeEntity tempEntity = bussinessTypeService.findBTByAction(bussinessTypeEntity.getAction()); + if (tempEntity != null) { + BeanUtils.copyProperties(bussinessTypeEntity, tempEntity); + bussinessTypeEntity.setUpdateTime(null); + mapper.insertBussinessType(tempEntity); + } else { + bussinessTypeEntity.setUpdateTime(null); + mapper.insertBussinessType(bussinessTypeEntity); + } } batchSession.commit(); remark.append("扫码单据类型:").append(syncDataResponse.getBussinessTypeEntities().size()).append("条\n");