|
@@ -1,14 +1,17 @@
|
|
|
package com.palmnest.webapp.controller.backstage;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.palmnest.application.AppConstants;
|
|
|
import com.palmnest.application.CodeConstants;
|
|
|
import com.palmnest.application.bean.AppResultDto;
|
|
|
import com.palmnest.application.bean.Page;
|
|
|
import com.palmnest.application.core.util.AppResultUtil;
|
|
|
import com.palmnest.application.core.util.LogExceptionStackUtil;
|
|
|
+import com.palmnest.application.dto.ConditionerAddTimeOrderFeeVO;
|
|
|
import com.palmnest.application.dto.OrgDto;
|
|
|
import com.palmnest.application.dto.WebPageResultDto;
|
|
|
import com.palmnest.application.dto.input.AirConditionerAddTimeInputDto;
|
|
|
+import com.palmnest.application.dto.input.ConditionerAddTimeOrderUpdateParam;
|
|
|
import com.palmnest.model.AppUserFloorRelation;
|
|
|
import com.palmnest.model.RoomInfo;
|
|
|
import com.palmnest.model.User;
|
|
@@ -19,21 +22,19 @@ import com.palmnest.service.estateserve.FloorInfoManager;
|
|
|
import com.palmnest.service.estateserve.VirtualArchManager;
|
|
|
import com.palmnest.service.estateserve.airconditioner.ConditionerAddTimeService;
|
|
|
import com.palmnest.service.estateserve.airconditioner.ProjectConfigService;
|
|
|
-
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import net.sf.json.JSONObject;
|
|
|
-
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ExtendedModelMap;
|
|
|
import org.springframework.ui.Model;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
@@ -628,4 +629,19 @@ public class AirConditionerAddTimeController {
|
|
|
List<RoomInfo> list = conditionerAddTimeService.getAddTimeOrderHistoryRooms(orderNo);
|
|
|
return AppResultUtil.createSuccesDto(list);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改空调加时订单时 计算费用
|
|
|
+ * @param order 修改的订单信息
|
|
|
+ * @param request
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/calcAddTimeOrderFee", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public AppResultDto calcAddTimeOrderFee(@RequestBody @Validated ConditionerAddTimeOrderUpdateParam order, HttpServletRequest request) {
|
|
|
+ User user = (User) request.getSession().getAttribute("UserCache");
|
|
|
+ log.info("更新空调加时订单前计算费用, user: {}, order:{}", user.getFullName(), JSON.toJSONString(order));
|
|
|
+ ConditionerAddTimeOrderFeeVO vo = conditionerAddTimeService.calcAddTimeOrderFee(order);
|
|
|
+ return AppResultUtil.createSuccesDto(vo);
|
|
|
+ }
|
|
|
}
|