优化私域订单管理

This commit is contained in:
Richie 2025-04-22 09:42:12 +08:00
parent 21818f8954
commit f1598d62a5
17 changed files with 4 additions and 1141 deletions

View File

@ -1,26 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//import cn.qihangerp.common.PageQuery;
//
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.oms.service.ErpSaleAfterInfoService;
//
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//@AllArgsConstructor
//@RestController
//@RequestMapping("/afterSale")
//public class AfterSaleController extends BaseController {
// private final ErpSaleAfterInfoService afterInfoService;
//
// @GetMapping("/list")
// public TableDataInfo list(ErpSaleAfterInfo bo, PageQuery pageQuery)
// {
// var pageList = afterInfoService.queryPageList(bo,pageQuery);
// return getDataTable(pageList);
// }
//}

View File

@ -1,101 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//import cn.qihangerp.common.PageQuery;
//import cn.qihangerp.common.PageResult;
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.module.order.domain.OAfterSale;
//import cn.qihangerp.module.order.service.OAfterSaleService;
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//@AllArgsConstructor
//@RestController
//@RequestMapping("/afterSale")
//public class AfterSaleProcessingController extends BaseController {
// private final OAfterSaleService afterSaleService;
// /**
// * 查询列表
// */
// @GetMapping("/list")
// public TableDataInfo ship_again_list(OAfterSale bo, PageQuery pageQuery)
// {
// //private final OAfterSaleMapper mapper;
// // @Override
// // public PageResult<OAfterSale> queryPageList(OAfterSale bo, PageQuery pageQuery) {
// // LambdaQueryWrapper<OAfterSale> queryWrapper = new LambdaQueryWrapper<OAfterSale>().
// // eq( OAfterSale::getType, bo.getType())
// // .eq(bo.getShopId() != null, OAfterSale::getShopId, bo.getShopId());
// //
// // Page<OAfterSale> pages = mapper.selectPage(pageQuery.build(), queryWrapper);
// // return PageResult.build(pages);
// // }
//// bo.setType(80);
// PageResult<OAfterSale> result = afterSaleService.queryPageList(bo, pageQuery);
// return getDataTable(result);
// }
//
//// @PostMapping("/shipAgain")
//// public AjaxResult shipAgainAdd(@RequestBody ErpAfterSale addBo)
//// {
//// addBo.setType(80);
//// addBo.setCreateTime(new Date());
//// addBo.setCreateBy("手动添加");
//// addBo.setStatus(1);
//// var result = afterSaleService.save(addBo);
//// return toAjax(result);
//// }
////
//// @PutMapping("/shipAgain/complete/{id}")
//// public AjaxResult completeShipAgain(@PathVariable Long id)
//// {
//// ErpAfterSale complete = new ErpAfterSale();
//// complete.setId(id.toString());
//// complete.setStatus(2);
//// complete.setUpdateTime(new Date());
//// complete.setUpdateBy("手动完成");
//// afterSaleService.updateById(complete);
//// return toAjax(1);
//// }
////
////
//// @GetMapping("/returned_list")
//// public TableDataInfo returned_list(ErpAfterSale bo, PageQuery pageQuery)
//// {
//// bo.setType(10);
//// PageResult<ErpAfterSale> result = afterSaleService.queryPageList(bo, pageQuery);
//// return getDataTable(result);
//// }
////
//// @GetMapping("/exchange_list")
//// public TableDataInfo exchange_list(ErpAfterSale bo, PageQuery pageQuery)
//// {
//// bo.setType(20);
//// PageResult<ErpAfterSale> result = afterSaleService.queryPageList(bo, pageQuery);
//// return getDataTable(result);
//// }
////
//// @PostMapping("/exchange")
//// public AjaxResult exchangeAdd(@RequestBody ErpAfterSale addBo)
//// {
//// addBo.setType(20);
//// addBo.setCreateTime(new Date());
//// addBo.setCreateBy("手动添加");
//// addBo.setStatus(1);
//// var result = afterSaleService.save(addBo);
//// return toAjax(result);
//// }
////
//// @GetMapping("/intercept_list")
//// public TableDataInfo intercept_list(ErpAfterSale bo, PageQuery pageQuery)
//// {
//// bo.setType(99);
//// PageResult<ErpAfterSale> result = afterSaleService.queryPageList(bo, pageQuery);
//// return getDataTable(result);
//// }
//
//
//}

View File

@ -1,72 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//
//import cn.qihangerp.common.AjaxResult;
//import cn.qihangerp.common.PageQuery;
//
//
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.module.goods.domain.OGoodsBrand;
//import cn.qihangerp.module.goods.service.OGoodsBrandService;
//
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.Arrays;
//import java.util.Date;
//
//@AllArgsConstructor
//@RestController
//@RequestMapping("/goods_brand")
//public class GoodsBrandController extends BaseController {
// private final OGoodsBrandService brandService;
// @GetMapping("/list")
// public TableDataInfo skuList(OGoodsBrand bo, PageQuery pageQuery)
// {
// var pageList = brandService.queryPageList(bo,pageQuery);
// return getDataTable(pageList);
// }
//
// /**
// * 获取商品品牌详细信息
// */
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// return success(brandService.getById(id));
// }
//
// /**
// * 新增商品品牌
// */
// @PostMapping
// public AjaxResult add(@RequestBody OGoodsBrand erpGoodsBrand)
// {
// erpGoodsBrand.setStatus(1);
// erpGoodsBrand.setCreateBy(getUsername());
// erpGoodsBrand.setCreateTime(new Date());
// return toAjax(brandService.save(erpGoodsBrand));
// }
//
// /**
// * 修改商品品牌
// */
// @PutMapping
// public AjaxResult edit(@RequestBody OGoodsBrand erpGoodsBrand)
// {
// erpGoodsBrand.setUpdateBy(getUsername());
// erpGoodsBrand.setUpdateTime(new Date());
// return toAjax(brandService.updateById(erpGoodsBrand));
// }
//
// /**
// * 删除商品品牌
// */
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(brandService.removeByIds(Arrays.stream(ids).toList()));
// }
//}

View File

@ -1,142 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//
//import cn.qihangerp.common.AjaxResult;
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.module.goods.domain.OGoodsCategory;
//import cn.qihangerp.module.goods.domain.OGoodsCategoryAttribute;
//import cn.qihangerp.module.goods.domain.OGoodsCategoryAttributeValue;
//import cn.qihangerp.module.goods.service.OGoodsCategoryAttributeService;
//import cn.qihangerp.module.goods.service.OGoodsCategoryAttributeValueService;
//import cn.qihangerp.module.goods.service.OGoodsCategoryService;
//import cn.qihangerp.security.common.BaseController;
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.Arrays;
//import java.util.Date;
//
//@AllArgsConstructor
//@RestController
//@RequestMapping("/goods_category")
//public class GoodsCategoryController extends BaseController {
// private final OGoodsCategoryService categoryService;
// private final OGoodsCategoryAttributeService categoryAttributeService;
// private final OGoodsCategoryAttributeValueService categoryAttributeValueService;
//
// @GetMapping("/list")
// public TableDataInfo categoryList()
// {
// var pageList = categoryService.list();
// return getDataTable(pageList);
// }
//
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// return success(categoryService.getById(id));
// }
//
// @PostMapping
// public AjaxResult add(@RequestBody OGoodsCategory category)
// {
// category.setCreateBy(getUsername());
// categoryService.addCategory(category);
// return toAjax(1);
// }
//
// @PutMapping
// public AjaxResult edit(@RequestBody OGoodsCategory category)
// {
// category.setUpdateBy(getUsername());
// category.setUpdateTime(new Date());
// return toAjax(categoryService.updateById(category));
// }
// /**
// * 删除分类
// * @param ids
// * @return
// */
// @DeleteMapping("/del/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(categoryService.removeByIds(Arrays.stream(ids).toList()));
// }
//
// /**
// * 分类属性列表
// * @param categoryId
// * @return
// */
// @GetMapping("/attribute_list")
// public TableDataInfo attributeList(Integer categoryId)
// {
// var pageList = categoryAttributeService.list(new LambdaQueryWrapper<OGoodsCategoryAttribute>().eq(OGoodsCategoryAttribute::getCategoryId,categoryId));
// return getDataTable(pageList);
// }
//
// /**
// * 分类属性添加
// * @param attribute
// * @return
// */
// @PostMapping("/attribute_add")
// public AjaxResult attributeAdd(@RequestBody OGoodsCategoryAttribute attribute)
// {
// return toAjax(categoryAttributeService.save(attribute));
// }
//
// @GetMapping(value = "/attribute/{id}")
// public AjaxResult getAttributeInfo(@PathVariable("id") Long id)
// {
// return success(categoryAttributeService.getById(id));
// }
//
// @PutMapping("/attribute")
// public AjaxResult attributeEdit(@RequestBody OGoodsCategoryAttribute attribute)
// {
// return toAjax(categoryAttributeService.updateById(attribute));
// }
// @DeleteMapping("/attribute/{ids}")
// public AjaxResult attributeRemove(@PathVariable Long[] ids)
// {
// return toAjax(categoryAttributeService.removeByIds(Arrays.stream(ids).toList()));
// }
//
// @GetMapping("/attribute_value_list")
// public TableDataInfo attributeValueList(Integer categoryAttributeId)
// {
// var pageList = categoryAttributeValueService.list(
// new LambdaQueryWrapper<OGoodsCategoryAttributeValue>().eq(OGoodsCategoryAttributeValue::getCategoryAttributeId,categoryAttributeId));
// return getDataTable(pageList);
//
// }
//
// @PostMapping("/attribute_value")
// public AjaxResult add(@RequestBody OGoodsCategoryAttributeValue attributeValue)
// {
// return toAjax(categoryAttributeValueService.save(attributeValue));
// }
// @GetMapping(value = "/attribute_value/{id}")
// public AjaxResult getAttributeValueInfo(@PathVariable("id") Long id)
// {
// return success(categoryAttributeValueService.getById(id));
// }
//
// @PutMapping("/attribute_value")
// public AjaxResult attributeValueEdit(@RequestBody OGoodsCategoryAttributeValue attributeValue)
// {
// return toAjax(categoryAttributeValueService.updateById(attributeValue));
// }
//
// /**
// * 删除商品分类属性值
// */
// @DeleteMapping("/attribute_value/{ids}")
// public AjaxResult removeAttributeValue(@PathVariable Long[] ids)
// {
// return toAjax(categoryAttributeValueService.removeByIds(Arrays.stream(ids).toList()));
// }
//}

View File

@ -1,247 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//
//import cn.qihangerp.common.PageQuery;
//import cn.qihangerp.common.PageResult;
//import cn.qihangerp.common.ResultVo;
//import cn.qihangerp.common.AjaxResult;
//import cn.qihangerp.common.TableDataInfo;
//
//
//import cn.qihangerp.module.goods.domain.OGoods;
//import cn.qihangerp.module.goods.domain.OGoodsSku;
//import cn.qihangerp.module.goods.domain.bo.GoodsAddBo;
//import cn.qihangerp.module.goods.domain.vo.GoodsSpecListVo;
//import cn.qihangerp.module.goods.service.OGoodsService;
//
//
//import cn.qihangerp.module.goods.service.OGoodsSkuService;
//import cn.qihangerp.security.common.BaseController;
//import com.fasterxml.jackson.databind.exc.InvalidFormatException;
//import lombok.AllArgsConstructor;
//import org.apache.poi.hssf.usermodel.HSSFWorkbook;
//import org.apache.poi.ss.usermodel.*;
//import org.apache.poi.ss.util.NumberToTextConverter;
//import org.apache.poi.xssf.usermodel.XSSFWorkbook;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.util.StringUtils;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile;
//
//import java.io.File;
//import java.io.FileInputStream;
//import java.io.IOException;
//import java.io.InputStream;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
///**
// * 商品管理Controller
// *
// * @author qihang
// * @date 2023-12-29
// */
//@AllArgsConstructor
//@RestController
//@RequestMapping("/goods")
//public class GoodsController extends BaseController
//{
// private final OGoodsService goodsService;
// private final OGoodsSkuService skuService;
//
// /**
// * 搜索商品SKU
// * 条件商品编码SKU商品名称
// */
// @GetMapping("/searchSku")
// public TableDataInfo searchSkuBy(String keyword)
// {
// List<GoodsSpecListVo> list = goodsService.searchGoodsSpec(keyword);
// return getDataTable(list);
// }
//
// @GetMapping("/sku_list")
// public TableDataInfo skuList(OGoodsSku bo, PageQuery pageQuery)
// {
// var pageList = goodsService.querySkuPageList(bo,pageQuery);
// return getDataTable(pageList);
// }
//
// /**
// * 查询商品管理列表
// */
// @PreAuthorize("@ss.hasPermi('goods:goods:list')")
// @GetMapping("/list")
// public TableDataInfo list(OGoods goods, PageQuery pageQuery)
// {
// PageResult<OGoods> pageList = goodsService.queryPageList(goods, pageQuery);
// return getDataTable(pageList);
// }
//
// /**
// * 获取商品管理详细信息
// */
// @PreAuthorize("@ss.hasPermi('goods:goods:query')")
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// return success(goodsService.selectGoodsById(id));
// }
// /**
// * 获取商品管理详细信息
// */
// @PreAuthorize("@ss.hasPermi('goods:goods:query')")
// @GetMapping(value = "/sku/{id}")
// public AjaxResult getSkuInfo(@PathVariable("id") Long id)
// {
// return success(skuService.getById(id));
// }
// /**
// * 新增商品管理
// */
// @PreAuthorize("@ss.hasPermi('goods:goods:add')")
// @PostMapping("/add")
// public AjaxResult add(@RequestBody GoodsAddBo goods)
// {
// ResultVo<Long> resultVo = goodsService.insertGoods(getUsername(), goods);
// if(resultVo.getCode()!=0) return AjaxResult.error(resultVo.getMsg());
// else return AjaxResult.success(resultVo.getData());
//// goods.setCreateBy(getUsername());
//// int result = goodsService.insertGoods(goods);
//// if(result == -1) new AjaxResult(501,"商品编码已存在");
//// return toAjax(1);
// }
//
// @PreAuthorize("@ss.hasPermi('goods:goods:add')")
// @PostMapping("/goodsSku")
// public AjaxResult addSku(@RequestBody OGoodsSku goodsSku)
// {
//
// int result = goodsService.insertGoodsSku(goodsSku);
// if(result == -1) new AjaxResult(501,"商品编码已存在");
// return toAjax(1);
// }
//
// /**
// * 修改商品管理
// */
// @PreAuthorize("@ss.hasPermi('goods:goods:edit')")
// @PutMapping
// public AjaxResult edit(@RequestBody OGoods goods)
// {
// return toAjax(goodsService.updateGoods(goods));
// }
//
// /**
// * 修改商品基本资料
// * @param sku
// * @return
// */
// @PutMapping("/sku")
// public AjaxResult editSku(@RequestBody OGoodsSku sku)
// {
// return toAjax(skuService.updateById(sku));
// }
//
// /**
// * 删除商品管理
// */
// @PreAuthorize("@ss.hasPermi('goods:goods:remove')")
// @DeleteMapping("/del/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// int result = goodsService.deleteGoodsByIds(ids);
// if(result==0) return AjaxResult.success();
// else if (result==-100) return AjaxResult.error("有关联的订单,不能删除!");
// else return AjaxResult.error();
// }
//
// @RequestMapping(value = "/goods_sku_import", method = RequestMethod.POST)
// public AjaxResult orderSendExcel(@RequestPart("file") MultipartFile file) throws IOException, InvalidFormatException {
//
// String fileName = file.getOriginalFilename();
// String dir = System.getProperty("user.dir");
// String destFileName = dir + File.separator + "/import/uploadedfiles_" + fileName;
// System.out.println(destFileName);
// File destFile = new File(destFileName);
// file.transferTo(destFile);
// InputStream fis = null;
// fis = new FileInputStream(destFileName);
// if (fis == null) return AjaxResult.error("没有文件");
//
// Workbook workbook = null;
//
// try {
// if (fileName.toLowerCase().endsWith("xlsx")) {
// workbook = new XSSFWorkbook(fis);
// } else if (fileName.toLowerCase().endsWith("xls")) {
// workbook = new HSSFWorkbook(fis);
// }
// // workbook = new HSSFWorkbook(fis);
// } catch (Exception ex) {
// return AjaxResult.error(ex.getMessage());
// }
//
// if (workbook == null) return AjaxResult.error(502, "未读取到Excel文件");
//
// /****************开始处理excel****************/
// int success = 0;
// int fail = 0;
// Sheet sheet = null;
// try {
// sheet = workbook.getSheetAt(0);
// int lastRowNum = sheet.getLastRowNum();//最后一行索引
// Row row = null;
//
// for (int i = 1; i <= lastRowNum; i++) {
// row = sheet.getRow(i);
// //数据
// OGoodsSku sku = new OGoodsSku();
// for(int c=0;c<6;c++){
// Cell cell = row.getCell(c);
// String cellValue = "";
// if (cell != null) {
// if (cell.getCellType() == CellType.STRING) {
// cellValue = cell.getStringCellValue().replace("\t", "");
// } else if (cell.getCellType() == CellType.NUMERIC) {
// cellValue = NumberToTextConverter.toText(cell.getNumericCellValue()).replace("\t", "");
// }
// }
// if(c == 1) {
// if(StringUtils.hasText(cellValue) ){
// sku.setOuterErpGoodsId(cellValue);
// }else {
// sku.setOuterErpGoodsId("0");
// }
// }
// if(StringUtils.hasText(cellValue)) {
// if (c == 0) {
// sku.setOuterErpSkuId(cellValue);
// } else if (c == 2) {
// sku.setSkuCode(cellValue);
// } else if (c == 3) {
// sku.setSkuName(cellValue);
// } else if (c == 4) {
// sku.setColorImage(cellValue);
// } else if (c == 5) {
// sku.setRemark(cellValue);
// }
// }
// }
// goodsService.insertGoodsSku(sku);
// success++;
// }
//
//
// } catch (Exception ex) {
// fail++;
// ex.printStackTrace();
// }
// Map<String, Integer> result = new HashMap<>();
// result.put("success",success);
// result.put("fail",fail);
// return AjaxResult.success(result);
// }
//}

View File

@ -1,47 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//import cn.qihangerp.common.PageQuery;
//import cn.qihangerp.common.PageResult;
//
//import cn.qihangerp.common.AjaxResult;
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.module.goods.domain.OGoodsInventory;
//import cn.qihangerp.module.goods.domain.OGoodsInventoryBatch;
//import cn.qihangerp.module.goods.service.OGoodsInventoryBatchService;
//import cn.qihangerp.module.goods.service.OGoodsInventoryService;
//import cn.qihangerp.security.common.BaseController;
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//@AllArgsConstructor
//@RestController
//@RequestMapping("/goodsInventory")
//public class GoodsInventoryController extends BaseController {
// private final OGoodsInventoryService goodsInventoryService;
// private final OGoodsInventoryBatchService inventoryBatchService;
//
// @GetMapping("/list")
// public TableDataInfo list(OGoodsInventory bo, PageQuery pageQuery)
// {
// PageResult<OGoodsInventory> pageResult = goodsInventoryService.queryPageList(bo, pageQuery);
// return getDataTable(pageResult);
// }
//
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// OGoodsInventory goodsInventory = goodsInventoryService.getById(id);
// if(goodsInventory!=null) {
// List<OGoodsInventoryBatch> list = inventoryBatchService.list(new LambdaQueryWrapper<OGoodsInventoryBatch>().eq(OGoodsInventoryBatch::getSkuId, goodsInventory.getSkuId()));
// return AjaxResult.success(list);
// }
// return success();
// }
//}

