ソースを参照

iaw 小程序订单查询修改

master
chenchaod 1ヶ月前
コミット
3c57ceba31

+ 4
- 0
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/dto/issue/order/OrderDetailResDto.java ファイルの表示

@@ -1,6 +1,7 @@
package cn.com.taiji.iaw.dto.issue.order;

import cn.com.taiji.core.entity.issue.IssueOrderinfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
@@ -11,4 +12,7 @@ import lombok.Data;
*/
@Data
public class OrderDetailResDto extends IssueOrderinfo {

@ApiModelProperty(value = "是否可以评价")
private Boolean canEvaluate;
}

+ 269
- 0
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/dto/issue/order/OrderMinPageModel.java ファイルの表示

@@ -0,0 +1,269 @@
package cn.com.taiji.iaw.dto.issue.order;

import cn.com.taiji.core.entity.dict.basic.*;
import cn.com.taiji.core.entity.dict.issue.IssueOrderStatus;
import cn.com.taiji.core.entity.dict.issue.IssueOrderStep;
import cn.com.taiji.core.entity.dict.issue.ShippingStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.time.LocalDateTime;

/**
* @Author:ChenChao
* @Date:2025/7/18 9:33
* @Filename:OrderMinPageResDTO
* @description:
*/
@Data
@ApiModel(description = "小程序分页Model响应")
public class OrderMinPageModel {

@ApiModelProperty(value = "订单编号")
private String orderNo;//订单编号

@ApiModelProperty(value = "订单来源")
private SourceType orderSource;//订单来源

@ApiModelProperty(value = "网点编号")
private String channelId;//网点编号

@ApiModelProperty(value = "发行渠道")
private String agencyId;//发行渠道

@ApiModelProperty(value = "扣款渠道")
private String accountId;//扣款渠道

@ApiModelProperty(value = "订单阶段")
private IssueOrderStep orderStep;//订单阶段

@ApiModelProperty(value = "货物状态")
private ShippingStatus shippingStatus;//货物状态

/*private String issueStatus;//激活状态*/

@ApiModelProperty(value = "订单状态")
private IssueOrderStatus orderStatus;//订单状态

@ApiModelProperty(value = "用户类型 个人用户、单位用户、其他")
private UserType userType;//用户类型 个人用户、单位用户、其他

@ApiModelProperty(value = "客货类型 1-客车 2-货车 3-专项作业车")
private Integer vanType;//客货类型 1-客车 2-货车 3-专项作业车

@ApiModelProperty(value = "用户openid,无值填-1")
private String userId;//用户openid,无值填-1

@ApiModelProperty(value = "业务员openid,无值填-1")
private String staffOpenId;//业务员openid,无值填-1

/*private String accountCapitalId;//统一会员平台资金账户*/

@ApiModelProperty(value = "领取状态")
private Boolean receiveStatus;//领取状态

@ApiModelProperty(value = "领取人")
private String receiver;//领取人

@ApiModelProperty(value = "领取时间")
private LocalDateTime receiveTime;//领取时间

@ApiModelProperty(value = "订单审核人")
private String auditOpenId;//订单审核人

@ApiModelProperty(value = "订单审核时间")
private LocalDateTime auditTime;//订单审核时间

@ApiModelProperty(value = "是否被人工审核 1:人工 2:系统 0:未审核")
private Integer artificialStatus;//是否被人工审核 1:人工 2:系统 0:未审核

@ApiModelProperty(value = "产品编号")
private String productId;//产品编号

@ApiModelProperty(value = "产品名称")
private String productName;//产品名称

@ApiModelProperty(value = "产品协议编号")
private String productAgreeNo;//产品协议编号

@ApiModelProperty(value = "产品类型 1:自营产品、0:非自营产品")
private Integer productTypes;//产品类型 1:自营产品、0:非自营产品

@ApiModelProperty(value = "推广模式(1--线上, 2---线下,3:线上和线下)")
private Integer promotionModes;//推广模式(1--线上, 2---线下,3:线上和线下)

@ApiModelProperty(value = "权益产品")
private String equityId;//权益产品

@ApiModelProperty(value = "权益名称")
private String equityName;//权益名称

@ApiModelProperty(value = "订单金额(创建订单时的产品金额)")
private Long amount;//订单金额(创建订单时的产品金额)

@ApiModelProperty(value = "是否需要支付")
private Boolean needPay;// 是否需要支付

/*private Integer agreementStatus;//签约状态*/

@ApiModelProperty(value = "签约启用时间")
private LocalDateTime agreementEnableTime;//签约启用时间

@ApiModelProperty(value = "签约协议编号")
private String agreementId;//签约协议编号,暂时和车签约,字段值其实是微信openId或支付宝openId,渠道签约结果通知,不知传的啥玩意

@ApiModelProperty(value = "卡类型")
private CardType cardType;//卡类型

//private Integer cardType;//卡类型 2:储值卡 1:记账卡 3:预存卡

@ApiModelProperty(value = "卡号")
private String cardId;//卡号

@ApiModelProperty(value = "etc卡状态")
private CardStatus cardStatus;//etc卡状态

@ApiModelProperty(value = "卡启用时间")
private LocalDateTime cardEnableTime;//卡启用时间

@ApiModelProperty(value = "卡到期时间")
private LocalDateTime cardExpireTime;//卡到期时间

@ApiModelProperty(value = "签号")
private String obuId;//签号

@ApiModelProperty(value = "obu状态")
private ObuStatus obuStatus;//obu状态

@ApiModelProperty(value = "obu启用时间")
private LocalDateTime obuEnableTime;//obu启用时间

@ApiModelProperty(value = "obu到期时间")
private LocalDateTime obuExpireTime;//obu到期时间

@ApiModelProperty(value = "订单激活时间")
private LocalDateTime activationTime;//订单激活时间

@ApiModelProperty(value = "邮寄时间")
private LocalDateTime deliveryTime;//邮寄时间

@ApiModelProperty(value = "支付时间")
private LocalDateTime payTime;//支付时间

@ApiModelProperty(value = "订单取消时间")
private LocalDateTime cancelTime;//订单取消时间

@ApiModelProperty(value = "订单收货时间")
private LocalDateTime receivingTime;//订单收货时间

@ApiModelProperty(value = "退货时间")
private LocalDateTime returnGoodsTime;//退货时间

@ApiModelProperty(value = "用户唯一id")
private String customerId;//用户唯一id

@ApiModelProperty(value = "用户证件类型")
private IdType customerIdType;//用户证件类型

@ApiModelProperty(value = "用户证件号")
private String customerIdNum;//用户证件号

@ApiModelProperty(value = "用户名称")
private String customerName;//用户名称

@Enumerated(EnumType.STRING)
@ApiModelProperty(value = "客户性别")
private Gender customerGender;

@ApiModelProperty(value = "联系方式")
private String customerTel;//联系方式

@ApiModelProperty(value = "身份证有效期")
private String customerIdVld;//身份证有效期

/*private Integer customerStatus;//用户提交状态*/

@ApiModelProperty(value = "经办人证件类型")
private IdType agentIdType;//经办人证件类型

@ApiModelProperty(value = "经办人证件号")
private String agentIdNum;//经办人证件号

@ApiModelProperty(value = "经办人姓名")
private String agentName;//经办人姓名

@ApiModelProperty(value = "车辆编号")
private String vehicleId;//车辆编号

@ApiModelProperty(value = "车牌号")
private String vehiclePlate;//车牌号

@ApiModelProperty(value = "车牌颜色")
private Integer vehiclePlateColor;//车牌颜色

@ApiModelProperty(value = "车型,收费车型,对应vehicle.type")
private Integer vehicleClass;//车型,收费车型,对应vehicle.type

@ApiModelProperty(value = "车辆类型(驾驶证上的汉字)")
private String vehicleType;//车辆类型(驾驶证上的汉字)

@ApiModelProperty(value = "车轴数")
private Integer vehicleAxleCount;//车轴数

@ApiModelProperty(value = "车主名称")
private String ownerName;//车主名称

@ApiModelProperty(value = "车主证件号")
private String ownerIdNum;//车主证件号

@ApiModelProperty(value = "车主证件类型")
private IdType ownerIdType;//车主证件类型

/*private Integer vehicleStatus;//车辆提交状态
private Boolean whetherToMail;//是否邮寄 与shippingStatus冲突*/

@ApiModelProperty(value = "是否领取卡券")
private Boolean couponStatus;//是否领取卡券

@ApiModelProperty(value = "是否迁移数据0_否,1_是")
private Integer migrateData;//是否迁移数据0_否,1_是

/*private Integer invoiceType;//发票类型*/

@ApiModelProperty(value = "设备类型")
private SecretKeyType deviceType;//设备类型

@ApiModelProperty(value = "插入时间")
private LocalDateTime insertTime;

@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;

@ApiModelProperty(value = "渠道订单编号")
private String qdOrderNo;

@ApiModelProperty(value = "是否同意协议:1:是")
private String protocol; // 是否同意协议:1:是

/*private String receiveId;// 领取人*/

@ApiModelProperty(value = "消息通知地址,渠道订单使用")
private String returnUrl;// 消息通知地址,渠道订单使用

@ApiModelProperty(value = "电商平台")
private Integer platformSource;// 电商平台

@ApiModelProperty(value = "渠道支付成功后保存微信openid")
private String wxOpenedId;//渠道支付成功后保存微信openid

@ApiModelProperty(value = "H5提交车辆信息后跳转地址")
private String h5ReturnQdUrl;//H5提交车辆信息后跳转地址

@ApiModelProperty(value = "安心签文件地址")
private String protocolUrl;//安心签文件地址

@ApiModelProperty(value = "是否可以评价")
private Boolean canEvaluate;
}

+ 32
- 1
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/issue/IssueOrderManageImpl.java ファイルの表示

@@ -5,6 +5,7 @@ import cn.com.taiji.common.manager.ManagerException;
import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.com.taiji.common.model.dao.Pagination;
import cn.com.taiji.common.valid.ViolationValidator;
import cn.com.taiji.core.entity.comm.CommonSatisfaction;
import cn.com.taiji.core.entity.dict.EnableStatus;
import cn.com.taiji.core.entity.dict.basic.IdType;
import cn.com.taiji.core.entity.dict.basic.SourceType;
@@ -21,6 +22,7 @@ import cn.com.taiji.core.model.comm.protocol.inss.inst.InstApplyRequest;
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstApplyResponse;
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstCallBackRequest;
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstCallBackResponse;
import cn.com.taiji.core.repo.jpa.comm.SatisfactionRepo;
import cn.com.taiji.core.repo.jpa.issue.*;
import cn.com.taiji.core.repo.jpa.user.StaffRepo;
import cn.com.taiji.iaw.dto.issue.order.*;
@@ -60,13 +62,31 @@ public class IssueOrderManageImpl extends AbstractIawManager implements IssueOrd
private IssueAgreementAddressRepo issueAgreementAddressRepo;
@Autowired
private MinioUtil minioUtil;
@Autowired
private SatisfactionRepo satisfactionRepo;

