|
@@ -12,8 +12,13 @@ import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.ParseUtils;
|
|
import com.fs.common.utils.ParseUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
|
|
+import com.fs.company.param.CompanyStoreOrderMoneyLogsListParam;
|
|
|
|
|
+import com.fs.company.service.ICompanyMoneyLogsService;
|
|
|
|
|
+import com.fs.company.vo.CompanyStoreOrderMoneyLogsVO;
|
|
|
import com.fs.erp.dto.ErpOrderQueryRequert;
|
|
import com.fs.erp.dto.ErpOrderQueryRequert;
|
|
|
import com.fs.erp.dto.ErpOrderQueryResponse;
|
|
import com.fs.erp.dto.ErpOrderQueryResponse;
|
|
|
|
|
+import com.fs.his.domain.FsStoreOrderScrmComment;
|
|
|
|
|
+import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.dto.ExpressInfoDTO;
|
|
import com.fs.his.dto.ExpressInfoDTO;
|
|
|
import com.fs.erp.service.IErpOrderService;
|
|
import com.fs.erp.service.IErpOrderService;
|
|
|
import com.fs.his.config.FsSysConfig;
|
|
import com.fs.his.config.FsSysConfig;
|
|
@@ -21,25 +26,28 @@ import com.fs.his.dto.FsProdItemDTO;
|
|
|
import com.fs.his.enums.ShipperCodeEnum;
|
|
import com.fs.his.enums.ShipperCodeEnum;
|
|
|
import com.fs.his.param.FsStoreOrderSalesParam;
|
|
import com.fs.his.param.FsStoreOrderSalesParam;
|
|
|
import com.fs.his.service.IFsExpressService;
|
|
import com.fs.his.service.IFsExpressService;
|
|
|
|
|
+import com.fs.his.service.IFsStoreOrderScrmCommentService;
|
|
|
|
|
+import com.fs.his.service.IFsUserService;
|
|
|
import com.fs.his.utils.ConfigUtil;
|
|
import com.fs.his.utils.ConfigUtil;
|
|
|
import com.fs.his.vo.FsStoreOrderExcelVO;
|
|
import com.fs.his.vo.FsStoreOrderExcelVO;
|
|
|
import com.fs.his.vo.FsStoreOrderStoreExcelVO;
|
|
import com.fs.his.vo.FsStoreOrderStoreExcelVO;
|
|
|
-import com.fs.hisStore.domain.FsStoreOrderItemScrm;
|
|
|
|
|
-import com.fs.hisStore.domain.FsStoreOrderLogsScrm;
|
|
|
|
|
-import com.fs.hisStore.domain.FsStoreOrderScrm;
|
|
|
|
|
|
|
+import com.fs.hisStore.domain.*;
|
|
|
import com.fs.hisStore.mapper.FsStoreOrderItemScrmMapper;
|
|
import com.fs.hisStore.mapper.FsStoreOrderItemScrmMapper;
|
|
|
import com.fs.hisStore.param.FsStoreOrderExpressEditParam;
|
|
import com.fs.hisStore.param.FsStoreOrderExpressEditParam;
|
|
|
import com.fs.hisStore.param.FsStoreOrderParam;
|
|
import com.fs.hisStore.param.FsStoreOrderParam;
|
|
|
-import com.fs.hisStore.service.IFsStoreOrderScrmService;
|
|
|
|
|
|
|
+import com.fs.hisStore.service.*;
|
|
|
import com.fs.hisStore.utils.UserUtil;
|
|
import com.fs.hisStore.utils.UserUtil;
|
|
|
|
|
+import com.fs.hisStore.vo.FsStoreOrderAuditLogVO;
|
|
|
import com.fs.hisStore.vo.FsStoreOrderVO;
|
|
import com.fs.hisStore.vo.FsStoreOrderVO;
|
|
|
import com.fs.hisStore.vo.FsStoreProductDeliverExcelVO;
|
|
import com.fs.hisStore.vo.FsStoreProductDeliverExcelVO;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -52,6 +60,9 @@ import java.util.List;
|
|
|
@RequestMapping("/store/store/storeOrder")
|
|
@RequestMapping("/store/store/storeOrder")
|
|
|
public class FsStoreOrderScrmController extends BaseController
|
|
public class FsStoreOrderScrmController extends BaseController
|
|
|
{
|
|
{
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsUserService userService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IFsStoreOrderScrmService fsStoreOrderService;
|
|
private IFsStoreOrderScrmService fsStoreOrderService;
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -61,6 +72,9 @@ public class FsStoreOrderScrmController extends BaseController
|
|
|
IErpOrderService erpOrderService;
|
|
IErpOrderService erpOrderService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
FsStoreOrderItemScrmMapper fsStoreOrderItemMapper;
|
|
FsStoreOrderItemScrmMapper fsStoreOrderItemMapper;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsStoreOrderItemScrmService orderItemService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ConfigUtil configUtil;
|
|
private ConfigUtil configUtil;
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -83,6 +97,18 @@ public class FsStoreOrderScrmController extends BaseController
|
|
|
@Qualifier("k9OrderScrmServiceImpl")
|
|
@Qualifier("k9OrderScrmServiceImpl")
|
|
|
private IErpOrderService k9OrderService;
|
|
private IErpOrderService k9OrderService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsStoreOrderStatusScrmService orderStatusService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ IFsStorePaymentScrmService paymentService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ICompanyMoneyLogsService moneyLogsService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsStoreOrderAuditLogScrmService orderAuditLogService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查询订单列表
|
|
* 查询订单列表
|
|
|
*/
|
|
*/
|
|
@@ -153,17 +179,50 @@ public class FsStoreOrderScrmController extends BaseController
|
|
|
return AjaxResult.success(message);
|
|
return AjaxResult.success(message);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ IFsStoreOrderScrmCommentService fsStoreOrderScrmCommentService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 获取订单详细信息
|
|
* 获取订单详细信息
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
@GetMapping(value = "/{orderId}")
|
|
@GetMapping(value = "/{orderId}")
|
|
|
- public AjaxResult getInfo(@PathVariable("orderId") Long orderId)
|
|
|
|
|
- {
|
|
|
|
|
- FsStoreOrderScrm fsStoreOrder = fsStoreOrderService.selectFsStoreOrderByOrderId(orderId);
|
|
|
|
|
- fsStoreOrder.setUserAddress(ParseUtils.parseAddress(fsStoreOrder.getUserAddress()));
|
|
|
|
|
- fsStoreOrder.setUserPhone(ParseUtils.parsePhone(fsStoreOrder.getUserPhone()));
|
|
|
|
|
- return AjaxResult.success(fsStoreOrder);
|
|
|
|
|
|
|
+ public R getInfo(@PathVariable("orderId") Long id) {
|
|
|
|
|
+ FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(id);
|
|
|
|
|
+ order.setUserPhone(ParseUtils.parsePhone(order.getUserPhone()));
|
|
|
|
|
+ order.setUserAddress(ParseUtils.parseAddress(order.getUserAddress()));
|
|
|
|
|
+ //填充用户评论内容
|
|
|
|
|
+ FsStoreOrderScrmComment comment = fsStoreOrderScrmCommentService.getCommentByOrderId(order.getId());
|
|
|
|
|
+ if(null != comment){
|
|
|
|
|
+ order.setCommentContent(comment.getContent());
|
|
|
|
|
+ order.setCommentImageUrl(comment.getImageUrl());
|
|
|
|
|
+ order.setRating(comment.getRating());
|
|
|
|
|
+ order.setMerchantReply(comment.getMerchantReply());
|
|
|
|
|
+ order.setCommentTime(comment.getCreateTime());
|
|
|
|
|
+ order.setCommentId(comment.getCommentId());
|
|
|
|
|
+ }
|
|
|
|
|
+ FsUser user = userService.selectFsUserById(order.getUserId());
|
|
|
|
|
+ if (user != null) {
|
|
|
|
|
+ user.setPhone(ParseUtils.parsePhone(user.getPhone()));
|
|
|
|
|
+ }
|
|
|
|
|
+ FsStoreOrderItemScrm itemMap = new FsStoreOrderItemScrm();
|
|
|
|
|
+ itemMap.setOrderId(order.getId());
|
|
|
|
|
+ List<FsStoreOrderItemScrm> items = orderItemService.selectFsStoreOrderItemList(itemMap);
|
|
|
|
|
+ FsStoreOrderStatusScrm statusMap = new FsStoreOrderStatusScrm();
|
|
|
|
|
+ statusMap.setOrderId(order.getId());
|
|
|
|
|
+ List<FsStoreOrderStatusScrm> logs = orderStatusService.selectFsStoreOrderStatusList(statusMap);
|
|
|
|
|
+ List<FsStorePaymentScrm> payments=paymentService.selectFsStorePaymentByOrderId(order.getId());
|
|
|
|
|
+ List<CompanyStoreOrderMoneyLogsVO> tuiMoneyLogs=new ArrayList<>();
|
|
|
|
|
+ if(order.getCompanyId()!=null){
|
|
|
|
|
+ CompanyStoreOrderMoneyLogsListParam moneyLogsMap=new CompanyStoreOrderMoneyLogsListParam();
|
|
|
|
|
+ moneyLogsMap.setCompanyId(order.getCompanyId());
|
|
|
|
|
+ moneyLogsMap.setBusinessId(order.getId().toString());
|
|
|
|
|
+ tuiMoneyLogs=moneyLogsService.selectCompanyStoreOrderMoneyLogsList(moneyLogsMap);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ List<FsStoreOrderAuditLogVO> auditLogs = orderAuditLogService.selectStoreOrderAuditLogVOByOrderId(order.getId());
|
|
|
|
|
+ return R.ok().put("order", order).put("items", items).put("logs", logs).put("user", user).put("payments",payments).put("tuiMoneyLogs",tuiMoneyLogs)
|
|
|
|
|
+ .put("auditLogs",auditLogs);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -381,4 +440,15 @@ public class FsStoreOrderScrmController extends BaseController
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改物流
|
|
|
|
|
+ * @param fsStoreOrder
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @Log(title = "修改物流", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PutMapping("/editDeliveryId")
|
|
|
|
|
+ public AjaxResult editDeliveryId(@RequestBody FsStoreOrderScrm fsStoreOrder) {
|
|
|
|
|
+ return toAjax(fsStoreOrderService.updateFsStoreOrder(fsStoreOrder));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|