Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dist.1.3.0
zhaoqiaobo 5 months ago
parent
commit
2bba8ed250
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java
  2. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  3. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  4. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  5. 3
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java
  6. 13
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/ExecutorConfig.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java

@ -224,7 +224,7 @@ public class DistributionSignforAppController {
}
/**
* 司机签收管理 确认签收
* 上传签收图片
*/
@PostMapping("/signforack")
@ApiOperationSupport(order = 2)

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -367,6 +367,7 @@
association_value ) AS t2 ON t.cargo_number = t2.association_value
where ldslNew.is_deleted = 0
AND ldslNew.warehouse_id=#{warehouseId}
AND ldslNew.market_name=#{mallName}
GROUP BY
ldslNew.cargo_number
</select>

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -904,8 +904,9 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
List<String> materialUnit = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMaterialUnit).distinct().collect(Collectors.toList());
List<Long> mallId = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMarketId).distinct().collect(Collectors.toList());
List<String> materialName = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMaterialName).distinct().collect(Collectors.toList());
List<String> brandName = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getBrandName).distinct().collect(Collectors.toList());
List<Long> brandId = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getBrandId).distinct().collect(Collectors.toList());
if (materialId.size() != 1 || materialCode.size() != 1 || materialUnit.size() != 1 || mallId.size() != 1 || materialName.size() != 1 || brandId.size() != 1) {
if (materialId.size() != 1 || materialCode.size() != 1 || materialUnit.size() != 1 || mallId.size() != 1 || materialName.size() != 1 || brandName.size() != 1) {
//该批次包件出现多种物料包件
return null;
}
@ -941,6 +942,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
// distributionStockListEntity.setCategory(Optional.ofNullable(distributionParcelList.getBrandId()+"").orElse(null));//品分类
// 品牌
distributionStockListEntity.setBrandId(brandId.get(0));
distributionStockListEntity.setBrandName(brandName.get(0));
distributionStockListEntity.setUnpackingQuantity(0);
distributionStockListEntity.setSourceType("1"); //类型

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -59,6 +59,7 @@ import com.logpm.warehouse.feign.IWarehouseUpdownStockUpAreaClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.util.Strings;
import org.jetbrains.annotations.NotNull;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant;
@ -950,7 +951,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("signforack############未进行签收上传图片");
return R.fail("无签收数据");
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
log.info("=============签收图片数据为:{}", distributionSignfor.getMap());
if (ObjectUtils.isNotNull(distributionSignfor.getMap())) {
List<DistributionSignPrintEntity> distributionSignPrintList = new ArrayList<>();
@ -3221,7 +3222,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanFail(12000, "请先进行签收扫描后上传图片", "请先进行签收扫描后上传图片", null);
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
log.info("=============签收图片数据为:{}", distributionSignfor.getMap());
if (ObjectUtils.isNotNull(distributionSignfor.getMap())) {
List<DistributionSignPrintEntity> distributionSignPrintList = new ArrayList<>();
@ -4938,10 +4939,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
String method = "######################DistributionSignforServiceImpl.oneclickPDA";
BladeUser user = AuthUtil.getUser();
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
//进行防重复提交
if (Objects.isNull(myCurrentWarehouse)) {
return R.fail(403, "仓库信息不能为空");
// throw new CustomerException(403, "仓库信息不能为/**/空");
}
int loadingPackageNum = 0;
int loadingInventoryNum = 0;
int signingPackageNum = 0;
@ -4966,6 +4970,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error(method + "reservationEntity参数错误:{}", reservationEntity);
return R.fail("服务器正忙~~");
}
Long batchLock = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + "reservationId:" );
if (!Objects.isNull(batchLock)){
return R.fail("请不要重复操作");
}
List<Long> packageLockIds = new ArrayList<>();
//查询数据
DistributionSignforEntity distributionSignforEntity = baseMapper.selectOne(new QueryWrapper<DistributionSignforEntity>().lambda()
@ -5449,6 +5457,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionSignforEntity.setDriverRemarks(distributionSignfor.getDriverRemarks());
}
this.updateById(distributionSignforEntity);
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + "reservationId:", distributionSignfor.getReservationId(),60L);
return R.status(true);
}

3
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java

@ -208,6 +208,9 @@ public class DistributionDatarepair {
} else {
String remarks = (String) map.get("msg");
//进行错误记录
if(StringUtil.isBlank(remarks)){
remarks="超时";
}
warehouseMappingDataMapper.updateClearSignforRemarks(id, remarks);
log.error(">>> 推送失败 id=" + id);
}

13
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/ExecutorConfig.java

@ -1,6 +1,7 @@
package com.logpm.warehouse.config;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.MDC;
import org.springblade.core.secure.utils.AuthUtil;
@ -66,7 +67,17 @@ public class ExecutorConfig {
RequestContextHolder.setRequestAttributes(context);
// 未当前的异步线程绑定租户ID 和切换数据源
log.info(">>>> 异步线程创建,绑定租户数据源 {}",tenantId);
DynamicDataSourceContextHolder.push(tenantId);
log.info(">>>> 异步线程创建,绑定租户数据源 {}",tenantId);
if(StringUtils.isBlank(tenantId)){
//这里为null 存在问题
log.info(">>>> 异步线程创建,没有用户信息 {}",AuthUtil.getUserId());
log.info(">>>> 异步线程创建,没有用户信息 {}",AuthUtil.getUser());
log.info(">>>> 异步线程创建,没有用户信息 {}",context);
DynamicDataSourceContextHolder.push("627683");
}else{
// 未当前的异步线程绑定租户ID 和切换数据源
DynamicDataSourceContextHolder.push(tenantId);
}
runnable.run();
} finally {
RequestContextHolder.resetRequestAttributes();

Loading…
Cancel
Save