@Override
public Pagination mOrderPage(OrderMinPageReqDTO reqDto) throws ServiceHandleException {
IssueOrdermPageRequest request = copyProperties(reqDto, new IssueOrdermPageRequest());
String openId = findOpenIdByToken(reqDto.getAccessToken());
request.setOpenId(openId);
return issueOrderinfoRepo.page(request);
return issueOrderinfoRepo.page(request).convertResult(this::cover);
}

private OrderMinPageModel cover(IssueOrderinfo o) {
OrderMinPageModel orderMinPageModel = copyProperties(o, new OrderMinPageModel());
//暂定只有激活完成的可以评价
if (IssueOrderStep.ACTIVED.equals(o.getOrderStep())) {
CommonSatisfaction satisfaction = satisfactionRepo.findByOrderNo(o.getOrderNo());
if (satisfaction == null) {
orderMinPageModel.setCanEvaluate(true);
}else {
orderMinPageModel.setCanEvaluate(false);
}
}else {
orderMinPageModel.setCanEvaluate(false);
}
return orderMinPageModel;
}

@Override
@@ -294,6 +314,17 @@ public class IssueOrderManageImpl extends AbstractIawManager implements IssueOrd
public OrderDetailResDto orderDetailQuery(OrderDetailReqDto reqDto) throws ManagerException {
IssueOrderinfo orderinfo = checkOrder(reqDto.getOrderNo());
OrderDetailResDto resDto = copyProperties(orderinfo, new OrderDetailResDto());
//暂定只有激活完成的可以评价
if (IssueOrderStep.ACTIVED.equals(orderinfo.getOrderStep())) {
CommonSatisfaction satisfaction = satisfactionRepo.findByOrderNo(orderinfo.getOrderNo());
if (satisfaction == null) {
resDto.setCanEvaluate(true);
}else {
resDto.setCanEvaluate(false);
}
}else {
resDto.setCanEvaluate(false);
}
return resDto;
}


読み込み中…
キャンセル
保存