Commit ac090024 authored by libin's avatar libin

旅游核销

parent 994d032c
......@@ -3,7 +3,7 @@ package com.xxfc.platform.tour.vo;
import com.github.wxiaoqi.security.common.vo.PageParam;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
......@@ -19,19 +19,19 @@ public class TourGoodOrderFindVo extends PageParam {
/**
* 公司id
*/
@NotEmpty(message = "公司id不能为空")
@NotNull(message = "公司id不能为空")
private Integer companyId;
/**
* 订单状态
*/
@NotEmpty(message = "订单状态不能为空")
@NotNull(message = "订单状态不能为空")
private Integer orderStatus;
/**
*出发时间
*/
@NotEmpty(message = "出发时间不断能空")
@NotNull(message = "出发时间不断能空")
private Date trvaelTime;
private String travelDate;
......
package com.xxfc.platform.tour.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......@@ -18,6 +21,7 @@ import java.util.Date;
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("旅游订单vo")
public class TourGoodOrderVo implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -25,50 +29,60 @@ public class TourGoodOrderVo implements Serializable {
/**
* 核销订单id
*/
@ApiModelProperty("核销订单id")
private Integer id;
/**
* 商品名称
*/
@ApiModelProperty("商品名称")
private String name;
/**
* 封面
*/
@ApiModelProperty("封面")
private String coverUrl;
/**
* 出行时间
*/
@ApiModelProperty("出行时间")
private String travelTime;
/**
* 总人数
*/
@ApiModelProperty("总人数")
private int headcount;
/**
* 上车人数
* 上车人数
*/
@ApiModelProperty("已上车人数")
private int tripOfNum;
/**
* 上车人数
* 上车人数
*/
@ApiModelProperty("未上车人数")
private int leaveOfnum;
/**
* 是否出行 '状态:0-未出行;1-已出行'
*/
@ApiModelProperty("出行与否")
private Integer travelStatus;
/**
* 开始出行日期
*/
@JsonIgnore
private Date startDate;
/**
* 开始出行时间
*/
private Date startTime;
@JsonIgnore
private Long startTime;
}
......@@ -32,6 +32,4 @@ public class TourApplication {
public static void main(String[] args) {
SpringApplication.run(TourApplication.class, args);
}
}
......@@ -9,6 +9,7 @@ import com.xxfc.platform.tour.entity.TourGoodVerification;
import com.xxfc.platform.tour.mapper.TourGoodVerificationMapper;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import java.time.LocalTime;
import java.util.*;
/**
......@@ -49,7 +50,15 @@ public class TourGoodVerificationBiz extends BaseBiz<TourGoodVerificationMapper,
tourGoodOrderVos.stream().peek(tourGoodOrderVo -> {
tourGoodOrderVo.setLeaveOfnum(tourGoodOrderVo.getHeadcount()-tourGoodOrderVo.getTripOfNum());
String startDateStr = DateUtil.format(tourGoodOrderVo.getStartDate(),"YYYY.MM.dd");
tourGoodOrderVo.setTravelTime(startDateStr);
tourGoodOrderVo.setTravelTime(startDateStr);
Long startTime = tourGoodOrderVo.getStartTime();
if (null!=startTime){
LocalTime localTime = LocalTime.ofSecondOfDay(startTime);
String timeStr = String.format("%s:%s:%s",localTime.getHour()==0?"00":localTime.getHour(),
localTime.getMinute()==0?"00":localTime.getMinute(),localTime.getSecond()==0?"00":localTime.getSecond());
tourGoodOrderVo.setTravelTime(String.format("%s %s",tourGoodOrderVo.getTravelTime(),timeStr));
}
}).count();
return tourGoodOrderVoPageDataVO;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment