Browse Source

催款统计导出BUG修复

anderx 4 years ago
parent
commit
c0b302a8a1

+ 12 - 12
src/main/java/com/goafanti/common/task/UserFollowTask.java

@@ -39,12 +39,12 @@ public class UserFollowTask {
 
     @Scheduled(cron = "0 0 5 1 * ?")
     @RequestMapping(value = "/open/userFollowStatistics", method = RequestMethod.GET)
-    public void 	userFollowStatistics() throws InterruptedException {
+    public void 	userFollowStatistics(Integer m) throws InterruptedException {
         //获取上月1号到本月1号的外出
-        Calendar now=getNowDate();
-        Calendar date=getNowDate();
-        String ym=getYearMonth();
 
+        Calendar now=getNowDate(m);
+        Calendar date=getNowDate(m);
+        String ym=getYearMonth(m);
         date.set(Calendar.MONTH,now.get(Calendar.MONTH)-1);
         List<OutPublicReleaseCount> list =publicReleaseMapper.getTimeUserFollow(date.getTime(),now.getTime());
         for (OutPublicReleaseCount out : list) {
@@ -79,25 +79,25 @@ public class UserFollowTask {
 
     }
 
-    public Calendar getNowDate(){
+    public Calendar getNowDate(Integer m){
         Calendar now=Calendar.getInstance();
-        now.set(2021,10,1);
+        if (m!=null)now.set(2021,m,1);
         now.set(Calendar.HOUR_OF_DAY, 0);
         now.clear(Calendar.MINUTE);
         now.clear(Calendar.SECOND);
         now.clear(Calendar.MILLISECOND);
         return now;
     }
-    public String getYearMonth(){
+    public String getYearMonth(Integer m){
         Calendar now=Calendar.getInstance();
-        now.set(2021,10,1);
+        now.set(2021,m,1);
         int y=now.get(Calendar.YEAR);
-        int m=now.get(Calendar.MONTH);
-        if(m<1){
-            m=12;
+        int mo=now.get(Calendar.MONTH);
+        if(mo<1){
+            mo=12;
             y--;
         }
-        return y+"-"+m;
+        return y+"-"+mo;
     }
 
 

+ 1 - 1
src/main/java/com/goafanti/order/controller/AdminNewOrderDunApiController.java

@@ -153,7 +153,7 @@ public class AdminNewOrderDunApiController extends CertifyApiController {
 		List<OutSelectOrderDun> list=newOrderDunService.selectOrderDun(depId,depName,aid,aName,sort,province,startDate,endDate);
 		NewExcelUtil<OutSelectOrderDun> excelUtil=new NewExcelUtil<>(OutSelectOrderDun.class);
 		StringBuffer sb=new StringBuffer("搜索条件=》");
-		if (depName!=null)sb=sb.append("省份:").append(depName).append(",");
+		if (depName!=null)sb=sb.append("催收部门:").append(depName).append(",");
 		if (aName!=null)sb=sb.append("催款人:").append(aName).append(",");
 		if (sort!=null){
 			if (sort==0)sb=sb.append("排序:").append("按签单金额").append(",");