## 非在售商品列表接口;

This commit is contained in:
cabbage 2025-08-11 11:44:57 +08:00
parent e0127a6a52
commit f1f356b279
15 changed files with 195 additions and 429 deletions

View File

@ -18,7 +18,6 @@ import com.hzs.common.core.web.domain.AjaxResult;
import com.hzs.common.core.web.page.TableDataInfo; import com.hzs.common.core.web.page.TableDataInfo;
import com.hzs.common.domain.sale.ext.SaOrderExt; import com.hzs.common.domain.sale.ext.SaOrderExt;
import com.hzs.common.domain.sale.ext.SaOrderItemsExt; import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
import com.hzs.common.domain.sale.order.SaOrder;
import com.hzs.common.domain.sale.order.SaOrderItems; import com.hzs.common.domain.sale.order.SaOrderItems;
import com.hzs.common.domain.sale.order.SaOrderSelfLog; import com.hzs.common.domain.sale.order.SaOrderSelfLog;
import com.hzs.common.security.service.UserTokenService; import com.hzs.common.security.service.UserTokenService;
@ -97,24 +96,9 @@ public class SaDeliverUnhandledController extends BaseController {
Integer pkCountry = SecurityUtils.getPkCountry(); Integer pkCountry = SecurityUtils.getPkCountry();
// 返回数据
List<DeliverUnhandledVO> resultList = new ArrayList<>();
// 未合单目前查询状态已付款 // 未合单目前查询状态已付款
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue())); param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
if (StringUtils.isNotEmpty(param.getOriginalOrderCode())) {
// 原单号不为空则需要查询
LambdaQueryWrapper<SaOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SaOrder::getOrderCode, param.getOriginalOrderCode());
queryWrapper.eq(SaOrder::getPkCountry, pkCountry);
SaOrder querySaOrder = iSaOrderService.getOne(queryWrapper);
if (null == querySaOrder) {
return getDataTable(resultList);
}
param.setPkOriginalOrder(querySaOrder.getPkId());
}
// 获取管理员权限角色地区范围体系列表团队列表 // 获取管理员权限角色地区范围体系列表团队列表
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData(); UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
param.setAreaScopeList(userAuthorityDTO.getRoleAreaScopeList()); param.setAreaScopeList(userAuthorityDTO.getRoleAreaScopeList());
@ -122,7 +106,7 @@ public class SaDeliverUnhandledController extends BaseController {
param.setTeamList(userAuthorityDTO.getUserTeamList()); param.setTeamList(userAuthorityDTO.getUserTeamList());
startPage(); startPage();
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry); List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
// 当查询有数据才进行处理 // 当查询有数据才进行处理
if (resultList.size() > 0) { if (resultList.size() > 0) {
@ -153,33 +137,16 @@ public class SaDeliverUnhandledController extends BaseController {
Integer pkCountry = SecurityUtils.getPkCountry(); Integer pkCountry = SecurityUtils.getPkCountry();
// 返回数据
List<DeliverUnhandledVO> resultList = new ArrayList<>();
// 未合单目前查询状态已付款 // 未合单目前查询状态已付款
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue())); param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
if (StringUtils.isNotEmpty(param.getOriginalOrderCode())) {
// 原单号不为空则需要查询
LambdaQueryWrapper<SaOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SaOrder::getOrderCode, param.getOriginalOrderCode());
queryWrapper.eq(SaOrder::getPkCountry, pkCountry);
SaOrder querySaOrder = iSaOrderService.getOne(queryWrapper);
if (null == querySaOrder) {
ExcelUtil<DeliverUnhandledVO> util = new ExcelUtil<>(DeliverUnhandledVO.class);
util.exportExcel(response, resultList, "发货清单未合单导出");
return;
}
param.setPkOriginalOrder(querySaOrder.getPkId());
}
// 获取管理员权限角色地区范围体系列表团队列表 // 获取管理员权限角色地区范围体系列表团队列表
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData(); UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
param.setAreaScopeList(userAuthorityDTO.getRoleAreaScopeList()); param.setAreaScopeList(userAuthorityDTO.getRoleAreaScopeList());
param.setVertexIdList(userAuthorityDTO.getVertexIdList()); param.setVertexIdList(userAuthorityDTO.getVertexIdList());
param.setTeamList(userAuthorityDTO.getUserTeamList()); param.setTeamList(userAuthorityDTO.getUserTeamList());
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry); List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
// 当查询有数据才进行处理 // 当查询有数据才进行处理
if (resultList.size() > 0) { if (resultList.size() > 0) {

View File

@ -8,11 +8,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
/** /**
* @Description: 未合单列表查询入参 * 未合单列表查询入参
* @Author: jiang chao
* @Time: 2022/10/21 17:26
* @Classname: DeliverOrderItemParam
* @PackageName: com.hzs.sale.deliver.param
*/ */
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@ -153,15 +149,6 @@ public class DeliverUnhandledParam extends BaseAuthorityEntity {
*/ */
private String specsName; private String specsName;
/**
* 原单号
*/
private String originalOrderCode;
/**
* 原单号ID
*/
private Long pkOriginalOrder;
/** /**
* 发货仓库 * 发货仓库
*/ */

View File

@ -235,12 +235,6 @@ public class DeliverUnhandledVO {
@Excel(name = "预售状态") @Excel(name = "预售状态")
private String preSaleStatusVal; private String preSaleStatusVal;
/**
* 原单号
*/
@Excel(name = "原单号")
private String originalOrderCode;
/** /**
* 备注 * 备注
*/ */

View File

@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hzs.common.core.annotation.AccessPermissions; import com.hzs.common.core.annotation.AccessPermissions;
import com.hzs.common.core.annotation.Log; import com.hzs.common.core.annotation.Log;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import com.hzs.common.core.domain.R; import com.hzs.common.core.domain.R;
import com.hzs.common.core.enums.*; import com.hzs.common.core.enums.*;
import com.hzs.common.core.utils.CreateNormsCodeUtils; import com.hzs.common.core.utils.CreateNormsCodeUtils;
@ -17,6 +16,7 @@ import com.hzs.common.core.web.domain.AjaxResult;
import com.hzs.common.core.web.page.TableDataInfo; import com.hzs.common.core.web.page.TableDataInfo;
import com.hzs.common.domain.sale.classify.BdSpecs; import com.hzs.common.domain.sale.classify.BdSpecs;
import com.hzs.common.domain.sale.ext.BdWaresDetailExt; import com.hzs.common.domain.sale.ext.BdWaresDetailExt;
import com.hzs.common.domain.sale.ext.BdWaresExt;
import com.hzs.common.domain.sale.ext.BdWaresSpecsRelationExt; import com.hzs.common.domain.sale.ext.BdWaresSpecsRelationExt;
import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt; import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt;
import com.hzs.common.domain.sale.product.BdAreaClassify; import com.hzs.common.domain.sale.product.BdAreaClassify;
@ -27,7 +27,6 @@ import com.hzs.common.domain.system.config.ext.BdRangeExt;
import com.hzs.common.security.service.UserTokenService; import com.hzs.common.security.service.UserTokenService;
import com.hzs.common.security.utils.SecurityUtils; import com.hzs.common.security.utils.SecurityUtils;
import com.hzs.common.service.ITransactionCommonService;
import com.hzs.sale.product.service.IBdAreaClassifyService; import com.hzs.sale.product.service.IBdAreaClassifyService;
import com.hzs.sale.product.service.IBdProductExtendService; import com.hzs.sale.product.service.IBdProductExtendService;
import com.hzs.sale.product.service.IBdProductService; import com.hzs.sale.product.service.IBdProductService;
@ -59,13 +58,13 @@ public class BdWaresController extends BaseController {
@DubboReference @DubboReference
IRangeServiceApi iRangeServiceApi; IRangeServiceApi iRangeServiceApi;
@Autowired
private IBdWaresService iBdWaresService;
@Autowired @Autowired
private IBdWaresAuthorizeService waresAuthorizeService; private IBdWaresAuthorizeService waresAuthorizeService;
@Autowired @Autowired
private IBdWaresAwardsService waresAwardsService; private IBdWaresAwardsService waresAwardsService;
@Autowired @Autowired
private ITransactionCommonService iTransactionCommonService;
@Autowired
private IBdWaresGradeService waresGradeService; private IBdWaresGradeService waresGradeService;
@Autowired @Autowired
private IBdProductExtendService productExtendService; private IBdProductExtendService productExtendService;
@ -78,8 +77,6 @@ public class BdWaresController extends BaseController {
@Autowired @Autowired
private IBdWaresSpecsPackService waresSpecsPackService; private IBdWaresSpecsPackService waresSpecsPackService;
@Autowired @Autowired
private IBdWaresService waresService;
@Autowired
private IBdWaresLabelService waresLabelService; private IBdWaresLabelService waresLabelService;
@Autowired @Autowired
private IBdWaresExtendService waresExtendService; private IBdWaresExtendService waresExtendService;
@ -94,9 +91,9 @@ public class BdWaresController extends BaseController {
@Autowired @Autowired
private IBdWaresAuthorityService waresAuthorityService; private IBdWaresAuthorityService waresAuthorityService;
@Autowired @Autowired
private UserTokenService userTokenService;
@Autowired
private IBdAreaClassifyService areaClassifyService; private IBdAreaClassifyService areaClassifyService;
@Autowired
private UserTokenService userTokenService;
/** /**
* 查询列表 * 查询列表
@ -109,10 +106,10 @@ public class BdWaresController extends BaseController {
public TableDataInfo list(WaresParams waresParams) { public TableDataInfo list(WaresParams waresParams) {
startPage(); startPage();
waresParams.setPkCountry(SecurityUtils.getPkCountry()); waresParams.setPkCountry(SecurityUtils.getPkCountry());
List<WaresVo> resultList = waresService.selectByWaresInfo(waresParams); List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
if (CollectionUtil.isNotEmpty(resultList)) { if (CollectionUtil.isNotEmpty(resultList)) {
resultList.parallelStream().forEach(waresVo -> { resultList.parallelStream().forEach(waresVo -> {
WaresAuthorityVo waresAuthorityVo = waresService.getWaresAuthorityFirst(waresVo.getPkWares()); WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
if (waresAuthorityVo != null) { if (waresAuthorityVo != null) {
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType()); waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel()); waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel());
@ -134,21 +131,18 @@ public class BdWaresController extends BaseController {
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.EXPORT) @Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.EXPORT)
public void export(WaresParams waresParams, HttpServletResponse response) { public void export(WaresParams waresParams, HttpServletResponse response) {
waresParams.setPkCountry(SecurityUtils.getPkCountry()); waresParams.setPkCountry(SecurityUtils.getPkCountry());
List<WaresVo> resultList = waresService.selectByWaresInfo(waresParams); List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
if (CollectionUtil.isNotEmpty(resultList)) { if (CollectionUtil.isNotEmpty(resultList)) {
// 获取需要翻译的枚举翻译
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EYesNo.values(), EPresaleStatus.values());
resultList.parallelStream().forEach(waresVo -> { resultList.parallelStream().forEach(waresVo -> {
// 所属专区 // 所属专区
waresVo.setSpecialAreaVal(ESpecialArea.getLabelByValue(waresVo.getSpecialArea())); waresVo.setSpecialAreaVal(ESpecialArea.getLabelByValue(waresVo.getSpecialArea()));
// 供应方式 // 供应方式
waresVo.setOperateScopeVal(ESupplyWay.getLabelByVal(waresVo.getOperateScope())); waresVo.setOperateScopeVal(ESupplyWay.getLabelByVal(waresVo.getOperateScope()));
// 预售状态 // 预售状态
waresVo.setPreSaleStatusVal(transactionMap.get(EnumsPrefixConstants.PRESALE_STATUS + waresVo.getPreSaleStatus())); waresVo.setPreSaleStatusVal(EPresaleStatus.getLabelByValue(waresVo.getPreSaleStatus()));
WaresAuthorityVo waresAuthorityVo = waresService.getWaresAuthorityFirst(waresVo.getPkWares()); WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
if (waresAuthorityVo != null) { if (waresAuthorityVo != null) {
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType()); waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel()); waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel());
@ -175,256 +169,6 @@ public class BdWaresController extends BaseController {
} }
ExcelUtil<WaresVo> util = new ExcelUtil<>(WaresVo.class); ExcelUtil<WaresVo> util = new ExcelUtil<>(WaresVo.class);
util.exportExcel(response, resultList, "商品信息导出"); util.exportExcel(response, resultList, "商品信息导出");
//导出
// Workbook workbook = new HSSFWorkbook();
// Sheet sheet = workbook.createSheet("Sheet1");
// // sheet.setColumnWidth(0,25 * 256);
//
// CellStyle style = workbook.createCellStyle();
// style.setAlignment(HorizontalAlignment.CENTER);
// style.setVerticalAlignment(VerticalAlignment.CENTER);
// createRowTitle(sheet, style);
//
// Integer num = 1;
// Map<String, Integer> countMap = new HashMap<>();
//
// for (int i = 0; i < resultList.size(); i++) {
// if (resultList.get(i).getWaresDetailList() != null) {
// // 加入判断 单个单元格无法合并
// if (num != num+resultList.get(i).getWaresDetailList().size()){
// if (resultList.get(i).getWaresDetailList().size() > 1){
// CellRangeAddress region0 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 0, 0);
// sheet.addMergedRegion(region0);
// CellRangeAddress region1 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 1, 1);
// sheet.addMergedRegion(region1);
// CellRangeAddress region2 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 2, 2);
// sheet.addMergedRegion(region2);
// CellRangeAddress region3 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 3, 3);
// sheet.addMergedRegion(region3);
// CellRangeAddress region4 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 4, 4);
// sheet.addMergedRegion(region4);
// CellRangeAddress region5 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 5, 5);
// sheet.addMergedRegion(region5);
// CellRangeAddress region6 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 6, 6);
// sheet.addMergedRegion(region6);
//
// CellRangeAddress region10 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 10, 10);
// sheet.addMergedRegion(region10);
// CellRangeAddress region11 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 11, 11);
// sheet.addMergedRegion(region11);
//
// CellRangeAddress region12 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 12, 12);
// sheet.addMergedRegion(region12);
// CellRangeAddress region13 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 13, 13);
// sheet.addMergedRegion(region13);
// CellRangeAddress region14 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 14, 14);
// sheet.addMergedRegion(region14);
// CellRangeAddress region15 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 15, 15);
// sheet.addMergedRegion(region15);
// CellRangeAddress region16 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 16, 16);
// sheet.addMergedRegion(region16);
// CellRangeAddress region17 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 17, 17);
// sheet.addMergedRegion(region17);
// CellRangeAddress region18 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 18, 18);
// sheet.addMergedRegion(region18);
// CellRangeAddress region19 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 19, 19);
// sheet.addMergedRegion(region19);
// CellRangeAddress region20 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 20, 20);
// sheet.addMergedRegion(region20);
// CellRangeAddress region21 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 21, 21);
// sheet.addMergedRegion(region21);
// CellRangeAddress region22 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 22, 22);
// sheet.addMergedRegion(region22);
// CellRangeAddress region23 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 23, 23);
// sheet.addMergedRegion(region23);
// CellRangeAddress region24 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 24, 24);
// sheet.addMergedRegion(region24);
//
// num += resultList.get(i).getWaresDetailList().size();
// }
// }
// for (WaresProductDetailVo waresProductDetailVo : resultList.get(i).getWaresDetailList()) {
// WaresVo waresVo = resultList.get(i);
// Row dataRow = sheet.createRow(num + 1);
// Cell cell0 = dataRow.createCell(0);
// cell0.setCellValue(waresVo.getWaresName());
// cell0.setCellStyle(style);
//
// Cell cell1 = dataRow.createCell(1);
// cell1.setCellValue(waresVo.getWaresCode());
// cell1.setCellStyle(style);
// Cell cell2 = dataRow.createCell(2);
// cell2.setCellValue(waresVo.getWaresPrice().toString());
// cell2.setCellStyle(style);
// Cell cell3 = dataRow.createCell(3);
// cell3.setCellValue(waresVo.getWaresAchieve().toString());
// cell3.setCellStyle(style);
// Cell cell4 = dataRow.createCell(4);
// cell4.setCellValue(waresVo.getAuthorityTypeVal());
// cell4.setCellStyle(style);
// Cell cell5 = dataRow.createCell(5);
// cell5.setCellValue(waresVo.getMemberCode());
// cell5.setCellStyle(style);
// Cell cell6 = dataRow.createCell(6);
// cell6.setCellValue(waresVo.getMemberName());
// cell6.setCellStyle(style);
// Cell cell7 = dataRow.createCell(7);
// cell7.setCellValue(waresProductDetailVo.getProductName());
// cell7.setCellStyle(style);
// Cell cell8 = dataRow.createCell(8);
// cell8.setCellValue(waresProductDetailVo.getProductCode());
// cell8.setCellStyle(style);
//
// Cell cell9 = dataRow.createCell(9);
// cell9.setCellValue(waresProductDetailVo.getProductQuantity());
// cell9.setCellStyle(style);
//
// Cell cell10 = dataRow.createCell(10);
// cell10.setCellValue(waresVo.getSpecialAreaVal());
// cell10.setCellStyle(style);
//
// if (waresVo.getIsSingle() != null) {
// if (waresVo.getIsSingle().equals(EYesNo.YES.getIntValue())) {
// Cell cell11 = dataRow.createCell(11);
// cell11.setCellValue("套装");
// cell11.setCellStyle(style);
// } else {
// Cell cell11 = dataRow.createCell(11);
// cell11.setCellValue("单品");
// cell11.setCellStyle(style);
// }
// }
// if (waresVo.getIsFreeMail() != null) {
// if (waresVo.getIsFreeMail().equals(EYesNo.YES.getIntValue())) {
// Cell cell12 = dataRow.createCell(12);
// cell12.setCellValue("包邮");
// cell12.setCellStyle(style);
// } else {
// Cell cell12 = dataRow.createCell(12);
// cell12.setCellValue("不包邮");
// cell12.setCellStyle(style);
// }
// }
// Cell cell13 = dataRow.createCell(13);
// cell13.setCellValue(waresVo.getClassifyName());
// cell13.setCellStyle(style);
//
// if (waresVo.getIsRecommend() != null) {
// if (waresVo.getIsRecommend().equals(EYesNo.YES.getIntValue())) {
// Cell cell14 = dataRow.createCell(14);
// cell14.setCellValue("推荐");
// cell14.setCellStyle(style);
// } else {
// Cell cell14 = dataRow.createCell(14);
// cell14.setCellValue("不推荐");
// cell14.setCellStyle(style);
// }
// } else {
// Cell cell14 = dataRow.createCell(14);
// cell14.setCellValue("不推荐");
// cell14.setCellStyle(style);
// }
//
// Cell cell15 = dataRow.createCell(15);
// cell15.setCellValue("供应方式");
// cell15.setCellStyle(style);
//
// if (waresVo.getIsSale() != null) {
// if (waresVo.getIsSale().equals(EYesNo.YES.getIntValue())) {
// Cell cell16 = dataRow.createCell(16);
// cell16.setCellValue("允许销售");
// cell16.setCellStyle(style);
// } else {
// Cell cell16 = dataRow.createCell(16);
// cell16.setCellValue("禁止销售");
// cell16.setCellStyle(style);
// }
// }
// if (waresVo.getIsPutOn() != null) {
// if (waresVo.getIsPutOn().equals(EYesNo.YES.getIntValue())) {
// Cell cell17 = dataRow.createCell(17);
// cell17.setCellValue("上架");
// cell17.setCellStyle(style);
// } else {
// Cell cell17 = dataRow.createCell(17);
// cell17.setCellValue("下架");
// cell17.setCellStyle(style);
// }
// }
// Cell cell18 = dataRow.createCell(18);
// cell18.setCellValue(waresVo.getPreSaleStatusVal());
// cell18.setCellStyle(style);
//
// Cell cell19 = dataRow.createCell(19);
// cell19.setCellValue(waresVo.getSales());
// cell19.setCellStyle(style);
//
// Cell cell20 = dataRow.createCell(20);
// cell20.setCellValue(waresVo.getActualSales());
// cell20.setCellStyle(style);
//
// if (waresVo.getArrivalTime() != null) {
// Cell cell21 = dataRow.createCell(21);
// cell21.setCellValue(waresVo.getArrivalTime());
// cell21.setCellStyle(style);
// }
// if (waresVo.getPutOnTime() != null) {
// Cell cell22 = dataRow.createCell(22);
// cell22.setCellValue(DateUtil.format(waresVo.getPutOnTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
// cell22.setCellStyle(style);
// }
// if (waresVo.getPutOffTime() != null) {
// Cell cell23 = dataRow.createCell(23);
// cell23.setCellValue(DateUtil.format(waresVo.getPutOffTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
// cell23.setCellStyle(style);
// }
//
// if (waresVo.getCreationTime() != null) {
// Cell cell24 = dataRow.createCell(24);
// cell24.setCellValue(DateUtil.format(waresVo.getCreationTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
// cell24.setCellStyle(style);
// }
//
// if (waresVo.getListingTime() != null) {
// Cell cell25 = dataRow.createCell(25);
// cell25.setCellValue(DateUtil.format(waresVo.getListingTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
// cell25.setCellStyle(style);
// }
// if (waresVo.getRemovalTime() != null) {
// Cell cell26 = dataRow.createCell(26);
// cell26.setCellValue(DateUtil.format(waresVo.getRemovalTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
// cell26.setCellStyle(style);
// }
// num += 1;
// }
// }
// }
//
// try {
// File file = new File("商品导出.xls");
//
// FileOutputStream fos = new FileOutputStream(file);
// workbook.write(fos);
// fos.close();
// String fileName = file.getName();
//
// response.setContentType("application/octet-stream");
// response.setHeader("Content-Disposition", "attachment; filename=\"" + file.getName() + "\"");
//
// FileInputStream fis = new FileInputStream(file);
// OutputStream out = response.getOutputStream();
// byte[] buffer = new byte[4096];
// int bytesRead = -1;
// while ((bytesRead = fis.read(buffer)) != -1) {
// out.write(buffer, 0, bytesRead);
// }
// fis.close();
// out.close();
//
//
// } catch (Exception e) {
// e.printStackTrace();
// }
} }
/** /**
@ -562,7 +306,7 @@ public class BdWaresController extends BaseController {
LambdaQueryWrapper<BdWares> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<BdWares> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BdWares::getWaresCode, wares.getWaresCode()); queryWrapper.eq(BdWares::getWaresCode, wares.getWaresCode());
queryWrapper.eq(BdWares::getSpecialArea, wares.getSpecialArea()); queryWrapper.eq(BdWares::getSpecialArea, wares.getSpecialArea());
if (waresService.count(queryWrapper) > 0) { if (iBdWaresService.count(queryWrapper) > 0) {
return AjaxResult.error("商品编号重复"); return AjaxResult.error("商品编号重复");
} }
} }
@ -657,8 +401,7 @@ public class BdWaresController extends BaseController {
if (!isPutOn) { if (!isPutOn) {
return AjaxResult.error("产品规格至少有一个上架"); return AjaxResult.error("产品规格至少有一个上架");
} }
// wares.setSort(0); iBdWaresService.saveWares(wares, userTokenService.getLoginUser());
waresService.saveWares(wares, userTokenService.getLoginUser());
return AjaxResult.success(wares.getWaresCode()); return AjaxResult.success(wares.getWaresCode());
} }
@ -697,21 +440,10 @@ public class BdWaresController extends BaseController {
queryWrapper.eq(BdWares::getWaresCode, waresParams.getWaresCode()); queryWrapper.eq(BdWares::getWaresCode, waresParams.getWaresCode());
queryWrapper.eq(BdWares::getSpecialArea, waresParams.getSpecialArea()); queryWrapper.eq(BdWares::getSpecialArea, waresParams.getSpecialArea());
queryWrapper.notIn(BdWares::getPkId, waresParams.getWaresId()); queryWrapper.notIn(BdWares::getPkId, waresParams.getWaresId());
if (waresService.count(queryWrapper) > 0) { if (iBdWaresService.count(queryWrapper) > 0) {
return AjaxResult.error("商品编号重复"); return AjaxResult.error("商品编号重复");
} }
} }
// if (waresParams.getPkPrefixLabel() == null || waresParams.getPkCoolLabel() == null || waresParams.getPkGuaranteeLabel() == null || waresParams.getPkSellingPoint() == null){
// return AjaxResult.error(WaresMsgConstants.WARES_LABEL_DUPLICATE);
// }
// 检测排序重复
// QueryWrapper<BdWares> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("SORT", waresParams.getSort());
// queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
// queryWrapper.notIn("PK_ID", waresParams.getWaresId());
// if (waresService.count(queryWrapper) > 0) {
// return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.HO_SORT_NOT_REPEAT));
// }
// 是否陆运 // 是否陆运
int isLandTrans = 1; int isLandTrans = 1;
@ -797,10 +529,7 @@ public class BdWaresController extends BaseController {
return AjaxResult.error("规格图片必传"); return AjaxResult.error("规格图片必传");
} }
} }
iBdWaresService.updateWares(waresParams, userTokenService.getLoginUser());
// waresParams.setSort(0);
waresService.updateWares(waresParams, userTokenService.getLoginUser());
// waresService.saveWaresModifyRecord(waresParams, userTokenService.getLoginUser(),EModifyRecordType.WARES_UPDATE.getValue());
return AjaxResult.success(waresParams.getWaresCode()); return AjaxResult.success(waresParams.getWaresCode());
} }
@ -813,7 +542,7 @@ public class BdWaresController extends BaseController {
@DeleteMapping("/{pkId}") @DeleteMapping("/{pkId}")
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.DELETE) @Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.DELETE)
public AjaxResult remove(@PathVariable Integer pkId) { public AjaxResult remove(@PathVariable Integer pkId) {
waresService.removeWares(pkId, userTokenService.getLoginUser()); iBdWaresService.removeWares(pkId, userTokenService.getLoginUser());
return AjaxResult.success(); return AjaxResult.success();
} }
@ -829,7 +558,7 @@ public class BdWaresController extends BaseController {
List<BdRangeExt> rsList = rangeDto.getData(); List<BdRangeExt> rsList = rangeDto.getData();
Map<Integer, BdRangeExt> rangeMap = rsList.stream().collect(Collectors.toMap(BdRangeExt::getPkId, Function.identity())); Map<Integer, BdRangeExt> rangeMap = rsList.stream().collect(Collectors.toMap(BdRangeExt::getPkId, Function.identity()));
BdWares wares = waresService.getById(pkId); BdWares wares = iBdWaresService.getById(pkId);
LambdaQueryWrapper<BdWaresExtend> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<BdWaresExtend> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BdWaresExtend::getPkWares, pkId); queryWrapper.eq(BdWaresExtend::getPkWares, pkId);
BdWaresExtend waresExtend = waresExtendService.getOne(queryWrapper); BdWaresExtend waresExtend = waresExtendService.getOne(queryWrapper);
@ -1012,15 +741,6 @@ public class BdWaresController extends BaseController {
LambdaQueryWrapper<BdWaresRange> waresRangeWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<BdWaresRange> waresRangeWrapper = new LambdaQueryWrapper<>();
waresRangeWrapper.eq(BdWaresRange::getPkWares, pkId); waresRangeWrapper.eq(BdWaresRange::getPkWares, pkId);
int waresRangeCount = waresRangeService.count(waresRangeWrapper); int waresRangeCount = waresRangeService.count(waresRangeWrapper);
// 查询不存在的极差等级 (部分极差等级可能是后期添加导致商品和极差关联表不存在该极差信息)
// List<Integer> rangeArrayList = new ArrayList<>();
// Map<Integer, BdWaresRange> wrMap = rangeList.stream().collect(Collectors.toMap(BdWaresRange::getPkRange, Function.identity()));
// for (BdRangeExt bdRangeExt : rsList) {
// BdWaresRange bdWaresRange = wrMap.get(bdRangeExt.getPkId());
// if (bdWaresRange == null){
// rangeArrayList.add(bdWaresRange.getPkRange());
// }
// }
List<Integer> rgList = new ArrayList<>(); List<Integer> rgList = new ArrayList<>();
for (BdWaresRange bdWaresRange : rangeList) { for (BdWaresRange bdWaresRange : rangeList) {
if (bdWaresRange.getPkId() != null) { if (bdWaresRange.getPkId() != null) {
@ -1140,7 +860,7 @@ public class BdWaresController extends BaseController {
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.UP_MOVE) @Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.UP_MOVE)
public AjaxResult move(Integer waresId, Integer waresMoveType, Integer specialArea) { public AjaxResult move(Integer waresId, Integer waresMoveType, Integer specialArea) {
LoginUser loginUser = userTokenService.getLoginUser(); LoginUser loginUser = userTokenService.getLoginUser();
waresService.waresMove(waresId, waresMoveType, loginUser, specialArea); iBdWaresService.waresMove(waresId, waresMoveType, loginUser, specialArea);
return AjaxResult.success(); return AjaxResult.success();
} }
@ -1154,7 +874,7 @@ public class BdWaresController extends BaseController {
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.TOP) @Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.TOP)
public AjaxResult floatingRoof(Integer waresId) { public AjaxResult floatingRoof(Integer waresId) {
LoginUser loginUser = userTokenService.getLoginUser(); LoginUser loginUser = userTokenService.getLoginUser();
waresService.floatingRoof(waresId, loginUser); iBdWaresService.floatingRoof(waresId, loginUser);
return AjaxResult.success(); return AjaxResult.success();
} }
@ -1166,7 +886,7 @@ public class BdWaresController extends BaseController {
@GetMapping("botton-up") @GetMapping("botton-up")
public AjaxResult bottomUp(Integer waresId) { public AjaxResult bottomUp(Integer waresId) {
LoginUser loginUser = userTokenService.getLoginUser(); LoginUser loginUser = userTokenService.getLoginUser();
waresService.bottomUp(waresId, loginUser); iBdWaresService.bottomUp(waresId, loginUser);
return AjaxResult.success(); return AjaxResult.success();
} }
@ -1177,13 +897,13 @@ public class BdWaresController extends BaseController {
*/ */
@GetMapping("create-wares-code") @GetMapping("create-wares-code")
public AjaxResult createWaresCode() { public AjaxResult createWaresCode() {
String waresCode = CreateNormsCodeUtils.createWaresCode(waresService.getLastWaresCode()); String waresCode = CreateNormsCodeUtils.createWaresCode(iBdWaresService.getLastWaresCode());
return AjaxResult.success(waresCode); return AjaxResult.success(waresCode);
} }
@GetMapping("/getMaxSortNum") @GetMapping("/getMaxSortNum")
public AjaxResult getMaxSortNum() { public AjaxResult getMaxSortNum() {
return AjaxResult.success("请求成功!", waresService.getMaxSortNum()); return AjaxResult.success("请求成功!", iBdWaresService.getMaxSortNum());
} }
/** /**
@ -1194,7 +914,7 @@ public class BdWaresController extends BaseController {
@GetMapping("/create-wares-sort") @GetMapping("/create-wares-sort")
public AjaxResult createWaresSort() { public AjaxResult createWaresSort() {
Integer pkCountry = SecurityUtils.getPkCountry(); Integer pkCountry = SecurityUtils.getPkCountry();
Integer maxSort = waresService.getMaxSort(pkCountry); Integer maxSort = iBdWaresService.getMaxSort(pkCountry);
if (maxSort == null) { if (maxSort == null) {
maxSort = 0; maxSort = 0;
} }
@ -1212,7 +932,7 @@ public class BdWaresController extends BaseController {
queryWrapper.eq(BdWares::getWaresName, waresName); queryWrapper.eq(BdWares::getWaresName, waresName);
} }
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry()); queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
List<BdWares> list = waresService.list(queryWrapper); List<BdWares> list = iBdWaresService.list(queryWrapper);
List<WaresEntnyOrderVo> resultList = new ArrayList<>(); List<WaresEntnyOrderVo> resultList = new ArrayList<>();
for (BdWares bdWares : list) { for (BdWares bdWares : list) {
WaresEntnyOrderVo waresEntnyOrderVo = new WaresEntnyOrderVo(); WaresEntnyOrderVo waresEntnyOrderVo = new WaresEntnyOrderVo();
@ -1313,7 +1033,7 @@ public class BdWaresController extends BaseController {
queryWrapper.like(BdWares::getWaresName, waresParams.getQueryName()).or().like(BdWares::getWaresCode, waresParams.getQueryName()); queryWrapper.like(BdWares::getWaresName, waresParams.getQueryName()).or().like(BdWares::getWaresCode, waresParams.getQueryName());
} }
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry()); queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
List<BdWares> list = waresService.list(queryWrapper); List<BdWares> list = iBdWaresService.list(queryWrapper);
return AjaxResult.success(list); return AjaxResult.success(list);
} }
@ -1325,7 +1045,7 @@ public class BdWaresController extends BaseController {
for (ComputeWaresPrice computeWaresPrice : computhParams.getComputeWaresPriceList()) { for (ComputeWaresPrice computeWaresPrice : computhParams.getComputeWaresPriceList()) {
computeWaresPrice.setPkWares(computhParams.getPkWares()); computeWaresPrice.setPkWares(computhParams.getPkWares());
} }
return AjaxResult.success(waresService.computeWaresPrice(computhParams.getComputeWaresPriceList())); return AjaxResult.success(iBdWaresService.computeWaresPrice(computhParams.getComputeWaresPriceList()));
} }
/** /**
@ -1337,7 +1057,7 @@ public class BdWaresController extends BaseController {
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.APPROVAL, remark = "商品新増审批") @Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.APPROVAL, remark = "商品新増审批")
@PostMapping("/wares-approve") @PostMapping("/wares-approve")
public AjaxResult waresApprove(@Valid @RequestBody WaresApproveParam param) { public AjaxResult waresApprove(@Valid @RequestBody WaresApproveParam param) {
waresService.update(Wrappers.<BdWares>lambdaUpdate() iBdWaresService.update(Wrappers.<BdWares>lambdaUpdate()
.eq(BdWares::getPkId, param.getPkWares()) .eq(BdWares::getPkId, param.getPkWares())
.eq(BdWares::getWaresStatus, EApproveStatus.ALREADY_SUBMIT.getValue()) .eq(BdWares::getWaresStatus, EApproveStatus.ALREADY_SUBMIT.getValue())
.set(BdWares::getWaresStatus, EApproveStatus.FINISH.getValue()) .set(BdWares::getWaresStatus, EApproveStatus.FINISH.getValue())
@ -1346,7 +1066,6 @@ public class BdWaresController extends BaseController {
return AjaxResult.success(); return AjaxResult.success();
} }
/** /**
* 编辑商品信息 * 编辑商品信息
* *
@ -1357,7 +1076,34 @@ public class BdWaresController extends BaseController {
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.RESET) @Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.RESET)
public AjaxResult resetInventoryUse(@RequestBody WaresParams waresParams) { public AjaxResult resetInventoryUse(@RequestBody WaresParams waresParams) {
waresParams.setPkCountry(SecurityUtils.getPkCountry()); waresParams.setPkCountry(SecurityUtils.getPkCountry());
waresService.resetInventoryUse(waresParams); iBdWaresService.resetInventoryUse(waresParams);
return AjaxResult.success(waresParams.getWaresCode()); return AjaxResult.success(waresParams.getWaresCode());
} }
/**
* 非在售商品列表
*
* @param param
* @return
*/
@GetMapping("/list-no-sale")
public TableDataInfo listNoSale(WaresNoSaleParam param) {
List<WaresNoSaleVO> resultList = new ArrayList<>();
List<BdWaresExt> list = iBdWaresService.listWaresNoSale(param);
if (CollectionUtil.isNotEmpty(list)) {
for (BdWaresExt bdWaresExt : list) {
WaresNoSaleVO vo = BeanUtil.copyProperties(bdWaresExt, WaresNoSaleVO.class);
vo.setSpecialAreaVal(ESpecialArea.getLabelByValue(vo.getSpecialArea()));
vo.setPreSaleStatusVal(EPresaleStatus.getLabelByValue(vo.getPreSaleStatus()));
resultList.add(vo);
}
}
TableDataInfo tableDataInfo = getDataTable(list);
tableDataInfo.setRows(resultList);
return tableDataInfo;
}
} }

View File

@ -5,6 +5,7 @@ import com.hzs.common.domain.sale.ext.BdWaresExt;
import com.hzs.common.domain.sale.wares.BdWares; import com.hzs.common.domain.sale.wares.BdWares;
import com.hzs.common.domain.system.config.BdAgreement; import com.hzs.common.domain.system.config.BdAgreement;
import com.hzs.sale.index.controller.param.IndexWaresParam; import com.hzs.sale.index.controller.param.IndexWaresParam;
import com.hzs.sale.wares.param.WaresNoSaleParam;
import com.hzs.sale.wares.param.WaresParams; import com.hzs.sale.wares.param.WaresParams;
import com.hzs.sale.wares.vo.WaresAuthorityVo; import com.hzs.sale.wares.vo.WaresAuthorityVo;
import com.hzs.sale.wares.vo.WaresVo; import com.hzs.sale.wares.vo.WaresVo;
@ -169,4 +170,12 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
*/ */
List<BdWaresExt> listWaresNew(@Param("param") IndexWaresParam param); List<BdWaresExt> listWaresNew(@Param("param") IndexWaresParam param);
/**
* 查询非在售商品
*
* @param param
* @return
*/
List<BdWaresExt> listWaresNoSale(@Param("param") WaresNoSaleParam param);
} }

View File

@ -1,40 +0,0 @@
package com.hzs.sale.wares.param;/**
* @Description:
* @Author: yuhui
* @Time: 2023/5/22 14:22
* @Classname: ConfirmOrderWaresInfoParams
* @PackageName: com.hzs.sale.wares.param
*/
import lombok.Data;
/**
*@BelongsProject: hzs_cloud
*@BelongsPackage: com.hzs.sale.wares.param
*@Author: yh
*@CreateTime: 2023-05-22 14:22
*@Description: TODO
*@Version: 1.0
*/
@Data
public class ConfirmOrderWaresInfoList {
/**
* 商品外键
*/
private Long pkTWares;
/**
* 商品sku外键
*/
private Long pkTWaresSku;
/**
* 商品数量
*/
private Integer quantity;
/**
* 渠道
*/
private Integer source;
}

View File

@ -0,0 +1,24 @@
package com.hzs.sale.wares.param;
import lombok.Data;
/**
* 非在售商品查询
*/
@Data
public class WaresNoSaleParam {
/**
* 商品编号
*/
private String waresCode;
/**
* 商品名称
*/
private String waresName;
/**
* 商品状态
*/
private Integer preSaleStatus;
}

View File

@ -8,6 +8,7 @@ import com.hzs.common.domain.system.config.BdAgreement;
import com.hzs.common.domain.system.config.ext.BdRangeExt; import com.hzs.common.domain.system.config.ext.BdRangeExt;
import com.hzs.sale.index.controller.param.IndexWaresParam; import com.hzs.sale.index.controller.param.IndexWaresParam;
import com.hzs.sale.wares.param.ComputeWaresPrice; import com.hzs.sale.wares.param.ComputeWaresPrice;
import com.hzs.sale.wares.param.WaresNoSaleParam;
import com.hzs.sale.wares.param.WaresParams; import com.hzs.sale.wares.param.WaresParams;
import com.hzs.sale.wares.vo.RecommendWaresInfoVo; import com.hzs.sale.wares.vo.RecommendWaresInfoVo;
import com.hzs.sale.wares.vo.WaresAuthorityVo; import com.hzs.sale.wares.vo.WaresAuthorityVo;
@ -174,7 +175,7 @@ public interface IBdWaresService extends IService<BdWares> {
void updateByAutoStartAndAutoStart(Date currentTime); void updateByAutoStartAndAutoStart(Date currentTime);
/** /**
* @description: 修改商品预售状态 * 修改商品预售状态
**/ **/
void waresPreSale(); void waresPreSale();
@ -237,4 +238,13 @@ public interface IBdWaresService extends IService<BdWares> {
List<BdWaresExt> listWares(IndexWaresParam param); List<BdWaresExt> listWares(IndexWaresParam param);
void resetInventoryUse(WaresParams params); void resetInventoryUse(WaresParams params);
/**
* 查询非在售商品
*
* @param param
* @return
*/
List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param);
} }

View File

@ -1537,4 +1537,9 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
iBdWaresExtendService.update(waresExtend, queryWrapper); iBdWaresExtendService.update(waresExtend, queryWrapper);
} }
@Override
public List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param) {
return baseMapper.listWaresNoSale(param);
}
} }

View File

@ -0,0 +1,49 @@
package com.hzs.sale.wares.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 非在售商品查询返回
*/
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class WaresNoSaleVO implements Serializable {
/**
* 商品ID
*/
private Integer pkId;
/**
* 商品图
*/
private String cover1;
/**
* 商品编号
*/
private String waresCode;
/**
* 商品名称
*/
private String waresName;
/**
* 商品专区
*/
private Integer specialArea;
private String specialAreaVal;
/**
* 商品状态
*/
private Integer preSaleStatus;
private String preSaleStatusVal;
}

View File

@ -1,6 +1,5 @@
package com.hzs.sale.wares.vo; package com.hzs.sale.wares.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzs.common.core.annotation.BigDecimalFormat; import com.hzs.common.core.annotation.BigDecimalFormat;
import com.hzs.common.core.annotation.Excel; import com.hzs.common.core.annotation.Excel;
@ -112,7 +111,6 @@ public class WaresVo {
/** /**
* 所属专区 * 所属专区
*/ */
private Integer specialArea; private Integer specialArea;
/** /**
* 所属专区 * 所属专区

View File

@ -71,14 +71,6 @@
so.remark, so.remark,
soi.creation_time, soi.creation_time,
so.pay_time, so.pay_time,
case
when so.PK_ORIGINAL_ORDER is not null then
(select sot.order_code
from sa_order sot
where sot.pk_id = so.PK_ORIGINAL_ORDER)
else
null
end original_order_code,
bs.name storehouse_name, bs.name storehouse_name,
bu.name unit_name bu.name unit_name
from SA_ORDER so from SA_ORDER so
@ -131,9 +123,6 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="null != param.pkOriginalOrder">
and so.PK_ORIGINAL_ORDER = #{param.pkOriginalOrder}
</if>
</if> </if>
</foreach> </foreach>
order by creation_time desc, order_code desc order by creation_time desc, order_code desc
@ -171,14 +160,6 @@
so.remark, so.remark,
soi.creation_time, soi.creation_time,
so.pay_time, so.pay_time,
case
when so.PK_ORIGINAL_ORDER is not null then
(select sot.order_code
from sa_order sot
where sot.pk_id = so.PK_ORIGINAL_ORDER)
else
null
end original_order_code,
bs.name storehouse_name, bs.name storehouse_name,
bu.name unit_name, bu.name unit_name,
so.SYSTEM_TYPE so.SYSTEM_TYPE
@ -235,9 +216,6 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="null != param.pkOriginalOrder">
and so.PK_ORIGINAL_ORDER = #{param.pkOriginalOrder}
</if>
order by soi.creation_time desc, so.order_code desc order by soi.creation_time desc, so.order_code desc
</if> </if>
</select> </select>

View File

@ -465,4 +465,31 @@
order by bd.sort desc, bd.wares_price order by bd.sort desc, bd.wares_price
</select> </select>
<!-- 查询非在售商品 -->
<select id="listWaresNoSale" resultType="com.hzs.common.domain.sale.ext.BdWaresExt">
select bw.pk_id,
bw.cover1,
bw.wares_name,
bw.wares_code,
bw.special_area,
bwe.pre_sale_status
from bd_wares bw
inner join bd_wares_extend bwe
on bwe.pk_wares = bw.pk_id
where bw.del_flag = 0
and bwe.del_flag = 0
and bwe.is_put_on = 0
and bwe.pre_sale_status in (1, 3)
<if test="param.waresCode != null and param.waresCode != ''">
and bw.wares_code like '%' || #{param.waresCode} || '%'
</if>
<if test="param.waresName != null and param.waresName != ''">
and bw.wares_name like '%' || #{param.waresName} || '%'
</if>
<if test="param.preSaleStatus != null">
and bwe.pre_sale_status = #{param.preSaleStatus}
</if>
order by bw.wares_name
</select>
</mapper> </mapper>

View File

@ -54,4 +54,16 @@ public enum EPresaleStatus {
return null; return null;
} }
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EPresaleStatus enums : EPresaleStatus.values()) {
if (enums.getValue() == value) {
return enums.getLabel();
}
}
return "";
}
} }

View File

@ -150,7 +150,7 @@ public class SaOrderItems extends BaseEntity {
private String logisticsCompany; private String logisticsCompany;
/** /**
* 商品类型1=普通商品 * 商品类型1=普通商品2=188商品3=加购商品
*/ */
@TableField("IS_MAKER_GIFT") @TableField("IS_MAKER_GIFT")
private Integer isMakerGift; private Integer isMakerGift;