fix:修复问题

main
HuangHuiKang 5 days ago
parent 9d46335391
commit 8ec6a2be06

@ -64,20 +64,37 @@ public interface ErpProductMapper extends BaseMapperX<ErpProductDO> {
.orderByDesc(ErpProductDO::getId);
if (Boolean.TRUE.equals(reqVO.getStockNotZero())) {
StringBuilder stockExistsSql = new StringBuilder("SELECT 1 FROM erp_stock s WHERE s.deleted = b'0' AND s.product_id = erp_product.id AND s.count != 0");
if (reqVO.getWarehouseId() != null) {
stockExistsSql.append(" AND s.warehouse_id = ").append(reqVO.getWarehouseId());
}
if (reqVO.getAreaId() != null) {
stockExistsSql.append(" AND s.area_id = ").append(reqVO.getAreaId());
}
queryWrapper.exists(stockExistsSql.toString());
queryWrapper.exists(Integer.valueOf(1).equals(reqVO.getCategoryType())
? buildPalletProductCountExistsSql(reqVO)
: buildStockCountExistsSql(reqVO));
}
return selectPage(reqVO,queryWrapper);
}
default String buildStockCountExistsSql(ErpProductPageReqVO reqVO) {
StringBuilder stockExistsSql = new StringBuilder("SELECT 1 FROM erp_stock s WHERE s.deleted = b'0' AND s.product_id = erp_product.id AND s.count != 0");
if (reqVO.getWarehouseId() != null) {
stockExistsSql.append(" AND s.warehouse_id = ").append(reqVO.getWarehouseId());
}
if (reqVO.getAreaId() != null) {
stockExistsSql.append(" AND s.area_id = ").append(reqVO.getAreaId());
}
return stockExistsSql.toString();
}
default String buildPalletProductCountExistsSql(ErpProductPageReqVO reqVO) {
StringBuilder palletExistsSql = new StringBuilder("SELECT 1 FROM erp_pallet p WHERE p.deleted = b'0' AND p.product_id = erp_product.id AND p.product_count != 0");
if (reqVO.getWarehouseId() != null) {
palletExistsSql.append(" AND p.warehouse_id = ").append(reqVO.getWarehouseId());
}
if (reqVO.getAreaId() != null) {
palletExistsSql.append(" AND p.area_id = ").append(reqVO.getAreaId());
}
return palletExistsSql.toString();
}
default List<Long> selectCategoryIdsByType(Integer categoryType) {
if (categoryType == null) {
return null;

@ -68,12 +68,12 @@ public class CrmCustomerRespVO {
@DictFormat(DictTypeConstants.BOOLEAN_STRING)
private Boolean dealStatus;
@Schema(description = "手机", example = "25682")
@ExcelProperty("手机")
@Schema(description = "联系人手机", example = "25682")
@ExcelProperty("联系人手机")
private String mobile;
@Schema(description = "电话", example = "25682")
@ExcelProperty("电话")
@Schema(description = "联系人电话", example = "25682")
@ExcelProperty("联系人电话")
private String telephone;
@Schema(description = "QQ", example = "25682")
@ -84,8 +84,8 @@ public class CrmCustomerRespVO {
@ExcelProperty("wechat")
private String wechat;
@Schema(description = "email", example = "25682")
@ExcelProperty("email")
@Schema(description = "联系人邮箱", example = "25682")
@ExcelProperty("联系人邮箱")
private String email;
@Schema(description = "地区编号", example = "1024")

Loading…
Cancel
Save