|
@@ -105,6 +105,7 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
|
|
* 空调加时订单属性填充
|
|
* 空调加时订单属性填充
|
|
*/
|
|
*/
|
|
AirConditionerAddTime airConditionerAddTime = new AirConditionerAddTime();
|
|
AirConditionerAddTime airConditionerAddTime = new AirConditionerAddTime();
|
|
|
|
+ airConditionerAddTime.setModificationDisabled(0);
|
|
BeanUtils.copyProperties(airConditionerAddTime, dto);
|
|
BeanUtils.copyProperties(airConditionerAddTime, dto);
|
|
if (dto.getBillFrom().equals(CodeConstants.WECHAT)) {
|
|
if (dto.getBillFrom().equals(CodeConstants.WECHAT)) {
|
|
String openId = request.getParameter("openId");
|
|
String openId = request.getParameter("openId");
|
|
@@ -576,9 +577,10 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
|
|
* 下单时保存可用的规则 修改订单时需要用
|
|
* 下单时保存可用的规则 修改订单时需要用
|
|
*/
|
|
*/
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
- param.put("orgId", airConditionerAddTime.getOrganizationId());
|
|
|
|
|
|
+ param.put("organizationId", airConditionerAddTime.getOrganizationId());
|
|
param.put("isEnabled", 1);
|
|
param.put("isEnabled", 1);
|
|
- Page airRulePage = airRuleManager.findPageBy(param, 1, 100);
|
|
|
|
|
|
+ Page airRulePage = airRuleManager.findPageBy(param, 100, 1);
|
|
|
|
+ log.info("空调加时申请,查询所有可用规则,airConditionerAddTime={},结果:{}", JSON.toJSONString(airConditionerAddTime), JSON.toJSONString(airRulePage));
|
|
List items = airRulePage.getItems();
|
|
List items = airRulePage.getItems();
|
|
if (cn.superdesk.libs.common.util.CollectionUtils.isEmpty(items)) {
|
|
if (cn.superdesk.libs.common.util.CollectionUtils.isEmpty(items)) {
|
|
return AppResultUtil.createErrorDto(AppConstants.ERROR_CODE, "空调加时申请失败,没有可用规则,请联系系统管理员");
|
|
return AppResultUtil.createErrorDto(AppConstants.ERROR_CODE, "空调加时申请失败,没有可用规则,请联系系统管理员");
|
|
@@ -589,7 +591,9 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
|
|
/**
|
|
/**
|
|
* 下单时保存所有可用房间信息 修改订单时需要用
|
|
* 下单时保存所有可用房间信息 修改订单时需要用
|
|
*/
|
|
*/
|
|
- List<Integer> allRoomIds = dto.getAllRoomIds();
|
|
|
|
|
|
+ VirtualArchitecture vir = virtualArchManager.get(Integer.valueOf(virtualId));
|
|
|
|
+ String[] split = vir.getRoomIds().split(";");
|
|
|
|
+ List<String> allRoomIds = Arrays.asList(split);
|
|
if (cn.superdesk.libs.common.util.CollectionUtils.isEmpty(allRoomIds)) {
|
|
if (cn.superdesk.libs.common.util.CollectionUtils.isEmpty(allRoomIds)) {
|
|
return AppResultUtil.createErrorDto(AppConstants.ERROR_CODE, "空调加时申请失败,没有可用房间,请联系系统管理员");
|
|
return AppResultUtil.createErrorDto(AppConstants.ERROR_CODE, "空调加时申请失败,没有可用房间,请联系系统管理员");
|
|
}
|
|
}
|
|
@@ -598,7 +602,7 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
|
|
for (int i = 0; i < allRoomIds.size(); i++) {
|
|
for (int i = 0; i < allRoomIds.size(); i++) {
|
|
sb.append(allRoomIds.get(i));
|
|
sb.append(allRoomIds.get(i));
|
|
if (i < allRoomIds.size() - 1) {
|
|
if (i < allRoomIds.size() - 1) {
|
|
- sb.append(";");
|
|
|
|
|
|
+ sb.append(",");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
List<RoomInfo> allRoomInfos = roomInfoManager.getRoomListByRoomNos(sb.toString());
|
|
List<RoomInfo> allRoomInfos = roomInfoManager.getRoomListByRoomNos(sb.toString());
|