From 32e5c061beb7aceb5d259271b3935cdf5d960cfa Mon Sep 17 00:00:00 2001 From: zhaoqiaobo Date: Tue, 5 Mar 2024 21:21:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(all):=20=E4=BF=AE=E6=94=B9=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicdata/entity/BasicdataFreightEntity.java | 7 +++++-- .../controller/BasicdataFreightController.java | 2 +- .../com/logpm/basicdata/dto/BasicdataFreightDTO.java | 1 + .../service/impl/BasicdataFreightServiceImpl.java | 12 +++++++++++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataFreightEntity.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataFreightEntity.java index 14e950d93..d8e04c947 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataFreightEntity.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataFreightEntity.java @@ -71,6 +71,8 @@ public class BasicdataFreightEntity extends TenantEntity { @NotBlank(message = "用户名称必填") @ApiModelProperty(value = "物品名称") private String itemName; + @ApiModelProperty(value = "物品名称") + private String name; /** * 客户—id */ @@ -91,10 +93,11 @@ public class BasicdataFreightEntity extends TenantEntity { */ @ApiModelProperty(value = "品牌") private Long brand; + @ApiModelProperty(value = "品牌名称") + private String brandName; /** * 品类 */ - @NotBlank(message = "品类必填") @ApiModelProperty(value = "品类") private String category; @ApiModelProperty(value = "品类名称") @@ -118,7 +121,7 @@ public class BasicdataFreightEntity extends TenantEntity { * 类型 */ @ApiModelProperty(value = "服务类型") - private Integer type; + private String type; /** * 标识;1 干仓配 2 一口价 3 每趟 4户 */ diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFreightController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFreightController.java index 53cb96e8b..f5a7b7164 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFreightController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFreightController.java @@ -85,7 +85,7 @@ public class BasicdataFreightController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入basicdataFreight") public R> list(@ApiIgnore @RequestParam Map basicdataFreight, Query query) { - IPage pages = basicdataFreightService.page(Condition.getPage(query), Condition.getQueryWrapper(basicdataFreight, BasicdataFreightEntity.class)); + IPage pages = basicdataFreightService.page(Condition.getPage(query), Condition.getQueryWrapper(basicdataFreight, BasicdataFreightEntity.class).orderByDesc("update_time")); return R.data(pages); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataFreightDTO.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataFreightDTO.java index a33e35d6e..ad8571b96 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataFreightDTO.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataFreightDTO.java @@ -37,6 +37,7 @@ public class BasicdataFreightDTO extends BasicdataFreightEntity { * 客户ID */ private String clientIds; + private List typeService; /** * 干仓配明细 diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataFreightServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataFreightServiceImpl.java index 312817783..cb6f6c043 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataFreightServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataFreightServiceImpl.java @@ -18,6 +18,7 @@ package com.logpm.basicdata.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -83,8 +84,13 @@ public class BasicdataFreightServiceImpl extends BaseServiceImpl query = new QueryWrapper<>(); query.eq("item_name", basicdataFreight.getItemName()) - .in("category", basicdataFreight.getCategory().split(",")) .eq("is_deleted", 0); + if(0 == basicdataFreight.getFixedPrice()){ + if(StrUtil.isBlank(basicdataFreight.getCategory())){ + throw new ServiceException("品类必填"); + } + query.in("category", basicdataFreight.getCategory().split(",")); + } if (ObjectUtils.isNotNull(basicdataFreight.getId())) { query.ne("id", basicdataFreight.getId()); } @@ -95,6 +101,10 @@ public class BasicdataFreightServiceImpl extends BaseServiceImpl typeService = basicdataFreight.getTypeService(); + basicdataFreightEntity.setType(String.join(",", typeService)); + } if (1 == fixedPrice) { basicdataFreightEntity.setIdentification(2); } else { From a0b2cc6f7ac94665b4b57b97baf2872dc245dd84 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Wed, 6 Mar 2024 09:13:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/InventoryDetailServiceImpl.java | 3 ++- .../jobhandle/SyncOrderInfoToPlatform.java | 21 +++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/InventoryDetailServiceImpl.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/InventoryDetailServiceImpl.java index 4c3833454..01edfe492 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/InventoryDetailServiceImpl.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/InventoryDetailServiceImpl.java @@ -35,7 +35,8 @@ public class InventoryDetailServiceImpl implements IInventoryDetailService { public Integer findStatusByInventoryIdAndOrderPackageCode(Integer inventoryId, String orderPackageCode) { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("inventory_id",inventoryId) - .eq("unitNo",orderPackageCode); + .eq("unitNo",orderPackageCode) + .eq("delete_time",0); InventoryDetailEntity inventoryDetailEntity = inventoryDetailMapper.selectOne(queryWrapper); if(Objects.isNull(inventoryDetailEntity)){ return 0; diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java index dce4ca416..64d95b19d 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java @@ -577,7 +577,7 @@ public class SyncOrderInfoToPlatform { List warehouseMappingDataEntityList = warehouseMappingDataService.getWarehouseMapping(); if(warehouseMappingDataEntityList.isEmpty()){ - log.warn("###############syncZeroOrderInfo: 当前没有配置需要同步的仓库信息"); + log.warn("###############clearPackageStatus: 当前没有配置需要同步的仓库信息"); return ReturnT.FAIL; } WarehouseMappingDataEntity warehouseMappingDataEntity = warehouseMappingDataEntityList.get(0); @@ -591,11 +591,17 @@ public class SyncOrderInfoToPlatform { Long packageId = l.getLong("packageId"); String orderPackageCode = l.getStr("orderPackageCode"); String orderCode = l.getStr("orderCode"); - Integer status = inventoryDetailClient.findStatusByInventoryIdAndOrderPackageCode(inventoryId,orderPackageCode); - if(status.equals(1)){ - warehouseMappingDataService.updatePackageStatus("20",packageId); - distributionStockArticleClient.updateOrderInfo(orderCode,newWarehouseId); + try{ + Integer status = inventoryDetailClient.findStatusByInventoryIdAndOrderPackageCode(inventoryId,orderPackageCode); + if(status.equals(1)){ + warehouseMappingDataService.updatePackageStatus("20",packageId); + distributionStockArticleClient.updateOrderInfo(orderCode,newWarehouseId); + } + }catch (Exception e){ + log.error("###########clearPackageStatus: 查询数据有问题"); + continue; } + } return ReturnT.SUCCESS; @@ -608,8 +614,9 @@ public class SyncOrderInfoToPlatform { List ls = warehouseMappingDataService.findAllOrderCode(); + log.info("############repairOrderTotalNum: ls.size={}",ls.size()); for (JSONObject jsonObject : ls) { - + log.info("############repairOrderTotalNum:jsonObject={}",jsonObject); String orderCode = jsonObject.getStr("orderCode"); Long warehouseId = jsonObject.getLong("warehouseId"); @@ -624,6 +631,8 @@ public class SyncOrderInfoToPlatform { stockArticleEntity.setTotalNumber(total); distributionStockArticleClient.saveOrUpdate(stockArticleEntity); distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId); + }else{ + } }