Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
24e1ef84
Commit
24e1ef84
authored
Jul 22, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一分钟之内没完成 就重试
parent
85b2ef3c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
0 deletions
+43
-0
PreDealLogMapper.java
...ic/haoban/manage/service/dao/mapper/PreDealLogMapper.java
+10
-0
PreDealService.java
...com/gic/haoban/manage/service/service/PreDealService.java
+7
-0
PreDealServiceImpl.java
...aoban/manage/service/service/impl/PreDealServiceImpl.java
+7
-0
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+11
-0
PreDealLogMapper.xml
...e3-service/src/main/resources/mapper/PreDealLogMapper.xml
+8
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/PreDealLogMapper.java
View file @
24e1ef84
...
@@ -151,4 +151,13 @@ public interface PreDealLogMapper {
...
@@ -151,4 +151,13 @@ public interface PreDealLogMapper {
*/
*/
public
int
countByDataId
(
@Param
(
"taskId"
)
String
taskId
,
@Param
(
"dataId"
)
String
dataId
,
@Param
(
"dataType"
)
int
dataType
);
public
int
countByDataId
(
@Param
(
"taskId"
)
String
taskId
,
@Param
(
"dataId"
)
String
dataId
,
@Param
(
"dataType"
)
int
dataType
);
/**
* 统计任务数量
* countExcepAndPreByTaskId
*
* @param taskId
* @return
*/
public
TabHaobanPreDealLog
getLastPreDataByTaskId
(
@Param
(
"taskId"
)
String
taskId
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/PreDealService.java
View file @
24e1ef84
...
@@ -138,4 +138,11 @@ public interface PreDealService {
...
@@ -138,4 +138,11 @@ public interface PreDealService {
* @return
* @return
*/
*/
public
boolean
existDataId
(
String
taskId
,
String
dataId
);
public
boolean
existDataId
(
String
taskId
,
String
dataId
);
/**
* 获取最近的数据
*
* @return
*/
public
PreDealLogInfoDTO
getLastPreDataByTaskId
(
String
taskId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/PreDealServiceImpl.java
View file @
24e1ef84
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.impl;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.impl;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.PreDealLogInfoDTO
;
import
com.gic.haoban.manage.api.dto.PreDealLogInfoDTO
;
import
com.gic.haoban.manage.api.dto.SyncCheckDTO
;
import
com.gic.haoban.manage.api.dto.SyncCheckDTO
;
...
@@ -120,4 +121,10 @@ public class PreDealServiceImpl implements PreDealService {
...
@@ -120,4 +121,10 @@ public class PreDealServiceImpl implements PreDealService {
int
i
=
preDealLogMapper
.
countByDataId
(
taskId
,
dataId
,
PreDealTypeEnum
.
clerk
.
getVal
());
int
i
=
preDealLogMapper
.
countByDataId
(
taskId
,
dataId
,
PreDealTypeEnum
.
clerk
.
getVal
());
return
i
>
0
;
return
i
>
0
;
}
}
@Override
public
PreDealLogInfoDTO
getLastPreDataByTaskId
(
String
taskId
)
{
TabHaobanPreDealLog
preDealLog
=
preDealLogMapper
.
getLastPreDataByTaskId
(
taskId
);
return
EntityUtil
.
changeEntityByOrika
(
PreDealLogInfoDTO
.
class
,
preDealLog
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
24e1ef84
...
@@ -37,6 +37,7 @@ import com.task.allocation.exception.TaskAllocationException;
...
@@ -37,6 +37,7 @@ import com.task.allocation.exception.TaskAllocationException;
import
com.task.allocation.qo.TaskAllocationComputed
;
import
com.task.allocation.qo.TaskAllocationComputed
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -449,6 +450,16 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
...
@@ -449,6 +450,16 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
TabHaobanSyncTask
syncTask
=
syncTaskService
.
getSyncTask
(
taskId
);
TabHaobanSyncTask
syncTask
=
syncTaskService
.
getSyncTask
(
taskId
);
syncCheckDTO
.
setSyncStatus
(
syncTask
.
getStatusFlag
());
syncCheckDTO
.
setSyncStatus
(
syncTask
.
getStatusFlag
());
PreDealLogInfoDTO
dealLogInfoDTO
=
preDealService
.
getLastPreDataByTaskId
(
taskId
);
//一分钟内没执行就重试
Date
date
=
DateUtils
.
addMinutes
(
new
Date
(),
-
1
);
if
(
dealLogInfoDTO
.
getUpdateTime
().
before
(
date
))
{
logger
.
info
(
"重试:{}"
,
taskId
);
syncTaskService
.
updateTaskStatus
(
taskId
,
SyncTaskStatusEnum
.
exception_close
.
getVal
());
reDealDepartment
(
taskId
,-
1
);
return
syncCheckDTO
;
}
int
totalCount
=
preDealService
.
countByTaskId
(
taskId
,
-
1
,
-
1
);
int
totalCount
=
preDealService
.
countByTaskId
(
taskId
,
-
1
,
-
1
);
int
groupErrCount
=
preDealService
.
countByTaskId
(
taskId
,
PreDealTypeEnum
.
group
.
getVal
(),
PreDealStatusEnum
.
exception
.
getVal
());
int
groupErrCount
=
preDealService
.
countByTaskId
(
taskId
,
PreDealTypeEnum
.
group
.
getVal
(),
PreDealStatusEnum
.
exception
.
getVal
());
int
storeErrCount
=
preDealService
.
countByTaskId
(
taskId
,
PreDealTypeEnum
.
store
.
getVal
(),
PreDealStatusEnum
.
exception
.
getVal
());
int
storeErrCount
=
preDealService
.
countByTaskId
(
taskId
,
PreDealTypeEnum
.
store
.
getVal
(),
PreDealStatusEnum
.
exception
.
getVal
());
...
...
haoban-manage3-service/src/main/resources/mapper/PreDealLogMapper.xml
View file @
24e1ef84
...
@@ -318,4 +318,11 @@
...
@@ -318,4 +318,11 @@
and data_type=#{dataType}
and data_type=#{dataType}
</if>
</if>
</select>
</select>
<select
id=
"getLastPreDataByTaskId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId,jdbcType=INTEGER} order by update_time desc limit 1
</select>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment