1.国网上送相关功能上送

This commit is contained in:
cdf
2024-04-03 11:30:06 +08:00
parent e0d508c7d8
commit a79e468d7d
12 changed files with 67 additions and 15 deletions

View File

@@ -15,6 +15,7 @@ import org.springframework.stereotype.Component;
*/
@Component
@RequiredArgsConstructor
@Deprecated
public class PqTypicalSourceTaskMRunner implements TimerTaskRunner {
private final PqTypicalSourceFeignClient pqTypicalSourceFeignClient;
@@ -22,6 +23,8 @@ public class PqTypicalSourceTaskMRunner implements TimerTaskRunner {
@Override
public void action(String date) {
//月
UploadParam param=new UploadParam();
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_MONTH_PATTERN));

View File

@@ -29,5 +29,19 @@ public class PqTypicalSourceTaskRunner implements TimerTaskRunner {
if(code.equals("A0002")){
throw new BusinessException("失败");
}
//月
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_MONTH_PATTERN));
String codeM = pqTypicalSourceFeignClient.send(param).getCode();
if(codeM.equals("A0002")){
throw new BusinessException("失败");
}
//年
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_YEAR_PATTERN));
String code2 = pqTypicalSourceFeignClient.send(param).getCode();
if(code2.equals("A0002")){
throw new BusinessException("失败");
}
}
}

View File

@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
*/
@Component
@RequiredArgsConstructor
@Deprecated
public class UploadGwTaskEvaluationMRunner implements TimerTaskRunner {
private final UploadGwDataFeignClient uploadGwDataFeignClient;

View File

@@ -30,5 +30,19 @@ public class UploadGwTaskEvaluationRunner implements TimerTaskRunner {
if(code.equals("A0002")){
throw new BusinessException("失败");
}
//月
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_MONTH_PATTERN));
String codeM = uploadGwDataFeignClient.uploadEvaluationData(param).getCode();
if(codeM.equals("A0002")){
throw new BusinessException("失败");
}
//年
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_YEAR_PATTERN));
String code2 = uploadGwDataFeignClient.uploadEvaluationData(param).getCode();
if(code2.equals("A0002")){
throw new BusinessException("失败");
}
}
}

View File

@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
*/
@Component
@RequiredArgsConstructor
@Deprecated
public class UploadGwTaskMRunner implements TimerTaskRunner {
private final UploadGwDataFeignClient uploadGwDataFeignClient;

View File

@@ -30,5 +30,17 @@ public class UploadGwTaskRunner implements TimerTaskRunner {
if(code.equals("A0002")){
throw new BusinessException("失败");
}
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_MONTH_PATTERN));
String codeM = uploadGwDataFeignClient.uploadPointStatisticalData(param).getCode();
if(codeM.equals("A0002")){
throw new BusinessException("失败");
}
//年
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_YEAR_PATTERN));
String codeY = uploadGwDataFeignClient.uploadPointStatisticalData(param).getCode();
if(codeY.equals("A0002")){
throw new BusinessException("失败");
}
}
}

View File

@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
*/
@Component
@RequiredArgsConstructor
@Deprecated
public class UploadGwTaskSubstationMRunner implements TimerTaskRunner {
private final UploadGwDataFeignClient uploadGwDataFeignClient;

View File

@@ -25,10 +25,22 @@ public class UploadGwTaskSubstationRunner implements TimerTaskRunner {
@Override
public void action(String date) {
UploadParam param = new UploadParam();
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
/*param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_DATE_PATTERN));
String code = uploadGwDataFeignClient.uploadSubstationStatisticalData(param).getCode();
if(code.equals("A0002")){
throw new BusinessException("失败");
}
*/
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_MONTH_PATTERN));
String codeM = uploadGwDataFeignClient.uploadSubstationStatisticalData(param).getCode();
if(codeM.equals("A0002")){
throw new BusinessException("失败");
}
//年
param.setTime(DateUtil.yesterday().toString(DatePattern.NORM_YEAR_PATTERN));
String code2 = uploadGwDataFeignClient.uploadSubstationStatisticalData(param).getCode();
if(code2.equals("A0002")){
throw new BusinessException("失败");
}
}
}