Browse Source

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

master
zhaoqiaobo 9 months ago
parent
commit
a335a273bb
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
  2. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/JobAnnotationAspect.java
  3. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/JobAnnotationAspect.java
  4. 2
      blade-service/logpm-business/src/main/java/com/logpm/business/aspect/ChangeAsyncAnnotationAspect.java
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/ChangeAsyncAnnotationAspect.java
  6. 35
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  7. 2
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/aspect/JobAnnotationAspect.java
  8. 2
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/LocalServerLoginAccountsInterceptor.java
  9. 2
      blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/interceptor/LocalServerLoginAccountsInterceptor.java
  10. 2
      blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/interceptor/LocalServerLoginAccountsInterceptor.java
  11. 2
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/aspect/JobAnnotationAspect.java
  12. 2
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/interceptor/LocalServerLoginAccountsInterceptor.java
  13. 2
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java
  14. 2
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/interceptor/LocalServerLoginAccountsInterceptor.java
  15. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/JobAnnotationAspect.java
  16. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java
  17. 2
      blade-service/logpm-patch/src/main/java/com/logpm/patch/aspect/JobAnnotationAspect.java
  18. 2
      blade-service/logpm-patch/src/main/java/com/logpm/patch/interceptor/LocalServerLoginAccountsInterceptor.java
  19. 179
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java
  20. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/aspect/ChangeAsyncAnnotationAspect.java
  21. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/interceptor/LocalServerLoginAccountsInterceptor.java

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

@ -84,7 +84,7 @@ public class DistributionSignforVO extends DistributionSignforEntity {
* 装车未扫数
*/
@ApiModelProperty(value = "装车未扫数")
private String withoutScanning;
private Integer withoutScanning;
/**
* 计划总数

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/JobAnnotationAspect.java

@ -72,7 +72,7 @@ public class JobAnnotationAspect {
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/JobAnnotationAspect.java

@ -71,7 +71,7 @@ public class JobAnnotationAspect {
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-business/src/main/java/com/logpm/business/aspect/ChangeAsyncAnnotationAspect.java

@ -78,7 +78,7 @@ public class ChangeAsyncAnnotationAspect {
data = bladeRedis.get(CacheNames.LOCAL_SERVER_USER + tenantId + ":" + account);
if (Objects.isNull(data)) {
data = mockLoginService.mockToken(tenantId, account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER + tenantId + ":" + account, data, 25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER + tenantId + ":" + account, data, 2591990L);
redisLockClient.unLock("local_server_user" + tenantId, LockType.FAIR);
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/ChangeAsyncAnnotationAspect.java

@ -80,7 +80,7 @@ public class ChangeAsyncAnnotationAspect {
data = bladeRedis.get(CacheNames.LOCAL_SERVER_USER + tenantId + ":" + account);
if (Objects.isNull(data)) {
data = mockLoginService.mockToken(tenantId, account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER + tenantId + ":" + account, data, 25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER + tenantId + ":" + account, data, 2591990L);
redisLockClient.unLock("local_server_user" + tenantId, LockType.FAIR);
}
}

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

@ -377,9 +377,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
private String getDeliveryTypeName(String type) {
switch (type) {
case "市配":
case "1":
return DistributionTypeConstant.shipie.getName();
case "商配":
case "2":
return DistributionTypeConstant.shangpei.getName();
default:
return "";
@ -2416,14 +2416,39 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
d.setDeliveryTypeName(getDeliveryTypeName(d.getDeliveryType()));
DistributionSignforOwnExcel signforExcel = new DistributionSignforOwnExcel();
BeanUtils.copyProperties(d, signforExcel);
// BeanUtils.copyProperties(d, signforExcel);
signforExcel.setTrainNumber(d.getTrainNumber());
signforExcel.setReservationCode(d.getReservationCode());
signforExcel.setDeliveryDriverName(d.getDriverName());
signforExcel.setDeliveryDriverPhone(d.getDriverPhone());
signforExcel.setVehicleName(d.getVehicleName());
signforExcel.setLoadingTime(d.getLoadingTime());
signforExcel.setOrderCode(d.getOrderCode());
signforExcel.setTaskTime(d.getTaskTime());
signforExcel.setOrderCode(d.getStockArticleId());
signforExcel.setDeliveryTypeName(d.getDeliveryTypeName());
signforExcel.setSigningStatusName(d.getSigningStatusName());
signforExcel.setSigningTime(d.getSigningTime());
signforExcel.setDeliveryStatusName(d.getDeliveryStatusName());
signforExcel.setDeliveryPhone(d.getDriverPhone());
signforExcel.setLoadedNumber(d.getLoadedNumber());
signforExcel.setReceivedQuantity(d.getReceivedQuantity());
signforExcel.setReservationNum(d.getReservationNum());
signforExcel.setDeliveryAddress(d.getDeliveryAddress());
signforExcel.setWithoutScanning(d.getWithoutScanning());
signforExcel.setLoadingTime(d.getSigningTime());
signforExcel.setConsignee(d.getConsignee());
signforExcel.setDeliveryPhone(d.getDeliveryPhone());
signforExcel.setDeliveryTypeName(d.getDeliveryTypeName());
signforExcel.setSjsigningTime(d.getSjsigningTime());
signforExcel.setSigneeName(d.getSigneeName());
signforExcel.setSigningStatusName(d.getSigningStatus());
signforExcel.setDeliveryStatusName(d.getSijiSigningStatus());
signforExcel.setExamineUserName(d.getExamineUserName());
signforExcel.setWarehouseName(d.getWarehouseName());
signforExcel.setUnsigneds(d.getTotalNum() - d.getSigningNum());
a.add(signforExcel);
});

2
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/aspect/JobAnnotationAspect.java

@ -71,7 +71,7 @@ public class JobAnnotationAspect {
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/LocalServerLoginAccountsInterceptor.java

@ -52,7 +52,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/interceptor/LocalServerLoginAccountsInterceptor.java

@ -52,7 +52,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/interceptor/LocalServerLoginAccountsInterceptor.java

@ -52,7 +52,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/aspect/JobAnnotationAspect.java

@ -71,7 +71,7 @@ public class JobAnnotationAspect {
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/interceptor/LocalServerLoginAccountsInterceptor.java

@ -52,7 +52,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java

@ -52,7 +52,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/interceptor/LocalServerLoginAccountsInterceptor.java

@ -52,7 +52,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/JobAnnotationAspect.java

@ -65,7 +65,7 @@ public class JobAnnotationAspect {
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java

@ -52,7 +52,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-patch/src/main/java/com/logpm/patch/aspect/JobAnnotationAspect.java

@ -71,7 +71,7 @@ public class JobAnnotationAspect {
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

2
blade-service/logpm-patch/src/main/java/com/logpm/patch/interceptor/LocalServerLoginAccountsInterceptor.java

@ -54,7 +54,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

179
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java

@ -9,8 +9,12 @@ import com.logpm.report.vo.indexCount.IndexDeliveryDataVO;
import com.logpm.report.vo.indexCount.IndexSignforDataVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.cache.CacheNames;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
@ -24,7 +28,9 @@ import java.util.*;
@AllArgsConstructor
public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
private WarehouseIndexMapper warehouseIndexMapper;
private final WarehouseIndexMapper warehouseIndexMapper;
private final BladeRedis bladeRedis;
@Override
public IndexOpenOrderDataVO openOrderData(IndexDTO indexDTO) {
@ -111,78 +117,103 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
@Override
public IndexHandOrderDataVO handOrderData(IndexDTO indexDTO) {
List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexHandOrderDataVO indexHandOrderDataVO = new IndexHandOrderDataVO();
if (warehouseIds.isEmpty()) {
return indexHandOrderDataVO;
//增加缓存
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "allocationData");
IndexHandOrderDataVO indexHandOrderDataVO = bladeRedis.get(key);
if (Objects.isNull(indexHandOrderDataVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds();
indexHandOrderDataVO = new IndexHandOrderDataVO();
if (warehouseIds.isEmpty()) {
return indexHandOrderDataVO;
}
//当前在库的数据 订制品 零担
indexHandOrderDataVO = warehouseIndexMapper.handOrderData(indexDTO);
//当前在库的库存品
Integer stockListNum = warehouseIndexMapper.findHandStockListNum(indexDTO);
indexHandOrderDataVO.setTotalNum(indexHandOrderDataVO.getTotalNum() + stockListNum);
//已打托数量
Integer trayNum = warehouseIndexMapper.findTrayNum(indexDTO);
indexHandOrderDataVO.setTrayNum(trayNum);
bladeRedis.setEx(key, indexHandOrderDataVO, 3600L);
}
//当前在库的数据 订制品 零担
indexHandOrderDataVO = warehouseIndexMapper.handOrderData(indexDTO);
//当前在库的库存品
Integer stockListNum = warehouseIndexMapper.findHandStockListNum(indexDTO);
indexHandOrderDataVO.setTotalNum(indexHandOrderDataVO.getTotalNum() + stockListNum);
//已打托数量
Integer trayNum = warehouseIndexMapper.findTrayNum(indexDTO);
indexHandOrderDataVO.setTrayNum(trayNum);
return indexHandOrderDataVO;
}
@Override
public IndexAllocationDataVO allocationData(IndexDTO indexDTO) {
List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexAllocationDataVO indexAllocationDataVO = new IndexAllocationDataVO();
if (warehouseIds.isEmpty()) {
return indexAllocationDataVO;
}
//当前在库的数据 订制品 零担
IndexHandOrderDataVO indexHandOrderDataVO = warehouseIndexMapper.handOrderData(indexDTO);
//当前在库的库存品
Integer stockListNum = warehouseIndexMapper.findHandStockListNum(indexDTO);
Integer totalNum = indexHandOrderDataVO.getTotalNum() + stockListNum;
//查询库位总数
Integer totalAllocationNum = warehouseIndexMapper.findTotalAllocationNum(indexDTO);
//已使用库位数
Integer useAllocationNum = warehouseIndexMapper.findUseAllocationNum(indexDTO);
//已上架件数
Integer upshelfNum = warehouseIndexMapper.findUpshelfNum(indexDTO);
indexAllocationDataVO.setTotalNum(totalAllocationNum);
indexAllocationDataVO.setUseNum(useAllocationNum);
indexAllocationDataVO.setNullNum(totalAllocationNum - useAllocationNum);
indexAllocationDataVO.setUpshelfNum(upshelfNum);
indexAllocationDataVO.setNoUpshelfNum(totalNum - upshelfNum);
//增加缓存
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "allocationData");
IndexAllocationDataVO indexAllocationDataVO = bladeRedis.get(key);
if (Objects.isNull(indexAllocationDataVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds();
indexAllocationDataVO = new IndexAllocationDataVO();
if (warehouseIds.isEmpty()) {
return indexAllocationDataVO;
}
//当前在库的数据 订制品 零担
IndexHandOrderDataVO indexHandOrderDataVO = warehouseIndexMapper.handOrderData(indexDTO);
//当前在库的库存品
Integer stockListNum = warehouseIndexMapper.findHandStockListNum(indexDTO);
Integer totalNum = indexHandOrderDataVO.getTotalNum() + stockListNum;
//查询库位总数
Integer totalAllocationNum = warehouseIndexMapper.findTotalAllocationNum(indexDTO);
//已使用库位数
Integer useAllocationNum = warehouseIndexMapper.findUseAllocationNum(indexDTO);
//已上架件数
Integer upshelfNum = warehouseIndexMapper.findUpshelfNum(indexDTO);
indexAllocationDataVO.setTotalNum(totalAllocationNum);
indexAllocationDataVO.setUseNum(useAllocationNum);
indexAllocationDataVO.setNullNum(totalAllocationNum - useAllocationNum);
indexAllocationDataVO.setUpshelfNum(upshelfNum);
indexAllocationDataVO.setNoUpshelfNum(totalNum - upshelfNum);
bladeRedis.setEx(key, indexAllocationDataVO, 3600L);
}
return indexAllocationDataVO;
}
@Override
public IndexTrunklineHandOrderDataVO trunklineHandOrderData(IndexDTO indexDTO) {
List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = new IndexTrunklineHandOrderDataVO();
if (warehouseIds.isEmpty()) {
return indexTrunklineHandOrderDataVO;
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "trunklineHandOrderData");
IndexTrunklineHandOrderDataVO indexAllocationDataVO = bladeRedis.get(key);
if (Objects.isNull(indexAllocationDataVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = new IndexTrunklineHandOrderDataVO();
if (warehouseIds.isEmpty()) {
return indexTrunklineHandOrderDataVO;
}
//订制品
JSONObject packageJson = warehouseIndexMapper.findPackageTrunklineHandOrderData(indexDTO);
Integer packageWaybillNum = packageJson.getInteger("waybillNum");
Integer packageHandleNum = packageJson.getInteger("handleNum");
BigDecimal packageHandleWeight = packageJson.getBigDecimal("handleWeight");
BigDecimal packageHandleVolume = packageJson.getBigDecimal("handleVolume");
//零担
JSONObject zeroJson = warehouseIndexMapper.findZeroTrunklineHandOrderData(indexDTO);
Integer zeroWaybillNum = zeroJson.getInteger("waybillNum");
Integer zeroHandleNum = zeroJson.getInteger("handleNum");
BigDecimal zeroHandleWeight = zeroJson.getBigDecimal("handleWeight");
BigDecimal zeroHandleVolume = zeroJson.getBigDecimal("handleVolume");
indexTrunklineHandOrderDataVO.setWaybillNum(packageWaybillNum + zeroWaybillNum);
indexTrunklineHandOrderDataVO.setHandleNum(packageHandleNum + zeroHandleNum);
indexTrunklineHandOrderDataVO.setHandleWeight(packageHandleWeight.add(zeroHandleWeight));
indexTrunklineHandOrderDataVO.setHandleVolume(packageHandleVolume.add(zeroHandleVolume));
}
//订制品
JSONObject packageJson = warehouseIndexMapper.findPackageTrunklineHandOrderData(indexDTO);
Integer packageWaybillNum = packageJson.getInteger("waybillNum");
Integer packageHandleNum = packageJson.getInteger("handleNum");
BigDecimal packageHandleWeight = packageJson.getBigDecimal("handleWeight");
BigDecimal packageHandleVolume = packageJson.getBigDecimal("handleVolume");
//零担
JSONObject zeroJson = warehouseIndexMapper.findZeroTrunklineHandOrderData(indexDTO);
Integer zeroWaybillNum = zeroJson.getInteger("waybillNum");
Integer zeroHandleNum = zeroJson.getInteger("handleNum");
BigDecimal zeroHandleWeight = zeroJson.getBigDecimal("handleWeight");
BigDecimal zeroHandleVolume = zeroJson.getBigDecimal("handleVolume");
indexTrunklineHandOrderDataVO.setWaybillNum(packageWaybillNum + zeroWaybillNum);
indexTrunklineHandOrderDataVO.setHandleNum(packageHandleNum + zeroHandleNum);
indexTrunklineHandOrderDataVO.setHandleWeight(packageHandleWeight.add(zeroHandleWeight));
indexTrunklineHandOrderDataVO.setHandleVolume(packageHandleVolume.add(zeroHandleVolume));
return indexTrunklineHandOrderDataVO;
}
@ -326,10 +357,10 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
String dayUnSignforNum = warehouseIndexMapper.findUnSignforDataByDay(indexDTO);
indexSignforDayDataVO.setUnSignNum(dayUnSignforNum);
//计算签收率
if (!"0".equals(daySignforNum) && !"0".equals(dayUnSignforNum) ) {
if (!"0".equals(daySignforNum) && !"0".equals(dayUnSignforNum)) {
BigDecimal bd1 = new BigDecimal(daySignforNum);
BigDecimal bd2 = new BigDecimal(dayUnSignforNum);
BigDecimal divide = bd1.divide(bd1.add(bd2),4,BigDecimal.ROUND_HALF_EVEN);
BigDecimal divide = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_HALF_EVEN);
String signScale = divide.toString();
indexSignforDayDataVO.setSignScale(signScale);
}
@ -342,7 +373,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
if (!"0".equals(dayClerkSignforNum) && !"0".equals(dayPlanByday)) {
BigDecimal bd1 = new BigDecimal(dayClerkSignforNum);
BigDecimal bd2 = new BigDecimal(dayPlanByday);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4,BigDecimal.ROUND_CEILING);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexSignforDayDataVO.setClerkSignforScale(signScale);
}
@ -360,10 +391,10 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
String monthUnSignforNum = warehouseIndexMapper.findUnSignforDataByMonth(indexDTO);
indexSignforMonthDataVO.setUnSignNum(monthUnSignforNum);
//计算签收率
if (!"0".equals(monthSignforNum) &&!"0".equals(monthUnSignforNum)) {
if (!"0".equals(monthSignforNum) && !"0".equals(monthUnSignforNum)) {
BigDecimal bd1 = new BigDecimal(monthSignforNum);
BigDecimal bd2 = new BigDecimal(monthUnSignforNum);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexSignforMonthDataVO.setSignScale(signScale);
}
@ -371,20 +402,20 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
String monthClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByMonth(indexDTO);
indexSignforMonthDataVO.setClerkSignNum(monthClerkSignforNum);
String monthPlan = warehouseIndexMapper.findPlanNumByMonth(indexDTO);
if (!"0".equals(monthClerkSignforNum) &&!"0".equals(monthPlan)) {
if (!"0".equals(monthClerkSignforNum) && !"0".equals(monthPlan)) {
BigDecimal bd1 = new BigDecimal(monthClerkSignforNum);
BigDecimal bd2 = new BigDecimal(monthPlan);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexSignforMonthDataVO.setClerkSignforScale(signScale);
}
//查询当月文员复核
String monthClerkOverTimeSignfoNum = warehouseIndexMapper.findClerkOverTimeNumByMonth(indexDTO);
indexSignforMonthDataVO.setClerkOverTimeSignfoNum(monthClerkOverTimeSignfoNum);
if (!"0".equals(monthClerkOverTimeSignfoNum) && !"0".equals(monthPlan)) {
if (!"0".equals(monthClerkOverTimeSignfoNum) && !"0".equals(monthPlan)) {
BigDecimal bd1 = new BigDecimal(monthClerkOverTimeSignfoNum);
BigDecimal bd2 = new BigDecimal(monthPlan);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexSignforMonthDataVO.setClerkOverTimeScale(signScale);
}
@ -401,10 +432,10 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
String dayBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByDay(indexDTO);
indexBillLadingSignforDayDataVO.setUnSignNum(dayBillLadingUnSignfor);
//计算当天的签收率
if (!"0".equals(dayBillLadingSignfor) &&!"0".equals(dayBillLadingUnSignfor) ) {
if (!"0".equals(dayBillLadingSignfor) && !"0".equals(dayBillLadingUnSignfor)) {
BigDecimal bd1 = new BigDecimal(dayBillLadingSignfor);
BigDecimal bd2 = new BigDecimal(dayBillLadingUnSignfor);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforDayDataVO.setClerkSignforScale(signScale);
}
@ -415,11 +446,11 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
//查询当天文员复核数
String dayBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByDay(indexDTO);
indexBillLadingSignforDayDataVO.setClerkSignNum(dayBillLadingSignforNum);
if (!"0".equals(dayBillLadingPlanNum) && !"0".equals(dayBillLadingSignforNum) ) {
if (!"0".equals(dayBillLadingPlanNum) && !"0".equals(dayBillLadingSignforNum)) {
//计算当月的超时签收率
BigDecimal bd1 = new BigDecimal(dayBillLadingSignforNum);
BigDecimal bd2 = new BigDecimal(dayBillLadingPlanNum);
BigDecimal multiply = bd1.divide(bd1.add(bd2),1, BigDecimal.ROUND_CEILING);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 1, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforDayDataVO.setClerkOverTimeScale(signScale);
}
@ -439,10 +470,10 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
String monthBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByMonth(indexDTO);
indexBillLadingSignforMonthDataVO.setUnSignNum(monthBillLadingUnSignfor);
//计算当月的签收率
if ( !"0".equals(monthBillLadingSignfor) && !"0".equals(monthBillLadingUnSignfor) ) {
if (!"0".equals(monthBillLadingSignfor) && !"0".equals(monthBillLadingUnSignfor)) {
BigDecimal bd1 = new BigDecimal(monthBillLadingSignfor);
BigDecimal bd2 = new BigDecimal(monthBillLadingUnSignfor);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforMonthDataVO.setSignScale(signScale);
}
@ -455,11 +486,11 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillLadingSignforMonthDataVO.setClerkOverTimeSignfoNum(monthBillLadingOverTimeNum);
//查询当月计划总数
String monthBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByMonth(indexDTO);
if (!"0".equals(monthBillLadingOverTimeNum) && !"0".equals(monthBillLadingPlanNum) ) {
if (!"0".equals(monthBillLadingOverTimeNum) && !"0".equals(monthBillLadingPlanNum)) {
//计算当月的超时签收率
BigDecimal bd1 = new BigDecimal(monthBillLadingOverTimeNum);
BigDecimal bd2 = new BigDecimal(monthBillLadingPlanNum);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforMonthDataVO.setClerkOverTimeScale(signScale);
}

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/aspect/ChangeAsyncAnnotationAspect.java

@ -78,7 +78,7 @@ public class ChangeAsyncAnnotationAspect {
data = bladeRedis.get(CacheNames.LOCAL_SERVER_USER + tenantId + ":" + account);
if (Objects.isNull(data)) {
data = mockLoginService.mockToken(tenantId, account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER + tenantId + ":" + account, data, 25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER + tenantId + ":" + account, data, 2591990L);
redisLockClient.unLock("local_server_user" + tenantId, LockType.FAIR);
}
}

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/interceptor/LocalServerLoginAccountsInterceptor.java

@ -51,7 +51,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt
data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+account);
if(Objects.isNull(data)){
data = mockLoginService.mockToken("627683",account);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,25919900L);
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+account,data,2591990L);
redisLockClient.unLock("local_server_user", LockType.FAIR);
}
}

Loading…
Cancel
Save