|
@@ -1,7 +1,5 @@
|
|
|
package cn.iocoder.yudao.module.pms.service.iotlockstock;
|
|
|
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
-import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
|
@@ -10,7 +8,6 @@ import cn.iocoder.yudao.module.pms.controller.admin.iotlockstock.vo.IotLockStock
|
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.iotlockstock.IotLockStockDO;
|
|
|
import cn.iocoder.yudao.module.pms.dal.mysql.iotlockstock.IotLockStockMapper;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.DeptSapOrgApi;
|
|
|
-import cn.iocoder.yudao.module.system.api.dept.dto.DeptSapOrgRespDTO;
|
|
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
|
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -19,7 +16,6 @@ import org.springframework.validation.annotation.Validated;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
@@ -89,12 +85,12 @@ public class IotLockStockServiceImpl implements IotLockStockService {
|
|
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
|
|
AdminUserRespDTO user = adminUserApi.getUser(userId);
|
|
|
Long deptId = user.getDeptId();
|
|
|
- List<DeptSapOrgRespDTO> deptSapOrgs = deptSapOrgApi.getDeptSapOrgList(deptId);
|
|
|
+ // List<DeptSapOrgRespDTO> deptSapOrgs = deptSapOrgApi.getDeptSapOrgList(deptId);
|
|
|
List<Long> factoryIds = new ArrayList<>();
|
|
|
List<Long> costCenterIds = new ArrayList<>();
|
|
|
List<Long> storageLocationIds = new ArrayList<>();
|
|
|
// 遍历数组 获得 工厂 成本中心
|
|
|
- deptSapOrgs.forEach(sapOrg -> {
|
|
|
+ /* deptSapOrgs.forEach(sapOrg -> {
|
|
|
if (ObjectUtil.isNotNull(sapOrg.getFactoryId())) {
|
|
|
factoryIds.add(sapOrg.getFactoryId());
|
|
|
}
|
|
@@ -104,11 +100,11 @@ public class IotLockStockServiceImpl implements IotLockStockService {
|
|
|
if (ObjectUtil.isNotNull(sapOrg.getStockLocationId())) {
|
|
|
storageLocationIds.add(sapOrg.getStockLocationId());
|
|
|
}
|
|
|
- });
|
|
|
+ }); */
|
|
|
// 保存入库数据
|
|
|
createReqVO.forEach(req -> {
|
|
|
req.setDeptId(deptId);
|
|
|
- if (CollUtil.isNotEmpty(factoryIds)) {
|
|
|
+ /* if (CollUtil.isNotEmpty(factoryIds)) {
|
|
|
req.setFactoryId(factoryIds.get(0));
|
|
|
}
|
|
|
if (CollUtil.isNotEmpty(costCenterIds)) {
|
|
@@ -116,7 +112,7 @@ public class IotLockStockServiceImpl implements IotLockStockService {
|
|
|
}
|
|
|
if (CollUtil.isNotEmpty(storageLocationIds)) {
|
|
|
req.setStorageLocationId(storageLocationIds.get(0));
|
|
|
- }
|
|
|
+ } */
|
|
|
req.setStorageTime(LocalDateTime.now());
|
|
|
req.setType(1);
|
|
|
});
|