Commit d57b1b0a by “zcwang”

modify:导出字段完善

parent 43682a60
...@@ -46,6 +46,7 @@ import com.netease.mail.yanxuan.change.biz.service.change.ChangeTypeService; ...@@ -46,6 +46,7 @@ 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.ItemService;
import com.netease.mail.yanxuan.change.biz.service.rpc.IusService; import com.netease.mail.yanxuan.change.biz.service.rpc.IusService;
import com.netease.mail.yanxuan.change.biz.service.rpc.QCService;
import com.netease.mail.yanxuan.change.biz.service.rpc.SupplierSendService; import com.netease.mail.yanxuan.change.biz.service.rpc.SupplierSendService;
import com.netease.mail.yanxuan.change.biz.service.rpc.SupplierService; import com.netease.mail.yanxuan.change.biz.service.rpc.SupplierService;
import com.netease.mail.yanxuan.change.biz.service.rpc.TodoService; import com.netease.mail.yanxuan.change.biz.service.rpc.TodoService;
...@@ -102,6 +103,7 @@ import com.netease.mail.yanxuan.change.integration.item.SimplePhyCateGoryResultC ...@@ -102,6 +103,7 @@ import com.netease.mail.yanxuan.change.integration.item.SimplePhyCateGoryResultC
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;
import com.netease.mail.yanxuan.change.integration.item.param.CommonIdsParamQuery; import com.netease.mail.yanxuan.change.integration.item.param.CommonIdsParamQuery;
import com.netease.mail.yanxuan.change.integration.qc.meta.QcCategoryVO;
import com.netease.mail.yanxuan.change.integration.todo.ChangeExecuteEmailDTO; import com.netease.mail.yanxuan.change.integration.todo.ChangeExecuteEmailDTO;
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.controller.communal.AjaxResponse; import com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse;
...@@ -172,6 +174,9 @@ public class ChangeFlowBiz { ...@@ -172,6 +174,9 @@ public class ChangeFlowBiz {
@Autowired @Autowired
private SupplierService supplierService; private SupplierService supplierService;
@Autowired
private QCService qcService;
public String createAndSubmit(ChangeFlowCreateReq changeFlowCreateReq) { public String createAndSubmit(ChangeFlowCreateReq changeFlowCreateReq) {
String uid = RequestLocalBean.getUid(); String uid = RequestLocalBean.getUid();
String name = RequestLocalBean.getName(); String name = RequestLocalBean.getName();
...@@ -994,7 +999,14 @@ public class ChangeFlowBiz { ...@@ -994,7 +999,14 @@ public class ChangeFlowBiz {
Long itemId = itemVO.getItemId(); Long itemId = itemVO.getItemId();
itemBasicInfoVO.setItemId(itemId); itemBasicInfoVO.setItemId(itemId);
itemBasicInfoVO.setItemName(itemVO.getItemName()); itemBasicInfoVO.setItemName(itemVO.getItemName());
itemBasicInfoVO.setQcCategory(null); List<QcCategoryVO> qcCategoryList = qcService.getQcCategoryListByItemId(itemId);
if (CollectionUtils.isNotEmpty(qcCategoryList)) {
String collect = qcCategoryList.stream().map(QcCategoryVO::getCategoryName)
.collect(Collectors.joining("/"));
itemBasicInfoVO.setQcCategory(collect);
} else {
itemBasicInfoVO.setQcCategory("/");
}
List<SimplePhyCateGoryResultCo> simplePhyCateGoryResultCos = categoryChain.get(itemId); List<SimplePhyCateGoryResultCo> simplePhyCateGoryResultCos = categoryChain.get(itemId);
if (CollectionUtils.isEmpty(simplePhyCateGoryResultCos)) { if (CollectionUtils.isEmpty(simplePhyCateGoryResultCos)) {
throw ExceptionFactory.createBiz(ResponseCode.THIRD_ERR, "未查询到物理类目"); throw ExceptionFactory.createBiz(ResponseCode.THIRD_ERR, "未查询到物理类目");
......
...@@ -70,4 +70,6 @@ public class ItemService { ...@@ -70,4 +70,6 @@ public class ItemService {
response.getMsg()); response.getMsg());
return new ArrayList<>(); return new ArrayList<>();
} }
} }
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
*/ */
package com.netease.mail.yanxuan.change.biz.service.rpc; package com.netease.mail.yanxuan.change.biz.service.rpc;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -17,8 +17,10 @@ import com.alibaba.fastjson.JSON; ...@@ -17,8 +17,10 @@ import com.alibaba.fastjson.JSON;
import com.netease.mail.yanxuan.change.biz.meta.exception.ExceptionFactory; import com.netease.mail.yanxuan.change.biz.meta.exception.ExceptionFactory;
import com.netease.mail.yanxuan.change.common.bean.ResponseCode; import com.netease.mail.yanxuan.change.common.bean.ResponseCode;
import com.netease.mail.yanxuan.change.common.bean.ResponseCodeEnum; import com.netease.mail.yanxuan.change.common.bean.ResponseCodeEnum;
import com.netease.mail.yanxuan.change.integration.flow.UserQueryDTO;
import com.netease.mail.yanxuan.change.integration.flow.ius.IusRpcService; import com.netease.mail.yanxuan.change.integration.flow.ius.IusRpcService;
import com.netease.mail.yanxuan.change.integration.flow.ius.req.IusDepartmentReq; import com.netease.mail.yanxuan.change.integration.flow.ius.req.IusDepartmentReq;
import com.netease.mail.yanxuan.change.integration.flow.ius.rsp.IusUserInfoRsp;
import com.netease.mail.yanxuan.change.integration.flow.ius.rsp.SecondaryDepartments; import com.netease.mail.yanxuan.change.integration.flow.ius.rsp.SecondaryDepartments;
import com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse; import com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse;
...@@ -47,4 +49,20 @@ public class IusService { ...@@ -47,4 +49,20 @@ public class IusService {
throw ExceptionFactory.createBiz(ResponseCode.CREATE_FLOW_ERROR, "查询部门错误"); throw ExceptionFactory.createBiz(ResponseCode.CREATE_FLOW_ERROR, "查询部门错误");
} }
} }
/**
* 查询用户信息
*/
public List<IusUserInfoRsp> queryUserListInfo(UserQueryDTO query) {
log.info("[queryUserListInfo] queryUserListInfo req:{}", JSON.toJSONString(query));
AjaxResponse<List<IusUserInfoRsp>> response = iusRpcService.queryUserListInfo(query);
log.info("[queryUserListInfo] response of queryUserListInfo ={}", JSON.toJSONString(response));
if (ResponseCodeEnum.SUCCESS.getCode() == response.getCode()) {
return response.getData();
} else {
log.error("[queryUserListInfo] queryUserListInfo failed, query={}, errMsg={}", JSON.toJSONString(query),
JSON.toJSONString(response));
return new ArrayList<>();
}
}
} }
\ No newline at end of file
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
*/ */
package com.netease.mail.yanxuan.change.biz.service.rpc; package com.netease.mail.yanxuan.change.biz.service.rpc;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -27,9 +29,9 @@ public class QCService { ...@@ -27,9 +29,9 @@ public class QCService {
@Autowired @Autowired
private QcRpcService qcRpcService; private QcRpcService qcRpcService;
public QcCategoryVO getQcCategoryListByItemId(Long itemId) { public List<QcCategoryVO> getQcCategoryListByItemId(Long itemId) {
log.info("[QCService-getQcCategoryListByItemId] request of query={}", itemId); log.info("[QCService-getQcCategoryListByItemId] request of query={}", itemId);
AjaxResult<QcCategoryVO> response = qcRpcService.getQcCategoryListByItemId(itemId); AjaxResult<List<QcCategoryVO>> response = qcRpcService.getQcCategoryListByItemId(itemId);
log.info("[QCService-getQcCategoryListByItemId] response of query QcCategoryList ={}", log.info("[QCService-getQcCategoryListByItemId] response of query QcCategoryList ={}",
JSON.toJSONString(response)); JSON.toJSONString(response));
if (Boolean.TRUE.equals(response.isSuccess())) { if (Boolean.TRUE.equals(response.isSuccess())) {
......
/**
* @(#)BusinessFormEnum.java, 2022/12/20.
* <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/20
*/
public enum BusinessFormEnum {
SELF_SUPPORT(0,"自营"),
YX_SELECTION_OEM(3,"严选贴牌代销"),
OTHER_BRANDS(4,"他方品牌代销"),
COMMISSION2(5,"代销2.0");
private Integer type;
private String desc;
BusinessFormEnum(Integer type, String desc) {
this.type = type;
this.desc = desc;
}
public Integer getType() {
return type;
}
public String getDesc() {
return desc;
}
public static String getByType(Integer type) {
for (BusinessFormEnum value : BusinessFormEnum.values()) {
if (value.getType().equals(type)) {
return value.getDesc();
}
}
return "";
}
}
\ No newline at end of file
/**
* @(#)MainSpuStatusEmum.java, 2022/12/20.
* <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/20
*/
public enum MainSpuStatusEnum {
INIT(0,"未上架"),
NOT_ON_SHELVES(3,"未上架"),
ON_SHELVES(4,"已上架"),
PRESHELVING(5,"预上架");
private Integer status;
private String desc;
MainSpuStatusEnum(Integer status, String desc) {
this.status = status;
this.desc = desc;
}
public Integer getStatus() {
return status;
}
public String getDesc() {
return desc;
}
public static String getByStatus(Integer status) {
for (MainSpuStatusEnum value : MainSpuStatusEnum.values()) {
if (value.getStatus().equals(status)) {
return value.getDesc();
}
}
return "";
}
}
\ No newline at end of file
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
package com.netease.mail.yanxuan.change.integration.excel; package com.netease.mail.yanxuan.change.integration.excel;
import com.netease.mail.yanxuan.change.common.enums.ChangeStatusEnum;
import com.netease.mail.yanxuan.change.common.enums.ChangeSubjectEnum; import com.netease.mail.yanxuan.change.common.enums.ChangeSubjectEnum;
import cn.afterturn.easypoi.excel.annotation.Excel; import cn.afterturn.easypoi.excel.annotation.Excel;
...@@ -19,10 +18,22 @@ import lombok.Data; ...@@ -19,10 +18,22 @@ import lombok.Data;
@Data @Data
public class ChangeFlowExcelDTO { public class ChangeFlowExcelDTO {
/** /**
* 主键id * 变更id
*/ */
@Excel(name = "变更ID") @Excel(name = "变更id")
private Long id; private Long flowId;
/**
* 变更发起时间
*/
@Excel(name = "变更发起时间")
private String createTime;
/**
* 变更发起人
*/
@Excel(name = "变更发起人")
private String changeCreator;
/** /**
* 变更主体 * 变更主体
...@@ -30,6 +41,7 @@ public class ChangeFlowExcelDTO { ...@@ -30,6 +41,7 @@ public class ChangeFlowExcelDTO {
*/ */
@Excel(name = "变更主体") @Excel(name = "变更主体")
private String changeSubject; private String changeSubject;
/** /**
* 变更类型,一级类型>二级类型 * 变更类型,一级类型>二级类型
*/ */
...@@ -37,53 +49,172 @@ public class ChangeFlowExcelDTO { ...@@ -37,53 +49,172 @@ public class ChangeFlowExcelDTO {
private String changeType; private String changeType;
/** /**
* 变更等级
*/
@Excel(name = "变更等级")
private Integer changeLevel;
/**
* 变更负责部门名 * 变更负责部门名
*/ */
@Excel(name = "变更负责部门名") @Excel(name = "变更负责部门名")
private String changeDepartment; private String changeDepartment;
/** /**
* 变更负责人
*/
@Excel(name = "变更负责人")
private String changeCommander;
/**
* 变更供应商:供应商ID+供应商名称
*/
@Excel(name = "变更供应商")
private String supplier;
/**
* 变更原因
*/
@Excel(name = "变更原因")
private String changeReason;
/**
* 变更内容 * 变更内容
*/ */
@Excel(name = "变更内容") @Excel(name = "变更内容")
private String changeContent; private String changeContent;
/** /**
* 变更负责人 * 变更潜在风险描述
*/ */
@Excel(name = "变更负责人") @Excel(name = "变更潜在风险描述")
private String changeCommander; private String changeRiskDesc;
/** /**
* 变更商品列表,SPUID+商品名称 * 变更收益类型
*/
@Excel(name = "变更收益类型")
private Integer changeProfit;
/**
* 变更收益说明
*/
@Excel(name = "变更收益说明")
private String changeProfitDesc;
/**
* 变更商品,商品名称
*/ */
@Excel(name = "变更商品") @Excel(name = "变更商品")
private String changeItems; private String changeItem;
/** /**
* 变更供应商,仅展示供应商ID,没有时展示为“/” * SPUID
*/ */
@Excel(name = "变更供应商") @Excel(name = "SPUID")
private String supplier; private Long SPUId;
/** /**
* 变更状态 * 品控类目
* @see ChangeStatusEnum
*/ */
@Excel(name = "变更状态") @Excel(name = "品控类目")
private Integer changeState; private String qcCategory;
/** /**
* 变更发起人 * 物理类目
*/ */
@Excel(name = "变更发起人") @Excel(name = "物理类目")
private String changeCreator; private String phyCategory;
/**
* 商品立项类型,0-正常立项商品,2-特殊免立项商品 3-组合装
*/
@Excel(name = "商品立项类型")
private Integer itemSetupType;
/**
* 经营形式,0-自营,3-严选贴牌代销,4-他方品牌代销,5-代销2.0
*/
@Excel(name = "经营形式")
private String businessForm;
/**
* 商品状态,0-未上架,1-未上架,2-已上架,4-预上架
*/
@Excel(name = "商品状态")
private String status;
/**
* 商品负责人
*/
@Excel(name = "商品负责人")
private String functionary;
/**
* 采购负责人
*/
@Excel(name = "采购负责人")
private String purchase;
/**
* SQE负责人
*/
@Excel(name = "SQE负责人")
private String goodsSqe;
/**
* 计划负责人
*/
@Excel(name = "计划负责人")
private String goodsProjectName;
/** /**
* 变更行动部门列表 * 变更行动部门
*/ */
@Excel(name = "变更行动部门") @Excel(name = "变更行动部门")
private String execDepartmentStrList; private String execDepartment;
/**
* 变更行动人
*/
@Excel(name = "变更行动人")
private String changeExecUser;
/**
* 行动项变更风险描述
*/
@Excel(name = "行动项变更风险描述")
private String changeExecRiskDesc;
/**
* 行动项
*/
@Excel(name = "行动项")
private String changeExecProject;
/** /**
* 创建时间 * 变更验证措施
*/ */
@Excel(name = "创建时间") @Excel(name = "变更验证措施")
private Long createTime; private String changeChecking;
/**
* 行动完成时间
*/
@Excel(name = "行动完成时间")
private Long changeExecFinishTime;
/**
* 行动完成情况
*/
@Excel(name = "行动完成情况")
private String changeExecFinishDesc;
/**
* 变更结论
*/
@Excel(name = "变更结论")
private Integer changeResult;
/**
* 变更完结时间
*/
@Excel(name = "变更完结时间")
private String changeEndTime;
} }
\ No newline at end of file
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
*/ */
package com.netease.mail.yanxuan.change.integration.qc; package com.netease.mail.yanxuan.change.integration.qc;
import java.util.List;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -22,5 +24,5 @@ import com.netease.yanxuan.missa.client.annotation.MissaClient; ...@@ -22,5 +24,5 @@ import com.netease.yanxuan.missa.client.annotation.MissaClient;
public interface QcRpcService { public interface QcRpcService {
@PostMapping("/xhr/item/getQcCategoryListByItemId.json") @PostMapping("/xhr/item/getQcCategoryListByItemId.json")
AjaxResult<QcCategoryVO> getQcCategoryListByItemId(Long itemId); AjaxResult<List<QcCategoryVO>> getQcCategoryListByItemId(Long itemId);
} }
\ No newline at end of file
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