Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
inference-game
Project
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
叶兴兴
inference-game
Commits
c8e46324
Commit
c8e46324
authored
Feb 16, 2023
by
叶兴兴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉多余的方法
parent
e1890704
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
82 deletions
+3
-82
PersonRecordController.java
...com/qiwu/inference/controller/PersonRecordController.java
+3
-82
No files found.
src/main/java/com/qiwu/inference/controller/PersonRecordController.java
View file @
c8e46324
...
@@ -618,50 +618,6 @@ public class PersonRecordController {
...
@@ -618,50 +618,6 @@ public class PersonRecordController {
return
(
""
.
equals
(
builder
.
toString
()))
?
"无"
:
builder
.
toString
();
return
(
""
.
equals
(
builder
.
toString
()))
?
"无"
:
builder
.
toString
();
}
}
/**
* 分配的线索
*
* @param subject
* @return
*/
public
String
convertAllocationClue
(
Integer
subject
)
{
//List<ClueRecord> clueRecordList=clueRecordService.getClueRecords(subject);
List
<
RelationRecord
>
relationRecordList
=
relationRecordService
.
getRelationRecords
(
subject
);
Map
<
Integer
,
Integer
>
map
=
new
HashMap
<>();
for
(
RelationRecord
relationRecord
:
relationRecordList
)
{
if
(!
map
.
containsKey
(
relationRecord
.
getObject
()))
{
map
.
put
(
relationRecord
.
getObject
(),
relationRecord
.
getMasterInfoLevel
());
}
else
{
if
(
map
.
get
(
relationRecord
.
getObject
())
<
relationRecord
.
getMasterInfoLevel
())
{
map
.
put
(
relationRecord
.
getObject
(),
relationRecord
.
getMasterInfoLevel
());
}
}
}
List
<
ClueRecord
>
clueRecordList
=
new
ArrayList
<>();
for
(
Integer
key
:
map
.
keySet
())
{
clueRecordList
.
addAll
(
clueRecordService
.
getClueRecords
(
key
,
map
.
get
(
key
)));
}
Set
<
String
>
obj
=
new
HashSet
<>();
for
(
ClueRecord
clueRecord
:
clueRecordList
)
{
Clue
clue
=
clueService
.
getById
(
clueRecord
.
getClueId
());
double
prob
=
RandomUtil
.
randomDouble
(
2
,
RoundingMode
.
HALF_UP
);
if
(
prob
<
Double
.
parseDouble
(
clue
.
getProb
()))
{
if
(!
StringUtils
.
isEmpty
(
clueRecord
.
getClueTemplate
()))
{
obj
.
add
(
clueRecord
.
getClueTemplate
());
}
}
}
StringBuilder
builder
=
new
StringBuilder
();
for
(
String
description
:
obj
)
{
builder
.
append
(
String
.
format
(
" %s \n "
,
description
));
}
return
(
""
.
equals
(
builder
.
toString
()))
?
"无"
:
builder
.
toString
();
}
/**
/**
* 分配的线索
* 分配的线索
*
*
...
@@ -687,7 +643,7 @@ public class PersonRecordController {
...
@@ -687,7 +643,7 @@ public class PersonRecordController {
clueRecordList
.
addAll
(
clueRecordService
.
getClueRecords
(
key
,
map
.
get
(
key
)));
clueRecordList
.
addAll
(
clueRecordService
.
getClueRecords
(
key
,
map
.
get
(
key
)));
}
}
Set
<
String
>
obj
=
new
HashSet
<>();
Set
<
String
>
obj
=
new
HashSet
<>();
List
<
ClueRecord
>
cueRecordResult
=
new
ArrayList
<>();
List
<
ClueRecord
>
c
l
ueRecordResult
=
new
ArrayList
<>();
for
(
ClueRecord
clueRecord
:
clueRecordList
)
{
for
(
ClueRecord
clueRecord
:
clueRecordList
)
{
...
@@ -698,7 +654,7 @@ public class PersonRecordController {
...
@@ -698,7 +654,7 @@ public class PersonRecordController {
obj
.
add
(
clueRecord
.
getClueTemplate
()
+
"("
+
clue
.
getTrustDegree
()
+
"|"
+
clue
.
getDeterrenceDegree
()
+
")"
);
obj
.
add
(
clueRecord
.
getClueTemplate
()
+
"("
+
clue
.
getTrustDegree
()
+
"|"
+
clue
.
getDeterrenceDegree
()
+
")"
);
clueRecord
.
setTrustDegree
(
clue
.
getTrustDegree
());
clueRecord
.
setTrustDegree
(
clue
.
getTrustDegree
());
clueRecord
.
setDeterrenceDegree
(
clue
.
getDeterrenceDegree
());
clueRecord
.
setDeterrenceDegree
(
clue
.
getDeterrenceDegree
());
cueRecordResult
.
add
(
clueRecord
);
c
l
ueRecordResult
.
add
(
clueRecord
);
}
}
}
}
}
}
...
@@ -707,45 +663,10 @@ public class PersonRecordController {
...
@@ -707,45 +663,10 @@ public class PersonRecordController {
builder
.
append
(
String
.
format
(
" %s \n "
,
description
));
builder
.
append
(
String
.
format
(
" %s \n "
,
description
));
}
}
result
.
put
(
"1"
,
(
""
.
equals
(
builder
.
toString
()))
?
"无"
:
builder
.
toString
());
result
.
put
(
"1"
,
(
""
.
equals
(
builder
.
toString
()))
?
"无"
:
builder
.
toString
());
result
.
put
(
"2"
,
cueRecordResult
);
result
.
put
(
"2"
,
clueRecordResult
);
return
result
;
}
public
List
<
ClueRecord
>
allocationClue
(
Integer
subject
)
{
List
<
RelationRecord
>
relationRecordList
=
relationRecordService
.
getRelationRecords
(
subject
);
Map
<
Integer
,
Integer
>
map
=
new
HashMap
<>();
for
(
RelationRecord
relationRecord
:
relationRecordList
)
{
if
(!
map
.
containsKey
(
relationRecord
.
getObject
()))
{
map
.
put
(
relationRecord
.
getObject
(),
relationRecord
.
getMasterInfoLevel
());
}
else
{
if
(
map
.
get
(
relationRecord
.
getObject
())
<
relationRecord
.
getMasterInfoLevel
())
{
map
.
put
(
relationRecord
.
getObject
(),
relationRecord
.
getMasterInfoLevel
());
}
}
}
List
<
ClueRecord
>
clueRecordList
=
new
ArrayList
<>();
for
(
Integer
key
:
map
.
keySet
())
{
clueRecordList
.
addAll
(
clueRecordService
.
getClueRecords
(
key
,
map
.
get
(
key
)));
}
List
<
ClueRecord
>
result
=
new
ArrayList
<>();
for
(
ClueRecord
clueRecord
:
clueRecordList
)
{
Clue
clue
=
clueService
.
getById
(
clueRecord
.
getClueId
());
double
prob
=
RandomUtil
.
randomDouble
(
2
,
RoundingMode
.
HALF_UP
);
if
(
prob
<
Double
.
parseDouble
(
clue
.
getProb
()))
{
clueRecord
.
setTrustDegree
(
clue
.
getTrustDegree
());
clueRecord
.
setDeterrenceDegree
(
clue
.
getDeterrenceDegree
());
result
.
add
(
clueRecord
);
}
}
return
result
;
return
result
;
}
}
/**
/**
* 根据身份生成一个人物
* 根据身份生成一个人物
*
*
...
...
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