扫码单据类型同步时udi管理系统配置被覆盖问题,业务单据会查询全部问题

fengcang
anthonyywj2 3 years ago
parent 47166a8bc7
commit 92e5beb3ae

@ -278,25 +278,20 @@ public class StockOrderController {
} }
List<StockOrderEntity> stockOrderEntityList; List<StockOrderEntity> stockOrderEntityList;
if (StringUtils.isNotBlank(stockOrderFilterRequest.getCorpId())) { Integer userId = customerService.getUserId();
Integer userId = customerService.getUserId(); stockOrderFilterRequest.setUnitIdFk(null);
stockOrderFilterRequest.setUnitIdFk(null); stockOrderFilterRequest.setUserId(customerService.getUserId());
stockOrderFilterRequest.setUserId(customerService.getUserId()); if (StrUtil.isNotEmpty(stockOrderFilterRequest.getLocStorageCode())) {
if (StrUtil.isNotEmpty(stockOrderFilterRequest.getLocStorageCode())) { InvWarehouseEntity invWarehouseEntity = invWarehouseService.selectByCode(stockOrderFilterRequest.getLocStorageCode());
InvWarehouseEntity invWarehouseEntity = invWarehouseService.selectByCode(stockOrderFilterRequest.getLocStorageCode()); FilterInvUserRequest filterInvUserRequest = new FilterInvUserRequest();
FilterInvUserRequest filterInvUserRequest = new FilterInvUserRequest(); filterInvUserRequest.setCode(invWarehouseEntity.getCode());
filterInvUserRequest.setCode(invWarehouseEntity.getCode()); filterInvUserRequest.setUserid(userId.longValue());
filterInvUserRequest.setUserid(userId.longValue()); filterInvUserRequest.setIsDirector(true);
filterInvUserRequest.setIsDirector(true); List<WarehouseUserEntity> warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest);
List<WarehouseUserEntity> warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest); } else {
if (CollUtil.isEmpty(warehouseUserEntities)) { return ResultVOUtils.error(500, "请先选择当前仓库");
stockOrderFilterRequest.setUnionUser(userId);
}
} else {
return ResultVOUtils.error(500, "请先选择当前仓库");
}
stockOrderFilterRequest.setCorpId(null);
} }
stockOrderFilterRequest.setCorpId(null);
stockOrderEntityList = stockOrderService.filterListOr(stockOrderFilterRequest); stockOrderEntityList = stockOrderService.filterListOr(stockOrderFilterRequest);
PageInfo<StockOrderEntity> pageInfo; PageInfo<StockOrderEntity> pageInfo;

@ -205,9 +205,6 @@ public class OrderController {
filterInvUserRequest.setUserid(userId.longValue()); filterInvUserRequest.setUserid(userId.longValue());
filterInvUserRequest.setIsDirector(true); filterInvUserRequest.setIsDirector(true);
List<WarehouseUserEntity> warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest); List<WarehouseUserEntity> warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest);
if (CollUtil.isEmpty(warehouseUserEntities)) {
orderFilterRequest.setUnionUser(userId);
}
} else { } else {
return ResultVOUtils.error(500, "请先选择当前仓库"); return ResultVOUtils.error(500, "请先选择当前仓库");
} }

@ -1,6 +1,7 @@
package com.glxp.api.admin.controller.inventory; package com.glxp.api.admin.controller.inventory;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.glxp.api.admin.annotation.AuthRuleAnnotation; import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.entity.auth.AuthAdmin; import com.glxp.api.admin.entity.auth.AuthAdmin;
import com.glxp.api.admin.entity.inout.WarehouseBussinessTypeEntity; import com.glxp.api.admin.entity.inout.WarehouseBussinessTypeEntity;
@ -57,6 +58,8 @@ public class InvSubWarehouseController {
// return ResultVOUtils.error(500, "用户或仓库不能未空!"); // return ResultVOUtils.error(500, "用户或仓库不能未空!");
// } // }
AuthAdmin authAdmin = customerService.getUserBean(); AuthAdmin authAdmin = customerService.getUserBean();
if (filterInvWarehouseRequest.getFilter() == null || filterInvWarehouseRequest.getFilter() == 1) { if (filterInvWarehouseRequest.getFilter() == null || filterInvWarehouseRequest.getFilter() == 1) {
filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue()); filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue());

@ -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.res.basic.SpsSyncOrderResponse;
import com.glxp.api.admin.service.basic.BasicDownloadService; import com.glxp.api.admin.service.basic.BasicDownloadService;
import com.glxp.api.admin.service.basic.BussinessChangeTypeService; 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.basic.EntrustReceService;
import com.glxp.api.admin.service.info.SystemParamConfigService; import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.service.inout.OrderService; import com.glxp.api.admin.service.inout.OrderService;
@ -89,6 +90,8 @@ public class DlBasicService {
@Resource @Resource
private BasicDownloadService basicDownloadService; private BasicDownloadService basicDownloadService;
@Resource @Resource
private BussinessTypeService bussinessTypeService;
@Resource
private SystemParamConfigService systemParamConfigService; private SystemParamConfigService systemParamConfigService;
private static final Logger logger = LoggerFactory.getLogger(DlBasicService.class); private static final Logger logger = LoggerFactory.getLogger(DlBasicService.class);
@ -355,8 +358,17 @@ public class DlBasicService {
List<BussinessTypeEntity> bussinessTypeEntities = syncDataResponse.getBussinessTypeEntities(); List<BussinessTypeEntity> bussinessTypeEntities = syncDataResponse.getBussinessTypeEntities();
BussinessTypeDao mapper = batchSession.getMapper(BussinessTypeDao.class); BussinessTypeDao mapper = batchSession.getMapper(BussinessTypeDao.class);
for (BussinessTypeEntity bussinessTypeEntity : bussinessTypeEntities) { 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(); batchSession.commit();
remark.append("扫码单据类型:").append(syncDataResponse.getBussinessTypeEntities().size()).append("条\n"); remark.append("扫码单据类型:").append(syncDataResponse.getBussinessTypeEntities().size()).append("条\n");

Loading…
Cancel
Save