View File

@ -1,67 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//import cn.qihangerp.common.PageQuery;
//
//import cn.qihangerp.common.AjaxResult;
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.module.goods.domain.OGoodsSupplier;
//import cn.qihangerp.module.goods.service.OGoodsSupplierService;
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.Arrays;
//import java.util.Date;
//
//@AllArgsConstructor
//@RestController
//@RequestMapping("/supplier")
//public class GoodsSupplierController extends BaseController {
// private final OGoodsSupplierService supplierService;
//
// @GetMapping("/list")
// public TableDataInfo list(OGoodsSupplier bo, PageQuery pageQuery)
// {
// var pageList = supplierService.queryPageList(bo,pageQuery);
// return getDataTable(pageList);
// }
//
// /**
// * 获取请填写功能名称详细信息
// */
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// return success(supplierService.getById(id));
// }
//
// /**
// * 新增请填写功能名称
// */
// @PostMapping
// public AjaxResult add(@RequestBody OGoodsSupplier scmSupplier)
// {
// scmSupplier.setCreatetime(new Date());
// scmSupplier.setIsdelete(0);
// return toAjax(supplierService.save(scmSupplier));
// }
//
// /**
// * 修改请填写功能名称
// */
// @PutMapping
// public AjaxResult edit(@RequestBody OGoodsSupplier scmSupplier)
// {
// return toAjax(supplierService.updateById(scmSupplier));
// }
//
// /**
// * 删除请填写功能名称
// */
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(supplierService.removeByIds(Arrays.stream(ids).toList()));
// }
//}

View File

