ccj 2 vuotta sitten
vanhempi
commit
f1a651b717

+ 9 - 11
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CollectionWarehousingRecordServiceImpl.java

@@ -95,17 +95,15 @@ public class CollectionWarehousingRecordServiceImpl extends ServiceImpl<Collecti
         }
         Calendar cal = Calendar.getInstance();
         int yearNum = cal.get(Calendar.YEAR);
-//        int month = cal.get(Calendar.MONTH) + 1;
-//        if(month < 9){
-//            yearNum --;
-//        }
-
-        SimpleDateFormat now = new SimpleDateFormat(yearNum +"-01-01 00:00:00");
-        Calendar c = Calendar.getInstance();
-        c.setTime(new java.util.Date());
-        c.add(Calendar.YEAR, 0);
-        Date y = c.getTime();
-        String year = now.format(y);
+        int monthNum = cal.get(Calendar.MONTH) + 1;
+        int dayNum = cal.get(Calendar.DAY_OF_MONTH);
+        yearNum --;
+//            SimpleDateFormat now = new SimpleDateFormat(yearNum +"-"+monthNum+"-"+dayNum+" 00:00:00");
+//            Calendar c = Calendar.getInstance();
+//            c.setTime(new java.util.Date());
+//            c.add(Calendar.YEAR, -1);
+//            Date y = c.getTime();
+        String year = yearNum +"-"+monthNum+"-"+dayNum+" 00:00:00";
         //公司id
         pageView.put("compId", collectionWarehousingRecord.getCompId());
         pageView.put("year", year);

+ 18 - 22
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/IdentityAuthenticationInfoServiceImpl.java

@@ -448,17 +448,15 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
             pageView.put("currentPage", identityAuthenticationInfo.getCurrentPage());
             Calendar cal = Calendar.getInstance();
             int yearNum = cal.get(Calendar.YEAR);
-//            int month = cal.get(Calendar.MONTH) + 1;
-//            if(month < 9){
-//                yearNum --;
-//            }
-
-            SimpleDateFormat now = new SimpleDateFormat(yearNum +"-01-01 00:00:00");
-            Calendar c = Calendar.getInstance();
-            c.setTime(new java.util.Date());
-            c.add(Calendar.YEAR, 0);
-            Date y = c.getTime();
-            String year = now.format(y);
+            int monthNum = cal.get(Calendar.MONTH) + 1;
+            int dayNum = cal.get(Calendar.DAY_OF_MONTH);
+            yearNum --;
+//            SimpleDateFormat now = new SimpleDateFormat(yearNum +"-"+monthNum+"-"+dayNum+" 00:00:00");
+//            Calendar c = Calendar.getInstance();
+//            c.setTime(new java.util.Date());
+//            c.add(Calendar.YEAR, -1);
+//            Date y = c.getTime();
+            String year = yearNum +"-"+monthNum+"-"+dayNum+" 00:00:00";
             //公司id
             pageView.put("year", year);
             List<IdentityAuthenticationInfo> dataList = this.baseMapper.getIdentityInfoByCondition(pageView);
@@ -528,17 +526,15 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
         }
         Calendar cal = Calendar.getInstance();
         int yearNum = cal.get(Calendar.YEAR);
-//        int month = cal.get(Calendar.MONTH) + 1;
-//        if(month < 9){
-//            yearNum --;
-//        }
-
-        SimpleDateFormat now = new SimpleDateFormat(yearNum +"-01-01 00:00:00");
-        Calendar c = Calendar.getInstance();
-        c.setTime(new java.util.Date());
-        c.add(Calendar.YEAR, 0);
-        Date y = c.getTime();
-        String year = now.format(y);
+        int monthNum = cal.get(Calendar.MONTH) + 1;
+        int dayNum = cal.get(Calendar.DAY_OF_MONTH);
+        yearNum --;
+//            SimpleDateFormat now = new SimpleDateFormat(yearNum +"-"+monthNum+"-"+dayNum+" 00:00:00");
+//            Calendar c = Calendar.getInstance();
+//            c.setTime(new java.util.Date());
+//            c.add(Calendar.YEAR, -1);
+//            Date y = c.getTime();
+        String year = yearNum +"-"+monthNum+"-"+dayNum+" 00:00:00";
         //公司id
         pageView.put("compId", identityAuthenticationInfo.getCompId());
         pageView.put("authenticationStatusKey", "7");