Browse Source

Merge branch 'dev' into pre-production

visual
pref_mail@163.com 3 months ago
parent
commit
ef882aca8c
  1. 1
      blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/util/FactoryDataUtil.java
  2. 25
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java
  3. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  4. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

1
blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/util/FactoryDataUtil.java

@ -29,6 +29,7 @@ public class FactoryDataUtil {
factorys.put(BrandEnums.MTMM.getValue(), FactoryDataConstants.Mq.RoutingKeys.MENGTIAN_NODE_DATA_PUSH);
factorys.put(BrandEnums.MHJ.getValue(), FactoryDataConstants.Mq.RoutingKeys.MWH_NODE_DATA_PUSH);
// 皮阿诺
factorys.put(BrandEnums.PAN.getValue(), FactoryDataConstants.Mq.RoutingKeys.PIANO_NODE_DATA_PUSH);
// 欧派
factorys.put(BrandEnums.OP.getValue(), FactoryDataConstants.Mq.RoutingKeys.OPPEIN_NODE_DATA_PUSH);
// 金牌

25
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java

@ -37,6 +37,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.log.exception.ServiceException;
@ -198,15 +199,7 @@ public class BasicdataDriverArteryController extends BladeController {
boolean save = basicdataDriverArteryService.save(basicdataDriverArtery);
if (save) {
Long driverId = basicdataDriverArtery.getId();
List<Long> warehouseIds = basicdataDriverArtery.getWarehouseIds();
List<BasicdataDriverWarehouseEntity> driverWarehouseList = new ArrayList<>();
for (Long warehouseId : warehouseIds) {
BasicdataDriverWarehouseEntity basicdataDriverWarehouseEntity = new BasicdataDriverWarehouseEntity();
basicdataDriverWarehouseEntity.setWarehouseId(warehouseId);
basicdataDriverWarehouseEntity.setDriverId(driverId);
driverWarehouseList.add(basicdataDriverWarehouseEntity);
}
List<BasicdataDriverWarehouseEntity> driverWarehouseList = getBasicdataDriverWarehouseEntities(basicdataDriverArtery);
basicdataDriverWarehouseService.saveBatch(driverWarehouseList);
}
@ -217,6 +210,20 @@ public class BasicdataDriverArteryController extends BladeController {
return R.status(save);
}
@NotNull
private static List<BasicdataDriverWarehouseEntity> getBasicdataDriverWarehouseEntities(BasicdataDriverArteryDTO basicdataDriverArtery) {
Long driverId = basicdataDriverArtery.getId();
List<Long> warehouseIds = basicdataDriverArtery.getWarehouseIds();
List<BasicdataDriverWarehouseEntity> driverWarehouseList = new ArrayList<>();
for (Long warehouseId : warehouseIds) {
BasicdataDriverWarehouseEntity basicdataDriverWarehouseEntity = new BasicdataDriverWarehouseEntity();
basicdataDriverWarehouseEntity.setWarehouseId(warehouseId);
basicdataDriverWarehouseEntity.setDriverId(driverId);
driverWarehouseList.add(basicdataDriverWarehouseEntity);
}
return driverWarehouseList;
}
/**
* 司机信息表 修改
*/

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

@ -693,13 +693,11 @@
select dpl.brand_name brand,dpl.order_code,dpl.waybill_number,
dpl.send_warehouse_id startWarehouseId,dpl.send_warehouse_name startWarehouseName,
dpl.accept_warehouse_id endWarehouseId,dpl.accept_warehouse_name endWarehouseName,
group_concat(dpl.order_package_code) packageCode
dpl.order_package_code packageCode
from logpm_trunkline_cars_load_scan t
left join logpm_distribution_parcel_list dpl on dpl.order_package_code = t.scan_code and dpl.warehouse_id = #{warehouseId}
where t.load_id = #{loadId}
and dpl.id is not null
group by dpl.brand_name,dpl.send_warehouse_id,dpl.send_warehouse_name ,
dpl.accept_warehouse_id ,dpl.accept_warehouse_name ,dpl.order_code,dpl.waybill_number
</select>
<update id="updateWaybillOrderIsCustemer">

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

@ -472,8 +472,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);
String warehouseAddress = "";
if (CollUtil.isNotEmpty(brands)) {
for (LoadScanBrandDTO brand : brands) {
String packageCode = brand.getPackageCode();
// 按品牌分组
Map<String, List<LoadScanBrandDTO>> brandMap = brands.stream().collect(Collectors.groupingBy(LoadScanBrandDTO::getBrand));
for (Map.Entry<String, List<LoadScanBrandDTO>> entry : brandMap.entrySet()) {
List<LoadScanBrandDTO> value = entry.getValue();
LoadScanBrandDTO brand = value.get(0);
String packageCode = value.stream().map(LoadScanBrandDTO::getPackageCode).collect(Collectors.joining(","));
if (StrUtil.isEmpty(packageCode)) {
continue;
}
@ -505,7 +509,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
.startWarehouse(brand.getStartWarehouseName())
.endWarehouse(brand.getEndWarehouseName())
.content(StrUtil.split(packageCode, ",").stream().map(data->{
return PushData.builder()
return PushData.builder()
.packageCode(data)
.warehouseName(warehouseEntity.getName())
.orderCode(brand.getOrderCode())
@ -4945,7 +4949,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
List<HasNotFinalNodeIdDataVO> list = trunklineCarsLoadScanService.findNoFinalNodeData(loadId, warehouseId);
if (Objects.isNull(list) || list.size() == 0) {
if (Objects.isNull(list) || list.isEmpty()) {
return R.success("未有需要添加目的仓的数据");
} else {
return R.data(list);

Loading…
Cancel
Save