Commit ac090024 authored by libin's avatar libin

旅游核销

parent 994d032c
...@@ -3,7 +3,7 @@ package com.xxfc.platform.tour.vo; ...@@ -3,7 +3,7 @@ package com.xxfc.platform.tour.vo;
import com.github.wxiaoqi.security.common.vo.PageParam; import com.github.wxiaoqi.security.common.vo.PageParam;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull;
import java.util.Date; import java.util.Date;
/** /**
...@@ -19,19 +19,19 @@ public class TourGoodOrderFindVo extends PageParam { ...@@ -19,19 +19,19 @@ public class TourGoodOrderFindVo extends PageParam {
/** /**
* 公司id * 公司id
*/ */
@NotEmpty(message = "公司id不能为空") @NotNull(message = "公司id不能为空")
private Integer companyId; private Integer companyId;
/** /**
* 订单状态 * 订单状态
*/ */
@NotEmpty(message = "订单状态不能为空") @NotNull(message = "订单状态不能为空")
private Integer orderStatus; private Integer orderStatus;
/** /**
*出发时间 *出发时间
*/ */
@NotEmpty(message = "出发时间不断能空") @NotNull(message = "出发时间不断能空")
private Date trvaelTime; private Date trvaelTime;
private String travelDate; private String travelDate;
......
package com.xxfc.platform.tour.vo; 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.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -18,6 +21,7 @@ import java.util.Date; ...@@ -18,6 +21,7 @@ import java.util.Date;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@ApiModel("旅游订单vo")
public class TourGoodOrderVo implements Serializable { public class TourGoodOrderVo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -25,50 +29,60 @@ public class TourGoodOrderVo implements Serializable { ...@@ -25,50 +29,60 @@ public class TourGoodOrderVo implements Serializable {
/** /**
* 核销订单id * 核销订单id
*/ */
@ApiModelProperty("核销订单id")
private Integer id; private Integer id;
/** /**
* 商品名称 * 商品名称
*/ */
@ApiModelProperty("商品名称")
private String name; private String name;
/** /**
* 封面 * 封面
*/ */
@ApiModelProperty("封面")
private String coverUrl; private String coverUrl;
/** /**
* 出行时间 * 出行时间
*/ */
@ApiModelProperty("出行时间")
private String travelTime; private String travelTime;
/** /**
* 总人数 * 总人数
*/ */
@ApiModelProperty("总人数")
private int headcount; private int headcount;
/** /**
* 上车人数 * 上车人数
*/ */
@ApiModelProperty("已上车人数")
private int tripOfNum; private int tripOfNum;
/** /**
* 上车人数 * 上车人数
*/ */
@ApiModelProperty("未上车人数")
private int leaveOfnum; private int leaveOfnum;
/** /**
* 是否出行 '状态:0-未出行;1-已出行' * 是否出行 '状态:0-未出行;1-已出行'
*/ */
@ApiModelProperty("出行与否")
private Integer travelStatus; private Integer travelStatus;
/** /**
* 开始出行日期 * 开始出行日期
*/ */
@JsonIgnore
private Date startDate; private Date startDate;
/** /**
* 开始出行时间 * 开始出行时间
*/ */
private Date startTime; @JsonIgnore
private Long startTime;
} }
...@@ -32,6 +32,4 @@ public class TourApplication { ...@@ -32,6 +32,4 @@ public class TourApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(TourApplication.class, args); SpringApplication.run(TourApplication.class, args);
} }
} }
...@@ -9,6 +9,7 @@ import com.xxfc.platform.tour.entity.TourGoodVerification; ...@@ -9,6 +9,7 @@ import com.xxfc.platform.tour.entity.TourGoodVerification;
import com.xxfc.platform.tour.mapper.TourGoodVerificationMapper; import com.xxfc.platform.tour.mapper.TourGoodVerificationMapper;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import java.time.LocalTime;
import java.util.*; import java.util.*;
/** /**
...@@ -49,7 +50,15 @@ public class TourGoodVerificationBiz extends BaseBiz<TourGoodVerificationMapper, ...@@ -49,7 +50,15 @@ public class TourGoodVerificationBiz extends BaseBiz<TourGoodVerificationMapper,
tourGoodOrderVos.stream().peek(tourGoodOrderVo -> { tourGoodOrderVos.stream().peek(tourGoodOrderVo -> {
tourGoodOrderVo.setLeaveOfnum(tourGoodOrderVo.getHeadcount()-tourGoodOrderVo.getTripOfNum()); tourGoodOrderVo.setLeaveOfnum(tourGoodOrderVo.getHeadcount()-tourGoodOrderVo.getTripOfNum());
String startDateStr = DateUtil.format(tourGoodOrderVo.getStartDate(),"YYYY.MM.dd"); 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(); }).count();
return tourGoodOrderVoPageDataVO; 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