Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 11 months ago
parent
commit
ce1f6fb293
  1. 7
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataFreightEntity.java
  2. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFreightController.java
  3. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataFreightDTO.java
  4. 12
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataFreightServiceImpl.java
  5. 3
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/InventoryDetailServiceImpl.java
  6. 21
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java

7
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户
*/

2
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<IPage<BasicdataFreightEntity>> list(@ApiIgnore @RequestParam Map<String, Object> basicdataFreight, Query query) {
IPage<BasicdataFreightEntity> pages = basicdataFreightService.page(Condition.getPage(query), Condition.getQueryWrapper(basicdataFreight, BasicdataFreightEntity.class));
IPage<BasicdataFreightEntity> pages = basicdataFreightService.page(Condition.getPage(query), Condition.getQueryWrapper(basicdataFreight, BasicdataFreightEntity.class).orderByDesc("update_time"));
return R.data(pages);
}

1
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<String> typeService;
/**
* 干仓配明细

12
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<BasicdataFreigh
// 校验数据唯一性 名称+品类唯一
QueryWrapper<BasicdataFreightEntity> 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<BasicdataFreigh
BasicdataFreightEntity basicdataFreightEntity = new BasicdataFreightEntity();
Byte fixedPrice = basicdataFreight.getFixedPrice();
BeanUtil.copyProperties(basicdataFreight, basicdataFreightEntity);
if(CollectionUtil.isNotEmpty(basicdataFreight.getTypeService())){
List<String> typeService = basicdataFreight.getTypeService();
basicdataFreightEntity.setType(String.join(",", typeService));
}
if (1 == fixedPrice) {
basicdataFreightEntity.setIdentification(2);
} else {

3
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<InventoryDetailEntity> 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;

21
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java

@ -577,7 +577,7 @@ public class SyncOrderInfoToPlatform {
List<WarehouseMappingDataEntity> 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<JSONObject> 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{
}
}

Loading…
Cancel
Save