Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
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
常超
map-parent
Commits
3055d260
Commit
3055d260
authored
Sep 22, 2023
by
Guojunfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PowerJob相关代码更新,调通线上侦查专项关联四种状态更新
parent
e1b88338
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
155 additions
and
13 deletions
+155
-13
common/common_utils/src/main/java/com/founder/commonutils/model/PowerJobParams.java
+14
-0
common/common_utils/src/main/java/com/founder/commonutils/model/zczxEntity/ZczxDto.java
+6
-0
service/powerjob/powerjob-server-common/pom.xml
+1
-1
service/powerjob/powerjob-server-extension/src/main/java/tech/powerjob/server/extension/defaultimpl/alarm/impl/DingTalkAlarmService.java
+1
-2
service/powerjob/powerjob-server-starter/pom.xml
+1
-1
service/powerjob/powerjob-server-starter/src/main/resources/application-daily.properties
+3
-3
service/publicapi/pom.xml
+1
-1
service/publicapi/src/main/java/com/founder/publicapi/controller/DgServiceController/PowerJobController.java
+8
-2
service/publicapi/src/main/java/com/founder/publicapi/service/PowerJobService.java
+2
-0
service/publicapi/src/main/java/com/founder/publicapi/service/serviceimpl/PowerJobServiceImpl.java
+117
-2
service/publicapi/src/main/resources/bootstrap-prod.properties
+1
-1
No files found.
common/common_utils/src/main/java/com/founder/commonutils/model/PowerJobParams.java
0 → 100644
View file @
3055d260
package
com
.
founder
.
commonutils
.
model
;
import
lombok.Data
;
/**
* @author Godffy
* @create 2023-09-21 15:27
*/
@Data
public
class
PowerJobParams
{
private
int
limit
;
}
common/common_utils/src/main/java/com/founder/commonutils/model/zczxEntity/ZczxDto.java
View file @
3055d260
...
...
@@ -243,4 +243,10 @@ public class ZczxDto extends BaseDto {
@ApiModelProperty
(
value
=
"侦查专项状态"
)
private
String
zczxState
;
@ApiModelProperty
(
value
=
"powerJob定时任务开始num"
)
private
int
begin
;
@ApiModelProperty
(
value
=
"powerJob定时任务结束num"
)
private
int
end
;
}
service/powerjob/powerjob-server-common/pom.xml
View file @
3055d260
...
...
@@ -6,7 +6,7 @@
<artifactId>
powerjob-server
</artifactId>
<groupId>
tech.powerjob
</groupId>
<version>
4.3.0
</version>
<relativePath
>
../pom.xml
</relativePath
>
<relativePath
/
>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
service/powerjob/powerjob-server-extension/src/main/java/tech/powerjob/server/extension/defaultimpl/alarm/impl/DingTalkAlarmService.java
View file @
3055d260
...
...
@@ -8,7 +8,6 @@ import lombok.RequiredArgsConstructor;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.core.env.Environment
;
import
org.springframework.stereotype.Service
;
import
tech.powerjob.common.OmsConstant
;
import
tech.powerjob.common.exception.PowerJobException
;
import
tech.powerjob.common.utils.NetUtils
;
...
...
@@ -29,7 +28,7 @@ import java.util.Set;
* @since 2020/8/6
*/
@Slf4j
@Service
//
@Service
@RequiredArgsConstructor
public
class
DingTalkAlarmService
implements
Alarmable
{
...
...
service/powerjob/powerjob-server-starter/pom.xml
View file @
3055d260
...
...
@@ -51,7 +51,7 @@
<!-- SpringBoot maven plugin -->
<build>
<finalName>
powerjob
7700
</finalName>
<finalName>
powerjob
</finalName>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
...
...
service/powerjob/powerjob-server-starter/src/main/resources/application-daily.properties
View file @
3055d260
...
...
@@ -3,9 +3,9 @@ logging.config=classpath:logback-dev.xml
####### \u5916\u90E8\u6570\u636E\u5E93\u914D\u7F6E\uFF08\u9700\u8981\u7528\u6237\u66F4\u6539\u4E3A\u81EA\u5DF1\u7684\u6570\u636E\u5E93\u914D\u7F6E\uFF09 #######
spring.datasource.core.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.core.jdbc-url
=
jdbc:mysql://
47.92.48.137:3900/skyp
?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
spring.datasource.core.username
=
root
spring.datasource.core.password
=
gkptCcYy123
spring.datasource.core.jdbc-url
=
jdbc:mysql://
68.174.69.120:4306/WSWX
?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
spring.datasource.core.username
=
XZXT
spring.datasource.core.password
=
XZXT#44
spring.datasource.core.maximum-pool-size
=
20
spring.datasource.core.minimum-idle
=
5
...
...
service/publicapi/pom.xml
View file @
3055d260
...
...
@@ -11,7 +11,7 @@
<artifactId>
publicapi
</artifactId>
<build>
<finalName>
publicapi
1003
</finalName>
<finalName>
publicapi
</finalName>
<!--添加标签,防止编译时excel损坏-->
<resources>
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/DgServiceController/PowerJobController.java
View file @
3055d260
package
com
.
founder
.
publicapi
.
controller
.
DgServiceController
;
import
com.founder.publicapi.service.PowerJobService
;
import
com.alibaba.fastjson.JSONObject
;
import
com.founder.commonutils.model.PowerJobParams
;
import
com.founder.publicapi.service.*
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -21,7 +23,11 @@ public class PowerJobController implements BasicProcessor {
@Override
public
ProcessResult
process
(
TaskContext
context
)
{
System
.
out
.
println
(
"定时测试----------------------------------------相关业务"
);
String
jobParams
=
context
.
getJobParams
();
PowerJobParams
powerJobParams
=
JSONObject
.
parseObject
(
jobParams
,
PowerJobParams
.
class
);
powerJobService
.
updateZczxRelate
(
powerJobParams
);
return
new
ProcessResult
(
true
,
"服务概述执行成功"
);
}
}
service/publicapi/src/main/java/com/founder/publicapi/service/PowerJobService.java
View file @
3055d260
package
com
.
founder
.
publicapi
.
service
;
import
com.founder.commonutils.model.PowerJobParams
;
import
com.founder.commonutils.model.zczxEntity.XjCount
;
import
java.util.List
;
...
...
@@ -12,4 +13,5 @@ public interface PowerJobService {
List
<
XjCount
>
selectSfxjByAsjbh
(
String
asjbh
);
void
updateZczxRelate
(
PowerJobParams
powerJobParams
);
}
service/publicapi/src/main/java/com/founder/publicapi/service/serviceimpl/PowerJobServiceImpl.java
View file @
3055d260
package
com
.
founder
.
publicapi
.
service
.
serviceimpl
;
import
com.founder.commonutils.model.zczxEntity.XjCount
;
import
com.founder.publicapi.mapper.mysqlMapper.PowerJobMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.founder.commonutils.model.PowerJobParams
;
import
com.founder.commonutils.model.zczxEntity.*
;
import
com.founder.publicapi.mapper.mysqlMapper.*
;
import
com.founder.publicapi.service.PowerJobService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
/**
* @author Godffy
...
...
@@ -18,9 +24,118 @@ public class PowerJobServiceImpl implements PowerJobService {
@Autowired
private
PowerJobMapper
powerJobMapper
;
@Autowired
private
ZczxMapper
zczxMapper
;
@Autowired
private
TbStAsjMapper
tbStAsjMapper
;
@Autowired
private
TbXwZbfzxyrMapper
tbXwZbfzxyrMapper
;
@Resource
private
TbYwXszCbajMapper
tbYwXszCbajMapper
;
@Override
public
List
<
XjCount
>
selectSfxjByAsjbh
(
String
asjbh
)
{
List
<
XjCount
>
xjCounts
=
this
.
powerJobMapper
.
selectSfxjByAsjbh
(
asjbh
);
return
xjCounts
;
}
@Override
public
void
updateZczxRelate
(
PowerJobParams
powerJobParams
)
{
int
limit
=
powerJobParams
.
getLimit
();
QueryWrapper
<
Zczx
>
qw
=
new
QueryWrapper
<>();
qw
.
isNotNull
(
"asjbh"
);
qw
.
eq
(
"xxsc_pdbz"
,
"0"
);
int
size
=
zczxMapper
.
selectCount
(
qw
);
long
threadNum
=
size
/
limit
;
int
startnum
=
0
;
int
endnum
=
0
;
ExecutorService
executorService
=
Executors
.
newCachedThreadPool
();
//按需分配线程池,其实最好自定义线程池
for
(
int
i
=
0
;
i
<
threadNum
+
1
;
i
++)
{
startnum
=
i
*
limit
+
1
;
endnum
=
((
i
+
1
)
*
limit
);
if
(
startnum
>
size
)
{
break
;
}
if
(
endnum
>
size
)
{
endnum
=
size
;
}
if
(
startnum
==
endnum
)
{
break
;
}
ZczxDto
zczxDto
=
new
ZczxDto
();
//分页查侦查专项
zczxDto
.
setBegin
(
startnum
);
zczxDto
.
setEnd
(
endnum
);
System
.
out
.
println
(
"批量分流===========开始"
+
startnum
+
"===结束==="
+
endnum
);
List
<
Zczx
>
syrkList
=
zczxMapper
.
selectZczxList
(
zczxDto
);
System
.
out
.
println
(
"批量分流===========开始"
+
startnum
+
"===结束==="
+
endnum
+
"====总数"
+
syrkList
.
size
());
HandleThreadZczx
thread
=
new
HandleThreadZczx
(
syrkList
);
executorService
.
execute
(
thread
);
}
}
class
HandleThreadZczx
extends
Thread
{
private
List
<
Zczx
>
data
;
public
HandleThreadZczx
(
List
<
Zczx
>
data
)
{
this
.
data
=
data
;
}
public
void
run
()
{
for
(
Zczx
zczx
:
data
)
{
String
asjbh
=
zczx
.
getAsjbh
();
//如果有案件编号,关联图侦、刑技、抓捕、串并状态
if
(
StringUtils
.
isNotBlank
(
asjbh
))
{
//关联图侦
QueryWrapper
<
TbStAsj
>
tbStAsjQueryWrapper
=
new
QueryWrapper
<>();
tbStAsjQueryWrapper
.
eq
(
"asjbh"
,
asjbh
);
tbStAsjQueryWrapper
.
eq
(
"xxsc_pdbz"
,
"0"
);
TbStAsj
asj
=
tbStAsjMapper
.
selectOne
(
tbStAsjQueryWrapper
);
if
(
asj
!=
null
)
{
String
tzPdbzDg
=
asj
.
getTzPdbzDg
();
//是否图侦
if
(
StringUtils
.
isNotBlank
(
tzPdbzDg
)
&&
tzPdbzDg
.
equals
(
"1"
))
{
zczx
.
setSftzPdbz
(
"1"
);
//图侦状态设为"1"
}
}
//关联刑技(勘验信息queryXckcInfo、现场指纹getXcZwbzList、指纹比中getZwbzList、DNA比中getDnabzList)
List
<
XjCount
>
xjCounts
=
powerJobMapper
.
selectSfxjByAsjbh
(
asjbh
);
int
counts
=
0
;
//刑技能关联出来的数量
for
(
int
i
=
0
;
i
<
xjCounts
.
size
();
i
++)
{
XjCount
xjCount
=
xjCounts
.
get
(
i
);
counts
=
counts
+
xjCount
.
getCounts
();
}
if
(
counts
>
0
)
{
//如果上面4个条件,只要有数据返回,则认为有刑技数据
zczx
.
setSfxjPdbz
(
"1"
);
//刑技状态设为"1"
}
//关联抓捕
QueryWrapper
<
TbXwZbfzxyr
>
tbXwZbfzxyrQueryWrapper
=
new
QueryWrapper
<>();
tbXwZbfzxyrQueryWrapper
.
eq
(
"asjbh"
,
asjbh
);
tbXwZbfzxyrQueryWrapper
.
eq
(
"xxsc_pdbz"
,
"0"
);
TbXwZbfzxyr
zbfzxyr
=
tbXwZbfzxyrMapper
.
selectOne
(
tbXwZbfzxyrQueryWrapper
);
if
(
zbfzxyr
!=
null
)
{
String
zhfzxyrFzxyrdaztdm
=
zbfzxyr
.
getZhfzxyrFzxyrdaztdm
();
//到案状态
if
(
StringUtils
.
isNotBlank
(
zhfzxyrFzxyrdaztdm
)
&&
zhfzxyrFzxyrdaztdm
.
equals
(
"1"
))
{
zczx
.
setSfzbPdbz
(
"1"
);
//抓捕状态设为"1"
}
}
//关联串并
QueryWrapper
<
TbYwXszCbaj
>
tbYwXszCbajQueryWrapper
=
new
QueryWrapper
<>();
tbYwXszCbajQueryWrapper
.
eq
(
"asjbh"
,
asjbh
);
tbYwXszCbajQueryWrapper
.
eq
(
"xxsc_pdbz"
,
"0"
);
TbYwXszCbaj
tbYwXszCbaj
=
tbYwXszCbajMapper
.
selectOne
(
tbYwXszCbajQueryWrapper
);
if
(
tbYwXszCbaj
!=
null
)
{
zczx
.
setSfcbaPdbz
(
"1"
);
//串并案状态设为"1"
}
//更新一下侦查专项关联的状态
zczxMapper
.
updateById
(
zczx
);
}
}
}
}
}
service/publicapi/src/main/resources/bootstrap-prod.properties
View file @
3055d260
...
...
@@ -115,7 +115,7 @@ management.endpoint.logfile.enabled=true
management.endpoint.logfile.external-file
=
/data2/skglpt/publicapi1003.log
#\uFFFD\u01F7\uFFFD\uFFFD\uFFFDpowerjob
powerjob.worker.enabled
=
fals
e
powerjob.worker.enabled
=
tru
e
# akka \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u02FF\u06A3\uFFFD\uFFFD\uFFFD\u0461\uFFFD\uFFFD\u012C\uFFFD\uFFFD 27778
powerjob.worker.akka-port
=
27778
# \uFFFD\uFFFD\uFFFD\uFFFD\u04E6\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u01A3\uFFFD\uFFFD\uFFFD\uFFFD\u06B7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uB8EC\uFFFD\u01BC\uFFFD\uFFFD\uFFFD\u0434 \uFFFD\uFFFD Java \uFFFD\uFFFD\u013F\uFFFD\uFFFD\uFFFD\uFFFD
...
...
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