Commit ec83214a authored by 周健威's avatar 周健威

Merge branch 'master-vehicle-price' into dev-tiande

parents 27cad387 8f1c6614
...@@ -11,7 +11,8 @@ spring: ...@@ -11,7 +11,8 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.jdbc.Driver driverClassName: com.mysql.jdbc.Driver
#url: jdbc:mysql://10.5.52.3:3306/xxfc_vehicle?useUnicode=true&characterEncoding=UTF-8 #url: jdbc:mysql://10.5.52.3:3306/xxfc_vehicle?useUnicode=true&characterEncoding=UTF-8
url: jdbc:mysql://10.5.52.3:3306/tiande_order?useUnicode=true&characterEncoding=UTF-8 #url: jdbc:mysql://10.5.52.3:3306/tiande_order?useUnicode=true&characterEncoding=UTF-8
url: jdbc:mysql://10.5.52.4:3307/chw_vehicle?useUnicode=true&characterEncoding=UTF-8
username: root username: root
password: sslcloud123*() password: sslcloud123*()
jackson: jackson:
......
#\u4EE3\u7801\u751F\u6210\u5668\uFF0C\u914D\u7F6E\u4FE1\u606F #\u4EE3\u7801\u751F\u6210\u5668\uFF0C\u914D\u7F6E\u4FE1\u606F
#\u5305\u540D #\u5305\u540D
package=com.xxfc.platform.order package=com.xxfc.platform.vehicle
#\u4F5C\u8005 #\u4F5C\u8005
author=libin author=libin
#Email #Email
......
...@@ -172,4 +172,20 @@ public class ShuntApply implements Serializable { ...@@ -172,4 +172,20 @@ public class ShuntApply implements Serializable {
@ApiModelProperty(value = "结束城市编码", hidden = true ) @ApiModelProperty(value = "结束城市编码", hidden = true )
private Integer endCityCode; private Integer endCityCode;
/**
* 确认申请的后台用户id
*/
@Column(name = "confirm_user_id")
@ApiModelProperty(value = "确认申请的后台用户id", hidden = true )
private Integer confirmUserId;
/**
* 确认申请的公司(门店)id
*/
@Column(name = "confirm_company_id")
@ApiModelProperty(value = "确认申请的公司(门店)id", hidden = true )
private Integer confirmCompanyId;
} }
...@@ -58,6 +58,12 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp ...@@ -58,6 +58,12 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
if (StrUtil.isBlank(getCurrentUserId())) { if (StrUtil.isBlank(getCurrentUserId())) {
throw new BaseException(ResultCode.AJAX_WECHAT_NOTEXIST_CODE); throw new BaseException(ResultCode.AJAX_WECHAT_NOTEXIST_CODE);
} }
if(null != shuntApply.getStartCompanyId()) {
shuntApply.setStartCityCode(vehicleFeign.getCompanyDetail(shuntApply.getStartCompanyId()).getData().getAddrCity());
}
if(null != shuntApply.getEndCompanyId()) {
shuntApply.setStartCityCode(vehicleFeign.getCompanyDetail(shuntApply.getEndCompanyId()).getData().getAddrCity());
}
shuntApply.setUserId(getCurrentUserIdInt()); shuntApply.setUserId(getCurrentUserIdInt());
shuntApply.setStatus(STATUS_CRT); shuntApply.setStatus(STATUS_CRT);
return add(shuntApply); return add(shuntApply);
......
...@@ -3,8 +3,10 @@ package com.xxfc.platform.order.rest.background; ...@@ -3,8 +3,10 @@ package com.xxfc.platform.order.rest.background;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.wxiaoqi.security.admin.feign.UserFeign; import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface; import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.common.exception.BaseException; import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
...@@ -20,8 +22,10 @@ import com.xxfc.platform.order.entity.BaseOrder; ...@@ -20,8 +22,10 @@ import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.ShuntApply; import com.xxfc.platform.order.entity.ShuntApply;
import com.xxfc.platform.order.mqhandler.RabbitProduct; import com.xxfc.platform.order.mqhandler.RabbitProduct;
import com.xxfc.platform.order.pojo.order.RentVehicleBO; import com.xxfc.platform.order.pojo.order.RentVehicleBO;
import com.xxfc.platform.order.rest.ShuntApplyController;
import com.xxfc.platform.order.service.OrderRentVehicleService; import com.xxfc.platform.order.service.OrderRentVehicleService;
import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus; import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus;
import com.xxfc.platform.vehicle.entity.VehicleModel;
import com.xxfc.platform.vehicle.feign.VehicleFeign; import com.xxfc.platform.vehicle.feign.VehicleFeign;
import com.xxfc.platform.vehicle.pojo.RentVehicleBookDTO; import com.xxfc.platform.vehicle.pojo.RentVehicleBookDTO;
import com.xxfc.platform.vehicle.pojo.vo.UsableVeicleVO; import com.xxfc.platform.vehicle.pojo.vo.UsableVeicleVO;
...@@ -129,6 +133,7 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA ...@@ -129,6 +133,7 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
if(CollUtil.isNotEmpty(vehicles)) { if(CollUtil.isNotEmpty(vehicles)) {
StewardShuntApply stewardShuntApply = BeanUtil.toBean(shuntApply, StewardShuntApply.class); StewardShuntApply stewardShuntApply = BeanUtil.toBean(shuntApply, StewardShuntApply.class);
stewardShuntApply.setVehicles(vehicles); stewardShuntApply.setVehicles(vehicles);
stewardShuntApply.setVehicleModel(vehicleFeign.get(modelId).getData());
returnList.add(stewardShuntApply); returnList.add(stewardShuntApply);
} }
...@@ -185,6 +190,38 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA ...@@ -185,6 +190,38 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
@RequestMapping(value = "/steward/applyDetail", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "申请的详情")
public ObjectRestResponse stewardApplyDetail(Integer applyId) {
ShuntApply shuntApply = baseBiz.selectById(applyId);
ShuntApplyController.ShuntApplyVO shuntApplyVO = BeanUtil.toBean(shuntApply, ShuntApplyController.ShuntApplyVO.class);
shuntApplyVO.setVehicleModel(vehicleFeign.get(shuntApply.getModelId()).getData());
return ObjectRestResponse.succ(shuntApplyVO);
}
@RequestMapping(value = "/steward/myApplyList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "我的申请")
public ObjectRestResponse myApplyList(PageDTO dto) {
UserDTO userDTO = getAdminUserInfo();
PageDataVO<ShuntApplyController.ShuntApplyVO> pages = PageDataVO.pageInfo(dto.initQuery(), () -> baseBiz.selectByWeekend(w -> {
w.andEqualTo(ShuntApply::getConfirmUserId, userDTO.getId());
if(StrUtil.isNotBlank(dto.getMultiStatus())) {
w.andIn(ShuntApply::getStatus, CollUtil.toList(dto.getMultiStatus().split(",")));
}
return w;
}), ShuntApplyController.ShuntApplyVO.class);
pages.getData().forEach(data -> {
data.setVehicleModel(vehicleFeign.get(data.getModelId()).getData());
});
return ObjectRestResponse.succ(pages);
}
@Data @Data
public static class ConfirmApplyDTO { public static class ConfirmApplyDTO {
Integer applyId; Integer applyId;
...@@ -196,8 +233,22 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA ...@@ -196,8 +233,22 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
Integer cityCode; Integer cityCode;
} }
@Data
public static class PageDTO extends PageParam {
String multiStatus;
}
@Data @Data
public static class StewardShuntApply extends ShuntApply { public static class StewardShuntApply extends ShuntApply {
List<UsableVeicleVO> vehicles; List<UsableVeicleVO> vehicles;
VehicleModel vehicleModel;
public VehicleModel getVehicleModel() {
return vehicleModel;
}
public void setVehicleModel(VehicleModel vehicleModel) {
this.vehicleModel = vehicleModel;
}
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment