wuwen hace 4 años
padre
commit
5b87b0f1b8

+ 40 - 0
src/main/java/com/ssj/bean/sys/fx/domain/MerchantBackup.java

@@ -70,8 +70,14 @@ public class MerchantBackup extends BaseEntity {
 	
 	private Integer portNum;
 	
+	private Integer portNumOdd;
+	
 	private Integer libService;
 	
+	private Integer libServiceOdd;
+	
+	private Date changeTime;
+	
 	private Integer libServiceMonth;
 	
 	private Integer platformService;
@@ -100,6 +106,8 @@ public class MerchantBackup extends BaseEntity {
 	
 	private Date activeTime;
 	
+	private Date endActiveTime;
+	
 	private Date computeTime;
     
 	private String backupMonth;
@@ -437,4 +445,36 @@ public class MerchantBackup extends BaseEntity {
 		this.backupMonth = backupMonth;
 	}
 
+	public Integer getPortNumOdd() {
+		return portNumOdd;
+	}
+
+	public void setPortNumOdd(Integer portNumOdd) {
+		this.portNumOdd = portNumOdd;
+	}
+
+	public Integer getLibServiceOdd() {
+		return libServiceOdd;
+	}
+
+	public void setLibServiceOdd(Integer libServiceOdd) {
+		this.libServiceOdd = libServiceOdd;
+	}
+
+	public Date getChangeTime() {
+		return changeTime;
+	}
+
+	public void setChangeTime(Date changeTime) {
+		this.changeTime = changeTime;
+	}
+
+	public Date getEndActiveTime() {
+		return endActiveTime;
+	}
+
+	public void setEndActiveTime(Date endActiveTime) {
+		this.endActiveTime = endActiveTime;
+	}
+
 }

+ 3 - 3
src/main/java/com/ssj/service/sys/fx/service/impl/MerchantBackupServiceImpl.java

@@ -51,21 +51,21 @@ public class MerchantBackupServiceImpl extends BaseServiceImpl<MerchantBackup, S
     
 	@Override
 	public void runMerchantBackup() {
-		logger.info("1号备份保存上个月的商户数据,任务开始...");
+		logger.info("月最后一天备份保存上个月的商户数据,任务开始...");
 		List<MerchantBackup> merchantBackups=new ArrayList<MerchantBackup>();
 		List<Merchant> merchants=merchantDao.findAll();
 		for (Merchant merchant : merchants) {
 			try {
 				MerchantBackup merchantBackup=new MerchantBackup();
 				BeanUtils.copyProperties(merchant, merchantBackup);
-				merchantBackup.setBackupMonth(DateHelper.formatDateByFormat(DateHelper.getLastMonthFirstDay(new Date()), "yyyy-MM"));
+				merchantBackup.setBackupMonth(DateHelper.formatDateByFormat(new Date(), "yyyy-MM"));
 				merchantBackups.add(merchantBackup);
 			} catch (Exception e) {
 				e.printStackTrace();
 			}
 		}
 		this.save(merchantBackups);
-		logger.info("1号备份保存上个月的商户数据,任务结束。.");
+		logger.info("月最后一天备份保存上个月的商户数据,任务结束。.");
 	}
     
     

+ 2 - 1
src/main/java/com/ssj/sys/controller/ImLibUserController.java

@@ -1308,7 +1308,8 @@ public class ImLibUserController extends BaseController {
 	        }
 		}
 		cell.setCellType(Cell.CELL_TYPE_STRING);
-		return cell.getStringCellValue()!=null ? String.valueOf(cell.getStringCellValue()):"";
+		String text=cell.getStringCellValue()!=null ? String.valueOf(cell.getStringCellValue()):"";
+		return text.trim();
 	}
 
 	

+ 0 - 29
src/main/java/com/ssj/task/sz/MerchantBackupTask.java

@@ -1,29 +0,0 @@
-package com.ssj.task.sz;
-
-import org.quartz.DisallowConcurrentExecution;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import com.ssj.framework.core.util.SystemResourceLocator;
-import com.ssj.service.sys.fx.service.MerchantBackupService;
-
-@DisallowConcurrentExecution
-@Component
-public class MerchantBackupTask implements Job{
-
-	private static Logger logger = LoggerFactory.getLogger(MerchantBackupTask.class);
-	
-	@Override
-	public void execute(JobExecutionContext context) throws JobExecutionException {
-		try{
-			MerchantBackupService merchantBackupService = SystemResourceLocator.getBean(MerchantBackupService.class);
-			merchantBackupService.runMerchantBackup();
-		}catch (Exception e) {
-			logger.error("【商户备份】商户数据备份定时任务,异常:"+e.getMessage());
-		}
-	}
-}

+ 9 - 0
src/main/java/com/ssj/task/sz/MerchantSummaryTask.java

@@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 import com.ssj.framework.core.util.SystemResourceLocator;
+import com.ssj.service.sys.fx.service.MerchantBackupService;
 import com.ssj.service.sys.fx.service.MerchantService;
 import com.ssj.service.sys.fx.service.MerchantSignService;
 
@@ -21,6 +22,14 @@ public class MerchantSummaryTask implements Job{
 	@Override
 	public void execute(JobExecutionContext context) throws JobExecutionException {
 		
+		//先进行上一个月的数据备份,再进行下面的结算。
+		try{
+			MerchantBackupService merchantBackupService = SystemResourceLocator.getBean(MerchantBackupService.class);
+			merchantBackupService.runMerchantBackup();
+		}catch (Exception e) {
+			logger.error("【商户备份】月最后一天商户数据备份定时任务,异常:"+e.getMessage());
+		}
+		
 		//12点定时任务,处理签约模式的数据
 		try{
 			MerchantService merchantService = SystemResourceLocator.getBean(MerchantService.class);