@ -1,113 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//
//import cn.qihangerp.common.AjaxResult;
//import cn.qihangerp.common.PageQuery;
//import cn.qihangerp.common.TableDataInfo;
//
//import cn.qihangerp.module.order.service.OOrderItemService;
//import cn.qihangerp.module.order.service.OOrderService;
//import cn.qihangerp.request.OrderSearchRequest;
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.web.bind.annotation.*;
//
///**
// * 店铺订单Controller
// *
// * @author qihang
// * @date 2023-12-31
// */
//@AllArgsConstructor
//@RestController
//@RequestMapping("/order")
//public class OrderController extends BaseController
//{
//
// private final OOrderService orderService;
// private final OOrderItemService orderItemService;
//
// /**
// * 查询店铺订单列表
// */
// @PreAuthorize("@ss.hasPermi('shop:order:list')")
// @GetMapping("/list")
// public TableDataInfo list(OrderSearchRequest bo, PageQuery pageQuery)
// {
// var pageList = orderService.queryPageList(bo,pageQuery);
// return getDataTable(pageList);
// }
//
//
// /**
// * 获取店铺订单详细信息
// */
// @PreAuthorize("@ss.hasPermi('shop:order:query')")
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// return success(orderService.queryDetailById(id));
// }
//
// /**
// * 推送订单到ERP
// * @param ids
// * @return
// */
// @PostMapping("/pushErp/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids) {
//// for (Long id : ids) {
//// OOrder oOrder = orderService.getById(id);
//// if (oOrder != null) {
//// oOrder.setItemList(orderItemService.getOrderItemListByOrderId(id));
//// ResultVo resultVo = erpPushHelper.pushOrderSingle(oOrder);
//// OOrder pushUpdate = new OOrder();
//// if (oOrder.getOrderStatus() == 1 || oOrder.getOrderStatus() == 2 || oOrder.getOrderStatus() == 3) {
//// // 待发货已发货已完成 订单推送
//// pushUpdate.setErpPushStatus(resultVo.getCode() == 0 ? 200 : resultVo.getCode());
////
//// } else if (oOrder.getOrderStatus() == 11) {
//// pushUpdate.setErpPushStatus(resultVo.getCode() == 0 ? 100 : resultVo.getCode());//推送状态200 订单推送成功 100 取消订单推送成功
//// }
//// pushUpdate.setErpPushResult(resultVo.getMsg());
//// pushUpdate.setErpPushTime(new Date());
//// pushUpdate.setUpdateBy("手动推送到ERP");
//// pushUpdate.setUpdateTime(new Date());
//// pushUpdate.setId(id.toString());
//// orderService.updateById(pushUpdate);
//// }
//// }
//
// return success();
// }
//// @PostMapping
//// public AjaxResult add(@RequestBody OrderCreateBo order)
//// {
//// if(order.getGoodsAmount()==null)return new AjaxResult(1503,"请填写商品价格!");
////
//// int result = orderService.insertErpOrder(order,getUsername());
//// if(result == -1) return new AjaxResult(501,"订单号已存在!");
//// if(result == -2) return new AjaxResult(502,"请添加订单商品!");
//// if(result == -3) return new AjaxResult(503,"请完善订单商品明细!");
//// if(result == -4) return new AjaxResult(504,"请选择店铺!");
//// return toAjax(result);
//// }
//// /**
//// * 订单发货
//// * @param order
//// * @return
//// */
//// @Log(title = "店铺订单", businessType = BusinessType.UPDATE)
//// @PostMapping("/ship")
//// public AjaxResult ship(@RequestBody ErpOrder order)
//// {
//// order.setUpdateBy(getUsername());
//// int result = orderService.shipErpOrder(order);
//// if(result == -1) return new AjaxResult(501,"订单不存在!");
//// else if(result == -2) return new AjaxResult(502,"订单号已存在!");
//// return toAjax(result);
//// }
//
//}

View File

@ -1,54 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//
//import cn.qihangerp.common.PageQuery;
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.module.order.domain.bo.OrderItemListBo;
//import cn.qihangerp.module.order.service.OOrderItemService;
//import cn.qihangerp.module.order.service.OOrderService;
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * 店铺订单Controller
// *
// * @author qihang
// * @date 2023-12-31
// */
//@AllArgsConstructor
//@RestController
//@RequestMapping("/order")
//public class OrderItemController extends BaseController
//{
// private final OOrderItemService itemService;
// private final OOrderService orderService;
//
// /**
// * 查询店铺订单列表
// */
// @GetMapping("/item_list")
// public TableDataInfo list(OrderItemListBo bo, PageQuery pageQuery)
// {
// var pageList = itemService.selectPageVo(pageQuery,bo);
// return getDataTable(pageList);
// }
//
//// /**
//// * 更新erp sku id
//// * @param orderItem
//// * @return
//// */
//// @PostMapping("/updateErpSkuId")
//// public AjaxResult ship(@RequestBody OOrderItem orderItem)
//// {
//// if(StringUtils.isEmpty(orderItem.getId()) || orderItem.getGoodsSkuId()==null){
//// return AjaxResult.error("确少必要参数");
//// }
//// itemService.updateErpSkuId(orderItem.getId(), orderItem.getGoodsSkuId());
//// return AjaxResult.success();
//// }
//}

View File

