Bläddra i källkod

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-backend

gqx 2 år sedan
förälder
incheckning
976a52c88b

+ 365 - 11
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusHotelController.java

@@ -1,10 +1,13 @@
 package org.jeecg.modules.business.controller;
 package org.jeecg.modules.business.controller;
 
 
+import java.math.BigDecimal;
+import java.text.ParseException;
 import java.util.*;
 import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 import java.io.IOException;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.net.URLDecoder;
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
@@ -25,11 +28,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 
 
 import org.jeecg.modules.base.service.BaseCommonService;
 import org.jeecg.modules.base.service.BaseCommonService;
-import org.jeecg.modules.business.entity.BusDict;
-import org.jeecg.modules.business.entity.BusHotel;
-import org.jeecg.modules.business.service.IBusDictService;
-import org.jeecg.modules.business.service.IBusHotelService;
+import org.jeecg.modules.business.entity.*;
+import org.jeecg.modules.business.service.*;
+import org.jeecg.modules.business.service.impl.BusCancelServiceImpl;
 import org.jeecg.modules.business.util.MapUtil;
 import org.jeecg.modules.business.util.MapUtil;
+import org.jeecg.modules.rooms.DTO.CesAllDayPriceRuleDto;
+import org.jeecg.modules.rooms.service.CesAllDayPriceRuleServiceImpl;
 import org.jeecg.modules.system.entity.SysTenant;
 import org.jeecg.modules.system.entity.SysTenant;
 import org.jeecg.modules.system.entity.SysUser;
 import org.jeecg.modules.system.entity.SysUser;
 import org.jeecg.modules.system.service.ISysTenantService;
 import org.jeecg.modules.system.service.ISysTenantService;
@@ -69,6 +73,42 @@ public class BusHotelController extends JeecgController<BusHotel, IBusHotelServi
 
 
 	 @Autowired
 	 @Autowired
 	 private IBusDictService busDictService;
 	 private IBusDictService busDictService;
