Browse Source

修改客户导入,入库导入

single_db
caoyizhong 1 year ago
parent
commit
a030b401af
  1. 31
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
  2. 64
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java
  3. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

31
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java

@ -489,21 +489,28 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
if(!storageServicesEntities.isEmpty()){
List<BasicdataStorageServicesEntity> servicesEntityList = new ArrayList<>();
storageServicesEntities.stream().forEach(i ->{
if(i.getSendWarehouseName().contains(",")){
String[] split = i.getSendWarehouseName().split(",");
for (int j = 0; j < split.length; j++) {
BasicdataStorageServicesEntity servicesEntity = new BasicdataStorageServicesEntity();
Long id = list1.stream().filter(q -> q.getName().equals(i.getSendWarehouseName())).findFirst().get().getId();
BeanUtil.copyProperties(i,servicesEntity);
servicesEntity.setSendWarehouseId(id.toString());
servicesEntity.setSendWarehouseName(split[j]);
servicesEntityList.add(servicesEntity);
if(ObjectUtils.isNotNull(i.getSendWarehouseName())){
if( i.getSendWarehouseName().contains(",")){
String[] split = i.getSendWarehouseName().split(",");
for (int j = 0; j < split.length; j++) {
BasicdataStorageServicesEntity servicesEntity = new BasicdataStorageServicesEntity();
Long id = list1.stream().filter(q -> q.getName().equals(i.getSendWarehouseName())).findFirst().get().getId();
BeanUtil.copyProperties(i,servicesEntity);
servicesEntity.setSendWarehouseId(id.toString());
servicesEntity.setSendWarehouseName(split[j]);
servicesEntityList.add(servicesEntity);
}
}else{
Long id = list1.stream().filter(q -> q.getName().equals(i.getSendWarehouseName()) ).findFirst().get().getId();
i.setSendWarehouseId(id.toString());
servicesEntityList.add(i);
}
}else{
Long id = list1.stream().filter(q -> q.getName().equals(i.getSendWarehouseName())).findFirst().get().getId();
i.setSendWarehouseId(id.toString());
servicesEntityList.add(i);
BasicdataStorageServicesEntity servicesEntity = new BasicdataStorageServicesEntity();
BeanUtil.copyProperties(i,servicesEntity);
servicesEntityList.add(servicesEntity);
}
});
basicdataStorageServicesService.saveBatch(servicesEntityList);
}

64
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java

@ -190,37 +190,37 @@ public class WarehouseWarehousingEntryController extends BladeController {
/**
* 导出数据
*/
// @GetMapping("/export-warehouseWarehousingEntry")
// @ApiOperationSupport(order = 9)
// @ApiOperation(value = "导出数据", notes = "传入warehouseWarehousingEntry")
// public void exportWarehouseWarehousingEntry(@ApiIgnore @RequestParam Map<String, Object> warehouseWarehousingEntry, BladeUser bladeUser, HttpServletResponse response) {
//
// List<WarehousingEntryDetailExcel> list = new ArrayList<>();
// WarehousingEntryDetailExcel warehousingEntryDetailExcel = new WarehousingEntryDetailExcel();
// warehousingEntryDetailExcel.setReceiptBatch("2022031402350 选添");
// warehousingEntryDetailExcel.setReceiptDate(new Date());
// warehousingEntryDetailExcel.setCustomerCode("NCOP00011");
// warehousingEntryDetailExcel.setCustomerName("南充欧派衣橱");
// warehousingEntryDetailExcel.setStoreName("门店 选填");
// warehousingEntryDetailExcel.setOrderNumber("OPLYC南充市220200015YA5-5 选填");
// warehousingEntryDetailExcel.setBrandName("欧派");
// warehousingEntryDetailExcel.setWarehouse("南充仓");
// warehousingEntryDetailExcel.setWarehouseCode("NC");
// warehousingEntryDetailExcel.setTrainNumber("SF098876456 选添");
// warehousingEntryDetailExcel.setLicensePlate("川S5346347 选添");
// warehousingEntryDetailExcel.setServiceType("自提 商配 市配 选择其一");
// warehousingEntryDetailExcel.setSku("G21191547");
// warehousingEntryDetailExcel.setProductName("OP-CD309-1.8慕思如梦时光床垫/1800*2000*260");
// warehousingEntryDetailExcel.setProductCode("G21191547");
// warehousingEntryDetailExcel.setProductUnit("张");
// warehousingEntryDetailExcel.setLogisticsCompany("物流公司 选填");
// warehousingEntryDetailExcel.setPackagingNumber("1");
// warehousingEntryDetailExcel.setPackagingSpecifications("1");
// warehousingEntryDetailExcel.setCreateInventory(100);
// warehousingEntryDetailExcel.setPositions("存放位置 选填");
// warehousingEntryDetailExcel.setRemark("备注 选填");
// list.add(warehousingEntryDetailExcel);
// ExcelUtil.export(response, "仓库入库单数据" + DateUtil.time(), "仓库入库单数据表", list, WarehousingEntryDetailExcel.class);
// }
@GetMapping("/export-warehouseWarehousingTemplate")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入warehouseWarehousingEntry")
public void exportWarehouseWarehousingEntry(@ApiIgnore @RequestParam Map<String, Object> warehouseWarehousingEntry, BladeUser bladeUser, HttpServletResponse response) {
List<WarehousingEntryDetailExcel> list = new ArrayList<>();
WarehousingEntryDetailExcel warehousingEntryDetailExcel = new WarehousingEntryDetailExcel();
warehousingEntryDetailExcel.setReceiptBatch("2022031402350 选添");
warehousingEntryDetailExcel.setReceiptDate(new Date());
warehousingEntryDetailExcel.setCustomerCode("NCOP00011");
warehousingEntryDetailExcel.setCustomerName("南充欧派衣橱");
warehousingEntryDetailExcel.setStoreName("门店 选填");
warehousingEntryDetailExcel.setOrderNumber("OPLYC南充市220200015YA5-5 选填");
warehousingEntryDetailExcel.setBrandName("欧派");
warehousingEntryDetailExcel.setWarehouse("南充仓");
warehousingEntryDetailExcel.setWarehouseCode("NC");
warehousingEntryDetailExcel.setTrainNumber("SF098876456 选添");
warehousingEntryDetailExcel.setLicensePlate("川S5346347 选添");
warehousingEntryDetailExcel.setServiceType("自提 商配 市配 选择其一");
warehousingEntryDetailExcel.setSku("G21191547");
warehousingEntryDetailExcel.setProductName("OP-CD309-1.8慕思如梦时光床垫/1800*2000*260");
warehousingEntryDetailExcel.setProductCode("G21191547");
warehousingEntryDetailExcel.setProductUnit("张");
warehousingEntryDetailExcel.setLogisticsCompany("物流公司 选填");
warehousingEntryDetailExcel.setPackagingNumber("1");
warehousingEntryDetailExcel.setPackagingSpecifications("1");
warehousingEntryDetailExcel.setCreateInventory(100);
warehousingEntryDetailExcel.setPositions("存放位置 选填");
warehousingEntryDetailExcel.setRemark("备注 选填");
list.add(warehousingEntryDetailExcel);
ExcelUtil.export(response, "仓库入库单数据" + DateUtil.time(), "仓库入库单数据表", list, WarehousingEntryDetailExcel.class);
}
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -447,6 +447,7 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
entryEntity.setTrainNumber(Optional.ofNullable(o.getTrainNumber()).orElse(null)); //仓库名称
entryEntity.setLicensePlate(Optional.ofNullable(o.getLicensePlate()).orElse(null)); //仓库名称
entryEntity.setOrderNumber(Optional.ofNullable(o.getOrderNumber()).orElse(null)); //仓库名称
entryEntity.setRemark(Optional.ofNullable(o.getRemark()).orElse(null)); //备注
entryEntity.setSource("导入");
R<List<DictBiz>> distriType = dictBizClient.getList("distribution_type");
if(ObjectUtils.isNotNull(distriType)){

Loading…
Cancel
Save