Commit d8e31222 by 徐高华

订单

parent c3f580ec
......@@ -41,8 +41,9 @@ public class GicOrderController {
private WebOrderManageApiService webOrderManageApiService;
// 发货订单列表 (待发货+待收货)
@RequestMapping("/list_order")
public RestResponse<Object> orderList(String enterpriseId, String clerkId, String search, BasePageInfo pageInfo) {
@RequestMapping("list-order")
public RestResponse<Object> orderList(String enterpriseId, String storeId, String clerkId, String search,
BasePageInfo pageInfo) {
// 查询门店
ListOrderManageQDTO qdto = new ListOrderManageQDTO();
qdto.setOrderShow(1);
......@@ -73,6 +74,7 @@ public class GicOrderController {
}
// 订单详情 (客户信息+收货地址+商品详情+订单信息 + 订单状态)
@RequestMapping("order-detail")
public RestResponse<Object> orderDetail(String enterpriseId, String clerkId, String searchParams,
@RequestParam(defaultValue = "1") int orderType, String orderId) {
ServiceResponse<OrderDetailDTO> ret = webOrderManageApiService.getOrderDetail(enterpriseId, orderId);
......@@ -109,7 +111,9 @@ public class GicOrderController {
}
// 订单发货商品列表
@RequestMapping("order-logistics-deliver")
public RestResponse<Object> orderDeliverList(String enterpriseId, String orderId) {
ServiceResponse<OrderDetailDTO> resp = this.webOrderManageApiService.getOrderDetail(enterpriseId, orderId);
List<OrderListItemVO> list = null;
return RestResponse.successResult(list);
}
......@@ -172,6 +176,5 @@ public class GicOrderController {
this.webOrderManageApiService.updateLogistics(qdto);
return RestResponse.successResult();
}
// 客户详情中的商城订单
}
......@@ -18,6 +18,12 @@ import com.gic.business.order.dto.ordermanage.OrderRefundConsultDTO;
import com.gic.business.order.dto.ordermanage.OrderRefundDetailDTO;
import com.gic.business.order.dto.ordermanage.OrderRefundExchangeListDTO;
import com.gic.business.order.dto.ordermanage.RefundAddressDTO;
import com.gic.business.order.qdto.aftersales.ExchangeAddressQDTO;
import com.gic.business.order.qdto.aftersales.ExchangeRefusedQDTO;
import com.gic.business.order.qdto.aftersales.ExchangeSellerAgreeApplyQDTO;
import com.gic.business.order.qdto.aftersales.RefundBaseQDTO;
import com.gic.business.order.qdto.aftersales.RefundRefusedQDTO;
import com.gic.business.order.qdto.aftersales.RefundSellerAgreeQDTO;
import com.gic.business.order.qdto.ordermanage.RefundExchangeQDTO;
import com.gic.business.order.service.ordermanage.MallSellerAddressApiService;
import com.gic.business.order.service.ordermanage.OrderRefundApiService;
......@@ -39,7 +45,7 @@ public class GicOrderRefundController {
@Autowired
private MallSellerAddressApiService mallSellerAddressApiService;
@Autowired
private AfterSalesManageApiService afterSalesManageApiService ;
private AfterSalesManageApiService afterSalesManageApiService;
/**
*
......@@ -78,21 +84,70 @@ public class GicOrderRefundController {
// 审批退款单
// 拒绝 1 , 同意2
// 拒绝收货 1 同意收货2
// step 1 申请 2收货
@RequestMapping(value = "audit-refund-order")
@ResponseBody
public RestResponse<Object> auditRefund(String enterpriseId, String orderRefundId,
@RequestParam(defaultValue = "1") int auditStatus, String clerkId, String remark) {
public RestResponse<Object> auditRefund(String enterpriseId, String orderRefundId, String memberId,
@RequestParam(defaultValue = "1") int auditStatus, String clerkId, String remark,
@RequestParam(defaultValue = "1") int step, RefundBaseQDTO baseQDTO, double applyRefundPrice) {
// 拒绝
if (auditStatus == 1) {
RefundRefusedQDTO qdto = EntityUtil.changeEntityNew(RefundRefusedQDTO.class, baseQDTO);
qdto.setOrderRefundId(orderRefundId);
if (step == 1) {
this.afterSalesManageApiService.refundSellerRefusedApply(enterpriseId, memberId, qdto);
}
if (step == 2) {
this.afterSalesManageApiService.refundSellerRefusedGoods(enterpriseId, memberId, qdto);
}
}
// 同意
if (auditStatus == 2) {
RefundSellerAgreeQDTO qdto = EntityUtil.changeEntityNew(RefundSellerAgreeQDTO.class, baseQDTO);
qdto.setApplyRefundPrice(applyRefundPrice);
qdto.setOrderRefundId(orderRefundId);
if (step == 1) {
this.afterSalesManageApiService.refundSellerConfirmApply(enterpriseId, memberId, qdto);
}
if (step == 2) {
this.afterSalesManageApiService.refundSellerConfirmGoods(enterpriseId, memberId, qdto);
}
}
return RestResponse.successResult();
}
// 审批换货单
// 拒绝 1 , 同意2
// 拒绝收货 1 同意收货2
// step 1 申请 2收货
@RequestMapping(value = "audit-exchange-order")
@ResponseBody
public RestResponse<Object> auditExchange(String enterpriseId, String orderRefundId,
@RequestParam(defaultValue = "1") int auditStatus, String clerkId, String remark) {
public RestResponse<Object> auditExchange(String enterpriseId, String orderExchangeId, String memberId,
@RequestParam(defaultValue = "1") int auditStatus, String clerkId, String remark, RefundBaseQDTO baseQDTO,
ExchangeAddressQDTO address, @RequestParam(defaultValue = "1") int step) {
// 拒绝
if (auditStatus == 1) {
ExchangeRefusedQDTO qdto = EntityUtil.changeEntityNew(ExchangeRefusedQDTO.class, baseQDTO);
qdto.setOrderExchangeId(orderExchangeId);
if (step == 1) {
this.afterSalesManageApiService.exchangeSellerRefused(enterpriseId, memberId, qdto);
}
if (step == 2) {
this.afterSalesManageApiService.exchangeSellerRefusedGoods(enterpriseId, memberId, qdto);
}
}
// 同意
if (auditStatus == 2) {
ExchangeSellerAgreeApplyQDTO qdto = EntityUtil.changeEntityNew(ExchangeSellerAgreeApplyQDTO.class,
baseQDTO);
if (step == 1) {
qdto.setExchangeAddress(address);
this.afterSalesManageApiService.exchangeSellerConfirm(enterpriseId, memberId, qdto);
}
if (step == 2) {
this.afterSalesManageApiService.exchangeSellerConfirmGoods(enterpriseId, memberId, qdto);
}
}
return RestResponse.successResult();
}
......
......@@ -17,8 +17,15 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.business.order.dto.ordermanage.DispatchGoodsInfoDTO;
import com.gic.business.order.dto.ordermanage.ListOrderDTO;
import com.gic.business.order.enums.OrderEnum;
import com.gic.business.order.qdto.ordermanage.ListOrderManageQDTO;
import com.gic.business.order.service.ordermanage.WebOrderManageApiService;
import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.PageHelperUtils;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.app.aggregation.api.dto.evaluation.CreateRecordRequest;
import com.gic.haoban.app.aggregation.api.dto.evaluation.OrderProductRequest;
......@@ -29,6 +36,7 @@ import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.web.controller.marketing.MemberMarketingController;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.qo.order.integral.ClerkQo;
import com.gic.haoban.manage.web.vo.order.OrderListVO;
import com.gic.haoban.manage.web.vo.order.integral.CheckVO;
import com.gic.haoban.manage.web.vo.order.integral.OrderCountVO;
import com.gic.haoban.manage.web.vo.order.integral.ProductSku;
......@@ -54,6 +62,8 @@ public class GicOrderVerificationController {
private static final org.apache.logging.log4j.Logger logger = LogManager.getLogger(MemberMarketingController.class);
@Autowired
private WebOrderManageApiService webOrderManageApiService;
@Autowired
private IntegralmallService integralmallService;
@Autowired
private OrderVerificationRecordApiService orderVerificationRecordApiService;
......@@ -74,12 +84,34 @@ public class GicOrderVerificationController {
*/
@RequestMapping("/mall-verification-list")
public RestResponse<Object> mallOrderList(String enterpriseId, String storeId, String clerkId, BasePageInfo page,
@RequestParam("1") int verificationType) {
return RestResponse.failure("9999", "订单查询不到");
@RequestParam("1") int verificationType, BasePageInfo pageInfo) {
ListOrderManageQDTO qdto = new ListOrderManageQDTO();
qdto.setOrderShow(1);
qdto.setOrderStep(9);
qdto.setBusinessType(OrderEnum.BusinessTypeEnum.MICRO_MALL.getType());
qdto.setDeliveryType(-1);
qdto.setEnterpriseId(enterpriseId);
qdto.setPageSizeZero(false);
qdto.setCount(false);
qdto.setPageNum(pageInfo.getPageNum());
qdto.setPageSize(pageInfo.getPageSize());
ServiceResponse<Page<ListOrderDTO>> ret = webOrderManageApiService.listOrder(qdto);
logger.info("订单信息={}", JSON.toJSONString(ret, true));
if (ret.isSuccess()) {
Page<OrderListVO> retPage = PageHelperUtils.changePageToCurrentPage(ret.getResult(), OrderListVO.class);
return RestResponse.successResult(retPage);
}
return RestResponse.failure(ret.getCode(), ret.getMessage());
}
@RequestMapping("/mall-verification-detail")
public RestResponse<Object> mallOrderDetail(String enterpriseId, String orderId) {
ServiceResponse<DispatchGoodsInfoDTO> resp = this.webOrderManageApiService.getDispatchGoodsInfo(enterpriseId,
orderId);
logger.info("核销订单详情={}", JSON.toJSONString(resp));
if (resp.isSuccess()) {
return RestResponse.successResult(resp.getResult());
}
return RestResponse.failure("9999", "订单查询不到");
}
......
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