Browse Source

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

dist.1.3.0
zhaoqiaobo 9 months ago
parent
commit
3a46684ec3
  1. 12
      blade-biz-common/src/main/java/org/springblade/common/constant/RabbitConstant.java
  2. 18
      blade-service/logpm-aftersales/src/main/resources/application-dev.yml
  3. 36
      blade-service/logpm-basic/src/main/resources/application-dev.yml
  4. 38
      blade-service/logpm-basicdata/src/main/resources/application-dev.yml
  5. 36
      blade-service/logpm-business/src/main/resources/application-dev.yml
  6. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/config/RabbitMqConfiguration.java
  7. 69
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/PushInstallDTO.java
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  9. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  10. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  11. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  12. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  13. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java
  14. 222
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  15. 30
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  16. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  17. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  18. 36
      blade-service/logpm-distribution/src/main/resources/application-dev.yml
  19. 18
      blade-service/logpm-factory/src/main/resources/application-dev.yml
  20. 18
      blade-service/logpm-old-project/src/main/resources/application-dev.yml
  21. 4
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java
  22. 117
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java
  23. 284
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml
  24. 198
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java
  25. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java
  26. 36
      blade-service/logpm-trunkline/src/main/resources/application-dev.yml
  27. 18
      blade-service/logpm-warehouse/src/main/resources/application-dev.yml

12
blade-biz-common/src/main/java/org/springblade/common/constant/RabbitConstant.java

@ -232,4 +232,16 @@ public interface RabbitConstant {
/****************自提扫描信息处理 start *************************/
/****************推送安装平台 start *************************/
String PUSH_INSTALL_PLATFORM_QUEUE = "push_install_platform_queue" + ModuleNameConstant.DEVAUTH;
String PUSH_INSTALL_PLATFORM_EXCHANGE = "push_install_platform_exchange" + ModuleNameConstant.DEVAUTH;
String PUSH_INSTALL_PLATFORM_ROUTING = "push_install_platform_routing" + ModuleNameConstant.DEVAUTH;
/****************推送安装平台 start *************************/
}

18
blade-service/logpm-aftersales/src/main/resources/application-dev.yml

@ -33,15 +33,15 @@ spring:
url: ${blade.datasource.aftersales.master.url}
username: ${blade.datasource.aftersales.master.username}
password: ${blade.datasource.aftersales.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.aftersales.627683.url}
username: ${blade.datasource.aftersales.627683.username}
password: ${blade.datasource.aftersales.627683.password}
# 627683:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.aftersales.627683.url}
# username: ${blade.datasource.aftersales.627683.username}
# password: ${blade.datasource.aftersales.627683.password}
# 703923:
# druid:
# #独立校验配置

36
blade-service/logpm-basic/src/main/resources/application-dev.yml

@ -33,21 +33,21 @@ spring:
url: ${blade.datasource.basic.master.url}
username: ${blade.datasource.basic.master.username}
password: ${blade.datasource.basic.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basic.627683.url}
username: ${blade.datasource.basic.627683.username}
password: ${blade.datasource.basic.627683.password}
703623:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basic.703623.url}
username: ${blade.datasource.basic.703623.username}
password: ${blade.datasource.basic.703623.password}
# 627683:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.basic.627683.url}
# username: ${blade.datasource.basic.627683.username}
# password: ${blade.datasource.basic.627683.password}
# 703623:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.basic.703623.url}
# username: ${blade.datasource.basic.703623.username}
# password: ${blade.datasource.basic.703623.password}

38
blade-service/logpm-basicdata/src/main/resources/application-dev.yml

@ -33,22 +33,22 @@ spring:
url: ${blade.datasource.basicdata.master.url}
username: ${blade.datasource.basicdata.master.username}
password: ${blade.datasource.basicdata.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basicdata.627683.url}
username: ${blade.datasource.basicdata.627683.username}
password: ${blade.datasource.basicdata.627683.password}
703623:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basicdata.703623.url}
username: ${blade.datasource.basicdata.703623.username}
password: ${blade.datasource.basicdata.703623.password}
# 627683:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.basicdata.627683.url}
# username: ${blade.datasource.basicdata.627683.username}
# password: ${blade.datasource.basicdata.627683.password}
#
# 703623:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.basicdata.703623.url}
# username: ${blade.datasource.basicdata.703623.username}
# password: ${blade.datasource.basicdata.703623.password}

36
blade-service/logpm-business/src/main/resources/application-dev.yml

@ -32,22 +32,22 @@ spring:
url: ${blade.datasource.business.master.url}
username: ${blade.datasource.business.master.username}
password: ${blade.datasource.business.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.business.627683.url}
username: ${blade.datasource.business.627683.username}
password: ${blade.datasource.business.627683.password}
703623:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.business.703623.url}
username: ${blade.datasource.business.703623.username}
password: ${blade.datasource.business.703623.password}
# 627683:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.business.627683.url}
# username: ${blade.datasource.business.627683.username}
# password: ${blade.datasource.business.627683.password}
# 703623:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.business.703623.url}
# username: ${blade.datasource.business.703623.username}
# password: ${blade.datasource.business.703623.password}

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/config/RabbitMqConfiguration.java

@ -206,14 +206,30 @@ public class RabbitMqConfiguration {
return new Queue(RabbitConstant.SELF_PICKUP_SCAN_QUEUE, true);
}
@Bean
public Queue pushInstallPlatformQueue() {
return new Queue(RabbitConstant.PUSH_INSTALL_PLATFORM_QUEUE, true);
}
@Bean
public CustomExchange selfPickupScanExchange() {
Map<String, Object> args = Maps.newHashMap();
args.put("x-delayed-type", "direct");
return new CustomExchange(RabbitConstant.SELF_PICKUP_SCAN_EXCHANGE, "x-delayed-message", true, false, args);
}
@Bean
public CustomExchange pushInstallPlatformExchange() {
Map<String, Object> args = Maps.newHashMap();
args.put("x-delayed-type", "direct");
return new CustomExchange(RabbitConstant.PUSH_INSTALL_PLATFORM_EXCHANGE, "x-delayed-message", true, false, args);
}
@Bean
public Binding selfPickupScanBinding(Queue selfPickupScanQueue, CustomExchange selfPickupScanExchange) {
return BindingBuilder.bind(selfPickupScanQueue).to(selfPickupScanExchange).with(RabbitConstant.SELF_PICKUP_SCAN_ROUTING).noargs();
}
@Bean
public Binding pushStallPlatform(Queue pushInstallPlatformQueue, CustomExchange pushInstallPlatformExchange) {
return BindingBuilder.bind(pushInstallPlatformQueue).to(pushInstallPlatformExchange).with(RabbitConstant.PUSH_INSTALL_PLATFORM_ROUTING).noargs();
}
}

69
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/PushInstallDTO.java

