Browse Source

Merge branch 'dev' into pre-production

master
汤建军 11 months ago
parent
commit
3c171bb986
  1. 15
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DeliveryOrderInfoVO.java
  2. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
  3. 15
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java
  4. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java
  5. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  6. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  7. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  8. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java
  9. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  10. 97
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

15
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DeliveryOrderInfoVO.java

@ -0,0 +1,15 @@
package com.logpm.distribution.vo;
import lombok.Data;
/**
* 订单查询VO
*/
@Data
public class DeliveryOrderInfoVO {
private Integer deliveryNum;
private Integer signingNum;
}

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java

@ -456,6 +456,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
}else{ }else{
business.setMold(null); business.setMold(null);
} }
log.info("#################split[finalJ]>>>>>>>>>>>>>>:{}",split[finalJ]);
String dictValue = freightBiz.stream().filter(q -> q.getDictValue().equals(split[finalJ])).findFirst().get().getDictKey(); String dictValue = freightBiz.stream().filter(q -> q.getDictValue().equals(split[finalJ])).findFirst().get().getDictKey();
business.setTypeService(dictValue); business.setTypeService(dictValue);
list.add(business); list.add(business);

15
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java

@ -167,7 +167,6 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
String method = "#############BasicdataVehicleServiceImpl.importDriverArtery"; String method = "#############BasicdataVehicleServiceImpl.importDriverArtery";
log.info("车辆模板导入信息>>>>",data); log.info("车辆模板导入信息>>>>",data);
try { try {
boolean flag = false;
List<BasicdataDrivermiddleEntity>drivermiddleEntities = new ArrayList<>(); List<BasicdataDrivermiddleEntity>drivermiddleEntities = new ArrayList<>();
//对导入数据进行处理 //对导入数据进行处理
for (BasicdataVehicleImportExcel datum : data) { for (BasicdataVehicleImportExcel datum : data) {
@ -193,12 +192,18 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
//查看是否填写了电话号码,如果填写了电话号码进行校验号码是否有效 //查看是否填写了电话号码,如果填写了电话号码进行校验号码是否有效
if (Func.isNotEmpty(datum.getVehicleUnitPhone())){ if (Func.isNotEmpty(datum.getVehicleUnitPhone())){
//车辆所属单位电话校验 //车辆所属单位电话校验
flag = PhoneCheckUtil.checkPhone(datum.getVehicleUnitPhone()); boolean a = PhoneCheckUtil.checkPhone(datum.getVehicleUnitPhone());
if (a){
throw new ServiceException("请填写正确手机号码!");
}
} }
if (Func.isNotEmpty(datum.getVehicleOwnerPhone())){ if (Func.isNotEmpty(datum.getVehicleOwnerPhone())){
//车辆所属人电话校验 //车辆所属人电话校验
flag = PhoneCheckUtil.checkPhone(datum.getVehicleOwnerPhone()); boolean b = PhoneCheckUtil.checkPhone(datum.getVehicleOwnerPhone());
if (b){
throw new ServiceException("请填写正确手机号码!");
}
//进行关系司机绑定 //进行关系司机绑定
//查询是否存在司机 //查询是否存在司机
if (!StringUtil.isBlank(datum.getVehicleOwner())){ if (!StringUtil.isBlank(datum.getVehicleOwner())){
@ -213,9 +218,7 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
} }
} }
if (!flag){
throw new ServiceException("请填写正确手机号码!");
}
if (Func.isNotEmpty(datum.getCarrierName())){ if (Func.isNotEmpty(datum.getCarrierName())){
//存在承运商,进行承运商的校验 //存在承运商,进行承运商的校验

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java

@ -6,6 +6,7 @@ import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.service.IDistributionDeliveryInfoService; import com.logpm.distribution.service.IDistributionDeliveryInfoService;
import com.logpm.distribution.service.IDistributionDeliveryListService; import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.vo.DisStockListDetailVO; import com.logpm.distribution.vo.DisStockListDetailVO;
import com.logpm.distribution.vo.app.*; import com.logpm.distribution.vo.app.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -34,6 +35,8 @@ public class DistributionDeliveryAppController {
private final IDistributionDeliveryInfoService distributionDeliveryInfoService; private final IDistributionDeliveryInfoService distributionDeliveryInfoService;
private final IDistributionStockArticleService distributionStockArticleService;
@ -298,4 +301,13 @@ public class DistributionDeliveryAppController {
return R.data(r); return R.data(r);
} }
/**
* 扫描查询配送任务下的包件信息
*/
@GetMapping("/deliveryInfo")
@ApiOperationSupport(order = 11)
public R getdeliveryInfo( @RequestParam Integer type,@RequestParam String code ) {
return distributionStockArticleService.getdeliveryInfo(type,code);
}
} }

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

@ -465,6 +465,18 @@ public class DistributionStockArticleController extends BladeController {
} }
/**
* 导入物料基础信息
*/
@GetMapping("deliveryInfo")
@ApiOperationSupport(order = 12)
@ApiOperation(value = "导入物料基础信息", notes = "传入excel")
public R getdeliveryInfo(@RequestParam Integer type,@RequestParam String code) {
return distributionStockArticleService.getdeliveryInfo(type,code);
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java

@ -170,4 +170,11 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
* @return * @return
*/ */
UpDownStockupAreaVO findUpDownStockupZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId); UpDownStockupAreaVO findUpDownStockupZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId);
/**
* 查询运单信息
* @param waybillNumber
* @return
*/
List<Long> getOrderListByWaybill(@Param("waybillNumber") String waybillNumber);
} }

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -1052,5 +1052,11 @@
WHERE WHERE
ldsa.order_code = #{orderCode} AND ldsa.warehouse_id = #{warehouseId} ldsa.order_code = #{orderCode} AND ldsa.warehouse_id = #{warehouseId}
</select> </select>
<select id="getOrderListByWaybill"
resultType="java.lang.Long">
SELECT id FROM logpm_distribution_stock_article WHERE FIND_IN_SET(#{waybillNumber},waybill_number) > 0
AND waybill_number is not null
AND waybill_number != ''
</select>
</mapper> </mapper>

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java

@ -219,4 +219,12 @@ public interface IDistributionStockArticleService extends BaseService<Distributi
* @return * @return
*/ */
R getOrderDeliveryInfo(Integer type, String code); R getOrderDeliveryInfo(Integer type, String code);
/**
* 查订单配送信息
* @param type
* @param code
* @return
*/
R getdeliveryInfo(Integer type, String code);
} }

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

