master:销售出库导出、入库明细导出;
parent
0e93ca723e
commit
c04893c13c
|
|
@ -6,20 +6,26 @@ 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.storeProdStorage.StoreProdStoragePageVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeProdStorage.StoreProdStorageResVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeProdStorage.StoreProdStorageVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeSale.StoreSaleExportVO;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreProdStorageDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreProdStoragePageDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreProdStoragePageResDTO;
|
||||
import com.ruoyi.xkt.dto.storeSale.StoreSaleDownloadDTO;
|
||||
import com.ruoyi.xkt.dto.storeSale.StoreSaleExportDTO;
|
||||
import com.ruoyi.xkt.service.IStoreProductStorageService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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
|
||||
*
|
||||
|
|
@ -34,10 +40,6 @@ public class StoreProductStorageController extends XktBaseController {
|
|||
|
||||
final IStoreProductStorageService storeProdStorageService;
|
||||
|
||||
/**
|
||||
* 新增档口商品入库
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:storage:add')")
|
||||
@ApiOperation(value = "新增档口商品入库", httpMethod = "POST", response = R.class)
|
||||
@Log(title = "新增档口商品入库", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
|
|
@ -45,30 +47,18 @@ public class StoreProductStorageController extends XktBaseController {
|
|||
return R.ok(storeProdStorageService.create(BeanUtil.toBean(storeProdStorageVO, StoreProdStorageDTO.class)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询档口商品入库列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:product:list')")
|
||||
@ApiOperation(value = "查询档口商品入库列表", httpMethod = "POST", response = R.class)
|
||||
@PostMapping("/page")
|
||||
public R<Page<StoreProdStoragePageResDTO>> page(@Validated @RequestBody StoreProdStoragePageVO pageVO) {
|
||||
return R.ok(storeProdStorageService.page(BeanUtil.toBean(pageVO, StoreProdStoragePageDTO.class)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取档口商品入库详细信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:storage:query')")
|
||||
@ApiOperation(value = "获取档口商品入库详细信息", httpMethod = "GET", response = R.class)
|
||||
@GetMapping(value = "/{storeProdStorageId}")
|
||||
public R<StoreProdStorageResVO> getInfo(@PathVariable("storeProdStorageId") Long storeProdStorageId) {
|
||||
return R.ok(BeanUtil.toBean(storeProdStorageService.selectByStoreProdStorageId(storeProdStorageId), StoreProdStorageResVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤销档口商品入库
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:storage:remove')")
|
||||
@ApiOperation(value = "撤销档口商品入库", httpMethod = "DELETE", response = R.class)
|
||||
@Log(title = "撤销档口商品入库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{storeProdStorageId}")
|
||||
|
|
|
|||
|
|
@ -1,19 +1,30 @@
|
|||
package com.ruoyi.web.controller.xkt;
|
||||
|
||||
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.DateUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.xkt.domain.StoreProductStorageDetail;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeProdStorage.StoreStorageExportVO;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreStorageDetailDownloadDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreStorageExportDTO;
|
||||
import com.ruoyi.xkt.service.IStoreProductStorageDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 档口商品入库明细Controller
|
||||
|
|
@ -21,71 +32,24 @@ import java.util.List;
|
|||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Api(tags = "档口商品入库明细")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/rest/v1/storage-details")
|
||||
public class StoreProductStorageDetailController extends XktBaseController {
|
||||
@Autowired
|
||||
private IStoreProductStorageDetailService storeProductStorageDetailService;
|
||||
|
||||
/**
|
||||
* 查询档口商品入库明细列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:detail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StoreProductStorageDetail storeProductStorageDetail) {
|
||||
startPage();
|
||||
List<StoreProductStorageDetail> list = storeProductStorageDetailService.selectStoreProductStorageDetailList(storeProductStorageDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
final IStoreProductStorageDetailService storageDetailService;
|
||||
|
||||
/**
|
||||
* 导出档口商品入库明细列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:detail:export')")
|
||||
@Log(title = "档口商品入库明细", businessType = BusinessType.EXPORT)
|
||||
@ApiOperation(value = "导出入库记录", httpMethod = "POST", response = R.class)
|
||||
@Log(title = "导出入库记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StoreProductStorageDetail storeProductStorageDetail) {
|
||||
List<StoreProductStorageDetail> list = storeProductStorageDetailService.selectStoreProductStorageDetailList(storeProductStorageDetail);
|
||||
ExcelUtil<StoreProductStorageDetail> util = new ExcelUtil<StoreProductStorageDetail>(StoreProductStorageDetail.class);
|
||||
util.exportExcel(response, list, "档口商品入库明细数据");
|
||||
public void export(HttpServletResponse response, @Validated @RequestBody StoreStorageExportVO exportVO) throws UnsupportedEncodingException {
|
||||
List<StoreStorageDetailDownloadDTO> downloadList = storageDetailService.export(BeanUtil.toBean(exportVO, StoreStorageExportDTO.class));
|
||||
ExcelUtil<StoreStorageDetailDownloadDTO> util = new ExcelUtil<>(StoreStorageDetailDownloadDTO.class);
|
||||
// 设置下载excel名
|
||||
String encodedFileName = URLEncoder.encode("入库记录" + DateUtils.getDate(), "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + encodedFileName + ".xlsx");
|
||||
util.exportExcel(response, downloadList, "入库记录");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取档口商品入库明细详细信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:detail:query')")
|
||||
@GetMapping(value = "/{storeProdStorDetailId}")
|
||||
public R getInfo(@PathVariable("storeProdStorDetailId") Long storeProdStorDetailId) {
|
||||
return success(storeProductStorageDetailService.selectStoreProductStorageDetailByStoreProdStorDetailId(storeProdStorDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增档口商品入库明细
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:detail:add')")
|
||||
@Log(title = "档口商品入库明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R add(@RequestBody StoreProductStorageDetail storeProductStorageDetail) {
|
||||
return success(storeProductStorageDetailService.insertStoreProductStorageDetail(storeProductStorageDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改档口商品入库明细
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:detail:edit')")
|
||||
@Log(title = "档口商品入库明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R edit(@RequestBody StoreProductStorageDetail storeProductStorageDetail) {
|
||||
return success(storeProductStorageDetailService.updateStoreProductStorageDetail(storeProductStorageDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除档口商品入库明细
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:detail:remove')")
|
||||
@Log(title = "档口商品入库明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{storeProdStorDetailIds}")
|
||||
public R remove(@PathVariable Long[] storeProdStorDetailIds) {
|
||||
return success(storeProductStorageDetailService.deleteStoreProductStorageDetailByStoreProdStorDetailIds(storeProdStorDetailIds));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +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.DateUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.SysOperLog;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeCustomer.StoreCusGeneralSaleVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.storeSale.*;
|
||||
import com.ruoyi.xkt.dto.storeSale.*;
|
||||
|
|
@ -17,6 +20,11 @@ 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.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 档口销售出库Controller
|
||||
*
|
||||
|
|
@ -77,7 +85,8 @@ public class StoreSaleController extends XktBaseController {
|
|||
return R.ok(storeSaleService.clearStoreCusDebt(BeanUtil.toBean(payStatusVO, StoreSalePayStatusDTO.class)));
|
||||
}
|
||||
|
||||
@Log(title = "档口销售出库", businessType = BusinessType.DELETE)
|
||||
@ApiOperation(value = "删除档口销售出库", httpMethod = "PUT", response = R.class)
|
||||
@Log(title = "删除档口销售出库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{storeSaleId}")
|
||||
public R<Integer> remove(@PathVariable Long storeSaleId) {
|
||||
return R.ok(storeSaleService.deleteStoreSaleByStoreSaleId(storeSaleId));
|
||||
|
|
@ -90,4 +99,16 @@ public class StoreSaleController extends XktBaseController {
|
|||
return R.ok(storeSaleService.updateMemo(BeanUtil.toBean(updateMemoVO, StoreSaleUpdateMemoDTO.class)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导出销售出库列表", httpMethod = "POST", response = R.class)
|
||||
@Log(title = "导出销售出库列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, @Validated @RequestBody StoreSaleExportVO exportVO) throws UnsupportedEncodingException {
|
||||
List<StoreSaleDownloadDTO> downloadList = storeSaleService.export(BeanUtil.toBean(exportVO, StoreSaleExportDTO.class));
|
||||
ExcelUtil<StoreSaleDownloadDTO> util = new ExcelUtil<>(StoreSaleDownloadDTO.class);
|
||||
// 设置下载excel名
|
||||
String encodedFileName = URLEncoder.encode("销售出库" + DateUtils.getDate(), "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + encodedFileName + ".xlsx");
|
||||
util.exportExcel(response, downloadList, "销售出库");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
package com.ruoyi.web.controller.xkt;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
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.redis.RedisCache;
|
||||
import com.ruoyi.web.controller.xkt.vo.advertRound.app.category.APPCateVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.advertRound.app.index.APPIndexHotSaleRightFixVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.advertRound.app.index.APPIndexMidBrandVO;
|
||||
|
|
@ -53,6 +55,7 @@ public class WebsiteController extends XktBaseController {
|
|||
|
||||
final IWebsitePCService websitePCService;
|
||||
final IWebsiteAPPService websiteAPPService;
|
||||
final RedisCache redisCache;
|
||||
|
||||
@ApiOperation(value = "PC 首页 为你推荐", httpMethod = "POST", response = R.class)
|
||||
@PostMapping("/pc/index/recommend")
|
||||
|
|
@ -245,4 +248,10 @@ public class WebsiteController extends XktBaseController {
|
|||
return R.ok(BeanUtil.copyToList(websiteAPPService.getAppOwnGuessLikeList(), APPOwnGuessLikeVO.class));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "热门搜索", httpMethod = "GET", response = R.class)
|
||||
@GetMapping("/search-hot")
|
||||
public R<List<String>> getSearchHotList() {
|
||||
return R.ok(redisCache.getCacheObject(CacheConstants.SEARCH_HOT_KEY));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ public class APPIndexHotSaleRightFixVO {
|
|||
private Integer displayType;
|
||||
@ApiModelProperty(value = "档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer orderNum;
|
||||
@ApiModelProperty(value = "售价")
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ public class APPIndexMidBrandVO {
|
|||
private Integer displayType;
|
||||
@ApiModelProperty(value = "档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer orderNum;
|
||||
@ApiModelProperty(value = "售价")
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ public class PCIndexBottomPopularVO {
|
|||
|
||||
@Data
|
||||
public static class PCIBPPopularRightVO {
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "2商品")
|
||||
private Integer displayType;
|
||||
@ApiModelProperty(value = "档口商品ID")
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public class PCIndexSearchRecommendProdVO {
|
|||
private Integer displayType;
|
||||
@ApiModelProperty(value = "档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
@ApiModelProperty(value = "排序")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package com.ruoyi.web.controller.xkt.vo.storeProdStorage;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
* @date 2025/3/27 15:12
|
||||
*/
|
||||
@ApiModel("档口入库导出数据")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class StoreStorageExportVO {
|
||||
|
||||
@NotNull(message = "storeId不能为空!")
|
||||
@ApiModelProperty(value = "storeId")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "storeProdStorageId")
|
||||
private List<Long> storeProdStorageIdList;
|
||||
@ApiModelProperty(value = "导出开始时间")
|
||||
private Date voucherDateStart;
|
||||
@ApiModelProperty(value = "导出结束时间")
|
||||
private Date voucherDateEnd;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.ruoyi.web.controller.xkt.vo.storeSale;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
* @date 2025/3/27 15:12
|
||||
*/
|
||||
@ApiModel("档口销售导出数据")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class StoreSaleExportVO {
|
||||
|
||||
@NotNull(message = "storeId不能为空!")
|
||||
@ApiModelProperty(value = "storeId")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "storeSaleIdList")
|
||||
private List<Long> storeSaleIdList;
|
||||
@ApiModelProperty(value = "导出开始时间")
|
||||
private Date voucherDateStart;
|
||||
@ApiModelProperty(value = "导出结束时间")
|
||||
private Date voucherDateEnd;
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -102,6 +102,12 @@ public class DailyTaskController extends BaseController {
|
|||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/search-hot")
|
||||
public R dailySearchHot(SysJob sysJob) {
|
||||
task.dailyUpdateSearchHotToRedis();
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -652,7 +652,7 @@ public class XktTask {
|
|||
CollectionUtils.addAll(redisSearchList, tempList);
|
||||
});
|
||||
Map<String, Long> searchCountMap = redisSearchList.stream().collect(Collectors.groupingBy(UserSearchHistoryDTO::getSearchContent,
|
||||
Collectors.summingLong(UserSearchHistoryDTO::getId)));
|
||||
Collectors.summingLong(UserSearchHistoryDTO::getUserId)));
|
||||
// searchCountMap 按照 value 大小倒序排,取前20条热搜
|
||||
List<Map.Entry<String, Long>> top20List = searchCountMap.entrySet().stream().sorted(Map.Entry.<String, Long>comparingByValue().reversed())
|
||||
.limit(20).collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ public class StoreProductStorage extends XktBaseEntity {
|
|||
*/
|
||||
private Long storeId;
|
||||
/**
|
||||
* 入库CODE
|
||||
* code
|
||||
*/
|
||||
@Excel(name = "入库CODE")
|
||||
@Excel(name = "code")
|
||||
private String code;
|
||||
/**
|
||||
* 入库类型 生产入库 1 PROD_STORAGE 其它入库 2 OTHER_STORAGE 维修入库 3 REPAIR_STORAGE
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ public class APPIndexHotSaleRightFixDTO {
|
|||
private Integer displayType;
|
||||
@ApiModelProperty(value = "档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer orderNum;
|
||||
@ApiModelProperty(value = "售价")
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ public class APPIndexMidBrandDTO {
|
|||
private Integer displayType;
|
||||
@ApiModelProperty(value = "档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer orderNum;
|
||||
@ApiModelProperty(value = "售价")
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ public class PCIndexBottomPopularDTO {
|
|||
@ApiModel(value = "右侧商品")
|
||||
@Accessors(chain = true)
|
||||
public static class PCIBPPopularRightDTO {
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "2商品")
|
||||
private Integer displayType;
|
||||
@ApiModelProperty(value = "档口商品ID")
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ public class PCIndexSearchRecommendProdDTO {
|
|||
private Integer displayType;
|
||||
@ApiModelProperty(value = "档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
@ApiModelProperty(value = "排序")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
package com.ruoyi.xkt.dto.storeProdStorage;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
* @date 2025/3/27 15:12
|
||||
*/
|
||||
@ApiModel("档口入库导出数据")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class StoreStorageDetailDownloadDTO {
|
||||
|
||||
@Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, needMerge = true)
|
||||
private Integer orderNum;
|
||||
@Excel(name = "单据编号", needMerge = true)
|
||||
private String code;
|
||||
@Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd", needMerge = true)
|
||||
private Date createTime;
|
||||
@Excel(name = "总生产成本", needMerge = true)
|
||||
private BigDecimal produceAmount;
|
||||
@Excel(name = "结款状态", readConverterExp = "1=生产入库,2=其它入库,3=维修入库", needMerge = true)
|
||||
private Integer storageType;
|
||||
@Excel(name = "货号", needMerge = true)
|
||||
private String prodArtNum;
|
||||
@Excel(name = "颜色", needMerge = true)
|
||||
private String colorName;
|
||||
@Excel(name = "30")
|
||||
private Integer size30Quantity;
|
||||
@Excel(name = "31")
|
||||
private Integer size31Quantity;
|
||||
@Excel(name = "32")
|
||||
private Integer size32Quantity;
|
||||
@Excel(name = "33")
|
||||
private Integer size33Quantity;
|
||||
@Excel(name = "34")
|
||||
private Integer size34Quantity;
|
||||
@Excel(name = "35")
|
||||
private Integer size35Quantity;
|
||||
@Excel(name = "36")
|
||||
private Integer size36Quantity;
|
||||
@Excel(name = "37")
|
||||
private Integer size37Quantity;
|
||||
@Excel(name = "38")
|
||||
private Integer size38Quantity;
|
||||
@Excel(name = "39")
|
||||
private Integer size39Quantity;
|
||||
@Excel(name = "40")
|
||||
private Integer size40Quantity;
|
||||
@Excel(name = "41")
|
||||
private Integer size41Quantity;
|
||||
@Excel(name = "42")
|
||||
private Integer size42Quantity;
|
||||
@Excel(name = "43")
|
||||
private Integer size43Quantity;
|
||||
@Excel(name = "入库总量")
|
||||
private Integer totalQuantity;
|
||||
@Excel(name = "操作人名称")
|
||||
private String operatorName;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ruoyi.xkt.dto.storeProdStorage;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
* @date 2025/3/27 15:12
|
||||
*/
|
||||
@ApiModel("档口入库导出数据")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class StoreStorageExportDTO {
|
||||
|
||||
@ApiModelProperty(value = "storeId")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "storeProdStorageId")
|
||||
private List<Long> storeProdStorageIdList;
|
||||
@ApiModelProperty(value = "导出开始时间")
|
||||
private Date voucherDateStart;
|
||||
@ApiModelProperty(value = "导出结束时间")
|
||||
private Date voucherDateEnd;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.ruoyi.xkt.dto.storeSale;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
* @date 2025/3/27 15:12
|
||||
*/
|
||||
@ApiModel("档口销售导出数据")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class StoreSaleDownloadDTO {
|
||||
|
||||
@Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Integer orderNum;
|
||||
@Excel(name = "单据编号")
|
||||
private String code;
|
||||
@Excel(name = "客户")
|
||||
private String storeCusName;
|
||||
@Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date voucherDate;
|
||||
@Excel(name = "销售总额")
|
||||
private BigDecimal amount;
|
||||
@Excel(name = "销售数量")
|
||||
private String quantity;
|
||||
@Excel(name = "抹零金额")
|
||||
private BigDecimal roundOff;
|
||||
@Excel(name = "结款状态", readConverterExp = "1=已结清,2=欠款")
|
||||
private Integer paymentStatus;
|
||||
@Excel(name = "支付方式", readConverterExp = "1=支付宝,2=微信支付,3=现金,4=欠款")
|
||||
private Integer payWay;
|
||||
@Excel(name = "销售类型", readConverterExp = "1=销售,2=退货,3=销售/退货")
|
||||
private Integer saleType;
|
||||
@Excel(name = "操作人名称")
|
||||
private String operatorName;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ruoyi.xkt.dto.storeSale;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
* @date 2025/3/27 15:12
|
||||
*/
|
||||
@ApiModel("档口销售导出数据")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class StoreSaleExportDTO {
|
||||
|
||||
@ApiModelProperty(value = "storeId")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "storeSaleIdList")
|
||||
private List<Long> storeSaleIdList;
|
||||
@ApiModelProperty(value = "导出开始时间")
|
||||
private Date voucherDateStart;
|
||||
@ApiModelProperty(value = "导出结束时间")
|
||||
private Date voucherDateEnd;
|
||||
|
||||
}
|
||||
|
|
@ -2,7 +2,10 @@ package com.ruoyi.xkt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xkt.domain.StoreProductStorageDetail;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreStorageDetailDownloadDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -12,51 +15,22 @@ import java.util.List;
|
|||
* @date 2025-03-26
|
||||
*/
|
||||
public interface StoreProductStorageDetailMapper extends BaseMapper<StoreProductStorageDetail> {
|
||||
/**
|
||||
* 查询档口商品入库明细
|
||||
*
|
||||
* @param id 档口商品入库明细主键
|
||||
* @return 档口商品入库明细
|
||||
*/
|
||||
public StoreProductStorageDetail selectStoreProductStorageDetailByStoreProdStorDetailId(Long id);
|
||||
|
||||
/**
|
||||
* 查询档口商品入库明细列表
|
||||
* 导出选定的入库记录
|
||||
*
|
||||
* @param storeProductStorageDetail 档口商品入库明细
|
||||
* @return 档口商品入库明细集合
|
||||
* @param storeProdStorageIdList 入库单ID列表
|
||||
* @return 入库记录
|
||||
*/
|
||||
public List<StoreProductStorageDetail> selectStoreProductStorageDetailList(StoreProductStorageDetail storeProductStorageDetail);
|
||||
List<StoreStorageDetailDownloadDTO> selectExportList(@Param("storeProdStorageIdList") List<Long> storeProdStorageIdList);
|
||||
|
||||
/**
|
||||
* 新增档口商品入库明细
|
||||
* 导出指定时间段内的入库记录
|
||||
*
|
||||
* @param storeProductStorageDetail 档口商品入库明细
|
||||
* @return 结果
|
||||
* @param voucherDateStart 开始时间
|
||||
* @param voucherDateEnd 结束时间
|
||||
* @return 入库记录
|
||||
*/
|
||||
public int insertStoreProductStorageDetail(StoreProductStorageDetail storeProductStorageDetail);
|
||||
List<StoreStorageDetailDownloadDTO> selectExportListVoucherDateBetween(@Param("voucherDateStart") Date voucherDateStart, @Param("voucherDateEnd") Date voucherDateEnd);
|
||||
|
||||
/**
|
||||
* 修改档口商品入库明细
|
||||
*
|
||||
* @param storeProductStorageDetail 档口商品入库明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStoreProductStorageDetail(StoreProductStorageDetail storeProductStorageDetail);
|
||||
|
||||
/**
|
||||
* 删除档口商品入库明细
|
||||
*
|
||||
* @param id 档口商品入库明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreProductStorageDetailByStoreProdStorDetailId(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除档口商品入库明细
|
||||
*
|
||||
* @param storeProdStorDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreProductStorageDetailByStoreProdStorDetailIds(Long[] storeProdStorDetailIds);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,12 @@ package com.ruoyi.xkt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xkt.domain.StoreSale;
|
||||
import com.ruoyi.xkt.dto.storeSale.StoreSaleDownloadDTO;
|
||||
import com.ruoyi.xkt.dto.storeSale.StoreSalePageDTO;
|
||||
import com.ruoyi.xkt.dto.storeSale.StoreSalePageResDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -17,4 +20,21 @@ public interface StoreSaleMapper extends BaseMapper<StoreSale> {
|
|||
|
||||
List<StoreSalePageResDTO> selectPage(StoreSalePageDTO pageDTO);
|
||||
|
||||
/**
|
||||
* 导出指定id列表
|
||||
*
|
||||
* @param storeSaleIdList 导出入参
|
||||
* @return List<StoreSaleDownloadDTO>
|
||||
*/
|
||||
List<StoreSaleDownloadDTO> selectExportList(@Param("storeSaleIdList") List<Long> storeSaleIdList);
|
||||
|
||||
/**
|
||||
* 导出指定时间段内的数据
|
||||
*
|
||||
* @param voucherDateStart 开始时间
|
||||
* @param voucherDateEnd 结束时间
|
||||
* @return
|
||||
*/
|
||||
List<StoreSaleDownloadDTO> selectExportListVoucherDateBetween(@Param("voucherDateStart") Date voucherDateStart, @Param("voucherDateEnd") Date voucherDateEnd);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.ruoyi.xkt.service;
|
||||
|
||||
import com.ruoyi.xkt.domain.StoreProductStorageDetail;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreStorageDetailDownloadDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreStorageExportDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -11,51 +12,13 @@ import java.util.List;
|
|||
* @date 2025-03-26
|
||||
*/
|
||||
public interface IStoreProductStorageDetailService {
|
||||
/**
|
||||
* 查询档口商品入库明细
|
||||
*
|
||||
* @param storeProdStorDetailId 档口商品入库明细主键
|
||||
* @return 档口商品入库明细
|
||||
*/
|
||||
public StoreProductStorageDetail selectStoreProductStorageDetailByStoreProdStorDetailId(Long storeProdStorDetailId);
|
||||
|
||||
/**
|
||||
* 查询档口商品入库明细列表
|
||||
* 导出档口商品入库明细
|
||||
*
|
||||
* @param storeProductStorageDetail 档口商品入库明细
|
||||
* @return 档口商品入库明细集合
|
||||
* @param exportDTO 导出参数
|
||||
* @return 导出数据
|
||||
*/
|
||||
public List<StoreProductStorageDetail> selectStoreProductStorageDetailList(StoreProductStorageDetail storeProductStorageDetail);
|
||||
List<StoreStorageDetailDownloadDTO> export(StoreStorageExportDTO exportDTO);
|
||||
|
||||
/**
|
||||
* 新增档口商品入库明细
|
||||
*
|
||||
* @param storeProductStorageDetail 档口商品入库明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStoreProductStorageDetail(StoreProductStorageDetail storeProductStorageDetail);
|
||||
|
||||
/**
|
||||
* 修改档口商品入库明细
|
||||
*
|
||||
* @param storeProductStorageDetail 档口商品入库明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStoreProductStorageDetail(StoreProductStorageDetail storeProductStorageDetail);
|
||||
|
||||
/**
|
||||
* 批量删除档口商品入库明细
|
||||
*
|
||||
* @param storeProdStorDetailIds 需要删除的档口商品入库明细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreProductStorageDetailByStoreProdStorDetailIds(Long[] storeProdStorDetailIds);
|
||||
|
||||
/**
|
||||
* 删除档口商品入库明细信息
|
||||
*
|
||||
* @param storeProdStorDetailId 档口商品入库明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreProductStorageDetailByStoreProdStorDetailId(Long storeProdStorDetailId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.ruoyi.xkt.dto.dailySale.StoreTodaySaleDTO;
|
|||
import com.ruoyi.xkt.dto.storeCustomer.StoreCusGeneralSaleDTO;
|
||||
import com.ruoyi.xkt.dto.storeSale.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 档口销售出库Service接口
|
||||
*
|
||||
|
|
@ -88,4 +90,13 @@ public interface IStoreSaleService {
|
|||
* @return Integer
|
||||
*/
|
||||
Integer updateMemo(StoreSaleUpdateMemoDTO updateMemoDTO);
|
||||
|
||||
/**
|
||||
* 导出销售出库列表
|
||||
*
|
||||
* @param exportDTO 导出入参
|
||||
* @return List<StoreSaleDownloadDTO>
|
||||
*/
|
||||
List<StoreSaleDownloadDTO> export(StoreSaleExportDTO exportDTO);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -590,12 +590,8 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
final String mainPicUrl = fileList.stream().filter(x -> Objects.equals(x.getFileType(), FileType.MAIN_PIC.getValue()))
|
||||
.filter(x -> Objects.equals(x.getOrderNum(), ORDER_NUM_1)).map(StoreProdFileResDTO::getFileUrl).findAny().orElse("");
|
||||
// 将用户浏览足迹添加到redis中
|
||||
try {
|
||||
this.updateUserBrowsingToRedis(storeProdId, appResDTO.getStoreId(), appResDTO.getStoreName(), appResDTO.getProdArtNum(),
|
||||
appResDTO.getProdTitle(), appResDTO.getMinPrice(), mainPicUrl);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
this.updateUserBrowsingToRedis(storeProdId, appResDTO.getStoreId(), appResDTO.getStoreName(), appResDTO.getProdArtNum(),
|
||||
appResDTO.getProdTitle(), appResDTO.getMinPrice(), mainPicUrl);
|
||||
return appResDTO.setTags(StringUtils.isNotBlank(appResDTO.getTagStr()) ? StrUtil.split(appResDTO.getTagStr(), ",") : null)
|
||||
// 拼接几色几码
|
||||
.setSpecification((CollectionUtils.isNotEmpty(colorList) ? colorList.size() + "色" : "") +
|
||||
|
|
@ -726,11 +722,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
final String mainPicUrl = fileList.stream().filter(x -> Objects.equals(x.getFileType(), FileType.MAIN_PIC.getValue()))
|
||||
.filter(x -> Objects.equals(x.getOrderNum(), ORDER_NUM_1)).map(StoreProdFileResDTO::getFileUrl).findAny().orElse("");
|
||||
// 将用户浏览足迹添加到redis中
|
||||
try {
|
||||
this.updateUserBrowsingToRedis(storeProdId, prodInfoDTO.getStoreId(), prodInfoDTO.getStoreName(), prodInfoDTO.getProdArtNum(), prodInfoDTO.getProdTitle(), minPrice, mainPicUrl);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
this.updateUserBrowsingToRedis(storeProdId, prodInfoDTO.getStoreId(), prodInfoDTO.getStoreName(), prodInfoDTO.getProdArtNum(), prodInfoDTO.getProdTitle(), minPrice, mainPicUrl);
|
||||
return prodInfoDTO.setColorList(colorList);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.ruoyi.xkt.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.xkt.domain.StoreProductStorageDetail;
|
||||
import com.ruoyi.common.constant.HttpStatus;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreStorageDetailDownloadDTO;
|
||||
import com.ruoyi.xkt.dto.storeProdStorage.StoreStorageExportDTO;
|
||||
import com.ruoyi.xkt.mapper.StoreProductStorageDetailMapper;
|
||||
import com.ruoyi.xkt.service.IStoreProductStorageDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -17,80 +21,27 @@ import java.util.List;
|
|||
* @date 2025-03-26
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class StoreProductStorageDetailServiceImpl implements IStoreProductStorageDetailService {
|
||||
@Autowired
|
||||
private StoreProductStorageDetailMapper storeProductStorageDetailMapper;
|
||||
|
||||
final StoreProductStorageDetailMapper storageDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询档口商品入库明细
|
||||
* 导出档口商品入库明细
|
||||
*
|
||||
* @param storeProdStorDetailId 档口商品入库明细主键
|
||||
* @return 档口商品入库明细
|
||||
* @param exportDTO 导出参数
|
||||
* @return 导出数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public StoreProductStorageDetail selectStoreProductStorageDetailByStoreProdStorDetailId(Long storeProdStorDetailId) {
|
||||
return storeProductStorageDetailMapper.selectStoreProductStorageDetailByStoreProdStorDetailId(storeProdStorDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询档口商品入库明细列表
|
||||
*
|
||||
* @param storeProductStorageDetail 档口商品入库明细
|
||||
* @return 档口商品入库明细
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<StoreProductStorageDetail> selectStoreProductStorageDetailList(StoreProductStorageDetail storeProductStorageDetail) {
|
||||
return storeProductStorageDetailMapper.selectStoreProductStorageDetailList(storeProductStorageDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增档口商品入库明细
|
||||
*
|
||||
* @param storeProductStorageDetail 档口商品入库明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertStoreProductStorageDetail(StoreProductStorageDetail storeProductStorageDetail) {
|
||||
storeProductStorageDetail.setCreateTime(DateUtils.getNowDate());
|
||||
return storeProductStorageDetailMapper.insertStoreProductStorageDetail(storeProductStorageDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改档口商品入库明细
|
||||
*
|
||||
* @param storeProductStorageDetail 档口商品入库明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateStoreProductStorageDetail(StoreProductStorageDetail storeProductStorageDetail) {
|
||||
storeProductStorageDetail.setUpdateTime(DateUtils.getNowDate());
|
||||
return storeProductStorageDetailMapper.updateStoreProductStorageDetail(storeProductStorageDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除档口商品入库明细
|
||||
*
|
||||
* @param storeProdStorDetailIds 需要删除的档口商品入库明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteStoreProductStorageDetailByStoreProdStorDetailIds(Long[] storeProdStorDetailIds) {
|
||||
return storeProductStorageDetailMapper.deleteStoreProductStorageDetailByStoreProdStorDetailIds(storeProdStorDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除档口商品入库明细信息
|
||||
*
|
||||
* @param storeProdStorDetailId 档口商品入库明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStoreProductStorageDetailByStoreProdStorDetailId(Long storeProdStorDetailId) {
|
||||
return storeProductStorageDetailMapper.deleteStoreProductStorageDetailByStoreProdStorDetailId(storeProdStorDetailId);
|
||||
public List<StoreStorageDetailDownloadDTO> export(StoreStorageExportDTO exportDTO) {
|
||||
if (CollectionUtils.isNotEmpty(exportDTO.getStoreProdStorageIdList())) {
|
||||
return this.storageDetailMapper.selectExportList(exportDTO.getStoreProdStorageIdList());
|
||||
} else {
|
||||
if (ObjectUtils.isEmpty(exportDTO.getVoucherDateStart()) && ObjectUtils.isEmpty(exportDTO.getVoucherDateEnd())) {
|
||||
throw new ServiceException("全量导出时,开始时间和结束时间不能为空!", HttpStatus.ERROR);
|
||||
}
|
||||
return this.storageDetailMapper.selectExportListVoucherDateBetween(exportDTO.getVoucherDateStart(), exportDTO.getVoucherDateEnd());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,27 @@ public class StoreSaleServiceImpl implements IStoreSaleService {
|
|||
return this.storeSaleMapper.updateById(storeSale);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出销售出库列表
|
||||
*
|
||||
* @param exportDTO 导出入参
|
||||
* @return List<StoreSaleDownloadDTO>
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<StoreSaleDownloadDTO> export(StoreSaleExportDTO exportDTO) {
|
||||
// 导出指定销售出库单
|
||||
if (CollectionUtils.isNotEmpty(exportDTO.getStoreSaleIdList())) {
|
||||
return this.storeSaleMapper.selectExportList(exportDTO.getStoreSaleIdList());
|
||||
} else {
|
||||
// 如果是全量导出,则开始时间 和 结束时间 不能为空
|
||||
if (ObjectUtils.isEmpty(exportDTO.getVoucherDateStart()) && ObjectUtils.isEmpty(exportDTO.getVoucherDateEnd())) {
|
||||
throw new ServiceException("全量导出时,开始时间和结束时间不能为空!", HttpStatus.ERROR);
|
||||
}
|
||||
return this.storeSaleMapper.selectExportListVoucherDateBetween(exportDTO.getVoucherDateStart(), exportDTO.getVoucherDateEnd());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增档口销售出库
|
||||
*
|
||||
|
|
@ -207,7 +228,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService {
|
|||
int count = storeSaleMapper.insert(storeSale);
|
||||
// 处理订单明细
|
||||
List<StoreSaleDetail> saleDetailList = storeSaleDTO.getDetailList().stream().map(x -> BeanUtil.toBean(x, StoreSaleDetail.class)
|
||||
.setSaleType(storeSaleDTO.getSaleType()).setStoreSaleId(storeSale.getId()).setStoreId(storeSale.getStoreId()).setVoucherDate(voucherDate))
|
||||
.setSaleType(storeSaleDTO.getSaleType()).setStoreSaleId(storeSale.getId()).setStoreId(storeSale.getStoreId()).setVoucherDate(voucherDate))
|
||||
.collect(Collectors.toList());
|
||||
this.storeSaleDetailMapper.insert(saleDetailList);
|
||||
// 先汇总当前这笔订单商品明细的销售数量,包括销售及退货 key: prodArtNum + storeProdId + storeProdColorId + colorName, value: map(key:size,value:count)
|
||||
|
|
@ -268,7 +289,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService {
|
|||
this.storeSaleDetailMapper.updateById(saleDetailList.stream().peek(x -> x.setDelFlag(Constants.DELETED)).collect(Collectors.toList()));
|
||||
// 再新增档口销售出库明细数据
|
||||
List<StoreSaleDetail> detailList = storeSaleDTO.getDetailList().stream().map(x -> BeanUtil.toBean(x, StoreSaleDetail.class)
|
||||
.setSaleType(storeSaleDTO.getSaleType()).setStoreSaleId(storeSale.getId()).setStoreId(storeSale.getStoreId()).setVoucherDate(voucherDate))
|
||||
.setSaleType(storeSaleDTO.getSaleType()).setStoreSaleId(storeSale.getId()).setStoreId(storeSale.getStoreId()).setVoucherDate(voucherDate))
|
||||
.collect(Collectors.toList());
|
||||
this.storeSaleDetailMapper.insert(detailList);
|
||||
// 汇总编辑的存货总数量
|
||||
|
|
|
|||
|
|
@ -384,7 +384,8 @@ public class WebsiteAPPServiceImpl implements IWebsiteAPPService {
|
|||
} else {
|
||||
appIndexMidBrandList = launchingList.stream().filter(x -> StringUtils.isNotBlank(x.getProdIdStr())).map(x -> {
|
||||
final Long storeProdId = Long.parseLong(x.getProdIdStr());
|
||||
return new APPIndexMidBrandDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId).setOrderNum(this.positionToNumber(x.getPosition()))
|
||||
return new APPIndexMidBrandDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId)
|
||||
.setOrderNum(this.positionToNumber(x.getPosition())).setStoreId(x.getStoreId())
|
||||
.setPrice(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMinPrice() : null)
|
||||
.setMainPicUrl(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMainPicUrl() : "");
|
||||
}).limit(5).collect(Collectors.toList());
|
||||
|
|
@ -408,8 +409,7 @@ public class WebsiteAPPServiceImpl implements IWebsiteAPPService {
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<APPIndexHotSaleRightFixDTO> getAppIndexHotSaleRightFix() {
|
||||
return null;
|
||||
/*// 从redis中获取数据
|
||||
// 从redis中获取数据
|
||||
List<APPIndexHotSaleRightFixDTO> appIndexHotSaleRightFixList;
|
||||
// 从redis 中获取数据
|
||||
List<APPIndexHotSaleRightFixDTO> redisList = redisCache.getCacheObject(CacheConstants.APP_ADVERT + CacheConstants.APP_INDEX_HOT_SALE_RIGHT_FIX);
|
||||
|
|
@ -432,7 +432,7 @@ public class WebsiteAPPServiceImpl implements IWebsiteAPPService {
|
|||
if (CollectionUtils.isEmpty(launchingList)) {
|
||||
appIndexHotSaleRightFixList = expiredList.stream().filter(x -> StringUtils.isNotBlank(x.getProdIdStr())).map(x -> {
|
||||
Long storeProdId = Long.parseLong(x.getProdIdStr());
|
||||
return new APPIndexHotSaleRightFixDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId)
|
||||
return new APPIndexHotSaleRightFixDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId).setStoreId(x.getStoreId())
|
||||
.setMainPicUrl(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMainPicUrl() : "");
|
||||
}).limit(5).collect(Collectors.toList());
|
||||
for (int i = 0; i < appIndexHotSaleRightFixList.size(); i++) {
|
||||
|
|
@ -441,13 +441,14 @@ public class WebsiteAPPServiceImpl implements IWebsiteAPPService {
|
|||
} else {
|
||||
appIndexHotSaleRightFixList = launchingList.stream().filter(x -> StringUtils.isNotBlank(x.getProdIdStr())).map(x -> {
|
||||
Long storeProdId = Long.parseLong(x.getProdIdStr());
|
||||
return new APPIndexHotSaleRightFixDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId).setOrderNum(this.positionToNumber(x.getPosition()))
|
||||
return new APPIndexHotSaleRightFixDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId)
|
||||
.setOrderNum(this.positionToNumber(x.getPosition())).setStoreId(x.getStoreId())
|
||||
.setMainPicUrl(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMainPicUrl() : "");
|
||||
}).limit(5).collect(Collectors.toList());
|
||||
}
|
||||
// 放到redis中,有效期1天
|
||||
redisCache.setCacheObject(CacheConstants.APP_ADVERT + CacheConstants.APP_INDEX_HOT_SALE_RIGHT_FIX, appIndexHotSaleRightFixList, 1, TimeUnit.DAYS);
|
||||
return appIndexHotSaleRightFixList;*/
|
||||
return appIndexHotSaleRightFixList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -567,7 +568,7 @@ public class WebsiteAPPServiceImpl implements IWebsiteAPPService {
|
|||
private List<APPIndexMidBrandDTO> getAppIndexMidBrandList(List<AdvertRound> advertRoundList, int limitCount, Map<Long, StoreProdPriceAndMainPicDTO> prodPriceAndMainPicMap) {
|
||||
return advertRoundList.stream().filter(x -> StringUtils.isNotBlank(x.getProdIdStr())).map(x -> {
|
||||
final Long storeProdId = Long.parseLong(x.getProdIdStr());
|
||||
return new APPIndexMidBrandDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId)
|
||||
return new APPIndexMidBrandDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId).setStoreId(x.getStoreId())
|
||||
.setPrice(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMinPrice() : null)
|
||||
.setMainPicUrl(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMainPicUrl() : "");
|
||||
}).limit(limitCount).collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ public class WebsitePCServiceImpl implements IWebsitePCService {
|
|||
bottomRightList = rightLaunchingList.stream().filter(x -> StringUtils.isNotBlank(x.getProdIdStr())).map(x -> {
|
||||
final Long storeProdId = Long.parseLong(x.getProdIdStr());
|
||||
return new PCIndexBottomPopularDTO.PCIBPPopularRightDTO().setDisplayType(AdDisplayType.PRODUCT.getValue())
|
||||
.setStoreProdId(storeProdId).setOrderNum(this.positionToNumber(x.getPosition()))
|
||||
.setStoreProdId(storeProdId).setOrderNum(this.positionToNumber(x.getPosition())).setStoreId(x.getStoreId())
|
||||
.setPrice(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMinPrice() : null)
|
||||
.setProdArtNum(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getProdArtNum() : "")
|
||||
.setMainPicUrl(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMainPicUrl() : "");
|
||||
|
|
@ -787,7 +787,7 @@ public class WebsitePCServiceImpl implements IWebsitePCService {
|
|||
.forEach((storeId, list) -> {
|
||||
AdvertRound advertRound = list.get(0);
|
||||
final Long storeProdId = Long.parseLong(advertRound.getProdIdStr());
|
||||
tempList.add(new PCIndexSearchRecommendProdDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId)
|
||||
tempList.add(new PCIndexSearchRecommendProdDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId).setStoreId(advertRound.getStoreId())
|
||||
.setProdArtNum(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getProdArtNum() : "")
|
||||
.setMainPicUrl(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMainPicUrl() : ""));
|
||||
});
|
||||
|
|
@ -798,7 +798,8 @@ public class WebsitePCServiceImpl implements IWebsitePCService {
|
|||
} else {
|
||||
recommendList = launchingList.stream().map(advertRound -> {
|
||||
final Long storeProdId = Long.parseLong(advertRound.getProdIdStr());
|
||||
return new PCIndexSearchRecommendProdDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId).setOrderNum(this.positionToNumber(advertRound.getPosition()))
|
||||
return new PCIndexSearchRecommendProdDTO().setDisplayType(AdDisplayType.PRODUCT.getValue()).setStoreProdId(storeProdId)
|
||||
.setOrderNum(this.positionToNumber(advertRound.getPosition())).setStoreId(advertRound.getStoreId())
|
||||
.setProdArtNum(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getProdArtNum() : "")
|
||||
.setMainPicUrl(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMainPicUrl() : "");
|
||||
}).collect(Collectors.toList());
|
||||
|
|
@ -1421,7 +1422,7 @@ public class WebsitePCServiceImpl implements IWebsitePCService {
|
|||
AdvertRound advertRound = list.get(0);
|
||||
final Long storeProdId = Long.parseLong(advertRound.getProdIdStr());
|
||||
tempRightList.add(new PCIndexBottomPopularDTO.PCIBPPopularRightDTO().setDisplayType(AdDisplayType.PRODUCT.getValue())
|
||||
.setStoreProdId(Long.valueOf(advertRound.getProdIdStr()))
|
||||
.setStoreProdId(Long.valueOf(advertRound.getProdIdStr())).setStoreId(advertRound.getStoreId())
|
||||
.setPrice(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMinPrice() : null)
|
||||
.setProdArtNum(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getProdArtNum() : "")
|
||||
.setMainPicUrl(ObjectUtils.isNotEmpty(prodPriceAndMainPicMap.get(storeProdId)) ? prodPriceAndMainPicMap.get(storeProdId).getMainPicUrl() : ""));
|
||||
|
|
|
|||
|
|
@ -3,174 +3,86 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.xkt.mapper.StoreProductStorageDetailMapper">
|
||||
|
||||
<resultMap type="StoreProductStorageDetail" id="StoreProductStorageDetailResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="storeProdStorId" column="store_prod_stor_id" />
|
||||
<result property="storeProdColorId" column="store_prod_color_id" />
|
||||
<result property="storeProdId" column="store_prod_id" />
|
||||
<result property="size30" column="size_30" />
|
||||
<result property="size31" column="size_31" />
|
||||
<result property="size32" column="size_32" />
|
||||
<result property="size33" column="size_33" />
|
||||
<result property="size34" column="size_34" />
|
||||
<result property="size35" column="size_35" />
|
||||
<result property="size36" column="size_36" />
|
||||
<result property="size37" column="size_37" />
|
||||
<result property="size38" column="size_38" />
|
||||
<result property="size39" column="size_39" />
|
||||
<result property="size40" column="size_40" />
|
||||
<result property="size41" column="size_41" />
|
||||
<result property="size42" column="size_42" />
|
||||
<result property="size43" column="size_43" />
|
||||
<result property="totalNum" column="total_num" />
|
||||
<result property="producePrice" column="produce_price" />
|
||||
<result property="totalProducePrice" column="total_produce_price" />
|
||||
<result property="version" column="version" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectStoreProductStorageDetailVo">
|
||||
select id, store_prod_stor_id, store_prod_color_id, store_prod_id, size_30, size_31, size_32, size_33, size_34, size_35, size_36, size_37, size_38, size_39, size_40, size_41, size_42, size_43, total_num, produce_price, total_produce_price, version, del_flag, create_by, create_time, update_by, update_time from store_product_storage_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectStoreProductStorageDetailList" parameterType="StoreProductStorageDetail" resultMap="StoreProductStorageDetailResult">
|
||||
<include refid="selectStoreProductStorageDetailVo"/>
|
||||
<where>
|
||||
<if test="storeProdStorId != null "> and store_prod_stor_id = #{storeProdStorId}</if>
|
||||
<if test="storeProdColorId != null "> and store_prod_color_id = #{storeProdColorId}</if>
|
||||
<if test="storeProdId != null "> and store_prod_id = #{storeProdId}</if>
|
||||
<if test="size30 != null "> and size_30 = #{size30}</if>
|
||||
<if test="size31 != null "> and size_31 = #{size31}</if>
|
||||
<if test="size32 != null "> and size_32 = #{size32}</if>
|
||||
<if test="size33 != null "> and size_33 = #{size33}</if>
|
||||
<if test="size34 != null "> and size_34 = #{size34}</if>
|
||||
<if test="size35 != null "> and size_35 = #{size35}</if>
|
||||
<if test="size36 != null "> and size_36 = #{size36}</if>
|
||||
<if test="size37 != null "> and size_37 = #{size37}</if>
|
||||
<if test="size38 != null "> and size_38 = #{size38}</if>
|
||||
<if test="size39 != null "> and size_39 = #{size39}</if>
|
||||
<if test="size40 != null "> and size_40 = #{size40}</if>
|
||||
<if test="size41 != null "> and size_41 = #{size41}</if>
|
||||
<if test="size42 != null "> and size_42 = #{size42}</if>
|
||||
<if test="size43 != null "> and size_43 = #{size43}</if>
|
||||
<if test="totalNum != null "> and total_num = #{totalNum}</if>
|
||||
<if test="producePrice != null "> and produce_price = #{producePrice}</if>
|
||||
<if test="totalProducePrice != null "> and total_produce_price = #{totalProducePrice}</if>
|
||||
<if test="version != null "> and version = #{version}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStoreProductStorageDetailByStoreProdStorDetailId" parameterType="Long" resultMap="StoreProductStorageDetailResult">
|
||||
<include refid="selectStoreProductStorageDetailVo"/>
|
||||
where id = #{id}
|
||||
<select id="selectExportList" resultType="com.ruoyi.xkt.dto.storeProdStorage.StoreStorageDetailDownloadDTO">
|
||||
SELECT
|
||||
DENSE_RANK() OVER (ORDER BY sps.code, sps.create_time DESC) AS orderNum,
|
||||
sps.`code`,
|
||||
sps.create_time,
|
||||
sps.quantity,
|
||||
sps.produce_amount,
|
||||
sps.storage_type,
|
||||
spsd.prod_art_num,
|
||||
spsd.color_name,
|
||||
spsd.size_30 AS size30Quantity,
|
||||
spsd.size_31 AS size31Quantity,
|
||||
spsd.size_32 AS size32Quantity,
|
||||
spsd.size_33 AS size33Quantity,
|
||||
spsd.size_34 AS size34Quantity,
|
||||
spsd.size_35 AS size35Quantity,
|
||||
spsd.size_36 AS size36Quantity,
|
||||
spsd.size_37 AS size37Quantity,
|
||||
spsd.size_38 AS size38Quantity,
|
||||
spsd.size_39 AS size39Quantity,
|
||||
spsd.size_40 AS size40Quantity,
|
||||
spsd.size_41 AS size41Quantity,
|
||||
spsd.size_42 AS size42Quantity,
|
||||
spsd.size_43 AS size43Quantity,
|
||||
COALESCE(spsd.size_30, 0) + COALESCE(spsd.size_31, 0) +
|
||||
COALESCE(spsd.size_32, 0) + COALESCE(spsd.size_33, 0) +
|
||||
COALESCE(spsd.size_34, 0) + COALESCE(spsd.size_35, 0) +
|
||||
COALESCE(spsd.size_36, 0) + COALESCE(spsd.size_37, 0) +
|
||||
COALESCE(spsd.size_38, 0) + COALESCE(spsd.size_39, 0) +
|
||||
COALESCE(spsd.size_40, 0) + COALESCE(spsd.size_41, 0) +
|
||||
COALESCE(spsd.size_42, 0) + COALESCE(spsd.size_43, 0) AS totalQuantity,
|
||||
sps.operator_name
|
||||
FROM
|
||||
store_product_storage_detail spsd JOIN store_product_storage sps ON spsd.store_prod_stor_id = sps.id
|
||||
WHERE
|
||||
spsd.del_flag = 0
|
||||
AND sps.id IN
|
||||
<foreach collection="storeProdStorageIdList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<insert id="insertStoreProductStorageDetail" parameterType="StoreProductStorageDetail" useGeneratedKeys="true" keyProperty="storeProdStorDetailId">
|
||||
insert into store_product_storage_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="storeProdStorId != null">store_prod_stor_id,</if>
|
||||
<if test="storeProdColorId != null">store_prod_color_id,</if>
|
||||
<if test="storeProdId != null">store_prod_id,</if>
|
||||
<if test="size30 != null">size_30,</if>
|
||||
<if test="size31 != null">size_31,</if>
|
||||
<if test="size32 != null">size_32,</if>
|
||||
<if test="size33 != null">size_33,</if>
|
||||
<if test="size34 != null">size_34,</if>
|
||||
<if test="size35 != null">size_35,</if>
|
||||
<if test="size36 != null">size_36,</if>
|
||||
<if test="size37 != null">size_37,</if>
|
||||
<if test="size38 != null">size_38,</if>
|
||||
<if test="size39 != null">size_39,</if>
|
||||
<if test="size40 != null">size_40,</if>
|
||||
<if test="size41 != null">size_41,</if>
|
||||
<if test="size42 != null">size_42,</if>
|
||||
<if test="size43 != null">size_43,</if>
|
||||
<if test="totalNum != null">total_num,</if>
|
||||
<if test="producePrice != null">produce_price,</if>
|
||||
<if test="totalProducePrice != null">total_produce_price,</if>
|
||||
<if test="version != null">version,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="storeProdStorId != null">#{storeProdStorId},</if>
|
||||
<if test="storeProdColorId != null">#{storeProdColorId},</if>
|
||||
<if test="storeProdId != null">#{storeProdId},</if>
|
||||
<if test="size30 != null">#{size30},</if>
|
||||
<if test="size31 != null">#{size31},</if>
|
||||
<if test="size32 != null">#{size32},</if>
|
||||
<if test="size33 != null">#{size33},</if>
|
||||
<if test="size34 != null">#{size34},</if>
|
||||
<if test="size35 != null">#{size35},</if>
|
||||
<if test="size36 != null">#{size36},</if>
|
||||
<if test="size37 != null">#{size37},</if>
|
||||
<if test="size38 != null">#{size38},</if>
|
||||
<if test="size39 != null">#{size39},</if>
|
||||
<if test="size40 != null">#{size40},</if>
|
||||
<if test="size41 != null">#{size41},</if>
|
||||
<if test="size42 != null">#{size42},</if>
|
||||
<if test="size43 != null">#{size43},</if>
|
||||
<if test="totalNum != null">#{totalNum},</if>
|
||||
<if test="producePrice != null">#{producePrice},</if>
|
||||
<if test="totalProducePrice != null">#{totalProducePrice},</if>
|
||||
<if test="version != null">#{version},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="selectExportListVoucherDateBetween" resultType="com.ruoyi.xkt.dto.storeProdStorage.StoreStorageDetailDownloadDTO">
|
||||
SELECT
|
||||
DENSE_RANK() OVER (ORDER BY sps.code, sps.create_time DESC) AS orderNum,
|
||||
sps.`code`,
|
||||
sps.create_time,
|
||||
sps.quantity,
|
||||
sps.produce_amount,
|
||||
sps.storage_type,
|
||||
spsd.prod_art_num,
|
||||
spsd.color_name,
|
||||
spsd.size_30 AS size30Quantity,
|
||||
spsd.size_31 AS size31Quantity,
|
||||
spsd.size_32 AS size32Quantity,
|
||||
spsd.size_33 AS size33Quantity,
|
||||
spsd.size_34 AS size34Quantity,
|
||||
spsd.size_35 AS size35Quantity,
|
||||
spsd.size_36 AS size36Quantity,
|
||||
spsd.size_37 AS size37Quantity,
|
||||
spsd.size_38 AS size38Quantity,
|
||||
spsd.size_39 AS size39Quantity,
|
||||
spsd.size_40 AS size40Quantity,
|
||||
spsd.size_41 AS size41Quantity,
|
||||
spsd.size_42 AS size42Quantity,
|
||||
spsd.size_43 AS size43Quantity,
|
||||
COALESCE(spsd.size_30, 0) + COALESCE(spsd.size_31, 0) +
|
||||
COALESCE(spsd.size_32, 0) + COALESCE(spsd.size_33, 0) +
|
||||
COALESCE(spsd.size_34, 0) + COALESCE(spsd.size_35, 0) +
|
||||
COALESCE(spsd.size_36, 0) + COALESCE(spsd.size_37, 0) +
|
||||
COALESCE(spsd.size_38, 0) + COALESCE(spsd.size_39, 0) +
|
||||
COALESCE(spsd.size_40, 0) + COALESCE(spsd.size_41, 0) +
|
||||
COALESCE(spsd.size_42, 0) + COALESCE(spsd.size_43, 0) AS totalQuantity,
|
||||
sps.operator_name
|
||||
FROM
|
||||
store_product_storage_detail spsd JOIN store_product_storage sps ON spsd.store_prod_stor_id = sps.id
|
||||
WHERE
|
||||
spsd.del_flag = 0
|
||||
AND sps.voucher_date BETWEEN #{voucherDateStart} AND #{voucherDateEnd}
|
||||
</select>
|
||||
|
||||
<update id="updateStoreProductStorageDetail" parameterType="StoreProductStorageDetail">
|
||||
update store_product_storage_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="storeProdStorId != null">store_prod_stor_id = #{storeProdStorId},</if>
|
||||
<if test="storeProdColorId != null">store_prod_color_id = #{storeProdColorId},</if>
|
||||
<if test="storeProdId != null">store_prod_id = #{storeProdId},</if>
|
||||
<if test="size30 != null">size_30 = #{size30},</if>
|
||||
<if test="size31 != null">size_31 = #{size31},</if>
|
||||
<if test="size32 != null">size_32 = #{size32},</if>
|
||||
<if test="size33 != null">size_33 = #{size33},</if>
|
||||
<if test="size34 != null">size_34 = #{size34},</if>
|
||||
<if test="size35 != null">size_35 = #{size35},</if>
|
||||
<if test="size36 != null">size_36 = #{size36},</if>
|
||||
<if test="size37 != null">size_37 = #{size37},</if>
|
||||
<if test="size38 != null">size_38 = #{size38},</if>
|
||||
<if test="size39 != null">size_39 = #{size39},</if>
|
||||
<if test="size40 != null">size_40 = #{size40},</if>
|
||||
<if test="size41 != null">size_41 = #{size41},</if>
|
||||
<if test="size42 != null">size_42 = #{size42},</if>
|
||||
<if test="size43 != null">size_43 = #{size43},</if>
|
||||
<if test="totalNum != null">total_num = #{totalNum},</if>
|
||||
<if test="producePrice != null">produce_price = #{producePrice},</if>
|
||||
<if test="totalProducePrice != null">total_produce_price = #{totalProducePrice},</if>
|
||||
<if test="version != null">version = #{version},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStoreProductStorageDetailByStoreProdStorDetailId" parameterType="Long">
|
||||
delete from store_product_storage_detail where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStoreProductStorageDetailByStoreProdStorDetailIds" parameterType="String">
|
||||
delete from store_product_storage_detail where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -24,5 +24,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ss.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectExportList" resultType="com.ruoyi.xkt.dto.storeSale.StoreSaleDownloadDTO">
|
||||
SELECT
|
||||
ROW_NUMBER() OVER ( ORDER BY ss.voucher_date DESC ) AS orderNum,
|
||||
ss.`code`,
|
||||
sc.cus_name AS storeCusName,
|
||||
ss.voucher_date,
|
||||
ss.amount,
|
||||
CONCAT(IFNULL( ss.sale_quantity, 0 ),'/', CASE WHEN IFNULL( ss.refund_quantity, 0 ) > 0 THEN '-' ELSE '' END, IFNULL( ss.refund_quantity, 0 )) AS quantity,
|
||||
IFNULL( ss.round_off, 0 ) AS round_off,
|
||||
ss.payment_status,
|
||||
ss.pay_way,
|
||||
ss.sale_type,
|
||||
ss.operator_name
|
||||
FROM
|
||||
store_sale ss
|
||||
LEFT JOIN store_customer sc ON ss.store_cus_id = sc.id
|
||||
WHERE
|
||||
ss.del_flag = 0
|
||||
AND ss.id IN
|
||||
<foreach collection="storeSaleIdList" item="storeSaleId" open="(" separator="," close=")">
|
||||
#{storeSaleId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectExportListVoucherDateBetween" resultType="com.ruoyi.xkt.dto.storeSale.StoreSaleDownloadDTO">
|
||||
SELECT
|
||||
ROW_NUMBER() OVER ( ORDER BY ss.voucher_date DESC ) AS orderNum,
|
||||
ss.`code`,
|
||||
sc.cus_name AS storeCusName,
|
||||
ss.voucher_date,
|
||||
ss.amount,
|
||||
CONCAT(IFNULL( ss.sale_quantity, 0 ),'/', CASE WHEN IFNULL( ss.refund_quantity, 0 ) > 0 THEN '-' ELSE '' END, IFNULL( ss.refund_quantity, 0 )) AS quantity,
|
||||
IFNULL( ss.round_off, 0 ) AS round_off,
|
||||
ss.payment_status,
|
||||
ss.pay_way,
|
||||
ss.sale_type,
|
||||
ss.operator_name
|
||||
FROM
|
||||
store_sale ss
|
||||
LEFT JOIN store_customer sc ON ss.store_cus_id = sc.id
|
||||
WHERE
|
||||
ss.del_flag = 0
|
||||
AND ss.voucher_date BETWEEN #{voucherDateStart} AND #{voucherDateEnd}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue