diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java index 65e5e5372..a65fa9cdb 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java @@ -84,6 +84,12 @@ public class DistributionStockListVO extends DistributionStockListEntity { @ApiModelProperty(value = "备货区域") private String stockupArea; + /** + * 包装数量 + */ + @ApiModelProperty(value = "包装数量") + private String packageNum; + /** * 以备件数 */ diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWarehousingEntryEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWarehousingEntryEntity.java index 8ec64dd07..cef7525b4 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWarehousingEntryEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWarehousingEntryEntity.java @@ -104,10 +104,15 @@ public class WarehouseWarehousingEntryEntity extends TenantEntity { */ @ApiModelProperty(value = "所在仓库") private String warehouse; + /** + * 物流公司 + */ + @ApiModelProperty(value = "物流公司") + private String logisticsCompany; /** * 物流车次 */ - @ApiModelProperty(value = "物流车次") + @ApiModelProperty(value = "物流运单号") private String trainNumber; /** * 入库车牌 @@ -135,6 +140,11 @@ public class WarehouseWarehousingEntryEntity extends TenantEntity { */ @ApiModelProperty(value = "存放位置") private String positions; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; /** * 客户ID */ diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java index 21e5904b1..d23ad11bc 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java @@ -25,6 +25,8 @@ import com.logpm.basicdata.excel.BasicdataWarehouseExcel; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.service.IBasicdataWarehouseService; import com.logpm.basicdata.vo.BasicdataWarehouseVO; +import com.logpm.warehouse.entity.WarehouseWarehouseEntity; +import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -86,6 +88,18 @@ public class BasicdataWarehouseController extends BladeController { return R.data(detail); } + + /** + * 仓库入库单 查询所属部门 + */ + @GetMapping("/detailWarehouse") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入warehouseWarehousingEntry") + public R> detailWarehouse(BasicdataWarehouseEntity BasicdataWarehouseEntity) { + List list = warehouseService.detailWarehouse(); + return R.data(list); + } + /** * 仓库 分页 */ diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java index b6135d384..647573e45 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java @@ -128,4 +128,6 @@ public interface IBasicdataWarehouseService extends BaseService warehouseListqx(); + + List detailWarehouse(); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java index b1e26c018..22c22d540 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java @@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; @@ -295,4 +296,17 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl basicdataGoodsShelfVOList = warehouseMapper.getWarehouseList(); return basicdataGoodsShelfVOList; } + + @Override + public List detailWarehouse() { + List list = new ArrayList<>(); + BasicdataWarehouseEntity myCurrentWarehouse = getMyCurrentWarehouse(); + if(ObjectUtils.isNotNull(myCurrentWarehouse)){ + list.add(myCurrentWarehouse); + }else{ + List myWarehouseList = getMyWarehouseList(); + list.addAll(myWarehouseList); + } + return list; + } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java index 2b59845b6..a9924b842 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java @@ -157,7 +157,7 @@ public class DistributionSignforAppController { */ @PostMapping("/signforack") @ApiOperationSupport(order = 2) - public R signforack(@Valid @RequestBody DistributionSignforEntity distributionSignfor) { + public R signforack(@Valid @RequestBody DistributionSignforDTO distributionSignfor) { R msg = distributionSignforService.signforack(distributionSignfor); return msg; } @@ -196,8 +196,8 @@ public class DistributionSignforAppController { .eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId()) ); Map map = new HashMap<>(); - map.put("deliverySignPictures",one.getDeliverySignPictures()); - map.put("driverRemarks",one.getDriverRemarks()); + map.put("deliverySignPictures",one.getDeliverySignPictures()); //司机签收图片 + map.put("driverRemarks",one.getDriverRemarks()); //driverRemarks return R.data(map); }else { return R.fail(3002,"参数不能为空不对!!"); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml index 0d531ac6f..07cbda102 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml @@ -83,7 +83,8 @@ END 'unpackingQuantity', ldsi.market_id marketId,ldsi.store_id storeId,ldsi.material_id materialId,ldsi.id, ( select CONCAT(GROUP_CONCAT(lwtg.tray_code SEPARATOR ','), ',(', SUM(lwtg.num), ') ') - from logpm_warehouse_tray_goods lwtg where ldsi.market_id = lwtg.market_id and lwtg.association_id = ldsi.material_id ) trayQuantity + from logpm_warehouse_tray_goods lwtg where ldsi.market_id = lwtg.market_id and lwtg.association_id = ldsi.material_id ) trayQuantity, + (select package_num from logpm_basicdata_material where id = material_id) packageNum from logpm_distribution_stock_list ldsi diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java index 6ca99c06d..6535e1746 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java @@ -41,7 +41,7 @@ public class OpReceivingDataHandler { panFactoryDataService.handleDataToPlatform(orderPackageCode, receivingTime); } catch (Exception e) { - log.error("##################opReceivingDataHandler: 处理欧派收货数据到新系统,orderPackageCode:{},receivingTime{}", + log.error("##################opReceivingDataHandler: 处理欧派收货数据到新系统,orderPackageCode:{},receivingTime:{}", orderPackageCode,receivingTime); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java index 68b12f373..e853af41f 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java @@ -18,10 +18,12 @@ package com.logpm.warehouse.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.warehouse.dto.WarehouseWarehousingEntryDTO; +import com.logpm.warehouse.entity.WarehouseWarehouseEntity; import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity; import com.logpm.warehouse.excel.WarehouseEntryImporter; import com.logpm.warehouse.excel.WarehousingEntryDetailExcel; @@ -46,6 +48,8 @@ import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; +import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -159,7 +163,7 @@ public class WarehouseWarehousingEntryController extends BladeController { /** * 导入入库数据 */ - @PostMapping("import-WarehousingEntry") + @PostMapping("/import-WarehousingEntry") @ApiOperationSupport(order = 12) @ApiOperation(value = "导入入库数据", notes = "传入excel") public R importWarehousingEntry(MultipartFile file, Integer isCovered) { @@ -177,12 +181,32 @@ public class WarehouseWarehousingEntryController extends BladeController { @ApiOperationSupport(order = 9) @ApiOperation(value = "导出数据", notes = "传入warehouseWarehousingEntry") public void exportWarehouseWarehousingEntry(@ApiIgnore @RequestParam Map warehouseWarehousingEntry, BladeUser bladeUser, HttpServletResponse response) { - QueryWrapper queryWrapper = Condition.getQueryWrapper(warehouseWarehousingEntry, WarehouseWarehousingEntryEntity.class); - //if (!AuthUtil.isAdministrator()) { - // queryWrapper.lambda().eq(WarehouseWarehousingEntry::getTenantId, bladeUser.getTenantId()); - //} - queryWrapper.lambda().eq(WarehouseWarehousingEntryEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); - List list = warehouseWarehousingEntryService.exportWarehouseWarehousingEntry(queryWrapper); + + List 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); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java index d7d7a6c0a..93d5d469f 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java @@ -80,11 +80,17 @@ public class WarehousingEntryDetailExcel implements Serializable { @ExcelProperty("仓库编码") private String warehouseCode; /** - * 物流车次 + * 物流运单号 */ @ColumnWidth(20) - @ExcelProperty("物流车次") + @ExcelProperty("物流运单号") private String trainNumber; + /** + * 物流公司 + */ + @ColumnWidth(20) + @ExcelProperty("物流公司") + private String logisticsCompany; /** * 入库车牌 */ @@ -164,6 +170,12 @@ public class WarehousingEntryDetailExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("存放位置") private String positions; + /** + * 备注 + */ + @ColumnWidth(20) + @ExcelProperty("备注") + private String remark; diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWarehousingEntryMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWarehousingEntryMapper.xml index 447e89ece..2d8c0d6de 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWarehousingEntryMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWarehousingEntryMapper.xml @@ -40,7 +40,7 @@ diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWarehousingEntryService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWarehousingEntryService.java index f7024fefb..93f71fe0d 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWarehousingEntryService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWarehousingEntryService.java @@ -17,8 +17,10 @@ package com.logpm.warehouse.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.warehouse.dto.WarehouseWarehousingEntryDTO; +import com.logpm.warehouse.entity.WarehouseWarehouseEntity; import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity; import com.logpm.warehouse.excel.WarehousingEntryDetailExcel; import com.logpm.warehouse.vo.WarehouseWarehousingEntryVO; diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java index 7ce1026fb..2863feb68 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java @@ -19,6 +19,7 @@ package com.logpm.warehouse.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils; @@ -37,6 +38,7 @@ import com.logpm.distribution.feign.IDistributionStockListClient; import com.logpm.distribution.feign.IDistributionStockListInfoClient; import com.logpm.distribution.vo.DistributionStockListVO; import com.logpm.warehouse.dto.WarehouseWarehousingEntryDTO; +import com.logpm.warehouse.entity.WarehouseWarehouseEntity; import com.logpm.warehouse.entity.WarehouseWarehousingDetailEntity; import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity; import com.logpm.warehouse.excel.WarehousingEntryDetailExcel; @@ -108,6 +110,12 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl list = warehouseWarehousingEntryDTO.getList(); WarehouseWarehousingEntryEntity warehouseWarehousingEntry = new WarehouseWarehousingEntryEntity(); BeanUtil.copyProperties(warehouseWarehousingEntryDTO,warehouseWarehousingEntry); + //入库批次号 + if(ObjectUtils.isNull( warehouseWarehousingEntry.getReceiptBatch() )){ + long time = new Date().getTime(); + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + warehouseWarehousingEntry.setReceiptBatch("RK"+myCurrentWarehouse.getWarehouseCode()+time); + } WarehouseWarehousingEntryEntity entryEntity = new WarehouseWarehousingEntryEntity(); entryEntity.setId(warehouseWarehousingEntryDTO.getId()); //添加 @@ -118,6 +126,7 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl> collect = data.stream().map(x -> { return x; }).collect(Collectors.groupingBy(o ->{ -// System.out.println("====<<<<<<<<"+o); - WarehouseWarehousingEntryEntity entryEntity = new WarehouseWarehousingEntryEntity(); - entryEntity.setReceiptBatch(o.getReceiptBatch()); - entryEntity.setReceiptDate(o.getReceiptDate()); - entryEntity.setConditions("1"); - BasicdataClientEntity customer = basicdataClientClient.getCustomer(o.getCustomerName(), o.getCustomerCode()); - if(Func.isNotEmpty(customer)){ - if(StringUtils.isNotBlank(o.getStoreName())){ - BasicdataClientEntity customer1 = basicdataClientClient.findByName(o.getStoreName()); - if(Func.isNotEmpty(customer1)){ - entryEntity.setStoreId(customer1.getId()); - entryEntity.setStoreName(o.getStoreName()); - }else{ - throw new ServiceException(o.getCustomerName()+o.getCustomerCode()+"门店信息不存在!!请维护门店数据!!!"); + System.out.println("====<<<<<<<<"+o); + if(ObjectUtils.isEmpty(o) && ObjectUtils.isEmpty(o.getCustomerName())){ + return ""; + }else{ + WarehouseWarehousingEntryEntity entryEntity = new WarehouseWarehousingEntryEntity(); + if(ObjectUtils.isNull(o.getReceiptBatch())){ + long time = new Date().getTime(); + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + entryEntity.setReceiptBatch("RK"+myCurrentWarehouse.getWarehouseCode()+time); + }else{ + entryEntity.setReceiptBatch(o.getReceiptBatch()); + } + entryEntity.setReceiptDate(o.getReceiptDate()); + + entryEntity.setConditions("1"); + BasicdataClientEntity customer = basicdataClientClient.getCustomer(o.getCustomerName(), o.getCustomerCode()); + if(ObjectUtils.isNotEmpty(customer) ){ + if(StringUtils.isNotBlank(o.getStoreName())){ + BasicdataClientEntity customer1 = basicdataClientClient.findByName(o.getStoreName()); + if(Func.isNotEmpty(customer1)){ + entryEntity.setStoreId(customer1.getId()); + entryEntity.setStoreName(o.getStoreName()); + }else{ + throw new ServiceException(o.getCustomerName()+o.getCustomerCode()+"门店信息不存在!!请维护门店数据!!!"); + } } + entryEntity.setClientId(customer.getId());//客户id + entryEntity.setCustomerName(o.getCustomerName()); + entryEntity.setCustomerCode(o.getCustomerCode()); + }else{ + throw new ServiceException(o.getCustomerName()+o.getCustomerCode()+"客户信息不存在!!请维护客户数据!!!"); } - entryEntity.setClientId(customer.getId());//客户id - entryEntity.setCustomerName(o.getCustomerName()); - entryEntity.setCustomerCode(o.getCustomerCode()); - }else{ - throw new ServiceException(o.getCustomerName()+o.getCustomerCode()+"客户信息不存在!!请维护客户数据!!!"); - } - BasicdataWarehouseEntity warehouse = basicdataWarehouseClient.getWarehouse(o.getWarehouse(), o.getWarehouseCode()); - if(Func.isNotEmpty(warehouse)){ - entryEntity.setWarehouseId(warehouse.getId());//仓库id - entryEntity.setWarehouse(o.getWarehouse());//仓库名称 - }else{ - throw new ServiceException(o.getCustomerName()+o.getCustomerCode()+"仓库信息不存在!!请维护仓库数据!!!"); - } - - entryEntity.setTrainNumber(o.getTrainNumber()); //仓库名称 - entryEntity.setLicensePlate(o.getLicensePlate()); //仓库名称 - entryEntity.setSource("导入"); - R> distriType = dictBizClient.getList("distribution_type"); - if(ObjectUtils.isNotNull(distriType)){ - List data1 = distriType.getData(); + BasicdataWarehouseEntity warehouse = basicdataWarehouseClient.getWarehouse(o.getWarehouse(), o.getWarehouseCode()); + if(Func.isNotEmpty(warehouse)){ + entryEntity.setWarehouseId(warehouse.getId());//仓库id + entryEntity.setWarehouse(o.getWarehouse());//仓库名称 + }else{ + throw new ServiceException(o.getCustomerName()+o.getCustomerCode()+"仓库信息不存在!!请维护仓库数据!!!"); + } + entryEntity.setLogisticsCompany(Optional.ofNullable(o.getLogisticsCompany()).orElse(null)); + 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.setSource("导入"); + R> distriType = dictBizClient.getList("distribution_type"); + if(ObjectUtils.isNotNull(distriType)){ + List data1 = distriType.getData(); // data1.forEach( a ->{ // if(o.getServiceType().equals(a.getDictValue())){ // entryEntity.setServiceType(a.getDictKey()); //仓库名称 // } // }); - DictBiz dictBiz = data1.stream().filter(da -> { - return o.getServiceType().equals(da.getDictValue()); - }).findAny().get(); - entryEntity.setServiceType(dictBiz.getDictKey());//仓库名称 + DictBiz dictBiz = data1.stream().filter(da -> { + return o.getServiceType().equals(da.getDictValue()); + }).findAny().get(); + entryEntity.setServiceType(dictBiz.getDictKey());//仓库名称 + } + entryEntity.setPositions(Optional.ofNullable(o.getPositions()).orElse(null)); + String s = JSONObject.toJSONString(entryEntity); + return s; } - entryEntity.setPositions(o.getPositions() ); - String s = JSONObject.toJSONString(entryEntity); - return s; + } , Collectors.toList())); collect.forEach((k,v) ->{ diff --git a/doc/dpm/物流租户系统.pdma.json b/doc/dpm/物流租户系统.pdma.json index cf8a0c23a..05feadf62 100644 --- a/doc/dpm/物流租户系统.pdma.json +++ b/doc/dpm/物流租户系统.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.5.1", "createdTime": "2023-3-27 13:32:56", - "updatedTime": "2023-8-9 10:46:19", + "updatedTime": "2023-9-26 11:11:22", "dbConns": [], "profile": { "default": { @@ -57974,6 +57974,464 @@ ], "correlations": [], "indexes": [] + }, + { + "id": "76FCF47B-9E5A-4A5B-A6F5-D541FD35A6AC", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } + }, + "defKey": "logpm_distribution_sign_print", + "defName": "签收图片", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "tenant_id", + "defName": "租户号", + "comment": "", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "refDict": "", + "uiHint": "", + "id": "4BCC7852-62F4-4E22-862D-E60210FC0194" + }, + { + "defKey": "create_user", + "defName": "创建人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "FEA9C416-8788-4282-9937-D9442229CA56" + }, + { + "defKey": "create_time", + "defName": "创建时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "6EBA9279-5D44-4824-A7A6-AC7382702A88" + }, + { + "defKey": "update_user", + "defName": "更新人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "6B51A383-79D7-4ADF-8EB9-0F5EA4F8544E" + }, + { + "defKey": "update_time", + "defName": "更新时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "1F38E3FB-AC5F-4B50-A844-59FF4CA4C2B1" + }, + { + "defKey": "status", + "defName": "状态", + "comment": "", + "type": "INT", + "len": 2, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "F428C50A-15FA-4ECF-B0FC-95E1C0D45363" + }, + { + "defKey": "is_deleted", + "defName": "是否已删除", + "comment": "", + "type": "INT", + "len": 2, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "FEE460EF-B843-4DA8-9041-78833D3903D0" + }, + { + "defKey": "create_dept", + "defName": "创建部门", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "1E7D555A-A0F5-4B44-9401-57D9175DD331" + }, + { + "defKey": "id", + "defName": "主键", + "comment": "", + "type": "INT", + "len": 20, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "6B0CE4F9-8E10-419D-8222-48D2FFC23753" + }, + { + "defKey": "reserve1", + "defName": "预留1", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "9103DC94-8A69-4B00-8E15-DB52981B49D4" + }, + { + "defKey": "reserve2", + "defName": "预留2", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "6B18C6C0-AA1C-494C-BFCC-C252EEF4D963" + }, + { + "defKey": "reserve3", + "defName": "预留3", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "F125435A-DB8D-4AAB-9ED9-0F47B2B2C52A" + }, + { + "defKey": "reserve4", + "defName": "预留4", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "F93F1A01-E18E-41F6-ACB3-E50D4BB71DD9" + }, + { + "defKey": "reserve5", + "defName": "预留5", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "F13532EA-B647-4310-8D19-21379E09FEF8" + }, + { + "defKey": "type", + "defName": "类型", + "comment": "", + "type": "INT", + "len": 11, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "42143690-8D9E-416C-AF81-00767E51519D" + }, + { + "defKey": "name", + "defName": "名称", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "6DE03350-C886-423F-9AF7-B3AE13D5489D" + }, + { + "defKey": "url_route", + "defName": "路径", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "A0823302-F10D-4FD7-9A36-E8299A094022" + }, + { + "defKey": "reservation_id", + "defName": "预约id", + "comment": "", + "type": "VARCHAR", + "len": 20, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "17048E80-86D2-43D6-B087-A016F897265A" + } + ], + "correlations": [], + "indexes": [] } ], "views": [], @@ -58123,7 +58581,8 @@ "E49C4E0A-761C-48A9-AFDA-7F44465A94EA", "E0313D21-7B17-4D59-A940-DB800CB49090", "341855F6-28A8-48FC-A5AF-7B69F2916907", - "34520BCA-7B04-4B57-949B-D386718B529D" + "34520BCA-7B04-4B57-949B-D386718B529D", + "76FCF47B-9E5A-4A5B-A6F5-D541FD35A6AC" ], "refViews": [], "refDiagrams": [], @@ -58659,4 +59118,4 @@ } } ] -} +} \ No newline at end of file