Browse Source

增加复核签收日志

dist.1.2.0
汤建军 6 months ago
parent
commit
d93d58fecd
  1. 7
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
  2. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  3. 184
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  4. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml

7
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java

@ -60,6 +60,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
@ -225,6 +226,12 @@ public class BasicdataWarehouseController extends BladeController {
if(ObjectUtil.isNotEmpty(warehouseWarehouse.getAcreage()) && ObjectUtil.isNotEmpty(warehouseWarehouse.getSeating())){
warehouseWarehouse.setSingleStorageLocationArea(NumberUtil.div(warehouseWarehouse.getAcreage(),warehouseWarehouse.getSeating()));
}
if (Objects.isNull(warehouseWarehouse.getLegalPersonPhone())){
warehouseWarehouse.setLegalPersonPhone("");
}
if (Objects.isNull(warehouseWarehouse.getLegalPerson())){
warehouseWarehouse.setLegalPersonPhone("");
}
return R.status(warehouseService.updateById(warehouseWarehouse));
}

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

@ -4802,8 +4802,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
handleLoadingStartLog(distributionDeliveryListEntity, user, myCurrentWarehouse, builder.toString());
NodeFanoutMsg<CarStartVO> nodeFanoutMsg = builderNodeFanoutMsgByCarStart(distributionDeliveryListEntity, user);
distributionNodeWorkService.carStart(nodeFanoutMsg, user);
// 推送数据
return Resp.scanSuccess("发车成功", builder.toString());
}
@ -8161,7 +8161,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionPlanLogEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionPlanLogEntity.setWarehouseName(myCurrentWarehouse.getName());
distributionPlanLogEntity.setOperator(user.getNickName());
distributionPlanLogEntity.setType(3);
distributionPlanLogEntity.setType(2);
distributionPlanLogService.save(distributionPlanLogEntity);
}
@ -10489,6 +10489,23 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
? DeliveryStatusConstant.yiwancheng.getValue()
: DeliveryStatusConstant.peisongzhong.getValue());
log.info(">>>>> deliveryListEntity deliveryStatus :{}", deliveryListEntity.getDeliveryStatus());
if (deliveryListEntity.getDeliveryStatus().equals(DeliveryStatusConstant.yiwancheng.getValue())){
handleDeliveryLog(deliveryListEntity,AuthUtil.getUser());
}
}
private void handleDeliveryLog(DistributionDeliveryListEntity deliveryListEntity, BladeUser user) {
String content = user.getNickName() + "在" + deliveryListEntity.getWarehouseName() + "完成配送,车次号:" + deliveryListEntity.getTrainNumber();
DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity();
distributionPlanLogEntity.setContent(content);
distributionPlanLogEntity.setRefId(deliveryListEntity.getId());
distributionPlanLogEntity.setRefCode(deliveryListEntity.getTrainNumber());
distributionPlanLogEntity.setWarehouseId(deliveryListEntity.getWarehouseId());
distributionPlanLogEntity.setWarehouseName(deliveryListEntity.getWarehouseName());
distributionPlanLogEntity.setOperator(user.getNickName());
distributionPlanLogEntity.setType(2);
distributionPlanLogService.save(distributionPlanLogEntity);
}

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

