## 产品销售统计详情;
This commit is contained in:
parent
b943357b84
commit
650e01b48a
|
@ -705,8 +705,8 @@ public class MemberReportController extends BaseController {
|
|||
@GetMapping("/product-shipping")
|
||||
public TableDataInfo productShipping(ProductShippingParam param) {
|
||||
startPage();
|
||||
List<ProductShippingVO> memberReportList = iMemberReportService.getProductOrderInfo(param);
|
||||
return getDataTable(memberReportList);
|
||||
List<ProductShippingVO> productShippingList = iMemberReportService.listProductShipping(param);
|
||||
return getDataTable(productShippingList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -715,59 +715,42 @@ public class MemberReportController extends BaseController {
|
|||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/product-shipping-export")
|
||||
public void productShippingExport(HttpServletResponse response, ProductShippingParam param) {
|
||||
List<ProductShippingVO> memberReportList = iMemberReportService.getProductOrderInfo(param);
|
||||
List<ProductShippingVO> productShippingList = iMemberReportService.listProductShipping(param);
|
||||
ExcelUtil<ProductShippingVO> util = new ExcelUtil<>(ProductShippingVO.class);
|
||||
util.exportExcel(response, memberReportList, "出货明细汇总导出");
|
||||
util.exportExcel(response, productShippingList, "出货明细汇总导出");
|
||||
}
|
||||
|
||||
/**
|
||||
* 出货明细汇总统计详情
|
||||
*
|
||||
* @param productName
|
||||
* @param pkProduct
|
||||
* @return
|
||||
* 产品销售统计详情
|
||||
*/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS_INFO_LIST, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/product-shipping-details-info-list")
|
||||
public TableDataInfo productShippingDetailsList(String productName, Integer pkProduct, Integer pkClassify, Integer pkAwards, Integer orderType, Date startTime, Date endTime) {
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/product-shipping-details")
|
||||
public TableDataInfo productShippingDetails(ProductShippingParam param) {
|
||||
startPage();
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
List<Integer> orderTypeList = new ArrayList<>();
|
||||
orderTypeList.add(orderType);
|
||||
if (endTime != null) {
|
||||
endTime = DateUtils.getEndTime(endTime);
|
||||
List<ProductShippingDetailsVO> productOrderInfoVoList = iMemberReportService.listProductShippingDetail(param);
|
||||
if (CollectionUtil.isNotEmpty(productOrderInfoVoList)) {
|
||||
for (ProductShippingDetailsVO productShippingDetailsVO : productOrderInfoVoList) {
|
||||
productShippingDetailsVO.setSpecialAreaVal(ESpecialArea.getLabelByValue(productShippingDetailsVO.getSpecialArea()));
|
||||
productShippingDetailsVO.setIsMakerGiftVal(EWaresType.getLabelByValue(productShippingDetailsVO.getIsMakerGift()));
|
||||
}
|
||||
List<ProductShippingDetailsInfoVo> productOrderInfoVoList = iMemberReportService.productShippingDetailsList(pkProduct, productName, pkClassify, pkAwards, orderTypeList, startTime, endTime, pkCountry);
|
||||
for (ProductShippingDetailsInfoVo productShippingDetailsInfoVo : productOrderInfoVoList) {
|
||||
productShippingDetailsInfoVo.setAwardsPrice(productShippingDetailsInfoVo.getPrice());
|
||||
productShippingDetailsInfoVo.setPriceTotal(productShippingDetailsInfoVo.getPrice().multiply(BigDecimal.valueOf(productShippingDetailsInfoVo.getQuantity())));
|
||||
}
|
||||
return getDataTable(productOrderInfoVoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出货明细汇总统计详情导出
|
||||
*
|
||||
* @param
|
||||
* @param
|
||||
* @return
|
||||
* 产品销售统计详情导出
|
||||
*/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS_INFO_LIST, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/product-shipping-details-info-list-export")
|
||||
public void productShippingDetailsListExport(ProductShippingDetailsParam productShippingDetailsParam, HttpServletResponse response) {
|
||||
startPage();
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
List<Integer> orderTypeList = new ArrayList<>();
|
||||
orderTypeList.add(productShippingDetailsParam.getOrderType());
|
||||
if (productShippingDetailsParam.getEndTime() != null) {
|
||||
productShippingDetailsParam.setEndTime(productShippingDetailsParam.getEndTime());
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/product-shipping-details-export")
|
||||
public void productShippingDetailsExport(HttpServletResponse response, ProductShippingParam param) {
|
||||
List<ProductShippingDetailsVO> productOrderInfoVoList = iMemberReportService.listProductShippingDetail(param);
|
||||
if (CollectionUtil.isNotEmpty(productOrderInfoVoList)) {
|
||||
for (ProductShippingDetailsVO productShippingDetailsVO : productOrderInfoVoList) {
|
||||
productShippingDetailsVO.setSpecialAreaVal(ESpecialArea.getLabelByValue(productShippingDetailsVO.getSpecialArea()));
|
||||
productShippingDetailsVO.setIsMakerGiftVal(EWaresType.getLabelByValue(productShippingDetailsVO.getIsMakerGift()));
|
||||
}
|
||||
List<ProductShippingDetailsInfoVo> productOrderInfoVoList = iMemberReportService.productShippingDetailsList(productShippingDetailsParam.getPkProduct(), productShippingDetailsParam.getProductName(), productShippingDetailsParam.getPkClassify(), productShippingDetailsParam.getPkAwards(), orderTypeList, productShippingDetailsParam.getStartTime(), productShippingDetailsParam.getEndTime(), pkCountry);
|
||||
for (ProductShippingDetailsInfoVo productShippingDetailsInfoVo : productOrderInfoVoList) {
|
||||
productShippingDetailsInfoVo.setAwardsPrice(productShippingDetailsInfoVo.getPrice());
|
||||
productShippingDetailsInfoVo.setPriceTotal(productShippingDetailsInfoVo.getPrice().multiply(BigDecimal.valueOf(productShippingDetailsInfoVo.getQuantity())));
|
||||
}
|
||||
ExcelUtil<ProductShippingDetailsInfoVo> util = new ExcelUtil<>(ProductShippingDetailsInfoVo.class);
|
||||
ExcelUtil<ProductShippingDetailsVO> util = new ExcelUtil<>(ProductShippingDetailsVO.class);
|
||||
util.exportExcel(response, productOrderInfoVoList, "出货明细汇总统计详情");
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,12 @@ public interface MemberReportMapper {
|
|||
/**
|
||||
* 产品销售统计列表
|
||||
*/
|
||||
List<ProductShippingVO> getProductOrderInfo(@Param("param") ProductShippingParam param);
|
||||
List<ProductShippingVO> listProductShipping(@Param("param") ProductShippingParam param);
|
||||
|
||||
/**
|
||||
* 出货明细汇总统计详情
|
||||
*/
|
||||
List<ProductShippingDetailsVO> listProductShippingDetail(@Param("param)") ProductShippingParam param);
|
||||
|
||||
/**
|
||||
* 报单汇总
|
||||
|
@ -142,14 +147,6 @@ public interface MemberReportMapper {
|
|||
*/
|
||||
List<ReportSummaryVo> reportSummaryList(ReportSummaryVo reportSummaryVo);
|
||||
|
||||
/**
|
||||
* 出货明细汇总统计详情
|
||||
*
|
||||
* @param pkProduct
|
||||
* @param productName
|
||||
* @return
|
||||
*/
|
||||
List<ProductShippingDetailsInfoVo> productShippingDetailsList(@Param("pkProduct") Integer pkProduct, @Param("productName") String productName, @Param("pkClassify") Integer pkClassify, @Param("pkAwards") Integer pkAwards, @Param("orderTypeList") List<Integer> orderTypeList, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("pkCountry") Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 产品明细查询
|
||||
|
|
|
@ -104,7 +104,12 @@ public interface IMemberReportService {
|
|||
/**
|
||||
* 产品销售统计列表
|
||||
*/
|
||||
List<ProductShippingVO> getProductOrderInfo(ProductShippingParam param);
|
||||
List<ProductShippingVO> listProductShipping(ProductShippingParam param);
|
||||
|
||||
/**
|
||||
* 产品销售统计详情列表
|
||||
*/
|
||||
List<ProductShippingDetailsVO> listProductShippingDetail(ProductShippingParam param);
|
||||
|
||||
/**
|
||||
* 报单汇总
|
||||
|
@ -114,11 +119,6 @@ public interface IMemberReportService {
|
|||
List<ReportSummaryVo> reportSummaryList(ReportSummaryVo reportSummaryVo);
|
||||
|
||||
|
||||
/**
|
||||
* 出货明细汇总统计详情
|
||||
*/
|
||||
List<ProductShippingDetailsInfoVo> productShippingDetailsList(Integer pkProduct, String productName, Integer pkClassify, Integer pkAwards, List<Integer> orderTypeList, Date startTime, Date endTime, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 产品明细查询
|
||||
*
|
||||
|
|
|
@ -110,8 +110,13 @@ public class IMemberReportServiceImpl implements IMemberReportService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ProductShippingVO> getProductOrderInfo(ProductShippingParam param) {
|
||||
return memberReportMapper.getProductOrderInfo(param);
|
||||
public List<ProductShippingVO> listProductShipping(ProductShippingParam param) {
|
||||
return memberReportMapper.listProductShipping(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductShippingDetailsVO> listProductShippingDetail(ProductShippingParam param) {
|
||||
return memberReportMapper.listProductShippingDetail(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -119,10 +124,6 @@ public class IMemberReportServiceImpl implements IMemberReportService {
|
|||
return memberReportMapper.reportSummaryList(reportSummaryVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductShippingDetailsInfoVo> productShippingDetailsList(Integer pkProduct, String productName, Integer pkClassify, Integer pkAwards, List<Integer> orderTypeList, Date startTime, Date endTime, Integer pkCountry) {
|
||||
return memberReportMapper.productShippingDetailsList(pkProduct, productName, pkClassify, pkAwards, orderTypeList, startTime, endTime, pkCountry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductDetailQueryVo> productDetailQueryList(ProductDetailQueryParam productDetailQueryParam) {
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
package com.hzs.report.member.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/8/31 17:08
|
||||
* @Classname: ProductShippingDetailVo
|
||||
* @PackageName: com.hzs.report.member.vo
|
||||
*/
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.report.member.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-08-31 17:08
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ProductShippingDetailVo {
|
||||
|
||||
private String productCode;
|
||||
|
||||
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
package com.hzs.report.member.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/9/20 14:38
|
||||
* @Classname: ProductShippingDetailsInfoVo
|
||||
* @PackageName: com.hzs.report.member.vo
|
||||
*/
|
||||
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.report.member.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-09-20 14:38
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ProductShippingDetailsInfoVo {
|
||||
|
||||
/**
|
||||
* 所属产品
|
||||
*/
|
||||
private Integer pkProduct;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@Excel(name = "产品编号")
|
||||
private String productCode;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
@Excel(name = "产品分类")
|
||||
private String classifyName;
|
||||
|
||||
|
||||
/**
|
||||
* 产品价格
|
||||
*/
|
||||
@Excel(name = "产品价格")
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 真实奖衔
|
||||
*/
|
||||
private Integer pkAwards;
|
||||
/**
|
||||
* 真实奖衔
|
||||
*/
|
||||
@Excel(name = "真实奖衔")
|
||||
private String awardsName;
|
||||
|
||||
/**
|
||||
* 奖衔价格
|
||||
*/
|
||||
@Excel(name = "奖衔价格")
|
||||
private BigDecimal awardsPrice;
|
||||
/**
|
||||
* 产品数量
|
||||
*/
|
||||
@Excel(name = "数量")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 合计价格
|
||||
*/
|
||||
@Excel(name = "合计价格")
|
||||
private BigDecimal priceTotal;
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.hzs.report.member.vo;
|
||||
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ProductShippingDetailsVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 仓储编号
|
||||
*/
|
||||
@Excel(name = "仓储编号")
|
||||
private String wmsCode;
|
||||
|
||||
/**
|
||||
* 所属专区
|
||||
*/
|
||||
private Integer specialArea;
|
||||
@Excel(name = "所属专区")
|
||||
private String specialAreaVal;
|
||||
|
||||
/**
|
||||
* 商品类型
|
||||
*/
|
||||
private Integer isMakerGift;
|
||||
@Excel(name = "商品类型")
|
||||
private String isMakerGiftVal;
|
||||
|
||||
/**
|
||||
* 销量
|
||||
*/
|
||||
@Excel(name = "销量")
|
||||
private Integer quantity;
|
||||
|
||||
}
|
|
@ -388,7 +388,7 @@
|
|||
</select>
|
||||
|
||||
<!-- 产品销售统计列表 -->
|
||||
<select id="getProductOrderInfo" resultType="com.hzs.report.member.vo.ProductShippingVO">
|
||||
<select id="listProductShipping" resultType="com.hzs.report.member.vo.ProductShippingVO">
|
||||
select bp.wms_code,
|
||||
nvl(sum(tmp.quantity), 0) quantity,
|
||||
to_char(wm_concat(bp.product_name)) product_name,
|
||||
|
@ -419,12 +419,49 @@
|
|||
and bp.product_code = #{param.productCode}
|
||||
</if>
|
||||
<if test="param.productName != null and param.productName !=''">
|
||||
and bp.productName like '%' || #{param.productName} ||'%'
|
||||
and bp.product_name like '%' || #{param.productName} ||'%'
|
||||
</if>
|
||||
group by bp.wms_code
|
||||
order by quantity desc
|
||||
</select>
|
||||
|
||||
<!-- 产品销售统计明细列表 -->
|
||||
<select id="listProductShippingDetail" resultType="com.hzs.report.member.vo.ProductShippingDetailsVO">
|
||||
select #{param.wmsCode} wmsCode,
|
||||
soi.pk_product,
|
||||
so.order_type,
|
||||
soi.is_maker_gift,
|
||||
sum(soi.quantity) quantity
|
||||
from sa_order so
|
||||
left join sa_order_items soi
|
||||
on soi.pk_order = so.pk_id
|
||||
and soi.del_flag = 0
|
||||
where so.del_flag = 0
|
||||
and so.order_status = 1
|
||||
<if test="param.startTime != null">
|
||||
and so.pay_time >= to_date(#{param.startTime}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
and to_date(#{param.endTime} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss') >= so.pay_time
|
||||
</if>
|
||||
and soi.pk_product in
|
||||
(select bp.pk_id
|
||||
from bd_product bp
|
||||
where bp.del_flag = 0
|
||||
<if test="param.wmsCode != null and param.wmsCode !=''">
|
||||
and bp.wms_code = #{param.wmsCode}
|
||||
</if>
|
||||
<if test="param.productCode != null and param.productCode !=''">
|
||||
and bp.product_code = #{param.productCode}
|
||||
</if>
|
||||
<if test="param.productName != null and param.productName !=''">
|
||||
and bp.product_name like '%' || #{param.productName} ||'%'
|
||||
</if>
|
||||
)
|
||||
group by soi.pk_product, so.order_type, soi.IS_MAKER_GIFT
|
||||
order by so.order_type, soi.IS_MAKER_GIFT
|
||||
</select>
|
||||
|
||||
<select id="reportSummaryList" resultType="com.hzs.report.member.vo.ReportSummaryVo">
|
||||
select cm.MEMBER_CODE memberCode,cm.MEMBER_NAME memberName,bv.VERTEX_NAME vertexName,mt.TEAM_NAME teamName,
|
||||
cm.REGISTER_AUTHORITY,cm.REGISTER_AUTHORITY registerAuthority,a.orderAmount consumeMoney ,a.orderAchieve consumeAchieve
|
||||
|
@ -465,46 +502,6 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="productShippingDetailsList" resultType="com.hzs.report.member.vo.ProductShippingDetailsInfoVo">
|
||||
select bp.PRODUCT_CODE productCode,bp.PRODUCT_NAME productName,bc.NAME classifyName,oi.PK_AWARDS pkAwards,oi.QUANTITY quantity,
|
||||
oi.PRICE price,bw.AWARDS_NAME awardsName
|
||||
from sa_order_items oi
|
||||
left join SA_ORDER so on so.PK_ID = oi.PK_ORDER
|
||||
left join BD_PRODUCT bp on bp.pk_id = oi.PK_PRODUCT
|
||||
left join bd_classify bc on bc.PK_ID = bp.PK_CLASSIFY
|
||||
left join bd_awards bw on bw.pk_id = oi.PK_AWARDS
|
||||
where 1 = 1
|
||||
and oi.del_flag = 0
|
||||
and so.del_flag = 0
|
||||
and so.ORDER_STATUS = 1
|
||||
<if test="pkCountry != null">
|
||||
and so.PK_COUNTRY=#{pkCountry}
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
and to_char(so.PAY_TIME, 'yyyy-mm-dd hh24:mi:ss') >= to_char(#{startTime}, 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and to_char(so.PAY_TIME, 'yyyy-mm-dd hh24:mi:ss') <= to_char(#{endTime}, 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
<if test="pkProduct != null">
|
||||
and oi.PK_PRODUCT = #{pkProduct}
|
||||
</if>
|
||||
<if test="pkClassify != null">
|
||||
and bc.pk_id = #{pkClassify}
|
||||
</if>
|
||||
<if test="pkAwards != null">
|
||||
and bw.pk_id = #{pkAwards}
|
||||
</if>
|
||||
<if test="orderTypeList != null and orderTypeList.size > 0">
|
||||
and so.ORDER_TYPE in
|
||||
<foreach collection="orderTypeList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="productName != null and productName != ''">
|
||||
and bp.PRODUCT_NAME like #{productName} || '%'
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="productDetailQueryList" resultType="com.hzs.report.member.vo.ProductDetailQueryVo">
|
||||
select
|
||||
|
|
|
@ -125,9 +125,7 @@ public class BdWaresController extends BaseController {
|
|||
}
|
||||
List<WaresProductDetailVo> waresDetailList = waresDetailService.selectByList(waresVo.getPkWares());
|
||||
waresVo.setWaresDetailList(waresDetailList);
|
||||
if (waresVo.getIsMakerGift() != null) {
|
||||
waresVo.setIsMakerGiftVal(EWaresType.getEnumByValue(waresVo.getIsMakerGift()).getLabel());
|
||||
}
|
||||
waresVo.setIsMakerGiftVal(EWaresType.getLabelByValue(waresVo.getIsMakerGift()));
|
||||
});
|
||||
}
|
||||
return getDataTable(resultList);
|
||||
|
@ -175,9 +173,7 @@ public class BdWaresController extends BaseController {
|
|||
waresVo.setProductNames(productNames.toString());
|
||||
waresVo.setProductCodes(productCodes.toString());
|
||||
waresVo.setProductQuantitys(productQuantitys.toString());
|
||||
if (waresVo.getIsMakerGift() != null) {
|
||||
waresVo.setIsMakerGiftVal(EWaresType.getEnumByValue(waresVo.getIsMakerGift()).getLabel());
|
||||
}
|
||||
waresVo.setIsMakerGiftVal(EWaresType.getLabelByValue(waresVo.getIsMakerGift()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1181,6 +1177,7 @@ public class BdWaresController extends BaseController {
|
|||
String waresCode = CreateNormsCodeUtils.createWaresCode(waresService.getLastWaresCode());
|
||||
return AjaxResult.success(waresCode);
|
||||
}
|
||||
|
||||
@GetMapping("/getMaxSortNum")
|
||||
public AjaxResult getMaxSortNum() {
|
||||
return AjaxResult.success("请求成功!", waresService.getMaxSortNum());
|
||||
|
|
|
@ -401,7 +401,7 @@ public enum EOperationBusiness {
|
|||
|
||||
PRODUCT_SHIPPING("产品销售统计"),
|
||||
|
||||
PRODUCT_SHIPPING_DETAILS_INFO_LIST("出货明细汇总统计详情"),
|
||||
PRODUCT_SHIPPING_DETAILS("产品销售统计详情"),
|
||||
|
||||
REPORT_SUMMARY_LIST("报单汇总"),
|
||||
PLACE_PEG("安置反查"),
|
||||
|
|
|
@ -32,18 +32,16 @@ public enum EWaresType {
|
|||
*/
|
||||
private final String key;
|
||||
|
||||
/**
|
||||
* 根据枚举值获取枚举
|
||||
*
|
||||
* @param value 枚举值
|
||||
* @return
|
||||
*/
|
||||
public static EWaresType getEnumByValue(int value) {
|
||||
for (EWaresType eApproveStatus : EWaresType.values()) {
|
||||
if (eApproveStatus.getValue() == value) {
|
||||
return eApproveStatus;
|
||||
public static String getLabelByValue(Integer value) {
|
||||
if (null != value) {
|
||||
return "";
|
||||
}
|
||||
for (EWaresType enums : EWaresType.values()) {
|
||||
if (enums.getValue() == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue