Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-qc-change-system
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
胡园园
yanxuan-qc-change-system
Commits
f60128ee
Commit
f60128ee
authored
Dec 02, 2022
by
jx-art
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature-changeFlow-221110' into feature-changeFlow-221110
parents
6d4d2bf9
df9a2c6d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
147 additions
and
10 deletions
+147
-10
ChangeFlowBiz.java
...om/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
+40
-6
QCService.java
...etease/mail/yanxuan/change/biz/service/rpc/QCService.java
+43
-0
ProfitTypeEnum.java
...ease/mail/yanxuan/change/common/enums/ProfitTypeEnum.java
+34
-0
QcRpcService.java
...ease/mail/yanxuan/change/integration/qc/QcRpcService.java
+27
-0
QcCategory.java
...e/mail/yanxuan/change/integration/qc/meta/QcCategory.java
+1
-1
QcCategoryVO.java
...mail/yanxuan/change/integration/qc/meta/QcCategoryVO.java
+2
-3
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
View file @
f60128ee
...
...
@@ -70,6 +70,7 @@ import com.netease.mail.yanxuan.change.dal.meta.model.req.ChangeFlowFile;
import
com.netease.mail.yanxuan.change.dal.meta.model.req.ChangeFlowListQueryReq
;
import
com.netease.mail.yanxuan.change.dal.meta.model.req.ChangeFlowSubmitReq
;
import
com.netease.mail.yanxuan.change.dal.meta.model.vo.BasicChangeFlowVO
;
import
com.netease.mail.yanxuan.change.dal.meta.model.vo.CategoryInfoVO
;
import
com.netease.mail.yanxuan.change.dal.meta.model.vo.ChangeFlowExecVO
;
import
com.netease.mail.yanxuan.change.dal.meta.model.vo.ChangeFlowListVO
;
import
com.netease.mail.yanxuan.change.dal.meta.model.vo.ChangeFlowVO
;
...
...
@@ -589,15 +590,48 @@ public class ChangeFlowBiz {
List
<
Long
>
itemIds
=
itemList
.
stream
().
map
(
ItemVO:
:
getItemId
).
collect
(
Collectors
.
toList
());
// 批量查询spu信息
List
<
SpuTO
>
spuTOS
=
itemService
.
batchQuerySpuInfo
(
BatchQuerySpuInfoParam
.
builder
().
ids
(
itemIds
)
.
commonProps
(
new
ArrayList
<>()).
spuProps
(
new
ArrayList
<>()).
build
());
.
commonProps
(
new
ArrayList
<>()).
spuProps
(
new
ArrayList
<>()).
build
());
// 批量查询物理类目
Map
<
Long
,
List
<
SimplePhyCateGoryResultCo
>>
categoryChain
=
itemService
.
queryBySpuIds
(
CommonIdsParamQuery
.
builder
().
ids
(
itemIds
).
build
());
// 批量查询品控类目
List
<
ItemBasicInfoVO
>
itemBasicInfoVOList
=
new
ArrayList
<>();
.
queryBySpuIds
(
CommonIdsParamQuery
.
builder
().
ids
(
itemIds
).
build
());
List
<
ItemBasicInfoVO
>
itemBasicInfoVOS
=
itemList
.
stream
().
map
(
itemVO
->
{
ItemBasicInfoVO
itemBasicInfoVO
=
new
ItemBasicInfoVO
();
Long
itemId
=
itemVO
.
getItemId
();
itemBasicInfoVO
.
setItemId
(
itemId
);
itemBasicInfoVO
.
setItemName
(
itemVO
.
getItemName
());
itemBasicInfoVO
.
setQcCategory
(
null
);
List
<
SimplePhyCateGoryResultCo
>
simplePhyCateGoryResultCos
=
categoryChain
.
get
(
itemId
);
if
(
CollectionUtils
.
isEmpty
(
simplePhyCateGoryResultCos
))
{
throw
ExceptionFactory
.
createBiz
(
ResponseCode
.
THIRD_ERR
,
"未查询到物理类目"
);
}
List
<
CategoryInfoVO
>
categoryInfoVOS
=
simplePhyCateGoryResultCos
.
stream
().
map
(
phy
->
{
CategoryInfoVO
categoryInfoVO
=
new
CategoryInfoVO
();
categoryInfoVO
.
setId
(
phy
.
getId
());
categoryInfoVO
.
setName
(
phy
.
getName
());
return
categoryInfoVO
;
}).
collect
(
Collectors
.
toList
());
itemBasicInfoVO
.
setPhyCategory
(
categoryInfoVOS
);
Optional
<
SpuTO
>
optionalSpuTO
=
spuTOS
.
stream
().
filter
(
spu
->
spu
.
getId
()
==
itemId
).
findAny
();
if
(!
optionalSpuTO
.
isPresent
())
{
throw
ExceptionFactory
.
createBiz
(
ResponseCode
.
THIRD_ERR
,
"未查询到商品详情"
);
}
SpuTO
spuTO
=
optionalSpuTO
.
get
();
Map
<
String
,
String
>
propertyMap
=
spuTO
.
getPropertyMap
();
itemBasicInfoVO
.
setItemSetupType
(
Integer
.
valueOf
(
propertyMap
.
get
(
"itemSetupType"
)));
String
businessForm
=
propertyMap
.
get
(
"businessForm"
);
int
business
=
StringUtils
.
isBlank
(
businessForm
)
?
0
:
Integer
.
parseInt
(
businessForm
);
itemBasicInfoVO
.
setBusinessForm
(
business
);
itemBasicInfoVO
.
setStatus
(
spuTO
.
getStatus
());
itemBasicInfoVO
.
setProjectCommander
(
null
);
itemBasicInfoVO
.
setPurchaseCommander
(
null
);
itemBasicInfoVO
.
setSQECommander
(
null
);
itemBasicInfoVO
.
setPlanCommander
(
null
);
return
itemBasicInfoVO
;
}).
collect
(
Collectors
.
toList
());
changeFlowVO
.
setItemBasicInfoList
(
itemBasicInfoVOS
);
}
}
else
{
changeFlowVO
.
setItemBasicInfoList
(
null
);
}
changeFlowVO
.
setChangeState
(
changeRecord
.
getState
());
changeFlowVO
.
setChangeCreator
(
changeRecord
.
getCreator
());
...
...
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/service/rpc/QCService.java
0 → 100644
View file @
f60128ee
/**
* @(#)QCService.java, 2022/12/2.
* <p/>
* Copyright 2022 Netease, Inc. All rights reserved.
* NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
biz
.
service
.
rpc
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
com.alibaba.fastjson.JSON
;
import
com.netease.mail.yanxuan.change.common.bean.AjaxResult
;
import
com.netease.mail.yanxuan.change.integration.qc.QcRpcService
;
import
com.netease.mail.yanxuan.change.integration.qc.meta.QcCategoryVO
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @Author zcwang
* @Date 2022/12/2
*/
@Slf4j
@Component
public
class
QCService
{
@Autowired
private
QcRpcService
qcRpcService
;
public
QcCategoryVO
getQcCategoryListByItemId
(
Long
itemId
)
{
log
.
info
(
"[QCService-getQcCategoryListByItemId] request of query={}"
,
itemId
);
AjaxResult
<
QcCategoryVO
>
response
=
qcRpcService
.
getQcCategoryListByItemId
(
itemId
);
log
.
info
(
"[QCService-getQcCategoryListByItemId] response of query QcCategoryList ={}"
,
JSON
.
toJSONString
(
response
));
if
(
Boolean
.
TRUE
.
equals
(
response
.
isSuccess
()))
{
return
response
.
getData
();
}
log
.
error
(
"[op:rpc-getQcCategoryListByItemId] query QcCategoryList failed, query={}, errMsg={}"
,
itemId
,
response
.
getMsg
());
return
null
;
}
}
\ No newline at end of file
yanxuan-qc-change-system-common/src/main/java/com/netease/mail/yanxuan/change/common/enums/ProfitTypeEnum.java
0 → 100644
View file @
f60128ee
/**
* @(#)ProfitTypeEnum.java, 2022/12/2.
* <p/>
* Copyright 2022 Netease, Inc. All rights reserved.
* NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
common
.
enums
;
/**
* @Author zcwang
* @Date 2022/12/2
*/
public
enum
ProfitTypeEnum
{
RISK_CONTROL
(
1
,
"风险控制类"
),
REDUCE_COST
(
2
,
"降本类"
),
PRODUCT_IMPROVE
(
3
,
"商品改善"
),
REPLACE_CERTIFICATES_WHEN_EXPIRE
(
4
,
"证件到期更换"
),
OTHER
(
5
,
"其他"
),
NO
(
6
,
"无"
);
private
Integer
type
;
private
String
desc
;
ProfitTypeEnum
(
Integer
type
,
String
desc
)
{
this
.
type
=
type
;
this
.
desc
=
desc
;
}
public
Integer
getType
()
{
return
type
;
}
}
\ No newline at end of file
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/qc/QcRpcService.java
0 → 100644
View file @
f60128ee
/**
* @(#)QCRpcService.java, 2022/12/2.
* <p/>
* Copyright 2022 Netease, Inc. All rights reserved.
* NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
qc
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
com.netease.mail.yanxuan.change.common.bean.AjaxResult
;
import
com.netease.mail.yanxuan.change.integration.qc.meta.QcCategoryVO
;
import
com.netease.yanxuan.missa.client.annotation.MissaClient
;
/**
* @Author zcwang
* @Date 2022/12/2
*/
@Service
@MissaClient
(
serviceCode
=
"yanxuan-qc-api"
)
public
interface
QcRpcService
{
@PostMapping
(
"/xhr/item/getQcCategoryListByItemId.json"
)
AjaxResult
<
QcCategoryVO
>
getQcCategoryListByItemId
(
Long
itemId
);
}
\ No newline at end of file
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/
item
/meta/QcCategory.java
→
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/
qc
/meta/QcCategory.java
View file @
f60128ee
...
...
@@ -4,7 +4,7 @@
* Copyright 2022 Netease, Inc. All rights reserved.
* NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
item
.
meta
;
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
qc
.
meta
;
import
java.io.Serializable
;
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/
item
/meta/QcCategoryVO.java
→
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/
qc
/meta/QcCategoryVO.java
View file @
f60128ee
...
...
@@ -4,7 +4,7 @@
* Copyright 2022 Netease, Inc. All rights reserved.
* NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
item
.
meta
;
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
qc
.
meta
;
import
java.util.List
;
...
...
@@ -25,8 +25,7 @@ public class QcCategoryVO extends QcCategory {
public
static
QcCategoryVO
init
(
QcCategory
qcCategory
)
{
QcCategoryVO
qcCategoryVO
=
new
QcCategoryVO
();
//编译报错临时添加。。。。。。。
//BeanUtils.copy(qcCategory, qcCategoryVO);
BeanUtils
.
copyProperties
(
qcCategory
,
qcCategoryVO
);
qcCategoryVO
.
setChildren
(
Lists
.
newArrayList
());
return
qcCategoryVO
;
}
...
...
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