@ -281,6 +281,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Autowired
private IDistributionPositioningService distributionPositioningService;
@Autowired
private IDistributionPlanLogService distributionPlanLogService;
@Override
public IPage<DistributionSignforVO> selectDistributionSignforPage(IPage<DistributionSignforVO> page, DistributionSignforVO distributionSignfor) {
@ -752,11 +755,25 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// iDistributionNodeWorkService.signForCheck(DistributionSignforEntity distributionSignforEntity,DistributionReservationEntity reservationEntity);
// sendNodeWorkDataBroadcast();
//复核日志
handleSignforLog(distributionSignfor,AuthUtil.getUser(),myCurrentWarehouse,reservationEntity);
return R.success("操作成功");
}
private void handleSignforLog(DistributionSignforEntity distributionSignfor,BladeUser user,BasicdataWarehouseEntity warehouse,DistributionReservationEntity reservationEntity) {
String content = user.getNickName() + "在" + warehouse.getName() + "复核签收,预约编号:" + reservationEntity.getReservationCode();
DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity();
distributionPlanLogEntity.setContent(content);
distributionPlanLogEntity.setRefId(distributionSignfor.getReservationId());
distributionPlanLogEntity.setRefCode(reservationEntity.getReservationCode());
distributionPlanLogEntity.setWarehouseId(warehouse.getId());
distributionPlanLogEntity.setWarehouseName(warehouse.getName());
distributionPlanLogEntity.setOperator(user.getNickName());
distributionPlanLogEntity.setType(1);
distributionPlanLogService.save(distributionPlanLogEntity);
}
private NodeFanoutMsg<org.springblade.common.model.DistributionReCheckSignVO> buildNodeFanoutMsgByReCheck(DistributionReservationEntity reservationEntity) {
// 查询当前预约单下的定制品和零担签收数据
@ -1159,50 +1176,57 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public R searchNode(Integer searchType, String searchCode) {
List<DeliveryNodeVo> nodeVos = null;
switch (searchType) {
case 1:
//配送单查询
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.selectDeliveryByTrainNumber(searchCode);
if (Func.isEmpty(deliveryListEntity)) {
return R.fail("未查询到配送单信息,请查看搜索类型是否匹配");
}
//解析配送节点
nodeVos = handleDeliveryNode(deliveryListEntity);
//进行数据组装
break;
case 2:
DistributionReservationEntity reservationEntity = distributionReservationService.selectByReservationCode(searchCode);
if (Func.isEmpty(reservationEntity)) {
return R.fail("未查询到预约单信息,请查看搜索类型是否匹配");
}
//解析配送节点
nodeVos = handleReservationNode(reservationEntity);
//预约单查询
break;
case 3:
//自提单号
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = distrilbutionBillLadingService.selectByBillLadingCode(searchCode);
if (Func.isEmpty(distrilbutionBillLadingEntity)) {
return R.fail("未查询到自提单信息,请查看搜索类型是否匹配");
}
//解析配送节点
nodeVos = handleBillLading(distrilbutionBillLadingEntity);
break;
case 4:
//备货任务查询
DistributionStockupEntity distributionStockupEntity = distributionStockupService.selectStockUpByStockUpCode(searchCode);
if (Func.isEmpty(distributionStockupEntity)) {
return R.fail("未查询到备货任务信息,请查看搜索类型是否匹配");
}
nodeVos = handleStockUp(distributionStockupEntity);
break;
default:
log.info("未知的搜索类型 searchType={}", searchType);
// List<DeliveryNodeVo> nodeVos = null;
// switch (searchType) {
// case 1:
// //配送单查询
// DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.selectDeliveryByTrainNumber(searchCode);
// if (Func.isEmpty(deliveryListEntity)) {
// return R.fail("未查询到配送单信息,请查看搜索类型是否匹配");
// }
// //解析配送节点
// nodeVos = handleDeliveryNode(deliveryListEntity);
// //进行数据组装
// break;
// case 2:
// DistributionReservationEntity reservationEntity = distributionReservationService.selectByReservationCode(searchCode);
// if (Func.isEmpty(reservationEntity)) {
// return R.fail("未查询到预约单信息,请查看搜索类型是否匹配");
// }
// //解析配送节点
// nodeVos = handleReservationNode(reservationEntity);
// //预约单查询
// break;
// case 3:
// //自提单号
// DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = distrilbutionBillLadingService.selectByBillLadingCode(searchCode);
// if (Func.isEmpty(distrilbutionBillLadingEntity)) {
// return R.fail("未查询到自提单信息,请查看搜索类型是否匹配");
// }
// //解析配送节点
// nodeVos = handleBillLading(distrilbutionBillLadingEntity);
// break;
// case 4:
// //备货任务查询
// DistributionStockupEntity distributionStockupEntity = distributionStockupService.selectStockUpByStockUpCode(searchCode);
// if (Func.isEmpty(distributionStockupEntity)) {
// return R.fail("未查询到备货任务信息,请查看搜索类型是否匹配");
// }
// nodeVos = handleStockUp(distributionStockupEntity);
// break;
// default:
// log.info("未知的搜索类型 searchType={}", searchType);
//
// }
List<DistributionPlanLogEntity> list = distributionPlanLogService.list(Wrappers.<DistributionPlanLogEntity>query().lambda()
.eq(DistributionPlanLogEntity::getRefCode, searchCode)
.orderByDesc(DistributionPlanLogEntity::getCreateTime)
);
if (!list.isEmpty()) {
return R.data(list);
}
return R.data(nodeVos);
return R.fail("未查询到相关信息!!!");
}
/**
@ -3519,43 +3543,43 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public R signforack(DistributionSignforDTO distributionSignfor) {
DistributionSignforEntity signforEntity = distributionSignforMapper.getByReservationId(distributionSignfor.getReservationId());
if (Func.isEmpty(signforEntity)) {
log.error("预约查询签收信息错误");
return R.fail("请联系管理员!!!");
}
if ((signforEntity.getReceivedQuantity() + signforEntity.getReceivedinQuantity()) <= 0) {
log.error("signforack############未进行签收上传图片");
return Resp.scanFail(12000, "请先进行签收扫描后上传图片", "请先进行签收扫描后上传图片", null);
}
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.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(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);
// DistributionSignforEntity signforEntity = distributionSignforMapper.getByReservationId(distributionSignfor.getReservationId());
// if (Func.isEmpty(signforEntity)) {
// log.error("预约查询签收信息错误");
// return R.fail("请联系管理员!!!");
// }
// if ((signforEntity.getReceivedQuantity() + signforEntity.getReceivedinQuantity()) <= 0) {
//
// log.error("signforack############未进行签收上传图片");
// return Resp.scanFail(12000, "请先进行签收扫描后上传图片", "请先进行签收扫描后上传图片", null);
// }
//
// 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.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(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 this.updatePicturePDA(distributionSignfor);
}
@Override

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml

@ -228,8 +228,8 @@
'未知'
END conditionsName,
CASE confirm_status
WHEN 0 THEN '未确认'
WHEN 1 THEN '已确认'
WHEN 0 THEN '待回库'
WHEN 1 THEN '已回库'
ELSE
'未知'
END confirmStatusName,

Loading…
Cancel
Save