Commit de4f05bb authored by suhuiguang's avatar suhuiguang

1.多余定时任务去掉

parent f182ee34
......@@ -160,7 +160,7 @@ public class CylinderDateInfoServiceImpl extends BaseService<CylinderDateInfoDto
return page;
}
@Scheduled(cron = "0 0 2 * * ?") //每天凌晨两点执行
//@Scheduled(cron = "0 0 2 * * ?") //每天凌晨两点执行
public void fixedDelayJob() {
// 每天更新或者添加昨天的数据
Date date = new Date();//取时间
......
......@@ -126,7 +126,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
}
@Scheduled(cron = "${tzs.cylinder.fill.cron}")
//@Scheduled(cron = "${tzs.cylinder.fill.cron}")
public void setTimeSaveCylinderInfoToES(){
Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>();
Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
......
......@@ -215,7 +215,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synFillingUnloadData() {
cylinderFillingUnloadDataServiceImpl.remove(new LambdaQueryWrapper<CylinderFillingUnloadData>());
countByRegion(regionModel -> {
......@@ -241,7 +241,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按区域统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synAreaData() {
cylinderAreaDataServiceImpl.remove(new LambdaQueryWrapper<CylinderAreaData>());
countByRegion(regionModel -> {
......@@ -274,7 +274,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按区域统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "* * 2 * * ?")
//@Scheduled(cron = "* * 2 * * ?")
public void addIntegrityData() {
System.out.println("====================数据完整性开始============================");
cylinderIntegrityDataServiceImpl.remove(new LambdaQueryWrapper<CylinderIntegrityData>());
......@@ -338,7 +338,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 企业总量按区域统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void getCylinderUnitInfo() {
cylinderUnitDataServiceImpl.remove(new LambdaQueryWrapper<CylinderUnitData>());
countByRegion(regionModel -> {
......@@ -372,7 +372,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 气瓶总量按区域统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void getCylinderInfo() {
cylinderInfoDataServiceImpl.remove(new LambdaQueryWrapper<>());
countByRegion(regionModel -> {
......@@ -405,7 +405,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitCylinderInfoData() {
cylinderInfoDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderInfoDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -438,7 +438,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 充装量按单位和月统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitCylinderFillingData() {
cylinderFillingDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderFillingDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -481,7 +481,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitCylinderTagsData() {
cylinderTagsDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderTagsDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -512,7 +512,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitIntegrityData() {
cylinderIntegrityDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderIntegrityDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -571,7 +571,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 充装详情按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitFillingCheckData() {
// cylinderFillingCheckDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderFillingCheckDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -670,7 +670,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 充装量、卸液量按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synFillingUnloadUnitData() {
cylinderFillingUnloadDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderFillingUnloadDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -692,7 +692,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
});
}
@Scheduled(cron = "${tzs.cylinder.info.cron}")
//@Scheduled(cron = "${tzs.cylinder.info.cron}")
public void setTimeSaveCylinderInfoToES(){
Page<CylinderInfoDto> cylinderInfoPage = new Page<>();
Page<CylinderInfoDto> cyinderInfoList = cylinderInfoMapper.getCyinderInfoList(cylinderInfoPage);
......
......@@ -18,6 +18,7 @@ import org.apache.logging.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.component.emq.EmqKeeper;
......@@ -69,7 +70,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
@Autowired
private TzsAuthServiceImpl tzsAuthServiceImpl;
@Scheduled(fixedDelay=ONE_Minute)
//@Scheduled(fixedDelay=ONE_Minute)
public void fixedDelayJob(){
// 设置token
tzsAuthServiceImpl.setRequestContext();
......
......@@ -19,7 +19,7 @@ public class CylinderSchedulerJob {
/**
* 每天9点-日报生成
*/
@Scheduled(cron = "${cylinder-early-warning-cron:0 0 9 * * ?}")
//@Scheduled(cron = "${cylinder-early-warning-cron:0 0 9 * * ?}")
public void dayReport() {
scheduleService.calEarlyWarningLevel();
}
......
......@@ -160,7 +160,7 @@ public class CylinderDateInfoServiceImpl extends BaseService<CylinderDateInfoDto
return page;
}
@Scheduled(cron = "0 0 2 * * ?") //每天凌晨两点执行
//@Scheduled(cron = "0 0 2 * * ?") //每天凌晨两点执行
public void fixedDelayJob() {
// 每天更新或者添加昨天的数据
Date date = new Date();//取时间
......
......@@ -126,7 +126,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
}
@Scheduled(cron = "${tzs.cylinder.fill.cron}")
//@Scheduled(cron = "${tzs.cylinder.fill.cron}")
public void setTimeSaveCylinderInfoToES(){
Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>();
Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
......
......@@ -215,7 +215,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synFillingUnloadData() {
cylinderFillingUnloadDataServiceImpl.remove(new LambdaQueryWrapper<CylinderFillingUnloadData>());
countByRegion(regionModel -> {
......@@ -241,7 +241,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按区域统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synAreaData() {
cylinderAreaDataServiceImpl.remove(new LambdaQueryWrapper<CylinderAreaData>());
countByRegion(regionModel -> {
......@@ -274,7 +274,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按区域统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "* * 2 * * ?")
//@Scheduled(cron = "* * 2 * * ?")
public void addIntegrityData() {
System.out.println("====================数据完整性开始============================");
cylinderIntegrityDataServiceImpl.remove(new LambdaQueryWrapper<CylinderIntegrityData>());
......@@ -338,7 +338,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 企业总量按区域统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void getCylinderUnitInfo() {
cylinderUnitDataServiceImpl.remove(new LambdaQueryWrapper<CylinderUnitData>());
countByRegion(regionModel -> {
......@@ -372,7 +372,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 气瓶总量按区域统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void getCylinderInfo() {
cylinderInfoDataServiceImpl.remove(new LambdaQueryWrapper<>());
countByRegion(regionModel -> {
......@@ -405,7 +405,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitCylinderInfoData() {
cylinderInfoDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderInfoDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -438,7 +438,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 充装量按单位和月统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitCylinderFillingData() {
cylinderFillingDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderFillingDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -481,7 +481,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitCylinderTagsData() {
cylinderTagsDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderTagsDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -512,7 +512,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitIntegrityData() {
cylinderIntegrityDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderIntegrityDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -571,7 +571,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 充装详情按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synUnitFillingCheckData() {
// cylinderFillingCheckDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderFillingCheckDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -670,7 +670,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* 充装量、卸液量按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 0 2 * * ?")
public void synFillingUnloadUnitData() {
cylinderFillingUnloadDataUnitServiceImpl.remove(new LambdaQueryWrapper<CylinderFillingUnloadDataUnit>());
countByUnit(cylinderUnit -> {
......@@ -692,7 +692,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
});
}
@Scheduled(cron = "${tzs.cylinder.info.cron}")
// @Scheduled(cron = "${tzs.cylinder.info.cron}")
public void setTimeSaveCylinderInfoToES(){
Page<CylinderInfoDto> cylinderInfoPage = new Page<>();
Page<CylinderInfoDto> cyinderInfoList = cylinderInfoMapper.getCyinderInfoList(cylinderInfoPage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment