仓库字典更新

master
anthonyywj2 3 years ago
parent 73ab68db0b
commit 579cb75eb9

@ -90,6 +90,9 @@ public class DlBasicService {
for (InvWarehouseEntity invWarehouseEntity : syncDataResponse.getInvWarehouseEntities()) {
invWarehouseEntity.setUpdateTime(null);
warehouseUserDao.deleteByCode(invWarehouseEntity.getCode());
warehouseBussinessTypeDao.deleteByCode(invWarehouseEntity.getCode());
}
invWarehouseService.importInvWarehouse(syncDataResponse.getInvWarehouseEntities());

@ -90,21 +90,27 @@ public class UpBasicService {
BeanUtils.copyProperties(spsSyncDataRequest, filterInvWarehouseRequest);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseService.filterGroupInvWarehouse(filterInvWarehouseRequest);
syncDataResponse.setInvWarehouseEntities(invWarehouseEntities);
if (CollUtil.isNotEmpty(invWarehouseEntities)) {
//仓库关联单据类型
FilterInvBusTypeRequest filterInvBusTypeRequest = new FilterInvBusTypeRequest();
BeanUtils.copyProperties(spsSyncDataRequest, filterInvBusTypeRequest);
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities = warehouseBussinessTypeService.filterList(filterInvBusTypeRequest);
syncDataResponse.setWarehouseBussinessTypeEntities(warehouseBussinessTypeEntities);
//仓库关联用户
FilterInvUserRequest filterInvUserRequest = new FilterInvUserRequest();
BeanUtils.copyProperties(spsSyncDataRequest, filterInvBusTypeRequest);
List<WarehouseUserEntity> warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest);
syncDataResponse.setWarehouseUserEntities(warehouseUserEntities);
}
List<WarehouseBussinessTypeEntity> mWarehouseBussinessTypeEntities = new ArrayList<>();
List<WarehouseUserEntity> mWarehouseUserEntities = new ArrayList<>();
for (InvWarehouseEntity invWarehouseEntity : invWarehouseEntities) {
//仓库关联单据类型
FilterInvBusTypeRequest filterInvBusTypeRequest = new FilterInvBusTypeRequest();
filterInvBusTypeRequest.setCode(invWarehouseEntity.getCode());
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities = warehouseBussinessTypeService.filterList(filterInvBusTypeRequest);
mWarehouseBussinessTypeEntities.addAll(warehouseBussinessTypeEntities);
//仓库关联用户
FilterInvUserRequest filterInvUserRequest = new FilterInvUserRequest();
filterInvUserRequest.setCode(invWarehouseEntity.getCode());
List<WarehouseUserEntity> warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest);
mWarehouseUserEntities.addAll(warehouseUserEntities);
}
syncDataResponse.setWarehouseUserEntities(mWarehouseUserEntities);
syncDataResponse.setWarehouseBussinessTypeEntities(mWarehouseBussinessTypeEntities);
}
}
@ -308,8 +314,8 @@ public class UpBasicService {
orderFilterRequest.setReceiveStatus(ConstantStatus.RECEIVE_ED);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
for(OrderEntity orderEntity:temps){
if(orderEntity.getFromType() != ConstantStatus.FROM_UDISP){
for (OrderEntity orderEntity : temps) {
if (orderEntity.getFromType() != ConstantStatus.FROM_UDISP) {
orderEntities.add(orderEntity);
}
}

Loading…
Cancel
Save