Commit 07af09a2 by “zcwang”

add: 补充字段,更新待办

parent a43d8791
...@@ -41,6 +41,7 @@ import com.netease.mail.yanxuan.change.biz.service.ChangeFlowService; ...@@ -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.ChangeConfigService;
import com.netease.mail.yanxuan.change.biz.service.change.ChangeTypeService; 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.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.biz.service.rpc.TodoService;
import com.netease.mail.yanxuan.change.common.bean.CommonConstants; import com.netease.mail.yanxuan.change.common.bean.CommonConstants;
import com.netease.mail.yanxuan.change.common.bean.RequestLocalBean; import com.netease.mail.yanxuan.change.common.bean.RequestLocalBean;
...@@ -76,6 +77,10 @@ import com.netease.mail.yanxuan.change.dal.meta.model.vo.ItemBasicInfoVO; ...@@ -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.ItemVO;
import com.netease.mail.yanxuan.change.dal.meta.model.vo.PageVO; 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.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.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.FlowDataDTO;
import com.netease.yanxuan.flowx.sdk.meta.dto.base.UserBaseDTO; import com.netease.yanxuan.flowx.sdk.meta.dto.base.UserBaseDTO;
...@@ -123,6 +128,8 @@ public class ChangeFlowBiz { ...@@ -123,6 +128,8 @@ public class ChangeFlowBiz {
@Autowired @Autowired
private TodoService todoService; private TodoService todoService;
@Autowired
private ItemService itemService;
public String createAndSubmit(ChangeFlowCreateReq changeFlowCreateReq) { public String createAndSubmit(ChangeFlowCreateReq changeFlowCreateReq) {
String uid = RequestLocalBean.getUid(); String uid = RequestLocalBean.getUid();
...@@ -548,6 +555,8 @@ public class ChangeFlowBiz { ...@@ -548,6 +555,8 @@ public class ChangeFlowBiz {
ChangeFlowVO changeFlowVO = new ChangeFlowVO(); ChangeFlowVO changeFlowVO = new ChangeFlowVO();
changeFlowVO.setId(changeRecord.getId()); changeFlowVO.setId(changeRecord.getId());
changeFlowVO.setFlowId(changeRecord.getFlowId()); changeFlowVO.setFlowId(changeRecord.getFlowId());
changeFlowVO.setParentChangeClassId(changeRecord.getParentChangeClassId());
changeFlowVO.setSonChangeClassId(changeFlowVO.getSonChangeClassId());
changeFlowVO.setChangeSubject(changeRecord.getChangeSubject()); changeFlowVO.setChangeSubject(changeRecord.getChangeSubject());
ChangeType parentChangeType = changeTypeService.getChangeTypeById(changeRecord.getParentChangeClassId()); ChangeType parentChangeType = changeTypeService.getChangeTypeById(changeRecord.getParentChangeClassId());
if (parentChangeType == null) { if (parentChangeType == null) {
...@@ -577,6 +586,15 @@ public class ChangeFlowBiz { ...@@ -577,6 +586,15 @@ public class ChangeFlowBiz {
// 变更结果确认节点,展示变更商品基础信息 // 变更结果确认节点,展示变更商品基础信息
String flowNode = changeRecord.getFlowNode(); String flowNode = changeRecord.getFlowNode();
if (ChangeFlowEnum.CHANGE_FLOW_CONFIRM.getNodeId().equals(flowNode)) { 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<>(); List<ItemBasicInfoVO> itemBasicInfoVOList = new ArrayList<>();
} }
......
...@@ -149,5 +149,6 @@ public class FlowService { ...@@ -149,5 +149,6 @@ public class FlowService {
approverDTO.setRemark(remark); approverDTO.setRemark(remark);
approverDTO.setContent(content); approverDTO.setContent(content);
approverDTO.setOperateResult(FlowxOperationEnum.DELIVER.getName()); approverDTO.setOperateResult(FlowxOperationEnum.DELIVER.getName());
}; flowRpcService.updateApprovers(CommonConstants.FLOWX_PRODUCT, approverDTO);
}
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component; ...@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.netease.mail.yanxuan.change.common.bean.AjaxResult; import com.netease.mail.yanxuan.change.common.bean.AjaxResult;
import com.netease.mail.yanxuan.change.integration.item.ItemCategoryRpcService; 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.SimplePhyCateGoryResultCo;
import com.netease.mail.yanxuan.change.integration.item.meta.SpuTO; 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.BatchQuerySpuInfoParam;
...@@ -30,22 +30,23 @@ import lombok.extern.slf4j.Slf4j; ...@@ -30,22 +30,23 @@ import lombok.extern.slf4j.Slf4j;
*/ */
@Slf4j @Slf4j
@Component @Component
public class ItemRpcService { public class ItemService {
@Autowired @Autowired
private ItemCategoryRpcService itemCategoryRpcService; private ItemRpcService itemRpcService;
/** /**
* 查询物理类目 * 查询物理类目
* *
* @param query * @param query
* @return * @return
* key: 商品id,value:商品的物理类目
*/ */
public Map<Long, List<SimplePhyCateGoryResultCo>> queryCategoryChain(CommonIdsParamQuery query) { public Map<Long, List<SimplePhyCateGoryResultCo>> queryBySpuIds(CommonIdsParamQuery query) {
log.info("[ItemRpcService-queryCategoryChain] request of query={}", log.info("[ItemRpcService-queryCategoryChain] request of query={}",
JSON.toJSONString(query)); JSON.toJSONString(query));
AjaxResult<Map<Long, List<SimplePhyCateGoryResultCo>>> response = itemCategoryRpcService AjaxResult<Map<Long, List<SimplePhyCateGoryResultCo>>> response = itemRpcService
.queryCategoryChain(query); .queryBySpuIds(query);
log.info("[ItemRpcService-queryCategoryChain] response of query queryCategoryChain ={}", log.info("[ItemRpcService-queryCategoryChain] response of query queryCategoryChain ={}",
JSON.toJSONString(response)); JSON.toJSONString(response));
if (Boolean.TRUE.equals(response.isSuccess())) { if (Boolean.TRUE.equals(response.isSuccess())) {
...@@ -59,7 +60,7 @@ public class ItemRpcService { ...@@ -59,7 +60,7 @@ public class ItemRpcService {
public List<SpuTO> batchQuerySpuInfo(BatchQuerySpuInfoParam query) { public List<SpuTO> batchQuerySpuInfo(BatchQuerySpuInfoParam query) {
log.info("[ItemRpcService-batchQuerySpuInfo] request of query={}", log.info("[ItemRpcService-batchQuerySpuInfo] request of query={}",
JSON.toJSONString(query)); JSON.toJSONString(query));
AjaxResult<List<SpuTO>> response = itemCategoryRpcService.batchQuerySpuInfo(query); AjaxResult<List<SpuTO>> response = itemRpcService.batchQuerySpuInfo(query);
log.info("[ItemRpcService-batchQuerySpuInfo] response of query batchQuerySpuInfo ={}", log.info("[ItemRpcService-batchQuerySpuInfo] response of query batchQuerySpuInfo ={}",
JSON.toJSONString(response)); JSON.toJSONString(response));
if (Boolean.TRUE.equals(response.isSuccess())) { if (Boolean.TRUE.equals(response.isSuccess())) {
......
...@@ -37,6 +37,17 @@ public class ChangeFlowVO { ...@@ -37,6 +37,17 @@ public class ChangeFlowVO {
* 工单id * 工单id
*/ */
private Long flowId; private Long flowId;
/**
* 一级变更类型id
*/
private Long parentChangeClassId;
/**
* 二级变更类型id
*/
private Long sonChangeClassId;
/** /**
* 变更主体 * 变更主体
* @see ChangeSubjectEnum * @see ChangeSubjectEnum
......
...@@ -13,11 +13,13 @@ import org.springframework.stereotype.Service; ...@@ -13,11 +13,13 @@ import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; 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.controller.communal.AjaxResponse;
import com.netease.yanxuan.flowx.sdk.meta.dto.base.FlowDataDTO; 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.FlowCreateReqDTO;
import com.netease.yanxuan.flowx.sdk.meta.dto.flow.NodeSubmitReqDTO; 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; import com.netease.yanxuan.missa.client.annotation.MissaClient;
/** /**
...@@ -38,6 +40,12 @@ public interface FlowRpcService { ...@@ -38,6 +40,12 @@ public interface FlowRpcService {
@PostMapping(value = "/{product}/workOrderFlow/v1/create", consumes = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/{product}/workOrderFlow/v1/create", consumes = MediaType.APPLICATION_JSON_VALUE)
AjaxResponse<String> create(@PathVariable("product") String product, FlowCreateReqDTO req); AjaxResponse<String> create(@PathVariable("product") String product, FlowCreateReqDTO req);
/**
* 工单详情查询
* @param flowxProduct
* @param flowId
* @return
*/
@GetMapping(value = "/{product}/workOrder/v1/{flowId}/detail") @GetMapping(value = "/{product}/workOrder/v1/{flowId}/detail")
AjaxResponse<FlowDataDTO> getDetail(@PathVariable("product") String flowxProduct, AjaxResponse<FlowDataDTO> getDetail(@PathVariable("product") String flowxProduct,
@PathVariable("flowId") String flowId); @PathVariable("flowId") String flowId);
...@@ -51,4 +59,12 @@ public interface FlowRpcService { ...@@ -51,4 +59,12 @@ public interface FlowRpcService {
*/ */
@PostMapping(value = "/{product}/workOrderFlow/v1/submit", consumes = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/{product}/workOrderFlow/v1/submit", consumes = MediaType.APPLICATION_JSON_VALUE)
AjaxResponse<List<String>> submit(@PathVariable("product") String flowxProduct, NodeSubmitReqDTO nodeSubmitReqDTO); 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);
} }
...@@ -25,15 +25,15 @@ import com.netease.yanxuan.missa.client.annotation.MissaClient; ...@@ -25,15 +25,15 @@ import com.netease.yanxuan.missa.client.annotation.MissaClient;
*/ */
@Service @Service
@MissaClient(serviceCode = "ic-basis") @MissaClient(serviceCode = "ic-basis")
public interface ItemCategoryRpcService { public interface ItemRpcService {
/** /**
* 批量查询商品分类物理类目链 * 批量查询商品分类物理类目链
* @param query * @param query
* @return * @return
*/ */
@PostMapping(value = "/category/phy/queryChainByIds", consumes = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/spu/phy/queryBySpuIds", consumes = MediaType.APPLICATION_JSON_VALUE)
AjaxResult<Map<Long, List<SimplePhyCateGoryResultCo>>> queryCategoryChain(CommonIdsParamQuery query); AjaxResult<Map<Long, List<SimplePhyCateGoryResultCo>>> queryBySpuIds(CommonIdsParamQuery query);
@PostMapping(value = "/spu/queryByIds", consumes = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/spu/queryByIds", consumes = MediaType.APPLICATION_JSON_VALUE)
AjaxResult<List<SpuTO>> batchQuerySpuInfo(BatchQuerySpuInfoParam query); AjaxResult<List<SpuTO>> batchQuerySpuInfo(BatchQuerySpuInfoParam query);
......
/**
* @(#)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
/**
* @(#)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;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment