|
@@ -2692,7 +2692,6 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
|
|
String useEndTimeStr = DateUtils.getDate(airConditionerAddTime.getUseEndTime(), "HH:mm");
|
|
String useEndTimeStr = DateUtils.getDate(airConditionerAddTime.getUseEndTime(), "HH:mm");
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
return ConditionerAddTimeOrderFeeVO.builder()
|
|
return ConditionerAddTimeOrderFeeVO.builder()
|
|
.priceDisplay(priceDisplay)// 单价
|
|
.priceDisplay(priceDisplay)// 单价
|
|
.useLengthTime(useLengthTime)// 使用时长
|
|
.useLengthTime(useLengthTime)// 使用时长
|
|
@@ -2734,28 +2733,28 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
|
|
*/
|
|
*/
|
|
StringBuilder roomNos = new StringBuilder();
|
|
StringBuilder roomNos = new StringBuilder();
|
|
for (Integer roomId : order.getRoomIds()) {
|
|
for (Integer roomId : order.getRoomIds()) {
|
|
- roomNos.append(roomId).append(",");
|
|
|
|
|
|
+ roomNos.append(roomId).append(";");
|
|
}
|
|
}
|
|
List<RoomInfo> roomInfos = conditionerAddTimeOrderFeeVO.getRoomInfos();
|
|
List<RoomInfo> roomInfos = conditionerAddTimeOrderFeeVO.getRoomInfos();
|
|
- Map<Integer,RoomInfo> map = new HashMap<>();
|
|
|
|
|
|
+ Map<Integer, RoomInfo> map = new HashMap<>();
|
|
for (RoomInfo roomInfo : roomInfos) {
|
|
for (RoomInfo roomInfo : roomInfos) {
|
|
map.put(roomInfo.getId(), roomInfo);
|
|
map.put(roomInfo.getId(), roomInfo);
|
|
}
|
|
}
|
|
StringBuilder roomNames = new StringBuilder();
|
|
StringBuilder roomNames = new StringBuilder();
|
|
HashSet<Integer> floorSet = new HashSet<>();
|
|
HashSet<Integer> floorSet = new HashSet<>();
|
|
for (Integer roomId : order.getRoomIds()) {
|
|
for (Integer roomId : order.getRoomIds()) {
|
|
- roomNames.append(map.get(roomId).getName()).append(",");
|
|
|
|
|
|
+ roomNames.append(map.get(roomId).getName()).append(";");
|
|
floorSet.add(map.get(roomId).getFloorId().intValue());
|
|
floorSet.add(map.get(roomId).getFloorId().intValue());
|
|
}
|
|
}
|
|
|
|
|
|
StringBuilder floorIds = new StringBuilder();
|
|
StringBuilder floorIds = new StringBuilder();
|
|
for (Integer floorId : floorSet) {
|
|
for (Integer floorId : floorSet) {
|
|
- floorIds.append(floorId).append(",");
|
|
|
|
|
|
+ floorIds.append(floorId).append(";");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- airConditionerAddTime.setRoomNos(roomNos.toString());//申请房间id
|
|
|
|
- airConditionerAddTime.setRoomNames(roomNames.toString());// 申请房间名称
|
|
|
|
|
|
+ airConditionerAddTime.setRoomNos(roomNos.substring(0, roomNos.length() - 1));// 申请房间id
|
|
|
|
+ airConditionerAddTime.setRoomNames(roomNames.substring(0, roomNames.length() - 1));// 申请房间名称
|
|
airConditionerAddTime.setApplyArea(conditionerAddTimeOrderFeeVO.getApplyArea());// 申请面积
|
|
airConditionerAddTime.setApplyArea(conditionerAddTimeOrderFeeVO.getApplyArea());// 申请面积
|
|
airConditionerAddTime.setUseLengthTime(conditionerAddTimeOrderFeeVO.getUseLengthTime()); // 使用时长
|
|
airConditionerAddTime.setUseLengthTime(conditionerAddTimeOrderFeeVO.getUseLengthTime()); // 使用时长
|
|
airConditionerAddTime.setUseStartTime(order.getUseStartTime());// 使用开始时间
|
|
airConditionerAddTime.setUseStartTime(order.getUseStartTime());// 使用开始时间
|
|
@@ -2766,20 +2765,20 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
|
|
airConditionerAddTime.setMonthlyFree(conditionerAddTimeOrderFeeVO.getMonthlyFee());// 月结费用
|
|
airConditionerAddTime.setMonthlyFree(conditionerAddTimeOrderFeeVO.getMonthlyFee());// 月结费用
|
|
airConditionerAddTime.setModifier(user.getFullName());// 修改人
|
|
airConditionerAddTime.setModifier(user.getFullName());// 修改人
|
|
airConditionerAddTime.setModifyTime(new Date());// 修改时间
|
|
airConditionerAddTime.setModifyTime(new Date());// 修改时间
|
|
- airConditionerAddTime.setFloorId(floorIds.toString());// 楼层id
|
|
|
|
|
|
+ airConditionerAddTime.setFloorId(floorIds.substring(0, floorIds.length() - 1));// 楼层id
|
|
airConditionerAddTime.setModificationDisabled(order.getModificationDisabled());// 是否关闭修改功能
|
|
airConditionerAddTime.setModificationDisabled(order.getModificationDisabled());// 是否关闭修改功能
|
|
|
|
|
|
// 保存修改记录
|
|
// 保存修改记录
|
|
conditionerAddTimeOrderExtendManager.saveHistory(
|
|
conditionerAddTimeOrderExtendManager.saveHistory(
|
|
AirConditionerAddTimeOrderHistory.builder()
|
|
AirConditionerAddTimeOrderHistory.builder()
|
|
- .orderNo(airConditionerAddTime.getCode())// 订单号
|
|
|
|
- .beforeUpdate(history)// 更新前
|
|
|
|
- .afterUpdate(JSON.toJSONString(airConditionerAddTime)) // 更新后
|
|
|
|
- .createTime(new Date())
|
|
|
|
- .createUser(user.getFullName())
|
|
|
|
- .remark(order.getRemark())// 备注
|
|
|
|
- .modificationDisabled(order.getModificationDisabled()) // 是否关闭修改功能
|
|
|
|
- .build()
|
|
|
|
|
|
+ .orderNo(airConditionerAddTime.getCode())// 订单号
|
|
|
|
+ .beforeUpdate(history)// 更新前
|
|
|
|
+ .afterUpdate(JSON.toJSONString(airConditionerAddTime)) // 更新后
|
|
|
|
+ .createTime(new Date())
|
|
|
|
+ .createUser(user.getFullName())
|
|
|
|
+ .remark(order.getRemark())// 备注
|
|
|
|
+ .modificationDisabled(order.getModificationDisabled()) // 是否关闭修改功能
|
|
|
|
+ .build()
|
|
);
|
|
);
|
|
|
|
|
|
// 更新原订单
|
|
// 更新原订单
|
|
@@ -2800,14 +2799,16 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
|
|
|
|
|
|
if (list != null && !list.isEmpty()) {
|
|
if (list != null && !list.isEmpty()) {
|
|
for (AirConditionerAddTimeOrderHistory airConditionerAddTimeOrderHistory : list) {
|
|
for (AirConditionerAddTimeOrderHistory airConditionerAddTimeOrderHistory : list) {
|
|
- AirConditionerAddTimeHistoryVO.builder()
|
|
|
|
- .createUser(airConditionerAddTimeOrderHistory.getCreateUser())
|
|
|
|
- .createTime(DateUtils.getDate(airConditionerAddTimeOrderHistory.getCreateTime(), "yyyy-MM-dd HH:mm:ss"))
|
|
|
|
- .remark(airConditionerAddTimeOrderHistory.getRemark())
|
|
|
|
- .modificationDisabled(airConditionerAddTimeOrderHistory.getModificationDisabled())
|
|
|
|
- .beforeUpdate(JSON.parseObject(airConditionerAddTimeOrderHistory.getBeforeUpdate(), AirConditionerAddTimeHistoryRecord.class))
|
|
|
|
- .afterUpdate(JSON.parseObject(airConditionerAddTimeOrderHistory.getAfterUpdate(), AirConditionerAddTimeHistoryRecord.class))
|
|
|
|
- .build();
|
|
|
|
|
|
+ history.add(
|
|
|
|
+ AirConditionerAddTimeHistoryVO.builder()
|
|
|
|
+ .createUser(airConditionerAddTimeOrderHistory.getCreateUser())
|
|
|
|
+ .createTime(DateUtils.getDate(airConditionerAddTimeOrderHistory.getCreateTime(), "yyyy-MM-dd HH:mm:ss"))
|
|
|
|
+ .remark(airConditionerAddTimeOrderHistory.getRemark())
|
|
|
|
+ .modificationDisabled(airConditionerAddTimeOrderHistory.getModificationDisabled())
|
|
|
|
+ .beforeUpdate(JSON.parseObject(airConditionerAddTimeOrderHistory.getBeforeUpdate(), AirConditionerAddTimeHistoryRecord.class))
|
|
|
|
+ .afterUpdate(JSON.parseObject(airConditionerAddTimeOrderHistory.getAfterUpdate(), AirConditionerAddTimeHistoryRecord.class))
|
|
|
|
+ .build()
|
|
|
|
+ );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|