预约单列表与确认
This commit is contained in:
@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -15,6 +17,7 @@ import java.util.List;
|
||||
* @description:
|
||||
* @create: 2026-01-26 10:50
|
||||
*/
|
||||
@Data
|
||||
public class OmsOrderDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
@@ -26,6 +29,16 @@ public class OmsOrderDTO {
|
||||
//
|
||||
// @ApiModelProperty(value = "运距(千米)")
|
||||
// private BigDecimal haulDistance;
|
||||
@ApiModelProperty(value = "订单开始时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createStartTime;
|
||||
@ApiModelProperty(value = "订单结束时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createEndTime;
|
||||
@ApiModelProperty("货源单号")
|
||||
private String goodsNumber;
|
||||
@ApiModelProperty(value = "装货地县区编码",required = true)
|
||||
private String loadingAreaId="";
|
||||
@ApiModelProperty(value = "装货地详细地址")
|
||||
@@ -473,5 +486,305 @@ public class OmsOrderDTO {
|
||||
|
||||
@ApiModelProperty("费用科目明细")
|
||||
private List<OmsOrderAccount> tmsOrderAccountList;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String loadingName;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String loadingUnit;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String unloadName;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String goodsUntis;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String transportationName;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String carTypeName;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String serviceRequire;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isSource;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date sourceCloseTime;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String executorId;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isDelete;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String lineTitleLeft;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String lineTitleRight;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String sysOrgCode;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isCommon;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String goodsTypeMajor;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long auditStatus;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal collectedFreight;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal uncollectedFreight;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal collectLessFreight;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String auditBy;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String businessType;
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String createrName;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String createrPhone;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isElectricFence;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String wxaQrcode;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String createUserId;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isStatus;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String signatureAddress;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String qrCodeImgUrl;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String dispatchOrderNumber;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String appointDriverEnterpriseId;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String appointDriverEnterprise;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String cancelOrderRemark;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String orderDriverId;
|
||||
|
||||
|
||||
@ApiModelProperty("业务单状态 0-待审核 1-待执行 2-进行中 3-已完成 4-已取消 5-已拦截")
|
||||
private Long orderStatus;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long splicingOrderType;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long splicingStatus;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String mainOrderId;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String mainOrderNum;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String mergeOrderId;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String mergeOrderNum;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long infoFeeStatus;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String infoFeeDocumentNumber;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long settlementStatus;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date settlementTime;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date paymentTime;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String reconciliationInnerNumber;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String receivePaymentNumber;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String invoiceId;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isInvoice;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long biddingStatus;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String biddingRemarks;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal cargoInsuranceAmount;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String destination;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal freightCharges;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String payer;
|
||||
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String goodsCategory;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty( "审核状态 0-未审核 1-审核通过 2-已驳回")
|
||||
private Long reviewStatus;
|
||||
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reviewTime;
|
||||
|
||||
@ApiModelProperty("审核人id")
|
||||
private Long reviewId;
|
||||
|
||||
@ApiModelProperty("审核人")
|
||||
private String review;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long EXECUTE_STATUS;
|
||||
|
||||
@ApiModelProperty( "执行状态 0-无状态 1-未执行 2-已执行 3-已下发")
|
||||
private Long executeStatus;
|
||||
|
||||
@ApiModelProperty("执行时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date executeTime;
|
||||
|
||||
@ApiModelProperty("执行人id")
|
||||
private Long executeId;
|
||||
|
||||
@ApiModelProperty("审核人")
|
||||
private String executor;
|
||||
|
||||
@ApiModelProperty("业务单id")
|
||||
private Long businesssOrderId ;
|
||||
|
||||
@ApiModelProperty("业务单号")
|
||||
private String businessOrderNumber;
|
||||
}
|
||||
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.mhd.oms.interfaces.facade.resevationOrder;
|
||||
|
||||
import com.mhd.oms.domain.businessDocumentOrder.repository.po.BusinessDocumentOrderPO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量确认预约单结果
|
||||
*/
|
||||
@Data
|
||||
public class BatchConfirmResult {
|
||||
|
||||
/**
|
||||
* 成功确认的业务单列表
|
||||
*/
|
||||
private List<BusinessDocumentOrderPO> successList;
|
||||
|
||||
/**
|
||||
* 确认失败的预约单及错误信息
|
||||
*/
|
||||
private List<FailItem> failList;
|
||||
|
||||
/**
|
||||
* 总处理数量
|
||||
*/
|
||||
private int total;
|
||||
|
||||
/**
|
||||
* 成功数量
|
||||
*/
|
||||
private int successCount;
|
||||
|
||||
/**
|
||||
* 失败数量
|
||||
*/
|
||||
private int failCount;
|
||||
|
||||
/**
|
||||
* 失败项
|
||||
*/
|
||||
@Data
|
||||
public static class FailItem {
|
||||
/**
|
||||
* 预约单号
|
||||
*/
|
||||
private String goodsNumber;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
private String errorMsg;
|
||||
|
||||
public FailItem() {}
|
||||
|
||||
public FailItem(String goodsNumber, String errorMsg) {
|
||||
this.goodsNumber = goodsNumber;
|
||||
this.errorMsg = errorMsg;
|
||||
}
|
||||
}
|
||||
|
||||
public BatchConfirmResult() {
|
||||
this.total = 0;
|
||||
this.successCount = 0;
|
||||
this.failCount = 0;
|
||||
}
|
||||
}
|
||||
+46
-6
@@ -3,19 +3,22 @@ package com.mhd.oms.interfaces.facade.resevationOrder;
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.mhd.common.core.utils.sms.CommonConstant;
|
||||
import com.mhd.common.core.utils.sms.Result;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.reservationOrder.repository.facade.IOmsAddressMultiService;
|
||||
import com.mhd.oms.domain.reservationOrder.repository.po.ReservationOrderPO;
|
||||
import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAddDTO;
|
||||
import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderDTO;
|
||||
import com.mhd.system.api.domain.TmsTransportNote;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
//import static com.mhd.common.core.utils.PageUtils.startPage;
|
||||
|
||||
/**
|
||||
* @author: brb
|
||||
@@ -25,7 +28,7 @@ import javax.annotation.Resource;
|
||||
@RestController
|
||||
@RequestMapping("/resevationOrderApi")
|
||||
@Slf4j
|
||||
public class ResevationOrderApi {
|
||||
public class ResevationOrderApi extends BaseController{
|
||||
|
||||
@Resource
|
||||
private IOmsAddressMultiService omsAddressMultiService;
|
||||
@@ -78,5 +81,42 @@ public class ResevationOrderApi {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询【业务单】列表
|
||||
*/
|
||||
@ApiOperation("查询【预约单】列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OmsOrderDTO omsOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
startPage();
|
||||
List<ReservationOrderPO> list = omsAddressMultiService.queryList(omsOrderDTO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量确认预约单,生成业务单
|
||||
*/
|
||||
@ApiOperation("批量确认预约单")
|
||||
@PostMapping("/batchConfirm")
|
||||
public Result<?> batchConfirm(@RequestBody List<String> goodsNumbers) {
|
||||
Result<?> result = new Result<>();
|
||||
try {
|
||||
if (goodsNumbers == null || goodsNumbers.isEmpty()) {
|
||||
result.error500("预约单号列表不能为空");
|
||||
return result;
|
||||
}
|
||||
|
||||
// 调用服务层方法 - 现在服务层直接返回Result
|
||||
return omsAddressMultiService.batchConfirmReservationOrder(goodsNumbers);
|
||||
} catch (ServiceException e) {
|
||||
result.error500("批量确认失败: " + e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
result.error500("批量确认失败: " + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user