设备获取超市物资
This commit is contained in:
parent
1f0e20d71c
commit
6c8eea05f5
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.account.v3.app.dto;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.PageDTO;
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.account.v3.app.dto;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.PageDTO;
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.account.v3.web.dto;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.PageDTO;
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import com.bonus.common.houqin.utils.LeBeanUtil;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.allocation.canteen.param;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.PageDTO;
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.allocation.canteen.param;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.PageDTO;
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.allocation.canteen.param;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.PageDTO;
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
package com.bonus.canteen.core.common.utils;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class PageDTO implements Serializable {
|
||||
@ApiModelProperty("当前页")
|
||||
private Long current;
|
||||
@ApiModelProperty("每页显示条数")
|
||||
private Long size;
|
||||
|
||||
public Long getCurrent() {
|
||||
return !ObjectUtil.isNull(this.current) && this.current > 0L ? this.current : 1L;
|
||||
}
|
||||
|
||||
public Long getSize() {
|
||||
return !ObjectUtil.isNull(this.size) && this.size != 0L ? this.size : 10L;
|
||||
}
|
||||
|
||||
public void setCurrent(final Long current) {
|
||||
this.current = current;
|
||||
}
|
||||
|
||||
public void setSize(final Long size) {
|
||||
this.size = size;
|
||||
}
|
||||
}
|
||||
//package com.bonus.canteen.core.common.utils;
|
||||
//
|
||||
//import cn.hutool.core.util.ObjectUtil;
|
||||
//import io.swagger.annotations.ApiModelProperty;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//
|
||||
//public class PageDTO implements Serializable {
|
||||
// @ApiModelProperty("当前页")
|
||||
// private Long current;
|
||||
// @ApiModelProperty("每页显示条数")
|
||||
// private Long size;
|
||||
//
|
||||
// public Long getCurrent() {
|
||||
// return !ObjectUtil.isNull(this.current) && this.current > 0L ? this.current : 1L;
|
||||
// }
|
||||
//
|
||||
// public Long getSize() {
|
||||
// return !ObjectUtil.isNull(this.size) && this.size != 0L ? this.size : 10L;
|
||||
// }
|
||||
//
|
||||
// public void setCurrent(final Long current) {
|
||||
// this.current = current;
|
||||
// }
|
||||
//
|
||||
// public void setSize(final Long size) {
|
||||
// this.size = size;
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.customer.dto;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.PageDTO;
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
public class CustJobInfoParam extends PageDTO {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.customer.dto;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.PageDTO;
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import java.util.List;
|
||||
|
||||
public class CustPageParam {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,93 @@
|
|||
package com.bonus.canteen.core.device.android.supermarket.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bonus.canteen.core.common.base.BaseController;
|
||||
import com.bonus.canteen.core.common.page.PageVO;
|
||||
import com.bonus.canteen.core.data.dataset.rule.RoutingRule;
|
||||
import com.bonus.canteen.core.device.android.supermarket.dto.AndroidProductPageDTO;
|
||||
import com.bonus.canteen.core.device.android.supermarket.service.DeviceSupermarketService;
|
||||
import com.bonus.canteen.core.device.android.supermarket.vo.AndroidSupermarketProductPageVO;
|
||||
import com.bonus.canteen.core.device.android.supermarket.vo.ProductCategoryListVO;
|
||||
import com.bonus.canteen.core.device.android.supermarket.vo.SupermarketInventoryMaterialPageVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import javax.validation.Valid;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Api(
|
||||
tags = {"设备基础接口(商超)"}
|
||||
)
|
||||
@RequestMapping({"/api/v4/device/supermarket"})
|
||||
public class DevicesupermarketController extends BaseController {
|
||||
private static final Logger log = LoggerFactory.getLogger(DevicesupermarketController.class);
|
||||
@Autowired
|
||||
@Lazy
|
||||
private DeviceSupermarketService deviceSupermarketService;
|
||||
|
||||
@ApiOperation(
|
||||
value = "设备-获取所有商品类别集合",
|
||||
notes = "设备-获取所有商品类别集合"
|
||||
)
|
||||
//@RequiresGuest
|
||||
@PostMapping({"/list-category"})
|
||||
public List<ProductCategoryListVO> listCategory() {
|
||||
return this.deviceSupermarketService.listCategory();
|
||||
}
|
||||
|
||||
@ApiOperation(
|
||||
value = "根据超市id获取商品明细",
|
||||
notes = "根据超市id获取商品明细"
|
||||
)
|
||||
//@RequiresGuest
|
||||
@PostMapping({"/list-product"})
|
||||
public PageVO<AndroidSupermarketProductPageVO> pageSupermarketProduct(@RequestBody @Valid AndroidProductPageDTO dto) {
|
||||
return PageVO.of(this.deviceSupermarketService.pageSupermarketProduct(dto));
|
||||
}
|
||||
|
||||
// @ApiOperation(
|
||||
// value = "设备-根据条码获取商品信息",
|
||||
// notes = "设备-根据条码获取商品信息"
|
||||
// )
|
||||
// //@RequiresGuest
|
||||
// @PostMapping({"/get-product/by-bar-code"})
|
||||
// public AndroidSupermarketProductPageVO getProductByBarCode(@RequestBody @Valid LeRequest<AndroidProductByBarCodeDTO> request) {
|
||||
// return this.deviceSupermarketService.getProductByBarCode((AndroidProductByBarCodeDTO)request.getContent());
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(
|
||||
// value = "设备-获取当前超市仓库库存列表",
|
||||
// notes = "设备-获取当前超市仓库库存列表"
|
||||
// )
|
||||
// //@RequiresGuest
|
||||
// @PostMapping({"/page-inventory-material"})
|
||||
// public PageVO<SupermarketInventoryMaterialPageVO> pageInventoryMaterial(@RequestBody LeRequest<SupermarketInventoryMaterialPageDTO> request) {
|
||||
// return PageVO.of(this.deviceSupermarketService.pageInventoryMaterial((SupermarketInventoryMaterialPageDTO)request.getContent()));
|
||||
// }
|
||||
//
|
||||
// @PostMapping({"/goods/page"})
|
||||
// @ApiOperation("设备-营业报表-商品汇总")
|
||||
// public RepMarketTotalVO<MarketGoodsSumListVO, MarketGoodsSummaryVO> getMarketGoodsSumRankPage(@RequestHeader Map<String, String> headers, @RequestBody LeRequest<MarketGoodsSummaryDTO> leRequest) {
|
||||
// RoutingRule.preferAccessSlave();
|
||||
// MarketGoodsSummaryDTO marketGoodsSummaryDTO = (MarketGoodsSummaryDTO)leRequest.getContent();
|
||||
// marketGoodsSummaryDTO.setMchSn(this.getMachineSnHeaders(headers));
|
||||
// return this.deviceSupermarketService.getMarketGoodsSumRankPage((MarketGoodsSummaryDTO)leRequest.getContent());
|
||||
// }
|
||||
//
|
||||
// @PostMapping({"/get-warehouse-id/by-supermarket-id"})
|
||||
// @ApiOperation("设备-v4-根据超市id获取仓库")
|
||||
// public SupermarketWarehouseVO getWarehouseIdBySupermarketId(@RequestBody LeRequest<Long> leRequest) {
|
||||
// Long supermarketId = (Long)leRequest.getContent();
|
||||
// if (!ObjectUtil.isEmpty(supermarketId) && supermarketId != 0L) {
|
||||
// return this.deviceSupermarketService.getWarehouseIdBySupermarketId(supermarketId);
|
||||
// } else {
|
||||
// throw new LeException(I18n.getMessage("device_supermarket_id_null", new Object[0]));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.bonus.canteen.core.device.android.supermarket.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel
|
||||
public class AndroidProductByBarCodeDTO {
|
||||
@ApiModelProperty("超市id")
|
||||
private @NotNull(
|
||||
message = "超市不能为空"
|
||||
) Long supermarketId;
|
||||
@ApiModelProperty("仓库id")
|
||||
private Long warehouseId;
|
||||
@ApiModelProperty("条码")
|
||||
private @NotBlank(
|
||||
message = "条码不能为空!"
|
||||
) String barCode;
|
||||
|
||||
public Long getSupermarketId() {
|
||||
return this.supermarketId;
|
||||
}
|
||||
|
||||
public Long getWarehouseId() {
|
||||
return this.warehouseId;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return this.barCode;
|
||||
}
|
||||
|
||||
public void setSupermarketId(final Long supermarketId) {
|
||||
this.supermarketId = supermarketId;
|
||||
}
|
||||
|
||||
public void setWarehouseId(final Long warehouseId) {
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public void setBarCode(final String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
|
||||
public String toString() {
|
||||
Long var10000 = this.getSupermarketId();
|
||||
return "AndroidProductByBarCodeDTO(supermarketId=" + var10000 + ", warehouseId=" + this.getWarehouseId() + ", barCode=" + this.getBarCode() + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.bonus.canteen.core.device.android.supermarket.dto;
|
||||
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel
|
||||
public class AndroidProductPageDTO extends PageDTO {
|
||||
@ApiModelProperty("超市id")
|
||||
private @NotNull(
|
||||
message = "超市不能为空!"
|
||||
) Long supermarketId;
|
||||
@ApiModelProperty("仓库id")
|
||||
private Long warehouseId;
|
||||
@ApiModelProperty("原料名称")
|
||||
private String materialName;
|
||||
@ApiModelProperty("类别id")
|
||||
private Long categoryId;
|
||||
|
||||
public Long getSupermarketId() {
|
||||
return this.supermarketId;
|
||||
}
|
||||
|
||||
public Long getWarehouseId() {
|
||||
return this.warehouseId;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return this.materialName;
|
||||
}
|
||||
|
||||
public Long getCategoryId() {
|
||||
return this.categoryId;
|
||||
}
|
||||
|
||||
public void setSupermarketId(final Long supermarketId) {
|
||||
this.supermarketId = supermarketId;
|
||||
}
|
||||
|
||||
public void setWarehouseId(final Long warehouseId) {
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public void setMaterialName(final String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public void setCategoryId(final Long categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Long var10000 = this.getSupermarketId();
|
||||
return "AndroidProductPageDTO(supermarketId=" + var10000 + ", warehouseId=" + this.getWarehouseId() + ", materialName=" + this.getMaterialName() + ", categoryId=" + this.getCategoryId() + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.bonus.canteen.core.device.android.supermarket.dto;
|
||||
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@ApiModel
|
||||
public class SupermarketInventoryMaterialPageDTO extends PageDTO {
|
||||
@ApiModelProperty("超市id")
|
||||
private @NotNull(
|
||||
message = "超市id不能为空!"
|
||||
) Long supermarketId;
|
||||
@ApiModelProperty("原料名称")
|
||||
private String materialName;
|
||||
@ApiModelProperty("条码")
|
||||
private String barCode;
|
||||
@ApiModelProperty("小于库存数")
|
||||
private BigDecimal lessNum;
|
||||
|
||||
public Long getSupermarketId() {
|
||||
return this.supermarketId;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return this.materialName;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return this.barCode;
|
||||
}
|
||||
|
||||
public BigDecimal getLessNum() {
|
||||
return this.lessNum;
|
||||
}
|
||||
|
||||
public void setSupermarketId(final Long supermarketId) {
|
||||
this.supermarketId = supermarketId;
|
||||
}
|
||||
|
||||
public void setMaterialName(final String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public void setBarCode(final String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public void setLessNum(final BigDecimal lessNum) {
|
||||
this.lessNum = lessNum;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Long var10000 = this.getSupermarketId();
|
||||
return "SupermarketInventoryMaterialPageDTO(supermarketId=" + var10000 + ", materialName=" + this.getMaterialName() + ", barCode=" + this.getBarCode() + ", lessNum=" + String.valueOf(this.getLessNum()) + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
package com.bonus.canteen.core.device.android.supermarket.service;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.bonus.canteen.core.device.android.supermarket.dto.AndroidProductPageDTO;
|
||||
import com.bonus.canteen.core.device.android.supermarket.vo.AndroidSupermarketProductPageVO;
|
||||
import com.bonus.canteen.core.device.android.supermarket.vo.ProductCategoryListVO;
|
||||
import com.bonus.canteen.core.drp.api.DrpServiceApi;
|
||||
import com.bonus.canteen.core.drp.po.InventoryModel;
|
||||
import com.bonus.canteen.core.menu.api.MenuDishesApi;
|
||||
import com.bonus.canteen.core.menu.constant.MenuPutawayStateEnum;
|
||||
import com.bonus.canteen.core.supermarket.api.SupermarketApi;
|
||||
import com.bonus.canteen.core.supermarket.mapper.SupermarketProductMapper;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class DeviceSupermarketService {
|
||||
@Autowired
|
||||
@Lazy
|
||||
private MenuDishesApi menuDishesApi;
|
||||
// @Autowired
|
||||
// @Lazy
|
||||
// private AndroidSupermarketService androidSupermarketService;
|
||||
// @Autowired
|
||||
// @Lazy
|
||||
// private MarketSummaryService marketSummaryService;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private SupermarketProductMapper supermarketProductMapper;
|
||||
@Autowired
|
||||
@Lazy
|
||||
DrpServiceApi drpServiceApi;
|
||||
@Autowired
|
||||
@Lazy
|
||||
SupermarketApi supermarketApi;
|
||||
|
||||
public List<ProductCategoryListVO> listCategory() {
|
||||
List<ProductCategoryListVO> productCategoryListVOS = this.menuDishesApi.listProductCategory();
|
||||
return BeanUtil.copyToList(productCategoryListVOS, ProductCategoryListVO.class);
|
||||
}
|
||||
|
||||
public List<AndroidSupermarketProductPageVO> pageSupermarketProduct(AndroidProductPageDTO content) {
|
||||
boolean ifSupermarketRelateDrp = this.supermarketApi.ifRelateDrp(content.getSupermarketId());
|
||||
String materialName = ObjectUtil.isNull(content.getMaterialName()) ? "" : content.getMaterialName();
|
||||
PageHelper.startPage(content);
|
||||
List<AndroidSupermarketProductPageVO> resultList = this.supermarketProductMapper.pageSupermarketProductRelateDrpV4(content, MenuPutawayStateEnum.PUTAWAY.key(), materialName.toUpperCase(), materialName.toLowerCase());
|
||||
if (!ifSupermarketRelateDrp) {
|
||||
return resultList;
|
||||
} else {
|
||||
Iterator var5 = resultList.iterator();
|
||||
|
||||
while(var5.hasNext()) {
|
||||
AndroidSupermarketProductPageVO androidSupermarketProductPageVO = (AndroidSupermarketProductPageVO)var5.next();
|
||||
InventoryModel inventoryModel = this.drpServiceApi.getInventoryNumByMaterialId(androidSupermarketProductPageVO.getMaterialId(), content.getWarehouseId(), androidSupermarketProductPageVO.getUnitId());
|
||||
if (ObjectUtil.isEmpty(inventoryModel)) {
|
||||
androidSupermarketProductPageVO.setInventoryNum(BigDecimal.ZERO);
|
||||
} else {
|
||||
androidSupermarketProductPageVO.setInventoryId(inventoryModel.getInventoryId());
|
||||
androidSupermarketProductPageVO.setInventoryNum(inventoryModel.getInventoryNum());
|
||||
}
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
|
||||
// public AndroidSupermarketProductPageVO getProductByBarCode(AndroidProductByBarCodeDTO content) {
|
||||
// net.xnzn.core.supermarket.dto.AndroidProductByBarCodeDTO androidProductByBarCodeDTO = new net.xnzn.core.supermarket.dto.AndroidProductByBarCodeDTO();
|
||||
// BeanUtil.copyProperties(content, androidProductByBarCodeDTO, new String[0]);
|
||||
// net.xnzn.core.supermarket.vo.AndroidSupermarketProductPageVO productByBarCode = this.androidSupermarketService.getProductByBarCode(androidProductByBarCodeDTO);
|
||||
// AndroidSupermarketProductPageVO result = new AndroidSupermarketProductPageVO();
|
||||
// BeanUtil.copyProperties(productByBarCode, result, new String[0]);
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// public List<SupermarketInventoryMaterialPageVO> pageInventoryMaterial(SupermarketInventoryMaterialPageDTO content) {
|
||||
// if (StrUtil.isNotBlank(content.getMaterialName())) {
|
||||
// content.setMaterialName(LeBeanUtil.fieldLikeHandle(content.getMaterialName()));
|
||||
// }
|
||||
//
|
||||
// PageHelper.startPage(content);
|
||||
// List<SupermarketInventoryMaterialPageVO> resultList = this.supermarketProductMapper.pageInventoryMaterialV4(content);
|
||||
// return resultList;
|
||||
// }
|
||||
//
|
||||
// public RepMarketTotalVO<MarketGoodsSumListVO, MarketGoodsSummaryVO> getMarketGoodsSumRankPage(MarketGoodsSummaryDTO content) {
|
||||
// return this.marketSummaryService.getMarketGoodsSummaryPage(content);
|
||||
// }
|
||||
//
|
||||
// public SupermarketWarehouseVO getWarehouseIdBySupermarketId(Long supermarketId) {
|
||||
// boolean ifRelateDrp = this.supermarketApi.ifRelateDrp(supermarketId);
|
||||
// if (ifRelateDrp) {
|
||||
// WarehouseModel warehouseModel = this.supermarketApi.getWarehouseBySupermarketId(supermarketId);
|
||||
// SupermarketWarehouseVO result = new SupermarketWarehouseVO();
|
||||
// BeanUtil.copyProperties(warehouseModel, result, new String[0]);
|
||||
// return result;
|
||||
// } else {
|
||||
// return new SupermarketWarehouseVO();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
package com.bonus.canteen.core.device.android.supermarket.vo;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.SysUtil;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.bonus.canteen.core.supermarket.constant.SupermarketConstants;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@ApiModel
|
||||
public class AndroidSupermarketProductPageVO {
|
||||
@ApiModelProperty("超市商品明细id")
|
||||
private Long supermarketDetailId;
|
||||
@ApiModelProperty("商品id")
|
||||
private Long materialId;
|
||||
@ApiModelProperty("商品")
|
||||
private String materialName;
|
||||
@ApiModelProperty("单位id")
|
||||
private Long unitId;
|
||||
@ApiModelProperty("单位")
|
||||
private String unitName;
|
||||
@ApiModelProperty("原价")
|
||||
private Integer salePrice;
|
||||
@ApiModelProperty("会员价")
|
||||
private Integer prefPrice;
|
||||
@ApiModelProperty("库存id")
|
||||
private Long inventoryId;
|
||||
@ApiModelProperty("库存数")
|
||||
private BigDecimal inventoryNum;
|
||||
@ApiModelProperty("条码")
|
||||
private String barCode;
|
||||
@ApiModelProperty("图片")
|
||||
private String imgUrl;
|
||||
@ApiModelProperty("售卖类型(1按份2称重)")
|
||||
private Integer salesMode;
|
||||
@ApiModelProperty("称重单位,默认设置1000g")
|
||||
private Integer unitPrice;
|
||||
@ApiModelProperty("称重重量(g)")
|
||||
private Integer weight;
|
||||
|
||||
public String getImgUrl() {
|
||||
return SysUtil.getCutFileUrl(this.imgUrl);
|
||||
}
|
||||
|
||||
public AndroidSupermarketProductPageVO() {
|
||||
this.unitPrice = SupermarketConstants.WEIGHT_UNIT_PRICE;
|
||||
}
|
||||
|
||||
public Long getSupermarketDetailId() {
|
||||
return this.supermarketDetailId;
|
||||
}
|
||||
|
||||
public Long getMaterialId() {
|
||||
return this.materialId;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return this.materialName;
|
||||
}
|
||||
|
||||
public Long getUnitId() {
|
||||
return this.unitId;
|
||||
}
|
||||
|
||||
public String getUnitName() {
|
||||
return this.unitName;
|
||||
}
|
||||
|
||||
public Integer getSalePrice() {
|
||||
return this.salePrice;
|
||||
}
|
||||
|
||||
public Integer getPrefPrice() {
|
||||
return this.prefPrice;
|
||||
}
|
||||
|
||||
public Long getInventoryId() {
|
||||
return this.inventoryId;
|
||||
}
|
||||
|
||||
public BigDecimal getInventoryNum() {
|
||||
return this.inventoryNum;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return this.barCode;
|
||||
}
|
||||
|
||||
public Integer getSalesMode() {
|
||||
return this.salesMode;
|
||||
}
|
||||
|
||||
public Integer getUnitPrice() {
|
||||
return this.unitPrice;
|
||||
}
|
||||
|
||||
public Integer getWeight() {
|
||||
return this.weight;
|
||||
}
|
||||
|
||||
public void setSupermarketDetailId(final Long supermarketDetailId) {
|
||||
this.supermarketDetailId = supermarketDetailId;
|
||||
}
|
||||
|
||||
public void setMaterialId(final Long materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public void setMaterialName(final String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public void setUnitId(final Long unitId) {
|
||||
this.unitId = unitId;
|
||||
}
|
||||
|
||||
public void setUnitName(final String unitName) {
|
||||
this.unitName = unitName;
|
||||
}
|
||||
|
||||
public void setSalePrice(final Integer salePrice) {
|
||||
this.salePrice = salePrice;
|
||||
}
|
||||
|
||||
public void setPrefPrice(final Integer prefPrice) {
|
||||
this.prefPrice = prefPrice;
|
||||
}
|
||||
|
||||
public void setInventoryId(final Long inventoryId) {
|
||||
this.inventoryId = inventoryId;
|
||||
}
|
||||
|
||||
public void setInventoryNum(final BigDecimal inventoryNum) {
|
||||
this.inventoryNum = inventoryNum;
|
||||
}
|
||||
|
||||
public void setBarCode(final String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public void setImgUrl(final String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public void setSalesMode(final Integer salesMode) {
|
||||
this.salesMode = salesMode;
|
||||
}
|
||||
|
||||
public void setUnitPrice(final Integer unitPrice) {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public void setWeight(final Integer weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
|
||||
public String toString() {
|
||||
Long var10000 = this.getSupermarketDetailId();
|
||||
return "AndroidSupermarketProductPageVO(supermarketDetailId=" + var10000 + ", materialId=" + this.getMaterialId() + ", materialName=" + this.getMaterialName() + ", unitId=" + this.getUnitId() + ", unitName=" + this.getUnitName() + ", salePrice=" + this.getSalePrice() + ", prefPrice=" + this.getPrefPrice() + ", inventoryId=" + this.getInventoryId() + ", inventoryNum=" + String.valueOf(this.getInventoryNum()) + ", barCode=" + this.getBarCode() + ", imgUrl=" + this.getImgUrl() + ", salesMode=" + this.getSalesMode() + ", unitPrice=" + this.getUnitPrice() + ", weight=" + this.getWeight() + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.bonus.canteen.core.device.android.supermarket.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@ApiModel
|
||||
public class ProductCategoryListVO {
|
||||
@ApiModelProperty("类别id")
|
||||
private Long categoryId;
|
||||
@ApiModelProperty("类别")
|
||||
private String categoryName;
|
||||
|
||||
public Long getCategoryId() {
|
||||
return this.categoryId;
|
||||
}
|
||||
|
||||
public String getCategoryName() {
|
||||
return this.categoryName;
|
||||
}
|
||||
|
||||
public void setCategoryId(final Long categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public void setCategoryName(final String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
|
||||
public String toString() {
|
||||
Long var10000 = this.getCategoryId();
|
||||
return "ProductCategoryListVO(categoryId=" + var10000 + ", categoryName=" + this.getCategoryName() + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package com.bonus.canteen.core.device.android.supermarket.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@ApiModel
|
||||
public class SupermarketInventoryMaterialPageVO {
|
||||
@ApiModelProperty("商品id")
|
||||
private Long materialId;
|
||||
@ApiModelProperty("商品")
|
||||
private String materialName;
|
||||
@ApiModelProperty("类别id")
|
||||
private Long categoryId;
|
||||
@ApiModelProperty("类别")
|
||||
private String categoryName;
|
||||
@ApiModelProperty("单位id")
|
||||
private Long unitId;
|
||||
@ApiModelProperty("单位")
|
||||
private String unitName;
|
||||
@ApiModelProperty("条码")
|
||||
private String barCode;
|
||||
@ApiModelProperty("库存数")
|
||||
private BigDecimal inventoryNum;
|
||||
|
||||
public Long getMaterialId() {
|
||||
return this.materialId;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return this.materialName;
|
||||
}
|
||||
|
||||
public Long getCategoryId() {
|
||||
return this.categoryId;
|
||||
}
|
||||
|
||||
public String getCategoryName() {
|
||||
return this.categoryName;
|
||||
}
|
||||
|
||||
public Long getUnitId() {
|
||||
return this.unitId;
|
||||
}
|
||||
|
||||
public String getUnitName() {
|
||||
return this.unitName;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return this.barCode;
|
||||
}
|
||||
|
||||
public BigDecimal getInventoryNum() {
|
||||
return this.inventoryNum;
|
||||
}
|
||||
|
||||
public void setMaterialId(final Long materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public void setMaterialName(final String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public void setCategoryId(final Long categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public void setCategoryName(final String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public void setUnitId(final Long unitId) {
|
||||
this.unitId = unitId;
|
||||
}
|
||||
|
||||
public void setUnitName(final String unitName) {
|
||||
this.unitName = unitName;
|
||||
}
|
||||
|
||||
public void setBarCode(final String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public void setInventoryNum(final BigDecimal inventoryNum) {
|
||||
this.inventoryNum = inventoryNum;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Long var10000 = this.getMaterialId();
|
||||
return "SupermarketInventoryMaterialPageVO(materialId=" + var10000 + ", materialName=" + this.getMaterialName() + ", categoryId=" + this.getCategoryId() + ", categoryName=" + this.getCategoryName() + ", unitId=" + this.getUnitId() + ", unitName=" + this.getUnitName() + ", barCode=" + this.getBarCode() + ", inventoryNum=" + String.valueOf(this.getInventoryNum()) + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.bonus.canteen.core.device.android.supermarket.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@ApiModel
|
||||
public class SupermarketWarehouseVO {
|
||||
@ApiModelProperty("仓库id")
|
||||
private Long warehouseId;
|
||||
@ApiModelProperty("仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
public Long getWarehouseId() {
|
||||
return this.warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseName() {
|
||||
return this.warehouseName;
|
||||
}
|
||||
|
||||
public void setWarehouseId(final Long warehouseId) {
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public void setWarehouseName(final String warehouseName) {
|
||||
this.warehouseName = warehouseName;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Long var10000 = this.getWarehouseId();
|
||||
return "SupermarketWarehouseVO(warehouseId=" + var10000 + ", warehouseName=" + this.getWarehouseName() + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -114,9 +114,9 @@ public class DrpServiceApi {
|
|||
@Lazy
|
||||
private DrpMetadataService drpMetadataService;
|
||||
|
||||
// public InventoryModel getInventoryNumByMaterialId(Long materialId, Long warehouseId, Long unitId) {
|
||||
// return this.drpInventoryMapper.getInventoryNumByMaterialId(materialId, warehouseId, unitId);
|
||||
// }
|
||||
public InventoryModel getInventoryNumByMaterialId(Long materialId, Long warehouseId, Long unitId) {
|
||||
return this.drpInventoryMapper.getInventoryNumByMaterialId(materialId, warehouseId, unitId);
|
||||
}
|
||||
|
||||
public String getWarehouseNameById(Long warehouseId) {
|
||||
return this.drpWarehouseMapper.selectNameById(warehouseId);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.canteen.core.drp.mapper;
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bonus.canteen.core.drp.model.DrpInventory;
|
||||
import com.bonus.canteen.core.drp.po.InventoryModel;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
|
@ -25,9 +26,9 @@ public interface DrpInventoryMapper extends BaseMapper<DrpInventory> {
|
|||
// List<AndroidSearchMaterialVO> selectAndroidMaterialList(@Param("content") AndroidSearchMaterialDTO content, @Param("pinyinInitials") String pinyinInitials, @Param("pinyinFull") String pinyinFull, @Param("delFlag") Integer delFlag);
|
||||
//
|
||||
// List<AndroidSearchInventoryMaterialVO> searchInventoryMaterial(@Param("content") AndroidSearchInventoryMaterialDTO content, @Param("pinyinInitials") String pinyinInitials, @Param("pinyinFull") String pinyinFull, @Param("delFlag") Integer delFlag);
|
||||
//
|
||||
// InventoryModel getInventoryNumByMaterialId(@Param("materialId") Long materialId, @Param("warehouseId") Long warehouseId, @Param("unitId") Long unitId);
|
||||
//
|
||||
|
||||
InventoryModel getInventoryNumByMaterialId(@Param("materialId") Long materialId, @Param("warehouseId") Long warehouseId, @Param("unitId") Long unitId);
|
||||
|
||||
void minusInventoryNumById(@Param("inventoryId") Long inventoryId, @Param("fetchNum") BigDecimal fetchNum);
|
||||
|
||||
void plusInventoryNumById(@Param("inventoryId") Long inventoryId, @Param("materialNum") BigDecimal materialNum);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
package com.bonus.canteen.core.drp.po;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@ApiModel
|
||||
public class InventoryModel {
|
||||
@ApiModelProperty("库存id")
|
||||
private Long inventoryId;
|
||||
@ApiModelProperty("库存数")
|
||||
private BigDecimal inventoryNum;
|
||||
|
||||
public Long getInventoryId() {
|
||||
return this.inventoryId;
|
||||
}
|
||||
|
||||
public BigDecimal getInventoryNum() {
|
||||
return this.inventoryNum;
|
||||
}
|
||||
|
||||
public void setInventoryId(final Long inventoryId) {
|
||||
this.inventoryId = inventoryId;
|
||||
}
|
||||
|
||||
public void setInventoryNum(final BigDecimal inventoryNum) {
|
||||
this.inventoryNum = inventoryNum;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Long var10000 = this.getInventoryId();
|
||||
return "InventoryModel(inventoryId=" + var10000 + ", inventoryNum=" + String.valueOf(this.getInventoryNum()) + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
import com.bonus.canteen.core.common.utils.BaseTreeNode;
|
||||
import com.bonus.canteen.core.common.utils.TreeNodeUtil;
|
||||
import com.bonus.canteen.core.customer.utils.DelFlagEnum;
|
||||
import com.bonus.canteen.core.device.android.supermarket.vo.ProductCategoryListVO;
|
||||
import com.bonus.canteen.core.menu.constant.MaterialTypeEnum;
|
||||
import com.bonus.canteen.core.menu.dto.IssueRecipeV2DTO;
|
||||
import com.bonus.canteen.core.menu.dto.MenuRecipeChangeSurplusNum;
|
||||
import com.bonus.canteen.core.menu.entity.*;
|
||||
|
|
@ -310,9 +312,9 @@ public class MenuDishesApi {
|
|||
}
|
||||
}
|
||||
|
||||
// public List<ProductCategoryListVO> listProductCategory() {
|
||||
// return this.menuMaterialCategoryMapper.listProductCategory(MaterialTypeEnum.GOODS.key(), DelFlagEnum.DEL_FALSE.key());
|
||||
// }
|
||||
public List<ProductCategoryListVO> listProductCategory() {
|
||||
return this.menuMaterialCategoryMapper.listProductCategory(MaterialTypeEnum.GOODS.key(), DelFlagEnum.DEL_FALSE.key());
|
||||
}
|
||||
|
||||
public List<MenuLabelAndNutritionVO> getDishesLabelAndNutritionList(List<Long> dishesIdList) {
|
||||
return (ObjectUtil.isEmpty(dishesIdList) ? Lists.newArrayList() :
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bonus.canteen.core.common.utils.BaseTreeNode;
|
||||
import com.bonus.canteen.core.device.android.supermarket.vo.ProductCategoryListVO;
|
||||
import com.bonus.canteen.core.drp.po.CategoryMaterialNumModel;
|
||||
import com.bonus.canteen.core.menu.dto.CategoryTreeListDTO;
|
||||
import com.bonus.canteen.core.menu.entity.MenuMaterialCategory;
|
||||
|
|
@ -41,8 +42,8 @@ public interface MenuMaterialCategoryMapper extends BaseMapper<MenuMaterialCateg
|
|||
@Select({"select category_id from menu_material_category where parent_id = -1 and category_type = #{categoryType} and del_flag = 2"})
|
||||
Long selectIdByType(@Param("categoryType") Integer categoryType);
|
||||
|
||||
// @Select({"select category_id,category_name from menu_material_category where category_type = #{categoryType} and del_flag = #{delFlag}"})
|
||||
// List<ProductCategoryListVO> listProductCategory(@Param("categoryType") Integer categoryType, @Param("delFlag") Integer delFlag);
|
||||
@Select({"select category_id,category_name from menu_material_category where category_type = #{categoryType} and del_flag = #{delFlag}"})
|
||||
List<ProductCategoryListVO> listProductCategory(@Param("categoryType") Integer categoryType, @Param("delFlag") Integer delFlag);
|
||||
|
||||
// List<AndroidCategoryVO> listCategoryByParentId(@Param("content") CategoryTreeListDTO content, @Param("delFlag") Integer delFlag);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.nutrition.common.dto;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.PageDTO;
|
||||
import com.bonus.canteen.core.common.page.PageDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.supermarket.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bonus.canteen.core.device.android.supermarket.dto.AndroidProductPageDTO;
|
||||
import com.bonus.canteen.core.device.android.supermarket.vo.AndroidSupermarketProductPageVO;
|
||||
import com.bonus.canteen.core.supermarket.dto.*;
|
||||
import com.bonus.canteen.core.supermarket.model.SupermarketProduct;
|
||||
import com.bonus.canteen.core.supermarket.po.GoodsBuyLimitModel;
|
||||
|
|
@ -25,11 +27,11 @@ public interface SupermarketProductMapper extends BaseMapper<SupermarketProduct>
|
|||
void saveBatchProduct(@Param("supermarketProductList") List<SupermarketProduct> supermarketProductList, @Param("username") String username);
|
||||
//
|
||||
List<SupermarketUnAddProductListVO> listUnAddProduct(@Param("content") SupermarketUnAddProductListDTO content, @Param("materialType") Integer materialType, @Param("delFlag") Integer delFlag);
|
||||
//
|
||||
// Page<AndroidSupermarketProductPageVO> pageSupermarketProductRelateDrp(Page<AndroidSupermarketProductPageVO> resultPage, @Param("content") AndroidProductPageDTO content, @Param("putawayState") Integer putawayState, @Param("pinyinInitials") String pinyinInitials, @Param("pinyinFull") String pinyinFull);
|
||||
//
|
||||
// List<net.xnzn.core.device.android.supermarket.vo.AndroidSupermarketProductPageVO> pageSupermarketProductRelateDrpV4(@Param("content") net.xnzn.core.device.android.supermarket.dto.AndroidProductPageDTO content, @Param("putawayState") Integer putawayState, @Param("pinyinInitials") String pinyinInitials, @Param("pinyinFull") String pinyinFull);
|
||||
//
|
||||
|
||||
//Page<AndroidSupermarketProductPageVO> pageSupermarketProductRelateDrp(Page<AndroidSupermarketProductPageVO> resultPage, @Param("content") AndroidProductPageDTO content, @Param("putawayState") Integer putawayState, @Param("pinyinInitials") String pinyinInitials, @Param("pinyinFull") String pinyinFull);
|
||||
|
||||
List<AndroidSupermarketProductPageVO> pageSupermarketProductRelateDrpV4(@Param("content") AndroidProductPageDTO content, @Param("putawayState") Integer putawayState, @Param("pinyinInitials") String pinyinInitials, @Param("pinyinFull") String pinyinFull);
|
||||
|
||||
// AndroidSupermarketProductPageVO getProductByBarCode(@Param("content") AndroidProductByBarCodeDTO content, @Param("putawayState") Integer putawayState);
|
||||
|
||||
void minusInventoryByDetailId(@Param("supermarketId") Long supermarketId, @Param("detailId") Long detailId, @Param("saleNum") BigDecimal saleNum);
|
||||
|
|
|
|||
|
|
@ -167,25 +167,27 @@
|
|||
<!-- a.material_id,-->
|
||||
<!-- a.unit_id-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="getInventoryNumByMaterialId" resultType="net.xnzn.core.drp.po.InventoryModel">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <if test="warehouseId != null">-->
|
||||
<!-- inventory_id,-->
|
||||
<!-- material_num inventoryNum-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="warehouseId == null">-->
|
||||
<!-- max( inventory_id) inventory_id,-->
|
||||
<!-- sum(material_num) inventoryNum-->
|
||||
<!-- </if>-->
|
||||
<!-- FROM-->
|
||||
<!-- drp_inventory-->
|
||||
<!-- WHERE-->
|
||||
<!-- material_id = #{materialId}-->
|
||||
<!-- <if test="warehouseId != null">-->
|
||||
<!-- AND warehouse_id = #{warehouseId}-->
|
||||
<!-- </if>-->
|
||||
<!-- AND unit_id = #{unitId}-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="getInventoryNumByMaterialId" resultType="com.bonus.canteen.core.drp.po.InventoryModel">
|
||||
SELECT
|
||||
<if test="warehouseId != null">
|
||||
inventory_id,
|
||||
material_num inventoryNum
|
||||
</if>
|
||||
<if test="warehouseId == null">
|
||||
max( inventory_id) inventory_id,
|
||||
sum(material_num) inventoryNum
|
||||
</if>
|
||||
FROM
|
||||
drp_inventory
|
||||
WHERE
|
||||
material_id = #{materialId}
|
||||
<if test="warehouseId != null">
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
AND unit_id = #{unitId}
|
||||
</select>
|
||||
|
||||
<!-- <select id="selectInventoryByMaterialIdList" resultType="net.xnzn.core.drp.vo.MaterialInventoryVO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- material_id,-->
|
||||
|
|
|
|||
|
|
@ -452,41 +452,43 @@
|
|||
<!-- </if>-->
|
||||
|
||||
<!-- </select>-->
|
||||
<!-- <select id="pageSupermarketProductRelateDrpV4"-->
|
||||
<!-- resultType="net.xnzn.core.device.android.supermarket.vo.AndroidSupermarketProductPageVO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- a.supermarket_detail_id,-->
|
||||
<!-- a.material_id,-->
|
||||
<!-- b.material_name,-->
|
||||
<!-- b.unit_id,-->
|
||||
<!-- c.unit_name,-->
|
||||
<!-- a.sale_price,-->
|
||||
<!-- a.pref_price,-->
|
||||
<!-- a.inventory_num,-->
|
||||
<!-- b.bar_code,-->
|
||||
<!-- b.image_url imgUrl,-->
|
||||
<!-- b.sales_mode-->
|
||||
<!-- FROM-->
|
||||
<!-- supermarket_product a-->
|
||||
<!-- LEFT JOIN menu_material b ON a.material_id = b.material_id-->
|
||||
<!-- LEFT JOIN drp_unit c ON c.unit_id = b.unit_id-->
|
||||
<!-- <where>-->
|
||||
<!-- a.supermarket_id = #{content.supermarketId}-->
|
||||
<!-- AND a.putaway_state = #{putawayState}-->
|
||||
<!-- <if test="content.materialName != null and content.materialName != ''">-->
|
||||
<!-- and ((-->
|
||||
<!-- b.material_name like concat(concat('%', #{content.materialName}), '%')-->
|
||||
<!-- or b.pinyin_initials like concat(concat('%', #{pinyinInitials}), '%')-->
|
||||
<!-- or b.pinyin_full like concat(concat('%', #{pinyinFull}), '%')-->
|
||||
<!-- )-->
|
||||
<!-- or b.bar_code = #{content.materialName})-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="content.categoryId != null">-->
|
||||
<!-- and b.category_id = #{content.categoryId}-->
|
||||
<!-- </if>-->
|
||||
<!-- and b. sales_mode = #{putawayState}-->
|
||||
<!-- </where>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="pageSupermarketProductRelateDrpV4"
|
||||
resultType="com.bonus.canteen.core.device.android.supermarket.vo.AndroidSupermarketProductPageVO">
|
||||
SELECT
|
||||
a.supermarket_detail_id,
|
||||
a.material_id,
|
||||
b.material_name,
|
||||
b.unit_id,
|
||||
c.unit_name,
|
||||
a.sale_price,
|
||||
a.pref_price,
|
||||
a.inventory_num,
|
||||
b.bar_code,
|
||||
b.image_url imgUrl,
|
||||
b.sales_mode
|
||||
FROM
|
||||
supermarket_product a
|
||||
LEFT JOIN menu_material b ON a.material_id = b.material_id
|
||||
LEFT JOIN drp_unit c ON c.unit_id = b.unit_id
|
||||
<where>
|
||||
a.supermarket_id = #{content.supermarketId}
|
||||
AND a.putaway_state = #{putawayState}
|
||||
<if test="content.materialName != null and content.materialName != ''">
|
||||
and ((
|
||||
b.material_name like concat(concat('%', #{content.materialName}), '%')
|
||||
or b.pinyin_initials like concat(concat('%', #{pinyinInitials}), '%')
|
||||
or b.pinyin_full like concat(concat('%', #{pinyinFull}), '%')
|
||||
)
|
||||
or b.bar_code = #{content.materialName})
|
||||
</if>
|
||||
<if test="content.categoryId != null">
|
||||
and b.category_id = #{content.categoryId}
|
||||
</if>
|
||||
and b. sales_mode = #{putawayState}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- <select id="pageInventoryMaterialV4"-->
|
||||
<!-- resultType="net.xnzn.core.device.android.supermarket.vo.SupermarketInventoryMaterialPageVO">-->
|
||||
<!-- SELECT-->
|
||||
|
|
|
|||
Loading…
Reference in New Issue