diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadScanEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadScanEntity.java
index 994bdc076..ef75acb98 100644
--- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadScanEntity.java
+++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadScanEntity.java
@@ -7,6 +7,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
+import java.util.Date;
+
@Data
@TableName("logpm_trunkline_cars_load_scan")
@ApiModel(value = "TrunklineCarsLoadScan对象", description = "干线装车扫描表")
@@ -107,5 +109,16 @@ public class TrunklineCarsLoadScanEntity extends TenantEntity {
@ApiModelProperty(name = "是否补录 0否 1是",notes = "")
private Integer isSupple ;
+ /** 签收时间 */
+ @ApiModelProperty(name = "签收时间",notes = "")
+ private Date signTime;
+
+ /** 签收异常 */
+ @ApiModelProperty(name = "签收异常",notes = "")
+ private Integer signAbnormal;
+
+ /** 签收单id */
+ @ApiModelProperty(name = "签收单id",notes = "")
+ private Long signOrderId;
}
diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineLoadSignOrderEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineLoadSignOrderEntity.java
index a7bebdf29..3d2cf7fb3 100644
--- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineLoadSignOrderEntity.java
+++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineLoadSignOrderEntity.java
@@ -7,6 +7,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
+import java.util.Date;
+
@Data
@TableName("logpm_trunkline_load_sign_order")
@ApiModel(value = "TrunklineLoadSignOrder对象", description = "配载计划直发签收单")
@@ -81,4 +83,8 @@ public class TrunklineLoadSignOrderEntity extends TenantEntity {
@ApiModelProperty(name = "签收单号",notes = "")
private String loadSignCode;
+ /** 签收时间 */
+ @ApiModelProperty(name = "签收时间",notes = "")
+ private Date signTime;
+
}
diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
index c750ba493..a37898129 100644
--- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
+++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
@@ -114,7 +114,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
bladeRedis.expireAt(key,CommonUtil.getDayEnd());
}
- return warehouseCode+CommonUtil.geFourNumber(incr,5);
+ return warehouseCode+"ZFQS"+CommonUtil.geFourNumber(incr,5);
}
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
index f6a916587..d2d29b39e 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
@@ -28,42 +28,33 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataGoodsAreaClient;
import com.logpm.basicdata.feign.IBasicdataTrayClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
-import com.logpm.distribution.bean.Res;
import com.logpm.distribution.bean.Resp;
-
-import com.logpm.distribution.config.RedissonConfig;
import com.logpm.distribution.dto.app.StockConfigInfoVO;
-import com.logpm.distribution.dto.app.StockConfigOrderPackageListVO;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.dto.app.StockupZeroDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.mapper.DistributionReservationMapper;
-import com.logpm.distribution.mapper.DistributionReservationStocklistMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
-import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
-import com.logpm.warehouse.feign.*;
+import com.logpm.warehouse.feign.IWarehouseGoodsAllocationClient;
+import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient;
+import com.logpm.warehouse.feign.IWarehouseUpdownGoodsLogClient;
+import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.redisson.api.RLock;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.RabbitConstant;
-import org.springblade.common.constant.loading.LoadingStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageFreezeStatusConstant;
-import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant;
-import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
-import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.pda.PdaAudioLingoStatus;
import org.springblade.common.constant.reservation.ReservationLoadingStatusConstant;
import org.springblade.common.constant.reservation.ReservationOrderStatusConstant;
import org.springblade.common.constant.reservation.ReservationPackageStatusConstant;
import org.springblade.common.constant.reservation.ReservationSigningStatusConstant;
-import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
@@ -76,7 +67,6 @@ import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.web.bind.annotation.*;
@@ -84,7 +74,6 @@ import org.springframework.web.bind.annotation.*;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.*;
-import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
@@ -132,6 +121,8 @@ public class DistributionStockupAppController extends BladeController {
private final IDisStockOrdercodeRecoService disStockOrdercodeRecoService;
+ private final BladeRedis redis;
+
/**
* 备货信息表 任务客户 分页列表
@@ -1085,13 +1076,21 @@ public class DistributionStockupAppController extends BladeController {
// TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition);
// try{
//设置lockey
- String lockKey = stockupDTO.getPacketBarCode() + stockupDTO.getStockupId();
- RLock lock = new RedissonConfig().redisson().getLock(lockKey);
- if (lock.isLocked()) {
+ String lockKey = "Lock:"+stockupDTO.getPacketBarCode() + stockupDTO.getStockupId();
+ log.info("#################stockupScan:获取redisson对象开始");
+// RLock lock = redisson.getLock(lockKey);
+// if (lock.isLocked()) {
+// String audioValue2 = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, PdaAudioLingoStatus.chongfusaomiao.getValue());
+// return Resp.scanFail(PdaAudioLingoStatus.chongfusaomiao.getName(), audioValue2);
+// }
+// lock.lock(5, TimeUnit.SECONDS);
+ if(redis.exists(lockKey)){
String audioValue2 = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, PdaAudioLingoStatus.chongfusaomiao.getValue());
return Resp.scanFail(PdaAudioLingoStatus.chongfusaomiao.getName(), audioValue2);
}
- lock.lock(5, TimeUnit.SECONDS);
+ redis.setEx(lockKey,stockupDTO.getPacketBarCode() + stockupDTO.getStockupId(),5L);
+
+
if (scanType == 1) {
//包件
return stockupScanByCustom(stockupDTO);
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
index 696b8091c..b93980109 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
@@ -930,7 +930,8 @@
select *
from logpm_distribution_parcel_list
where order_package_code = #{orderPackageCode}
- and order_package_status in ('20','30')
+ and order_package_status = '20'
+ limit 1
- select *
- from from logpm_trunkline_cars_order ltco
+ select ltco.*
+ from logpm_trunkline_cars_order ltco
left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltco.order_code and ldsa.warehouse_id = ltco.node_id
where ltco.load_id = #{loadId}
and ltco.node_id = #{warehouseId}
@@ -243,4 +244,21 @@
and ltco.is_customer = '1'
+
+ update logpm_trunkline_cars_order
+ set sign_order_id = null
+ where load_id = #{loadId}
+ and node_id = #{warehouseId}
+ and sign_num = 0
+
+
+
+ select *
+ from logpm_trunkline_cars_order
+ where load_id = #{loadId}
+ and node_id = #{warehouseId}
+ and order_code = #{orderCode}
+ and waybill_no =#{waybillNo}
+
+
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml
index 07b8bcd1f..0e446a4e3 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml
@@ -17,20 +17,24 @@
- select ltlso.*
+ select ltlso.*,
ltcl.driver_name driverName
from logpm_trunkline_load_sign_order ltlso
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
- where ltlso.load_id = #{param.loadId}
- and ltlso.warehouse_id = #{param.warehouseId}
- and ltcl.driver_id = #{param.driverId}
-
- and ltlso.sign_status = '20'
-
-
- and ltlso.sign_status != '20'
-
-
+
+
+ and ltlso.load_id = #{param.loadId}
+
+
+ and ltlso.sign_status = '20'
+
+
+ and ltlso.sign_status != '20'
+
+
+ and ltcl.driver_id = #{param.driverId}
+
+
@@ -63,6 +67,7 @@
left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltco.order_code and ldsa.warehouse_id = ltco.node_id
where ltco.sign_order_id = #{param.signOrderId}
and ltco.is_customer = '1'
+ and ltcls.id is not null
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
index 60667ce65..c2ef22565 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
@@ -65,4 +65,6 @@ public interface ITrunklineCarsLoadScanService extends BaseService findListByIds(List loadScanIds);
+
+ Integer findRealSignNumBySignOrderId(Long signOrderId);
}
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
index 7418f46ec..1af0c20a8 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
@@ -48,4 +48,8 @@ public interface ITrunklineCarsOrderService extends BaseService findCustomerOrderList(Long loadId, Long warehouseId, String mallName);
+ void clearSignOrderId(Long loadId, Long warehouseId);
+
+ TrunklineCarsOrderEntity findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(Long loadId, Long warehouseId, String orderCode, String waybillNo);
+
}
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsSignLogService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsSignLogService.java
index be0db4481..7c3040569 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsSignLogService.java
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsSignLogService.java
@@ -1,10 +1,11 @@
package com.logpm.trunkline.service;
-import com.baomidou.mybatisplus.extension.service.IService;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.entity.TrunklineCarsSignLogEntity;
+import org.springblade.core.mp.base.BaseService;
-public interface ITrunklineCarsSignLogService extends IService {
+public interface ITrunklineCarsSignLogService extends BaseService {
void addEntity(TrunklineCarsLoadScanEntity carsLoadScanEntity,String remark);
+ void saveSignLog(Long warehouseId,String warehouseName,Long loadId,String loadCode,Long waybillId,String waybillNo,String orderCode,String scanCode,Integer num,Integer type,Integer isData,Integer isAbnormal,Long trayId,String trayCode,String trayName,Long fromWarehouseId,Long loadScanId,String remark);
}
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineLoadSignOrderService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineLoadSignOrderService.java
index 46a394080..810519a01 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineLoadSignOrderService.java
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineLoadSignOrderService.java
@@ -1,15 +1,15 @@
package com.logpm.trunkline.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import com.logpm.trunkline.vo.SignOrderDetailVO;
import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO;
+import org.springblade.core.mp.base.BaseService;
import java.util.List;
-public interface ITrunklineLoadSignOrderService extends IService {
+public interface ITrunklineLoadSignOrderService extends BaseService {
List findAllLoadSignOrderList(Long loadId, Long warehouseId);
void deleteListBySignStatusAndLoadIdAndWarehouseId(Long loadId, Long warehouseId);
@@ -21,4 +21,5 @@ public interface ITrunklineLoadSignOrderService extends IService findSignOrderDetailList(IPage