Browse Source

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

fix-sign
pref_mail@163.com 5 months ago
parent
commit
e8d0eb3017
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  2. 4
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/service/impl/DeliveryNoteServiceImpl.java
  3. 28
      blade-service/logpm-report/src/main/java/com/logpm/report/config/ReportExceptionHandler.java
  4. 13
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java

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

@ -1730,6 +1730,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
loadscanEntity.setTrainNumber(distributionDeliveryListEntity.getTrainNumber());
loadscanEntity.setPackageNub(parcelListEntity.getQuantity());
loadscanEntity.setLoadedNub(parcelListEntity.getQuantity());
loadscanEntity.setWarehouseId(myCurrentWarehouse.getId());
loadscanEntity.setWarehouseName(myCurrentWarehouse.getName());
loadscanEntity.setScanTime(now);
if (StringUtils.isNotBlank(finalDistributionDeliverySelfEntity.getDriverPhone())) {
loadscanEntity.setDriverPhone(finalDistributionDeliverySelfEntity.getDriverPhone());

4
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/service/impl/DeliveryNoteServiceImpl.java

@ -199,9 +199,9 @@ public class DeliveryNoteServiceImpl extends BaseServiceImpl<DeliveryNoteMapper,
advanceDetailEntity.setFirstPackName(orderPackageDTO.getType());
// 获取映射志邦映射品类信息
// 二级品类名称
advanceDetailEntity.setSecondPackName(orderPackageDTO.getMaterialCategory());
advanceDetailEntity.setSecondPackName(StrUtil.isNotEmpty(orderPackageDTO.getMaterialCategory()) ? orderPackageDTO.getMaterialCategory() : orderPackageDTO.getType());
// 三级品类名称
advanceDetailEntity.setThirdPackName(orderPackageDTO.getMaterialCategory());
advanceDetailEntity.setThirdPackName(StrUtil.isNotEmpty(orderPackageDTO.getMaterialCategory()) ? orderPackageDTO.getMaterialCategory() : orderPackageDTO.getType());
// advanceDetailEntity.setMaterialName(orderPackageDTO.getMaterialCategory());
advanceDetailEntity.setSiteName("");

28
blade-service/logpm-report/src/main/java/com/logpm/report/config/ReportExceptionHandler.java

@ -0,0 +1,28 @@
package com.logpm.report.config;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tenant.exception.TenantDataSourceException;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.api.ResultCode;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
/**
* @Author: zqb
* @Date: 2024/11/13
*/
@ControllerAdvice
@Slf4j
public class ReportExceptionHandler {
@ExceptionHandler(TenantDataSourceException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public ResponseEntity<Object> handleCustomException(TenantDataSourceException e) {
String errorMessage = e.getMessage();
return new ResponseEntity<>(R.fail(ResultCode.FAILURE.getCode(),errorMessage), HttpStatus.BAD_REQUEST);
}
}

13
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java

@ -40,7 +40,6 @@ import org.apache.poi.ss.formula.functions.T;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Condition;
import org.springframework.beans.factory.annotation.Autowired;
@ -483,16 +482,16 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
if (ObjectUtil.isNotEmpty(query.getStartTaskTime()) || ObjectUtil.isNotEmpty(query.getEndTaskTime())) {
boolean withinOneMonth = DateUtil.between(query.getStartTaskTime(), query.getEndTaskTime(), DateUnit.DAY) <= 30;
if (!withinOneMonth) {
throw new CustomerException(5000, "配送日期必选且时间不超过一个月");
throw new ServiceException("配送日期必选且时间不超过一个月");
}
} else {
if (ObjectUtil.isNotEmpty(query.getStartSjsigningTime()) || ObjectUtil.isNotEmpty(query.getEndSjsigningTime())) {
boolean withinOneMonth = DateUtil.between(query.getStartSjsigningTime(), query.getEndSjsigningTime(), DateUnit.DAY) <= 30;
if (!withinOneMonth) {
throw new CustomerException(5000, "签收日期必选且时间不超过一个月");
throw new ServiceException("签收日期必选且时间不超过一个月");
}
} else {
throw new CustomerException(5000, "导出时配送日期必填");
throw new ServiceException("导出时配送日期必填");
}
}
}
@ -503,16 +502,16 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
if (ObjectUtil.isNotEmpty(query.getStartTaskTime()) || ObjectUtil.isNotEmpty(query.getEndTaskTime())) {
boolean withinOneMonth = DateUtil.between(query.getStartTaskTime(), query.getEndTaskTime(), DateUnit.DAY) <= 7;
if (!withinOneMonth) {
throw new CustomerException(5000, "配送日期必选且时间不超过7天");
throw new ServiceException("配送日期必选且时间不超过7天");
}
} else {
if (ObjectUtil.isNotEmpty(query.getStartSjsigningTime()) || ObjectUtil.isNotEmpty(query.getEndSjsigningTime())) {
boolean withinOneMonth = DateUtil.between(query.getStartSjsigningTime(), query.getEndSjsigningTime(), DateUnit.DAY) <= 7;
if (!withinOneMonth) {
throw new CustomerException(5000, "签收日期必选且时间不超过7天 ");
throw new ServiceException("签收日期必选且时间不超过7天 ");
}
} else {
throw new CustomerException(5000, "导出时配送日期必填");
throw new ServiceException("导出时配送日期必填");
}
}

Loading…
Cancel
Save