@ -0,0 +1,69 @@
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.function.Consumer;
@Data
public class PushInstallDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String name;
private String tel;
private String address;
private String balance_people;
private String balance_type;
private String balance_name;
private List<Order> order;
private List<OrderDetail> order_detail;
@Data
public static class Order implements Serializable{
private static final long serialVersionUID = 1L;
private String waybill_no;
private String all_num;
private String end_num;
private String order_no;
}
@Data
public static class OrderDetail implements Serializable {
private static final long serialVersionUID = 1L;
private String waybill_no;
private String package_code;
private String level1_type;
private String level2_type;
private String level3_type;
private String materials;
private String order_no;
private String number;
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -187,7 +187,7 @@
and ldbl.pick_up_plate like concat('%',#{param.vehicleName},'%')
</if>
<if test="param.driverName !='' and param.driverName != null">
and lddl.consignee like concat('%',#{param.driverName},'%')
and ldbl.consignee like concat('%',#{param.driverName},'%')
</if>
<if test="param.scanUser !='' and param.scanUser != null">
and ldbls.scan_user like concat('%',#{param.scanUser},'%')

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java

@ -252,7 +252,7 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
* @param reservationId
* @return
*/
List<DistributionParcelNumberVO> selectReservationZeroOrderDetail(@Param("stockArticleId") Long id,@Param("reservationId") Long reservationId);
List<DistributionParcelNumberVO> selectReservationZeroOrderDetail(@Param("stockArticleId") Long stockArticleId,@Param("reservationId") Long reservationId);
List<String> getStockListAllocation(@Param("stockListId")Long stockListId, @Param("reservationId")Long reservationId);

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -463,6 +463,7 @@
INNER JOIN logpm_distribution_reservation AS ldr ON ldr.id = lds.reservation_id
<where>
ldr.reservation_status != '40'
AND ldr.is_deleted = 0
<if test="id!='' and id != null">
and lddl.id = #{id}
</if>

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -118,6 +118,7 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
Long selectIdByOrderId(Long id);
Integer updateloadByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
Integer updateLnumAndSnumByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub1") Integer nub1,@Param("nub2") Integer nub2);
Integer updateloadreduceByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
/**

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

@ -46,6 +46,12 @@
UPDATE logpm_distribution_signfor lds set lds.loaded_number = ( lds.loaded_number + #{nub} ) WHERE
lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId}
</update>
<update id="updateLnumAndSnumByReservationId">
UPDATE logpm_distribution_signfor lds set lds.loaded_number = ( lds.loaded_number + #{nub1} ),lds.received_quantity = ( lds.received_quantity + #{nub2}
) WHERE
lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId}
</update>
<update id="updateloadByinvn">
UPDATE logpm_distribution_signfor lds set lds.loadedin_number = ( lds.loadedin_number + #{nub} ) WHERE
lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId}

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java

@ -346,4 +346,10 @@ public interface IDistributionAsyncService {
* @param ids
*/
void maintenanceCancelBillLading(List<Long> ids);
/**
* 查询预约信息推送至安装平台
* @param id
*/
void sendInstallToPlatform(DistributionReservationEntity reservationEntity);
}

222
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -12,12 +12,15 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataClientClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.business.entity.BusinessPreOrderEntity;
import com.logpm.distribution.dto.DistributionLoadingNumDTO;
import com.logpm.distribution.dto.DistributionParcelNumberDTO;
import com.logpm.distribution.dto.DistributionStockArticleDTO;
import com.logpm.distribution.dto.PushInstallDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.dto.app.StockupZeroDTO;
@ -159,10 +162,10 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
private final RabbitTemplate rabbitTemplate;
private final ISysClient sysClient;
private final ITrunklinePackageTrackLogClient trunklinePackageTrackLogClient;
private final IDistributionPrintService distributionPrintService;
private final IBasicdataClientClient basicdataClientClient;
// private final
@ -2833,8 +2836,8 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
queryWrapper1.eq("reservation_id", reservationId);
}
DistributionStockEntity stockEntity = distributionStockService.selectOne(queryWrapper1);
//没有扫
return ObjectUtils.isNull(stockEntity);
//没有扫
return ObjectUtils.isNull(stockEntity);
}
@ -2858,8 +2861,8 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
queryWrapper1.eq("reservation_id", reservationId);
}
List<DistributionStockEntity> stockEntityList = distributionStockService.selectList(queryWrapper1);
//未完成
return !stockEntityList.isEmpty() && stockEntityList.size() >= num; //已完成
//未完成
return !stockEntityList.isEmpty() && stockEntityList.size() >= num; //已完成
}
@ -2872,11 +2875,9 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Override
@LogpmAsync("asyncExecutor")
public void recordsReservationDeliveryLog(List<DistributionReservationEntity> reservationList,BasicdataWarehouseEntity warehouse,BladeUser user,DistributionDeliveryListEntity deliveryListEntity,Integer node,String content) {
public void recordsReservationDeliveryLog(List<DistributionReservationEntity> reservationList, BasicdataWarehouseEntity warehouse, BladeUser user, DistributionDeliveryListEntity deliveryListEntity, Integer node, String content) {
List<Long> list = reservationList.stream().map(DistributionReservationEntity::getId).collect(Collectors.toList());
if (!list.isEmpty()) {
List<DistributionReservationPackageEntity> distributionReservationPackageEntities = distributionReservationPackageMapper.selectList(Wrappers.<DistributionReservationPackageEntity>query().lambda()
@ -2889,35 +2890,35 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
List<JSONObject> pushDatas = new ArrayList<>();
if (!distributionReservationPackageEntities.isEmpty()) {
// 通过订单id获取订单,然后根据品牌分组
Map<Long,DistributionStockArticleEntity> stockArticleEntityMap = new HashMap<>();
Map<Long, DistributionStockArticleEntity> stockArticleEntityMap = new HashMap<>();
List<Long> collect = distributionReservationPackageEntities.stream().map(DistributionReservationPackageEntity::getStockArticleId).collect(Collectors.toList());
if(CollUtil.isNotEmpty(collect)){
if (CollUtil.isNotEmpty(collect)) {
List<DistributionStockArticleEntity> stockArticleEntities = distributionStockArticleService.list(Wrappers.<DistributionStockArticleEntity>query().lambda()
.in(DistributionStockArticleEntity::getId, collect)
);
if(CollUtil.isNotEmpty(stockArticleEntities)){
stockArticleEntities.forEach(s->{
stockArticleEntityMap.put(s.getId(),s);
if (CollUtil.isNotEmpty(stockArticleEntities)) {
stockArticleEntities.forEach(s -> {
stockArticleEntityMap.put(s.getId(), s);
});
}
}
distributionReservationPackageEntities.forEach(rp->{
distributionReservationPackageEntities.forEach(rp -> {
DistributionReservationEntity r = map.get(rp.getReservationId()).get(0);
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",user.getUserId());
trunklinePackageTrackLog.put("updateUser",user.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",warehouse.getDepartment());
trunklinePackageTrackLog.put("orderPackageCode",rp.getPacketBarCode());
trunklinePackageTrackLog.put("warehouseId",warehouse.getId());
trunklinePackageTrackLog.put("warehouseName",warehouse.getName());
trunklinePackageTrackLog.put("workNode",node);
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
JSONObject trunklinePackageTrackLog = new JSONObject();
trunklinePackageTrackLog.put("tenantId", AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime", new Date());
trunklinePackageTrackLog.put("createUser", user.getUserId());
trunklinePackageTrackLog.put("updateUser", user.getUserId());
trunklinePackageTrackLog.put("updateTime", new Date());
trunklinePackageTrackLog.put("isDeleted", 0);
trunklinePackageTrackLog.put("status", 1);
trunklinePackageTrackLog.put("createDept", warehouse.getDepartment());
trunklinePackageTrackLog.put("orderPackageCode", rp.getPacketBarCode());
trunklinePackageTrackLog.put("warehouseId", warehouse.getId());
trunklinePackageTrackLog.put("warehouseName", warehouse.getName());
trunklinePackageTrackLog.put("workNode", node);
trunklinePackageTrackLog.put("content", content);
trunklinePackageTrackLog.put("operator", AuthUtil.getUser().getNickName());
aaa.add(trunklinePackageTrackLog);
JSONObject jsonObject = new JSONObject();
jsonObject.put("trainNumber", deliveryListEntity.getTrainNumber());
@ -2931,13 +2932,13 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
});
}
try {
if(CollUtil.isNotEmpty(pushDatas)){
if (CollUtil.isNotEmpty(pushDatas)) {
// 以trainNumber和receiver 分组 将包件封装成list
Map<String, List<JSONObject>> collect = pushDatas.stream().collect(Collectors.groupingBy(jsonObject -> jsonObject.getString("trainNumber") + jsonObject.getString("receiver") + jsonObject.getString("brand")));
if(CollUtil.isNotEmpty(collect)){
if (CollUtil.isNotEmpty(collect)) {
for (Map.Entry<String, List<JSONObject>> entry : collect.entrySet()) {
List<JSONObject> value = entry.getValue();
if(CollUtil.isNotEmpty(value)){
if (CollUtil.isNotEmpty(value)) {
JSONObject object = value.get(0);
NodePushMsg msg = new NodePushMsg();
msg.setNode(WorkNodeEnums.PLAN_DISTRIBUTION);
@ -2956,7 +2957,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
}
}
}catch (Exception e){
} catch (Exception e) {
log.error("推送工程数据失败:{}", e);
}
@ -2977,7 +2978,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
);
if (!list.isEmpty()) {
List<Long> orderIds = list.stream().map(DistrilbutionBillStockEntity::getStockArticleId).distinct().collect(Collectors.toList());
handlePushFactoryOrderIds(orderIds, s, warehouse, user);
handlePushFactoryOrderIds(orderIds, s, warehouse, user);
}
} catch (Exception e) {
@ -2995,8 +2996,8 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
if (!list.isEmpty()) {
List<Long> packageIds = list.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList());
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda()
.in(DistributionParcelListEntity::getId,packageIds)
.set(DistributionParcelListEntity::getOrderPackageReservationStatus,OrderPackageReservationStatusConstant.daiyuyue.getValue())
.in(DistributionParcelListEntity::getId, packageIds)
.set(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue())
);
List<Long> orderIds = list.stream().map(DistrilbutionBillPackageEntity::getStockArticleId).distinct().collect(Collectors.toList());
distributionStockArticleService.maintenanceOrderInfoByIds(orderIds);
@ -3004,6 +3005,152 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
}
@Override
public void sendInstallToPlatform(DistributionReservationEntity reservationEntity) {
String method = "###############sendInstallToPlatform推送安装平台";
//查询预约信息
PushInstallDTO pushInstallDTO = new PushInstallDTO();
pushInstallDTO.setName(reservationEntity.getConsignee());
pushInstallDTO.setTel(reservationEntity.getDeliveryPhone());
pushInstallDTO.setAddress(reservationEntity.getDeliveryAddress());
//查询客户
BasicdataClientEntity client = basicdataClientClient.findByName(reservationEntity.getReceivingUnit());
if (!Func.isEmpty(client)) {
pushInstallDTO.setBalance_name(client.getClientName());
pushInstallDTO.setBalance_people("1");
pushInstallDTO.setBalance_type(client.getDefaultPaymentMethods());
} else {
log.error(method + ">>>>>>>>>>>>>查询客户信息失败" + reservationEntity.getReceivingUnit());
}
List<PushInstallDTO.Order> orderList = new ArrayList<>();
List<PushInstallDTO.OrderDetail> orderDetailList = new ArrayList<>();
//查询此配送的订单信息
List<DistributionReservationStockarticleEntity> distributionReservationStockarticleEntities = distributionReservationMapper.selectStockArticleByReservationId(reservationEntity.getId());
if (!distributionReservationStockarticleEntities.isEmpty()) {
Map<Long, List<DistributionReservationStockarticleEntity>> orderPlanMap = distributionReservationStockarticleEntities.stream().collect(Collectors.groupingBy(DistributionReservationStockarticleEntity::getStockArticleId));
List<Long> orderIds = distributionReservationStockarticleEntities.stream().map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList());
List<DistributionStockArticleEntity> distributionStockArticleEntities = distributionStockArticleService.listByIds(orderIds);
if (!distributionStockArticleEntities.isEmpty()) {
for (DistributionStockArticleEntity distributionStockArticleEntity : distributionStockArticleEntities) {
PushInstallDTO.Order order = new PushInstallDTO.Order();
order.setWaybill_no(distributionStockArticleEntity.getWaybillNumber());
order.setOrder_no(distributionStockArticleEntity.getOrderCode());
order.setAll_num(distributionStockArticleEntity.getTotalNumber() + "");
order.setAll_num("0");
//查询签收数量
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanMapper.selectList(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getReservationId, reservationEntity.getId())
.eq(DistributionLoadscanEntity::getOrderId, distributionStockArticleEntity.getId())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
.ne(DistributionLoadscanEntity::getSignforState, 2)
);
if (!loadscanEntityList.isEmpty()) {
order.setEnd_num(loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getReceivedQuantity).sum() + "");
}
orderList.add(order);
if (distributionStockArticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())){
//构建包件信息
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationEntity.getId(), distributionStockArticleEntity.getId(), distributionStockArticleEntity.getWarehouseId());
if (!distributionParcelListEntities.isEmpty()) {
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
if (distributionParcelListEntity.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) {
PushInstallDTO.OrderDetail orderDetail = new PushInstallDTO.OrderDetail();
orderDetail.setOrder_no(distributionStockArticleEntity.getOrderCode());
orderDetail.setWaybill_no(distributionStockArticleEntity.getWaybillNumber());
orderDetail.setMaterials(distributionParcelListEntity.getMaterialName());
orderDetail.setLevel1_type(distributionParcelListEntity.getFirsts());
orderDetail.setLevel2_type(distributionParcelListEntity.getSecond());
orderDetail.setLevel3_type(distributionParcelListEntity.getThirdProduct());
orderDetail.setPackage_code(distributionParcelListEntity.getOrderPackageCode());
orderDetail.setNumber(distributionParcelListEntity.getQuantity() + "");
orderDetailList.add(orderDetail);
}
}
}
}else {
//整理零担的数据
List<DistributionParcelNumberVO> distributionParcelNumberVOS = distributionReservationMapper.selectReservationZeroOrderDetail(distributionStockArticleEntity.getId(), reservationEntity.getId());
if (!distributionParcelNumberVOS.isEmpty()) {
for (DistributionParcelNumberVO distributionParcelNumberVO : distributionParcelNumberVOS) {
PushInstallDTO.OrderDetail orderDetail = new PushInstallDTO.OrderDetail();
orderDetail.setOrder_no(distributionStockArticleEntity.getOrderCode());
orderDetail.setWaybill_no(distributionStockArticleEntity.getWaybillNumber());
orderDetail.setMaterials(distributionParcelNumberVO.getFirsts());
orderDetail.setLevel1_type(distributionParcelNumberVO.getFirsts());
// orderDetail.setLevel2_type(distributionParcelListEntity.getSecond());
// orderDetail.setLevel3_type(distributionParcelListEntity.getThirdProduct());
orderDetail.setNumber(distributionParcelNumberVO.getReservationNum() + "");
orderDetail.setPackage_code(distributionStockArticleEntity.getOrderCode());
orderDetailList.add(orderDetail);
}
}
}
}
}
}
//查询库存品
List<DistributionReservationStocklistEntity> reservationStocklistEntities = distributionReservationMapper.selectStockListByReservationId(reservationEntity.getId());
if (!reservationStocklistEntities.isEmpty()) {
List<Long> stockListIds = reservationStocklistEntities.stream().map(DistributionReservationStocklistEntity::getStocklistId).collect(Collectors.toList());
Map<Long, List<DistributionReservationStocklistEntity>> inventoryPlanMap = reservationStocklistEntities.stream().collect(Collectors.groupingBy(DistributionReservationStocklistEntity::getStocklistId));
if (!stockListIds.isEmpty()) {
List<DistributionStockListEntity> distributionStockListEntities = distributionStockListMapper.selectList(Wrappers.<DistributionStockListEntity>query().lambda()
.in(DistributionStockListEntity::getId, stockListIds)
);
if (!distributionStockListEntities.isEmpty()) {
for (DistributionStockListEntity distributionStockListEntity : distributionStockListEntities) {
PushInstallDTO.Order order = new PushInstallDTO.Order();
order.setWaybill_no(distributionStockListEntity.getOrderCode());
order.setOrder_no(distributionStockListEntity.getIncomingBatch());
order.setAll_num(distributionStockListEntity.getQuantityStock() + "");
order.setAll_num("0");
//
List<DistributionLoadscaninvnEntity> loadscanEntityList = distributionLoadscaninvnMapper.selectList(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
.eq(DistributionLoadscaninvnEntity::getReservationId, reservationEntity.getId())
.eq(DistributionLoadscaninvnEntity::getInventoryId, distributionStockListEntity.getId())
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
.ne(DistributionLoadscaninvnEntity::getSignforState, 2)
);
if (!loadscanEntityList.isEmpty()) {
order.setAll_num(loadscanEntityList.stream().mapToInt(DistributionLoadscaninvnEntity::getReceivedQuantity).sum() + "");
}
//查询库存品包件
List<DisStockListDetailEntity> list = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, reservationEntity.getId())
.eq(DisStockListDetailEntity::getStockListId, distributionStockListEntity.getId())
.eq(DisStockListDetailEntity::getStockStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (!list.isEmpty()) {
for (DisStockListDetailEntity disStockListDetailEntity : list) {
PushInstallDTO.OrderDetail orderDetail = new PushInstallDTO.OrderDetail();
orderDetail.setOrder_no(distributionStockListEntity.getOrderCode());
// orderDetail.setWaybill_no(distributionStockArticleEntity.getWaybillNumber());
orderDetail.setMaterials(distributionStockListEntity.getMarketName());
// orderDetail.setLevel1_type(distributionParcelListEntity.getFirsts());
// orderDetail.setLevel2_type(distributionParcelListEntity.getSecond());
// orderDetail.setLevel3_type(distributionParcelListEntity.getThirdProduct());
// orderDetail.setLevel3_type(distributionParcelListEntity.getThirdProduct());
orderDetail.setNumber(disStockListDetailEntity.getNum() + "");
orderDetail.setPackage_code(disStockListDetailEntity.getStockPackageCode());
orderDetailList.add(orderDetail);
}
}
}
}
}
}
pushInstallDTO.setOrder(orderList);
pushInstallDTO.setOrder_detail(orderDetailList);
log.info(">>>>>>>>>>>>>>安装推送整理数据",JSONObject.toJSON(pushInstallDTO));
String jsonString = JSONObject.toJSONString(pushInstallDTO);
rabbitTemplate.convertAndSend(RabbitConstant.PUSH_INSTALL_PLATFORM_EXCHANGE, RabbitConstant.PUSH_INSTALL_PLATFORM_ROUTING, jsonString);
}
private void handlePushFactoryOrderIds(List<Long> orderIds, String s, BasicdataWarehouseEntity warehouse, BladeUser user) {
if (!orderIds.isEmpty()) {
List<DistributionStockArticleEntity> distributionStockArticleEntities = distributionStockArticleService.list(Wrappers.<DistributionStockArticleEntity>query().lambda()
@ -3065,6 +3212,9 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
mtReceiveImagesDTOS.add(mtReceiveImagesDTO);
}
}
if (!mtReceiveImagesDTOS.isEmpty()) {
mtReceiveDTO.setReceiveImagesList(mtReceiveImagesDTOS);
}
orderMainClinet.sendReceiveInfoByNewSystem(mtReceiveDTO);
}

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

@ -650,7 +650,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
this.updatePicture(distributionSignforDTO);
this.updateById(distributionSignfor);
//修改预约单的签收状态和装车状态
DistributionReservationEntity reservationEntity = new DistributionReservationEntity();
//查询签收信息
DistributionReservationEntity reservationEntity = distributionReservationService.getById(distributionSignfor.getReservationId());
if (Func.isEmpty(reservationEntity)){
return R.fail("预约任务错误");
}
// DistributionReservationEntity reservationEntity = new DistributionReservationEntity();
reservationEntity.setId(distributionSignfor.getReservationId());
reservationEntity.setSigningStatus(ReservationSigningStatusConstant.yiqianshou.getValue());
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
@ -661,6 +666,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!flag) {
distributionAsyncService.releaseSource(distributionSignfor.getReservationId(), myCurrentWarehouse,AuthUtil.getUser(),deliveryListEntity.getTrainNumber());
}
//查看是否需要进行安装
if (reservationEntity.getIsInstall() == 2) {
//此时需要进行安装
//开启异步查询此配送客户需要推送至安装平台数据
distributionAsyncService.sendInstallToPlatform(reservationEntity);
}
return R.success("操作成功");
}
@ -1058,6 +1069,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.in(DistributionLoadscanEntity::getPackageId, reservationZeroPackageEntity.getParcelListId())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss");
if (Func.isEmpty(loadscanEntity)) {
if ("1".equals(deliveryListEntity.getKind())) {
//自主配送
@ -1078,7 +1090,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
d = distributionParcelNumberEntity.getDeliveryQuantity() - reservationZeroPackageEntity.getQuantity();
//未进行装车操作
DistributionLoadscanEntity unLoadscanEntity = new DistributionLoadscanEntity();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss");
unLoadscanEntity.setScanStatus(LoadingStatusConstant.buluzhuangche.getValue());
unLoadscanEntity.setIsInsert(2);
unLoadscanEntity.setLoadingId(loadingId.toString());
@ -1129,7 +1140,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
c = distributionParcelNumberEntity.getOutboundQuantity() - loadscanEntity.getReceivedQuantity() + reservationZeroPackageEntity.getQuantity();
d = distributionParcelNumberEntity.getDeliveryQuantity() + loadscanEntity.getReceivedQuantity() - reservationZeroPackageEntity.getQuantity();
//存在装车操作
//计算差值
int i1 = reservationZeroPackageEntity.getQuantity() - loadscanEntity.getLoadedNub();
loadscanEntity.setSigningUser(user.getNickName());
loadscanEntity.setSigningUserId(user.getUserId());
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscanEntity.setIsSignfor(2);
loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
// loadscanEntity.setSigningTime(new Date().toString());
@ -1142,6 +1157,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionParcelNumberEntity.setSigninQuantity(b);
distributionParcelNumberEntity.setOutboundQuantity(c);
distributionParcelNumberEntity.setDeliveryQuantity(d);
//更新装车信息
//获取计划和当前装车的差值
//更新装车数量
distributionSignforMapper.updateLnumAndSnumByReservationId(loadscanEntity.getDeliveryId(),loadscanEntity.getReservationId(),i1,reservationZeroPackageEntity.getQuantity());
}
distributionParcelListService.maintenanceZeroPackageInfo(distributionParcelNumberEntity.getParcelListId(), stockArticleEntity.getWarehouseId());
@ -1321,6 +1340,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//存在装车操作
loadscanEntity.setSigningUser(user.getNickName());
loadscanEntity.setIsSignfor(2);
loadscanEntity.setIsZero(1);
loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
// loadscanEntity.setSigningTime(new Date().toString());
loadscanEntity.setReceivedQuantity(reservationZeroPackageEntities.getQuantity());
@ -2507,6 +2527,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//进行签收记录数据的维护
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscanEntity.setSignforState(2);
loadscanEntity.setOneClick(1);
loadscanEntity.setOneQclick(1);
loadscanEntity.setIsInsert(2);
loadscanEntity.setReceivedQuantity(loadscanEntity.getLoadedNub());
packageLockIds.add(loadscanEntity.getPackageId());
@ -2579,6 +2602,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setIsSignfor(2);
distributionLoadscanEntity.setIsInsert(2);
distributionLoadscanEntity.setSignforState(2);
distributionLoadscanEntity.setOneClick(1);
distributionLoadscanEntity.setOneQclick(1);
distributionLoadscanEntity.setIsInsert(2);
distributionLoadscanEntity.setTrainNumber(deliveryListEntity.getTrainNumber());
distributionLoadscanEntity.setPackageNub(collect.get(0).getQuantity());
distributionLoadscanEntity.setOrderId(collect.get(0).getStockArticleId());

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -1737,6 +1737,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
//判断任务类型
DistributionStockupInfoEntity one = distributionStockupInfoService.getOne(Wrappers.<DistributionStockupInfoEntity>query().lambda()
.eq(DistributionStockupInfoEntity::getReservationId, reservationId)
.ne(DistributionStockupInfoEntity::getStockStatus, "4")
);
if (ObjectUtils.isNotNull(one) && "3".equals(one.getStockUpType())) {

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

@ -1186,7 +1186,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
if (!list.isEmpty()) {
for (Long l : list) {
distributionAsyncService.sendFactorySignforInfo(l + "", myCurrentWarehouse, AuthUtil.getUser());
DistrilbutionBillLadingEntity billLadingEntity = this.getById(l);
BasicdataWarehouseEntity entityWarehouse= warehouseClient.getEntityWarehouseId(billLadingEntity.getWarehouseId());
distributionAsyncService.sendFactorySignforInfo(l + "", entityWarehouse, AuthUtil.getUser());
}
}
@ -2804,6 +2806,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//查询图片
List<DistributionPrintEntity> list2 = distributionPrintService.list(Wrappers.<DistributionPrintEntity>query().lambda()
.eq(DistributionPrintEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
.eq(DistributionPrintEntity::getIsDeleted, 0)
);
detailOne.setPrintVOS(list2);
//查询库存品
@ -2890,6 +2893,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
String coding = distributionBillLading.get("coding").toString();
String type = distributionBillLading.get("type").toString();
try {
DistrilbutionBillLadingEntity billLadingEntity1 = baseMapper.selectById((Serializable) billLadingId);
DistrilbutionAppBillLadingOrderMainVO billLadingOrderMainVO = baseMapper.getBillLadingOrderMainVO(Long.parseLong(billLadingId.toString()));
@ -2897,12 +2901,12 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
if (isTaskCompleted(billLadingOrderMainVO, billLadingEntity1)) {
return Resp.scanFail("提货任务已完成!", "提货任务已完成!");
}
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (myCurrentWarehouse == null) {
return Resp.scanFail("请选择仓库!", "请选择仓库!");
}
if (isAlreadySigned(billLadingId, coding, type)) {
return Resp.scanFail("该包件已签收!", "该包件已签收!");
}
@ -2914,7 +2918,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
distributionBillLadingScan.setScanType(1);
distributionBillLadingScan.setWarehouseId(myCurrentWarehouse.getId());
distributionBillLadingScan.setScanUser(AuthUtil.getUser().getNickName());
return processScan(type, billLadingId, coding, distributionBillLadingScan, myCurrentWarehouse, billLadingEntity1.getPickupBatch());
return processScan(type, distributionBillLadingScan.getBillLadingId(), coding, distributionBillLadingScan, myCurrentWarehouse, billLadingEntity1.getPickupBatch());
// return Resp.scanSuccess("签收成功", "签收成功");
} catch (Exception e) {
@ -2944,7 +2950,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
return !list3.isEmpty();
}
private Resp processScan(String type, Object billLadingId, String coding, DistributionBillLadingScanEntity distributionBillLadingScan, BasicdataWarehouseEntity warehouse, String pickupBatch) {
private Resp processScan(String type, Long billLadingId, String coding, DistributionBillLadingScanEntity distributionBillLadingScan, BasicdataWarehouseEntity warehouse, String pickupBatch) {
if ("1".equals(type)) {
// 处理库存品包件逻辑
return handleOrderProduct(type, billLadingId, coding, distributionBillLadingScan, warehouse, pickupBatch);
@ -3032,7 +3038,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
private Resp handleInventoryProduct(String type, Object billLadingId, String coding, DistributionBillLadingScanEntity distributionBillLadingScan) {
private Resp handleInventoryProduct(String type, Long billLadingId, String coding, DistributionBillLadingScanEntity distributionBillLadingScan) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (ObjectUtils.isNull(myCurrentWarehouse)) {
@ -3173,7 +3179,22 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//订单
distributionBillLadingScan.setStockArticleId(one.getId());
distributionBillLadingScan.setQuantity(1);
distributionBillLadingScan.setBillLadingId(Long.parseLong((String) billLadingId));
distributionBillLadingScan.setBillLadingId( billLadingId);
//推送梦天
if (distributionParcelListEntity.getBrandName().equals("梦天")){
Map<String, Object> pushMap = new HashMap<>();
pushMap.put("orderPackageCode", coding);
pushMap.put("operationTime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
pushMap.put("distributionContactId", billLadingId);
pushMap.put("destinationWarehouse", myCurrentWarehouse.getName());
rabbitTemplate.convertAndSend(RabbitConstant.MT_BUSINESS_DATA_2_FACTORY_EXCHANGE, RabbitConstant.MT_BUSINESS_DATA_2_FACTORY_ROUTING, pushMap, message -> {
message.getMessageProperties()
.setHeader("x-delay", 3000);
return message;
});
}
}
@ -3196,6 +3217,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
});
return Resp.scanSuccess("签收成功", "签收成功");
}

36
blade-service/logpm-distribution/src/main/resources/application-dev.yml

@ -62,21 +62,21 @@ spring:
url: ${blade.datasource.distribution.master.url}
username: ${blade.datasource.distribution.master.username}
password: ${blade.datasource.distribution.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.distribution.627683.url}
username: ${blade.datasource.distribution.627683.username}
password: ${blade.datasource.distribution.627683.password}
703623:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.distribution.703623.url}
username: ${blade.datasource.distribution.703623.username}
password: ${blade.datasource.distribution.703623.password}
# 627683:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.distribution.627683.url}
# username: ${blade.datasource.distribution.627683.username}
# password: ${blade.datasource.distribution.627683.password}
# 703623:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.distribution.703623.url}
# username: ${blade.datasource.distribution.703623.username}
# password: ${blade.datasource.distribution.703623.password}

18
blade-service/logpm-factory/src/main/resources/application-dev.yml

@ -60,14 +60,14 @@ spring:
url: ${blade.datasource.factory.master.url}
username: ${blade.datasource.factory.master.username}
password: ${blade.datasource.factory.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.factory.627683.url}
username: ${blade.datasource.factory.627683.username}
password: ${blade.datasource.factory.627683.password}
# 627683:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.factory.627683.url}
# username: ${blade.datasource.factory.627683.username}
# password: ${blade.datasource.factory.627683.password}

18
blade-service/logpm-old-project/src/main/resources/application-dev.yml

@ -34,12 +34,12 @@ spring:
url: ${blade.datasource.oldproject.master.url}
username: ${blade.datasource.oldproject.master.username}
password: ${blade.datasource.oldproject.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.oldproject.627683.url}
username: ${blade.datasource.oldproject.627683.username}
password: ${blade.datasource.oldproject.627683.password}
# 627683:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.oldproject.627683.url}
# username: ${blade.datasource.oldproject.627683.username}
# password: ${blade.datasource.oldproject.627683.password}

4
blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java

@ -286,7 +286,7 @@ public class WarehouseIndexController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWarehouseList();
if (myWatchWarehouse.isEmpty()) {
if (!myWatchWarehouse.isEmpty()) {
warehouseIds = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
}
@ -321,7 +321,7 @@ public class WarehouseIndexController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWarehouseList();
if (myWatchWarehouse.isEmpty()) {
if (!myWatchWarehouse.isEmpty()) {
warehouseIds = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
}

117
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java

@ -115,96 +115,183 @@ public interface WarehouseIndexMapper {
* @param indexDTO
* @return
*/
IndexDeliveryDataVO findTripartiteTotal(@Param("param")IndexDTO indexDTO);
IndexDeliveryDataVO findTripartiteTotalByMerchant(@Param("param")IndexDTO indexDTO);
/**
* 查询三方总件数
* 查询三方配送信息
* @param indexDTO
* @return
*/
IndexDeliveryDataVO findTripartiteTotalByCity(@Param("param")IndexDTO indexDTO);
/**
* 查询三方商配总件数
* @param indexDTO
* @return
*/
Integer findTripartiteTotalNumByMerchant(@Param("param")IndexDTO indexDTO);
/**
* 查询三方市配总件数
* @param indexDTO
* @return
*/
Integer findTripartiteTotalNum(@Param("param")IndexDTO indexDTO);
Integer findTripartiteTotalNumByCity(@Param("param")IndexDTO indexDTO);
/**
* 查询三方总重量
* @param indexDTO
* @return
*/
BigDecimal findTripartiteTotalWeight(@Param("param")IndexDTO indexDTO);
BigDecimal findTripartiteTotalWeightByMerchant(@Param("param")IndexDTO indexDTO);
BigDecimal findTripartiteTotalWeightByCity(@Param("param")IndexDTO indexDTO);
/**
* 查询三方配送总体积
* @param indexDTO
* @return
*/
BigDecimal findTripartiteTotalVolume(@Param("param")IndexDTO indexDTO);
BigDecimal findTripartiteTotalVolumeByMerchant(@Param("param")IndexDTO indexDTO);
/**
* 查询三方配送市配总体积
* @param indexDTO
* @return
*/
BigDecimal findTripartiteTotalVolumeByCity(@Param("param")IndexDTO indexDTO);
/**
* 查询当天的签收数量
* @param indexDTO
* @return
*/
Integer findSignforDataByDay(@Param("param")IndexDTO indexDTO);
String findSignforDataByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月签收数量
* @param indexDTO
* @return
*/
Integer findSignforDataByMonth(@Param("param")IndexDTO indexDTO);
String findSignforDataByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询前天未签收件数
* @param indexDTO
* @return
*/
Integer findUnSignforDataByDay(@Param("param")IndexDTO indexDTO);
String findUnSignforDataByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月未签收件数
* @param indexDTO
* @return
*/
Integer findUnSignforDataByMonth(@Param("param")IndexDTO indexDTO);
String findUnSignforDataByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当天文员复核数
* @param indexDTO
* @return
*/
Integer findClerkSignforNumByDay(@Param("param")IndexDTO indexDTO);
String findClerkSignforNumByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月文员复核数
* @param indexDTO
* @return
*/
Integer findClerkSignforNumByMonth(@Param("param")IndexDTO indexDTO);
String findClerkSignforNumByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当天计划数
* @param indexDTO
* @return
*/
Integer findPlanNumByDay(@Param("param")IndexDTO indexDTO);
String findPlanNumByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月文员计划数
* @param indexDTO
* @return
*/
Integer findPlanNumByMonth(@Param("param")IndexDTO indexDTO);
String findPlanNumByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当天文员复核超时数
* @param indexDTO
* @return
*/
Integer findClerkOverTimeNumByDay(@Param("param")IndexDTO indexDTO);
String findClerkOverTimeNumByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月文员复核超时数
* @param indexDTO
* @return
*/
Integer findClerkOverTimeNumByMonth(@Param("param")IndexDTO indexDTO);
String findClerkOverTimeNumByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询自提签收包件数
* @param indexDTO
* @return
*/
String findBillLadingSignforByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月自提签收包件数
* @param indexDTO
* @return
*/
String findBillLadingSignforByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当天自提未签收数
* @param indexDTO
* @return
*/
String findBillLadingUnSignforByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月自提未签收数
* @param indexDTO
* @return
*/
String findBillLadingUnSignforByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当天自提复核数
* @param indexDTO
* @return
*/
String findBillLadingSignForNumByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当天签收超时数
* @param indexDTO
* @return
*/
String findBillLadingOverTimeNumByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月签收数
* @param indexDTO
* @return
*/
String findBillLadingSignForNumByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当月计划自提总数
* @param indexDTO
* @return
*/
String findBillLadingPlanNumByDay(@Param("param")IndexDTO indexDTO);
/**
*查询当月自提计划数
* @param indexDTO
* @return
*/
String findBillLadingPlanNumByMonth(@Param("param")IndexDTO indexDTO);
}

284
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml

@ -374,7 +374,7 @@
</if>
</where>
</select>
<select id="findTripartiteTotal" resultType="com.logpm.report.vo.indexCount.IndexDeliveryDataVO">
<select id="findTripartiteTotalByMerchant" resultType="com.logpm.report.vo.indexCount.IndexDeliveryDataVO">
SELECT
4 AS type,
count( 1 ) AS totalNum
@ -383,6 +383,7 @@
<where>
is_deleted = 0 AND type IS NOT NULL
AND kind = 2
AND type = 1
<if test="param.warehouseIds != null">
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
@ -392,7 +393,26 @@
</where>
</select>
<select id="findTripartiteTotalNum" resultType="java.lang.Integer">
<select id="findTripartiteTotalByCity" resultType="com.logpm.report.vo.indexCount.IndexDeliveryDataVO">
SELECT
5 AS type,
count( 1 ) AS totalNum
FROM
logpm_distribution_delivery_list
<where>
is_deleted = 0 AND type IS NOT NULL
AND kind = 2
AND type = 2
<if test="param.warehouseIds != null">
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findTripartiteTotalNumByMerchant" resultType="java.lang.Integer">
SELECT
count(ldrp.id)
FROM
@ -403,6 +423,7 @@
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 1
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
@ -412,7 +433,28 @@
</if>
</where>
</select>
<select id="findTripartiteTotalWeight" resultType="java.math.BigDecimal">
<select id="findTripartiteTotalNumByCity" resultType="java.lang.Integer">
SELECT
count(ldrp.id)
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation_package AS ldrp ON ldrp.reservation_id = lds.reservation_id
<where>
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 2
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findTripartiteTotalWeightByMerchant" resultType="java.math.BigDecimal">
SELECT
IFNULL(sum(ldpl.weight),0) AS weight
FROM
@ -424,6 +466,7 @@
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 1
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
@ -433,7 +476,51 @@
</if>
</where>
</select>
<select id="findTripartiteTotalVolume" resultType="java.math.BigDecimal">
<select id="findTripartiteTotalWeightByCity" resultType="java.math.BigDecimal">
SELECT
IFNULL(sum(ldpl.weight),0) AS weight
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation_package AS ldrp ON ldrp.reservation_id = lds.reservation_id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
<where>
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 2
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findTripartiteTotalVolumeByMerchant" resultType="java.math.BigDecimal">
SELECT
IFNULL(sum(ldpl.volume),0) AS volume
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation_package AS ldrp ON ldrp.reservation_id = lds.reservation_id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
<where>
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 1
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findTripartiteTotalVolumeByCity" resultType="java.math.BigDecimal">
SELECT
IFNULL(sum(ldpl.volume),0) AS volume
FROM
@ -445,6 +532,7 @@
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 2
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
@ -454,7 +542,7 @@
</if>
</where>
</select>
<select id="findSignforDataByDay" resultType="java.lang.Integer">
<select id="findSignforDataByDay" resultType="java.lang.String">
SELECT
((
SELECT
@ -491,7 +579,7 @@
)) AS num
</select>
<select id="findSignforDataByMonth" resultType="java.lang.Integer">
<select id="findSignforDataByMonth" resultType="java.lang.String">
SELECT
(
SELECT
@ -511,7 +599,7 @@
</where>
) AS num
</select>
<select id="findUnSignforDataByDay" resultType="java.lang.Integer">
<select id="findUnSignforDataByDay" resultType="java.lang.String">
SELECT
(
SELECT
@ -533,11 +621,10 @@
</where>
)
</select>
<select id="findUnSignforDataByMonth" resultType="java.lang.Integer">
SELECT
(
<select id="findUnSignforDataByMonth" resultType="java.lang.String">
SELECT
IFNULL( sum( quantity ), 0 )
IFNULL( sum( quantity ), 0 ) AS num
FROM
logpm_distribution_reservation_package AS ldrp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
@ -553,9 +640,8 @@
</foreach>
</if>
</where>
)
</select>
<select id="findClerkSignforNumByDay" resultType="java.lang.Integer">
<select id="findClerkSignforNumByDay" resultType="java.lang.String">
SELECT
count( 1 )
FROM
@ -575,7 +661,7 @@
</if>
</where>
</select>
<select id="findClerkSignforNumByMonth" resultType="java.lang.Integer">
<select id="findClerkSignforNumByMonth" resultType="java.lang.String">
SELECT
count( 1 )
FROM
@ -595,7 +681,7 @@
</if>
</where>
</select>
<select id="findPlanNumByDay" resultType="java.lang.Integer">
<select id="findPlanNumByDay" resultType="java.lang.String">
SELECT
count( 1 )
FROM
@ -612,7 +698,7 @@
</if>
</where>
</select>
<select id="findPlanNumByMonth" resultType="java.lang.Integer">
<select id="findPlanNumByMonth" resultType="java.lang.String">
SELECT
count( 1 )
FROM
@ -629,7 +715,7 @@
</if>
</where>
</select>
<select id="findClerkOverTimeNumByDay" resultType="java.lang.Integer">
<select id="findClerkOverTimeNumByDay" resultType="java.lang.String">
SELECT
count(1) AS num
FROM
@ -650,7 +736,7 @@
</if>
</where>
</select>
<select id="findClerkOverTimeNumByMonth" resultType="java.lang.Integer">
<select id="findClerkOverTimeNumByMonth" resultType="java.lang.String">
SELECT
count(1) AS num
FROM
@ -671,5 +757,167 @@
</if>
</where>
</select>
<select id="findBillLadingSignforByDay" resultType="java.lang.String">
SELECT
count( 1 ) AS num
FROM
logpm_distribution_bill_lading_scan
<where>
is_deleted = 0
AND DATE_FORMAT( create_time, '%y%m%d' ) = DATE_FORMAT(
#{param.dayStr},
'%y%m%d')
<if test="param.warehouseIds != null">
AND warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingSignforByMonth" resultType="java.lang.String">
SELECT
count( 1 ) AS num
FROM
logpm_distribution_bill_lading_scan
<where>
is_deleted = 0
AND DATE_FORMAT( create_time, '%y%m' ) = DATE_FORMAT(
#{param.dayStr},
'%y%m')
<if test="param.warehouseIds != null">
AND warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingUnSignforByDay" resultType="java.lang.String">
SELECT
count( 1 )
FROM
logpm_distrilbution_bill_package AS ldbp
INNER JOIN logpm_distribution_parcel_list AS ldpl ON ldbp.parce_list_id = ldpl.id
<where>
ldbp.is_deleted = 0
AND ldpl.order_package_status != 70
AND DATE_FORMAT( ldbp.create_time, '%y%m%d' ) = DATE_FORMAT( #{param.dayStr}, '%y%m%d' )
<if test="param.warehouseIds != null">
AND ldpl.warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingUnSignforByMonth" resultType="java.lang.String">
SELECT
count( 1 ) AS num
FROM
logpm_distrilbution_bill_package AS ldbp
INNER JOIN logpm_distribution_parcel_list AS ldpl ON ldbp.parce_list_id = ldpl.id
<where>
ldbp.is_deleted = 0
AND ldpl.order_package_status != 70
AND DATE_FORMAT( ldbp.create_time, '%y%m' ) = DATE_FORMAT( #{param.dayStr}, '%y%m' )
<if test="param.warehouseIds != null">
AND ldpl.warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingSignForNumByDay" resultType="java.lang.String">
SELECT
count(1) AS num
FROM
logpm_distrilbution_bill_lading
<where>
is_deleted = 0
AND conditions = 30
AND DATE_FORMAT( create_time, '%y%m%d' ) = DATE_FORMAT( #{param.dayStr}, '%y%m%d' )
<if test="param.warehouseIds != null">
AND warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingOverTimeNumByDay" resultType="java.lang.String">
SELECT
count(1) AS num
FROM
logpm_distrilbution_bill_lading
<where>
is_deleted = 0
AND conditions = 30
AND DATEDIFF (DATE_FORMAT(create_time,"%y%m%d"),DATE_FORMAT(update_time,"%y%m%d")) > 3
<if test="param.warehouseIds != null">
AND warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingSignForNumByMonth" resultType="java.lang.String">
SELECT
count(1) AS num
FROM
logpm_distrilbution_bill_lading
<where>
is_deleted = 0
AND conditions = 30
AND DATE_FORMAT( create_time, '%y%m' ) = DATE_FORMAT( #{param.dayStr}, '%y%m' )
<if test="param.warehouseIds != null">
AND warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingPlanNumByDay" resultType="java.lang.String">
SELECT
count(1) AS num
FROM
logpm_distrilbution_bill_lading
<where>
is_deleted = 0
AND DATE_FORMAT( create_time, '%y%m%d' ) = DATE_FORMAT( #{param.dayStr}, '%y%m%d' )
<if test="param.warehouseIds != null">
AND warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingPlanNumByMonth" resultType="java.lang.String">
SELECT
count(1) AS num
FROM
logpm_distrilbution_bill_lading
<where>
is_deleted = 0
AND DATE_FORMAT( create_time, '%y%m' ) = DATE_FORMAT( #{param.dayStr}, '%y%m' )
<if test="param.warehouseIds != null">
AND warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

198
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java

@ -15,6 +15,7 @@ import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.MathContext;
import java.text.SimpleDateFormat;
import java.util.*;
@ -277,19 +278,34 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexDeliveryDataVO.setTotalVolume(billLadingTotalVolume);
indexDeliveryDataVOList.add(indexDeliveryDataVO);
}
//查询外协信息
IndexDeliveryDataVO indexTripartiteDeliveryDataVO = warehouseIndexMapper.findTripartiteTotal(indexDTO);
if (Func.isNotEmpty(indexTripartiteDeliveryDataVO)) {
//查询外协总件数
Integer tripartiteTotalNum = warehouseIndexMapper.findTripartiteTotalNum(indexDTO);
indexTripartiteDeliveryDataVO.setTotalDeliveryNum(tripartiteTotalNum);
//查询外协总重量
BigDecimal tripartiteTotalWeight = warehouseIndexMapper.findTripartiteTotalWeight(indexDTO);
indexTripartiteDeliveryDataVO.setTotalWeight(tripartiteTotalWeight);
//查询外协总包件体积
BigDecimal tripartiteTotalVolume = warehouseIndexMapper.findTripartiteTotalVolume(indexDTO);
indexTripartiteDeliveryDataVO.setTotalVolume(tripartiteTotalVolume);
indexDeliveryDataVOList.add(indexTripartiteDeliveryDataVO);
//查询商配外协信息
IndexDeliveryDataVO indexTripartiteDeliveryMerchantDataVO = warehouseIndexMapper.findTripartiteTotalByMerchant(indexDTO);
if (Func.isNotEmpty(indexTripartiteDeliveryMerchantDataVO)) {
//查询商配外协总件数
Integer tripartiteTotalNum = warehouseIndexMapper.findTripartiteTotalNumByMerchant(indexDTO);
indexTripartiteDeliveryMerchantDataVO.setTotalDeliveryNum(tripartiteTotalNum);
//查询商配外协总重量
BigDecimal tripartiteTotalWeight = warehouseIndexMapper.findTripartiteTotalWeightByMerchant(indexDTO);
indexTripartiteDeliveryMerchantDataVO.setTotalWeight(tripartiteTotalWeight);
//查询商配外协总包件体积
BigDecimal tripartiteTotalVolume = warehouseIndexMapper.findTripartiteTotalVolumeByMerchant(indexDTO);
indexTripartiteDeliveryMerchantDataVO.setTotalVolume(tripartiteTotalVolume);
indexDeliveryDataVOList.add(indexTripartiteDeliveryMerchantDataVO);
}
//查询市配外协信息
IndexDeliveryDataVO indexTripartiteDeliveryCityDataVO = warehouseIndexMapper.findTripartiteTotalByCity(indexDTO);
if (Func.isNotEmpty(indexTripartiteDeliveryCityDataVO)) {
//查询市配外协总件数
Integer tripartiteTotalNum = warehouseIndexMapper.findTripartiteTotalNumByCity(indexDTO);
indexTripartiteDeliveryCityDataVO.setTotalDeliveryNum(tripartiteTotalNum);
//查询市配外协总重量
BigDecimal tripartiteTotalWeight = warehouseIndexMapper.findTripartiteTotalWeightByCity(indexDTO);
indexTripartiteDeliveryCityDataVO.setTotalWeight(tripartiteTotalWeight);
//查询市配外协总包件体积
BigDecimal tripartiteTotalVolume = warehouseIndexMapper.findTripartiteTotalVolumeByCity(indexDTO);
indexTripartiteDeliveryCityDataVO.setTotalVolume(tripartiteTotalVolume);
indexDeliveryDataVOList.add(indexTripartiteDeliveryCityDataVO);
}
return indexDeliveryDataVOList;
}
@ -304,76 +320,150 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
IndexSignforDataVO indexSignforDayDataVO = new IndexSignforDataVO();
indexSignforDayDataVO.setType(1);
//查询当天签收数据
Integer daySignforNum = warehouseIndexMapper.findSignforDataByDay(indexDTO);
String daySignforNum = warehouseIndexMapper.findSignforDataByDay(indexDTO);
indexSignforDayDataVO.setSignNum(daySignforNum);
//查询当天未签收件数
Integer dayUnSignforNum = warehouseIndexMapper.findUnSignforDataByDay(indexDTO);
String dayUnSignforNum = warehouseIndexMapper.findUnSignforDataByDay(indexDTO);
indexSignforDayDataVO.setUnSignNum(dayUnSignforNum);
//计算签收率
if (daySignforNum > 0 && (daySignforNum + dayUnSignforNum) >0){
Double daySignforScale = (double) (daySignforNum / (daySignforNum + dayUnSignforNum) * 100);
indexSignforDayDataVO.setSignScale(daySignforScale);
}else {
indexSignforDayDataVO.setSignScale(0.00);
if (!"0".equals(daySignforNum) && !"0".equals(dayUnSignforNum) ) {
BigDecimal bd1 = new BigDecimal(daySignforNum);
BigDecimal bd2 = new BigDecimal(dayUnSignforNum);
BigDecimal divide = bd1.divide(bd1.add(bd2),4,BigDecimal.ROUND_HALF_EVEN);
String signScale = divide.toString();
indexSignforDayDataVO.setSignScale(signScale);
}
//查询当天文员复核数
Integer dayClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByDay(indexDTO);
String dayClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByDay(indexDTO);
indexSignforDayDataVO.setClerkSignNum(dayClerkSignforNum);
//查询当天计划数
Integer dayPlanByday = warehouseIndexMapper.findPlanNumByDay(indexDTO);
String dayPlanByday = warehouseIndexMapper.findPlanNumByDay(indexDTO);
//计算文员签收率
if (dayClerkSignforNum > 0 && (dayPlanByday + dayClerkSignforNum)>0){
Double dayClerkSignforScale = (double) (dayClerkSignforNum / (dayPlanByday + dayClerkSignforNum));
indexSignforDayDataVO.setClerkSignforScale(dayClerkSignforScale);
} else {
indexSignforDayDataVO.setClerkSignforScale(0.00);
if (!"0".equals(dayClerkSignforNum) && !"0".equals(dayPlanByday)) {
BigDecimal bd1 = new BigDecimal(dayClerkSignforNum);
BigDecimal bd2 = new BigDecimal(dayPlanByday);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4,BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexSignforDayDataVO.setClerkSignforScale(signScale);
}
//文员超时复核数
Integer dayClerkOverTimeSignfoNum = warehouseIndexMapper.findClerkOverTimeNumByDay(indexDTO);
String dayClerkOverTimeSignfoNum = warehouseIndexMapper.findClerkOverTimeNumByDay(indexDTO);
indexSignforDayDataVO.setClerkOverTimeSignfoNum(dayClerkOverTimeSignfoNum);
indexSignforDayDataVO.setClerkSignNum(dayClerkSignforNum);
list.add(indexSignforDayDataVO);
IndexSignforDataVO indexSignforMonthDataVO = new IndexSignforDataVO();
indexSignforMonthDataVO.setType(2);
//查询当月签收数据
Integer monthSignforNum = warehouseIndexMapper.findSignforDataByMonth(indexDTO);
String monthSignforNum = warehouseIndexMapper.findSignforDataByMonth(indexDTO);
indexSignforMonthDataVO.setSignNum(monthSignforNum);
//查询当月未签收数据
Integer monthUnSignforNum = warehouseIndexMapper.findUnSignforDataByMonth(indexDTO);
String monthUnSignforNum = warehouseIndexMapper.findUnSignforDataByMonth(indexDTO);
indexSignforMonthDataVO.setUnSignNum(monthUnSignforNum);
//计算签收率
if (monthSignforNum > 0 && (monthUnSignforNum + monthSignforNum) > 0){
Double monthSignforScale = (double) (monthSignforNum / (monthUnSignforNum + monthSignforNum));
indexSignforMonthDataVO.setSignScale(monthSignforScale);
}else {
indexSignforMonthDataVO.setSignScale(0.00);
if (!"0".equals(monthSignforNum) &&!"0".equals(monthUnSignforNum)) {
BigDecimal bd1 = new BigDecimal(monthSignforNum);
BigDecimal bd2 = new BigDecimal(monthUnSignforNum);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexSignforMonthDataVO.setSignScale(signScale);
}
//查询当月文员复核数
Integer monthClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByMonth(indexDTO);
String monthClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByMonth(indexDTO);
indexSignforMonthDataVO.setClerkSignNum(monthClerkSignforNum);
Integer monthPlanByday = warehouseIndexMapper.findPlanNumByMonth(indexDTO);
if (monthClerkSignforNum > 0 && (monthPlanByday + monthClerkSignforNum)>0){
Double monthClerkSignforScale = (double) (monthClerkSignforNum / (monthPlanByday + monthClerkSignforNum));
indexSignforMonthDataVO.setClerkSignforScale(monthClerkSignforScale);
}else {
indexSignforMonthDataVO.setClerkSignforScale(0.00);
String monthPlan = warehouseIndexMapper.findPlanNumByMonth(indexDTO);
if (!"0".equals(monthClerkSignforNum) &&!"0".equals(monthPlan)) {
BigDecimal bd1 = new BigDecimal(monthClerkSignforNum);
BigDecimal bd2 = new BigDecimal(monthPlan);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexSignforMonthDataVO.setClerkSignforScale(signScale);
}
//查询当月文员复核
Integer monthClerkOverTimeSignfoNum = warehouseIndexMapper.findClerkOverTimeNumByMonth(indexDTO);
String monthClerkOverTimeSignfoNum = warehouseIndexMapper.findClerkOverTimeNumByMonth(indexDTO);
indexSignforMonthDataVO.setClerkOverTimeSignfoNum(monthClerkOverTimeSignfoNum);
if (monthClerkOverTimeSignfoNum >0 && monthPlanByday>0){
Double monthClerkOverTimeScale = (double) (monthClerkOverTimeSignfoNum / monthPlanByday);
indexSignforMonthDataVO.setClerkOverTimeScale(monthClerkOverTimeScale);
}else {
indexSignforMonthDataVO.setClerkOverTimeScale(0.00);
if (!"0".equals(monthClerkOverTimeSignfoNum) && !"0".equals(monthPlan)) {
BigDecimal bd1 = new BigDecimal(monthClerkOverTimeSignfoNum);
BigDecimal bd2 = new BigDecimal(monthPlan);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexSignforMonthDataVO.setClerkOverTimeScale(signScale);
}
list.add(indexSignforMonthDataVO);
//查询自提相关的签收信息
IndexSignforDataVO indexBillLadingSignforDayDataVO = new IndexSignforDataVO();
indexBillLadingSignforDayDataVO.setType(3);
//查询自提签收包件信息
String dayBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByDay(indexDTO);
indexBillLadingSignforDayDataVO.setSignNum(dayBillLadingSignfor);
//查询自提未签收树
String dayBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByDay(indexDTO);
indexBillLadingSignforDayDataVO.setUnSignNum(dayBillLadingUnSignfor);
//计算当天的签收率
if (!"0".equals(dayBillLadingSignfor) &&!"0".equals(dayBillLadingUnSignfor) ) {
BigDecimal bd1 = new BigDecimal(dayBillLadingSignfor);
BigDecimal bd2 = new BigDecimal(dayBillLadingUnSignfor);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforDayDataVO.setClerkSignforScale(signScale);
}
//查询当天计划数
String dayBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByDay(indexDTO);
//查询当天文员复核数
String dayBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByDay(indexDTO);
indexBillLadingSignforDayDataVO.setClerkSignNum(dayBillLadingSignforNum);
if (!"0".equals(dayBillLadingPlanNum) && !"0".equals(dayBillLadingSignforNum) ) {
//计算当月的超时签收率
BigDecimal bd1 = new BigDecimal(dayBillLadingSignforNum);
BigDecimal bd2 = new BigDecimal(dayBillLadingPlanNum);
BigDecimal multiply = bd1.divide(bd1.add(bd2),1, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforDayDataVO.setClerkOverTimeScale(signScale);
}
//查询当天签收超时数
String dayBillLadingverTimeNum = warehouseIndexMapper.findBillLadingOverTimeNumByDay(indexDTO);
indexBillLadingSignforDayDataVO.setClerkOverTimeSignfoNum(dayBillLadingverTimeNum);
list.add(indexBillLadingSignforDayDataVO);
IndexSignforDataVO indexBillLadingSignforMonthDataVO = new IndexSignforDataVO();
indexBillLadingSignforMonthDataVO.setType(4);
//查询自提当月签收情况
String monthBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByMonth(indexDTO);
indexBillLadingSignforMonthDataVO.setSignNum(monthBillLadingSignfor);
//查询自提当月未签数量
String monthBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByMonth(indexDTO);
indexBillLadingSignforMonthDataVO.setUnSignNum(monthBillLadingUnSignfor);
//计算当月的签收率
if ( !"0".equals(monthBillLadingSignfor) && !"0".equals(monthBillLadingUnSignfor) ) {
BigDecimal bd1 = new BigDecimal(monthBillLadingSignfor);
BigDecimal bd2 = new BigDecimal(monthBillLadingUnSignfor);
BigDecimal multiply = bd1.divide(bd1.add(bd2),4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforMonthDataVO.setSignScale(signScale);
}
//查询当月文员签收数
String monthBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByMonth(indexDTO);
indexBillLadingSignforMonthDataVO.setClerkSignNum(monthBillLadingSignforNum);
//查询当月文员超时签收数
String monthBillLadingOverTimeNum = warehouseIndexMapper.findBillLadingOverTimeNumByDay(indexDTO);
indexBillLadingSignforMonthDataVO.setClerkOverTimeSignfoNum(monthBillLadingOverTimeNum);
//查询当月计划总数
String monthBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByMonth(indexDTO);
if (!"0".equals(monthBillLadingOverTimeNum) && !"0".equals(monthBillLadingPlanNum) ) {
//计算当月的超时签收率
BigDecimal bd1 = new BigDecimal(monthBillLadingOverTimeNum);
BigDecimal bd2 = new BigDecimal(monthBillLadingPlanNum);
BigDecimal multiply = bd1.divide(bd1.add(bd2),1, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforMonthDataVO.setClerkOverTimeScale(signScale);
}
list.add(indexBillLadingSignforMonthDataVO);
return list;
}
}

14
blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java

@ -11,21 +11,21 @@ public class IndexSignforDataVO implements Serializable {
//类型
private Integer type;
//签收数
private Integer signNum;
private String signNum;
//未签收数
private Integer UnSignNum;
private String UnSignNum;
//文员超时为复核数
private Integer clerkOverTimeSignfoNum;
private String clerkOverTimeSignfoNum;
//文员超时为复核数
private Double clerkOverTimeScale;
private String clerkOverTimeScale;
//签收率
private Double signScale;
private String signScale;
//复核率
private Double ClerkSignforScale;
private String ClerkSignforScale;
//复核数
private Integer clerkSignNum;
private String clerkSignNum;

36
blade-service/logpm-trunkline/src/main/resources/application-dev.yml

@ -60,21 +60,21 @@ spring:
url: ${blade.datasource.trunkline.master.url}
username: ${blade.datasource.trunkline.master.username}
password: ${blade.datasource.trunkline.master.password}
627683:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.trunkline.627683.url}
username: ${blade.datasource.trunkline.627683.username}
password: ${blade.datasource.trunkline.627683.password}
703623:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.trunkline.703623.url}
username: ${blade.datasource.trunkline.703623.username}
password: ${blade.datasource.trunkline.703623.password}
# 627683:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.trunkline.627683.url}
# username: ${blade.datasource.trunkline.627683.username}
# password: ${blade.datasource.trunkline.627683.password}
# 703623:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.trunkline.703623.url}
# username: ${blade.datasource.trunkline.703623.username}
# password: ${blade.datasource.trunkline.703623.password}

18
blade-service/logpm-warehouse/src/main/resources/application-dev.yml

@ -68,15 +68,15 @@ spring:
url: ${blade.datasource.warehouse.627683.url}
username: ${blade.datasource.warehouse.627683.username}
password: ${blade.datasource.warehouse.627683.password}
703623:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.warehouse.703623.url}
username: ${blade.datasource.warehouse.703623.username}
password: ${blade.datasource.warehouse.703623.password}
# 703623:
# druid:
# #独立校验配置
# validation-query: select 1
# #oracle校验
# #validation-query: select 1 from dual
# url: ${blade.datasource.warehouse.703623.url}
# username: ${blade.datasource.warehouse.703623.username}
# password: ${blade.datasource.warehouse.703623.password}
xxl:
job:
accessToken: ''

Loading…
Cancel
Save