master:返回给前端的数据调优;
parent
715dedf78b
commit
729a2f614f
|
|
@ -6,11 +6,9 @@ import com.ruoyi.common.core.controller.XktBaseController;
|
|||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.Page;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeCustomer.StoreCusFuzzyResVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeCustomer.StoreCusPageVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeCustomer.StoreCusVO;
|
||||
import com.ruoyi.xkt.domain.StoreCustomer;
|
||||
import com.ruoyi.xkt.dto.storeCustomer.StoreCusDTO;
|
||||
import com.ruoyi.xkt.dto.storeCustomer.StoreCusPageDTO;
|
||||
import com.ruoyi.xkt.dto.storeCustomer.StoreCusPageResDTO;
|
||||
|
|
@ -18,12 +16,10 @@ import com.ruoyi.xkt.service.IStoreCustomerService;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -46,8 +42,8 @@ public class StoreCustomerController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:customer:query')")
|
||||
@ApiOperation(value = "模糊查询档口客户", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/fuzzy")
|
||||
public R fuzzyQueryColorList(@RequestParam(value = "cusName", required = false) String cusName,
|
||||
@RequestParam("storeId") Long storeId) {
|
||||
public R<List<StoreCusFuzzyResVO>> fuzzyQueryColorList(@RequestParam(value = "cusName", required = false) String cusName,
|
||||
@RequestParam("storeId") Long storeId) {
|
||||
return R.ok(BeanUtil.copyToList(storeCusService.fuzzyQueryList(storeId, cusName), StoreCusFuzzyResVO.class));
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +55,7 @@ public class StoreCustomerController extends XktBaseController {
|
|||
@ApiOperation(value = "新增档口客户", httpMethod = "POST", response = R.class)
|
||||
@Log(title = "新增档口客户", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R add(@Validated @RequestBody StoreCusVO storeCusVO) {
|
||||
public R<Integer> add(@Validated @RequestBody StoreCusVO storeCusVO) {
|
||||
return R.ok(storeCusService.create(BeanUtil.toBean(storeCusVO, StoreCusDTO.class)));
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +66,7 @@ public class StoreCustomerController extends XktBaseController {
|
|||
@ApiOperation(value = "修改档口客户", httpMethod = "PUT", response = R.class)
|
||||
@Log(title = "修改档口客户", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R edit(@Validated @RequestBody StoreCusVO storeCusVO) {
|
||||
public R<Integer> edit(@Validated @RequestBody StoreCusVO storeCusVO) {
|
||||
return R.ok(storeCusService.updateStoreCus(BeanUtil.toBean(storeCusVO, StoreCusDTO.class)));
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +88,7 @@ public class StoreCustomerController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:customer:query')")
|
||||
@ApiOperation(value = "获取档口客户详细信息", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/{storeCusId}")
|
||||
public R getInfo(@PathVariable("storeCusId") Long storeCusId) {
|
||||
public R<StoreCusVO> getInfo(@PathVariable("storeCusId") Long storeCusId) {
|
||||
return R.ok(BeanUtil.toBean(storeCusService.selectStoreCustomerByStoreCusId(storeCusId), StoreCusVO.class));
|
||||
}
|
||||
|
||||
|
|
@ -102,22 +98,8 @@ public class StoreCustomerController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:customer:list')")
|
||||
@ApiOperation(value = "查询档口客户列表", httpMethod = "GET", response = R.class)
|
||||
@PostMapping("/page")
|
||||
public R<Page> selectPage(@Validated @RequestBody StoreCusPageVO pageVO) {
|
||||
public R<Page<StoreCusPageResDTO>> selectPage(@Validated @RequestBody StoreCusPageVO pageVO) {
|
||||
return R.ok(storeCusService.selectPage(BeanUtil.toBean(pageVO, StoreCusPageDTO.class)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出档口客户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:customer:export')")
|
||||
@Log(title = "档口客户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StoreCustomer storeCustomer) {
|
||||
List<StoreCustomer> list = storeCusService.selectStoreCustomerList(storeCustomer);
|
||||
ExcelUtil<StoreCustomer> util = new ExcelUtil<StoreCustomer>(StoreCustomer.class);
|
||||
util.exportExcel(response, list, "档口客户数据");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class StoreFactoryController extends XktBaseController {
|
|||
@ApiOperation(value = "修改档口合作工厂", httpMethod = "PUT", response = R.class)
|
||||
@Log(title = "修改档口合作工厂", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R edit(@Validated @RequestBody StoreFactoryVO storeFactoryVO) {
|
||||
public R<Integer> edit(@Validated @RequestBody StoreFactoryVO storeFactoryVO) {
|
||||
return R.ok(storeFactoryService.updateStoreFactory(BeanUtil.toBean(storeFactoryVO, StoreFactoryDTO.class)));
|
||||
}
|
||||
|
||||
|
|
@ -79,14 +79,11 @@ public class StoreFactoryController extends XktBaseController {
|
|||
@ApiOperation(value = "获取档口合作工厂详细信息", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/{storeId}/{storeFactoryId}")
|
||||
public R<StoreFactoryVO> getInfo(@PathVariable("storeId") Long storeId, @PathVariable("storeFactoryId") Long storeFactoryId) {
|
||||
StoreFactoryResDTO res = storeFactoryService.selectByStoreFacId(storeId ,storeFactoryId);
|
||||
return ObjectUtils.isEmpty(res) ? R.ok() : R.ok(BeanUtil.toBean(res, StoreFactoryVO.class));
|
||||
return R.ok(BeanUtil.toBean(storeFactoryService.selectByStoreFacId(storeId ,storeFactoryId), StoreFactoryVO.class));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 导出档口合作工厂列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.ruoyi.web.controller.xkt.vo.storePordColor.StoreProdColorResVO;
|
|||
import com.ruoyi.xkt.domain.StoreProductColor;
|
||||
import com.ruoyi.xkt.service.IStoreProductColorService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -36,72 +37,11 @@ public class StoreProductColorController extends XktBaseController {
|
|||
* 模糊查询档口所有的商品颜色分类
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:color:query')")
|
||||
@ApiOperation(value = "模糊查询档口所有的商品颜色分类", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/fuzzy")
|
||||
public R fuzzyQueryColorList(@RequestParam(value = "prodArtNum", required = false) String prodArtNum,
|
||||
public R<StoreProdColorResVO> fuzzyQueryColorList(@RequestParam(value = "prodArtNum", required = false) String prodArtNum,
|
||||
@RequestParam("storeId") Long storeId) {
|
||||
return success(BeanUtil.copyToList(storeProdColorService.fuzzyQueryColorList(storeId, prodArtNum), StoreProdColorResVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询档口当前商品颜色列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:color:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StoreProductColor storeProductColor) {
|
||||
startPage();
|
||||
List<StoreProductColor> list = storeProdColorService.selectStoreProductColorList(storeProductColor);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出档口当前商品颜色列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:color:export')")
|
||||
@Log(title = "档口当前商品颜色", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StoreProductColor storeProductColor) {
|
||||
List<StoreProductColor> list = storeProdColorService.selectStoreProductColorList(storeProductColor);
|
||||
ExcelUtil<StoreProductColor> util = new ExcelUtil<StoreProductColor>(StoreProductColor.class);
|
||||
util.exportExcel(response, list, "档口当前商品颜色数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取档口当前商品颜色详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:color:query')")
|
||||
@GetMapping(value = "/{storeProdColorId}")
|
||||
public R getInfo(@PathVariable("storeProdColorId") Long storeProdColorId) {
|
||||
return success(storeProdColorService.selectStoreProductColorByStoreProdColorId(storeProdColorId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增档口当前商品颜色
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:color:add')")
|
||||
@Log(title = "档口当前商品颜色", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R add(@RequestBody StoreProductColor storeProductColor) {
|
||||
return success(storeProdColorService.insertStoreProductColor(storeProductColor));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改档口当前商品颜色
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:color:edit')")
|
||||
@Log(title = "档口当前商品颜色", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R edit(@RequestBody StoreProductColor storeProductColor) {
|
||||
return success(storeProdColorService.updateStoreProductColor(storeProductColor));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除档口当前商品颜色
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:color:remove')")
|
||||
@Log(title = "档口当前商品颜色", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{storeProdColorIds}")
|
||||
public R remove(@PathVariable Long[] storeProdColorIds) {
|
||||
return success(storeProdColorService.deleteStoreProductColorByStoreProdColorIds(storeProdColorIds));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import com.ruoyi.xkt.service.IStoreProductService;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -45,8 +44,8 @@ public class StoreProductController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:product:query')")
|
||||
@ApiOperation(value = "模糊查询档口商品", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/fuzzy")
|
||||
public R fuzzyQueryColorList(@RequestParam(value = "prodArtNum", required = false) String prodArtNum,
|
||||
@RequestParam("storeId") Long storeId) {
|
||||
public R<List<StoreProdFuzzyResVO>> fuzzyQueryColorList(@RequestParam(value = "prodArtNum", required = false) String prodArtNum,
|
||||
@RequestParam("storeId") Long storeId) {
|
||||
return R.ok(BeanUtil.copyToList(storeProdService.fuzzyQueryList(storeId, prodArtNum), StoreProdFuzzyResVO.class));
|
||||
}
|
||||
|
||||
|
|
@ -60,25 +59,13 @@ public class StoreProductController extends XktBaseController {
|
|||
return R.ok(storeProdService.page(BeanUtil.toBean(pageVO, StoreProdPageDTO.class)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出档口商品列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:product:export')")
|
||||
@Log(title = "档口商品", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StoreProduct storeProduct) {
|
||||
List<StoreProduct> list = storeProdService.selectStoreProductList(storeProduct);
|
||||
ExcelUtil<StoreProduct> util = new ExcelUtil<StoreProduct>(StoreProduct.class);
|
||||
util.exportExcel(response, list, "档口商品数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取档口商品详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:product:query')")
|
||||
@ApiOperation(value = "获取档口商品详细信息", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/{storeProdId}")
|
||||
public R getInfo(@PathVariable("storeProdId") Long storeProdId) {
|
||||
public R<StoreProdResVO> getInfo(@PathVariable("storeProdId") Long storeProdId) {
|
||||
return R.ok(BeanUtil.toBean(storeProdService.selectStoreProductByStoreProdId(storeProdId), StoreProdResVO.class));
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +76,7 @@ public class StoreProductController extends XktBaseController {
|
|||
@Log(title = "档口商品", businessType = BusinessType.INSERT)
|
||||
@ApiOperation(value = "新增档口商品", httpMethod = "POST", response = R.class)
|
||||
@PostMapping
|
||||
public R add(@Validated @RequestBody StoreProdVO storeProdVO) {
|
||||
public R<Integer> add(@Validated @RequestBody StoreProdVO storeProdVO) {
|
||||
return R.ok(storeProdService.insertStoreProduct(BeanUtil.toBean(storeProdVO, StoreProdDTO.class)));
|
||||
}
|
||||
|
||||
|
|
@ -100,7 +87,7 @@ public class StoreProductController extends XktBaseController {
|
|||
@ApiOperation(value = "修改档口商品", httpMethod = "PUT", response = R.class)
|
||||
@Log(title = "档口商品", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{storeProdId}")
|
||||
public R edit(@PathVariable Long storeProdId, @Validated @RequestBody StoreProdVO storeProdVO) {
|
||||
public R<Integer> edit(@PathVariable Long storeProdId, @Validated @RequestBody StoreProdVO storeProdVO) {
|
||||
return R.ok(storeProdService.updateStoreProduct(storeProdId, BeanUtil.toBean(storeProdVO, StoreProdDTO.class)));
|
||||
}
|
||||
|
||||
|
|
@ -122,9 +109,22 @@ public class StoreProductController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:product:query')")
|
||||
@ApiOperation(value = "获取档口图片空间", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/pic-space/{storeId}")
|
||||
public R getStoreProductPicSpace(@PathVariable("storeId") Long storeId) {
|
||||
public R<StoreProdPicSpaceResVO> getStoreProductPicSpace(@PathVariable("storeId") Long storeId) {
|
||||
return R.ok(BeanUtil.toBean(storeProdService.getStoreProductPicSpace(storeId), StoreProdPicSpaceResVO.class));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出档口商品列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:product:export')")
|
||||
@Log(title = "档口商品", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StoreProduct storeProduct) {
|
||||
List<StoreProduct> list = storeProdService.selectStoreProductList(storeProduct);
|
||||
ExcelUtil<StoreProduct> util = new ExcelUtil<StoreProduct>(StoreProduct.class);
|
||||
util.exportExcel(response, list, "档口商品数据");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,8 +60,7 @@ public class StoreProductDemandController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:demand:query')")
|
||||
@GetMapping(value = "/exists-quantity/{storeId}/{storeProdId}")
|
||||
public R<List<StoreProdDemandQuantityVO>> getStockAndProduceQuantity(@PathVariable("storeId") Long storeId, @PathVariable("storeProdId") Long storeProdId) {
|
||||
List<StoreProdDemandQuantityDTO> list = storeProdDemandService.getStockAndProduceQuantity(storeId, storeProdId);
|
||||
return CollectionUtils.isEmpty(list) ? R.ok() : R.ok(BeanUtil.copyToList(list, StoreProdDemandQuantityVO.class));
|
||||
return R.ok(BeanUtil.copyToList(storeProdDemandService.getStockAndProduceQuantity(storeId, storeProdId), StoreProdDemandQuantityVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -86,34 +85,6 @@ public class StoreProductDemandController extends XktBaseController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询档口商品需求单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:demand:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StoreProductDemand storeProductDemand) {
|
||||
startPage();
|
||||
List<StoreProductDemand> list = storeProdDemandService.selectStoreProductDemandList(storeProductDemand);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出档口商品需求单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:demand:export')")
|
||||
@Log(title = "档口商品需求单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StoreProductDemand storeProductDemand) {
|
||||
List<StoreProductDemand> list = storeProdDemandService.selectStoreProductDemandList(storeProductDemand);
|
||||
ExcelUtil<StoreProductDemand> util = new ExcelUtil<StoreProductDemand>(StoreProductDemand.class);
|
||||
util.exportExcel(response, list, "档口商品需求单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取档口商品需求单详细信息
|
||||
*/
|
||||
|
|
@ -124,7 +95,6 @@ public class StoreProductDemandController extends XktBaseController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改档口商品需求单
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,14 +5,13 @@ import com.ruoyi.common.annotation.Log;
|
|||
import com.ruoyi.common.core.controller.XktBaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.Page;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeProdStock.StoreProdStockPageVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeProdStock.StoreProdStockResVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeProdStock.StoreProdStockVO;
|
||||
import com.ruoyi.xkt.domain.StoreProductStock;
|
||||
import com.ruoyi.xkt.dto.storeProductStock.StoreProdStockPageDTO;
|
||||
import com.ruoyi.xkt.dto.storeProductStock.StoreProdStockDTO;
|
||||
import com.ruoyi.xkt.dto.storeProductStock.StoreProdStockPageDTO;
|
||||
import com.ruoyi.xkt.dto.storeProductStock.StoreProdStockPageResDTO;
|
||||
import com.ruoyi.xkt.service.IStoreProductStockService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -21,7 +20,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -54,7 +52,7 @@ public class StoreProductStockController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:stock:list')")
|
||||
@ApiOperation(value = "查询档口库存列表", httpMethod = "POST", response = R.class)
|
||||
@PostMapping("/page")
|
||||
public R<Page> selectPage(@Validated @RequestBody StoreProdStockPageVO pageVO) {
|
||||
public R<Page<StoreProdStockPageResDTO>> selectPage(@Validated @RequestBody StoreProdStockPageVO pageVO) {
|
||||
return R.ok(storeProdStockService.selectPage(BeanUtil.toBean(pageVO, StoreProdStockPageDTO.class)));
|
||||
}
|
||||
|
||||
|
|
@ -87,8 +85,8 @@ public class StoreProductStockController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:stock:query')")
|
||||
@ApiOperation(value = "查询档口商品库存详情", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/{storeId}/{storeProdStockId}")
|
||||
public R getInfo(@PathVariable("storeId") Long storeId, @PathVariable("storeProdStockId") Long storeProdStockId) {
|
||||
return R.ok(storeProdStockService.selectByStoreProdStockId(storeId, storeProdStockId));
|
||||
public R<StoreProdStockResVO> getInfo(@PathVariable("storeId") Long storeId, @PathVariable("storeProdStockId") Long storeProdStockId) {
|
||||
return R.ok(BeanUtil.toBean(storeProdStockService.selectByStoreProdStockId(storeId, storeProdStockId), StoreProdStockResVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -97,68 +95,8 @@ public class StoreProductStockController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:stock:query')")
|
||||
@ApiOperation(value = "根据货号查询档口商品库存", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/{storeId}/prod-art-num/{prodArtNum}")
|
||||
public R getInfo(@PathVariable("storeId") Long storeId, @PathVariable("prodArtNum") String prodArtNum) {
|
||||
return R.ok(storeProdStockService.selectByStoreIdAndProdArtNum(storeId, prodArtNum));
|
||||
public R<List<StoreProdStockResVO>> getInfo(@PathVariable("storeId") Long storeId, @PathVariable("prodArtNum") String prodArtNum) {
|
||||
return R.ok(BeanUtil.copyToList(storeProdStockService.selectByStoreIdAndProdArtNum(storeId, prodArtNum), StoreProdStockResVO.class));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询档口商品库存列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:stock:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StoreProductStock storeProductStock) {
|
||||
startPage();
|
||||
List<StoreProductStock> list = storeProdStockService.selectStoreProductStockList(storeProductStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出档口商品库存列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:stock:export')")
|
||||
@Log(title = "档口商品库存", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StoreProductStock storeProductStock) {
|
||||
List<StoreProductStock> list = storeProdStockService.selectStoreProductStockList(storeProductStock);
|
||||
ExcelUtil<StoreProductStock> util = new ExcelUtil<StoreProductStock>(StoreProductStock.class);
|
||||
util.exportExcel(response, list, "档口商品库存数据");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增档口商品库存
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:stock:add')")
|
||||
@Log(title = "档口商品库存", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R add(@RequestBody StoreProductStock storeProductStock) {
|
||||
return success(storeProdStockService.insertStoreProductStock(storeProductStock));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除档口商品库存
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:stock:remove')")
|
||||
@Log(title = "档口商品库存", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{storeProdStockIds}")
|
||||
public R remove(@PathVariable Long[] storeProdStockIds) {
|
||||
return success(storeProdStockService.deleteStoreProductStockByStoreProdStockIds(storeProdStockIds));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ public class StoreProductStorageController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:storage:remove')")
|
||||
@ApiOperation(value = "撤销档口商品入库", httpMethod = "DELETE", response = R.class)
|
||||
@Log(title = "撤销档口商品入库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{storeProdStorId}")
|
||||
public R remove(@PathVariable Long storeProdStorId) {
|
||||
return R.ok(storeProdStorageService.deleteByStoreProdStorId(storeProdStorId));
|
||||
@DeleteMapping("/{storeProdStorageId}")
|
||||
public R remove(@PathVariable Long storeProdStorageId) {
|
||||
return R.ok(storeProdStorageService.deleteByStoreProdStorId(storeProdStorageId));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,22 +4,20 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.XktBaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.vo.menu.SysMenuDTO;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeQuickFunction.StoreQuickFuncVO;
|
||||
import com.ruoyi.xkt.domain.StoreQuickFunction;
|
||||
import com.ruoyi.xkt.dto.storeQuickFunction.StoreQuickFuncDTO;
|
||||
import com.ruoyi.xkt.service.IStoreQuickFunctionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -29,6 +27,7 @@ import java.util.List;
|
|||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Api(tags = "档口快捷功能")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/rest/v1/quick-functions")
|
||||
|
|
@ -41,90 +40,30 @@ public class StoreQuickFunctionController extends XktBaseController {
|
|||
* 查看当前档口已绑定的所有快捷菜单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:function:list')")
|
||||
@ApiOperation(value = "查看当前档口已绑定的所有快捷菜单", httpMethod = "GET", response = R.class)
|
||||
@GetMapping("/menus/{storeId}")
|
||||
public StoreQuickFuncVO getMenus(@PathVariable Long storeId) {
|
||||
public R<StoreQuickFuncVO> getMenus(@PathVariable Long storeId) {
|
||||
// 找到当前档口所有的快捷菜单
|
||||
List<StoreQuickFuncDTO.DetailDTO> checkedList = storeQuickFuncService.getCheckedMenuList(storeId);
|
||||
// 找到系统所有的二级菜单
|
||||
List<SysMenuDTO> sysMenuList = menuService.selectMenuListByRoleIdAndMenuType(2L, "C");
|
||||
return StoreQuickFuncVO.builder().storeId(storeId)
|
||||
return R.ok(StoreQuickFuncVO.builder().storeId(storeId)
|
||||
.checkedList(CollectionUtils.isEmpty(checkedList) ? new ArrayList<>() : BeanUtil.copyToList(checkedList, StoreQuickFuncVO.QuickFuncDetailVO.class))
|
||||
.menuList(CollectionUtils.isEmpty(sysMenuList) ? new ArrayList<>() : BeanUtil.copyToList(sysMenuList, StoreQuickFuncVO.QuickFuncDetailVO.class))
|
||||
.build();
|
||||
.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改档口快捷功能
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:function:edit')")
|
||||
@Log(title = "档口快捷功能", businessType = BusinessType.UPDATE)
|
||||
@ApiOperation(value = "修改档口快捷功能", httpMethod = "PUT", response = R.class)
|
||||
@Log(title = "修改档口快捷功能", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/checked")
|
||||
public R editCheckedList( @Validated @RequestBody StoreQuickFuncVO quickFuncVO) {
|
||||
public R editCheckedList(@Validated @RequestBody StoreQuickFuncVO quickFuncVO) {
|
||||
storeQuickFuncService.updateCheckedList(BeanUtil.toBean(quickFuncVO, StoreQuickFuncDTO.class));
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询档口快捷功能列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:function:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StoreQuickFunction storeQuickFunction) {
|
||||
startPage();
|
||||
List<StoreQuickFunction> list = storeQuickFuncService.selectStoreQuickFunctionList(storeQuickFunction);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出档口快捷功能列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:function:export')")
|
||||
@Log(title = "档口快捷功能", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StoreQuickFunction storeQuickFunction) {
|
||||
List<StoreQuickFunction> list = storeQuickFuncService.selectStoreQuickFunctionList(storeQuickFunction);
|
||||
ExcelUtil<StoreQuickFunction> util = new ExcelUtil<StoreQuickFunction>(StoreQuickFunction.class);
|
||||
util.exportExcel(response, list, "档口快捷功能数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取档口快捷功能详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:function:query')")
|
||||
@GetMapping(value = "/{storeQuickFuncId}")
|
||||
public R getInfo(@PathVariable("storeQuickFuncId") Long storeQuickFuncId) {
|
||||
return success(storeQuickFuncService.selectStoreQuickFunctionByStoreQuickFuncId(storeQuickFuncId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增档口快捷功能
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:function:add')")
|
||||
@Log(title = "档口快捷功能", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R add(@RequestBody StoreQuickFunction storeQuickFunction) {
|
||||
return success(storeQuickFuncService.insertStoreQuickFunction(storeQuickFunction));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改档口快捷功能
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:function:edit')")
|
||||
@Log(title = "档口快捷功能", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R edit(@RequestBody StoreQuickFunction storeQuickFunction) {
|
||||
return success(storeQuickFuncService.updateStoreQuickFunction(storeQuickFunction));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除档口快捷功能
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:function:remove')")
|
||||
@Log(title = "档口快捷功能", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{storeQuickFuncIds}")
|
||||
public R remove(@PathVariable Long[] storeQuickFuncIds) {
|
||||
return success(storeQuickFuncService.deleteStoreQuickFunctionByStoreQuickFuncIds(storeQuickFuncIds));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,14 +6,13 @@ import com.ruoyi.common.core.controller.XktBaseController;
|
|||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.Page;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeCustomer.StoreCusGeneralSaleVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeSale.StoreSalePageVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeSale.StoreSalePayStatusVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeSale.StoreSaleVO;
|
||||
import com.ruoyi.xkt.domain.StoreSale;
|
||||
import com.ruoyi.xkt.dto.storeSale.StoreSaleDTO;
|
||||
import com.ruoyi.xkt.dto.storeSale.StoreSalePageDTO;
|
||||
import com.ruoyi.xkt.dto.storeSale.StoreSalePageResDTO;
|
||||
import com.ruoyi.xkt.dto.storeSale.StoreSalePayStatusDTO;
|
||||
import com.ruoyi.xkt.service.IStoreSaleService;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -23,9 +22,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 档口销售出库Controller
|
||||
*
|
||||
|
|
@ -46,8 +42,8 @@ public class StoreSaleController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:sale:list')")
|
||||
@ApiOperation(value = "根据当前客户查询最近的销售业绩,以及欠款金额", httpMethod = "GET", response = R.class)
|
||||
@GetMapping("/cus-overall")
|
||||
public R getCusGeneralSale(@RequestParam("days") Integer days, @RequestParam("storeId") Long storeId,
|
||||
@RequestParam("storeCusId") Long storeCusId) {
|
||||
public R<StoreCusGeneralSaleVO> getCusGeneralSale(@RequestParam("days") Integer days, @RequestParam("storeId") Long storeId,
|
||||
@RequestParam("storeCusId") Long storeCusId) {
|
||||
return R.ok(BeanUtil.toBean(storeSaleService.getCusGeneralSale(days, storeId, storeCusId), StoreCusGeneralSaleVO.class));
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +53,7 @@ public class StoreSaleController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:sale:list')")
|
||||
@ApiOperation(value = "查询档口销售出库列表", httpMethod = "POST", response = R.class)
|
||||
@PostMapping("/page")
|
||||
public R<Page> page(@Validated @RequestBody StoreSalePageVO salePageVO) {
|
||||
public R<Page<StoreSalePageResDTO>> page(@Validated @RequestBody StoreSalePageVO salePageVO) {
|
||||
return R.ok(storeSaleService.page(BeanUtil.toBean(salePageVO, StoreSalePageDTO.class)));
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +64,7 @@ public class StoreSaleController extends XktBaseController {
|
|||
@ApiOperation(value = "新增档口销售出库", httpMethod = "POST", response = R.class)
|
||||
@Log(title = "档口销售出库", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R add(@Validated @RequestBody StoreSaleVO storeSaleVO) {
|
||||
public R<Integer> add(@Validated @RequestBody StoreSaleVO storeSaleVO) {
|
||||
return R.ok(storeSaleService.insertStoreSale(BeanUtil.toBean(storeSaleVO, StoreSaleDTO.class)));
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +75,7 @@ public class StoreSaleController extends XktBaseController {
|
|||
@Log(title = "修改档口销售出库", businessType = BusinessType.UPDATE)
|
||||
@ApiOperation(value = "返单后,更新档口销售出库", httpMethod = "PUT", response = R.class)
|
||||
@PutMapping
|
||||
public R edit(@Validated @RequestBody StoreSaleVO storeSaleVO) {
|
||||
public R<Integer> edit(@Validated @RequestBody StoreSaleVO storeSaleVO) {
|
||||
return R.ok(storeSaleService.updateStoreSale(BeanUtil.toBean(storeSaleVO, StoreSaleDTO.class)));
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +85,8 @@ public class StoreSaleController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:sale:query')")
|
||||
@ApiOperation(value = "查询档口销售出库详情", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/{storeSaleId}")
|
||||
public R getInfo(@PathVariable("storeSaleId") Long storeSaleId) {
|
||||
return R.ok(storeSaleService.selectStoreSaleByStoreSaleId(storeSaleId));
|
||||
public R<StoreSaleVO> getInfo(@PathVariable("storeSaleId") Long storeSaleId) {
|
||||
return R.ok(BeanUtil.toBean(storeSaleService.selectStoreSaleByStoreSaleId(storeSaleId), StoreSaleVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -100,9 +96,8 @@ public class StoreSaleController extends XktBaseController {
|
|||
@Log(title = "客户欠款结算", businessType = BusinessType.UPDATE)
|
||||
@ApiOperation(value = "客户欠款结算", httpMethod = "PUT", response = R.class)
|
||||
@PutMapping("/clear-debt")
|
||||
public R clearStoreCusDebt(@Validated @RequestBody StoreSalePayStatusVO payStatusVO) {
|
||||
storeSaleService.clearStoreCusDebt(BeanUtil.toBean(payStatusVO, StoreSalePayStatusDTO.class));
|
||||
return R.ok();
|
||||
public R<Integer> clearStoreCusDebt(@Validated @RequestBody StoreSalePayStatusVO payStatusVO) {
|
||||
return R.ok(storeSaleService.clearStoreCusDebt(BeanUtil.toBean(payStatusVO, StoreSalePayStatusDTO.class)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,40 +106,8 @@ public class StoreSaleController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasPermi('system:sale:remove')")
|
||||
@Log(title = "档口销售出库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{storeSaleId}")
|
||||
public R remove(@PathVariable Long storeSaleId) {
|
||||
|
||||
// TODO 扣件库存
|
||||
// TODO 扣件库存
|
||||
// TODO 扣件库存
|
||||
// TODO 扣件库存
|
||||
// TODO 扣件库存
|
||||
// TODO 扣件库存
|
||||
|
||||
|
||||
// TODO 增加库存
|
||||
// TODO 增加库存
|
||||
// TODO 增加库存
|
||||
// TODO 增加库存
|
||||
// TODO 增加库存
|
||||
// TODO 增加库存
|
||||
public R<Integer> remove(@PathVariable Long storeSaleId) {
|
||||
return R.ok(storeSaleService.deleteStoreSaleByStoreSaleId(storeSaleId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出档口销售出库列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:sale:export')")
|
||||
@Log(title = "档口销售出库", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StoreSale storeSale) {
|
||||
List<StoreSale> list = storeSaleService.selectStoreSaleList(storeSale);
|
||||
ExcelUtil<StoreSale> util = new ExcelUtil<StoreSale>(StoreSale.class);
|
||||
util.exportExcel(response, list, "档口销售出库数据");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class StoreProdResVO {
|
|||
@ApiModelProperty(name = "文件大小")
|
||||
private BigDecimal fileSize;
|
||||
@ApiModelProperty(name = "文件类型")
|
||||
private String fileType;
|
||||
private Integer fileType;
|
||||
@ApiModelProperty(name = "排序")
|
||||
private Integer orderNum;
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ public class StoreProdResVO {
|
|||
@ApiModelProperty(name = "商品尺码")
|
||||
private Integer size;
|
||||
@ApiModelProperty(name = "是否是标准尺码")
|
||||
private String standard;
|
||||
private Integer standard;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class StoreProdVO {
|
|||
private BigDecimal fileSize;
|
||||
@NotBlank(message = "文件类型不能为空!")
|
||||
@ApiModelProperty(name = "文件类型")
|
||||
private String fileType;
|
||||
private Integer fileType;
|
||||
@ApiModelProperty(name = "排序")
|
||||
@NotNull(message = "排序不能为空!")
|
||||
private Integer orderNum;
|
||||
|
|
@ -142,7 +142,7 @@ public class StoreProdVO {
|
|||
private Integer size;
|
||||
@NotBlank(message = "是否是标准尺码不能为空!")
|
||||
@ApiModelProperty(name = "是否是标准尺码")
|
||||
private String standard;
|
||||
private Integer standard;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.web.controller.xkt.vo.storeProdStock;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
* @date 2025/3/27 15:12
|
||||
*/
|
||||
@ApiModel("档口商品库存详情数据")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class StoreProdStockResVO {
|
||||
|
||||
@ApiModelProperty(name = "档口商品库存ID")
|
||||
private Long storeProdStockId;
|
||||
@ApiModelProperty(name = "档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty(name = "档口商品主图url")
|
||||
private String mainPicUrl;
|
||||
@ApiModelProperty(name = "商品货号")
|
||||
private String prodArtNum;
|
||||
@ApiModelProperty(name = "颜色名称")
|
||||
private String colorName;
|
||||
@ApiModelProperty(name = "分类类目")
|
||||
private String prodCateName;
|
||||
@ApiModelProperty(name = "尺码30")
|
||||
private Integer size30;
|
||||
@ApiModelProperty(name = "尺码31")
|
||||
private Integer size31;
|
||||
@ApiModelProperty(name = "尺码32")
|
||||
private Integer size32;
|
||||
@ApiModelProperty(name = "尺码33")
|
||||
private Integer size33;
|
||||
@ApiModelProperty(name = "尺码34")
|
||||
private Integer size34;
|
||||
@ApiModelProperty(name = "尺码35")
|
||||
private Integer size35;
|
||||
@ApiModelProperty(name = "尺码36")
|
||||
private Integer size36;
|
||||
@ApiModelProperty(name = "尺码37")
|
||||
private Integer size37;
|
||||
@ApiModelProperty(name = "尺码38")
|
||||
private Integer size38;
|
||||
@ApiModelProperty(name = "尺码39")
|
||||
private Integer size39;
|
||||
@ApiModelProperty(name = "尺码40")
|
||||
private Integer size40;
|
||||
@ApiModelProperty(name = "尺码41")
|
||||
private Integer size41;
|
||||
@ApiModelProperty(name = "尺码42")
|
||||
private Integer size42;
|
||||
@ApiModelProperty(name = "尺码43")
|
||||
private Integer size43;
|
||||
@ApiModelProperty(name = "总数量")
|
||||
private Integer totalStock;
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.xkt.dto.storeProdColor;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -14,6 +15,8 @@ import lombok.RequiredArgsConstructor;
|
|||
@Data
|
||||
public class StoreProdColorDTO {
|
||||
|
||||
@ApiModelProperty(name = "档口商品颜色ID")
|
||||
private Long storeProdColorId;
|
||||
@ApiModelProperty(name = "档口颜色ID")
|
||||
private Long storeColorId;
|
||||
@ApiModelProperty(name = "颜色名称")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
package com.ruoyi.xkt.dto.storeProdColorSize;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
|
|
@ -17,11 +13,13 @@ import javax.validation.constraints.NotNull;
|
|||
@Data
|
||||
public class StoreProdColorSizeDTO {
|
||||
|
||||
@ApiModelProperty(name = "档口商品颜色尺码ID")
|
||||
private Long storeProdColorSizeId;
|
||||
@ApiModelProperty(name = "档口颜色ID")
|
||||
private Long storeColorId;
|
||||
@ApiModelProperty(name = "商品尺码")
|
||||
private Integer size;
|
||||
@ApiModelProperty(name = "是否是标准尺码")
|
||||
private String standard;
|
||||
private Integer standard;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,9 +66,9 @@ public class StoreProdDTO {
|
|||
private List<StoreColorDTO> allColorList;
|
||||
@ApiModelProperty(name = "商品颜色列表")
|
||||
private List<StoreProdColorDTO> colorList;
|
||||
@ApiModelProperty(name = "档口尺码列表")
|
||||
@ApiModelProperty(name = "档口商品尺码列表")
|
||||
private List<StoreProdColorSizeDTO> sizeList;
|
||||
@ApiModelProperty(name = "档口颜色列表")
|
||||
@ApiModelProperty(name = "档口价格列表")
|
||||
private List<StoreProdColorPriceDTO> priceList;
|
||||
@ApiModelProperty(name = "档口服务承诺")
|
||||
private StoreProdSvcDTO svc;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.ruoyi.xkt.dto.storeColor.StoreColorDTO;
|
|||
import com.ruoyi.xkt.dto.storeProdCateAttr.StoreProdCateAttrDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdColor.StoreProdColorDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdColorPrice.StoreProdColorPriceDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdColorSize.StoreProdColorSizeDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdDetail.StoreProdDetailDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdProcess.StoreProdProcessDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdSvc.StoreProdSvcDTO;
|
||||
|
|
@ -63,6 +64,8 @@ public class StoreProdResDTO {
|
|||
private List<StoreColorDTO> allColorList;
|
||||
@ApiModelProperty(name = "档口颜色列表")
|
||||
private List<StoreProdColorDTO> colorList;
|
||||
@ApiModelProperty(name = "档口商品尺码列表")
|
||||
private List<StoreProdColorSizeDTO> sizeList;
|
||||
@ApiModelProperty(name = "档口颜色价格列表")
|
||||
private List<StoreProdColorPriceDTO> priceList;
|
||||
@ApiModelProperty(name = "档口服务承诺")
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class StoreProdFileDTO {
|
|||
@ApiModelProperty(name = "文件大小")
|
||||
private BigDecimal fileSize;
|
||||
@ApiModelProperty(name = "文件类型")
|
||||
private String fileType;
|
||||
private Integer fileType;
|
||||
@ApiModelProperty(name = "排序")
|
||||
private Integer orderNum;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class StoreProdFileResDTO {
|
|||
@ApiModelProperty(name = "文件路径")
|
||||
private String fileUrl;
|
||||
@ApiModelProperty(name = "文件类型")
|
||||
private String fileType;
|
||||
private Integer fileType;
|
||||
@ApiModelProperty(name = "文件名称")
|
||||
private String fileName;
|
||||
@ApiModelProperty(name = "文件大小")
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.ruoyi.xkt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xkt.domain.StoreProductColorSize;
|
||||
import com.ruoyi.xkt.dto.storeProdColorSize.StoreProdColorSizeDTO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -64,4 +65,11 @@ public interface StoreProductColorSizeMapper extends BaseMapper<StoreProductColo
|
|||
|
||||
void updateDelFlagByStoreProdId(Long storeProdId);
|
||||
|
||||
/**
|
||||
* 根据商品ID查询商品尺码列表
|
||||
* @param storeProdId 档口商品ID
|
||||
* @return List<StoreProdColorSizeDTO>
|
||||
*/
|
||||
List<StoreProdColorSizeDTO> selectListByStoreProdId(Long storeProdId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,54 +12,6 @@ import java.util.List;
|
|||
* @date 2025-03-26
|
||||
*/
|
||||
public interface IStoreProductColorService {
|
||||
/**
|
||||
* 查询档口当前商品颜色
|
||||
*
|
||||
* @param storeProdColorId 档口当前商品颜色主键
|
||||
* @return 档口当前商品颜色
|
||||
*/
|
||||
public StoreProductColor selectStoreProductColorByStoreProdColorId(Long storeProdColorId);
|
||||
|
||||
/**
|
||||
* 查询档口当前商品颜色列表
|
||||
*
|
||||
* @param storeProductColor 档口当前商品颜色
|
||||
* @return 档口当前商品颜色集合
|
||||
*/
|
||||
public List<StoreProductColor> selectStoreProductColorList(StoreProductColor storeProductColor);
|
||||
|
||||
/**
|
||||
* 新增档口当前商品颜色
|
||||
*
|
||||
* @param storeProductColor 档口当前商品颜色
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStoreProductColor(StoreProductColor storeProductColor);
|
||||
|
||||
/**
|
||||
* 修改档口当前商品颜色
|
||||
*
|
||||
* @param storeProductColor 档口当前商品颜色
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStoreProductColor(StoreProductColor storeProductColor);
|
||||
|
||||
/**
|
||||
* 批量删除档口当前商品颜色
|
||||
*
|
||||
* @param storeProdColorIds 需要删除的档口当前商品颜色主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreProductColorByStoreProdColorIds(Long[] storeProdColorIds);
|
||||
|
||||
/**
|
||||
* 删除档口当前商品颜色信息
|
||||
*
|
||||
* @param storeProdColorId 档口当前商品颜色主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreProductColorByStoreProdColorId(Long storeProdColorId);
|
||||
|
||||
/**
|
||||
* 根据商店ID和产品款式编号模糊查询颜色列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ public interface IStoreProductStorageService {
|
|||
/**
|
||||
* 撤销档口商品入库
|
||||
*
|
||||
* @param storeProdStorId 需要删除的档口商品入库主键集合
|
||||
* @param storeProdStorageId 需要删除的档口商品入库主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByStoreProdStorId(Long storeProdStorId);
|
||||
public int deleteByStoreProdStorId(Long storeProdStorageId);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
|
|
|
|||
|
|
@ -12,54 +12,6 @@ import java.util.List;
|
|||
* @date 2025-03-26
|
||||
*/
|
||||
public interface IStoreQuickFunctionService {
|
||||
/**
|
||||
* 查询档口快捷功能
|
||||
*
|
||||
* @param storeQuickFuncId 档口快捷功能主键
|
||||
* @return 档口快捷功能
|
||||
*/
|
||||
public StoreQuickFunction selectStoreQuickFunctionByStoreQuickFuncId(Long storeQuickFuncId);
|
||||
|
||||
/**
|
||||
* 查询档口快捷功能列表
|
||||
*
|
||||
* @param storeQuickFunction 档口快捷功能
|
||||
* @return 档口快捷功能集合
|
||||
*/
|
||||
public List<StoreQuickFunction> selectStoreQuickFunctionList(StoreQuickFunction storeQuickFunction);
|
||||
|
||||
/**
|
||||
* 新增档口快捷功能
|
||||
*
|
||||
* @param storeQuickFunction 档口快捷功能
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStoreQuickFunction(StoreQuickFunction storeQuickFunction);
|
||||
|
||||
/**
|
||||
* 修改档口快捷功能
|
||||
*
|
||||
* @param storeQuickFunction 档口快捷功能
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStoreQuickFunction(StoreQuickFunction storeQuickFunction);
|
||||
|
||||
/**
|
||||
* 批量删除档口快捷功能
|
||||
*
|
||||
* @param storeQuickFuncIds 需要删除的档口快捷功能主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreQuickFunctionByStoreQuickFuncIds(Long[] storeQuickFuncIds);
|
||||
|
||||
/**
|
||||
* 删除档口快捷功能信息
|
||||
*
|
||||
* @param storeQuickFuncId 档口快捷功能主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreQuickFunctionByStoreQuickFuncId(Long storeQuickFuncId);
|
||||
|
||||
/**
|
||||
* 获取当前档口绑定的快捷功能
|
||||
* @param storeId 当前档口ID
|
||||
|
|
|
|||
|
|
@ -25,14 +25,6 @@ public interface IStoreSaleService {
|
|||
*/
|
||||
public StoreSaleDTO selectStoreSaleByStoreSaleId(Long storeSaleId);
|
||||
|
||||
/**
|
||||
* 查询档口销售出库列表
|
||||
*
|
||||
* @param storeSale 档口销售出库
|
||||
* @return 档口销售出库集合
|
||||
*/
|
||||
public List<StoreSale> selectStoreSaleList(StoreSale storeSale);
|
||||
|
||||
/**
|
||||
* 新增档口销售出库
|
||||
*
|
||||
|
|
@ -49,14 +41,6 @@ public interface IStoreSaleService {
|
|||
*/
|
||||
public int updateStoreSale(StoreSaleDTO storeSaleDTO);
|
||||
|
||||
/**
|
||||
* 批量删除档口销售出库
|
||||
*
|
||||
* @param storeSaleIds 需要删除的档口销售出库主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreSaleByStoreSaleIds(Long[] storeSaleIds);
|
||||
|
||||
/**
|
||||
* 删除档口销售出库信息
|
||||
*
|
||||
|
|
@ -82,10 +66,14 @@ public interface IStoreSaleService {
|
|||
Page<StoreSalePageResDTO> page(StoreSalePageDTO pageDTO);
|
||||
|
||||
/**
|
||||
* 批量结算客户欠款
|
||||
* @param payStatusDTO
|
||||
* @return int
|
||||
* 清除店铺顾客债务信息
|
||||
*
|
||||
* 该方法旨在根据提供的店铺销售支付状态信息来清除或更新店铺顾客的债务记录
|
||||
* 它通常在完成销售交易、债务偿还或其他需要调整顾客债务的情况下调用
|
||||
*
|
||||
* @param payStatusDTO 包含店铺销售支付状态的DTO对象,用于确定是否需要清除顾客债务
|
||||
* @return 返回一个整数,表示受影响的债务记录数量或状态更新结果
|
||||
*/
|
||||
void clearStoreCusDebt(StoreSalePayStatusDTO payStatusDTO);
|
||||
Integer clearStoreCusDebt(StoreSalePayStatusDTO payStatusDTO);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
package com.ruoyi.xkt.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.xkt.domain.StoreProductColor;
|
||||
import com.ruoyi.xkt.dto.storeProdColor.StoreProdColorResDTO;
|
||||
import com.ruoyi.xkt.mapper.StoreProductColorMapper;
|
||||
import com.ruoyi.xkt.service.IStoreProductColorService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -24,80 +21,6 @@ public class StoreProductColorServiceImpl implements IStoreProductColorService {
|
|||
|
||||
final StoreProductColorMapper storeProdColorMapper;
|
||||
|
||||
/**
|
||||
* 查询档口当前商品颜色
|
||||
*
|
||||
* @param storeProdColorId 档口当前商品颜色主键
|
||||
* @return 档口当前商品颜色
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public StoreProductColor selectStoreProductColorByStoreProdColorId(Long storeProdColorId) {
|
||||
return storeProdColorMapper.selectStoreProductColorByStoreProdColorId(storeProdColorId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询档口当前商品颜色列表
|
||||
*
|
||||
* @param storeProductColor 档口当前商品颜色
|
||||
* @return 档口当前商品颜色
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<StoreProductColor> selectStoreProductColorList(StoreProductColor storeProductColor) {
|
||||
return storeProdColorMapper.selectStoreProductColorList(storeProductColor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增档口当前商品颜色
|
||||
*
|
||||
* @param storeProductColor 档口当前商品颜色
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertStoreProductColor(StoreProductColor storeProductColor) {
|
||||
storeProductColor.setCreateTime(DateUtils.getNowDate());
|
||||
return storeProdColorMapper.insertStoreProductColor(storeProductColor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改档口当前商品颜色
|
||||
*
|
||||
* @param storeProductColor 档口当前商品颜色
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateStoreProductColor(StoreProductColor storeProductColor) {
|
||||
storeProductColor.setUpdateTime(DateUtils.getNowDate());
|
||||
return storeProdColorMapper.updateStoreProductColor(storeProductColor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除档口当前商品颜色
|
||||
*
|
||||
* @param storeProdColorIds 需要删除的档口当前商品颜色主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteStoreProductColorByStoreProdColorIds(Long[] storeProdColorIds) {
|
||||
return storeProdColorMapper.deleteStoreProductColorByStoreProdColorIds(storeProdColorIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除档口当前商品颜色信息
|
||||
*
|
||||
* @param storeProdColorId 档口当前商品颜色主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteStoreProductColorByStoreProdColorId(Long storeProdColorId) {
|
||||
return storeProdColorMapper.deleteStoreProductColorByStoreProdColorId(storeProdColorId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据商店ID和产品款式编号模糊查询颜色列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import com.ruoyi.common.exception.ServiceException;
|
|||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.xkt.domain.*;
|
||||
import com.ruoyi.xkt.dto.storeColor.StoreColorDTO;
|
||||
import com.ruoyi.xkt.dto.storeCustomer.StoreCusPageResDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdCateAttr.StoreProdCateAttrDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdColor.StoreProdColorDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdColorPrice.StoreProdColorPriceDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdColorSize.StoreProdColorSizeDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdDetail.StoreProdDetailDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdProcess.StoreProdProcessDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdSvc.StoreProdSvcDTO;
|
||||
|
|
@ -34,6 +34,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -74,29 +75,27 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
StoreProdResDTO storeProdResDTO = BeanUtil.toBean(storeProd, StoreProdResDTO.class).setStoreProdId(storeProd.getId());
|
||||
// 档口文件(商品主图、主图视频、下载的商品详情)
|
||||
List<StoreProdFileResDTO> fileResList = this.storeProdFileMapper.selectListByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setFileList(CollectionUtils.isEmpty(fileResList) ? new ArrayList<>() : BeanUtil.copyToList(fileResList, StoreProdFileResDTO.class));
|
||||
// 档口类目属性列表
|
||||
List<StoreProdCateAttrDTO> cateAttrList = this.storeProdCateAttrMapper.selectListByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setCateAttrList(CollectionUtils.isEmpty(cateAttrList) ? new ArrayList<>() : BeanUtil.copyToList(cateAttrList, StoreProdCateAttrDTO.class));
|
||||
// 档口所有颜色列表
|
||||
List<StoreColorDTO> allColorList = this.storeColorMapper.selectListByStoreProdId(storeProd.getStoreId());
|
||||
storeProdResDTO.setAllColorList(CollectionUtils.isEmpty(allColorList) ? new ArrayList<>() : BeanUtil.copyToList(allColorList, StoreColorDTO.class));
|
||||
// 档口当前商品颜色列表
|
||||
List<StoreProdColorDTO> colorList = this.storeProdColorMapper.selectListByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setColorList(CollectionUtils.isEmpty(colorList) ? new ArrayList<>() : BeanUtil.copyToList(colorList, StoreProdColorDTO.class));
|
||||
// 档口商品颜色尺码列表
|
||||
List<StoreProdColorSizeDTO> sizeList = this.storeProdColorSizeMapper.selectListByStoreProdId(storeProdId);
|
||||
// 档口颜色价格列表
|
||||
List<StoreProdColorPriceDTO> priceList = this.storeProdColorPriceMapper.selectListByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setPriceList(CollectionUtils.isEmpty(priceList) ? new ArrayList<>() : BeanUtil.copyToList(priceList, StoreProdColorPriceDTO.class));
|
||||
// 档口商品详情
|
||||
StoreProductDetail prodDetail = this.storeProdDetailMapper.selectByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setDetail(ObjectUtils.isEmpty(prodDetail) ? null : BeanUtil.toBean(prodDetail, StoreProdDetailDTO.class));
|
||||
// 档口服务承诺
|
||||
StoreProductService storeProductSvc = this.storeProdSvcMapper.selectByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setSvc(ObjectUtils.isEmpty(storeProductSvc) ? null : BeanUtil.toBean(storeProductSvc, StoreProdSvcDTO.class));
|
||||
// 档口生产工艺信息
|
||||
StoreProductProcess prodProcess = this.storeProdProcMapper.selectByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setProcess(ObjectUtils.isEmpty(prodProcess) ? null : BeanUtil.toBean(prodProcess, StoreProdProcessDTO.class));
|
||||
return storeProdResDTO;
|
||||
return storeProdResDTO.setFileList(fileResList).setCateAttrList(cateAttrList).setAllColorList(allColorList)
|
||||
.setColorList(colorList).setPriceList(priceList).setSizeList(sizeList)
|
||||
.setDetail(ObjectUtils.isEmpty(prodDetail) ? null : BeanUtil.toBean(prodDetail, StoreProdDetailDTO.class))
|
||||
.setSvc(ObjectUtils.isEmpty(storeProductSvc) ? null : BeanUtil.toBean(storeProductSvc, StoreProdSvcDTO.class))
|
||||
.setProcess(ObjectUtils.isEmpty(prodProcess) ? null : BeanUtil.toBean(prodProcess, StoreProdProcessDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -162,6 +161,10 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
// 组装StoreProduct数据
|
||||
StoreProduct storeProd = BeanUtil.toBean(storeProdDTO, StoreProduct.class).setVoucherDate(DateUtils.getNowDate());
|
||||
int count = this.storeProdMapper.insert(storeProd);
|
||||
// 处理编辑档口商品颜色
|
||||
this.handleStoreProdColorList(storeProdDTO.getColorList(), storeProd.getId(), storeProd.getStoreId(), Boolean.TRUE);
|
||||
// 处理编辑档口商品颜色尺码
|
||||
this.handleStoreProdColorSizeList(storeProdDTO.getSizeList(), storeProd.getId(), Boolean.TRUE);
|
||||
// 处理StoreProduct其它属性
|
||||
this.handleStoreProdProperties(storeProd, storeProdDTO);
|
||||
return count;
|
||||
|
|
@ -187,10 +190,6 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
this.storeProdFileMapper.updateDelFlagByStoreProdId(storeProdId);
|
||||
// 档口类目属性列表的 del_flag置为2
|
||||
this.storeProdCateAttrMapper.updateDelFlagByStoreProdId(storeProdId);
|
||||
// 档口颜色列表的del_flag置为2
|
||||
this.storeProdColorMapper.updateDelFlagByStoreProdId(storeProdId);
|
||||
// 档口颜色尺码列表的del_flag置为2
|
||||
this.storeProdColorSizeMapper.updateDelFlagByStoreProdId(storeProdId);
|
||||
// 档口颜色价格列表的del_flag置为2
|
||||
this.storeProdColorPriceMapper.updateDelFlagByStoreProdId(storeProdId);
|
||||
// 档口详情内容的del_flag置为2
|
||||
|
|
@ -201,9 +200,120 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
this.storeProdProcMapper.updateDelFlagByStoreProdId(storeProdId);
|
||||
// 处理更新逻辑
|
||||
this.handleStoreProdProperties(storeProd, storeProdDTO);
|
||||
// 处理编辑档口商品颜色
|
||||
this.handleStoreProdColorList(storeProdDTO.getColorList(), storeProdId, storeProd.getStoreId(), Boolean.FALSE);
|
||||
// 处理编辑档口商品颜色尺码
|
||||
this.handleStoreProdColorSizeList(storeProdDTO.getSizeList(), storeProdId, Boolean.FALSE);
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理店铺商品颜色尺码列表
|
||||
*
|
||||
* @param sizeDTOList 店铺商品颜色尺码DTO列表
|
||||
* @param storeProdId 店铺商品ID
|
||||
* @param isInsert 是否是插入操作
|
||||
*/
|
||||
private void handleStoreProdColorSizeList(List<StoreProdColorSizeDTO> sizeDTOList, Long storeProdId, Boolean isInsert) {
|
||||
// 过滤出需要添加的颜色尺码信息,并转换为实体类对象
|
||||
List<StoreProductColorSize> toAddList = sizeDTOList.stream().filter(x -> ObjectUtils.isEmpty(x.getStoreProdColorSizeId()))
|
||||
.map(x -> BeanUtil.toBean(x, StoreProductColorSize.class).setStoreProdId(storeProdId)).collect(Collectors.toList());
|
||||
// 根据是否是插入操作来决定执行插入还是更新操作
|
||||
if (isInsert) {
|
||||
// 如果是插入操作,直接插入新的颜色尺码信息
|
||||
this.storeProdColorSizeMapper.insert(toAddList);
|
||||
} else {
|
||||
// 如果不是插入操作,首先获取数据库中的颜色尺码信息
|
||||
List<StoreProductColorSize> colorSizeList = Optional.ofNullable(this.storeProdColorSizeMapper.selectList(new LambdaQueryWrapper<StoreProductColorSize>()
|
||||
.eq(StoreProductColorSize::getStoreProdId, storeProdId).eq(StoreProductColorSize::getDelFlag, Constants.UNDELETED)))
|
||||
.orElseThrow(() -> new ServiceException("该档口下没有商品及颜色", HttpStatus.ERROR));
|
||||
// 将数据库中的颜色尺码信息转换为Map,便于后续操作
|
||||
Map<Long, StoreProductColorSize> dbProdColorSizeMap = colorSizeList.stream().collect(Collectors.toMap(StoreProductColorSize::getId, Function.identity()));
|
||||
// 将前端传入的颜色尺码信息转换为Map,便于后续操作
|
||||
Map<Long, StoreProdColorSizeDTO> frontProdColorSizeMap = sizeDTOList.stream()
|
||||
.filter(x -> ObjectUtils.isNotEmpty(x.getStoreProdColorSizeId())).collect(Collectors.toMap(StoreProdColorSizeDTO::getStoreProdColorSizeId, Function.identity()));
|
||||
// 过滤出需要更新的颜色尺码信息,并更新其属性
|
||||
List<StoreProductColorSize> toUpdateList = sizeDTOList.stream().filter(x -> ObjectUtils.isNotEmpty(x.getStoreProdColorSizeId()))
|
||||
.map(x -> {
|
||||
StoreProductColorSize dbProdColor = Optional.ofNullable(dbProdColorSizeMap.get(x.getStoreProdColorSizeId())).orElseThrow(() -> new ServiceException("该档口商品颜色尺码不存在", HttpStatus.ERROR));
|
||||
BeanUtil.copyProperties(x, dbProdColor);
|
||||
return dbProdColor;
|
||||
}).collect(Collectors.toList());
|
||||
// 过滤出需要删除的颜色尺码信息,并设置其删除标志
|
||||
List<StoreProductColorSize> toDeleteList = colorSizeList.stream().filter(x -> !frontProdColorSizeMap.containsKey(x.getId())).peek(x -> x.setDelFlag(Constants.DELETED)).collect(Collectors.toList());
|
||||
// 将所有需要更新的颜色尺码信息合并到一个列表中
|
||||
List<StoreProductColorSize> allUpdateList = new ArrayList<StoreProductColorSize>() {{
|
||||
if (CollectionUtils.isNotEmpty(toAddList)) {
|
||||
addAll(toAddList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(toUpdateList)) {
|
||||
addAll(toUpdateList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(toDeleteList)) {
|
||||
addAll(toDeleteList);
|
||||
}
|
||||
}};
|
||||
// 如果有需要更新的颜色尺码信息,则执行更新操作
|
||||
if (CollectionUtils.isNotEmpty(allUpdateList)) {
|
||||
this.storeProdColorSizeMapper.insertOrUpdate(allUpdateList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理店铺商品颜色列表
|
||||
*
|
||||
* @param colorDTOList 商品颜色DTO列表
|
||||
* @param storeProdId 店铺商品ID
|
||||
* @param storeId 店铺ID
|
||||
* @param isInsert 是否是插入操作
|
||||
*/
|
||||
private void handleStoreProdColorList(List<StoreProdColorDTO> colorDTOList, Long storeProdId, Long storeId, Boolean isInsert) {
|
||||
// 过滤出需要添加的商品颜色,并转换为StoreProductColor对象
|
||||
List<StoreProductColor> toAddList = colorDTOList.stream().filter(x -> ObjectUtils.isEmpty(x.getStoreProdColorId()))
|
||||
.map(x -> BeanUtil.toBean(x, StoreProductColor.class).setStoreProdId(storeProdId).setStoreId(storeId)).collect(Collectors.toList());
|
||||
if (isInsert) {
|
||||
// 如果是插入操作,直接添加新的商品颜色
|
||||
this.storeProdColorMapper.insert(toAddList);
|
||||
} else {
|
||||
// 如果不是插入操作,获取当前店铺商品颜色列表
|
||||
List<StoreProductColor> colorList = Optional.ofNullable(this.storeProdColorMapper.selectList(new LambdaQueryWrapper<StoreProductColor>()
|
||||
.eq(StoreProductColor::getStoreProdId, storeProdId).eq(StoreProductColor::getDelFlag, Constants.UNDELETED)
|
||||
.eq(StoreProductColor::getStoreId, storeId)))
|
||||
.orElseThrow(() -> new ServiceException("该档口下没有商品及颜色", HttpStatus.ERROR));
|
||||
// 将数据库中的商品颜色信息转换为Map,便于后续操作
|
||||
Map<Long, StoreProductColor> dbProdColorMap = colorList.stream().collect(Collectors.toMap(StoreProductColor::getId, Function.identity()));
|
||||
// 将前端传入的商品颜色信息转换为Map,便于后续操作
|
||||
Map<Long, StoreProdColorDTO> frontProdColorMap = colorDTOList.stream()
|
||||
.filter(x -> ObjectUtils.isNotEmpty(x.getStoreProdColorId())).collect(Collectors.toMap(StoreProdColorDTO::getStoreProdColorId, Function.identity()));
|
||||
// 过滤出需要更新的商品颜色,并更新信息
|
||||
List<StoreProductColor> toUpdateList = colorDTOList.stream().filter(x -> ObjectUtils.isNotEmpty(x.getStoreProdColorId()))
|
||||
.map(x -> {
|
||||
StoreProductColor dbProdColor = Optional.ofNullable(dbProdColorMap.get(x.getStoreProdColorId())).orElseThrow(() -> new ServiceException("该档口商品颜色不存在", HttpStatus.ERROR));
|
||||
BeanUtil.copyProperties(x, dbProdColor);
|
||||
return dbProdColor;
|
||||
}).collect(Collectors.toList());
|
||||
// 过滤出需要删除的商品颜色,并设置删除标志
|
||||
List<StoreProductColor> toDeleteList = colorList.stream().filter(x -> !frontProdColorMap.containsKey(x.getId())).peek(x -> x.setDelFlag(Constants.DELETED)).collect(Collectors.toList());
|
||||
// 合并所有需要更新的商品颜色列表
|
||||
List<StoreProductColor> allUpdateList = new ArrayList<StoreProductColor>() {{
|
||||
if (CollectionUtils.isNotEmpty(toAddList)) {
|
||||
addAll(toAddList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(toUpdateList)) {
|
||||
addAll(toUpdateList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(toDeleteList)) {
|
||||
addAll(toDeleteList);
|
||||
}
|
||||
}};
|
||||
// 如果有需要更新的商品颜色,执行更新操作
|
||||
if (CollectionUtils.isNotEmpty(allUpdateList)) {
|
||||
this.storeProdColorMapper.insertOrUpdate(allUpdateList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新档口商品的状态
|
||||
|
|
@ -262,7 +372,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
/**
|
||||
* 根据商店ID和产品货号模糊查询产品列表
|
||||
*
|
||||
* @param storeId 商店ID,用于查询特定商店的产品
|
||||
* @param storeId 商店ID,用于查询特定商店的产品
|
||||
* @param prodArtNum 产品货号,用于模糊匹配产品
|
||||
* @return 返回一个包含模糊查询结果的列表,每个元素包含产品信息和颜色信息
|
||||
*/
|
||||
|
|
@ -300,7 +410,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
/**
|
||||
* 处理档口商品属性
|
||||
*
|
||||
* @param storeProd 档口商品实体
|
||||
* @param storeProd 档口商品实体
|
||||
* @param storeProdDTO 档口商品数据传输对象
|
||||
*/
|
||||
private void handleStoreProdProperties(StoreProduct storeProd, StoreProdDTO storeProdDTO) {
|
||||
|
|
@ -323,18 +433,6 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
.setStoreProdId(storeProd.getId()))
|
||||
.collect(Collectors.toList());
|
||||
this.storeProdCateAttrMapper.insert(cateAttrList);
|
||||
// 商品颜色列表
|
||||
List<StoreProductColor> colorList = storeProdDTO.getColorList().stream()
|
||||
.map(x -> BeanUtil.toBean(x, StoreProductColor.class)
|
||||
.setStoreProdId(storeProd.getId()).setStoreId(storeProdDTO.getStoreId()))
|
||||
.collect(Collectors.toList());
|
||||
this.storeProdColorMapper.insert(colorList);
|
||||
// 档口颜色尺码列表
|
||||
List<StoreProductColorSize> sizeList = storeProdDTO.getSizeList().stream()
|
||||
.map(x -> BeanUtil.toBean(x, StoreProductColorSize.class)
|
||||
.setStoreProdId(storeProd.getId()))
|
||||
.collect(Collectors.toList());
|
||||
this.storeProdColorSizeMapper.insert(sizeList);
|
||||
// 档口颜色价格列表
|
||||
List<StoreProductColorPrice> priceList = storeProdDTO.getPriceList().stream()
|
||||
.map(x -> BeanUtil.toBean(x, StoreProductColorPrice.class)
|
||||
|
|
@ -360,12 +458,11 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
.eq(StoreColor::getStoreId, storeProdDTO.getStoreId()).eq(StoreColor::getDelFlag, Constants.UNDELETED));
|
||||
List<Long> dbStoreColorIdList = storeColorList.stream().map(StoreColor::getId).collect(Collectors.toList());
|
||||
// 新增的颜色列表
|
||||
List<StoreColor> addColorList =storeProdDTO.getAllColorList().stream().filter(x -> !dbStoreColorIdList.contains(x.getStoreColorId()))
|
||||
List<StoreColor> addColorList = storeProdDTO.getAllColorList().stream().filter(x -> !dbStoreColorIdList.contains(x.getStoreColorId()))
|
||||
.map(x -> BeanUtil.toBean(x, StoreColor.class).setStoreId(storeProdDTO.getStoreId())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(addColorList)) {
|
||||
this.storeColorMapper.insert(addColorList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -473,21 +473,21 @@ public class StoreProductStorageServiceImpl implements IStoreProductStorageServi
|
|||
/**
|
||||
* 撤销档口商品入库
|
||||
*
|
||||
* @param storeProdStorId 需要撤销档口商品入库主键
|
||||
* @param storeProdStorageId 需要撤销档口商品入库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteByStoreProdStorId(Long storeProdStorId) {
|
||||
public int deleteByStoreProdStorId(Long storeProdStorageId) {
|
||||
// 档口商品入库
|
||||
StoreProductStorage storage = Optional.ofNullable(this.storageMapper.selectOne(new LambdaQueryWrapper<StoreProductStorage>()
|
||||
.eq(StoreProductStorage::getId, storeProdStorId).eq(StoreProductStorage::getDelFlag, Constants.UNDELETED)))
|
||||
.eq(StoreProductStorage::getId, storeProdStorageId).eq(StoreProductStorage::getDelFlag, Constants.UNDELETED)))
|
||||
.orElseThrow(() -> new ServiceException("档口商品入库不存在!", HttpStatus.ERROR));
|
||||
storage.setDelFlag(Constants.DELETED);
|
||||
int count = this.storageMapper.updateById(storage);
|
||||
// 档口商品入库明细
|
||||
List<StoreProductStorageDetail> storageDetailList = storageDetailMapper.selectList(new LambdaQueryWrapper<StoreProductStorageDetail>()
|
||||
.eq(StoreProductStorageDetail::getStoreProdStorId, storeProdStorId).eq(StoreProductStorageDetail::getDelFlag, Constants.UNDELETED));
|
||||
.eq(StoreProductStorageDetail::getStoreProdStorId, storeProdStorageId).eq(StoreProductStorageDetail::getDelFlag, Constants.UNDELETED));
|
||||
storageDetailList.forEach(x -> x.setDelFlag(Constants.DELETED));
|
||||
this.storageDetailMapper.updateById(storageDetailList);
|
||||
// 减少档口商品库存
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.ruoyi.xkt.service.impl;
|
|||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.xkt.domain.StoreQuickFunction;
|
||||
import com.ruoyi.xkt.dto.storeQuickFunction.StoreQuickFuncDTO;
|
||||
import com.ruoyi.xkt.mapper.StoreQuickFunctionMapper;
|
||||
|
|
@ -32,7 +31,7 @@ public class StoreQuickFunctionServiceImpl implements IStoreQuickFunctionService
|
|||
@Transactional(readOnly = true)
|
||||
public List<StoreQuickFuncDTO.DetailDTO> getCheckedMenuList(Long storeId) {
|
||||
List<StoreQuickFunction> storeQuickFuncList = storeQuickFuncMapper.selectList(new LambdaQueryWrapper<StoreQuickFunction>()
|
||||
.eq(StoreQuickFunction::getStoreId,storeId).eq(StoreQuickFunction::getDelFlag, Constants.UNDELETED));
|
||||
.eq(StoreQuickFunction::getStoreId, storeId).eq(StoreQuickFunction::getDelFlag, Constants.UNDELETED));
|
||||
return CollectionUtils.isEmpty(storeQuickFuncList) ? new ArrayList<>() : BeanUtil.copyToList(storeQuickFuncList, StoreQuickFuncDTO.DetailDTO.class);
|
||||
}
|
||||
|
||||
|
|
@ -43,6 +42,7 @@ public class StoreQuickFunctionServiceImpl implements IStoreQuickFunctionService
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateCheckedList(StoreQuickFuncDTO storeQuickFuncDTO) {
|
||||
// 先将旧的绑定关系置为无效
|
||||
this.storeQuickFuncMapper.updateDelFlagByStoreId(storeQuickFuncDTO.getStoreId());
|
||||
|
|
@ -52,79 +52,4 @@ public class StoreQuickFunctionServiceImpl implements IStoreQuickFunctionService
|
|||
this.storeQuickFuncMapper.insert(checkedList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询档口快捷功能
|
||||
*
|
||||
* @param storeQuickFuncId 档口快捷功能主键
|
||||
* @return 档口快捷功能
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public StoreQuickFunction selectStoreQuickFunctionByStoreQuickFuncId(Long storeQuickFuncId) {
|
||||
return storeQuickFuncMapper.selectStoreQuickFunctionByStoreQuickFuncId(storeQuickFuncId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询档口快捷功能列表
|
||||
*
|
||||
* @param storeQuickFunction 档口快捷功能
|
||||
* @return 档口快捷功能
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<StoreQuickFunction> selectStoreQuickFunctionList(StoreQuickFunction storeQuickFunction) {
|
||||
return storeQuickFuncMapper.selectStoreQuickFunctionList(storeQuickFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增档口快捷功能
|
||||
*
|
||||
* @param storeQuickFunction 档口快捷功能
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertStoreQuickFunction(StoreQuickFunction storeQuickFunction) {
|
||||
storeQuickFunction.setCreateTime(DateUtils.getNowDate());
|
||||
return storeQuickFuncMapper.insertStoreQuickFunction(storeQuickFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改档口快捷功能
|
||||
*
|
||||
* @param storeQuickFunction 档口快捷功能
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateStoreQuickFunction(StoreQuickFunction storeQuickFunction) {
|
||||
storeQuickFunction.setUpdateTime(DateUtils.getNowDate());
|
||||
return storeQuickFuncMapper.updateStoreQuickFunction(storeQuickFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除档口快捷功能
|
||||
*
|
||||
* @param storeQuickFuncIds 需要删除的档口快捷功能主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteStoreQuickFunctionByStoreQuickFuncIds(Long[] storeQuickFuncIds) {
|
||||
return storeQuickFuncMapper.deleteStoreQuickFunctionByStoreQuickFuncIds(storeQuickFuncIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除档口快捷功能信息
|
||||
*
|
||||
* @param storeQuickFuncId 档口快捷功能主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteStoreQuickFunctionByStoreQuickFuncId(Long storeQuickFuncId) {
|
||||
return storeQuickFuncMapper.deleteStoreQuickFunctionByStoreQuickFuncId(storeQuickFuncId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import lombok.RequiredArgsConstructor;
|
|||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.ibatis.executor.BatchResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -109,16 +110,19 @@ public class StoreSaleServiceImpl implements IStoreSaleService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 批量结算客户欠款
|
||||
* 清除店铺顾客债务信息
|
||||
* <p>
|
||||
* 该方法旨在根据提供的店铺销售支付状态信息来清除或更新店铺顾客的债务记录
|
||||
* 它通常在完成销售交易、债务偿还或其他需要调整顾客债务的情况下调用
|
||||
*
|
||||
* @param payStatusDTO 入参
|
||||
* @return int
|
||||
* @param payStatusDTO 包含店铺销售支付状态的DTO对象,用于确定是否需要清除顾客债务
|
||||
* @return 返回一个整数,表示受影响的债务记录数量或状态更新结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void clearStoreCusDebt(StoreSalePayStatusDTO payStatusDTO) {
|
||||
public Integer clearStoreCusDebt(StoreSalePayStatusDTO payStatusDTO) {
|
||||
List<StoreSale> storeSaleList = Optional.ofNullable(this.storeSaleMapper.selectList(new LambdaQueryWrapper<StoreSale>()
|
||||
.in(StoreSale::getId, payStatusDTO.getStoreSaleIdList()).eq(StoreSale::getDelFlag, Constants.UNDELETED)))
|
||||
.in(StoreSale::getId, payStatusDTO.getStoreSaleIdList()).eq(StoreSale::getDelFlag, Constants.UNDELETED)))
|
||||
.orElseThrow(() -> new ServiceException("没有找到对应的销售出库单!", HttpStatus.ERROR));
|
||||
// 勾选订单是否有已结算的
|
||||
List<StoreSale> settledList = storeSaleList.stream().filter(x -> Objects.equals(x.getPaymentStatus(), PaymentStatus.SETTLED.getValue())).collect(Collectors.toList());
|
||||
|
|
@ -126,7 +130,8 @@ public class StoreSaleServiceImpl implements IStoreSaleService {
|
|||
throw new ServiceException("当前订单已结算!" + settledList.stream().map(StoreSale::getCode).collect(Collectors.toList()), HttpStatus.ERROR);
|
||||
}
|
||||
storeSaleList.forEach(x -> x.setPaymentStatus(PaymentStatus.SETTLED.getValue()));
|
||||
this.storeSaleMapper.updateById(storeSaleList);
|
||||
List<BatchResult> list = this.storeSaleMapper.updateById(storeSaleList);
|
||||
return list.size();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -166,7 +171,6 @@ public class StoreSaleServiceImpl implements IStoreSaleService {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改档口销售出库
|
||||
*
|
||||
|
|
@ -210,7 +214,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService {
|
|||
.setSaleType(storeSaleDTO.getSaleType()).setStoreSaleId(storeSale.getId())).collect(Collectors.toList());
|
||||
this.storeSaleDetailMapper.insert(detailList);
|
||||
// 汇总编辑的存货总数量
|
||||
final List<StoreSaleDetail> totalList = new ArrayList<StoreSaleDetail>(saleDetailList){{
|
||||
final List<StoreSaleDetail> totalList = new ArrayList<StoreSaleDetail>(saleDetailList) {{
|
||||
addAll(detailList);
|
||||
}};
|
||||
// 先汇总当前这笔订单商品明细的销售数量,包括销售及退货 key: prodArtNum + storeProdId + storeProdColorId + colorName, value: map(key:size,value:count)
|
||||
|
|
@ -273,33 +277,10 @@ public class StoreSaleServiceImpl implements IStoreSaleService {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除档口销售出库
|
||||
*
|
||||
* @param storeSaleIds 需要删除的档口销售出库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteStoreSaleByStoreSaleIds(Long[] storeSaleIds) {
|
||||
return storeSaleMapper.deleteStoreSaleByStoreSaleIds(storeSaleIds);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询档口销售出库列表
|
||||
*
|
||||
* @param storeSale 档口销售出库
|
||||
* @return 档口销售出库集合
|
||||
*/
|
||||
@Override
|
||||
public List<StoreSale> selectStoreSaleList(StoreSale storeSale) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存变更列表
|
||||
* @param saleCountMap 销售出库的map数量
|
||||
*
|
||||
* @param saleCountMap 销售出库的map数量
|
||||
* @param multiplierFactor 1 返回当前库存 -1 减少库存
|
||||
* @return List<StoreProdStockUpdateDTO>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectListByStoreProdId" parameterType="Long" resultType="com.ruoyi.xkt.dto.storeProdColor.StoreProdColorDTO">
|
||||
SELECT
|
||||
id AS storeProdColorId,
|
||||
store_color_id AS storeColorId,
|
||||
color_name AS colorName,
|
||||
order_num AS orderNum
|
||||
|
|
|
|||
|
|
@ -103,4 +103,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
UPDATE store_product_color_size SET del_flag = 2 WHERE store_prod_id = #{storeProdId}
|
||||
</update>
|
||||
|
||||
<select id="selectListByStoreProdId" parameterType="Long" resultType="com.ruoyi.xkt.dto.storeProdColorSize.StoreProdColorSizeDTO">
|
||||
SELECT
|
||||
id AS storeProdColorSizeId,
|
||||
store_color_id,
|
||||
size,
|
||||
standard
|
||||
FROM
|
||||
store_product_color_size
|
||||
WHERE
|
||||
del_flag = 0 AND store_prod_id = #{storeProdId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue