Browse Source

目标达成取当月数据

ningsy 4 years ago
parent
commit
5886c2398e

+ 7 - 0
suishenbang-common/src/main/java/com/dgtly/common/utils/DateUtils.java

@@ -19,6 +19,8 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
 
     public static String YYYY_MM_DD = "yyyy-MM-dd";
 
+    public static String YYYYMM = "yyyyMM";
+
     public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
 
     public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
@@ -53,6 +55,11 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
     }
 
+    public static final String getYearMonthStr()
+    {
+        return dateTimeNow(YYYYMM);
+    }
+
     public static final String dateTimeNow()
     {
         return dateTimeNow(YYYYMMDDHHMMSS);

+ 1 - 0
suishenbang-order/src/main/java/com/dgtly/order/service/impl/OrderSalesGroupServiceImpl.java

@@ -48,6 +48,7 @@ public class OrderSalesGroupServiceImpl implements IOrderSalesGroupService
     public List<OrderSalesGroup> selectOrderSalesGroupList(OrderSalesGroup orderSalesGroup)
     {
 
+        orderSalesGroup.setCalMonth(DateUtils.getYearMonthStr());
         List<OrderSalesGroup> orderSalesGroupList = orderSalesGroupMapper.selectOrderSalesGroupList(orderSalesGroup);
         if(orderSalesGroupList != null && orderSalesGroupList.size() > 0){
             orderSalesGroupList.forEach(salesGroup ->{