@ -1,90 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//
//import cn.qihangerp.common.AjaxResult;
//import cn.qihangerp.common.PageQuery;
//import cn.qihangerp.common.ResultVo;
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.module.order.domain.bo.RefundProcessingBo;
//import cn.qihangerp.module.order.domain.bo.RefundSearchBo;
//import cn.qihangerp.module.order.service.ORefundService;
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.web.bind.annotation.*;
//
///**
// * 退换货Controller
// *
// * @author qihang
// * @date 2024-01-13
// */
//@AllArgsConstructor
//@RestController
//@RequestMapping("/refund")
//public class RefundController extends BaseController
//{
//
// private final ORefundService refundService;
//
//
// /**
// * 查询退换货列表
// */
// @PreAuthorize("@ss.hasPermi('api:returned:list')")
// @GetMapping("/list")
// public TableDataInfo list(RefundSearchBo bo, PageQuery pageQuery)
// {
// var pageList = refundService.queryPageList(bo,pageQuery);
// return getDataTable(pageList);
// }
//
//
// /**
// * 获取退换货详细信息
// */
// @PreAuthorize("@ss.hasPermi('api:returned:query')")
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// return success(refundService.selectById(id));
// }
//
//
// /**
// * 推送退款到ERP
// * @param ids
// * @return
// */
// @PostMapping("/pushErp/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
//// for (Long id:ids) {
//// ORefund ORefund = refundService.selectById(id);
//// if(ORefund!=null) {
////
//// ResultVo resultVo = erpPushHelper.pushRefundSingle(ORefund);
//// ORefund pushUpdate = new ORefund();
//// pushUpdate.setErpPushStatus(resultVo.getCode()== 0 ? 200:resultVo.getCode());
//// pushUpdate.setErpPushResult(resultVo.getMsg());
//// pushUpdate.setErpPushTime(new Date());
//// pushUpdate.setUpdateBy("手动推送到ERP");
//// pushUpdate.setUpdateTime(new Date());
//// pushUpdate.setId(id.toString());
//// refundService.updateById(pushUpdate);
//// }
//// }
//
// return success();
// }
//
//
// @PostMapping("/processing")
// public AjaxResult refundProcessing(@RequestBody RefundProcessingBo bo ) {
// if (bo.getRefundId() == null) return AjaxResult.error(500, "缺少参数refundId");
// ResultVo<Long> resultVo = refundService.refundProcessing(bo,getUsername());
// if(resultVo.getCode() == 0) return success();
// else return AjaxResult.error(resultVo.getMsg());
// }
//}

View File

@ -1,53 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//import cn.qihangerp.common.PageQuery;
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.oms.domain.bo.ShipStockUpBo;
//import cn.qihangerp.oms.domain.bo.ShipWaybillBo;
//import cn.qihangerp.oms.service.ErpShipStockUpService;
//import cn.qihangerp.oms.service.ErpShipWaybillService;
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//
///**
// * 店铺Controller
// *
// * @author qihang
// * @date 2023-12-31
// */
//@AllArgsConstructor
//@RestController
//@RequestMapping("/ship")
//public class ShipController extends BaseController {
// private final ErpShipStockUpService shipStockUpService;
// private final ErpShipWaybillService shipWaybillService;
//
// /**
// * 备货列表
// * @param bo
// * @param pageQuery
// * @return
// */
// @GetMapping("/stock_up_list")
// public TableDataInfo stock_up_list(ShipStockUpBo bo, PageQuery pageQuery)
// {
// var pageList = shipStockUpService.queryPageList(bo,pageQuery);
// return getDataTable(pageList);
// }
//
// /**
// * 订单物流信息list
// * @param bo
// * @param pageQuery
// * @return
// */
// @GetMapping("/order_waybill_list")
// public TableDataInfo order_waybill_list(ShipWaybillBo bo, PageQuery pageQuery)
// {
// var pageList = shipWaybillService.queryPageList(bo,pageQuery);
// return getDataTable(pageList);
// }
//
//
//}

View File

@ -1,58 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//import cn.qihangerp.common.AjaxResult;
//import cn.qihangerp.common.PageQuery;
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.module.order.domain.bo.ShipStockUpBo;
//import cn.qihangerp.module.order.domain.bo.ShipStockUpCompleteBo;
//import cn.qihangerp.module.order.service.OShipStockUpService;
//import cn.qihangerp.module.order.service.OShipWaybillService;
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//
//@AllArgsConstructor
//@RestController
//@RequestMapping("/ship")
//public class ShipStockupController extends BaseController {
// private final OShipStockUpService shipStockUpService;
// private final OShipWaybillService shipWaybillService;
//
// /**
// * 备货列表
// * @param bo
// * @param pageQuery
// * @return
// */
// @GetMapping("/stock_up_list")
// public TableDataInfo stock_up_list(ShipStockUpBo bo, PageQuery pageQuery)
// {
// var pageList = shipStockUpService.queryPageList(bo,pageQuery);
// return getDataTable(pageList);
// }
//
// @PostMapping("/stock_up_complete")
// public AjaxResult stock_up_complete(@RequestBody ShipStockUpCompleteBo bo)
// {
// int result = shipStockUpService.stockUpComplete(bo);
// if(result == -1) return AjaxResult.error("参数错误orderItemIds为空");
// if(result == -2) return AjaxResult.error("参数错误:没有要添加的");
// else if(result == -1001) return AjaxResult.error("存在错误的orderItemId状态不对不能生成出库单");
// else if(result == -1002) return AjaxResult.error("存在错误的订单数据名单明细中没有skuId请修改");
// //wmsStockOutEntryService.insertWmsStockOutEntry(wmsStockOutEntry)
// return toAjax(1);
// }
//
// @PostMapping("/stock_up_complete_by_order")
// public AjaxResult stock_up_completeByOrder(@RequestBody ShipStockUpCompleteBo bo)
// {
// int result = shipStockUpService.stockUpCompleteByOrder(bo);
// if(result == -1) return AjaxResult.error("参数错误orderItemIds为空");
// if(result == -2) return AjaxResult.error("参数错误:没有要添加的");
// else if(result == -1001) return AjaxResult.error("存在错误的orderItemId状态不对不能生成出库单");
// else if(result == -1002) return AjaxResult.error("存在错误的订单数据名单明细中没有skuId请修改");
// //wmsStockOutEntryService.insertWmsStockOutEntry(wmsStockOutEntry)
// return toAjax(1);
// }
//}

View File

@ -1,67 +0,0 @@
//package cn.qihangerp.oms.controller;
//
//
//import cn.qihangerp.common.AjaxResult;
//import cn.qihangerp.common.PageQuery;
//import cn.qihangerp.common.TableDataInfo;
//import cn.qihangerp.module.order.domain.OShipment;
//import cn.qihangerp.module.order.domain.bo.OrderShipBo;
//import cn.qihangerp.module.order.service.OOrderService;
//import cn.qihangerp.module.order.service.OShipmentService;
//import cn.qihangerp.security.common.BaseController;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//
//@AllArgsConstructor
//@RestController
//@RequestMapping("/shipping")
//public class ShipmentController extends BaseController {
// private final OShipmentService shippingService;
//
// private final OOrderService orderService;
// @GetMapping("/list")
// public TableDataInfo list(OShipment shipping, PageQuery pageQuery)
// {
// return getDataTable(shippingService.queryPageList(shipping,pageQuery));
// }
//
//
// @GetMapping("/searchOrderConsignee")
// public TableDataInfo searchOrderConsignee(String consignee)
// {
// return getDataTable(orderService.searchOrderConsignee(consignee));
// }
//
// @GetMapping("/searchOrderItemByReceiverMobile")
// public TableDataInfo searchOrderItemByReceiverMobile(String receiverMobile)
// {
// return getDataTable(orderService.searchOrderItemByReceiverMobile(receiverMobile));
// }
//
// /**
// * 订单发货
// * @param shipping
// * @return
// */
// @PostMapping("/handShip")
// public AjaxResult orderHandShip(@RequestHeader("Authorization") String authorization,@RequestBody OrderShipBo shipping)
// {
//
// var result = shippingService.handOrderShip(shipping);
//// if(result.getCode() == ResultVoEnum.SUCCESS.getIndex()) {
//// // 发货
//// TaoOrderShipBo bo = new TaoOrderShipBo();
//// bo.setShopId(shipping.getShopId());
////// bo.setTid(shipping.getOrderId());
//// bo.setWaybillCode(shipping.getShipCode());
//// bo.setWaybillCompany(shipping.getShipCompany());
////
//// JSONObject jsonObject = taoApiService.orderShip(authorization, bo);
//// return AjaxResult.success();
//// }else{
//// return AjaxResult.error(result.getCode(),result.getMsg());
//// }
//
// return AjaxResult.success();
// }
//}

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller.offline; package cn.qihangerp.api.order.controller;
import cn.qihangerp.common.AjaxResult; import cn.qihangerp.common.AjaxResult;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller.offline; package cn.qihangerp.api.order.controller;
import cn.qihangerp.common.AjaxResult; import cn.qihangerp.common.AjaxResult;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller.offline; package cn.qihangerp.api.order.controller;
import cn.qihangerp.common.PageQuery; import cn.qihangerp.common.PageQuery;

View File

@ -1,4 +1,4 @@
package cn.qihangerp.oms.controller.offline; package cn.qihangerp.api.order.controller;
import cn.qihangerp.common.AjaxResult; import cn.qihangerp.common.AjaxResult;