提交 8f961425 作者: guofeng

2

上级 50f630ee
...@@ -91,7 +91,8 @@ public class CheckUpdateServiceImpl { ...@@ -91,7 +91,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
...@@ -118,58 +119,6 @@ public class CheckUpdateServiceImpl { ...@@ -118,58 +119,6 @@ public class CheckUpdateServiceImpl {
redis1Template.opsForValue().set("huazheng:checkUpdateError:Aufk:rowids", SomeUtils.getErrorInfoFromException(e)); redis1Template.opsForValue().set("huazheng:checkUpdateError:Aufk:rowids", SomeUtils.getErrorInfoFromException(e));
} }
} }
// 所属selectAufkCheckByUpdate的级联
private void cascadeAfkoCheckByUpdate(Afko source, Afko target) {
if (target != null) { // 目标库有数据
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
// ===============================
if (source.getGltrp() != null) {
String erdat2 = new StringBuffer(source.getGltrp()).insert(4, "-").insert(7, "-").toString();
Date date = DateUtil.parse(erdat2);
source.setGltrp1(date);
}
if (source.getGstrp() != null) {
String erdat2 = new StringBuffer(source.getGstrp()).insert(4, "-").insert(7, "-").toString();
Date date = DateUtil.parse(erdat2);
source.setGstrp1(date);
}
// ===============================
while (true) {
try {
gpMapper.updateAfko(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
}
// 所属selectAufkCheckByUpdate的级联
private void cascadeAfpoCheckByUpdate(Afpo source, Afpo target) {
if (target != null) {
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
// ===============================
// ===============================
while (true) {
try {
gpMapper.updateAfpo(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
}
public void selectBkpfCheckByUpdate() { public void selectBkpfCheckByUpdate() {
try { try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue(); ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
...@@ -207,7 +156,7 @@ public class CheckUpdateServiceImpl { ...@@ -207,7 +156,7 @@ public class CheckUpdateServiceImpl {
if ("00000000".equals(cpudt)) { if ("00000000".equals(cpudt)) {
source.setCpudt_cputm(null); source.setCpudt_cputm(null);
} else { } else {
Date date = DateUtil.parse(cpudt+cputm, "yyyyMMddHHmmss"); Date date = DateUtil.parse(cpudt + cputm, "yyyyMMddHHmmss");
source.setCpudt_cputm(date); source.setCpudt_cputm(date);
} }
// =============================== // ===============================
...@@ -217,7 +166,8 @@ public class CheckUpdateServiceImpl { ...@@ -217,7 +166,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
...@@ -271,7 +221,8 @@ public class CheckUpdateServiceImpl { ...@@ -271,7 +221,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
...@@ -293,28 +244,6 @@ public class CheckUpdateServiceImpl { ...@@ -293,28 +244,6 @@ public class CheckUpdateServiceImpl {
redis1Template.opsForValue().set("huazheng:checkUpdateError:Kna1:rowids", SomeUtils.getErrorInfoFromException(e)); redis1Template.opsForValue().set("huazheng:checkUpdateError:Kna1:rowids", SomeUtils.getErrorInfoFromException(e));
} }
} }
// 所属selectKna1CheckByUpdate的级联
public void cascadeKnvvCheckByUpdate(Knvv source, Knvv target) {
if (target != null) { // 目标库有数据
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
// ===============================
// ===============================
while (true) {
try {
gpMapper.updateKnvv(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
}
public void selectLikpCheckUpdate() { public void selectLikpCheckUpdate() {
try { try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue(); ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
...@@ -344,7 +273,7 @@ public class CheckUpdateServiceImpl { ...@@ -344,7 +273,7 @@ public class CheckUpdateServiceImpl {
if ("00000000".equals(wadat_ist)) { if ("00000000".equals(wadat_ist)) {
source.setWadat_ist2lfuhr(null); source.setWadat_ist2lfuhr(null);
} else { } else {
Date date = DateUtil.parse(wadat_ist+lfuhr, "yyyyMMddHHmmss"); Date date = DateUtil.parse(wadat_ist + lfuhr, "yyyyMMddHHmmss");
source.setWadat_ist2lfuhr(date); source.setWadat_ist2lfuhr(date);
} }
source.setErdat1(SomeUtils.caDate(source.getErdat())); // 日期00000000格式转换,已处理异常 source.setErdat1(SomeUtils.caDate(source.getErdat())); // 日期00000000格式转换,已处理异常
...@@ -356,7 +285,8 @@ public class CheckUpdateServiceImpl { ...@@ -356,7 +285,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
...@@ -411,7 +341,8 @@ public class CheckUpdateServiceImpl { ...@@ -411,7 +341,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
...@@ -464,7 +395,8 @@ public class CheckUpdateServiceImpl { ...@@ -464,7 +395,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
...@@ -512,7 +444,8 @@ public class CheckUpdateServiceImpl { ...@@ -512,7 +444,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
...@@ -564,7 +497,8 @@ public class CheckUpdateServiceImpl { ...@@ -564,7 +497,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
...@@ -618,7 +552,8 @@ public class CheckUpdateServiceImpl { ...@@ -618,7 +552,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
...@@ -677,7 +612,8 @@ public class CheckUpdateServiceImpl { ...@@ -677,7 +612,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
...@@ -733,7 +669,8 @@ public class CheckUpdateServiceImpl { ...@@ -733,7 +669,8 @@ public class CheckUpdateServiceImpl {
operator = "update"; operator = "update";
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
...@@ -771,7 +708,84 @@ public class CheckUpdateServiceImpl { ...@@ -771,7 +708,84 @@ public class CheckUpdateServiceImpl {
gpMapper.updateAusp(source); // 更新数据到数仓中 gpMapper.updateAusp(source); // 更新数据到数仓中
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500); log.error(e.getMessage());
ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
}
// 所属selectKna1CheckByUpdate的级联
public void cascadeKnvvCheckByUpdate(Knvv source, Knvv target) {
if (target != null) { // 目标库有数据
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
// ===============================
// ===============================
while (true) {
try {
gpMapper.updateKnvv(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());
ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
}
// 所属selectAufkCheckByUpdate的级联
private void cascadeAfkoCheckByUpdate(Afko source, Afko target) {
if (target != null) { // 目标库有数据
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
// ===============================
if (source.getGltrp() != null) {
String erdat2 = new StringBuffer(source.getGltrp()).insert(4, "-").insert(7, "-").toString();
Date date = DateUtil.parse(erdat2);
source.setGltrp1(date);
}
if (source.getGstrp() != null) {
String erdat2 = new StringBuffer(source.getGstrp()).insert(4, "-").insert(7, "-").toString();
Date date = DateUtil.parse(erdat2);
source.setGstrp1(date);
}
// ===============================
while (true) {
try {
gpMapper.updateAfko(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());
ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
}
// 所属selectAufkCheckByUpdate的级联
private void cascadeAfpoCheckByUpdate(Afpo source, Afpo target) {
if (target != null) {
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
// ===============================
// ===============================
while (true) {
try {
gpMapper.updateAfpo(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());
ThreadUtil.safeSleep(500);
} }
} }
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
......
...@@ -89,22 +89,16 @@ public class DeleteUpdateJobServiceImpl { ...@@ -89,22 +89,16 @@ public class DeleteUpdateJobServiceImpl {
@Autowired @Autowired
private SapMapper sapMapper; private SapMapper sapMapper;
@Autowired @Autowired
private CrmMapper crmMapper; private CrmMapper crmMapper;
@Autowired @Autowired
private GPMapper gpMapper; private GPMapper gpMapper;
@Autowired @Autowired
private TmsMapper tmsMapper; private TmsMapper tmsMapper;
@Autowired @Autowired
private HzcrmMapper hzcrmMapper; private HzcrmMapper hzcrmMapper;
@Autowired @Autowired
private UltimusDBMapper ultimusDBMapper; private UltimusDBMapper ultimusDBMapper;
@Autowired @Autowired
private Cinderellaw2Mapper cinderellaw2Mapper; private Cinderellaw2Mapper cinderellaw2Mapper;
......
...@@ -806,7 +806,6 @@ ...@@ -806,7 +806,6 @@
<property name="cronExpression" value="* * * * * ?" /> <property name="cronExpression" value="* * * * * ?" />
</bean> </bean>
<!-- 删除流程 --> <!-- 删除流程 -->
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"> <bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail"> <property name="jobDetail">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论