Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
confg-server-api
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
杨阔
confg-server-api
Commits
107c7f4b
Commit
107c7f4b
authored
Sep 13, 2021
by
yangkuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口
parent
5ddf32e1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
4 deletions
+80
-4
ConfiguratorV2Controller.java
...ch/authorization/controller/ConfiguratorV2Controller.java
+10
-0
TellMeWhyInputDTO.java
...main/java/cn/com/uitech/config/dto/TellMeWhyInputDTO.java
+33
-0
TellMeWhyOutputDTO.java
...ain/java/cn/com/uitech/config/dto/TellMeWhyOutputDTO.java
+24
-0
ConfiguratorV2Service.java
...a/cn/com/uitech/config/service/ConfiguratorV2Service.java
+8
-0
ConfiguratorCacheServiceImpl.java
...ech/config/service/impl/ConfiguratorCacheServiceImpl.java
+4
-4
ConfiguratorV2ServiceImpl.java
...uitech/config/service/impl/ConfiguratorV2ServiceImpl.java
+0
-0
application-cf-tst.yml
src/main/resources/application-cf-tst.yml
+1
-0
No files found.
src/main/java/cn/com/uitech/authorization/controller/ConfiguratorV2Controller.java
View file @
107c7f4b
...
...
@@ -76,4 +76,14 @@ public class ConfiguratorV2Controller {
businessKeyHelper
.
getDataSourceFlag
(
postValidationInputV2DTO
.
getBusinessKey
()));
}
@ApiOperation
(
value
=
"异常验证"
,
notes
=
"异常验证"
)
@PostMapping
(
value
=
"/tellMeWhy"
)
@ResponseStatus
(
HttpStatus
.
OK
)
// @BizLog(action = "异常验证")
public
TellMeWhyOutputDTO
tellMeWhy
(
@RequestBody
TellMeWhyInputDTO
tellMeWhyInputDTO
)
{
return
configuratorV2Service
.
tellMeWhy
(
tellMeWhyInputDTO
,
businessKeyHelper
.
getTokenByBusinessKey
(
tellMeWhyInputDTO
.
getBusinessKey
()),
businessKeyHelper
.
getDataSourceFlag
(
tellMeWhyInputDTO
.
getBusinessKey
()));
}
}
src/main/java/cn/com/uitech/config/dto/TellMeWhyInputDTO.java
0 → 100644
View file @
107c7f4b
package
cn
.
com
.
uitech
.
config
.
dto
;
//import com.lenovo.ccb.common.annotation.Key;
//import com.lenovo.ccb.common.annotation.Module;
import
lombok.*
;
import
java.util.List
;
/**
* @author leafinsight
*/
@Data
@Getter
@Setter
@NoArgsConstructor
@ToString
//@Module("异常验证")
public
class
TellMeWhyInputDTO
{
// @Key(index=1,description = "业务关键字")
private
String
businessKey
;
private
String
division
;
private
String
bomCode
;
// @Key(index=2,description = "操作人")
private
String
userCode
;
private
String
role
;
private
String
characteristicCode
;
private
String
characteristicValueCode
;
private
List
<
BomInitializeOutputV2DTO
.
CharacteristicValuesBean
>
totalCharacteristicList
;
private
List
<
PreValidationInputV2DTO
.
SelectedCharacteristicBean
>
selectedCharacteristicList
;
private
String
token
;
private
Boolean
forceSelection
;
private
List
<
AttributesBeanDTO
>
attributes
;
}
src/main/java/cn/com/uitech/config/dto/TellMeWhyOutputDTO.java
0 → 100644
View file @
107c7f4b
package
cn
.
com
.
uitech
.
config
.
dto
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
import
java.util.List
;
/**
* @author leafinsight
*/
@Getter
@Setter
@NoArgsConstructor
@ToString
public
class
TellMeWhyOutputDTO
{
private
List
<
String
>
conflictCharacteristicList
;
private
List
<
BomInitializeOutputV2DTO
.
CharacteristicValuesBean
>
activeValues
;
private
List
<
PreValidationInputV2DTO
.
SelectedCharacteristicBean
>
selectedCharacteristicList
;
private
String
message
;
private
Boolean
result
;
private
Boolean
forceSelectionResult
;
}
src/main/java/cn/com/uitech/config/service/ConfiguratorV2Service.java
View file @
107c7f4b
package
cn
.
com
.
uitech
.
config
.
service
;
import
cn.com.uitech.config.dto.*
;
import
cn.com.uitech.config.entity.ODData
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
public
interface
ConfiguratorV2Service
{
...
...
@@ -17,6 +24,7 @@ public interface ConfiguratorV2Service {
*/
PreValidationOutputV2DTO
preValidate
(
PreValidationInputV2DTO
preValidationInputV2DTO
,
String
token
,
String
dataSourceFlag
)
;
TellMeWhyOutputDTO
tellMeWhy
(
TellMeWhyInputDTO
tellMeWhyInputDTO
,
String
token
,
String
dataSourceFlag
);
}
src/main/java/cn/com/uitech/config/service/impl/ConfiguratorCacheServiceImpl.java
View file @
107c7f4b
...
...
@@ -242,6 +242,7 @@ public class ConfiguratorCacheServiceImpl implements ConfiguratorCacheService {
//是新的VT table
if
(!
aryData
.
containsKey
(
value
.
getId
()))
{
ODData
odData
=
new
ODData
();
//第一个key是行号(lineCode)第二个key是r3Code value是v值code
Map
<
Integer
,
Map
<
String
,
List
<
String
>>>
arySingleVT
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
aryLineVT
=
new
HashMap
<>();
List
<
String
>
aryCV
=
new
ArrayList
<>();
...
...
@@ -250,8 +251,7 @@ public class ConfiguratorCacheServiceImpl implements ConfiguratorCacheService {
arySingleVT
.
put
(
value
.
getLinecode
(),
aryLineVT
);
List
<
String
>
aryR3Code
=
new
ArrayList
<>();
for
(
ODChar
odChar
:
aryChar
)
{
for
(
ODChar
odChar
:
aryChar
)
{
if
(
value
.
getId
().
equals
(
odChar
.
getIdVT
()))
{
aryR3Code
.
add
(
odChar
.
getField
().
toString
());
}
...
...
@@ -263,7 +263,7 @@ public class ConfiguratorCacheServiceImpl implements ConfiguratorCacheService {
}
else
{
ODData
odData
=
aryData
.
get
(
value
.
getId
());
Map
<
Integer
,
Map
<
String
,
List
<
String
>>>
arySingleVT
=
odData
.
getAryData
();
//是全新的行
//是全新的行
判断是否存在当前的行号 不存在则添加进去
if
(!
arySingleVT
.
containsKey
((
value
.
getLinecode
())))
{
Map
<
String
,
List
<
String
>>
aryLineVT
=
new
HashMap
<>();
List
<
String
>
aryCV
=
new
ArrayList
<>();
...
...
@@ -273,7 +273,7 @@ public class ConfiguratorCacheServiceImpl implements ConfiguratorCacheService {
aryData
.
put
(
value
.
getId
(),
odData
);
}
else
{
Map
<
String
,
List
<
String
>>
aryLineVT
=
aryData
.
get
(
value
.
getId
()).
getAryData
().
get
(
value
.
getLinecode
());
//是全新的特征
//是全新的特征
判断当前行号下是存在本次循环的特征,没有则直接添加
if
(!
aryLineVT
.
containsKey
(
value
.
getR3Code
().
toString
()))
{
List
<
String
>
aryCV
=
new
ArrayList
<>();
aryCV
.
add
(
value
.
getR3VCode
().
toString
());
...
...
src/main/java/cn/com/uitech/config/service/impl/ConfiguratorV2ServiceImpl.java
View file @
107c7f4b
This diff is collapsed.
Click to expand it.
src/main/resources/application-cf-tst.yml
View file @
107c7f4b
...
...
@@ -3,6 +3,7 @@ server:
spring
:
redis
:
host
:
${REDIS_HOST:10.101.49.3}
port
:
${REDIS_PORT:6379}
password
:
"
CiEz-1309"
cto-database
:
14
...
...
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