+	 @Autowired
+	 private IBusPrintTemplateService busPrintTemplateService;
+	 @Autowired
+	 private IBusNightTrialService busNightTrialService;
+	 @Autowired
+	 private IBusClearService busClearService;
+	 @Autowired
+	 private IBusHouseSettingService busHouseSettingService;
+	 @Autowired
+	 private IBusDepositSettingService busDepositSettingService;
+	 @Autowired
+	 private IBusCancelService busCancelService;
+	 @Autowired
+	 private IBusOtherRoomCardService busOtherRoomCardService;
+	 @Autowired
+	 private IBusOtherMemberVerifyService busOtherMemberVerifyService;
+	 @Autowired
+	 private IBusOtherEmptyDirtyRoomService busOtherEmptyDirtyRoomService;
+	 @Autowired
+	 private IBusOtherCheckoutService busOtherCheckoutService;
+	 @Autowired
+	 private IBusParamWeepService busParamWeepService;
+	 @Autowired
+	 private IBusParamShareService busParamShareService;
+	 @Autowired
+	 private IBusParamPresetService busParamPresetService;
+	 @Autowired
+	 private IBusParamComputeFormulaService busParamComputeFormulaService;
+	 @Autowired
+	 private IBusParamPrintHideService busParamPrintHideService;
+	 @Autowired
+	 private IBusParamPresetSyncService busParamPresetSyncService;
+	 @Autowired
+	 private IBusParamXcxRoomService busParamXcxRoomService;
+	 @Resource
+	 CesAllDayPriceRuleServiceImpl cesAllDayPriceRuleService;
 
 
 	/**
 	/**
 	 * 分页列表查询
 	 * 分页列表查询
@@ -141,20 +181,334 @@ public class BusHotelController extends JeecgController<BusHotel, IBusHotelServi
 //			for (BusDict busDict : listDict) {
 //			for (BusDict busDict : listDict) {
 //
 //
 //			}
 //			}
-			List<BusDict> batchDict = new ArrayList<>();
-			listDict.forEach( busDict -> {
-				BusDict newDict = busDict;
-				newDict.setTenantId(busHotel.getTenantId());
-				newDict.setHotelId(busHotel.getId());
-				batchDict.add(newDict);
+			List<BusDict> batchModels = new ArrayList<>();
+			listDict.forEach( item -> {
+				BusDict newModel = new BusDict();
+				newModel.setParentId("0");
+				newModel.setTenantId(busHotel.getTenantId());
+				newModel.setHotelId(busHotel.getId());
+				newModel.setDictName(item.getDictName());
+				newModel.setDictCode(item.getDictCode());
+				newModel.setDescription(item.getDescription());
+				newModel.setDelFlag(item.getDelFlag());
+				batchModels.add(newModel);
+//				busDictService.save(newDict);
 			});
 			});
-			busDictService.saveBatch(batchDict);
+			busDictService.saveBatch(batchModels);
 		}
 		}
 
 
 		//初始化打印模板
 		//初始化打印模板
+		LambdaQueryWrapper<BusPrintTemplate> queryPrintTemplate = new LambdaQueryWrapper<BusPrintTemplate>();
+		queryPrintTemplate.eq(BusPrintTemplate::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryPrintTemplate.eq(BusPrintTemplate::getHotelId, "0");
+		queryPrintTemplate.eq(BusPrintTemplate::getTenantId, "0");
+		List<BusPrintTemplate> listPrintTemplate = busPrintTemplateService.list(queryPrintTemplate);
+		if (listPrintTemplate != null && listPrintTemplate.size() > 0){
+			List<BusPrintTemplate> batchModels = new ArrayList<>();
+			listPrintTemplate.forEach( item -> {
+				BusPrintTemplate newModel = new BusPrintTemplate();
+				newModel.setTenantId(busHotel.getTenantId());
+				newModel.setHotelId(busHotel.getId());
+				newModel.setName(item.getName());
+				newModel.setType(item.getType());
+				newModel.setSpecs(item.getSpecs());
+				newModel.setRemarks(item.getRemarks());
+				newModel.setDefaultPrint(item.getDefaultPrint());
+				newModel.setPrintType(item.getPrintType());
+				newModel.setPrintSum(item.getPrintSum());
+				newModel.setPreview(item.getPreview());
+				newModel.setPrintContentOffset(item.getPrintContentOffset());
+				newModel.setPrintPaperOffset(item.getPrintPaperOffset());
+				newModel.setIsShowRefund(item.getIsShowRefund());
+				newModel.setIsShowIdcard(item.getIsShowIdcard());
+				newModel.setIsShowBreakfast(item.getIsShowBreakfast());
+				newModel.setIsShowAddress(item.getIsShowAddress());
+				newModel.setIsShowPhone(item.getIsShowPhone());
+				newModel.setDelFlag(item.getDelFlag());
+				batchModels.add(newModel);
+			});
+			busPrintTemplateService.saveBatch(batchModels);
+		}
 		//初始化参数设置
 		//初始化参数设置
+		//夜审设置
+		LambdaQueryWrapper<BusNightTrial> queryNightTrial = new LambdaQueryWrapper<BusNightTrial>();
+		queryNightTrial.eq(BusNightTrial::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryNightTrial.eq(BusNightTrial::getHotelId, "0");
+		queryNightTrial.eq(BusNightTrial::getTenantId, "0");
+		BusNightTrial busNightTrial = busNightTrialService.getOne(queryNightTrial);
+		if (busNightTrial != null){
+			BusNightTrial newModel = new BusNightTrial();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setAutoCheck(busNightTrial.getAutoCheck());
+			newModel.setAutoHand(busNightTrial.getAutoHand());
+			newModel.setLastNightState(busNightTrial.getLastNightState());
+			newModel.setLastNightTrialTime(busNightTrial.getLastNightTrialTime());
+			newModel.setSetNightTrialTime(busNightTrial.getSetNightTrialTime());
+			newModel.setDelFlag(busNightTrial.getDelFlag());
+			busNightTrialService.save(newModel);
+		}
+
+		//清扫房间选择服务员
+		LambdaQueryWrapper<BusClear> queryClear = new LambdaQueryWrapper<BusClear>();
+		queryClear.eq(BusClear::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryClear.eq(BusClear::getHotelId, "0");
+		queryClear.eq(BusClear::getTenantId, "0");
+		BusClear busClear = busClearService.getOne(queryClear);
+		if (busClear != null){
+			BusClear newModel = new BusClear();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setStatus(busClear.getStatus());
+			newModel.setDelFlag(busClear.getDelFlag());
+			busClearService.save(newModel);
+		}
+
+		//房务管理
+		LambdaQueryWrapper<BusHouseSetting> queryHouseSetting= new LambdaQueryWrapper<BusHouseSetting>();
+		queryHouseSetting.eq(BusHouseSetting::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryHouseSetting.eq(BusHouseSetting::getHotelId, "0");
+		queryHouseSetting.eq(BusHouseSetting::getTenantId, "0");
+		BusHouseSetting busHouseSetting = busHouseSettingService.getOne(queryHouseSetting);
+		if (busHouseSetting != null){
+			BusHouseSetting newModel = new BusHouseSetting();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setDirtyHouse(busHouseSetting.getDirtyHouse());
+			newModel.setDirtyRoom(busHouseSetting.getDirtyRoom());
+			newModel.setTDirtyHouse(busHouseSetting.getTDirtyHouse());
+			newModel.setXDirtyHouse(busHouseSetting.getXDirtyHouse());
+			newModel.setZDirtyHouse(busHouseSetting.getZDirtyHouse());
+			newModel.setStatus(busHouseSetting.getStatus());
+			newModel.setDelFlag(busHouseSetting.getDelFlag());
+			busHouseSettingService.save(newModel);
+		}
 
 
+		//押金设置
+		LambdaQueryWrapper<BusDepositSetting> queryDepositSetting = new LambdaQueryWrapper<BusDepositSetting>();
+		queryDepositSetting.eq(BusDepositSetting::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryDepositSetting.eq(BusDepositSetting::getHotelId, "0");
+		queryDepositSetting.eq(BusDepositSetting::getTenantId, "0");
+		BusDepositSetting busDepositSetting = busDepositSettingService.getOne(queryDepositSetting);
+		if (busDepositSetting != null){
+			BusDepositSetting newModel = new BusDepositSetting();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setDepositType(busDepositSetting.getDepositType());
+			newModel.setDepositMoney(busDepositSetting.getDepositMoney());
+			newModel.setDepositMultiple(busDepositSetting.getDepositMultiple());
+			newModel.setBalanceAlarm(busDepositSetting.getBalanceAlarm());
+			newModel.setBalanceLess(busDepositSetting.getBalanceLess());
+			newModel.setIsRounding(busDepositSetting.getIsRounding());
+			newModel.setDelFlag(busDepositSetting.getDelFlag());
+			busDepositSettingService.save(newModel);
+		}
+		//撤销入住
+		LambdaQueryWrapper<BusCancel> queryCancel = new LambdaQueryWrapper<BusCancel>();
+		queryCancel.eq(BusCancel::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryCancel.eq(BusCancel::getHotelId, "0");
+		queryCancel.eq(BusCancel::getTenantId, "0");
+		BusCancel busCancel = busCancelService.getOne(queryCancel);
+		if (busCancel != null){
+			BusCancel newModel = new BusCancel();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setStatus(busCancel.getStatus());
+			newModel.setMinute(busCancel.getMinute());
+			newModel.setDelFlag(busCancel.getDelFlag());
+			busCancelService.save(newModel);
+		}
+
+		//其他
+		LambdaQueryWrapper<BusOtherRoomCard> queryOtherRoomCard = new LambdaQueryWrapper<BusOtherRoomCard>();
+		queryOtherRoomCard.eq(BusOtherRoomCard::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryOtherRoomCard.eq(BusOtherRoomCard::getHotelId, "0");
+		queryOtherRoomCard.eq(BusOtherRoomCard::getTenantId, "0");
+		BusOtherRoomCard busOtherRoomCard = busOtherRoomCardService.getOne(queryOtherRoomCard);
+		if (busOtherRoomCard != null){
+			BusOtherRoomCard newModel = new BusOtherRoomCard();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setStatus(busOtherRoomCard.getStatus());
+			newModel.setLogoutCard(busOtherRoomCard.getLogoutCard());
+			newModel.setTaxRate(busOtherRoomCard.getTaxRate());
+			newModel.setDelFlag(busOtherRoomCard.getDelFlag());
+			busOtherRoomCardService.save(newModel);
+		}
+
+		LambdaQueryWrapper<BusOtherMemberVerify> queryOtherMemberVerify = new LambdaQueryWrapper<BusOtherMemberVerify>();
+		queryOtherMemberVerify.eq(BusOtherMemberVerify::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryOtherMemberVerify.eq(BusOtherMemberVerify::getHotelId, "0");
+		queryOtherMemberVerify.eq(BusOtherMemberVerify::getTenantId, "0");
+		BusOtherMemberVerify busOtherMemberVerify = busOtherMemberVerifyService.getOne(queryOtherMemberVerify);
+		if (busOtherMemberVerify != null){
+			BusOtherMemberVerify newModel = new BusOtherMemberVerify();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setStatus(busOtherMemberVerify.getStatus());
+			newModel.setDelFlag(busOtherMemberVerify.getDelFlag());
+			busOtherMemberVerifyService.save(newModel);
+		}
+
+		LambdaQueryWrapper<BusOtherEmptyDirtyRoom> queryOtherEmptyDirtyRoom = new LambdaQueryWrapper<BusOtherEmptyDirtyRoom>();
+		queryOtherEmptyDirtyRoom.eq(BusOtherEmptyDirtyRoom::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryOtherEmptyDirtyRoom.eq(BusOtherEmptyDirtyRoom::getHotelId, "0");
+		queryOtherEmptyDirtyRoom.eq(BusOtherEmptyDirtyRoom::getTenantId, "0");
+		BusOtherEmptyDirtyRoom busOtherEmptyDirtyRoom = busOtherEmptyDirtyRoomService.getOne(queryOtherEmptyDirtyRoom);
+		if (busOtherEmptyDirtyRoom != null){
+			BusOtherEmptyDirtyRoom newModel = new BusOtherEmptyDirtyRoom();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setStatus(busOtherEmptyDirtyRoom.getStatus());
+			newModel.setDelFlag(busOtherEmptyDirtyRoom.getDelFlag());
+			busOtherEmptyDirtyRoomService.save(newModel);
+		}
+
+		LambdaQueryWrapper<BusOtherCheckout> queryOtherCheckout = new LambdaQueryWrapper<BusOtherCheckout>();
+		queryOtherCheckout.eq(BusOtherCheckout::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryOtherCheckout.eq(BusOtherCheckout::getHotelId, "0");
+		queryOtherCheckout.eq(BusOtherCheckout::getTenantId, "0");
+		BusOtherCheckout busOtherCheckout = busOtherCheckoutService.getOne(queryOtherCheckout);
+		if (busOtherCheckout != null){
+			BusOtherCheckout newModel = new BusOtherCheckout();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setStatus(busOtherCheckout.getStatus());
+			newModel.setDelFlag(busOtherCheckout.getDelFlag());
+			busOtherCheckoutService.save(newModel);
+		}
+
+		//扫码支付
+		LambdaQueryWrapper<BusParamWeep> queryParamWeep = new LambdaQueryWrapper<BusParamWeep>();
+		queryParamWeep.eq(BusParamWeep::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryParamWeep.eq(BusParamWeep::getHotelId, "0");
+		queryParamWeep.eq(BusParamWeep::getTenantId, "0");
+		BusParamWeep busParamWeep = busParamWeepService.getOne(queryParamWeep);
+		if (busParamWeep != null){
+			BusParamWeep newModel = new BusParamWeep();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setDayNum(busParamWeep.getDayNum());
+			newModel.setDelFlag(busParamWeep.getDelFlag());
+			busParamWeepService.save(newModel);
+		}
+
+		//数据共享
+		LambdaQueryWrapper<BusParamShare> queryParamShare = new LambdaQueryWrapper<BusParamShare>();
+		queryParamShare.eq(BusParamShare::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryParamShare.eq(BusParamShare::getHotelId, "0");
+		queryParamShare.eq(BusParamShare::getTenantId, "0");
+		BusParamShare busParamShare = busParamShareService.getOne(queryParamShare);
+		if (busParamShare != null){
+			BusParamShare newModel = new BusParamShare();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setAgreementAccountShare(busParamShare.getAgreementAccountShare());
+			newModel.setAgreementShare(busParamShare.getAgreementShare());
+			newModel.setMemberAccountShare(busParamShare.getMemberAccountShare());
+			newModel.setMemberShare(busParamShare.getMemberShare());
+			newModel.setDelFlag(busParamShare.getDelFlag());
+			busParamShareService.save(newModel);
+		}
+
+		//预定参数
+		LambdaQueryWrapper<BusParamPreset> queryParamPreset = new LambdaQueryWrapper<BusParamPreset>();
+		queryParamPreset.eq(BusParamPreset::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryParamPreset.eq(BusParamPreset::getHotelId, "0");
+		queryParamPreset.eq(BusParamPreset::getTenantId, "0");
+		BusParamPreset busParamPreset = busParamPresetService.getOne(queryParamPreset);
+		if (busParamPreset != null){
+			BusParamPreset newModel = new BusParamPreset();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setStatus(busParamPreset.getStatus());
+			newModel.setMinute(busParamPreset.getMinute());
+			newModel.setDelFlag(busParamPreset.getDelFlag());
+			busParamPresetService.save(newModel);
+		}
+
+		//计算公式
+		LambdaQueryWrapper<BusParamComputeFormula> queryParamComputeFormula = new LambdaQueryWrapper<BusParamComputeFormula>();
+		queryParamComputeFormula.eq(BusParamComputeFormula::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryParamComputeFormula.eq(BusParamComputeFormula::getHotelId, "0");
+		queryParamComputeFormula.eq(BusParamComputeFormula::getTenantId, "0");
+		BusParamComputeFormula busParamComputeFormula = busParamComputeFormulaService.getOne(queryParamComputeFormula);
+		if (busParamComputeFormula != null){
+			BusParamComputeFormula newModel = new BusParamComputeFormula();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setCardinal(busParamComputeFormula.getCardinal());
+			newModel.setNights(busParamComputeFormula.getNights());
+			newModel.setStatus(busParamComputeFormula.getStatus());
+			newModel.setDelFlag(busParamComputeFormula.getDelFlag());
+			busParamComputeFormulaService.save(newModel);
+		}
+
+		//打印单据隐藏信息设置
+		LambdaQueryWrapper<BusParamPrintHide> queryParamPrintHide = new LambdaQueryWrapper<BusParamPrintHide>();
+		queryParamPrintHide.eq(BusParamPrintHide::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryParamPrintHide.eq(BusParamPrintHide::getHotelId, "0");
+		queryParamPrintHide.eq(BusParamPrintHide::getTenantId, "0");
+		BusParamPrintHide busParamPrintHide = busParamPrintHideService.getOne(queryParamPrintHide);
+		if (busParamPrintHide != null){
+			BusParamPrintHide newModel = new BusParamPrintHide();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setGuest(busParamPrintHide.getGuest());
+			newModel.setPrice(busParamPrintHide.getPrice());
+			newModel.setDelFlag(busParamPrintHide.getDelFlag());
+			busParamPrintHideService.save(newModel);
+		}
+
+		//线上预定房量是否同步
+		LambdaQueryWrapper<BusParamPresetSync> queryParamPresetSync = new LambdaQueryWrapper<BusParamPresetSync>();
+		queryParamPresetSync.eq(BusParamPresetSync::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryParamPresetSync.eq(BusParamPresetSync::getHotelId, "0");
+		queryParamPresetSync.eq(BusParamPresetSync::getTenantId, "0");
+		BusParamPresetSync busParamPresetSync = busParamPresetSyncService.getOne(queryParamPresetSync);
+		if (busParamPresetSync != null){
+			BusParamPresetSync newModel = new BusParamPresetSync();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setStatus(busParamPresetSync.getStatus());
+			newModel.setDelFlag(busParamPresetSync.getDelFlag());
+			busParamPresetSyncService.save(newModel);
+		}
+		//小程序客房服务设置
+		LambdaQueryWrapper<BusParamXcxRoom> queryParamXcxRoom = new LambdaQueryWrapper<BusParamXcxRoom>();
+		queryParamXcxRoom.eq(BusParamXcxRoom::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryParamXcxRoom.eq(BusParamXcxRoom::getHotelId, "0");
+		queryParamXcxRoom.eq(BusParamXcxRoom::getTenantId, "0");
+		BusParamXcxRoom busParamXcxRoom = busParamXcxRoomService.getOne(queryParamXcxRoom);
+		if (busParamXcxRoom != null){
+			BusParamXcxRoom newModel = new BusParamXcxRoom();
+			newModel.setTenantId(busHotel.getTenantId());
+			newModel.setHotelId(busHotel.getId());
+			newModel.setCheckOut(busParamXcxRoom.getCheckOut());
+			newModel.setCheckOutType(busParamXcxRoom.getCheckOutType());
+			newModel.setKeepLive(busParamXcxRoom.getKeepLive());
+			newModel.setMessageLive(busParamXcxRoom.getMessageLive());
+			newModel.setServiceLive(busParamXcxRoom.getServiceLive());
+			newModel.setRepairLive(busParamXcxRoom.getRepairLive());
+			newModel.setDelFlag(busParamXcxRoom.getDelFlag());
+			busParamXcxRoomService.save(newModel);
+		}
 
 
+		//全天房计费规则
+		CesAllDayPriceRuleDto cesAllDayPriceRuleDto = new CesAllDayPriceRuleDto();
+		cesAllDayPriceRuleDto.setHotelId(busHotel.getId());
+		cesAllDayPriceRuleDto.setEnterTime("6:00");
+		cesAllDayPriceRuleDto.setLeaveTime("14:00");
+		cesAllDayPriceRuleDto.setTimeOutRule(1);
+		cesAllDayPriceRuleDto.setRuleType(1);
+		cesAllDayPriceRuleDto.setMinute(30);
+		cesAllDayPriceRuleDto.setPrice(BigDecimal.valueOf(10));
+		cesAllDayPriceRuleDto.setMoreThenMinute(10);
+		cesAllDayPriceRuleDto.setMoreThenPrice(BigDecimal.valueOf(5));
+		cesAllDayPriceRuleDto.setEndTime("18:00");
+		cesAllDayPriceRuleDto.setDayTime("30");
+		cesAllDayPriceRuleDto.setInvalid(false);
+		cesAllDayPriceRuleService.modifyWholeDayUnifyPrice(cesAllDayPriceRuleDto);
 		return Result.OK("添加成功!");
 		return Result.OK("添加成功!");
 	}
 	}
 
 

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

@@ -2384,9 +2384,11 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         bkRoom.setRoomId(changeRoom.getId());
         bkRoom.setRoomId(changeRoom.getId());
         bkRoom.setLayoutId(changeRoom.getLayoutId());
         bkRoom.setLayoutId(changeRoom.getLayoutId());
         bookingRoomsService.updateById(bkRoom);
         bookingRoomsService.updateById(bkRoom);
+        origLivingRoom.setLivingOrderId("");
         origLivingRoom.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
         origLivingRoom.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
         roomsService.updateById(origLivingRoom);
         roomsService.updateById(origLivingRoom);
         changeRoom.setRoomStatus(RoomStatusEnum.LIVE_CLEAR.getKey());
         changeRoom.setRoomStatus(RoomStatusEnum.LIVE_CLEAR.getKey());
+        changeRoom.setLivingOrderId(livingOrderId);
         roomsService.updateById(changeRoom);
         roomsService.updateById(changeRoom);
         livingLayoutDayPriceService.remove(Wrappers.<BusLivingLayoutDayPrice>query().eq("living_order_id",livingOrderId));
         livingLayoutDayPriceService.remove(Wrappers.<BusLivingLayoutDayPrice>query().eq("living_order_id",livingOrderId));
         prices.forEach(s->{
         prices.forEach(s->{