Compare commits
2 Commits
93e92eda9e
...
75af7a687b
| Author | SHA1 | Date |
|---|---|---|
|
|
75af7a687b | |
|
|
d75952664d |
|
|
@ -51,7 +51,7 @@ import java.util.stream.Collectors;
|
|||
public class BinControllerService {
|
||||
|
||||
@Resource
|
||||
private IWmsBinService binService;
|
||||
private IWmsBinService wmsBinService;
|
||||
|
||||
@Resource
|
||||
private IWmsWarehouseService wmsWarehouseService;
|
||||
|
|
@ -63,26 +63,26 @@ public class BinControllerService {
|
|||
WmsBin bin = Convert.convert(WmsBin.class, request);
|
||||
bin.setCreateBy(UserUtil.getUserName());
|
||||
bin.setCreateTime(LocalDateTime.now());
|
||||
binService.add(bin);
|
||||
wmsBinService.add(bin);
|
||||
}
|
||||
|
||||
public void update(@Valid BinUpdateQO request) {
|
||||
WmsBin bin = Convert.convert(WmsBin.class, request);
|
||||
bin.setUpdateBy(UserUtil.getUserName());
|
||||
bin.setUpdateTime(LocalDateTime.now());
|
||||
binService.update(bin);
|
||||
wmsBinService.update(bin);
|
||||
}
|
||||
|
||||
public void delete(@Valid @NotNull Long id) {
|
||||
binService.delete(id);
|
||||
wmsBinService.delete(id);
|
||||
}
|
||||
|
||||
public void enable(@Valid EnableQO request) {
|
||||
binService.enable(request);
|
||||
wmsBinService.enable(request);
|
||||
}
|
||||
|
||||
public IPage<BinVO> search(@Valid BinSearchQO request) {
|
||||
return binService.search(request);
|
||||
return wmsBinService.search(request);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
|
@ -121,7 +121,7 @@ public class BinControllerService {
|
|||
if (Objects.isNull(warehouse)){
|
||||
sb.append("仓库编号无效;");
|
||||
}else {
|
||||
bin = binService.lambdaQuery().eq(WmsBin::getNo, dto.getNo()).eq(WmsBin::getWarehouseId, warehouse.getId()).one();
|
||||
bin = wmsBinService.lambdaQuery().eq(WmsBin::getNo, dto.getNo()).eq(WmsBin::getWarehouseId, warehouse.getId()).one();
|
||||
if (Objects.isNull(bin)) {
|
||||
bin = new WmsBin()
|
||||
.setNo(dto.getNo())
|
||||
|
|
@ -145,14 +145,14 @@ public class BinControllerService {
|
|||
bins.add(bin);
|
||||
}
|
||||
if (data.stream().noneMatch(it -> StrUtil.isNotBlank(it.getError()))) {
|
||||
binService.saveOrUpdateBatch(bins);
|
||||
wmsBinService.saveOrUpdateBatch(bins);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void exportSelect(HttpServletResponse response, List<Long> ids) throws IOException {
|
||||
List<BinVO> binVOS = CollectionUtil.isNotEmpty(ids) ? binService.getList(ids) : new ArrayList<>();
|
||||
List<BinVO> binVOS = CollectionUtil.isNotEmpty(ids) ? wmsBinService.getList(ids) : new ArrayList<>();
|
||||
List<BinExcelExportDTO> datas = binVOS.stream().map(bin -> Convert.convert(BinExcelExportDTO.class, bin)).collect(Collectors.toList());
|
||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("储位导出.xlsx", StandardCharsets.UTF_8));
|
||||
|
|
@ -168,7 +168,7 @@ public class BinControllerService {
|
|||
}
|
||||
|
||||
public void exportSearch(HttpServletResponse response, @Valid BinSearchQO request) throws IOException {
|
||||
List<BinVO> binVOS = binService.searchNonPage(request);
|
||||
List<BinVO> binVOS = wmsBinService.searchNonPage(request);
|
||||
List<BinExcelExportDTO> datas = binVOS.stream().map(bin -> Convert.convert(BinExcelExportDTO.class, bin)).collect(Collectors.toList());
|
||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("储位导出.xlsx", StandardCharsets.UTF_8));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.nflg.wms.admin.service;
|
|||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.nflg.wms.common.pojo.ApiResult;
|
||||
import com.nflg.wms.common.pojo.dto.C_MaterialReturnDTO;
|
||||
import com.nflg.wms.common.pojo.dto.C_MaterialReturnQueryDTO;
|
||||
import com.nflg.wms.common.pojo.dto.SAPSyncFromDTO;
|
||||
|
|
@ -84,7 +83,7 @@ public class CenterReturnControllerService {
|
|||
}
|
||||
|
||||
// 调用SAP服务获取仓库详细信息
|
||||
List<SAPSyncFromDTO> warehouseList = sapService.zwm3a01(werks, warehouseNos, materialNos, null, null);
|
||||
List<SAPSyncFromDTO> warehouseList = sapService.zwm3A01(werks, warehouseNos, materialNos, null, null);
|
||||
if (CollectionUtil.isNotEmpty(warehouseList)) {
|
||||
allWarehouse.addAll(warehouseList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import com.nflg.wms.admin.pojo.dto.ZIM003105DTO;
|
|||
import com.nflg.wms.admin.pojo.dto.ZIM003DTO;
|
||||
import com.nflg.wms.common.constant.STATE;
|
||||
import com.nflg.wms.common.exception.NflgException;
|
||||
import com.nflg.wms.common.pojo.qo.C_MaterialOutboundQO;
|
||||
import com.nflg.wms.common.pojo.dto.*;
|
||||
import com.nflg.wms.common.pojo.qo.C_MaterialOutboundQO;
|
||||
import com.nflg.wms.common.pojo.qo.C_MaterialReturnItemQO;
|
||||
import com.nflg.wms.common.pojo.qo.C_MaterialReturnQO;
|
||||
import com.nflg.wms.common.pojo.qo.ScanCodeQO;
|
||||
|
|
@ -22,6 +22,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class StorageControllerService {
|
|||
private BomMaterialService bomMaterialService;
|
||||
|
||||
@Resource
|
||||
private IWmsBinService binService;
|
||||
private IWmsBinService wmsBinService;
|
||||
|
||||
@Transactional
|
||||
public void add(@Valid StorageAddQO request) {
|
||||
|
|
@ -108,7 +108,7 @@ public class StorageControllerService {
|
|||
{
|
||||
List<String> binNos = StrUtil.split(storageVO.getBinNos(), ",");
|
||||
if (CollectionUtil.isNotEmpty(binNos)) {
|
||||
storageVO.setBinIds(binService.lambdaQuery().select(WmsBin::getId).in(WmsBin::getNo, binNos).list().stream().map(WmsBin::getId).toList());
|
||||
storageVO.setBinIds(wmsBinService.lambdaQuery().select(WmsBin::getId).in(WmsBin::getNo, binNos).list().stream().map(WmsBin::getId).toList());
|
||||
}
|
||||
});
|
||||
return page;
|
||||
|
|
@ -168,7 +168,7 @@ public class StorageControllerService {
|
|||
sb.append("储位编号不能为空;");
|
||||
} else {
|
||||
List<String> binNos = StrUtil.split(dto.getBinNos(), ",");
|
||||
List<WmsBin> bins = binService.lambdaQuery().in(WmsBin::getNo, binNos).list();
|
||||
List<WmsBin> bins = wmsBinService.lambdaQuery().in(WmsBin::getNo, binNos).list();
|
||||
List<String> bs = bins.stream().map(WmsBin::getNo).toList();
|
||||
binNos.removeAll(bs);
|
||||
if (CollectionUtil.isNotEmpty(binNos)) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class WmsWarehouseServiceImpl extends ServiceImpl<WmsWarehouseMapper, Wms
|
|||
private IAuditLogService auditLogService;
|
||||
|
||||
@Resource
|
||||
private IWmsBinService binService;
|
||||
private IWmsBinService wmsBinService;
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
|
|
@ -63,7 +63,7 @@ public class WmsWarehouseServiceImpl extends ServiceImpl<WmsWarehouseMapper, Wms
|
|||
@Transactional
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
VUtil.trueThrowBusinessError(binService.lambdaQuery().eq(WmsBin::getWarehouseId, id).exists())
|
||||
VUtil.trueThrowBusinessError(wmsBinService.lambdaQuery().eq(WmsBin::getWarehouseId, id).exists())
|
||||
.throwMessage("删除失败,仓库已绑定储位");
|
||||
WmsWarehouse old = getById(id);
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(old)).throwMessage("仓库不存在");
|
||||
|
|
|
|||
|
|
@ -13,10 +13,6 @@
|
|||
<description>SRM订单接收服务</description>
|
||||
<packaging>jar</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nflg</groupId>
|
||||
<artifactId>nflg-wms-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nflg</groupId>
|
||||
<artifactId>nflg-wms-starter</artifactId>
|
||||
|
|
|
|||
Loading…
Reference in New Issue