|
|
|
@ -666,6 +666,47 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
this.updateById(signforEntity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Transactional |
|
|
|
|
public R signforackPC(DistributionSignforDTO distributionSignfor) { |
|
|
|
|
DistributionSignforEntity signforEntity = distributionSignforMapper.getByReservationId(distributionSignfor.getReservationId()); |
|
|
|
|
if (Func.isEmpty(signforEntity)){ |
|
|
|
|
log.error("预约查询签收信息错误"); |
|
|
|
|
return R.fail("请联系管理员!!!"); |
|
|
|
|
} |
|
|
|
|
if (signforEntity.getReceivedQuantity() <= 0){ |
|
|
|
|
log.error("signforack############未进行签收上传图片"); |
|
|
|
|
return R.fail("无签收数据"); |
|
|
|
|
} |
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); |
|
|
|
|
log.info("=============签收图片数据为:{}", distributionSignfor.getMap()); |
|
|
|
|
if (ObjectUtils.isNotNull(distributionSignfor.getMap())) { |
|
|
|
|
List<DistributionSignPrintEntity> distributionSignPrintList = new ArrayList<>(); |
|
|
|
|
distributionSignfor.getMap().forEach((k, v) -> { |
|
|
|
|
v.stream().forEach(i -> { |
|
|
|
|
DistributionSignPrintEntity distributionSignPrint = new DistributionSignPrintEntity(); |
|
|
|
|
BeanUtils.copyProperties(i, distributionSignPrint); |
|
|
|
|
distributionSignPrint.setId(null); |
|
|
|
|
distributionSignPrint.setReservationId(distributionSignfor.getReservationId()); |
|
|
|
|
distributionSignPrintList.add(distributionSignPrint); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
iDistributionSignPrintService.saveBatch(distributionSignPrintList); |
|
|
|
|
} |
|
|
|
|
//修改签收表司机签收数量
|
|
|
|
|
boolean update = this.update(new UpdateWrapper<DistributionSignforEntity>().lambda() |
|
|
|
|
.eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId()) |
|
|
|
|
.eq(DistributionSignforEntity::getDeliveryId, distributionSignfor.getDeliveryId()) |
|
|
|
|
.set(DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date())) |
|
|
|
|
.set(DistributionSignforEntity::getDriverSigning,SignforStatusConstant.yiqianshou.getValue()) |
|
|
|
|
// .set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures())
|
|
|
|
|
.set(DistributionSignforEntity::getDriverSigning, "2") |
|
|
|
|
.set(StringUtils.isNotBlank(distributionSignfor.getDriverRemarks()), DistributionSignforEntity::getDriverRemarks, distributionSignfor.getDriverRemarks()) |
|
|
|
|
// .set(StringUtils.isNotBlank(distributionSignfor.getSigneeName()), DistributionSignforEntity::getSigneeName, distributionSignfor.getSigneeName())
|
|
|
|
|
); |
|
|
|
|
return R.status(update); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean judgmentSignIsHavePackage(Long reservationId) { |
|
|
|
|
boolean flag = false; |
|
|
|
|
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId); |
|
|
|
|