Browse Source

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

single_db
Diss 1 year ago
parent
commit
122496a535
  1. 13
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadScanEntity.java
  2. 6
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineLoadSignOrderEntity.java
  3. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  4. 37
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  5. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  6. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  7. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  8. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  9. 105
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java
  10. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  11. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  12. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
  13. 30
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  14. 27
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml
  15. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  16. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
  17. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsSignLogService.java
  18. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineLoadSignOrderService.java
  19. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineWaybillPackageService.java
  20. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  21. 179
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  22. 10
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java
  23. 28
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsSignLogServiceImpl.java
  24. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineLoadSignOrderServiceImpl.java
  25. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java

13
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;
}

6
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;
}

2
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);
}

37
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);

3
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>
<select id="selectByOrderPackageCode"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity">

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -2967,16 +2967,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//根据配送计划和运单号查询出该预约
// DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomer(deliveryListEntityId, k);
DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomerUnit(deliveryListEntityId, k);
DistributionSignforEntity signforEntity = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda()
.eq(DistributionSignforEntity::getReservationId, reservationEntity.getId())
.eq(DistributionSignforEntity::getDeliveryId, deliveryListEntity.getId())
);
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}",reservationEntity.getId());
throw new RuntimeException("收货单位:"+reservationEntity.getMallName()+"客户:"+reservationEntity.getConsignee()+"完成复核签收,无法追加订单");
}
DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomer(deliveryListEntityId, k);
// DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomerUnit(deliveryListEntityId, k);
// DistributionSignforEntity signforEntity = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda()
// .eq(DistributionSignforEntity::getReservationId, reservationEntity.getId())
// .eq(DistributionSignforEntity::getDeliveryId, deliveryListEntity.getId())
// );
// if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){
// log.error("#############商配文员对已复核预约进行订单追加reservationId:{}",reservationEntity.getId());
// throw new RuntimeException("收货单位:"+reservationEntity.getMallName()+"客户:"+reservationEntity.getConsignee()+"完成复核签收,无法追加订单");
// }
//查询出该预约下的订单信息
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleMapper.selectList(Wrappers.<DistributionReservationStockarticleEntity>query().lambda().eq(DistributionReservationStockarticleEntity::getReservationId, reservationEntity.getId()).ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue()));

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

@ -1281,7 +1281,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.eq(DistributionParcelListEntity::getWarehouseId, myCurrentWarehouse.getId())
);
if (Func.isNotEmpty(one) && one.getConditions() == 2) {
log.error("#####################此包件不是定制品", one.getConditions());
log.error("#####################此包件不是定制品{}", one.getConditions());
return Resp.scanFail("此包件不是定制品", "此包件不是定制品");
}
List<DistributionParcelListEntity> parcelListEntities = distributionDeliveryListMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
@ -1290,7 +1290,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isNotEmpty(distributionParcelListEntities) && distributionParcelListEntities.size() == 1) {
//这里按道理也具备签收条件,需要标注该装车记录不正常
log.error("#####################distributionParcelListEntities窜货", distributionParcelListEntities);
log.error("#####################distributionParcelListEntities窜货{}", distributionParcelListEntities);
return Resp.scanFail("窜货", "窜货");
} else {
//判断该货物是否属于该客户

39
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -28,7 +28,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.config.RedissonConfig;
import com.logpm.distribution.dto.DistributionParcelListDTO;
import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
@ -43,7 +42,6 @@ import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.redisson.api.RLock;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.billLading.BillLadingStatusConstant;
import org.springblade.common.constant.order.OrderReservationStatusConstant;
@ -56,6 +54,7 @@ import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
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.api.R;
@ -71,7 +70,6 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
@ -121,6 +119,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
private final IWarehouseUpdownTypeClient warehouseUpdownTypeClient;
private final IDisStockListDetailService disStockListDetailService;
private final BladeRedis redis;
@Override
public IPage<DistrilbutionBillLadingVO> selectDistrilbutionBillLadingPage(IPage<DistrilbutionBillLadingVO> page, DistrilbutionBillLadingVO distrilbutionBillLading) {
@ -308,11 +308,16 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} else {
//设置lockey
String lockKey ="lock:" + distrilbutionBillLading.getStockArticleId();
RLock lock = new RedissonConfig().redisson().getLock(lockKey);
if(lock.isLocked()){
log.info("#################ownSaveOrUpdate:获取redisson对象开始");
// RLock lock = redisson.getLock(lockKey);
// if(lock.isLocked()){
// throw new ServiceException("请勿重复提交!!!");
// }
// lock.lock(5, TimeUnit.SECONDS);
if(redis.exists(lockKey)){
throw new ServiceException("请勿重复提交!!!");
}
lock.lock(5, TimeUnit.SECONDS);
redis.setEx(lockKey,distrilbutionBillLading.getStockArticleId(),5L);
List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.list(Wrappers.<DistrilbutionBillStockEntity>query().lambda()
.eq(!distrilbutionBillLading.getStockArticleId().contains(","),DistrilbutionBillStockEntity::getStockArticleId, distrilbutionBillLading.getStockArticleId())
.in(distrilbutionBillLading.getStockArticleId().contains(","),DistrilbutionBillStockEntity::getStockArticleId, distrilbutionBillLading.getStockArticleId().split(","))
@ -2029,11 +2034,16 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
public R zeroBill(BillLadingAppDTO billLadingAppDTO) {
//设置lockey
String lockKey ="lock:" + billLadingAppDTO.getBillLadingId();
RLock lock = new RedissonConfig().redisson().getLock(lockKey);
if(lock.isLocked()){
log.info("#################zeroBill:获取redisson对象开始");
// RLock lock = redisson.getLock(lockKey);
// if(lock.isLocked()){
// throw new ServiceException("请勿重复提交!!!");
// }
// lock.lock(5, TimeUnit.SECONDS);
if(redis.exists(lockKey)){
throw new ServiceException("请勿重复提交!!!");
}
lock.lock(5, TimeUnit.SECONDS);
redis.setEx(lockKey,billLadingAppDTO.getBillLadingId(),5L);
List<DistributionReservationZeroPackageEntity> list = distributionZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
.eq(DistributionReservationZeroPackageEntity::getReservationId, billLadingAppDTO.getBillLadingId())
.eq(DistributionReservationZeroPackageEntity::getIsDeleted, 0)
@ -2153,11 +2163,16 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
DistrilbutionAppBillLadingZeroVO i = billLadingAppDTO.getBillLadingZeroVO();
String lockKey ="lock:" + i.getStockArticleId() +i.getId();
RLock lock = new RedissonConfig().redisson().getLock(lockKey);
if(lock.isLocked()){
log.info("#################zeroBillPack:获取redisson对象开始");
// RLock lock = redisson.getLock(lockKey);
// if(lock.isLocked()){
// throw new ServiceException("请勿重复提交!!!");
// }
// lock.lock(5, TimeUnit.SECONDS);
if(redis.exists(lockKey)){
throw new ServiceException("请勿重复提交!!!");
}
lock.lock(5, TimeUnit.SECONDS);
redis.setEx(lockKey,i.getStockArticleId() +i.getId(),5L);
List<DistributionReservationZeroPackageEntity> list = distributionZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
.eq(DistributionReservationZeroPackageEntity::getReservationId, billLadingAppDTO.getBillLadingId())
.eq(DistributionReservationZeroPackageEntity::getIsDeleted, 0)

105
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java

@ -346,7 +346,112 @@ public class TripartiteTransferController {
}
@ResponseBody
@PostMapping("/updateTripartiteTransfer")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "更新三方中转", notes = "传入carsLoadDTO")
public R updateTripartiteTransfer(@RequestBody TrunklineCarsLoadDTO carsLoadDTO) {
String method = "############updateTripartiteTransfer: ";
log.info(method+"请求参数{}",carsLoadDTO);
Long loadId = carsLoadDTO.getId();//配载计划id
Long driverId = carsLoadDTO.getDriverId();
Long assistantId = carsLoadDTO.getAssistantId();
String driverName = carsLoadDTO.getDriverName();
String driverMobile = carsLoadDTO.getDriverMobile();
Long carId = carsLoadDTO.getCarId();
String chargeType = carsLoadDTO.getChargeType();
String carNumber = carsLoadDTO.getCarNumber();
String remark = carsLoadDTO.getRemark();
String loadType = carsLoadDTO.getLoadType();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
if(Objects.isNull(loadId)){
log.warn(method+"配载id为空 loadId={}",loadId);
return R.fail(400,"配载id为空");
}
if(Objects.isNull(assistantId)){
log.warn(method+"副驾id为空 assistantId={}",assistantId);
return R.fail(400,"副驾id为空");
}
if(Objects.isNull(driverId)){
log.warn(method+"司机id为空 driverId={}",driverId);
return R.fail(400,"司机id为空");
}
if(StringUtil.isBlank(driverName)){
log.warn(method+"司机名称为空 driverName={}",driverName);
return R.fail(400,"司机名称为空");
}
if(StringUtil.isBlank(driverMobile)){
log.warn(method+"司机电话为空 driverMobile={}",driverMobile);
return R.fail(400,"司机电话为空");
}
if(Objects.isNull(carId)){
log.warn(method+"车辆id为空 carId={}",carId);
return R.fail(400,"车辆id为空");
}
if(StringUtil.isBlank(chargeType)){
log.warn(method+"分摊方式为空 chargeType={}",chargeType);
return R.fail(400,"分摊方式为空");
}
if(StringUtil.isBlank(carNumber)){
log.warn(method+"车牌号为空 carNumber={}",carNumber);
return R.fail(400,"车牌号为空");
}
if(StringUtil.isBlank(loadType)){
log.warn(method+"配载类型为空 loadType={}",loadType);
return R.fail(400,"配载类型为空");
}
return carsLoadService.updateCarsLoadBasicData(carsLoadDTO,myCurrentWarehouse.getId());
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/tripartiteTransferUnLoadDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "三方中转分页列表", notes = "传入loadCarsDTO")
public R tripartiteTransferUnLoadDetail(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############tripartiteTransferUnLoadDetail: ";
log.info(method+"请求参数{}",loadCarsDTO);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(!Objects.isNull(myCurrentWarehouse)){
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
}
IPage<TripartiteTransferVO> pages = carsLoadService.tripartiteTransferPageList(loadCarsDTO);
return R.data(pages);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java

@ -70,4 +70,5 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
Integer findSignNumByLoadIdAndNodeIdAndOrderCodeAndeWaybillNo(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId, @Param("orderCode") String orderCode, @Param("waybillNo") String waybillNo);
Integer findRealSignNumBySignOrderId(@Param("signOrderId") Long signOrderId);
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -274,4 +274,10 @@
and scan_status = '3'
</select>
<select id="findRealSignNumBySignOrderId" resultType="int">
select IFNULL(sum(unload_num),0)
from logpm_trunkline_cars_load_scan
where sign_order_id = #{signOrderId}
</select>
</mapper>

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java

@ -50,4 +50,8 @@ public interface TrunklineCarsOrderMapper extends BaseMapper<TrunklineCarsOrderE
Integer findSignNumBySignOrderId(@Param("signOrderId") Long signOrderId);
List<TrunklineCarsOrderEntity> findCustomerOrderList(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId, @Param("mallName") String mallName);
void clearSignOrderId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
TrunklineCarsOrderEntity findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId, @Param("orderCode") String orderCode, @Param("waybillNo") String waybillNo);
}

30
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -183,18 +183,19 @@
lww.name belongToWarehouseName,
0 signNum,
'0' signStatus,
GROUP_CONCAT(ldsa.consignee_person) mallPerson,
GROUP_CONCAT(ldsa.consignee_mobile) mallMobile,
GROUP_CONCAT(ldsa.consignee_address) mallAddress,
GROUP_CONCAT(distinct ldsa.consignee_person) mallPerson,
GROUP_CONCAT(distinct ldsa.consignee_mobile) mallMobile,
GROUP_CONCAT(distinct ldsa.consignee_address) mallAddress,
sum(ltco.plan_num) planNum,
sum(ltco.real_num) loadingNum
from logpm_trunkline_cars_order ltco
left join logpm_distribution_stock_article ldsa on ldsa.order_code,ltco.order_code
left join logpm_distribution_stock_article ldsa on ldsa.order_code=ltco.order_code
left join logpm_warehouse_warehouse lww on ltco.node_id = lww.id
<where>
and ltco.load_id = #{loadId}
and ltco.node_id = #{warehouseId}
and ldsa.warehouse_id = #{warehouseId}
and ltco.is_customer = '1'
</where>
group by ltco.load_id,
ltco.node_id,
@ -234,8 +235,8 @@
</select>
<select id="findCustomerOrderList" resultType="com.logpm.trunkline.entity.TrunklineCarsOrderEntity">
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'
</select>
<update id="clearSignOrderId">
update logpm_trunkline_cars_order
set sign_order_id = null
where load_id = #{loadId}
and node_id = #{warehouseId}
and sign_num = 0
</update>
<select id="findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo" resultType="com.logpm.trunkline.entity.TrunklineCarsOrderEntity">
select *
from logpm_trunkline_cars_order
where load_id = #{loadId}
and node_id = #{warehouseId}
and order_code = #{orderCode}
and waybill_no =#{waybillNo}
</select>
</mapper>

27
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml

@ -17,20 +17,24 @@
</delete>
<select id="finaSignOrderList" resultType="com.logpm.trunkline.vo.TrunklineLoadSignOrderVO">
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}
<if test="param.signStatus = '20'">
and ltlso.sign_status = '20'
</if>
<if test="param.signStatus = '10'">
and ltlso.sign_status != '20'
</if>
<where>
<if test="param.loadId != null">
and ltlso.load_id = #{param.loadId}
</if>
<if test="param.signStatus != null and param.signStatus == '20'">
and ltlso.sign_status = '20'
</if>
<if test="param.signStatus != null and param.signStatus == '10'">
and ltlso.sign_status != '20'
</if>
<if test="param.driverId != null">
and ltcl.driver_id = #{param.driverId}
</if>
</where>
</select>
<select id="finaSignOrderDetail" resultType="com.logpm.trunkline.vo.TrunklineLoadSignOrderVO">
@ -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
</select>
<update id="updateBelongToWarehouse">

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

@ -65,4 +65,6 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
Integer findSignNumByLoadIdAndNodeIdAndOrderCodeAndeWaybillNo(Long loadId, Long nodeId, String orderCode, String waybillNo);
List<TrunklineCarsLoadScanEntity> findListByIds(List<Long> loadScanIds);
Integer findRealSignNumBySignOrderId(Long signOrderId);
}

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java

@ -48,4 +48,8 @@ public interface ITrunklineCarsOrderService extends BaseService<TrunklineCarsOrd
List<TrunklineCarsOrderEntity> findCustomerOrderList(Long loadId, Long warehouseId, String mallName);
void clearSignOrderId(Long loadId, Long warehouseId);
TrunklineCarsOrderEntity findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(Long loadId, Long warehouseId, String orderCode, String waybillNo);
}

5
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<TrunklineCarsSignLogEntity> {
public interface ITrunklineCarsSignLogService extends BaseService<TrunklineCarsSignLogEntity> {
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);
}

5
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<TrunklineLoadSignOrderEntity> {
public interface ITrunklineLoadSignOrderService extends BaseService<TrunklineLoadSignOrderEntity> {
List<TrunklineLoadSignOrderEntity> findAllLoadSignOrderList(Long loadId, Long warehouseId);
void deleteListBySignStatusAndLoadIdAndWarehouseId(Long loadId, Long warehouseId);
@ -21,4 +21,5 @@ public interface ITrunklineLoadSignOrderService extends IService<TrunklineLoadSi
IPage<SignOrderDetailVO> findSignOrderDetailList(IPage<Object> page, LoadCarsDTO loadCarsDTO);
void updateBelongToWarehouse(Long signOrderId, Long warehouseId, String warehouseName);
}

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

@ -4,9 +4,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.logpm.trunkline.entity.TrunklineWaybillPackageEntity;
import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
public interface ITrunklineWaybillPackageService extends IService<TrunklineWaybillPackageEntity> {
public interface ITrunklineWaybillPackageService extends BaseService<TrunklineWaybillPackageEntity> {
void saveList(List<TrunklineAdvanceDetailVO> list, WarehouseWaybillEntity waybillEntity);
}

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java

@ -157,4 +157,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
return carsLoadScanEntities;
}
@Override
public Integer findRealSignNumBySignOrderId(Long signOrderId) {
return baseMapper.findRealSignNumBySignOrderId(signOrderId);
}
}

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

@ -266,7 +266,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//生成直发商家签收单
createCustomerSignOrder(loadId,warehouseId);
}catch (Exception e){
log.error("#############startCarByLoadId: 签收单或者更新数量失败");
log.error("#############startCarByLoadId: 签收单或者更新数量失败",e);
}
@ -283,9 +283,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
List<TrunklineLoadSignOrderEntity> list = trunklineCarsOrderService.findSignOrderListBy(loadId,warehouseId);
for (TrunklineLoadSignOrderEntity trunklineLoadSignOrderEntity : list) {
// TrunklineLoadSignOrderEntity trunklineLoadSignOrderEntity = new TrunklineLoadSignOrderEntity();
// BeanUtil.copy(entity,trunklineLoadSignOrderEntity);
trunklineLoadSignOrderEntity.setLoadSignCode(codeClient.getCodeByType(CodeNumConstant.TRUNKLINE_LOAD_SIGN,warehouseCode,""));
trunklineLoadSignOrderService.save(trunklineLoadSignOrderEntity);
}
trunklineLoadSignOrderService.saveBatch(list);
for (TrunklineLoadSignOrderEntity trunklineLoadSignOrderEntity : list) {
Long signOrderId = trunklineLoadSignOrderEntity.getId();
@ -487,6 +489,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
private void cancleCustomerSignOrder(Long loadId, Long warehouseId) {
// List<TrunklineLoadSignOrderEntity> list = trunklineLoadSignOrderService.findAllLoadSignOrderList(loadId,warehouseId);
trunklineLoadSignOrderService.deleteListBySignStatusAndLoadIdAndWarehouseId(loadId,warehouseId);
trunklineCarsOrderService.clearSignOrderId(loadId,warehouseId);
}
@Override
@ -1350,7 +1354,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
TrunklineCarsLoadLineEntity carsLoadLineEntity = new TrunklineCarsLoadLineEntity();
BeanUtil.copy(carsLoadLineDTO,carsLoadLineEntity);
carsLoadLineEntity.setLoadId(loadId);
carsLoadLineEntity.setNodeStatus("0");
carsLoadLineEntity.setNodeStatus("10");
carsLoadLineEntity.setSignStatus("0");
carsLoadLineEntity.setUnloadStatus("0");
carsLoadLineEntity.setLoadingStatus("0");
@ -2550,12 +2554,20 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Long loadScanId = carsLoadScanEntity.getId();
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
Integer isAbnormal = 0;
if(finalNodeId.equals(warehouseId)){
if(warehouseId.equals(finalNodeId)){
carsLoadScanEntity.setUnloadAbnormal(0);
}else{
isAbnormal = 1;
carsLoadScanEntity.setUnloadAbnormal(1);
remark = "有数据,有计划,有装车,卸车目的地不正确,异常卸车";
String loadType = carsLoadEntity.getLoadType();
if("4".equals(loadType)){
isAbnormal = 0;
carsLoadScanEntity.setUnloadAbnormal(0);
remark = "有数据,有计划,有装车,正常卸车";
}else{
isAbnormal = 1;
carsLoadScanEntity.setUnloadAbnormal(1);
remark = "有数据,有计划,有装车,卸车目的地不正确,异常卸车";
}
}
carsLoadScanEntity.setUnloadNodeId(warehouseId);
carsLoadScanEntity.setUnloadNodeName(warehouseName);
@ -2866,29 +2878,143 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
Long loadId = signOrderEntity.getLoadId();
Long warehouseId = signOrderEntity.getWarehouseId();
String marketName = signOrderEntity.getMallName();
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
if(Objects.isNull(carsLoadEntity)){
log.warn("##############signScanPackageCode: 配载计划不存在 loadId={}",loadId);
return R.fail(405,"配载计划不存在");
}
String carsNo = carsLoadEntity.getCarsNo();
TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanService.findEntityByLoadIdAndOrderPackageCode(loadId, orderPackageCode);
if(Objects.isNull(carsLoadScanEntity)){
log.warn("##############signScanPackageCode: 装车记录不存在 loadId={},orderPackageCode={}",loadId,orderPackageCode);
return R.fail(405,"装车记录不存在");
}
//因为没有装车记录,补装车记录
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByOrderPackageCodeAndStatus(orderPackageCode);
if(Objects.isNull(parcelListEntity)){
//没有找到在库的包件信息,所以是无数据包件
carsLoadScanEntity = new TrunklineCarsLoadScanEntity();
carsLoadScanEntity.setLoadId(loadId);
carsLoadScanEntity.setLoadCode(carsNo);
carsLoadScanEntity.setScanCode(orderPackageCode);
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setNum(1);
carsLoadScanEntity.setType(1);
carsLoadScanEntity.setIsData(0);
carsLoadScanEntity.setLoadingAbnormal(1);
carsLoadScanEntity.setUnloadAbnormal(1);
carsLoadScanEntity.setUnloadNum(1);
carsLoadScanEntity.setSignTime(new Date());
carsLoadScanEntity.setSignAbnormal(1);
carsLoadScanEntity.setSignOrderId(signOrderId);
carsLoadScanEntity.setRemark("无数据签收");
trunklineCarsLoadScanService.save(carsLoadScanEntity);
String scanStatus = carsLoadScanEntity.getScanStatus();
if("2".equals(scanStatus)){
log.warn("##############signScanPackageCode: 包件已卸车 loadId={},orderPackageCode={} scanStatus={}",loadId,orderPackageCode,scanStatus);
return R.fail(405,"包件已卸车");
}
Long wid = carsLoadScanEntity.getWarehouseId();
if(!wid.equals(warehouseId)){
log.warn("##############signScanPackageCode: 包件不在签收计划中 loadId={},orderPackageCode={} scanStatus={}",loadId,orderPackageCode,scanStatus);
return R.fail(405,"包件不在签收计划中");
trunklineCarsLoadingLogService.savaLoadingLog(null,null,loadId,carsNo,null,null,null,orderPackageCode,1,1,0,1,null,null,null,null,carsLoadScanEntity.getId(),"无数据异常补装车记录");
trunklineCarsSignLogService.saveSignLog(null,null,loadId,carsNo,null,null,null,orderPackageCode,1,1,0,1,null,null,null,null,carsLoadScanEntity.getId(),"无数据异常签收");
}else{
Long wid = parcelListEntity.getWarehouseId();
String wName = parcelListEntity.getWarehouse();
String waybillNumber = parcelListEntity.getWaybillNumber();
String orderCode = parcelListEntity.getOrderCode();
Long stockArticleId = parcelListEntity.getStockArticleId();
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findEntityByStockArticleId(stockArticleId);
if(!Objects.isNull(stockArticleEntity)){
String mallName = stockArticleEntity.getMallName();
if(!marketName.equals(mallName)){
log.warn("##############signScanPackageCode: 包件属于该商家 marketName={}",marketName);
return R.fail(405,"包件属于该商家");
}
}
carsLoadScanEntity = new TrunklineCarsLoadScanEntity();
carsLoadScanEntity.setLoadId(loadId);
carsLoadScanEntity.setLoadCode(carsNo);
carsLoadScanEntity.setWarehouseId(wid);
carsLoadScanEntity.setWarehouseName(wName);
carsLoadScanEntity.setWaybillNo(waybillNumber);
carsLoadScanEntity.setOrderCode(orderCode);
carsLoadScanEntity.setScanCode(orderPackageCode);
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setNum(1);
carsLoadScanEntity.setType(1);
carsLoadScanEntity.setIsData(1);
carsLoadScanEntity.setLoadingAbnormal(1);
carsLoadScanEntity.setUnloadAbnormal(1);
carsLoadScanEntity.setUnloadNum(1);
carsLoadScanEntity.setSignTime(new Date());
carsLoadScanEntity.setSignAbnormal(1);
carsLoadScanEntity.setSignOrderId(signOrderId);
carsLoadScanEntity.setRemark("有数据异常签收");
trunklineCarsLoadScanService.save(carsLoadScanEntity);
//存入补装车记录
trunklineCarsLoadingLogService.savaLoadingLog(null,null,loadId,carsNo,null,waybillNumber,orderCode,orderPackageCode,1,1,1,1,null,null,null,wid,carsLoadScanEntity.getId(),"有数据异常补装车记录");
//存入签收记录
trunklineCarsSignLogService.saveSignLog(null,null,loadId,carsNo,null,waybillNumber,orderCode,orderPackageCode,1,1,1,1,null,null,null,wid,carsLoadScanEntity.getId(),"有数据异常签收");
//更新包件状态
distributionParcelListClient.updateOrderPackageCodeById(parcelListEntity.getId(),"70");
}
}else{
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
String waybillNo = carsLoadScanEntity.getWaybillNo();
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, fromWarehouseId);
if(Objects.isNull(parcelListEntity)){
log.warn("##############signScanPackageCode: 包件信息不存在 fromWarehouseId={},orderPackageCode={}",fromWarehouseId,orderPackageCode);
return R.fail(405,"包件信息不存在");
}
String orderCode = parcelListEntity.getOrderCode();
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
if(Objects.isNull(stockArticleEntity)){
log.warn("##############signScanPackageCode: 订单信息不存在 fromWarehouseId={},orderPackageCode={}",fromWarehouseId,orderPackageCode);
return R.fail(405,"订单信息不存在");
}
String mallName = stockArticleEntity.getMallName();
if(!marketName.equals(mallName)){
log.warn("##############signScanPackageCode: 包件不属于当前商场 fromWarehouseId={},orderPackageCode={}",fromWarehouseId,orderPackageCode);
return R.fail(405,"包件不属于当前商场");
}
TrunklineCarsOrderEntity carsOrderEntity = trunklineCarsOrderService.findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(loadId,warehouseId,orderCode,waybillNo);
if(Objects.isNull(carsOrderEntity)){
log.warn("##############signScanPackageCode: 配载订单信息不存在 loadId={},warehouseId={} orderCode={} waybillNo={}",loadId,warehouseId,orderCode,waybillNo);
return R.fail(405,"配载订单信息不存在");
}
String isCustomer = carsOrderEntity.getIsCustomer();
if("0".equals(isCustomer)){
carsLoadScanEntity.setSignAbnormal(1);
}else{
carsLoadScanEntity.setSignAbnormal(0);
}
String scanStatus = carsLoadScanEntity.getScanStatus();
if("2".equals(scanStatus)){
log.warn("##############signScanPackageCode: 包件已卸车 loadId={},orderPackageCode={} scanStatus={}",loadId,orderPackageCode,scanStatus);
return R.fail(405,"包件已卸车");
}
Long wid = carsLoadScanEntity.getWarehouseId();
if(!wid.equals(warehouseId)){
log.warn("##############signScanPackageCode: 包件不在签收计划中 loadId={},orderPackageCode={} scanStatus={}",loadId,orderPackageCode,scanStatus);
return R.fail(405,"包件不在签收计划中");
}
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setUnloadNum(1);
carsLoadScanEntity.setSignTime(new Date());
carsLoadScanEntity.setSignOrderId(signOrderId);
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
//生成签收记录
trunklineCarsSignLogService.addEntity(carsLoadScanEntity,remark);
}
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setUnloadNum(1);
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
//生成签收记录
trunklineCarsSignLogService.addEntity(carsLoadScanEntity,remark);
//重新计算数量
updateNumByLoadId(loadId);
//重新计算签收单的数量
@ -2906,9 +3032,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Integer loadingNum = signOrderEntity.getLoadingNum();
Integer signNum = trunklineCarsOrderService.findSignNumBySignOrderId(signOrderId);
signOrderEntity.setSignNum(signNum);
Integer realSignNum = trunklineCarsLoadScanService.findRealSignNumBySignOrderId(signOrderId);
signOrderEntity.setSignNum(realSignNum);
if(signNum.equals(loadingNum)){
signOrderEntity.setSignStatus("20");
signOrderEntity.setSignTime(new Date());
}else{
signOrderEntity.setSignStatus("10");
}
@ -2947,6 +3075,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setUnloadNum(enterNum);
carsLoadScanEntity.setSignTime(new Date());
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
//生成签收记录

10
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java

@ -113,4 +113,14 @@ public class TrunklineCarsOrderEntityServiceImpl extends BaseServiceImpl<Trunkli
return baseMapper.findCustomerOrderList(loadId,warehouseId,mallName);
}
@Override
public void clearSignOrderId(Long loadId, Long warehouseId) {
baseMapper.clearSignOrderId(loadId,warehouseId);
}
@Override
public TrunklineCarsOrderEntity findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(Long loadId, Long warehouseId, String orderCode, String waybillNo) {
return baseMapper.findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(loadId,warehouseId,orderCode,waybillNo);
}
}

28
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsSignLogServiceImpl.java

@ -1,18 +1,18 @@
package com.logpm.trunkline.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.entity.TrunklineCarsSignLogEntity;
import com.logpm.trunkline.mapper.TrunklineCarsSignLogMapper;
import com.logpm.trunkline.service.ITrunklineCarsSignLogService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineCarsSignLogServiceImpl extends ServiceImpl<TrunklineCarsSignLogMapper, TrunklineCarsSignLogEntity> implements ITrunklineCarsSignLogService {
public class TrunklineCarsSignLogServiceImpl extends BaseServiceImpl<TrunklineCarsSignLogMapper, TrunklineCarsSignLogEntity> implements ITrunklineCarsSignLogService {
@Override
public void addEntity(TrunklineCarsLoadScanEntity carsLoadScanEntity,String remark) {
TrunklineCarsSignLogEntity trunklineCarsSignLogEntity = new TrunklineCarsSignLogEntity();
@ -36,4 +36,28 @@ public class TrunklineCarsSignLogServiceImpl extends ServiceImpl<TrunklineCarsSi
trunklineCarsSignLogEntity.setRemark(remark);
save(trunklineCarsSignLogEntity);
}
@Override
public 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) {
TrunklineCarsSignLogEntity trunklineCarsSignLogEntity = new TrunklineCarsSignLogEntity();
trunklineCarsSignLogEntity.setLoadId(loadId);
trunklineCarsSignLogEntity.setLoadCode(loadCode);
trunklineCarsSignLogEntity.setLoadScanId(loadScanId);
trunklineCarsSignLogEntity.setWarehouseId(warehouseId);
trunklineCarsSignLogEntity.setWarehouseName(warehouseName);
trunklineCarsSignLogEntity.setWaybillId(waybillId);
trunklineCarsSignLogEntity.setWaybillNo(waybillNo);
trunklineCarsSignLogEntity.setOrderCode(orderCode);
trunklineCarsSignLogEntity.setScanCode(scanCode);
trunklineCarsSignLogEntity.setNum(num);
trunklineCarsSignLogEntity.setType(type);
trunklineCarsSignLogEntity.setIsData(isData);
trunklineCarsSignLogEntity.setIsAbnormal(isAbnormal);
trunklineCarsSignLogEntity.setTrayId(trayId);
trunklineCarsSignLogEntity.setTrayCode(trayCode);
trunklineCarsSignLogEntity.setTrayName(trayName);
trunklineCarsSignLogEntity.setFromWarehouseId(fromWarehouseId);
trunklineCarsSignLogEntity.setRemark(remark);
save(trunklineCarsSignLogEntity);
}
}

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineLoadSignOrderServiceImpl.java

@ -1,7 +1,6 @@
package com.logpm.trunkline.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import com.logpm.trunkline.mapper.TrunklineLoadSignOrderMapper;
@ -10,6 +9,7 @@ import com.logpm.trunkline.vo.SignOrderDetailVO;
import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
@ -17,7 +17,7 @@ import java.util.List;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineLoadSignOrderServiceImpl extends ServiceImpl<TrunklineLoadSignOrderMapper, TrunklineLoadSignOrderEntity> implements ITrunklineLoadSignOrderService {
public class TrunklineLoadSignOrderServiceImpl extends BaseServiceImpl<TrunklineLoadSignOrderMapper, TrunklineLoadSignOrderEntity> implements ITrunklineLoadSignOrderService {
@Override
public List<TrunklineLoadSignOrderEntity> findAllLoadSignOrderList(Long loadId, Long warehouseId) {

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java

@ -8,6 +8,7 @@ import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@ -16,7 +17,7 @@ import java.util.List;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineWaybillPackageServiceImpl extends ServiceImpl<TrunklineWaybillPackageMapper,TrunklineWaybillPackageEntity> implements ITrunklineWaybillPackageService {
public class TrunklineWaybillPackageServiceImpl extends BaseServiceImpl<TrunklineWaybillPackageMapper,TrunklineWaybillPackageEntity> implements ITrunklineWaybillPackageService {
@Override
public void saveList(List<TrunklineAdvanceDetailVO> list, WarehouseWaybillEntity waybillEntity) {
List<TrunklineWaybillPackageEntity> ls = new ArrayList<>();

Loading…
Cancel
Save