Переглянути джерело

团队订房,批次处理

qh 2 роки тому
батько
коміт
9e80d76267

+ 77 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/entity/BusBookingBatch.java

@@ -60,4 +60,81 @@ public class BusBookingBatch implements Serializable {
 	@Excel(name = "关联的订单团队预定订单id", width = 15)
     @ApiModelProperty(value = "关联的订单团队预定订单id")
     private String bookingOrdersId;
+
+
+    /**早餐数量*/
+    @Excel(name = "早餐数量", width = 15)
+    @ApiModelProperty(value = "早餐数量")
+    private Integer breakfastNum;
+    /**午餐数量*/
+    @Excel(name = "午餐数量", width = 15)
+    @ApiModelProperty(value = "午餐数量")
+    private Integer lunchNum;
+    /**晚餐数量*/
+    @Excel(name = "晚餐数量", width = 15)
+    @ApiModelProperty(value = "晚餐数量")
+    private Integer dinnerNum;
+    /**客人类型;1、散客;2、会员;3、协议单位;4、中介*/
+    @Excel(name = "客人类型;1、散客;2、会员;3、协议单位;4、中介", width = 15)
+    @ApiModelProperty(value = "客人类型;1、散客;2、会员;3、协议单位;4、中介")
+    private Integer customerType;
+    /**客人类型为会员时的会员id*/
+    @Excel(name = "客人类型为会员时的会员id", width = 15)
+    @ApiModelProperty(value = "客人类型为会员时的会员id")
+    private String vipCustomerId;
+
+    /**客人类型为协议单位时的协议单位id*/
+    @Excel(name = "客人类型为协议单位时的协议单位id", width = 15)
+    @ApiModelProperty(value = "客人类型为协议单位时的协议单位id")
+    private String contractTeamId;
+    /**选择协议单位之后选择协议合同的id*/
+    @Excel(name = "选择协议单位之后选择协议合同的id", width = 15)
+    @ApiModelProperty(value = "选择协议单位之后选择协议合同的id")
+    private String contractTeamProtocolId;
+
+    /**房价方案ID*/
+    @Excel(name = "房价方案ID", width = 15)
+    @ApiModelProperty(value = "房价方案ID")
+    private String roomPriceSlnId;
+    /**中介名称*/
+    @Excel(name = "中介名称", width = 15)
+    @ApiModelProperty(value = "中介名称")
+    private String agencyName;
+    /**联系人ID*/
+    @Excel(name = "联系人ID", width = 15)
+    @ApiModelProperty(value = "联系人ID")
+    private String contactId;
+
+    /**担保方式;1、无担保;2、有担保;3、OTA担保*/
+    @Excel(name = "担保方式;1、无担保;2、有担保;3、OTA担保", width = 15)
+    @ApiModelProperty(value = "担保方式;1、无担保;2、有担保;3、OTA担保")
+    private Integer warrantType;
+
+    /**担保人ID*/
+    @Excel(name = "担保人ID", width = 15)
+    @ApiModelProperty(value = "担保人ID")
+    private String warranter;
+    /**外部订单编号*/
+    @Excel(name = "外部订单编号", width = 15)
+    @ApiModelProperty(value = "外部订单编号")
+    private String outerOrdersNo;
+
+    /**钟点房计费项目id*/
+    @Excel(name = "钟点房计费项目id", width = 15)
+    @ApiModelProperty(value = "钟点房计费项目id")
+    private String hourRoomId;
+    /**备注*/
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+
+
+
+
+
+
+
+
+
 }

+ 52 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/impl/BusRoomBookingOrdersServiceImpl.java

@@ -203,6 +203,7 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
                 SimpleDateFormat sdfPc = new SimpleDateFormat("yyyyMMddHHmmssSSS");
                 c.setBatchNo("YDPC"+sdfPc.format(System.currentTimeMillis()));
                 c.setBookingOrdersId(item.getOrderInfo().getId());
+                setBatchOrderInfo(item.getOrderInfo(),c);
                 BusBookingBatch batchItem = copyBatchToBase(c);
                 bookingBatchService.save(batchItem);
                 List<BusBookingRooms> batchBookingRooms = new ArrayList<>();