@ -6832,7 +6832,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
log.info(">>>>>>>>>>>>>>> 车次状态维护2 代码执行 deliveryLoadingNum={}",deliveryLoadingNum); log.info(">>>>>>>>>>>>>>> 车次状态维护2 代码执行 deliveryLoadingNum={}",deliveryLoadingNum);
int loadingNum = 0; int loadingNum = 0;
int signingNum = 0;
int deliveryQuantity = deliveryListEntity.getDeliveryNumber() + (Objects.isNull(deliveryListEntity.getInventoryNub()) ? 0 : deliveryListEntity.getInventoryNub()); int deliveryQuantity = deliveryListEntity.getDeliveryNumber() + (Objects.isNull(deliveryListEntity.getInventoryNub()) ? 0 : deliveryListEntity.getInventoryNub());
if (Func.isNotEmpty(deliveryLoadingNum)) { if (Func.isNotEmpty(deliveryLoadingNum)) {
loadingNum += deliveryLoadingNum.getInventoryLoadingQuantity() + deliveryLoadingNum.getPackageLoadingQuantity(); loadingNum += deliveryLoadingNum.getInventoryLoadingQuantity() + deliveryLoadingNum.getPackageLoadingQuantity();
@ -6847,6 +6846,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (loadingNum == 0) { if (loadingNum == 0) {
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue()); deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue());
} }
} else { } else {
log.error(method + "查询配送无计划数量,deliveryId:{}", deliveryId); log.error(method + "查询配送无计划数量,deliveryId:{}", deliveryId);
} }
@ -6860,6 +6860,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查看所有的签收信息是否均已完成 //查看所有的签收信息是否均已完成
boolean anyMatch = list.stream().allMatch(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())); boolean anyMatch = list.stream().allMatch(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue()));
log.info(">>>>>>>>>>>>>>> 车次状态维护4 代码执行 anyMatch={}",anyMatch); log.info(">>>>>>>>>>>>>>> 车次状态维护4 代码执行 anyMatch={}",anyMatch);
log.info(">>>>>>>>>>>>>>> 当前车次复核数量:{}", list.stream().filter(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())).count()
);
if (anyMatch) { if (anyMatch) {
deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue()); deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue());
} }

97
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -49,6 +49,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.common.IsOrNoConstant; import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.loading.LoadingStatusConstant;
import org.springblade.common.constant.order.OrderReservationStatusConstant; import org.springblade.common.constant.order.OrderReservationStatusConstant;
import org.springblade.common.constant.order.OrderStatusConstant; import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant; import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant;
@ -129,7 +130,10 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient; private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient;
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient; private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient;
private final IDistributionReservationPackageService distributionReservationPackageService; private final IDistributionReservationPackageService distributionReservationPackageService;
private final IDistributionReservationStockarticleService distributionReservationStockarticleService;
private final IDistributionReservationZeroPackageService distributionReservationZeroPackageService;
private final IUserClient userClient; private final IUserClient userClient;
private final IDistributionLoadscanService distributionLoadscanService;
@Override @Override
public IPage<DistributionStockArticleVO> selectDistributionStockArticlePage(IPage<DistributionStockArticleVO> page, DistributionStockArticleVO distributionStockArticle) { public IPage<DistributionStockArticleVO> selectDistributionStockArticlePage(IPage<DistributionStockArticleVO> page, DistributionStockArticleVO distributionStockArticle) {
@ -1627,6 +1631,99 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
return null; return null;
} }
/**
* @param type
* @param code
* @return
*/
@Override
public R getdeliveryInfo(Integer type, String code) {
String method = "#####################DistributionStockArticleServiceImpl.getdeliveryInfo";
Integer a =0;
Integer b =0;
DeliveryOrderInfoVO deliveryOrderInfoVO = new DeliveryOrderInfoVO();
switch (type){
//运单
case 1:
List<Long> ids = baseMapper.getOrderListByWaybill(code);
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda()
.in(DistributionReservationStockarticleEntity::getStockArticleId, ids)
.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(reservationStockarticleEntityList)){
for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) {
if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())){
//查询包件数量
List<DistributionReservationPackageEntity> packageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda()
.eq(DistributionReservationPackageEntity::getStockArticleId, reservationStockarticleEntity.getStockArticleId())
.ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(packageEntityList)){
a += packageEntityList.size();
}
}else if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.yes.getValue())){
//查询零担配送数量
List<DistributionReservationZeroPackageEntity> zeroPackageEntityList = distributionReservationZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
.eq(DistributionReservationZeroPackageEntity::getStockArticleId, reservationStockarticleEntity.getStockArticleId())
.ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(zeroPackageEntityList)){
a += zeroPackageEntityList.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum();
}
}else {
log.error(method+"配送订单无类型");
return R.fail("数据错误!!!");
}
}
}
List<DistributionLoadscanEntity> list = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.in(DistributionLoadscanEntity::getOrderId, ids)
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(list)){
b = list.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum();
}
deliveryOrderInfoVO.setDeliveryNum(a);
deliveryOrderInfoVO.setSigningNum(b);
return R.data(deliveryOrderInfoVO);
case 2:
DistributionStockArticleEntity one = this.getOne(Wrappers.<DistributionStockArticleEntity>query().lambda()
.eq(DistributionStockArticleEntity::getOrderCode, code)
);
if (Func.isNotEmpty(one)){
if (one.getIsZero().equals(IsOrNoConstant.no.getValue())){
//查询包件数量
List<DistributionReservationPackageEntity> packageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda()
.eq(DistributionReservationPackageEntity::getStockArticleId, one.getId())
.ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(packageEntityList)){
a += packageEntityList.size();
}
}else if (one.getIsZero().equals(IsOrNoConstant.yes.getValue())){
//查询零担配送数量
List<DistributionReservationZeroPackageEntity> zeroPackageEntityList = distributionReservationZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
.eq(DistributionReservationZeroPackageEntity::getStockArticleId, one.getId())
.ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(zeroPackageEntityList)){
a += zeroPackageEntityList.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum();
}
}else {
log.error(method+"配送订单无类型");
return R.fail("数据错误!!!");
}
}
//订单
deliveryOrderInfoVO.setDeliveryNum(a);
deliveryOrderInfoVO.setSigningNum(b);
return R.data(deliveryOrderInfoVO);
default:
log.error(method+"缺少参数type");
return R.fail("查无此信息");
}
}
@Override @Override
public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) { public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) {

Loading…
Cancel
Save