Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
huazheng-project-flink
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
huazheng
huazheng-project-flink
Commits
743692a9
提交
743692a9
authored
11月 25, 2020
作者:
guofeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
销售合同流程明细表、销售预测流程明细表、样品结案流程明细表、样品申请流程明细表更新
上级
a425d062
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
1276 行增加
和
642 行删除
+1276
-642
CheckDeleteServiceImpl.java
...roject/greenplum/service/impl/CheckDeleteServiceImpl.java
+368
-0
CheckUpdateServiceImpl.java
...roject/greenplum/service/impl/CheckUpdateServiceImpl.java
+521
-3
DeleteUpdateJobServiceImpl.java
...ct/greenplum/service/impl/DeleteUpdateJobServiceImpl.java
+0
-589
SapMapper.java
...main/java/com/huazheng/project/hana/mapper/SapMapper.java
+3
-3
CrmMapper.java
...ain/java/com/huazheng/project/mssql/mapper/CrmMapper.java
+19
-0
SampleClosingProcess.java
...om/huazheng/project/mssql/model/SampleClosingProcess.java
+0
-1
TmsMapper.java
...ain/java/com/huazheng/project/mysql/mapper/TmsMapper.java
+8
-0
TransformHistoryNode.java
...om/huazheng/project/mysql/model/TransformHistoryNode.java
+1
-0
SapMapper_hana.xml
src/main/resources/mapper/hana/SapMapper_hana.xml
+0
-1
CrmMapper_mssql.xml
src/main/resources/mapper/mssql/CrmMapper_mssql.xml
+103
-25
TmsMapper_mysql.xml
src/main/resources/mapper/mysql/TmsMapper_mysql.xml
+65
-2
spring-init.xml
src/main/resources/spring-init.xml
+188
-18
没有找到文件。
src/main/java/com/huazheng/project/greenplum/service/impl/CheckDeleteServiceImpl.java
浏览文件 @
743692a9
...
...
@@ -32,6 +32,20 @@ import com.huazheng.project.hana.model.Vbuk;
import
com.huazheng.project.hana.model.Zpoedit
;
import
com.huazheng.project.hana.model.Zsd06
;
import
com.huazheng.project.hana.model.Zsdfhzl
;
import
com.huazheng.project.mssql.mapper.CrmMapper
;
import
com.huazheng.project.mssql.model.SalesContractProcess
;
import
com.huazheng.project.mssql.model.SalesContractProcessMX
;
import
com.huazheng.project.mssql.model.SalesForecastProcess
;
import
com.huazheng.project.mssql.model.SalesForecastProcessMX
;
import
com.huazheng.project.mssql.model.SampleApplicationProcess
;
import
com.huazheng.project.mssql.model.SampleApplicationProcessMingXi
;
import
com.huazheng.project.mssql.model.SampleClosingProcess
;
import
com.huazheng.project.mssql.model.SampleClosingProcessMingXi
;
import
com.huazheng.project.mysql.mapper.TmsMapper
;
import
com.huazheng.project.mysql.model.Handover
;
import
com.huazheng.project.mysql.model.HandoverTask
;
import
com.huazheng.project.mysql.model.TransformHistoryNode
;
import
com.huazheng.project.mysql.model.TransformNewNode
;
import
cn.hutool.core.thread.ThreadUtil
;
import
cn.hutool.crypto.SecureUtil
;
...
...
@@ -48,6 +62,10 @@ public class CheckDeleteServiceImpl {
private
GPMapper
gpMapper
;
@Autowired
private
SapMapper
sapMapper
;
@Autowired
private
CrmMapper
crmMapper
;
@Autowired
private
TmsMapper
tmsMapper
;
public
void
selectAufkCheckByDelete
()
{
try
{
...
...
@@ -716,5 +734,355 @@ public class CheckDeleteServiceImpl {
}
}
public
void
selectSalesContractProcessCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:SalesContractProcess:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:SalesContractProcess:rowNum"
);
SalesContractProcess
build
=
SalesContractProcess
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SalesContractProcess
>
list
=
gpMapper
.
selectSalesContractProcessCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SalesContractProcess:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SalesContractProcess
source
=
crmMapper
.
selectSalesContractProcessById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSalesContractProcess
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SalesContractProcess:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesContractProcesscheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:SalesContractProcess:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSalesForecastProcessCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:SalesForecastProcess:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:SalesForecastProcess:rowNum"
);
SalesForecastProcess
build
=
SalesForecastProcess
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SalesForecastProcess
>
list
=
gpMapper
.
selectSalesForecastProcessCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SalesForecastProcess:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SalesForecastProcess
source
=
crmMapper
.
selectSalesForecastProcessById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSalesForecastProcess
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SalesForecastProcess:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesForecastProcesscheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:SalesForecastProcess:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSampleApplicationProcessCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:SampleApplicationProcess:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:SampleApplicationProcess:rowNum"
);
SampleApplicationProcess
build
=
SampleApplicationProcess
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SampleApplicationProcess
>
list
=
gpMapper
.
selectSampleApplicationProcessCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SampleApplicationProcess:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SampleApplicationProcess
source
=
crmMapper
.
selectSampleApplicationProcessById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSampleApplicationProcess
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SampleApplicationProcess:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleApplicationProcesscheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:SampleApplicationProcess:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSampleClosingProcessCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:SampleClosingProcess:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:SampleClosingProcess:rowNum"
);
SampleClosingProcess
build
=
SampleClosingProcess
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SampleClosingProcess
>
list
=
gpMapper
.
selectSampleClosingProcessCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SampleClosingProcess:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SampleClosingProcess
source
=
crmMapper
.
selectSampleClosingProcessById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSampleClosingProcess
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SampleClosingProcess:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleClosingProcesscheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:SampleClosingProcess:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectHandoverCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:Handover:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:Handover:rowNum"
);
Handover
build
=
Handover
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
Handover
>
list
=
gpMapper
.
selectHandoverCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:Handover:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
Handover
source
=
tmsMapper
.
selectHandoverById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteHandover
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:Handover:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectHandovercheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:Handover:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectHandoverTaskCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:HandoverTask:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:HandoverTask:rowNum"
);
HandoverTask
build
=
HandoverTask
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
HandoverTask
>
list
=
gpMapper
.
selectHandoverTaskCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:HandoverTask:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
HandoverTask
source
=
tmsMapper
.
selectHandoverTaskById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteHandoverTask
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:HandoverTask:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectHandoverTaskcheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:HandoverTask:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectTransformHistoryNodeCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:TransformHistoryNode:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:TransformHistoryNode:rowNum"
);
TransformHistoryNode
build
=
TransformHistoryNode
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
TransformHistoryNode
>
list
=
gpMapper
.
selectTransformHistoryNodeCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:TransformHistoryNode:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
TransformHistoryNode
source
=
tmsMapper
.
selectTransformHistoryNodeById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteTransformHistoryNode
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:TransformHistoryNode:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectTransformHistoryNodecheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:TransformHistoryNode:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectTransformNewNodeCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:TransformNewNode:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:TransformNewNode:rowNum"
);
TransformNewNode
build
=
TransformNewNode
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
TransformNewNode
>
list
=
gpMapper
.
selectTransformNewNodeCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:TransformNewNode:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
TransformNewNode
source
=
tmsMapper
.
selectTransformNewNodeById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteTransformNewNode
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:TransformNewNode:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectTransformNewNodecheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:TransformNewNode:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSalesContractProcessMXCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:SalesContractProcessMX:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:SalesContractProcessMX:rowNum"
);
SalesContractProcessMX
build
=
SalesContractProcessMX
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SalesContractProcessMX
>
list
=
gpMapper
.
selectSalesContractProcessMXCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SalesContractProcessMX:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SalesContractProcessMX
source
=
crmMapper
.
selectSalesContractProcessMXById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSalesContractProcessMX
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SalesContractProcessMX:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesContractProcessMXcheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:SalesContractProcessMX:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSalesForecastProcessMXCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:SalesForecastProcessMX:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:SalesForecastProcessMX:rowNum"
);
SalesForecastProcessMX
build
=
SalesForecastProcessMX
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SalesForecastProcessMX
>
list
=
gpMapper
.
selectSalesForecastProcessMXCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SalesForecastProcessMX:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SalesForecastProcessMX
source
=
crmMapper
.
selectSalesForecastProcessMXById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSalesForecastProcessMX
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SalesForecastProcessMX:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesForecastProcessMXcheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:SalesForecastProcessMX:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSampleApplicationProcessMingXiCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:SampleApplicationProcessMingXi:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:SampleApplicationProcessMingXi:rowNum"
);
SampleApplicationProcessMingXi
build
=
SampleApplicationProcessMingXi
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SampleApplicationProcessMingXi
>
list
=
gpMapper
.
selectSampleApplicationProcessMingXiCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SampleApplicationProcessMingXi:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SampleApplicationProcessMingXi
source
=
crmMapper
.
selectSampleApplicationProcessMingXiById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSampleApplicationProcessMingXi
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SampleApplicationProcessMingXi:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleApplicationProcessMingXicheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:SampleApplicationProcessMingXi:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSampleClosingProcessMingXiCheckByDelete
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkDelete:SampleClosingProcessMingXi:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:checkDelete:SampleClosingProcessMingXi:rowNum"
);
SampleClosingProcessMingXi
build
=
SampleClosingProcessMingXi
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SampleClosingProcessMingXi
>
list
=
gpMapper
.
selectSampleClosingProcessMingXiCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SampleClosingProcessMingXi:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SampleClosingProcessMingXi
source
=
crmMapper
.
selectSampleClosingProcessMingXiById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSampleClosingProcessMingXi
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDelete:SampleClosingProcessMingXi:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleClosingProcessMingXicheckDelete --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkDeleteError:SampleClosingProcessMingXi:rowNum"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
}
src/main/java/com/huazheng/project/greenplum/service/impl/CheckUpdateServiceImpl.java
浏览文件 @
743692a9
...
...
@@ -33,10 +33,26 @@ import com.huazheng.project.hana.model.Vbuk;
import
com.huazheng.project.hana.model.Zpoedit
;
import
com.huazheng.project.hana.model.Zsd06
;
import
com.huazheng.project.hana.model.Zsdfhzl
;
import
com.huazheng.project.mssql.mapper.CrmMapper
;
import
com.huazheng.project.mssql.model.SalesContractProcess
;
import
com.huazheng.project.mssql.model.SalesContractProcessMX
;
import
com.huazheng.project.mssql.model.SalesForecastProcess
;
import
com.huazheng.project.mssql.model.SalesForecastProcessMX
;
import
com.huazheng.project.mssql.model.SampleApplicationProcess
;
import
com.huazheng.project.mssql.model.SampleApplicationProcessMingXi
;
import
com.huazheng.project.mssql.model.SampleClosingProcess
;
import
com.huazheng.project.mssql.model.SampleClosingProcessMingXi
;
import
com.huazheng.project.mysql.mapper.TmsMapper
;
import
com.huazheng.project.mysql.model.Handover
;
import
com.huazheng.project.mysql.model.HandoverTask
;
import
com.huazheng.project.mysql.model.TransformHistoryNode
;
import
com.huazheng.project.mysql.model.TransformNewNode
;
import
cn.hutool.core.date.DateField
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.thread.ThreadUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.core.util.ReUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.crypto.SecureUtil
;
import
cn.hutool.json.JSONUtil
;
...
...
@@ -52,7 +68,11 @@ public class CheckUpdateServiceImpl {
private
GPMapper
gpMapper
;
@Autowired
private
SapMapper
sapMapper
;
@Autowired
private
CrmMapper
crmMapper
;
@Autowired
private
TmsMapper
tmsMapper
;
public
void
selectAufkCheckByUpdate
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
...
...
@@ -757,8 +777,6 @@ public class CheckUpdateServiceImpl {
}
}
// 所属selectBkpfCheckByUpdate的级联
private
void
cascadeBsadCheckByUpdate
(
Bsad
source
,
Bsad
target
)
{
if
(
target
!=
null
)
{
// 目标库有数据
...
...
@@ -1119,5 +1137,505 @@ public class CheckUpdateServiceImpl {
}
}
public
void
selectSalesContractProcessCheckUpdate
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkUpdate:SalesContractProcess:rowids"
,
"0"
);
String
rowids
=
opsForValue
.
get
(
"huazheng:checkUpdate:SalesContractProcess:rowids"
);
SalesContractProcess
build
=
SalesContractProcess
.
builder
().
id
(
rowids
).
build
();
List
<
SalesContractProcess
>
slist
=
crmMapper
.
selectSalesContractProcessCheckByUpdate
(
build
);
// 从数仓中查询一组数据
if
(
slist
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:SalesContractProcess:rowids"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
slist
.
forEach
(
source
->
{
// 遍历要检查的数据
SalesContractProcess
target
=
gpMapper
.
selectSalesContractProcess
(
source
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
String
srowids
=
source
.
getId
();
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
.
updateSalesContractProcess
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
// 级联更新业务
List
<
SalesContractProcessMX
>
sSalesContractProcessMXList
=
crmMapper
.
cascadeSalesContractProcessMXBySalesContractProcess
(
source
);
// 级联查询源库afko表
for
(
SalesContractProcessMX
sSalesContractProcessMX
:
sSalesContractProcessMXList
)
{
SalesContractProcessMX
tSalesContractProcessMX
=
gpMapper
.
selectSalesContractProcessMX
(
sSalesContractProcessMX
);
// 查询目标库中afko表
cascadeSalesContractProcessMXCheckByUpdate
(
sSalesContractProcessMX
,
tSalesContractProcessMX
);
// 级联更新afko表
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:SalesContractProcess:rowids"
,
srowids
.
toString
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesContractProcesscheckUpdate --> rowids:%s, operator:%s"
,
srowids
.
toString
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdateError:SalesContractProcess:rowids"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSalesForecastProcessCheckUpdate
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkUpdate:SalesForecastProcess:rowids"
,
"0"
);
String
rowids
=
opsForValue
.
get
(
"huazheng:checkUpdate:SalesForecastProcess:rowids"
);
SalesForecastProcess
build
=
SalesForecastProcess
.
builder
().
id
(
rowids
).
build
();
List
<
SalesForecastProcess
>
slist
=
crmMapper
.
selectSalesForecastProcessCheckByUpdate
(
build
);
// 从数仓中查询一组数据
if
(
slist
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:SalesForecastProcess:rowids"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
slist
.
forEach
(
source
->
{
// 遍历要检查的数据
SalesForecastProcess
target
=
gpMapper
.
selectSalesForecastProcess
(
source
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
String
srowids
=
source
.
getId
();
if
(
target
!=
null
)
{
String
shash
=
SecureUtil
.
md5
(
JSONUtil
.
toJsonStr
(
source
));
// 源库中数据的hash结果
String
thash
=
target
.
getHashResult
();
// 数仓中数据的hash结果
if
(!
shash
.
equals
(
thash
))
{
// 如果hash结果不一致
source
.
setHashResult
(
shash
);
// ===============================
String
kaiShiSJs
=
source
.
getKaiShiSJs
();
// 时间数据纠错
if
(
kaiShiSJs
==
null
||
kaiShiSJs
.
equals
(
"00000000"
)
||
StrUtil
.
isBlank
(
kaiShiSJs
))
{
source
.
setKaiShiSJ
(
null
);
}
else
{
if
(
kaiShiSJs
.
indexOf
(
"--"
)
==
-
1
)
{
Date
date
=
DateUtil
.
parse
(
kaiShiSJs
);
source
.
setKaiShiSJ
(
date
);
}
}
String
jieShuSJs
=
source
.
getJieShuSJs
();
// 时间数据纠错
if
(
jieShuSJs
==
null
||
jieShuSJs
.
equals
(
"00000000"
)
||
StrUtil
.
isBlank
(
jieShuSJs
))
{
source
.
setJieShuSJ
(
null
);
}
else
{
Date
date
=
DateUtil
.
parse
(
jieShuSJs
);
source
.
setJieShuSJ
(
date
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSalesForecastProcess
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
// 级联更新业务
List
<
SalesForecastProcessMX
>
sSalesForecastProcessMXList
=
crmMapper
.
cascadeSalesForecastProcessMXBySalesForecastProcess
(
source
);
// 级联查询源库afko表
for
(
SalesForecastProcessMX
sSalesForecastProcessMX
:
sSalesForecastProcessMXList
)
{
SalesForecastProcessMX
tSalesForecastProcessMX
=
gpMapper
.
selectSalesForecastProcessMX
(
sSalesForecastProcessMX
);
// 查询目标库中afko表
cascadeSalesForecastProcessMXCheckByUpdate
(
sSalesForecastProcessMX
,
tSalesForecastProcessMX
);
// 级联更新afko表
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:SalesForecastProcess:rowids"
,
srowids
.
toString
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesForecastProcesscheckUpdate --> rowids:%s, operator:%s"
,
srowids
.
toString
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdateError:SalesForecastProcess:rowids"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSampleApplicationProcessCheckUpdate
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkUpdate:SampleApplicationProcess:rowids"
,
"0"
);
String
rowids
=
opsForValue
.
get
(
"huazheng:checkUpdate:SampleApplicationProcess:rowids"
);
SampleApplicationProcess
build
=
SampleApplicationProcess
.
builder
().
id
(
rowids
).
build
();
List
<
SampleApplicationProcess
>
slist
=
crmMapper
.
selectSampleApplicationProcessCheckByUpdate
(
build
);
// 从数仓中查询一组数据
if
(
slist
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:SampleApplicationProcess:rowids"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
slist
.
forEach
(
source
->
{
// 遍历要检查的数据
SampleApplicationProcess
target
=
gpMapper
.
selectSampleApplicationProcess
(
source
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
String
srowids
=
source
.
getId
();
if
(
target
!=
null
)
{
String
shash
=
SecureUtil
.
md5
(
JSONUtil
.
toJsonStr
(
source
));
// 源库中数据的hash结果
String
thash
=
target
.
getHashResult
();
// 数仓中数据的hash结果
if
(!
shash
.
equals
(
thash
))
{
// 如果hash结果不一致
source
.
setHashResult
(
shash
);
// ===============================
String
pcbcs
=
source
.
getPCBCS
();
String
chanPinYY
=
source
.
getChanPinYY
();
if
(
StrUtil
.
isBlank
(
pcbcs
)
||
StrUtil
.
isBlank
(
chanPinYY
))
{
source
.
setPCBCS2chanPinYY
(
null
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSampleApplicationProcess
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
// 级联更新业务
List
<
SampleApplicationProcessMingXi
>
sSampleApplicationProcessMingXiList
=
crmMapper
.
cascadeSampleApplicationProcessMingXiBySampleApplicationProcess
(
source
);
// 级联查询源库afko表
for
(
SampleApplicationProcessMingXi
sSampleApplicationProcessMingXi
:
sSampleApplicationProcessMingXiList
)
{
SampleApplicationProcessMingXi
tSampleApplicationProcessMingXi
=
gpMapper
.
selectSampleApplicationProcessMingXi
(
sSampleApplicationProcessMingXi
);
// 查询目标库中afko表
cascadeSampleApplicationProcessMingXiCheckByUpdate
(
sSampleApplicationProcessMingXi
,
tSampleApplicationProcessMingXi
);
// 级联更新afko表
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:SampleApplicationProcess:rowids"
,
srowids
.
toString
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleApplicationProcesscheckUpdate --> rowids:%s, operator:%s"
,
srowids
.
toString
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdateError:SampleApplicationProcess:rowids"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectSampleClosingProcessCheckUpdate
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkUpdate:SampleClosingProcess:rowids"
,
"0"
);
String
rowids
=
opsForValue
.
get
(
"huazheng:checkUpdate:SampleClosingProcess:rowids"
);
SampleClosingProcess
build
=
SampleClosingProcess
.
builder
().
id
(
rowids
).
build
();
List
<
SampleClosingProcess
>
slist
=
crmMapper
.
selectSampleClosingProcessCheckByUpdate
(
build
);
// 从数仓中查询一组数据
if
(
slist
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:SampleClosingProcess:rowids"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
slist
.
forEach
(
source
->
{
// 遍历要检查的数据
SampleClosingProcess
target
=
gpMapper
.
selectSampleClosingProcess
(
source
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
String
srowids
=
source
.
getId
();
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
(
NumberUtil
.
isNumber
(
source
.
getYangPinSQSLH
()))
{
int
yangPinSQSLHi
=
Integer
.
parseInt
(
source
.
getYangPinSQSLH
());
source
.
setYangPinSQSLHi
(
yangPinSQSLHi
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSampleClosingProcess
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
// 级联更新业务
List
<
SampleClosingProcessMingXi
>
sSampleClosingProcessMingXiList
=
crmMapper
.
cascadeSampleClosingProcessMingXiBySampleClosingProcess
(
source
);
// 级联查询源库afko表
for
(
SampleClosingProcessMingXi
sSampleClosingProcessMingXi
:
sSampleClosingProcessMingXiList
)
{
SampleClosingProcessMingXi
tSampleClosingProcessMingXi
=
gpMapper
.
selectSampleClosingProcessMingXi
(
sSampleClosingProcessMingXi
);
// 查询目标库中afko表
cascadeSampleClosingProcessMingXiCheckByUpdate
(
sSampleClosingProcessMingXi
,
tSampleClosingProcessMingXi
);
// 级联更新afko表
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:SampleClosingProcess:rowids"
,
srowids
.
toString
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleClosingProcesscheckUpdate --> rowids:%s, operator:%s"
,
srowids
.
toString
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdateError:SampleClosingProcess:rowids"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
// 所属selectSalesContractProcessCheckUpdate的级联
private
void
cascadeSalesContractProcessMXCheckByUpdate
(
SalesContractProcessMX
source
,
SalesContractProcessMX
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
);
// ===============================
Object
chengben
=
source
.
getChengben
();
if
(
chengben
!=
null
&&
chengben
.
toString
().
equals
(
""
))
{
source
.
setChengben
(
null
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSalesContractProcessMX
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
}
// 所属selectSalesForecastProcessCheckUpdate的级联
private
void
cascadeSalesForecastProcessMXCheckByUpdate
(
SalesForecastProcessMX
source
,
SalesForecastProcessMX
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
.
getJiHuaJDL
()
!=
null
)
{
source
.
setJiHuaJDL
(
ReUtil
.
getFirstNumber
(
source
.
getJiHuaJDL
())
+
""
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSalesForecastProcessMX
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
}
// 所属selectSampleApplicationProcessCheckUpdate的级联
private
void
cascadeSampleApplicationProcessMingXiCheckByUpdate
(
SampleApplicationProcessMingXi
source
,
SampleApplicationProcessMingXi
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
);
// ===============================
String
hangXiangMH
=
source
.
getHangXiangMH
();
if
(
StrUtil
.
isBlank
(
hangXiangMH
))
{
source
.
setHangxiangmh1
(
null
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSampleApplicationProcessMingXi
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
}
// 所属selectSampleClosingProcessCheckUpdate的级联
private
void
cascadeSampleClosingProcessMingXiCheckByUpdate
(
SampleClosingProcessMingXi
source
,
SampleClosingProcessMingXi
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
.
updateSampleClosingProcessMingXi
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
}
public
void
selectHandoverCheckUpdate
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkUpdate:Handover:rowids"
,
"0"
);
String
rowids
=
opsForValue
.
get
(
"huazheng:checkUpdate:Handover:rowids"
);
Handover
build
=
Handover
.
builder
().
handover_id
(
rowids
).
build
();
List
<
Handover
>
slist
=
tmsMapper
.
selectHandoverCheckByUpdate
(
build
);
// 从数仓中查询一组数据
if
(
slist
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:Handover:rowids"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
slist
.
forEach
(
source
->
{
// 遍历要检查的数据
Handover
target
=
gpMapper
.
selectHandover
(
source
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
String
srowids
=
source
.
getHandover_id
();
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
.
updateHandover
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:Handover:rowids"
,
srowids
.
toString
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectHandovercheckUpdate --> rowids:%s, operator:%s"
,
srowids
.
toString
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdateError:Handover:rowids"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectHandoverTaskCheckUpdate
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkUpdate:HandoverTask:rowids"
,
"0"
);
String
rowids
=
opsForValue
.
get
(
"huazheng:checkUpdate:HandoverTask:rowids"
);
HandoverTask
build
=
HandoverTask
.
builder
().
task_id
(
rowids
).
build
();
List
<
HandoverTask
>
slist
=
tmsMapper
.
selectHandoverTaskCheckByUpdate
(
build
);
// 从数仓中查询一组数据
if
(
slist
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:HandoverTask:rowids"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
slist
.
forEach
(
source
->
{
// 遍历要检查的数据
HandoverTask
target
=
gpMapper
.
selectHandoverTask
(
source
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
String
srowids
=
source
.
getTask_id
();
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
.
updateHandoverTask
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:HandoverTask:rowids"
,
srowids
.
toString
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectHandoverTaskcheckUpdate --> rowids:%s, operator:%s"
,
srowids
.
toString
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdateError:HandoverTask:rowids"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectTransformHistoryNodeCheckUpdate
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkUpdate:TransformHistoryNode:rowids"
,
"0"
);
Integer
rowids
=
Integer
.
parseInt
(
opsForValue
.
get
(
"huazheng:checkUpdate:TransformHistoryNode:rowids"
));
TransformHistoryNode
build
=
TransformHistoryNode
.
builder
().
id
(
rowids
).
build
();
List
<
TransformHistoryNode
>
slist
=
tmsMapper
.
selectTransformHistoryNodeCheckByUpdate
(
build
);
// 从数仓中查询一组数据
if
(
slist
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:TransformHistoryNode:rowids"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
slist
.
forEach
(
source
->
{
// 遍历要检查的数据
TransformHistoryNode
target
=
gpMapper
.
selectTransformHistoryNode
(
source
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
String
srowids
=
source
.
getId
().
toString
();
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
.
updateTransformHistoryNode
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:TransformHistoryNode:rowids"
,
srowids
.
toString
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectTransformHistoryNodecheckUpdate --> rowids:%s, operator:%s"
,
srowids
.
toString
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdateError:TransformHistoryNode:rowids"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
public
void
selectTransformNewNodeCheckUpdate
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:checkUpdate:TransformNewNode:rowids"
,
"0"
);
Integer
rowids
=
Integer
.
parseInt
(
opsForValue
.
get
(
"huazheng:checkUpdate:TransformNewNode:rowids"
));
TransformNewNode
build
=
TransformNewNode
.
builder
().
id
(
rowids
).
build
();
List
<
TransformNewNode
>
slist
=
tmsMapper
.
selectTransformNewNodeCheckByUpdate
(
build
);
// 从数仓中查询一组数据
if
(
slist
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:TransformNewNode:rowids"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
slist
.
forEach
(
source
->
{
// 遍历要检查的数据
TransformNewNode
target
=
gpMapper
.
selectTransformNewNode
(
source
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
String
srowids
=
source
.
getId
().
toString
();
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
.
updateTransformNewNode
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdate:TransformNewNode:rowids"
,
srowids
.
toString
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectTransformNewNodecheckUpdate --> rowids:%s, operator:%s"
,
srowids
.
toString
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkUpdateError:TransformNewNode:rowids"
,
SomeUtils
.
getErrorInfoFromException
(
e
));
}
}
}
src/main/java/com/huazheng/project/greenplum/service/impl/DeleteUpdateJobServiceImpl.java
浏览文件 @
743692a9
...
...
@@ -38,15 +38,7 @@ import com.huazheng.project.hana.model.Vbep;
import
com.huazheng.project.hana.model.Vbpa
;
import
com.huazheng.project.hana.model.Zmdpc
;
import
com.huazheng.project.hana.model.Zsd06
;
import
com.huazheng.project.mssql.mapper.CrmMapper
;
import
com.huazheng.project.mssql.model.SalesContractProcess
;
import
com.huazheng.project.mssql.model.SalesContractProcessMX
;
import
com.huazheng.project.mssql.model.SalesForecastProcess
;
import
com.huazheng.project.mssql.model.SalesForecastProcessMX
;
import
com.huazheng.project.mssql.model.SampleApplicationProcess
;
import
com.huazheng.project.mssql.model.SampleApplicationProcessMingXi
;
import
com.huazheng.project.mssql.model.SampleClosingProcess
;
import
com.huazheng.project.mssql.model.SampleClosingProcessMingXi
;
import
com.huazheng.project.mssql2.mapper.HzcrmMapper
;
import
com.huazheng.project.mssql2.model.SysSAPreturnNo
;
import
com.huazheng.project.mssql2.model.TKeHu
;
...
...
@@ -57,16 +49,10 @@ import com.huazheng.project.mssql3.mapper.Cinderellaw2Mapper;
import
com.huazheng.project.mssql3.model.PersonComp
;
import
com.huazheng.project.mssql4.mapper.UltimusDBMapper
;
import
com.huazheng.project.mssql4.model.Tasks
;
import
com.huazheng.project.mysql.mapper.TmsMapper
;
import
com.huazheng.project.mysql.model.Handover
;
import
com.huazheng.project.mysql.model.HandoverTask
;
import
com.huazheng.project.mysql.model.TransformHistoryNode
;
import
com.huazheng.project.mysql.model.TransformNewNode
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.thread.ThreadUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.core.util.ReUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.crypto.SecureUtil
;
import
cn.hutool.json.JSONUtil
;
...
...
@@ -82,12 +68,8 @@ public class DeleteUpdateJobServiceImpl {
@Autowired
private
SapMapper
sapMapper
;
@Autowired
private
CrmMapper
crmMapper
;
@Autowired
private
GPMapper
gpMapper
;
@Autowired
private
TmsMapper
tmsMapper
;
@Autowired
private
HzcrmMapper
hzcrmMapper
;
@Autowired
private
UltimusDBMapper
ultimusDBMapper
;
...
...
@@ -107,402 +89,6 @@ public class DeleteUpdateJobServiceImpl {
}
}
public
void
checkJob1
()
{
selectSalesContractProcessCheck
();
// 1
selectSalesContractProcessMXCheck
();
// 2
selectSalesForecastProcessCheck
();
// 3
selectSalesForecastProcessMXCheck
();
// 4
selectSampleApplicationProcessCheck
();
selectSampleApplicationProcessMingXiCheck
();
selectSampleClosingProcessCheck
();
selectSampleClosingProcessMingXiCheck
();
}
private
void
selectSalesContractProcessCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:SalesContractProcess:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:SalesContractProcess:rowNum"
);
SalesContractProcess
build
=
SalesContractProcess
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SalesContractProcess
>
list
=
gpMapper
.
selectSalesContractProcessCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SalesContractProcess:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SalesContractProcess
source
=
crmMapper
.
selectSalesContractProcessById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSalesContractProcess
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
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
.
updateSalesContractProcess
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SalesContractProcess:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesContractProcessCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:SalesContractProcess:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectSalesContractProcessMXCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:SalesContractProcessMX:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:SalesContractProcessMX:rowNum"
);
SalesContractProcessMX
build
=
SalesContractProcessMX
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SalesContractProcessMX
>
list
=
gpMapper
.
selectSalesContractProcessMXCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SalesContractProcessMX:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SalesContractProcessMX
source
=
crmMapper
.
selectSalesContractProcessMXById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSalesContractProcessMX
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
String
shash
=
SecureUtil
.
md5
(
JSONUtil
.
toJsonStr
(
source
));
// 源库中数据的hash结果
String
thash
=
target
.
getHashResult
();
// 数仓中数据的hash结果
if
(!
shash
.
equals
(
thash
))
{
// 如果hash结果不一致
source
.
setHashResult
(
shash
);
// ===============================
Object
chengben
=
source
.
getChengben
();
if
(
chengben
!=
null
&&
chengben
.
toString
().
equals
(
""
))
{
source
.
setChengben
(
null
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSalesContractProcessMX
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SalesContractProcessMX:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesContractProcessMXCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:SalesContractProcessMX:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectSalesForecastProcessCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:SalesForecastProcess:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:SalesForecastProcess:rowNum"
);
SalesForecastProcess
build
=
SalesForecastProcess
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SalesForecastProcess
>
list
=
gpMapper
.
selectSalesForecastProcessCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SalesForecastProcess:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SalesForecastProcess
source
=
crmMapper
.
selectSalesForecastProcessById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSalesForecastProcess
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
String
shash
=
SecureUtil
.
md5
(
JSONUtil
.
toJsonStr
(
source
));
// 源库中数据的hash结果
String
thash
=
target
.
getHashResult
();
// 数仓中数据的hash结果
if
(!
shash
.
equals
(
thash
))
{
// 如果hash结果不一致
source
.
setHashResult
(
shash
);
// ===============================
String
kaiShiSJs
=
source
.
getKaiShiSJs
();
// 时间数据纠错
if
(
kaiShiSJs
==
null
||
kaiShiSJs
.
equals
(
"00000000"
)
||
StrUtil
.
isBlank
(
kaiShiSJs
))
{
source
.
setKaiShiSJ
(
null
);
}
else
{
if
(
kaiShiSJs
.
indexOf
(
"--"
)
==
-
1
)
{
Date
date
=
DateUtil
.
parse
(
kaiShiSJs
);
source
.
setKaiShiSJ
(
date
);
}
}
String
jieShuSJs
=
source
.
getJieShuSJs
();
// 时间数据纠错
if
(
jieShuSJs
==
null
||
jieShuSJs
.
equals
(
"00000000"
)
||
StrUtil
.
isBlank
(
jieShuSJs
))
{
source
.
setJieShuSJ
(
null
);
}
else
{
Date
date
=
DateUtil
.
parse
(
jieShuSJs
);
source
.
setJieShuSJ
(
date
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSalesForecastProcess
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SalesForecastProcess:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesForecastProcessCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:SalesForecastProcess:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectSalesForecastProcessMXCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:SalesForecastProcessMX:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:SalesForecastProcessMX:rowNum"
);
SalesForecastProcessMX
build
=
SalesForecastProcessMX
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SalesForecastProcessMX
>
list
=
gpMapper
.
selectSalesForecastProcessMXCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SalesForecastProcessMX:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SalesForecastProcessMX
source
=
crmMapper
.
selectSalesForecastProcessMXById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSalesForecastProcessMX
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
String
shash
=
SecureUtil
.
md5
(
JSONUtil
.
toJsonStr
(
source
));
// 源库中数据的hash结果
String
thash
=
target
.
getHashResult
();
// 数仓中数据的hash结果
if
(!
shash
.
equals
(
thash
))
{
// 如果hash结果不一致
source
.
setHashResult
(
shash
);
// ===============================
if
(
source
.
getJiHuaJDL
()
!=
null
)
{
source
.
setJiHuaJDL
(
ReUtil
.
getFirstNumber
(
source
.
getJiHuaJDL
())
+
""
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSalesForecastProcessMX
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SalesForecastProcessMX:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSalesForecastProcessMXCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:SalesForecastProcessMX:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectSampleApplicationProcessCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:SampleApplicationProcess:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:SampleApplicationProcess:rowNum"
);
SampleApplicationProcess
build
=
SampleApplicationProcess
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SampleApplicationProcess
>
list
=
gpMapper
.
selectSampleApplicationProcessCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SampleApplicationProcess:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SampleApplicationProcess
source
=
crmMapper
.
selectSampleApplicationProcessById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSampleApplicationProcess
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
String
shash
=
SecureUtil
.
md5
(
JSONUtil
.
toJsonStr
(
source
));
// 源库中数据的hash结果
String
thash
=
target
.
getHashResult
();
// 数仓中数据的hash结果
if
(!
shash
.
equals
(
thash
))
{
// 如果hash结果不一致
source
.
setHashResult
(
shash
);
// ===============================
String
pcbcs
=
source
.
getPCBCS
();
String
chanPinYY
=
source
.
getChanPinYY
();
if
(
StrUtil
.
isBlank
(
pcbcs
)
||
StrUtil
.
isBlank
(
chanPinYY
))
{
source
.
setPCBCS2chanPinYY
(
null
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSampleApplicationProcess
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SampleApplicationProcess:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleApplicationProcessCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:SampleApplicationProcess:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectSampleApplicationProcessMingXiCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:SampleApplicationProcessMingXi:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:SampleApplicationProcessMingXi:rowNum"
);
SampleApplicationProcessMingXi
build
=
SampleApplicationProcessMingXi
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SampleApplicationProcessMingXi
>
list
=
gpMapper
.
selectSampleApplicationProcessMingXiCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SampleApplicationProcessMingXi:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SampleApplicationProcessMingXi
source
=
crmMapper
.
selectSampleApplicationProcessMingXiById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSampleApplicationProcessMingXi
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
String
shash
=
SecureUtil
.
md5
(
JSONUtil
.
toJsonStr
(
source
));
// 源库中数据的hash结果
String
thash
=
target
.
getHashResult
();
// 数仓中数据的hash结果
if
(!
shash
.
equals
(
thash
))
{
// 如果hash结果不一致
source
.
setHashResult
(
shash
);
// ===============================
String
hangXiangMH
=
source
.
getHangXiangMH
();
if
(
StrUtil
.
isBlank
(
hangXiangMH
))
{
source
.
setHangxiangmh1
(
null
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSampleApplicationProcessMingXi
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SampleApplicationProcessMingXi:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleApplicationProcessMingXiCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:SampleApplicationProcessMingXi:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectSampleClosingProcessCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:SampleClosingProcess:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:SampleClosingProcess:rowNum"
);
SampleClosingProcess
build
=
SampleClosingProcess
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SampleClosingProcess
>
list
=
gpMapper
.
selectSampleClosingProcessCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SampleClosingProcess:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SampleClosingProcess
source
=
crmMapper
.
selectSampleClosingProcessById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSampleClosingProcess
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
String
shash
=
SecureUtil
.
md5
(
JSONUtil
.
toJsonStr
(
source
));
// 源库中数据的hash结果
String
thash
=
target
.
getHashResult
();
// 数仓中数据的hash结果
if
(!
shash
.
equals
(
thash
))
{
// 如果hash结果不一致
source
.
setHashResult
(
shash
);
// ===============================
if
(
NumberUtil
.
isNumber
(
source
.
getYangPinSQSLH
()))
{
int
yangPinSQSLHi
=
Integer
.
parseInt
(
source
.
getYangPinSQSLH
());
source
.
setYangPinSQSLHi
(
yangPinSQSLHi
);
}
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateSampleClosingProcess
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SampleClosingProcess:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleClosingProcessCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:SampleClosingProcess:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectSampleClosingProcessMingXiCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:SampleClosingProcessMingXi:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:SampleClosingProcessMingXi:rowNum"
);
SampleClosingProcessMingXi
build
=
SampleClosingProcessMingXi
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
SampleClosingProcessMingXi
>
list
=
gpMapper
.
selectSampleClosingProcessMingXiCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SampleClosingProcessMingXi:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
SampleClosingProcessMingXi
source
=
crmMapper
.
selectSampleClosingProcessMingXiById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteSampleClosingProcessMingXi
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
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
.
updateSampleClosingProcessMingXi
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:SampleClosingProcessMingXi:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectSampleClosingProcessMingXiCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:SampleClosingProcessMingXi:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
public
void
checkJob2
()
{
selectSysSAPreturnNoCheck
();
// 5
...
...
@@ -722,181 +308,6 @@ public class DeleteUpdateJobServiceImpl {
}
}
public
void
checkJob3
()
{
selectHandoverCheck
();
// 10
selectHandoverTaskCheck
();
// 11
selectTransformHistoryNodeCheck
();
// 12
selectTransformNewNodeCheck
();
// 13
}
private
void
selectHandoverCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:Handover:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:Handover:rowNum"
);
Handover
build
=
Handover
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
Handover
>
list
=
gpMapper
.
selectHandoverCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:Handover:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
Handover
source
=
tmsMapper
.
selectHandoverById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteHandover
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
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
.
updateHandover
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:Handover:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectHandoverCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:Handover:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectHandoverTaskCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:HandoverTask:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:HandoverTask:rowNum"
);
HandoverTask
build
=
HandoverTask
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
HandoverTask
>
list
=
gpMapper
.
selectHandoverTaskCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:HandoverTask:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
HandoverTask
source
=
tmsMapper
.
selectHandoverTaskById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteHandoverTask
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
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
.
updateHandoverTask
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:HandoverTask:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectHandoverTaskCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:HandoverTask:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectTransformHistoryNodeCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:TransformHistoryNode:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:TransformHistoryNode:rowNum"
);
TransformHistoryNode
build
=
TransformHistoryNode
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
TransformHistoryNode
>
list
=
gpMapper
.
selectTransformHistoryNodeCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:TransformHistoryNode:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
TransformHistoryNode
source
=
tmsMapper
.
selectTransformHistoryNodeById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteTransformHistoryNode
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
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
.
updateTransformHistoryNode
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:TransformHistoryNode:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectTransformHistoryNodeCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:TransformHistoryNode:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectTransformNewNodeCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:TransformNewNode:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:TransformNewNode:rowNum"
);
TransformNewNode
build
=
TransformNewNode
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
TransformNewNode
>
list
=
gpMapper
.
selectTransformNewNodeCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:TransformNewNode:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
TransformNewNode
source
=
tmsMapper
.
selectTransformNewNodeById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteTransformNewNode
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
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
.
updateTransformNewNode
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:TransformNewNode:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectTransformNewNodeCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:TransformNewNode:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
public
void
checkJob4
()
{
selectKnkkCheck
();
// 19
selectMskaCheck
();
// 26
...
...
src/main/java/com/huazheng/project/hana/mapper/SapMapper.java
浏览文件 @
743692a9
...
...
@@ -89,7 +89,7 @@ public interface SapMapper {
// .........
public
List
<
Knkk
>
selectKnkkCheckByUpdate
(
Knkk
knkk
);
// 按天更新
public
List
<
Aufk
>
selectAufkCheckByUpdate
(
Aufk
aufk
);
public
List
<
Bkpf
>
selectBkpfCheckByUpdate
(
Bkpf
bkpf
);
public
List
<
Kna1
>
selectKna1CheckUpdate
(
Kna1
kna1
);
...
...
@@ -101,7 +101,7 @@ public interface SapMapper {
public
List
<
Zsd06
>
selectZsd06CheckByUpdate
(
Zsd06
zsd06
);
public
List
<
Zsdfhzl
>
selectZsdfhzlCheckByUpdate
(
Zsdfhzl
zsdfhzl
);
public
List
<
Mara
>
selectMaraCheckByUpdate
(
Mara
mara
);
// 按天更新的级联
public
Afko
cascadeAfkoByAufk
(
Aufk
aufk
);
public
Afpo
cascadeAfpoByAufk
(
Aufk
aufk
);
public
List
<
Knvv
>
cascadeKnvvByKna1
(
Kna1
kna1
);
...
...
@@ -117,7 +117,6 @@ public interface SapMapper {
// ......
public
Bkpf
selectBkpfById
(
Bkpf
target
);
public
Knvp
selectKnvpById
(
Knvp
target
);
...
...
@@ -156,5 +155,6 @@ public interface SapMapper {
public
Vbap
selectVbapById
(
Vbap
target
);
public
Tvkbt
selectTvkbtById
(
Tvkbt
target
);
}
src/main/java/com/huazheng/project/mssql/mapper/CrmMapper.java
浏览文件 @
743692a9
...
...
@@ -23,6 +23,23 @@ public interface CrmMapper {
public
List
<
SalesContractProcessMX
>
selectSalesContractProcessMX
(
SalesContractProcess
scp
);
public
List
<
SalesForecastProcessMX
>
selectSalesForecastProcessMX
(
SalesForecastProcess
scp
);
// 按天更新
public
List
<
SalesContractProcess
>
selectSalesContractProcessCheckByUpdate
(
SalesContractProcess
scp
);
public
List
<
SalesForecastProcess
>
selectSalesForecastProcessCheckByUpdate
(
SalesForecastProcess
sfp
);
public
List
<
SampleApplicationProcess
>
selectSampleApplicationProcessCheckByUpdate
(
SampleApplicationProcess
scp
);
public
List
<
SampleClosingProcess
>
selectSampleClosingProcessCheckByUpdate
(
SampleClosingProcess
scp
);
// 按天更新的级联
public
List
<
SalesContractProcessMX
>
cascadeSalesContractProcessMXBySalesContractProcess
(
SalesContractProcess
source
);
public
List
<
SalesForecastProcessMX
>
cascadeSalesForecastProcessMXBySalesForecastProcess
(
SalesForecastProcess
source
);
public
List
<
SampleApplicationProcessMingXi
>
cascadeSampleApplicationProcessMingXiBySampleApplicationProcess
(
SampleApplicationProcess
source
);
public
List
<
SampleClosingProcessMingXi
>
cascadeSampleClosingProcessMingXiBySampleClosingProcess
(
SampleClosingProcess
source
);
public
SalesContractProcess
selectSalesContractProcessById
(
SalesContractProcess
target
);
public
SalesContractProcessMX
selectSalesContractProcessMXById
(
SalesContractProcessMX
target
);
public
SalesForecastProcess
selectSalesForecastProcessById
(
SalesForecastProcess
target
);
...
...
@@ -32,4 +49,6 @@ public interface CrmMapper {
public
SampleClosingProcess
selectSampleClosingProcessById
(
SampleClosingProcess
target
);
public
SampleClosingProcessMingXi
selectSampleClosingProcessMingXiById
(
SampleClosingProcessMingXi
target
);
}
src/main/java/com/huazheng/project/mssql/model/SampleClosingProcess.java
浏览文件 @
743692a9
package
com
.
huazheng
.
project
.
mssql
.
model
;
import
java.io.Serializable
;
import
java.util.Date
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
...
src/main/java/com/huazheng/project/mysql/mapper/TmsMapper.java
浏览文件 @
743692a9
...
...
@@ -14,6 +14,14 @@ public interface TmsMapper {
public
List
<
TransformNewNode
>
selectTransformNewNodeNew
(
TransformNewNode
tnn
);
public
List
<
Handover
>
selectHandoverNew
(
Handover
handover
);
// 按天更新
public
List
<
TransformHistoryNode
>
selectTransformHistoryNodeCheckByUpdate
(
TransformHistoryNode
obj
);
public
List
<
HandoverTask
>
selectHandoverTaskCheckByUpdate
(
HandoverTask
obj
);
public
List
<
TransformNewNode
>
selectTransformNewNodeCheckByUpdate
(
TransformNewNode
obj
);
public
List
<
Handover
>
selectHandoverCheckByUpdate
(
Handover
obj
);
public
Handover
selectHandoverById
(
Handover
target
);
public
HandoverTask
selectHandoverTaskById
(
HandoverTask
target
);
public
TransformNewNode
selectTransformNewNodeById
(
TransformNewNode
target
);
...
...
src/main/java/com/huazheng/project/mysql/model/TransformHistoryNode.java
浏览文件 @
743692a9
...
...
@@ -25,6 +25,7 @@ public class TransformHistoryNode implements Serializable {
private
String
task_no
;
// 送货单号
private
Date
last_commit_time
;
// 最后提交时间
private
Integer
second_node
;
// 第二个节点
private
Date
modified_time
;
// 修改时间
private
boolean
exist
;
// 用于标记,不是字段
private
String
hashResult
;
// 数据hash标记
...
...
src/main/resources/mapper/hana/SapMapper_hana.xml
浏览文件 @
743692a9
...
...
@@ -575,7 +575,6 @@
from ${hana_user}.Bkpf
where mandt = #{mandt} and bukrs = #{bukrs} and belnr = #{belnr} and gjahr = #{gjahr}
</select>
<select
id=
"selectLipsById"
parameterType=
"Lips"
resultType=
"Lips"
>
select
vbeln, posnr, vgbel, vgpos, mandt, matnr, matkl, arktx, werks, lgort,
...
...
src/main/resources/mapper/mssql/CrmMapper_mssql.xml
浏览文件 @
743692a9
...
...
@@ -22,7 +22,8 @@
from "Biz_销售预测流程" a
left join "Biz_销售预测流程_MX" b on a.SYS_INCIDENT = b.SYS_INCIDENT
where a.id
>
#{id} and b.id is not null
GROUP BY a.id, a.shenQingR, a.sys_Incstatus, a.sys_Processname, a.sys_Incident, a.shenQingRBM, a.yuCeLXt, a.kaiShiSJ, a.jieShuSJ, a.shenQingRLN, a.sys_updatetime
GROUP BY a.id, a.shenQingR, a.sys_Incstatus, a.sys_Processname, a.sys_Incident, a.shenQingRBM,
a.yuCeLXt, a.kaiShiSJ, a.jieShuSJ, a.shenQingRLN, a.sys_updatetime
</select>
<select
id=
"selectSampleApplicationProcessNew"
parameterType=
"SampleApplicationProcess"
resultType=
"SampleApplicationProcess"
>
select top 20
...
...
@@ -31,25 +32,26 @@
from "Biz_样品申请流程"
where id
>
#{id}
</select>
<select
id=
"selectSampleApplicationProcessMingXiNew"
parameterType=
"SampleApplicationProcessMingXi"
resultType=
"SampleApplicationProcessMingXi"
>
select top 20
id,sYS_INCIDENT,uLPH,wuLiaoMS,shuLiang,hangXiangMH, hangXiangMH as hangxiangmh1
from "Biz_样品申请流程_MingXi"
where id
>
#{id}
</select>
<select
id=
"selectSampleClosingProcessNew"
parameterType=
"SampleClosingProcess"
resultType=
"SampleClosingProcess"
>
select top 20
id,sYS_INCIDENT,yangPinSQSLH,sYS_INCSTATUS,sys_updatetime
from "Biz_样品结案流程"
where id
>
#{id}
</select>
<!-- 新增流程中关联的两个表 -->
<select
id=
"selectSampleApplicationProcessMingXiNew"
parameterType=
"SampleApplicationProcessMingXi"
resultType=
"SampleApplicationProcessMingXi"
>
select top 20
id,sYS_INCIDENT,uLPH,wuLiaoMS,shuLiang,hangXiangMH, hangXiangMH as hangxiangmh1
from "Biz_样品申请流程_MingXi"
where id
>
#{id}
</select>
<select
id=
"selectSampleClosingProcessMingXiNew"
parameterType=
"SampleClosingProcessMingXi"
resultType=
"SampleClosingProcessMingXi"
>
select top 20
id,sYS_INCIDENT,shiFouTGv,shiFouTGt
from "Biz_样品结案流程_MingXi"
where id
>
#{id}
</select>
<!-- process中的关联查询 -->
<select
id=
"selectSalesContractProcessMX"
parameterType=
"SalesContractProcess"
resultType=
"SalesContractProcessMX"
>
select id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz
from "Biz_销售合同流程_MX"
...
...
@@ -61,6 +63,80 @@
where SYS_INCIDENT = #{sysIncident}
</select>
<!-- 增量的方法 -->
<select
id=
"selectSalesContractProcessCheckByUpdate"
parameterType=
"SalesContractProcess"
resultType=
"SalesContractProcess"
>
select top 20
a.id, a.xiaoShouDDBH, a.xuFangGSID, a.xuFangGS, a.gongFangGSt, a.xiaoShouBMt, a.shouHuoGSID, a.shouHuoGS,
a.fuKuanTJt, a.caiGouDDBH, a.dangQianXYED, a.yvQiK, a.dengJi, a.biZhongt, a.yongJin, a.zongHeMLL,
a.SYS_PROCESSNAME as sysProcessname,
a.SYS_INCIDENT as sysIncident, a.ziShiYBv, a.sys_updatetime
from "Biz_销售合同流程" a
LEFT JOIN "Biz_销售合同流程_MX" b on a.SYS_INCIDENT = b.SYS_INCIDENT
where a.id
>
#{id} and b.id is not null
and a.sys_updatetime is not null and CONVERT(varchar(10),a.sys_updatetime,120) = CONVERT(varchar(10),GETDATE(),120)
group BY a.id, a.xiaoShouDDBH, a.xuFangGSID, a.xuFangGS, a.gongFangGSt, a.xiaoShouBMt, a.shouHuoGSID, a.shouHuoGS,
a.fuKuanTJt, a.caiGouDDBH, a.dangQianXYED, a.yvQiK, a.dengJi, a.biZhongt, a.yongJin, a.zongHeMLL,
a.SYS_PROCESSNAME, a.SYS_INCIDENT, a.ziShiYBv, a.sys_updatetime
</select>
<select
id=
"selectSalesForecastProcessCheckByUpdate"
parameterType=
"SalesForecastProcess"
resultType=
"SalesForecastProcess"
>
select top 20
a.id, a.shenQingR, a.sys_Incstatus as sysIncstatus, a.sys_Processname as sysProcessname, a.sys_Incident as sysIncident, a.shenQingRBM, a.yuCeLXt
, a.kaiShiSJ as kaiShiSJs, a.jieShuSJ as jieShuSJs, a.shenQingRLN, a.sys_updatetime
from "Biz_销售预测流程" a
left join "Biz_销售预测流程_MX" b on a.SYS_INCIDENT = b.SYS_INCIDENT
where a.id
>
#{id} and b.id is not null
and a.sys_updatetime is not null and CONVERT(varchar(10),a.sys_updatetime,120) = CONVERT(varchar(10),GETDATE(),120)
GROUP BY a.id, a.shenQingR, a.sys_Incstatus, a.sys_Processname, a.sys_Incident, a.shenQingRBM,
a.yuCeLXt, a.kaiShiSJ, a.jieShuSJ, a.shenQingRLN, a.sys_updatetime
</select>
<select
id=
"selectSampleApplicationProcessCheckByUpdate"
parameterType=
"SampleApplicationProcess"
resultType=
"SampleApplicationProcess"
>
select top 20
id,dingDanLXv,dingDanLXt,sYS_INCIDENT,yeWuYID,xuFangGS,xuFangGSID,
yangPinLXv,yangPinLXt,pCBCS,chanPinYY,jiFuBZ,sYS_UPDATETIME,concat(pCBCS,'层/',chanPinYY) as pCBCS2chanPinYY,ziSHiYBv
from "Biz_样品申请流程"
where id
>
#{id}
and sys_updatetime is not null and CONVERT(varchar(10),sys_updatetime,120) = CONVERT(varchar(10),GETDATE(),120)
</select>
<select
id=
"selectSampleClosingProcessCheckByUpdate"
parameterType=
"SampleClosingProcess"
resultType=
"SampleClosingProcess"
>
select top 20
id,sYS_INCIDENT,yangPinSQSLH,sYS_INCSTATUS,sys_updatetime
from "Biz_样品结案流程"
where id
>
#{id}
and sys_updatetime is not null and CONVERT(varchar(10),sys_updatetime,120) = CONVERT(varchar(10),GETDATE(),120)
</select>
<select
id=
"cascadeSalesContractProcessMXBySalesContractProcess"
parameterType=
"SalesContractProcess"
resultType=
"SalesContractProcessMX"
>
select top 20
id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz
from "Biz_销售合同流程_MX"
where SYS_INCIDENT = #{sysIncident}
</select>
<select
id=
"cascadeSalesForecastProcessMXBySalesForecastProcess"
parameterType=
"SalesForecastProcess"
resultType=
"SalesForecastProcessMX"
>
select top 20
id, wuLiaoH, wuLiaoMS, keHuMC, jiHuaJDL, mingXiMingC, sys_Incident as sysIncident
from "Biz_销售预测流程_MX"
where SYS_INCIDENT = #{sysIncident}
</select>
<select
id=
"cascadeSampleApplicationProcessMingXiBySampleApplicationProcess"
parameterType=
"SampleApplicationProcess"
resultType=
"SampleApplicationProcessMingXi"
>
select top 20
id,sYS_INCIDENT,uLPH,wuLiaoMS,shuLiang,hangXiangMH, hangXiangMH as hangxiangmh1
from "Biz_样品申请流程_MingXi"
where SYS_INCIDENT = #{sYS_INCIDENT}
</select>
<select
id=
"cascadeSampleClosingProcessMingXiBySampleClosingProcess"
parameterType=
"SampleClosingProcess"
resultType=
"SampleClosingProcessMingXi"
>
select top 20
id,sYS_INCIDENT,shiFouTGv,shiFouTGt
from "Biz_样品结案流程_MingXi"
where SYS_INCIDENT = #{sYS_INCIDENT}
</select>
<!-- 按主键查询 -->
<select
id=
"selectSalesContractProcessById"
parameterType=
"SalesContractProcess"
resultType=
"SalesContractProcess"
>
select
id, xiaoShouDDBH, xuFangGSID, xuFangGS, gongFangGSt, xiaoShouBMt, shouHuoGSID, shouHuoGS,
...
...
@@ -70,43 +146,45 @@
from "Biz_销售合同流程"
where id = #{id}
</select>
<select
id=
"selectSalesContractProcessMXById"
parameterType=
"SalesContractProcessMX"
resultType=
"SalesContractProcessMX"
>
select id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz
from "Biz_销售合同流程_MX"
where id = #{id}
</select>
<select
id=
"selectSalesForecastProcessById"
parameterType=
"SalesForecastProcess"
resultType=
"SalesForecastProcess"
>
select id, shenQingR, sys_Incstatus as sysIncstatus, sys_Processname as sysProcessname, sys_Incident as sysIncident, shenQingRBM, yuCeLXt
,kaiShiSJ as kaiShiSJs,jieShuSJ as jieShuSJs, shenQingRLN, sys_updatetime
from "Biz_销售预测流程"
where id = #{id}
</select>
<select
id=
"selectSalesForecastProcessMXById"
parameterType=
"SalesForecastProcessMX"
resultType=
"SalesForecastProcessMX"
>
select
id, wuLiaoH, wuLiaoMS, keHuMC, jiHuaJDL, mingXiMingC, sys_Incident as sysIncident
from "Biz_销售预测流程_MX"
where id = #{id}
</select>
<select
id=
"selectSampleApplicationProcessById"
parameterType=
"SampleApplicationProcess"
resultType=
"SampleApplicationProcess"
>
select id,dingDanLXv,dingDanLXt,sYS_INCIDENT,yeWuYID,xuFangGS,xuFangGSID,
yangPinLXv,yangPinLXt,pCBCS,chanPinYY,jiFuBZ,sYS_UPDATETIME,concat(pCBCS,'层/',chanPinYY) as pCBCS2chanPinYY,ziSHiYBv
from "Biz_样品申请流程"
where id = #{id}
</select>
<select
id=
"selectSampleApplicationProcessMingXiById"
parameterType=
"SampleApplicationProcessMingXi"
resultType=
"SampleApplicationProcessMingXi"
>
select id,sYS_INCIDENT,uLPH,wuLiaoMS,shuLiang,hangXiangMH, hangXiangMH as hangxiangmh1
from "Biz_样品申请流程_MingXi"
where id = #{id}
</select>
<select
id=
"selectSampleClosingProcessById"
parameterType=
"SampleClosingProcess"
resultType=
"SampleClosingProcess"
>
select id,sYS_INCIDENT,yangPinSQSLH,sYS_INCSTATUS,sys_updatetime
from "Biz_样品结案流程"
where id = #{id}
</select>
<select
id=
"selectSampleClosingProcessMingXiById"
parameterType=
"SampleClosingProcessMingXi"
resultType=
"SampleClosingProcessMingXi"
>
<select
id=
"selectSampleApplicationProcessMingXiById"
parameterType=
"SampleApplicationProcessMingXi"
resultType=
"SampleApplicationProcessMingXi"
>
select id,sYS_INCIDENT,uLPH,wuLiaoMS,shuLiang,hangXiangMH, hangXiangMH as hangxiangmh1
from "Biz_样品申请流程_MingXi"
where id = #{id}
</select>
<select
id=
"selectSampleClosingProcessMingXiById"
parameterType=
"SampleClosingProcessMingXi"
resultType=
"SampleClosingProcessMingXi"
>
select id,sYS_INCIDENT,shiFouTGv,shiFouTGt
from "Biz_样品结案流程_MingXi"
where id = #{id}
</select>
<select
id=
"selectSalesContractProcessMXById"
parameterType=
"SalesContractProcessMX"
resultType=
"SalesContractProcessMX"
>
select id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz
from "Biz_销售合同流程_MX"
where id = #{id}
</select>
<select
id=
"selectSalesForecastProcessMXById"
parameterType=
"SalesForecastProcessMX"
resultType=
"SalesForecastProcessMX"
>
select
id, wuLiaoH, wuLiaoMS, keHuMC, jiHuaJDL, mingXiMingC, sys_Incident as sysIncident
from "Biz_销售预测流程_MX"
where id = #{id}
</select>
</mapper>
src/main/resources/mapper/mysql/TmsMapper_mysql.xml
浏览文件 @
743692a9
...
...
@@ -4,7 +4,7 @@
<select
id=
"selectTransformHistoryNodeNew"
parameterType=
"TransformHistoryNode"
resultType=
"TransformHistoryNode"
>
select
id, task_no, last_commit_time, second_node
id, task_no, last_commit_time, second_node
,modified_time
from transform_history_node
where id
>
#{id}
limit 20
...
...
@@ -58,6 +58,69 @@
limit 20
</select>
<!-- modified_time是新追加的,调试的时候要注意 -->
<select
id=
"selectTransformHistoryNodeCheckByUpdate"
parameterType=
"TransformHistoryNode"
resultType=
"TransformHistoryNode"
>
select
id, task_no, last_commit_time, second_node, modified_time
from transform_history_node
where id
>
#{id}
AND modified_time IS NOT NULL AND DATE_FORMAT(modified_time,'%Y-%m-%d') = CURDATE()
limit 20
</select>
<select
id=
"selectHandoverTaskCheckByUpdate"
parameterType=
"HandoverTask"
resultType=
"HandoverTask"
>
select
a.task_id, a.task_no, a.task_type, a.task_state, a.f_plant, a.plant, a.customer_id,
customer_name, a.kunnr, a.actual_handover_num, a.receipt_state, a.receipt_time,
cost_state, a.cost_handle_time, a.handover_print_state, a.last_print_time,
appearance_state, a.appearance_time, a.company_id, a.company_no, a.company_name,
netweight_count, a.weight_count, a.handover_direct_count, a.transport_type, a.vehicle_type,
delivery_cost, a.delivery_date, a.sign_time, a.area_name, a.area_id, a.port, a.delivery_type,
dispatch_type, a.piece_count, a.remark, a.is_valid, a.created_user_id, a.created_time,
modified_user_id, a.modified_time, a.receipt_remark,b.s12,b.s21,b.s24
from handover_task a
LEFT JOIN (
SELECT
task_no,
MAX(IF(second_node='12',last_commit_time,NULL)) AS s12,
MAX(IF(second_node='21',last_commit_time,NULL)) AS s21,
MAX(IF(second_node='24',last_commit_time,NULL)) AS s24
FROM transform_history_node
GROUP BY task_no
) b ON a.task_no = b.task_no
where a.task_id
>
#{task_id}
AND a.modified_time IS NOT NULL AND DATE_FORMAT(a.modified_time,'%Y-%m-%d') = CURDATE()
limit 20
</select>
<select
id=
"selectTransformNewNodeCheckByUpdate"
parameterType=
"TransformNewNode"
resultType=
"TransformNewNode"
>
select id, task_id, task_no, vehicle_no, last_commit_time, first_node, second_node,
vehicle_type, driver, driver_phone, location, exception_comment, comit_type,
exception_type, exception_picture, is_valid, lon, lat, created_user_id,
created_time, modified_user_id, modified_time
from transform_new_node
where id
>
#{id}
AND modified_time IS NOT NULL AND DATE_FORMAT(modified_time,'%Y-%m-%d') = CURDATE()
limit 20
</select>
<select
id=
"selectHandoverCheckByUpdate"
parameterType=
"Handover"
resultType=
"Handover"
>
select
vbeln, task_id, handover_id, handover_type, order_type, task_no, sale_no,
delivery_type, handover_state, f_plant, plant, customer_id, customer_name,
fmenge, delivery_num, port, piect_total, total_net_weight, weight_total,
settlement_weight, weight_state, vrkme, average_freight, order_remark,
delivery_time, erdat, plan_product_time, open_ready_time, already_ready_time,
appearance_time, sign_time, edatu, area_no, area_name, fmenge_time, klabc,
sales_man, sales_department, is_valid, created_user_id, created_time,
modified_user_id, modified_time, remark, is_auto_created, delivery_state,
operate_tag, transport_time, is_date_success, is_num_success, is_sign_success,
weighing_weight, delivery_issued_time
from handover
where handover_id
>
#{handover_id}
AND modified_time IS NOT NULL AND DATE_FORMAT(modified_time,'%Y-%m-%d') = CURDATE()
limit 20
</select>
<select
id=
"selectHandoverById"
parameterType=
"Handover"
resultType=
"Handover"
>
select
vbeln, task_id, handover_id, handover_type, order_type, task_no, sale_no,
...
...
@@ -103,7 +166,7 @@
from transform_new_node where id = #{id}
</select>
<select
id=
"selectTransformHistoryNodeById"
parameterType=
"TransformHistoryNode"
resultType=
"TransformHistoryNode"
>
select id, task_no, last_commit_time, second_node
select id, task_no, last_commit_time, second_node
, modified_time
from transform_history_node where id = #{id}
</select>
...
...
src/main/resources/spring-init.xml
浏览文件 @
743692a9
...
...
@@ -614,15 +614,6 @@
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"deleteUpdateJobServiceImpl"
/>
<property
name=
"targetMethod"
value=
"checkJob1"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"deleteUpdateJobServiceImpl"
/>
<property
name=
"targetMethod"
value=
"checkJob2"
/>
</bean>
</property>
...
...
@@ -632,15 +623,6 @@
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"deleteUpdateJobServiceImpl"
/>
<property
name=
"targetMethod"
value=
"checkJob3"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"deleteUpdateJobServiceImpl"
/>
<property
name=
"targetMethod"
value=
"checkJob4"
/>
</bean>
</property>
...
...
@@ -797,6 +779,82 @@
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkUpdateServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSalesContractProcessCheckUpdate"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkUpdateServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSalesForecastProcessCheckUpdate"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkUpdateServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSampleApplicationProcessCheckUpdate"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkUpdateServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSampleClosingProcessCheckUpdate"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkUpdateServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectHandoverCheckUpdate"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkUpdateServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectHandoverTaskCheckUpdate"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkUpdateServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectTransformHistoryNodeCheckUpdate"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkUpdateServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectTransformNewNodeCheckUpdate"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<!-- 删除流程 -->
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
...
...
@@ -997,6 +1055,118 @@
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSalesContractProcessCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSalesForecastProcessCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSampleApplicationProcessCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSampleClosingProcessCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectHandoverCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectHandoverTaskCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectTransformHistoryNodeCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectTransformNewNodeCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSalesContractProcessMXCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSalesForecastProcessMXCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSampleApplicationProcessMingXiCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
<bean
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
>
<bean
parent=
"methodJobDetail"
>
<property
name=
"targetObject"
ref=
"checkDeleteServiceImpl"
/>
<property
name=
"targetMethod"
value=
"selectSampleClosingProcessMingXiCheckByDelete"
/>
</bean>
</property>
<property
name=
"cronExpression"
value=
"* * * * * ?"
/>
</bean>
</list>
</constructor-arg>
</bean>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论