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
07af09a2
Commit
07af09a2
authored
Nov 30, 2022
by
“zcwang”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 补充字段,更新待办
parent
a43d8791
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
234 additions
and
11 deletions
+234
-11
ChangeFlowBiz.java
...om/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
+18
-0
FlowService.java
...ease/mail/yanxuan/change/biz/service/rpc/FlowService.java
+3
-1
ItemService.java
...ease/mail/yanxuan/change/biz/service/rpc/ItemService.java
+8
-7
ChangeFlowVO.java
...e/mail/yanxuan/change/dal/meta/model/vo/ChangeFlowVO.java
+11
-0
FlowRpcService.java
.../mail/yanxuan/change/integration/flow/FlowRpcService.java
+16
-0
ItemRpcService.java
.../mail/yanxuan/change/integration/item/ItemRpcService.java
+3
-3
QcCategory.java
...mail/yanxuan/change/integration/item/meta/QcCategory.java
+135
-0
QcCategoryVO.java
...il/yanxuan/change/integration/item/meta/QcCategoryVO.java
+40
-0
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
View file @
07af09a2
...
...
@@ -41,6 +41,7 @@ import com.netease.mail.yanxuan.change.biz.service.ChangeFlowService;
import
com.netease.mail.yanxuan.change.biz.service.change.ChangeConfigService
;
import
com.netease.mail.yanxuan.change.biz.service.change.ChangeTypeService
;
import
com.netease.mail.yanxuan.change.biz.service.rpc.FlowService
;
import
com.netease.mail.yanxuan.change.biz.service.rpc.ItemService
;
import
com.netease.mail.yanxuan.change.biz.service.rpc.TodoService
;
import
com.netease.mail.yanxuan.change.common.bean.CommonConstants
;
import
com.netease.mail.yanxuan.change.common.bean.RequestLocalBean
;
...
...
@@ -76,6 +77,10 @@ import com.netease.mail.yanxuan.change.dal.meta.model.vo.ItemBasicInfoVO;
import
com.netease.mail.yanxuan.change.dal.meta.model.vo.ItemVO
;
import
com.netease.mail.yanxuan.change.dal.meta.model.vo.PageVO
;
import
com.netease.mail.yanxuan.change.integration.excel.ChangeFlowExcelDTO
;
import
com.netease.mail.yanxuan.change.integration.item.SimplePhyCateGoryResultCo
;
import
com.netease.mail.yanxuan.change.integration.item.meta.SpuTO
;
import
com.netease.mail.yanxuan.change.integration.item.param.BatchQuerySpuInfoParam
;
import
com.netease.mail.yanxuan.change.integration.item.param.CommonIdsParamQuery
;
import
com.netease.mail.yanxuan.change.integration.todo.TaskCreateDTO
;
import
com.netease.yanxuan.flowx.sdk.meta.dto.base.FlowDataDTO
;
import
com.netease.yanxuan.flowx.sdk.meta.dto.base.UserBaseDTO
;
...
...
@@ -123,6 +128,8 @@ public class ChangeFlowBiz {
@Autowired
private
TodoService
todoService
;
@Autowired
private
ItemService
itemService
;
public
String
createAndSubmit
(
ChangeFlowCreateReq
changeFlowCreateReq
)
{
String
uid
=
RequestLocalBean
.
getUid
();
...
...
@@ -548,6 +555,8 @@ public class ChangeFlowBiz {
ChangeFlowVO
changeFlowVO
=
new
ChangeFlowVO
();
changeFlowVO
.
setId
(
changeRecord
.
getId
());
changeFlowVO
.
setFlowId
(
changeRecord
.
getFlowId
());
changeFlowVO
.
setParentChangeClassId
(
changeRecord
.
getParentChangeClassId
());
changeFlowVO
.
setSonChangeClassId
(
changeFlowVO
.
getSonChangeClassId
());
changeFlowVO
.
setChangeSubject
(
changeRecord
.
getChangeSubject
());
ChangeType
parentChangeType
=
changeTypeService
.
getChangeTypeById
(
changeRecord
.
getParentChangeClassId
());
if
(
parentChangeType
==
null
)
{
...
...
@@ -577,6 +586,15 @@ public class ChangeFlowBiz {
// 变更结果确认节点,展示变更商品基础信息
String
flowNode
=
changeRecord
.
getFlowNode
();
if
(
ChangeFlowEnum
.
CHANGE_FLOW_CONFIRM
.
getNodeId
().
equals
(
flowNode
))
{
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
());
// 批量查询物理类目
Map
<
Long
,
List
<
SimplePhyCateGoryResultCo
>>
categoryChain
=
itemService
.
queryBySpuIds
(
CommonIdsParamQuery
.
builder
().
ids
(
itemIds
).
build
());
// 批量查询品控类目
List
<
ItemBasicInfoVO
>
itemBasicInfoVOList
=
new
ArrayList
<>();
}
...
...
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/service/rpc/FlowService.java
View file @
07af09a2
...
...
@@ -149,5 +149,6 @@ public class FlowService {
approverDTO
.
setRemark
(
remark
);
approverDTO
.
setContent
(
content
);
approverDTO
.
setOperateResult
(
FlowxOperationEnum
.
DELIVER
.
getName
());
};
flowRpcService
.
updateApprovers
(
CommonConstants
.
FLOWX_PRODUCT
,
approverDTO
);
}
}
\ No newline at end of file
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/service/rpc/Item
Rpc
Service.java
→
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/service/rpc/ItemService.java
View file @
07af09a2
...
...
@@ -16,7 +16,7 @@ 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.item.Item
Category
RpcService
;
import
com.netease.mail.yanxuan.change.integration.item.ItemRpcService
;
import
com.netease.mail.yanxuan.change.integration.item.SimplePhyCateGoryResultCo
;
import
com.netease.mail.yanxuan.change.integration.item.meta.SpuTO
;
import
com.netease.mail.yanxuan.change.integration.item.param.BatchQuerySpuInfoParam
;
...
...
@@ -30,22 +30,23 @@ import lombok.extern.slf4j.Slf4j;
*/
@Slf4j
@Component
public
class
Item
Rpc
Service
{
public
class
ItemService
{
@Autowired
private
Item
CategoryRpcService
itemCategory
RpcService
;
private
Item
RpcService
item
RpcService
;
/**
* 查询物理类目
*
* @param query
* @return
* key: 商品id,value:商品的物理类目
*/
public
Map
<
Long
,
List
<
SimplePhyCateGoryResultCo
>>
query
CategoryChain
(
CommonIdsParamQuery
query
)
{
public
Map
<
Long
,
List
<
SimplePhyCateGoryResultCo
>>
query
BySpuIds
(
CommonIdsParamQuery
query
)
{
log
.
info
(
"[ItemRpcService-queryCategoryChain] request of query={}"
,
JSON
.
toJSONString
(
query
));
AjaxResult
<
Map
<
Long
,
List
<
SimplePhyCateGoryResultCo
>>>
response
=
item
Category
RpcService
.
query
CategoryChain
(
query
);
AjaxResult
<
Map
<
Long
,
List
<
SimplePhyCateGoryResultCo
>>>
response
=
itemRpcService
.
query
BySpuIds
(
query
);
log
.
info
(
"[ItemRpcService-queryCategoryChain] response of query queryCategoryChain ={}"
,
JSON
.
toJSONString
(
response
));
if
(
Boolean
.
TRUE
.
equals
(
response
.
isSuccess
()))
{
...
...
@@ -59,7 +60,7 @@ public class ItemRpcService {
public
List
<
SpuTO
>
batchQuerySpuInfo
(
BatchQuerySpuInfoParam
query
)
{
log
.
info
(
"[ItemRpcService-batchQuerySpuInfo] request of query={}"
,
JSON
.
toJSONString
(
query
));
AjaxResult
<
List
<
SpuTO
>>
response
=
item
Category
RpcService
.
batchQuerySpuInfo
(
query
);
AjaxResult
<
List
<
SpuTO
>>
response
=
itemRpcService
.
batchQuerySpuInfo
(
query
);
log
.
info
(
"[ItemRpcService-batchQuerySpuInfo] response of query batchQuerySpuInfo ={}"
,
JSON
.
toJSONString
(
response
));
if
(
Boolean
.
TRUE
.
equals
(
response
.
isSuccess
()))
{
...
...
yanxuan-qc-change-system-dal/src/main/java/com/netease/mail/yanxuan/change/dal/meta/model/vo/ChangeFlowVO.java
View file @
07af09a2
...
...
@@ -37,6 +37,17 @@ public class ChangeFlowVO {
* 工单id
*/
private
Long
flowId
;
/**
* 一级变更类型id
*/
private
Long
parentChangeClassId
;
/**
* 二级变更类型id
*/
private
Long
sonChangeClassId
;
/**
* 变更主体
* @see ChangeSubjectEnum
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/flow/FlowRpcService.java
View file @
07af09a2
...
...
@@ -13,11 +13,13 @@ import org.springframework.stereotype.Service;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse
;
import
com.netease.yanxuan.flowx.sdk.meta.dto.base.FlowDataDTO
;
import
com.netease.yanxuan.flowx.sdk.meta.dto.flow.FlowCreateReqDTO
;
import
com.netease.yanxuan.flowx.sdk.meta.dto.flow.NodeSubmitReqDTO
;
import
com.netease.yanxuan.flowx.sdk.meta.dto.flow.UpdateNodeApproverDTO
;
import
com.netease.yanxuan.missa.client.annotation.MissaClient
;
/**
...
...
@@ -38,6 +40,12 @@ public interface FlowRpcService {
@PostMapping
(
value
=
"/{product}/workOrderFlow/v1/create"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
AjaxResponse
<
String
>
create
(
@PathVariable
(
"product"
)
String
product
,
FlowCreateReqDTO
req
);
/**
* 工单详情查询
* @param flowxProduct
* @param flowId
* @return
*/
@GetMapping
(
value
=
"/{product}/workOrder/v1/{flowId}/detail"
)
AjaxResponse
<
FlowDataDTO
>
getDetail
(
@PathVariable
(
"product"
)
String
flowxProduct
,
@PathVariable
(
"flowId"
)
String
flowId
);
...
...
@@ -51,4 +59,12 @@ public interface FlowRpcService {
*/
@PostMapping
(
value
=
"/{product}/workOrderFlow/v1/submit"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
AjaxResponse
<
List
<
String
>>
submit
(
@PathVariable
(
"product"
)
String
flowxProduct
,
NodeSubmitReqDTO
nodeSubmitReqDTO
);
/**
* 更新待办负责人
* @param flowxProduct
* @param approverDTO
*/
@PutMapping
(
value
=
"/{product}/workOrderFlow/v1/approvers/update"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
void
updateApprovers
(
@PathVariable
(
"product"
)
String
flowxProduct
,
UpdateNodeApproverDTO
approverDTO
);
}
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/item/Item
Category
RpcService.java
→
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/item/ItemRpcService.java
View file @
07af09a2
...
...
@@ -25,15 +25,15 @@ import com.netease.yanxuan.missa.client.annotation.MissaClient;
*/
@Service
@MissaClient
(
serviceCode
=
"ic-basis"
)
public
interface
Item
Category
RpcService
{
public
interface
ItemRpcService
{
/**
* 批量查询商品分类物理类目链
* @param query
* @return
*/
@PostMapping
(
value
=
"/
category/phy/queryChainBy
Ids"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
AjaxResult
<
Map
<
Long
,
List
<
SimplePhyCateGoryResultCo
>>>
query
CategoryChain
(
CommonIdsParamQuery
query
);
@PostMapping
(
value
=
"/
spu/phy/queryBySpu
Ids"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
AjaxResult
<
Map
<
Long
,
List
<
SimplePhyCateGoryResultCo
>>>
query
BySpuIds
(
CommonIdsParamQuery
query
);
@PostMapping
(
value
=
"/spu/queryByIds"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
AjaxResult
<
List
<
SpuTO
>>
batchQuerySpuInfo
(
BatchQuerySpuInfoParam
query
);
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/item/meta/QcCategory.java
0 → 100644
View file @
07af09a2
/**
* @(#)QcCategory.java, 2022/11/30.
* <p/>
* 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
;
import
java.io.Serializable
;
/**
* @Author zcwang
* @Date 2022/11/30
*/
public
class
QcCategory
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1862762370395334378L
;
/**
* 主键id
*/
private
Long
id
;
/**
* 类目名称
*/
private
String
categoryName
;
/**
* 类目说明
*/
private
String
categoryDesc
;
/**
* 等级
*/
private
Integer
categoryLevel
;
/**
* 上级id
*/
private
Long
parentId
;
/**
* 创建时间
*/
private
Long
createTime
;
/**
* 修改时间
*/
private
Long
modifyTime
;
/**
* 创建人uid
*/
private
String
creator
;
/**
* 最后编辑人uid
*/
private
String
updator
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getCategoryName
()
{
return
categoryName
;
}
public
void
setCategoryName
(
String
categoryName
)
{
this
.
categoryName
=
categoryName
;
}
public
String
getCategoryDesc
()
{
return
categoryDesc
;
}
public
void
setCategoryDesc
(
String
categoryDesc
)
{
this
.
categoryDesc
=
categoryDesc
;
}
public
Integer
getCategoryLevel
()
{
return
categoryLevel
;
}
public
void
setCategoryLevel
(
Integer
categoryLevel
)
{
this
.
categoryLevel
=
categoryLevel
;
}
public
Long
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
}
public
Long
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Long
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Long
getModifyTime
()
{
return
modifyTime
;
}
public
void
setModifyTime
(
Long
modifyTime
)
{
this
.
modifyTime
=
modifyTime
;
}
public
String
getCreator
()
{
return
creator
;
}
public
void
setCreator
(
String
creator
)
{
this
.
creator
=
creator
;
}
public
String
getUpdator
()
{
return
updator
;
}
public
void
setUpdator
(
String
updator
)
{
this
.
updator
=
updator
;
}
}
\ No newline at end of file
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/item/meta/QcCategoryVO.java
0 → 100644
View file @
07af09a2
/**
* @(#)QcCategoryVO.java, 2022/11/30.
* <p/>
* 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
;
import
java.util.List
;
import
org.springframework.beans.BeanUtils
;
import
com.google.common.collect.Lists
;
/**
* @Author zcwang
* @Date 2022/11/30
*/
public
class
QcCategoryVO
extends
QcCategory
{
private
static
final
long
serialVersionUID
=
6925160563010855926L
;
private
List
<
QcCategoryVO
>
children
;
public
QcCategoryVO
()
{
}
public
static
QcCategoryVO
init
(
QcCategory
qcCategory
)
{
QcCategoryVO
qcCategoryVO
=
new
QcCategoryVO
();
BeanUtils
.
copy
(
qcCategory
,
qcCategoryVO
);
qcCategoryVO
.
setChildren
(
Lists
.
newArrayList
());
return
qcCategoryVO
;
}
public
List
<
QcCategoryVO
>
getChildren
()
{
return
children
;
}
public
void
setChildren
(
List
<
QcCategoryVO
>
children
)
{
this
.
children
=
children
;
}
}
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