1
This commit is contained in:
@@ -2,13 +2,15 @@ package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.jarvis.domain.OrderRows;
|
||||
import com.ruoyi.jarvis.service.impl.GroupRebateExcelImportService;
|
||||
import com.ruoyi.jarvis.service.IOrderRowsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
@@ -34,11 +36,15 @@ public class JDOrderListController extends BaseController
|
||||
private final IJDOrderService jdOrderService;
|
||||
private final IOrderRowsService orderRowsService;
|
||||
private final IInstructionService instructionService;
|
||||
private final GroupRebateExcelImportService groupRebateExcelImportService;
|
||||
|
||||
public JDOrderListController(IJDOrderService jdOrderService, IOrderRowsService orderRowsService, IInstructionService instructionService) {
|
||||
public JDOrderListController(IJDOrderService jdOrderService, IOrderRowsService orderRowsService,
|
||||
IInstructionService instructionService,
|
||||
GroupRebateExcelImportService groupRebateExcelImportService) {
|
||||
this.jdOrderService = jdOrderService;
|
||||
this.orderRowsService = orderRowsService;
|
||||
this.instructionService = instructionService;
|
||||
this.groupRebateExcelImportService = groupRebateExcelImportService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,6 +80,14 @@ public class JDOrderListController extends BaseController
|
||||
if (orderSearch != null && !orderSearch.trim().isEmpty()) {
|
||||
query.getParams().put("orderSearch", orderSearch.trim());
|
||||
}
|
||||
|
||||
String rebateRemarkAbnormal = request.getParameter("rebateRemarkHasAbnormal");
|
||||
if (rebateRemarkAbnormal != null && !rebateRemarkAbnormal.isEmpty()) {
|
||||
query.setRebateRemarkHasAbnormal(Integer.valueOf(rebateRemarkAbnormal));
|
||||
}
|
||||
if ("true".equalsIgnoreCase(request.getParameter("hasRebateRemark"))) {
|
||||
query.getParams().put("hasRebateRemark", true);
|
||||
}
|
||||
|
||||
java.util.List<JDOrder> list;
|
||||
if (orderBy != null && !orderBy.isEmpty()) {
|
||||
@@ -128,6 +142,24 @@ public class JDOrderListController extends BaseController
|
||||
/**
|
||||
* 导出JD订单列表
|
||||
*/
|
||||
/**
|
||||
* 导入跟团返现类 Excel:按「单号/订单号」匹配系统订单,将「是否返现」「总共返现」等写入后返备注(可多次导入累加)
|
||||
*/
|
||||
@Log(title = "JD订单后返表导入", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importGroupRebateExcel")
|
||||
public AjaxResult importGroupRebateExcel(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam(value = "documentTitle", required = false) String documentTitle) {
|
||||
try {
|
||||
Map<String, Object> data = groupRebateExcelImportService.importExcel(file, documentTitle);
|
||||
if (Boolean.FALSE.equals(data.get("success"))) {
|
||||
return AjaxResult.error(String.valueOf(data.get("message")));
|
||||
}
|
||||
return AjaxResult.success(data);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("导入失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "JD订单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, JDOrder jdOrder) throws IOException
|
||||
|
||||
Reference in New Issue
Block a user