@@ -458,6 +459,7 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
                     if(c.getDayCount() == null || c.getDayCount() <= 0)
                         throw new JeecgBootException("入住天数不能小于0");
                 }
+                setBatchOrderInfoForEdit(item.getOrderInfo(),c);
                 if(c.getRoomIds() == null || c.getRoomIds().size() == 0)
                     throw new JeecgBootException("请选择批次房间");
                 SimpleDateFormat sdfPc = new SimpleDateFormat("yyyyMMddHHmmssSSS");
@@ -546,6 +548,21 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         batch.setArrivalTime(data.getArrivalTime());
         batch.setDueOutTime(data.getDueOutTime());
         batch.setDayCount(data.getDayCount());
+        batch.setBreakfastNum(data.getBreakfastNum());
+        batch.setLunchNum(data.getLunchNum());
+        batch.setDinnerNum(data.getDinnerNum());
+        batch.setCustomerType(data.getCustomerType());
+        batch.setVipCustomerId(data.getVipCustomerId());
+        batch.setContractTeamId(data.getContractTeamId());
+        batch.setContractTeamProtocolId(data.getContractTeamProtocolId());
+        batch.setRoomPriceSlnId(data.getRoomPriceSlnId());
+        batch.setAgencyName(data.getAgencyName());
+        batch.setContactId(data.getContactId());
+        batch.setWarrantType(data.getWarrantType());
+        batch.setWarranter(data.getWarranter());
+        batch.setOuterOrdersNo(data.getOuterOrdersNo());
+        batch.setRemark(data.getRemark());
+        batch.setHourRoomId(data.getHourRoomId());
         return batch;
     }
 
@@ -559,4 +576,39 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         batch.setDayCount(data.getDayCount());
         return batch;
     }
+
+    void setBatchOrderInfo(BusRoomBookingOrders order, BookingBatchRoomsDto batchDto){
+        batchDto.setBreakfastNum(order.getBreakfastNum());
+        batchDto.setLunchNum(order.getLunchNum());
+        batchDto.setDinnerNum(order.getDinnerNum());
+        batchDto.setCustomerType(order.getCustomerType());
+        batchDto.setVipCustomerId(order.getVipCustomerId());
+        batchDto.setContractTeamId(order.getContractTeamId());
+        batchDto.setContractTeamProtocolId(order.getContractTeamProtocolId());
+        batchDto.setRoomPriceSlnId(order.getRoomPriceSlnId());
+        batchDto.setAgencyName(order.getAgencyName());
+        batchDto.setContactId(order.getContactId());
+        batchDto.setWarrantType(order.getWarrantType());
+        batchDto.setWarranter(order.getWarranter());
+        batchDto.setOuterOrdersNo(order.getOuterOrdersNo());
+        batchDto.setRemark(order.getRemark());
+        batchDto.setHourRoomId(order.getHourRoomId());
+    }
+    void setBatchOrderInfoForEdit(BusRoomBookingOrders order, BookingBatchRoomsVo batchDto){
+        batchDto.setBreakfastNum(order.getBreakfastNum());
+        batchDto.setLunchNum(order.getLunchNum());
+        batchDto.setDinnerNum(order.getDinnerNum());
+        batchDto.setCustomerType(order.getCustomerType());
+        batchDto.setVipCustomerId(order.getVipCustomerId());
+        batchDto.setContractTeamId(order.getContractTeamId());
+        batchDto.setContractTeamProtocolId(order.getContractTeamProtocolId());
+        batchDto.setRoomPriceSlnId(order.getRoomPriceSlnId());
+        batchDto.setAgencyName(order.getAgencyName());
+        batchDto.setContactId(order.getContactId());
+        batchDto.setWarrantType(order.getWarrantType());
+        batchDto.setWarranter(order.getWarranter());
+        batchDto.setOuterOrdersNo(order.getOuterOrdersNo());
+        batchDto.setRemark(order.getRemark());
+        batchDto.setHourRoomId(order.getHourRoomId());
+    }
 }