Browse Source

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

pre-production
zhenghaoyu 1 week ago
parent
commit
4cf080ae9b
  1. 10
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java
  2. 36
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  3. 12
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml
  4. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  5. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  6. 19
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  7. 128
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  8. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  9. 16
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

10
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java

@ -339,6 +339,16 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
currentStockArticleEntity.setIncomingNum(enterNum); currentStockArticleEntity.setIncomingNum(enterNum);
Long orderId = stockArticleClient.addData(currentStockArticleEntity); Long orderId = stockArticleClient.addData(currentStockArticleEntity);
if(!Objects.isNull(orderId)){ if(!Objects.isNull(orderId)){
if(orderId.equals(0L)){
log.warn("################dealAbnormal: 订单信息保存失败 orderCode={} warehouseId={}",orderCode,warehouseId);
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################dealAbnormal: 订单信息正在更新 orderCode={} warehouseId={}",orderCode,warehouseId);
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
List<TrunklineScanZeroDetailEntity> updateScanZeroDetailEntityList = new ArrayList<>(); List<TrunklineScanZeroDetailEntity> updateScanZeroDetailEntityList = new ArrayList<>();
List<DistributionParcelNumberEntity> addParcelNumberEntityList = new ArrayList<>(); List<DistributionParcelNumberEntity> addParcelNumberEntityList = new ArrayList<>();
List<AftersalesAbnormalRecordZeroDetailEntity> updateRecordZeroDetailList = new ArrayList<>(); List<AftersalesAbnormalRecordZeroDetailEntity> updateRecordZeroDetailList = new ArrayList<>();

36
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -38,6 +38,7 @@ import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.redis.cache.BladeRedis;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -59,8 +60,9 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
private final IDistributionStockArticleService distributionStockArticleService; private final IDistributionStockArticleService distributionStockArticleService;
private final IDistributionParcelListService distributionParcelListService; private final IDistributionParcelListService distributionParcelListService;
private final BladeRedis bladeRedis;
@Override @Override
@GetMapping(TOP) @GetMapping(TOP)
public BladePage<DistributionStockArticleEntity> top(Integer current, Integer size) { public BladePage<DistributionStockArticleEntity> top(Integer current, Integer size) {
Query query = new Query(); Query query = new Query();
@ -73,11 +75,35 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
@Override @Override
@PostMapping(API_PREFIX + "/addData") @PostMapping(API_PREFIX + "/addData")
public Long addData(DistributionStockArticleEntity distributionStockArticleEntity) { public Long addData(DistributionStockArticleEntity distributionStockArticleEntity) {
boolean saveFlag = distributionStockArticleService.save(distributionStockArticleEntity);
if(saveFlag){ String orderCode = distributionStockArticleEntity.getOrderCode();
return distributionStockArticleEntity.getId(); Long warehouseId = distributionStockArticleEntity.getWarehouseId();
String key = orderCode + warehouseId;
Boolean exists = bladeRedis.exists(key);
if(exists){
String idStr = bladeRedis.get(key);
if("1".equals(idStr)){
return 1L;
}else{
return Long.valueOf(idStr);
}
}else{ }else{
return 0L; bladeRedis.setEx(key,"1",30L);
DistributionStockArticleEntity distributionStockArticle = distributionStockArticleService.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(ObjectUtils.isNotEmpty(distributionStockArticle)){
bladeRedis.setEx(key,distributionStockArticle.getId(),30L);
return distributionStockArticle.getId();
}else{
boolean saveFlag = distributionStockArticleService.save(distributionStockArticleEntity);
if(saveFlag){
bladeRedis.setEx(key,distributionStockArticle.getId(),30L);
return distributionStockArticleEntity.getId();
}else{
return 0L;
}
}
} }
} }

12
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml

@ -958,6 +958,12 @@
<if test="param.settlementStatus != null"> <if test="param.settlementStatus != null">
and lww.settlement_status = #{param.settlementStatus} and lww.settlement_status = #{param.settlementStatus}
</if> </if>
<if test="param.startTime != null ">
and lww.document_making_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and lww.document_making_time &lt;= #{param.endTime}
</if>
GROUP BY lww.id GROUP BY lww.id
order by lww.create_time desc order by lww.create_time desc
</select> </select>
@ -1251,6 +1257,12 @@
<if test="param.settlementStatus != null"> <if test="param.settlementStatus != null">
and lww.settlement_status = #{param.settlementStatus} and lww.settlement_status = #{param.settlementStatus}
</if> </if>
<if test="param.startTime != null ">
and lww.document_making_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and lww.document_making_time &lt;= #{param.endTime}
</if>
GROUP BY lww.id GROUP BY lww.id
order by lww.create_time desc order by lww.create_time desc
</select> </select>

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -1096,6 +1096,9 @@ public class CarsLoadController {
carsLoadService.unloadByLoadId(loadCarsDTO); carsLoadService.unloadByLoadId(loadCarsDTO);
try{ try{
//同步一次系统无编码数据
carsLoadService.syncNoSystemData(loadId, myCurrentWarehouse.getId(), myCurrentWarehouse.getName());
carsLoadService.sendStationArrivedEnter(loadCarsDTO); carsLoadService.sendStationArrivedEnter(loadCarsDTO);
}catch (Exception e){ }catch (Exception e){

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -6193,6 +6193,15 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
if (Objects.isNull(orderId)) { if (Objects.isNull(orderId)) {
log.warn("#################createStockArticle: 保存订单信息失败 orderCode={}", distributionStockArticleEntity.getOrderCode()); log.warn("#################createStockArticle: 保存订单信息失败 orderCode={}", distributionStockArticleEntity.getOrderCode());
throw new CustomerException(405, "保存订单信息失败"); throw new CustomerException(405, "保存订单信息失败");
}else{
if(orderId.equals(0L)){
log.warn("################createStockArticle: 订单信息保存失败 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################dealAbnocreateStockArticlermal: 订单信息正在更新 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} }
List<WarehouseWayBillDetail> wayBillDetailList = warehouseWaybillDetailClient.findByWaybillId(warehouseWaybill.getId()); List<WarehouseWayBillDetail> wayBillDetailList = warehouseWaybillDetailClient.findByWaybillId(warehouseWaybill.getId());

19
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -233,6 +233,16 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
if (Objects.isNull(orderId)) { if (Objects.isNull(orderId)) {
log.warn("##############saveOrderAndPackage: 订单信息有误 orderId={}", orderId); log.warn("##############saveOrderAndPackage: 订单信息有误 orderId={}", orderId);
throw new CustomerException(405, "订单信息有误"); throw new CustomerException(405, "订单信息有误");
}else{
if(orderId.equals(0L)){
log.warn("################saveOrderAndPackage: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################saveOrderAndPackage: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} }
log.info("#############saveOrderAndPackage: 订单信息保存成功 orderId={}", orderId); log.info("#############saveOrderAndPackage: 订单信息保存成功 orderId={}", orderId);
@ -582,6 +592,15 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
if (Objects.isNull(orderId)) { if (Objects.isNull(orderId)) {
log.warn("##############saveOrderAndPackage: 订单信息有误 orderId={}", orderId); log.warn("##############saveOrderAndPackage: 订单信息有误 orderId={}", orderId);
throw new CustomerException(405, "订单信息有误"); throw new CustomerException(405, "订单信息有误");
}else{
if(orderId.equals(0L)){
log.warn("################saveOrderAndPackage: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################saveOrderAndPackage: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} }
stockArticleClient.updateAllOrderTotalNum(orderCode, total); stockArticleClient.updateAllOrderTotalNum(orderCode, total);

128
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -1347,6 +1347,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setWarehouseEntryTimeEnd(date); newStockArticleEntity.setWarehouseEntryTimeEnd(date);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity); Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if (orderId != 0) { if (orderId != 0) {
if(orderId.equals(1L)){
log.warn("################unloadByLoadId: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
Integer isTransfer = 1; Integer isTransfer = 1;
List<DistributionParcelListVO> parcelListEntityList = distributionParcelListClient.findEntityVOListByOrderCode(orderCode, fromWarehouseId); List<DistributionParcelListVO> parcelListEntityList = distributionParcelListClient.findEntityVOListByOrderCode(orderCode, fromWarehouseId);
@ -1516,8 +1522,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String content = "包件在 " + warehouseEntity.getName() + "卸车确认"; String content = "包件在 " + warehouseEntity.getName() + "卸车确认";
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseEntity.getName(), node.getCode(), content); packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseEntity.getName(), node.getCode(), content);
//同步一次系统无编码数据
syncNoSystemData(loadId, warehouseId, warehouseEntity.getName());
} catch (Exception e) { } catch (Exception e) {
log.warn("###############unloadPackage: 存入异常列表记录失败"); log.warn("###############unloadPackage: 存入异常列表记录失败");
@ -5203,6 +5207,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setWarehouseEntryTimeEnd(date); newStockArticleEntity.setWarehouseEntryTimeEnd(date);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity); Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if (orderId != 0) { if (orderId != 0) {
if(orderId.equals(1L)){
log.warn("################zeroUnloadEnter: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
Integer isTransfer = 1; Integer isTransfer = 1;
List<DistributionParcelListVO> parcelListEntityList = distributionParcelListClient.findEntityVOListByOrderCode(orderCode, fromWarehouseId); List<DistributionParcelListVO> parcelListEntityList = distributionParcelListClient.findEntityVOListByOrderCode(orderCode, fromWarehouseId);
@ -5751,6 +5759,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
if(NumberUtil.equals(orderId,0)){ if(NumberUtil.equals(orderId,0)){
log.warn("################111111: 保存失败"); log.warn("################111111: 保存失败");
throw new CustomerException(405,"保存失败"); throw new CustomerException(405,"保存失败");
}else{
if(orderId.equals(1L)){
log.warn("################updateParcelListToWarehouse: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} }
}else{ }else{
stockArticleEntity.setGenre(1); stockArticleEntity.setGenre(1);
@ -7630,6 +7643,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setAllocation(null); newStockArticleEntity.setAllocation(null);
newStockArticleEntity.setTrays(null); newStockArticleEntity.setTrays(null);
orderId = distributionStockArticleClient.addData(newStockArticleEntity); orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if(orderId.equals(0L)){
log.warn("################batchUnload: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################batchUnload: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
finalOrderCodes.put(e, orderId); finalOrderCodes.put(e, orderId);
} }
@ -7751,6 +7773,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setAllocation(null); newStockArticleEntity.setAllocation(null);
newStockArticleEntity.setTrays(null); newStockArticleEntity.setTrays(null);
orderId = distributionStockArticleClient.addData(newStockArticleEntity); orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if(orderId.equals(0L)){
log.warn("################batchUnload: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################batchUnload: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
finalOrderCodes1.put(e, orderId); finalOrderCodes1.put(e, orderId);
} }
@ -10107,6 +10137,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newEntity.setAllocation(null); newEntity.setAllocation(null);
newEntity.setTrays(null); newEntity.setTrays(null);
Long orderId = distributionStockArticleClient.addData(newEntity); Long orderId = distributionStockArticleClient.addData(newEntity);
if(orderId.equals(0L)){
log.warn("################getDistributionStockArticle: 订单信息保存失败 orderCode={} warehouseId={}",newEntity.getOrderCode(),newEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################getDistributionStockArticle: 订单信息正在更新 orderCode={} warehouseId={}",newEntity.getOrderCode(),newEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
newEntity.setId(orderId); newEntity.setId(orderId);
return newEntity; return newEntity;
} }
@ -11896,7 +11934,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setIncomingNum(0); currentStockArticleEntity.setIncomingNum(0);
currentStockArticleEntity.setAllocation(null); currentStockArticleEntity.setAllocation(null);
currentStockArticleEntity.setTrays(null); currentStockArticleEntity.setTrays(null);
currentStockArticleEntity.setWarehouseEntryTime(new Date());
currentStockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity); currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackage: 订单信息保存失败 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackage: 订单信息正在更新 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
currentStockArticleEntity.setId(currentOrderId); currentStockArticleEntity.setId(currentOrderId);
} else { } else {
currentOrderId = currentStockArticleEntity.getId(); currentOrderId = currentStockArticleEntity.getId();
@ -12109,7 +12157,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setGenre(1); currentStockArticleEntity.setGenre(1);
currentStockArticleEntity.setAllocation(null); currentStockArticleEntity.setAllocation(null);
currentStockArticleEntity.setTrays(null); currentStockArticleEntity.setTrays(null);
currentStockArticleEntity.setWarehouseEntryTime(new Date());
currentStockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity); currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackage: 订单信息保存失败 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackage: 订单信息正在更新 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
currentStockArticleEntity.setId(currentOrderId); currentStockArticleEntity.setId(currentOrderId);
} else { } else {
currentOrderId = currentStockArticleEntity.getId(); currentOrderId = currentStockArticleEntity.getId();
@ -12281,7 +12339,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
stockArticleEntity.setIncomingNum(0); stockArticleEntity.setIncomingNum(0);
stockArticleEntity.setAllocation(null); stockArticleEntity.setAllocation(null);
stockArticleEntity.setTrays(null); stockArticleEntity.setTrays(null);
stockArticleEntity.setWarehouseEntryTime(new Date());
stockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(stockArticleEntity); currentOrderId = distributionStockArticleClient.addData(stockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackage: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackage: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
stockArticleEntity.setId(currentOrderId); stockArticleEntity.setId(currentOrderId);
} else { } else {
currentOrderId = stockArticleEntity.getId(); currentOrderId = stockArticleEntity.getId();
@ -12379,7 +12447,18 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticle.setWarehouse(basicdataWarehouseEntity.getName()); newStockArticle.setWarehouse(basicdataWarehouseEntity.getName());
newStockArticle.setAllocation(null); newStockArticle.setAllocation(null);
newStockArticle.setTrays(null); newStockArticle.setTrays(null);
newStockArticle.setWarehouseEntryTime(new Date());
newStockArticle.setWarehouseEntryTimeEnd(new Date());
orderId = distributionStockArticleClient.addData(newStockArticle); orderId = distributionStockArticleClient.addData(newStockArticle);
if(orderId.equals(0L)){
log.warn("################unloadPackage: 订单信息保存失败 orderCode={} warehouseId={}",newStockArticle.getOrderCode(),newStockArticle.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################unloadPackage: 订单信息正在更新 orderCode={} warehouseId={}",newStockArticle.getOrderCode(),newStockArticle.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} else { } else {
orderId = newStockArticle.getId(); orderId = newStockArticle.getId();
} }
@ -12744,7 +12823,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setTransferQuantity(0); currentStockArticleEntity.setTransferQuantity(0);
currentStockArticleEntity.setSigninQuantity(0); currentStockArticleEntity.setSigninQuantity(0);
currentStockArticleEntity.setIncomingNum(0); currentStockArticleEntity.setIncomingNum(0);
currentStockArticleEntity.setWarehouseEntryTime(new Date());
currentStockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity); currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackageNoXz: 订单信息保存失败 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackageNoXz: 订单信息正在更新 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
currentStockArticleEntity.setId(currentOrderId); currentStockArticleEntity.setId(currentOrderId);
} else { } else {
currentOrderId = currentStockArticleEntity.getId(); currentOrderId = currentStockArticleEntity.getId();
@ -12891,7 +12980,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setTransferQuantity(0); currentStockArticleEntity.setTransferQuantity(0);
currentStockArticleEntity.setSigninQuantity(0); currentStockArticleEntity.setSigninQuantity(0);
currentStockArticleEntity.setIncomingNum(0); currentStockArticleEntity.setIncomingNum(0);
currentStockArticleEntity.setWarehouseEntryTime(new Date());
currentStockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity); currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackageNoXz: 订单信息保存失败 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackageNoXz: 订单信息正在更新 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
currentStockArticleEntity.setId(currentOrderId); currentStockArticleEntity.setId(currentOrderId);
} else { } else {
currentOrderId = currentStockArticleEntity.getId(); currentOrderId = currentStockArticleEntity.getId();
@ -13054,7 +13153,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
stockArticleEntity.setIncomingNum(0); stockArticleEntity.setIncomingNum(0);
stockArticleEntity.setAllocation(null); stockArticleEntity.setAllocation(null);
stockArticleEntity.setTrays(null); stockArticleEntity.setTrays(null);
stockArticleEntity.setWarehouseEntryTime(new Date());
stockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(stockArticleEntity); currentOrderId = distributionStockArticleClient.addData(stockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackageNoXz: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackageNoXz: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
stockArticleEntity.setId(currentOrderId); stockArticleEntity.setId(currentOrderId);
} else { } else {
currentOrderId = stockArticleEntity.getId(); currentOrderId = stockArticleEntity.getId();
@ -13149,7 +13258,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticle.setWarehouse(basicdataWarehouseEntity.getName()); newStockArticle.setWarehouse(basicdataWarehouseEntity.getName());
newStockArticle.setAllocation(null); newStockArticle.setAllocation(null);
newStockArticle.setTrays(null); newStockArticle.setTrays(null);
newStockArticle.setWarehouseEntryTime(new Date());
newStockArticle.setWarehouseEntryTimeEnd(new Date());
orderId = distributionStockArticleClient.addData(newStockArticle); orderId = distributionStockArticleClient.addData(newStockArticle);
if(orderId.equals(0L)){
log.warn("################unloadPackageNoXz: 订单信息保存失败 orderCode={} warehouseId={}",newStockArticle.getOrderCode(),newStockArticle.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################unloadPackageNoXz: 订单信息正在更新 orderCode={} warehouseId={}",newStockArticle.getOrderCode(),newStockArticle.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} else { } else {
orderId = newStockArticle.getId(); orderId = newStockArticle.getId();
} }
@ -13849,6 +13968,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setCarsLoadNum(0); newStockArticleEntity.setCarsLoadNum(0);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity); Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if (orderId != 0) { if (orderId != 0) {
if(orderId.equals(1L)){
log.warn("################unloadZeroWithTray: 订单信息正在更新 orderCode={} warehouseId={}",newStockArticleEntity.getOrderCode(),newStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, fromWarehouseId); List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, fromWarehouseId);
List<DistributionParcelNumberEntity> ls = new ArrayList<>(); List<DistributionParcelNumberEntity> ls = new ArrayList<>();
for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) { for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) {

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -4877,10 +4877,15 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
id = distributionStockArticleClient.addData(distributionStockArticleEntity); id = distributionStockArticleClient.addData(distributionStockArticleEntity);
distributionStockArticleEntity.setId(id); distributionStockArticleEntity.setId(id);
if (id == 0) { if(id.equals(0L)){
log.warn("#################handleDataToPlatform: 保存订单信息失败 orderCode={}", orderCode); log.warn("################handleDataToPlatform: 订单信息保存失败 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405, "保存订单信息失败"); throw new CustomerException(405,"订单信息保存失败");
} }
if(id.equals(1L)){
log.warn("################handleDataToPlatform: 订单信息正在更新 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} else { } else {
id = distributionStockArticleEntity.getId(); id = distributionStockArticleEntity.getId();
distributionStockArticleEntity.setTotalNumber(total); distributionStockArticleEntity.setTotalNumber(total);

16
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -285,9 +285,13 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity.setDescriptionGoods(sb.toString()); distributionStockArticleEntity.setDescriptionGoods(sb.toString());
id = distributionStockArticleClient.addData(distributionStockArticleEntity); id = distributionStockArticleClient.addData(distributionStockArticleEntity);
if (id == 0) { if(id.equals(0L)){
log.warn("#################createStockArticle: 保存订单信息失败 orderSelfNum={}", waybillNo); log.warn("################createStockArticle: 订单信息保存失败 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405, "保存订单信息失败"); throw new CustomerException(405,"订单信息保存失败");
}
if(id.equals(1L)){
log.warn("################createStockArticle: 订单信息正在更新 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
} }
//第一次生成订单也要生成包件信息 //第一次生成订单也要生成包件信息
@ -460,6 +464,12 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
log.warn("###########splitOrder: 保存新订单数据失败"); log.warn("###########splitOrder: 保存新订单数据失败");
throw new CustomerException(405, "保存新订单数据失败"); throw new CustomerException(405, "保存新订单数据失败");
} else { } else {
if(aLong.equals(1L)){
log.warn("################splitOrder: 订单信息正在更新 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>(); List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>();
for (ProductDTO productDTO : products) { for (ProductDTO productDTO : products) {
String productName = productDTO.getProductName(); String productName = productDTO.getProductName();

Loading…
Cancel
Save