Commit 309244d6 by zhaoxiaolei

增加token

parent 43598ab9
......@@ -25,4 +25,5 @@ public class GetConfigurationInputDTO {
private List<String> configIds;
private String skuCode;
private String token;
}
......@@ -21,5 +21,6 @@ public class SuperBomEntity {
String h3cpn;
String unisSalesName;
String configId;
String token;
List<Characteristics> characteristicList;
}
package cn.com.uitech.authorization.service.impl;
import cn.com.uitech.authorization.exception.BusinessException;
import cn.com.uitech.authorization.mapper.BomStatusMapper;
import cn.com.uitech.authorization.mapper.CtoBomMapper;
import cn.com.uitech.authorization.pojo.dto.ConfigurableBomLogOpera;
import cn.com.uitech.authorization.pojo.dto.CtoBomRequestParamDto;
import cn.com.uitech.authorization.pojo.dto.GetProductOutDto;
import cn.com.uitech.authorization.pojo.entity.ConfigurableBom;
import cn.com.uitech.authorization.pojo.entity.ProductGroup;
import cn.com.uitech.authorization.service.CtoBomService;
import cn.com.uitech.authorization.utils.ApiResult;
import cn.com.uitech.authorization.utils.RedisHelper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
......@@ -33,7 +36,7 @@ public class CtoBomServiceImpl implements CtoBomService {
@Autowired
private CtoBomMapper ctoBomMapper;
@Autowired
private BomStatusMapper bomStatusMapper;
private IntegrateServiceImpl integrateService;
@Resource
private RedisHelper redisHelper;
......@@ -46,20 +49,13 @@ public class CtoBomServiceImpl implements CtoBomService {
*/
@Override
public Object getCtoBoms(CtoBomRequestParamDto ctoBomRequestParamDto) {
if (!org.springframework.util.StringUtils.isEmpty(ctoBomRequestParamDto.getToken())) {
String redisToken = redisHelper.get("unis_cpq:" + ctoBomRequestParamDto.getToken());
if (!org.springframework.util.StringUtils.isEmpty(redisToken)) {
PageHelper.startPage(ctoBomRequestParamDto.getPage(), ctoBomRequestParamDto.getPerPage());
List<ConfigurableBom> ctoBoms = ctoBomMapper.getCtoBoms(ctoBomRequestParamDto);
return new PageInfo(ctoBoms);
} else {
ctoBomRequestParamDto.setToken(ctoBomRequestParamDto.getToken() + "token已失效,请重新申请");
return ctoBomRequestParamDto;
}
} else {
ctoBomRequestParamDto.setToken("请传入正确的token");
return ctoBomRequestParamDto;
GetProductOutDto getProductOutDto = integrateService.checkToken(ctoBomRequestParamDto.getToken());
if(getProductOutDto.getCode().equals(200)){
PageHelper.startPage(ctoBomRequestParamDto.getPage(), ctoBomRequestParamDto.getPerPage());
List<ConfigurableBom> ctoBoms = ctoBomMapper.getCtoBoms(ctoBomRequestParamDto);
return new PageInfo(ctoBoms);
}else{
throw new BusinessException(ApiResult.UNAUTHORIZED.getCode(),"token失效!");
}
}
......@@ -149,9 +145,11 @@ public class CtoBomServiceImpl implements CtoBomService {
@Override
public PageInfo<ConfigurableBom> getCtoBom(CtoBomRequestParamDto ctoBomRequestParamDto) {
PageHelper.startPage(ctoBomRequestParamDto.getPage(), ctoBomRequestParamDto.getPerPage());
List<ConfigurableBom> ctoBoms = ctoBomMapper.getCtoBoms(ctoBomRequestParamDto);
return new PageInfo(ctoBoms);
PageHelper.startPage(ctoBomRequestParamDto.getPage(), ctoBomRequestParamDto.getPerPage());
List<ConfigurableBom> ctoBoms = ctoBomMapper.getCtoBoms(ctoBomRequestParamDto);
return new PageInfo(ctoBoms);
}
......
......@@ -405,147 +405,32 @@ public class IntegrateServiceImpl implements IntegrateService {
public Object GetSKUByConfigInfo(SuperBomSkuInfo superBomSkuInfo, HttpServletRequest request,Integer temp) {
GetProductOutDto result = new GetProductOutDto();
//checkToken(superBomSkuInfo.getToken());
if (!ObjectUtils.isEmpty(superBomSkuInfo)) {
/**
1.申请SKU->验证配置是否存在->存在->是否生成SKU->生成SKU->返回SKU信息
2.申请SKU->验证配置是否存在->存在->是否生成SKU->未生成SKU->使用历史configid申请SKU->返回SKU信息
3.申请SKU->验证配置是否存在->不存在->保存配置信息->申请SKU->返回SKU信息
4.申请失败的SKU->可以再次提交申请->申请SKU->返回SKU信息
**/
if (superBomSkuInfo.getPoliticalMiningId() != null && superBomSkuInfo.getPatern() != null && superBomSkuInfo.getSuperBomCode() != null && superBomSkuInfo.getBrand() != null) {
//根据 政采 模式 品牌 superbom 查询sku主信息
if (superBomSkuInfo.getIsConfig().equals("是")) {
//todo 01-10 是特配的不做本地验证,每次都重新申请
//根据 政采 模式 品牌 superbom 查询sku主信息 没有查询到信息
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
superBomSkuInfo.setId(sequence.nextId());
SuperBomSkuInfoLogOpera logOpera = new SuperBomSkuInfoLogOpera();
BeanUtils.copyProperties(superBomSkuInfo,logOpera);
logOpera.setUpdateUser(request.getHeader("UserCode"));
if(temp==1){
logOpera.setOpera("/integrate/saveSukInfo");
}else if(temp == 2){
logOpera.setOpera("/integrate/GetSKUByH3CConfigInfo");
}else if(temp == 3){
logOpera.setOpera("/integrate/GetConfigBySUKINFO");
}else if(temp == 0){
logOpera.setOpera("/integrate/GetSKUByConfigInfo");
}
superBomSkuInfoMapper.saveLogOpera(logOpera);
superBomSkuInfoMapper.saveSkuInfo(superBomSkuInfo);
List<SuperBomSkuConfigInfo> characteristicList = superBomSkuInfo.getCharacteristicList();
characteristicList.forEach(item -> {
SuperBomSkuConfigInfo config = new SuperBomSkuConfigInfo();
BeanUtils.copyProperties(item, config);
config.setId(sequence.nextId());
config.setConfigId(superBomSkuInfo.getConfigId());
superBomSkuInfoMapper.saveSkuConfig(config);
});
//调用PLM申请sku号 返回后修改sku数据返回
ApplySkuCodeResultDto applySkuCodeResultDto = applySkuCode(superBomSkuInfo, request);
if (applySkuCodeResultDto.getCode().equals(200)) {
if (applySkuCodeResultDto.getCode().equals(200)) {
ApplySkuCodeResultDto.data data = applySkuCodeResultDto.getData();
data.setConfigId(superBomSkuInfo.getConfigId());
data.setMsg("已回号");
data.setUser(superBomSkuInfo.getApplyUser());
characteristicMapper.updateSuperBomSkuInfo(data);
superBomSkuInfo.setSkuCode(data.getSkuCode());
superBomSkuInfo.setSkuName(data.getSkuName());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
result.setData(superBomSkuInfo);
return result;
} else {
superBomSkuInfo.setPlmMsg(applySkuCodeResultDto.getMsg());
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setCode(applySkuCodeResultDto.getCode());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setData(applySkuCodeResultDto);
return result;
}
} else {
superBomSkuInfo.setPlmMsg(applySkuCodeResultDto.getMsg());
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
return result;
}
} else {
List<SuperBomSkuInfo> skuInfos = superBomSkuInfoMapper.getSkuInfo(superBomSkuInfo);
Boolean flag = true;
if (!CollectionUtils.isEmpty(skuInfos)) {
for (SuperBomSkuInfo skuInfo : skuInfos) {
//对比查出来的skuConfig信息是否完全一样
List<String> items = superBomSkuInfoMapper.getConfigInfos(skuInfo.getConfigId());
List<String> newItems = new ArrayList<>();
ArrayList<SuperBomSkuConfigInfo> params = new ArrayList<>(superBomSkuInfo.getCharacteristicList());
params.forEach(param -> newItems.add(param.getCharacteristicCode() + param.getCharacteristicValueCode() + skuInfo.getSuperBomCode()));
boolean equals = items.containsAll(newItems);
//撞配成功
if (equals) {
SuperBomSkuInfo getSkuByConfigId = superBomSkuInfoMapper.getSkuInfoByConfigId(skuInfo.getConfigId());
if (!StringUtils.isEmpty(getSkuByConfigId.getSkuCode())) {
//1.申请SKU->验证配置是否存在->存在->是否生成SKU->生成SKU->返回SKU信息
superBomSkuInfo.setSkuCode(getSkuByConfigId.getSkuCode());
superBomSkuInfo.setSkuName(getSkuByConfigId.getSkuName());
result.setMsg("配置已存在:SKUCode:" + superBomSkuInfo.getSkuCode());
result.setCode(500);
result.setData(superBomSkuInfo);
return result;
} else {
//2.申请SKU->验证配置是否存在->存在->是否生成SKU->
// 未生成SKU->使用历史configid申请SKU->返回SKU信息
superBomSkuInfo.setConfigId(skuInfo.getConfigId());
ApplySkuCodeResultDto applySkuCodeResultDto = applySkuCode(superBomSkuInfo, request);
if (applySkuCodeResultDto.getCode().equals(200)) {
if (applySkuCodeResultDto.getCode().equals(200)) {
ApplySkuCodeResultDto.data data = applySkuCodeResultDto.getData();
data.setConfigId(superBomSkuInfo.getConfigId());
data.setMsg("已回号");
data.setUser(superBomSkuInfo.getApplyUser());
characteristicMapper.updateSuperBomSkuInfo(data);
superBomSkuInfo.setSkuCode(data.getSkuCode());
superBomSkuInfo.setSkuName(data.getSkuName());
// result.setMsg(applySkuCodeResultDto.getMsg());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(200);
result.setData(superBomSkuInfo);
return result;
} else {
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setCode(500);
result.setMsg(applySkuCodeResultDto.getMsg());
return result;
}
} else {
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
return result;
}
}
} else {
//撞配失败赋值false
flag = false;
}
}
} else {
GetProductOutDto getProductOutDto = checkToken(superBomSkuInfo.getToken());
if (getProductOutDto.getCode().equals(200)) {
if (!ObjectUtils.isEmpty(superBomSkuInfo)) {
/**
1.申请SKU->验证配置是否存在->存在->是否生成SKU->生成SKU->返回SKU信息
2.申请SKU->验证配置是否存在->存在->是否生成SKU->未生成SKU->使用历史configid申请SKU->返回SKU信息
3.申请SKU->验证配置是否存在->不存在->保存配置信息->申请SKU->返回SKU信息
4.申请失败的SKU->可以再次提交申请->申请SKU->返回SKU信息
**/
if (superBomSkuInfo.getPoliticalMiningId() != null && superBomSkuInfo.getPatern() != null && superBomSkuInfo.getSuperBomCode() != null && superBomSkuInfo.getBrand() != null) {
//根据 政采 模式 品牌 superbom 查询sku主信息
if (superBomSkuInfo.getIsConfig().equals("是")) {
//todo 01-10 是特配的不做本地验证,每次都重新申请
//根据 政采 模式 品牌 superbom 查询sku主信息 没有查询到信息
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
superBomSkuInfo.setId(sequence.nextId());
SuperBomSkuInfoLogOpera logOpera = new SuperBomSkuInfoLogOpera();
BeanUtils.copyProperties(superBomSkuInfo,logOpera);
BeanUtils.copyProperties(superBomSkuInfo, logOpera);
logOpera.setUpdateUser(request.getHeader("UserCode"));
if(temp==1){
if (temp == 1) {
logOpera.setOpera("/integrate/saveSukInfo");
}else if(temp == 2){
} else if (temp == 2) {
logOpera.setOpera("/integrate/GetSKUByH3CConfigInfo");
}else if(temp == 3){
} else if (temp == 3) {
logOpera.setOpera("/integrate/GetConfigBySUKINFO");
}else if(temp == 0){
} else if (temp == 0) {
logOpera.setOpera("/integrate/GetSKUByConfigInfo");
}
superBomSkuInfoMapper.saveLogOpera(logOpera);
......@@ -569,6 +454,10 @@ public class IntegrateServiceImpl implements IntegrateService {
characteristicMapper.updateSuperBomSkuInfo(data);
superBomSkuInfo.setSkuCode(data.getSkuCode());
superBomSkuInfo.setSkuName(data.getSkuName());
superBomSkuInfo.setDescription(data.getDescription());
superBomSkuInfo.setSncode(data.getSnCode());
superBomSkuInfo.setProductType(data.getProductType());
superBomSkuInfo.setProductSmallType(data.getProductSmallType());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
result.setData(superBomSkuInfo);
......@@ -588,80 +477,211 @@ public class IntegrateServiceImpl implements IntegrateService {
result.setCode(applySkuCodeResultDto.getCode());
return result;
}
} else {
List<SuperBomSkuInfo> skuInfos = superBomSkuInfoMapper.getSkuInfo(superBomSkuInfo);
Boolean flag = true;
if (!CollectionUtils.isEmpty(skuInfos)) {
for (SuperBomSkuInfo skuInfo : skuInfos) {
//对比查出来的skuConfig信息是否完全一样
List<String> items = superBomSkuInfoMapper.getConfigInfos(skuInfo.getConfigId());
List<String> newItems = new ArrayList<>();
ArrayList<SuperBomSkuConfigInfo> params = new ArrayList<>(superBomSkuInfo.getCharacteristicList());
params.forEach(param -> newItems.add(param.getCharacteristicCode() + param.getCharacteristicValueCode() + skuInfo.getSuperBomCode()));
boolean equals = items.containsAll(newItems);
//撞配成功
if (equals) {
SuperBomSkuInfo getSkuByConfigId = superBomSkuInfoMapper.getSkuInfoByConfigId(skuInfo.getConfigId());
if (!StringUtils.isEmpty(getSkuByConfigId.getSkuCode())) {
//1.申请SKU->验证配置是否存在->存在->是否生成SKU->生成SKU->返回SKU信息
superBomSkuInfo.setSkuCode(getSkuByConfigId.getSkuCode());
superBomSkuInfo.setSkuName(getSkuByConfigId.getSkuName());
result.setMsg("配置已存在:SKUCode:" + superBomSkuInfo.getSkuCode());
result.setCode(500);
result.setData(superBomSkuInfo);
return result;
} else {
//2.申请SKU->验证配置是否存在->存在->是否生成SKU->
// 未生成SKU->使用历史configid申请SKU->返回SKU信息
superBomSkuInfo.setConfigId(skuInfo.getConfigId());
ApplySkuCodeResultDto applySkuCodeResultDto = applySkuCode(superBomSkuInfo, request);
if (applySkuCodeResultDto.getCode().equals(200)) {
if (applySkuCodeResultDto.getCode().equals(200)) {
ApplySkuCodeResultDto.data data = applySkuCodeResultDto.getData();
data.setConfigId(superBomSkuInfo.getConfigId());
data.setMsg("已回号");
data.setUser(superBomSkuInfo.getApplyUser());
characteristicMapper.updateSuperBomSkuInfo(data);
superBomSkuInfo.setSkuCode(data.getSkuCode());
superBomSkuInfo.setSkuName(data.getSkuName());
superBomSkuInfo.setDescription(data.getDescription());
superBomSkuInfo.setSncode(data.getSnCode());
superBomSkuInfo.setProductType(data.getProductType());
superBomSkuInfo.setProductSmallType(data.getProductSmallType());
// result.setMsg(applySkuCodeResultDto.getMsg());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(200);
result.setData(superBomSkuInfo);
return result;
} else {
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setCode(500);
result.setMsg(applySkuCodeResultDto.getMsg());
return result;
}
} else {
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
return result;
}
}
}
//3.申请SKU->验证配置是否存在->不存在->保存配置信息->申请SKU->返回SKU信息
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
if (flag.equals(false)) {
superBomSkuInfo.setId(sequence.nextId());
SuperBomSkuInfoLogOpera logOpera = new SuperBomSkuInfoLogOpera();
BeanUtils.copyProperties(superBomSkuInfo,logOpera);
logOpera.setUpdateUser(request.getHeader("UserCode"));
if(temp==1){
logOpera.setOpera("/integrate/saveSukInfo");
}else if(temp == 2){
logOpera.setOpera("/integrate/GetSKUByH3CConfigInfo");
}else if(temp == 3){
logOpera.setOpera("/integrate/GetConfigBySUKINFO");
}else if(temp == 0){
logOpera.setOpera("/integrate/GetSKUByConfigInfo");
}
superBomSkuInfoMapper.saveLogOpera(logOpera);
superBomSkuInfoMapper.saveSkuInfo(superBomSkuInfo);
List<SuperBomSkuConfigInfo> characteristicList = superBomSkuInfo.getCharacteristicList();
characteristicList.forEach(item -> {
SuperBomSkuConfigInfo config = new SuperBomSkuConfigInfo();
BeanUtils.copyProperties(item, config);
config.setId(sequence.nextId());
config.setConfigId(superBomSkuInfo.getConfigId());
superBomSkuInfoMapper.saveSkuConfig(config);
});
//调用PLM申请sku号 返回后修改sku数据返回
ApplySkuCodeResultDto applySkuCodeResultDto = applySkuCode(superBomSkuInfo, request);
if (applySkuCodeResultDto.getCode().equals(200)) {
} else {
//撞配失败赋值false
flag = false;
}
}
} else {
//根据 政采 模式 品牌 superbom 查询sku主信息 没有查询到信息
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
superBomSkuInfo.setId(sequence.nextId());
SuperBomSkuInfoLogOpera logOpera = new SuperBomSkuInfoLogOpera();
BeanUtils.copyProperties(superBomSkuInfo, logOpera);
logOpera.setUpdateUser(request.getHeader("UserCode"));
if (temp == 1) {
logOpera.setOpera("/integrate/saveSukInfo");
} else if (temp == 2) {
logOpera.setOpera("/integrate/GetSKUByH3CConfigInfo");
} else if (temp == 3) {
logOpera.setOpera("/integrate/GetConfigBySUKINFO");
} else if (temp == 0) {
logOpera.setOpera("/integrate/GetSKUByConfigInfo");
}
superBomSkuInfoMapper.saveLogOpera(logOpera);
superBomSkuInfoMapper.saveSkuInfo(superBomSkuInfo);
List<SuperBomSkuConfigInfo> characteristicList = superBomSkuInfo.getCharacteristicList();
characteristicList.forEach(item -> {
SuperBomSkuConfigInfo config = new SuperBomSkuConfigInfo();
BeanUtils.copyProperties(item, config);
config.setId(sequence.nextId());
config.setConfigId(superBomSkuInfo.getConfigId());
superBomSkuInfoMapper.saveSkuConfig(config);
});
//调用PLM申请sku号 返回后修改sku数据返回
ApplySkuCodeResultDto applySkuCodeResultDto = applySkuCode(superBomSkuInfo, request);
if (applySkuCodeResultDto.getCode().equals(200)) {
ApplySkuCodeResultDto.data data = applySkuCodeResultDto.getData();
data.setConfigId(superBomSkuInfo.getConfigId());
data.setMsg("已回号");
data.setUser(superBomSkuInfo.getApplyUser());
characteristicMapper.updateSuperBomSkuInfo(data);
superBomSkuInfo.setSkuCode(data.getSkuCode());
superBomSkuInfo.setSkuName(data.getSkuName());
if (applySkuCodeResultDto.getCode().equals(200)) {
ApplySkuCodeResultDto.data data = applySkuCodeResultDto.getData();
data.setConfigId(superBomSkuInfo.getConfigId());
data.setMsg("已回号");
data.setUser(superBomSkuInfo.getApplyUser());
characteristicMapper.updateSuperBomSkuInfo(data);
superBomSkuInfo.setSkuCode(data.getSkuCode());
superBomSkuInfo.setSkuName(data.getSkuName());
superBomSkuInfo.setDescription(data.getDescription());
superBomSkuInfo.setSncode(data.getSnCode());
superBomSkuInfo.setProductType(data.getProductType());
superBomSkuInfo.setProductSmallType(data.getProductSmallType());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
result.setData(superBomSkuInfo);
return result;
} else {
superBomSkuInfo.setPlmMsg(applySkuCodeResultDto.getMsg());
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setCode(applySkuCodeResultDto.getCode());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setData(applySkuCodeResultDto);
return result;
}
} else {
superBomSkuInfo.setPlmMsg(applySkuCodeResultDto.getMsg());
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
result.setData(superBomSkuInfo);
return result;
}
}
//3.申请SKU->验证配置是否存在->不存在->保存配置信息->申请SKU->返回SKU信息
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
if (flag.equals(false)) {
superBomSkuInfo.setId(sequence.nextId());
SuperBomSkuInfoLogOpera logOpera = new SuperBomSkuInfoLogOpera();
BeanUtils.copyProperties(superBomSkuInfo, logOpera);
logOpera.setUpdateUser(request.getHeader("UserCode"));
if (temp == 1) {
logOpera.setOpera("/integrate/saveSukInfo");
} else if (temp == 2) {
logOpera.setOpera("/integrate/GetSKUByH3CConfigInfo");
} else if (temp == 3) {
logOpera.setOpera("/integrate/GetConfigBySUKINFO");
} else if (temp == 0) {
logOpera.setOpera("/integrate/GetSKUByConfigInfo");
}
superBomSkuInfoMapper.saveLogOpera(logOpera);
superBomSkuInfoMapper.saveSkuInfo(superBomSkuInfo);
List<SuperBomSkuConfigInfo> characteristicList = superBomSkuInfo.getCharacteristicList();
characteristicList.forEach(item -> {
SuperBomSkuConfigInfo config = new SuperBomSkuConfigInfo();
BeanUtils.copyProperties(item, config);
config.setId(sequence.nextId());
config.setConfigId(superBomSkuInfo.getConfigId());
superBomSkuInfoMapper.saveSkuConfig(config);
});
//调用PLM申请sku号 返回后修改sku数据返回
ApplySkuCodeResultDto applySkuCodeResultDto = applySkuCode(superBomSkuInfo, request);
if (applySkuCodeResultDto.getCode().equals(200)) {
if (applySkuCodeResultDto.getCode().equals(200)) {
ApplySkuCodeResultDto.data data = applySkuCodeResultDto.getData();
data.setConfigId(superBomSkuInfo.getConfigId());
data.setMsg("已回号");
data.setUser(superBomSkuInfo.getApplyUser());
characteristicMapper.updateSuperBomSkuInfo(data);
superBomSkuInfo.setSkuCode(data.getSkuCode());
superBomSkuInfo.setSkuName(data.getSkuName());
superBomSkuInfo.setDescription(data.getDescription());
superBomSkuInfo.setSncode(data.getSnCode());
superBomSkuInfo.setProductType(data.getProductType());
superBomSkuInfo.setProductSmallType(data.getProductSmallType());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
result.setData(superBomSkuInfo);
return result;
} else {
superBomSkuInfo.setPlmMsg(applySkuCodeResultDto.getMsg());
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setCode(applySkuCodeResultDto.getCode());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setData(applySkuCodeResultDto);
return result;
}
} else {
superBomSkuInfo.setPlmMsg(applySkuCodeResultDto.getMsg());
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setCode(applySkuCodeResultDto.getCode());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setData(applySkuCodeResultDto);
result.setCode(applySkuCodeResultDto.getCode());
return result;
}
} else {
superBomSkuInfo.setPlmMsg(applySkuCodeResultDto.getMsg());
superBomSkuInfoMapper.updateSkuStatus(superBomSkuInfo);
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
result.setMsg("配置已存在,请勿重复申请");
result.setCode(500);
result.setData(superBomSkuInfo);
return result;
}
} else {
result.setMsg("配置已存在,请勿重复申请");
result.setCode(500);
result.setData(superBomSkuInfo);
return result;
}
}
} else {
result.setMsg("是否政采/模式/产品编码/品牌是否,不能为空!");
result.setCode(500);
result.setData(superBomSkuInfo);
return result;
}
} else {
result.setMsg("是否政采/模式/产品编码/品牌是否,不能为空!");
result.setCode(500);
result.setData(superBomSkuInfo);
return result;
}
} else {
return getProductOutDto;
}
return result;
......@@ -677,32 +697,35 @@ public class IntegrateServiceImpl implements IntegrateService {
**/
public Object GetConfigBySUKINFO(SuperBomSkuInfo superBomSkuInfo, HttpServletRequest request) {
GetProductOutDto result = new GetProductOutDto();
//checkToken(superBomSkuInfo.getToken());
//撞配
Object ob = GetSKUByConfigInfo(superBomSkuInfo, request,3);
boolean flag = ob instanceof GetProductOutDto;
if (flag) {
Object o = JSONObject.toJSON(ob);
Map<String, Object> map = (Map<String, Object>) o;
Integer code = (Integer) map.get("code");
if (code.equals(200)) {
JSONObject data = (JSONObject) map.get("data");
result.setCode(200);
result.setData(data);
GetProductOutDto getProductOutDto = checkToken(superBomSkuInfo.getToken());
if (getProductOutDto.getCode().equals(200)) {
//撞配
superBomSkuInfo.setIsConfig("否");
Object ob = GetSKUByConfigInfo(superBomSkuInfo, request, 3);
boolean flag = ob instanceof GetProductOutDto;
if (flag) {
Object o = JSONObject.toJSON(ob);
Map<String, Object> map = (Map<String, Object>) o;
Integer code = (Integer) map.get("code");
if (code.equals(200)) {
JSONObject data = (JSONObject) map.get("data");
result.setCode(200);
result.setData(data);
} else {
result.setCode(code);
result.setMsg((String) map.get("msg"));
result.setData(superBomSkuInfo);
}
return result;
} else {
result.setCode(code);
result.setMsg((String) map.get("msg"));
result.setData(superBomSkuInfo);
GetProductOutDto ss = (GetProductOutDto) ob;
result.setCode(ss.getCode());
result.setMsg(ss.getMsg());
return result;
}
return result;
} else {
GetProductOutDto ss = (GetProductOutDto) ob;
result.setCode(ss.getCode());
result.setMsg(ss.getMsg());
return result;
return getProductOutDto;
}
}
/**
......@@ -712,22 +735,23 @@ public class IntegrateServiceImpl implements IntegrateService {
* @Date 2021/12/29 14:23
* @Param
**/
private GetProductOutDto checkToken(String token) {
GetProductOutDto checkToken(String token) {
GetProductOutDto result = new GetProductOutDto();
if (!StringUtils.isEmpty(token)) {
String redisToken = redisHelper.get("unis_cpq:" + token);
if (!StringUtils.isEmpty(redisToken)) {
result.setCode(200);
return result;
} else {
result.setMsg(token + "token已失效,请重新申请");
result.setCode(500);
result.setMsg(token + " token已失效,请重新申请");
result.setCode(ApiResult.UNAUTHORIZED.getCode());
return result;
}
} else {
result.setMsg("请传入正确的token");
result.setCode(500);
result.setCode(ApiResult.UNAUTHORIZED.getCode());
return result;
}
return result;
}
......@@ -770,7 +794,8 @@ public class IntegrateServiceImpl implements IntegrateService {
String doubleMd5 = MD5Util.getMD5Str(md5Str);
result.setData(doubleMd5);
result.setCode(200);
redisHelper.set("unis_cpq:" + getOne.getUserCode().toUpperCase(), doubleMd5, 86400);
//用于代码校验token
redisHelper.set("unis_cpq:" + doubleMd5, doubleMd5, 86400);
} else {
result.setData(redis);
result.setCode(200);
......@@ -855,7 +880,7 @@ public class IntegrateServiceImpl implements IntegrateService {
result.setCode(200);
redisHelper.set("unis_cpq:" + userinfo.getUserCode().toUpperCase(), doubleMd5, 86400);
//用于代码校验token
//redisHelper.set("unis_cpq:" + doubleMd5, doubleMd5, 86400);
redisHelper.set("unis_cpq:" + doubleMd5, doubleMd5, 86400);
} else {
result.setMsg(null);
result.setCode(200);
......@@ -1069,51 +1094,64 @@ public class IntegrateServiceImpl implements IntegrateService {
**/
public Object GetSKUByH3CConfigInfo(GetSKUByH3CConfigInfo configSkuInfo, HttpServletRequest request) {
//checkToken(configSkuInfo.getToken());
GetProductOutDto getProductOutDto = checkToken(configSkuInfo.getToken());
if (getProductOutDto.getCode().equals(200)) {
/*
1.使用H3CPN匹配SKU表中SuperBOM
2.比对SKU下的所有配置,都在H3C清单中,就算匹配成功
3.匹配不成功的,先查看配置是否满足VT约束,满足以后调用生成配置接口,获取配置JSON后GetSKUByConfigInfo 找PLM申请SKU
不支持特配,是否特配,默认不是
* */
if (!CollectionUtils.isEmpty(configSkuInfo.getH3CPNList())) {
List<GetSKUByH3CConfigInfo.H3CPNList> h3CPNList = configSkuInfo.getH3CPNList();
for (GetSKUByH3CConfigInfo.H3CPNList cpnList : h3CPNList) {
//根据H3CPN查询superbom
ConfigurableBom configurableBom = ctoBomMapper.getConfigId(cpnList.getH3cPn());
boolean flag = false;
if (!CollectionUtils.isEmpty(cpnList.getSelectedCharacteristicList())) {
List<GetSKUByH3CConfigInfo.KeyValues> selectedCharacteristicList = cpnList.getSelectedCharacteristicList();
//有superbom
if (!ObjectUtils.isEmpty(configurableBom)) {
//有configid
if (!StringUtils.isEmpty(configurableBom.getConfigId())) {
//查询出superBom下所有isH3C的数据
List<Characteristic> characteristicH3CList = characteristicMapper.getCharacteristicH3CList(configurableBom.getSuperBomCode());
List<String> h3cCodeList = new ArrayList<>();
for (Characteristic characteristic : characteristicH3CList) {
h3cCodeList.add(characteristic.getCharacteristicCode());
}
for (GetSKUByH3CConfigInfo.KeyValues keyValues : selectedCharacteristicList) {
CharacteristicValue characteristicValue = characteristicValueMapper.getCharacteristicValueInfoByCode(keyValues.getH3cVCode(), configurableBom.getSuperBomCode());
//验证H3CVCODE 是否存在
if (ObjectUtils.isEmpty(characteristicValue)) {
cpnList.setMsg("CPQ数据验证失败,失败原因:" + keyValues.getH3cVCode() + "关系未维护!");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
flag = false;
break;
} else {
// 查询出superBom下所有isH3C的数据 characteristicH3CList 比较 是否都有传
boolean contains = h3cCodeList.contains(characteristicValue.getCharacteristicCode());
if (!contains) {
Integer isH3C = characteristicMapper.getCharacteristicInfo(characteristicValue.getCharacteristicCode(), configurableBom.getSuperBomCode());
if (isH3C.equals(1)) {
//不存在数据库isH3C的数据返回报错
cpnList.setMsg("CPQ数据验证失败,失败原因:" + characteristicValue.getCharacteristicCode() + "特征不能为空!");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
flag = false;
break;
if (!CollectionUtils.isEmpty(configSkuInfo.getH3CPNList())) {
List<GetSKUByH3CConfigInfo.H3CPNList> h3CPNList = configSkuInfo.getH3CPNList();
for (GetSKUByH3CConfigInfo.H3CPNList cpnList : h3CPNList) {
//根据H3CPN查询superbom
ConfigurableBom configurableBom = ctoBomMapper.getConfigId(cpnList.getH3cPn());
boolean flag = false;
if (!CollectionUtils.isEmpty(cpnList.getSelectedCharacteristicList())) {
List<GetSKUByH3CConfigInfo.KeyValues> selectedCharacteristicList = cpnList.getSelectedCharacteristicList();
//有superbom
if (!ObjectUtils.isEmpty(configurableBom)) {
//有configid
if (!StringUtils.isEmpty(configurableBom.getConfigId())) {
//查询出superBom下所有isH3C的数据
List<Characteristic> characteristicH3CList = characteristicMapper.getCharacteristicH3CList(configurableBom.getSuperBomCode());
List<String> h3cCodeList = new ArrayList<>();
for (Characteristic characteristic : characteristicH3CList) {
h3cCodeList.add(characteristic.getCharacteristicCode());
}
for (GetSKUByH3CConfigInfo.KeyValues keyValues : selectedCharacteristicList) {
CharacteristicValue characteristicValue = characteristicValueMapper.getCharacteristicValueInfoByCode(keyValues.getH3cVCode(), configurableBom.getSuperBomCode());
//验证H3CVCODE 是否存在
if (ObjectUtils.isEmpty(characteristicValue)) {
cpnList.setMsg("CPQ数据验证失败,失败原因:" + keyValues.getH3cVCode() + "关系未维护!");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
flag = false;
break;
} else {
// 查询出superBom下所有isH3C的数据 characteristicH3CList 比较 是否都有传
boolean contains = h3cCodeList.contains(characteristicValue.getCharacteristicCode());
if (!contains) {
Integer isH3C = characteristicMapper.getCharacteristicInfo(characteristicValue.getCharacteristicCode(), configurableBom.getSuperBomCode());
if (isH3C.equals(1)) {
//不存在数据库isH3C的数据返回报错
cpnList.setMsg("CPQ数据验证失败,失败原因:" + characteristicValue.getCharacteristicCode() + "特征不能为空!");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
flag = false;
break;
} else {
//验证H3CVCODE是否下架
if (characteristicValue.getIsState() == 0) {
cpnList.setMsg("CPQ数据验证失败,失败原因:" + characteristicValue.getCharacteristicValueCode() + "已下架!");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
flag = false;
break;
} else {
//有superbom 有configid h3cvcode存在 没有下架 设置true进行撞配
flag = true;
}
}
} else {
//验证H3CVCODE是否下架
if (characteristicValue.getIsState() == 0) {
......@@ -1126,207 +1164,204 @@ public class IntegrateServiceImpl implements IntegrateService {
flag = true;
}
}
} else {
//验证H3CVCODE是否下架
if (characteristicValue.getIsState() == 0) {
cpnList.setMsg("CPQ数据验证失败,失败原因:" + characteristicValue.getCharacteristicValueCode() + "已下架!");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
flag = false;
break;
} else {
//有superbom 有configid h3cvcode存在 没有下架 设置true进行撞配
flag = true;
}
}
}
}
} else {
//没有configid
cpnList.setMsg(configurableBom.getSuperBomCode() + "没有维护默认值");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
continue;
}
} else {
//没有configid
cpnList.setMsg(configurableBom.getSuperBomCode() + "没有维护默认值");
//没有superbom
cpnList.setMsg("H3CPN没有维护对照关系");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
continue;
}
} else {
//没有superbom
cpnList.setMsg("H3CPN没有维护对照关系");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
continue;
}
//有superbom 有configid h3cvcode存在 没有下架 设置true进行撞配
if (flag) {
//根据configId生成配置
GetConfigurationInputDTO getConfigurationInputDTO = new GetConfigurationInputDTO();
List<String> configIds = new ArrayList<>();
configIds.add(configurableBom.getConfigId());
getConfigurationInputDTO.setConfigIds(configIds);
//调用生成配置接口
Object getConfigData = getConfigInfo(getConfigurationInputDTO);
Object o = JSONObject.toJSON(getConfigData);
List<Object> objects = (List<Object>) o;
Map<String, Object> map = (Map<String, Object>) objects.get(0);
Object superBomInfo = map.get("superBomInfo");
SuperBomSkuInfo superBomSkuInfo = new SuperBomSkuInfo();
ArrayList<SuperBomSkuConfigInfo> configs = new ArrayList<>();
superBomSkuInfo.setSuperBomCode(configurableBom.getSuperBomCode());
superBomSkuInfo.setConfigId(configurableBom.getConfigId());
//H3C 过来写死 CTO
BeanUtils.copyProperties(superBomInfo, superBomSkuInfo);
superBomSkuInfo.setToken(configSkuInfo.getToken());
superBomSkuInfo.setPatern("CTO");
Integer politicalMiningId = cpnList.getPoliticalMiningId();
if (politicalMiningId.equals(1)) {
superBomSkuInfo.setPoliticalMiningId("是");
} else {
superBomSkuInfo.setPoliticalMiningId("否");
}
SuperBomSkuInfo aa = (SuperBomSkuInfo) superBomInfo;
//获取list信息
List<SuperBomSkuConfigInfo> characteristicList = aa.getCharacteristicList();
superBomSkuInfo.setCharacteristicList(characteristicList);
//根据ccode vcode 替换list信息
List<GetSKUByH3CConfigInfo.KeyValues> paramList = cpnList.getSelectedCharacteristicList();
//循环配置表信息
characteristicList.forEach(characteristic -> {
//循环传进来的值信息
paramList.forEach(param -> {
CharacteristicValue characteristicValue = characteristicValueMapper.getCharacteristicValueInfoByCode(param.getH3cVCode(), configurableBom.getSuperBomCode());
if (characteristic.getCharacteristicCode().equals(characteristicValue.getCharacteristicCode())) {
characteristic.setCharacteristicValueCode(characteristicValue.getCharacteristicValueCode());
characteristic.setCharacteristicValueName(characteristicValue.getCharacteristicValueName());
characteristic.setUnisSalesVName(characteristicValue.getUnisSalesVName());
characteristic.setH3cVValue(characteristicValue.getH3cDeliverCode());
characteristic.setZphCode(characteristicValue.getZphCode());
characteristic.setZphName(characteristicValue.getZphName());
}
//有superbom 有configid h3cvcode存在 没有下架 设置true进行撞配
if (flag) {
//根据configId生成配置
GetConfigurationInputDTO getConfigurationInputDTO = new GetConfigurationInputDTO();
List<String> configIds = new ArrayList<>();
configIds.add(configurableBom.getConfigId());
getConfigurationInputDTO.setConfigIds(configIds);
//调用生成配置接口
Object getConfigData = getConfigInfo(getConfigurationInputDTO);
Object o = JSONObject.toJSON(getConfigData);
List<Object> objects = (List<Object>) o;
Map<String, Object> map = (Map<String, Object>) objects.get(0);
Object superBomInfo = map.get("superBomInfo");
SuperBomSkuInfo superBomSkuInfo = new SuperBomSkuInfo();
ArrayList<SuperBomSkuConfigInfo> configs = new ArrayList<>();
superBomSkuInfo.setSuperBomCode(configurableBom.getSuperBomCode());
superBomSkuInfo.setConfigId(configurableBom.getConfigId());
//H3C 过来写死 CTO 不是特配
BeanUtils.copyProperties(superBomInfo, superBomSkuInfo);
superBomSkuInfo.setToken(configSkuInfo.getToken());
superBomSkuInfo.setPatern("CTO");
superBomSkuInfo.setIsConfig("否");
Integer politicalMiningId = cpnList.getPoliticalMiningId();
if (politicalMiningId.equals(1)) {
superBomSkuInfo.setPoliticalMiningId("是");
} else {
superBomSkuInfo.setPoliticalMiningId("否");
}
SuperBomSkuInfo aa = (SuperBomSkuInfo) superBomInfo;
//获取list信息
List<SuperBomSkuConfigInfo> characteristicList = aa.getCharacteristicList();
superBomSkuInfo.setCharacteristicList(characteristicList);
//根据ccode vcode 替换list信息
List<GetSKUByH3CConfigInfo.KeyValues> paramList = cpnList.getSelectedCharacteristicList();
//循环配置表信息
characteristicList.forEach(characteristic -> {
//循环传进来的值信息
paramList.forEach(param -> {
CharacteristicValue characteristicValue = characteristicValueMapper.getCharacteristicValueInfoByCode(param.getH3cVCode(), configurableBom.getSuperBomCode());
if (characteristic.getCharacteristicCode().equals(characteristicValue.getCharacteristicCode())) {
characteristic.setCharacteristicValueCode(characteristicValue.getCharacteristicValueCode());
characteristic.setCharacteristicValueName(characteristicValue.getCharacteristicValueName());
characteristic.setUnisSalesVName(characteristicValue.getUnisSalesVName());
characteristic.setH3cVValue(characteristicValue.getH3cDeliverCode());
characteristic.setZphCode(characteristicValue.getZphCode());
characteristic.setZphName(characteristicValue.getZphName());
}
});
});
});
//带着配置调用生成配置接口 获取configid赋值到撞配里面
BuildConfigurationInputDTO buildConfigurationInputDTO = new BuildConfigurationInputDTO();
buildConfigurationInputDTO.setProductGroupCode(superBomSkuInfo.getProductClassCode());
buildConfigurationInputDTO.setProductClassCode(superBomSkuInfo.getProductClassCode());
buildConfigurationInputDTO.setMaterialCode(((SuperBomSkuInfo) superBomInfo).getSuperBomCode());
buildConfigurationInputDTO.setOperator("system");
buildConfigurationInputDTO.setSelectedComplete(true);
//构建初始化接口 获取sessionId
SelectorEntity selectorEntity = new SelectorEntity();
selectorEntity.setIsShow(1);
selectorEntity.setOperator("system");
selectorEntity.setSystem("ZG");
selectorEntity.setProductClassCode(((SuperBomSkuInfo) superBomInfo).getProductClassCode());
selectorEntity.setSuperBomCode(((SuperBomSkuInfo) superBomInfo).getSuperBomCode());
Object initializationData = integrateController.initializationData(selectorEntity);
Map<String, Object> initMap = (Map<String, Object>) JSONObject.toJSON(initializationData);
Map<String, Object> dataMap = (Map<String, Object>) initMap.get("data");
String sessionId = (String) dataMap.get("sessionId");
buildConfigurationInputDTO.setSessionId(sessionId);
List<BuildConfigurationInputDTO.SelectedCharacteristicListBean> selectedCharacteristicListBeans = new ArrayList<>();
//传入的pnlist
superBomSkuInfo.getCharacteristicList().forEach(selectedCharacteristic -> {
BuildConfigurationInputDTO.SelectedCharacteristicListBean selectedCharacteristicListBean = new BuildConfigurationInputDTO.SelectedCharacteristicListBean();
//根据 list里面的vcode 查询v信息和c信息 赋值到 生成配置的对象里
selectedCharacteristicListBean.setCharacteristicName(selectedCharacteristic.getCharacteristicName());
selectedCharacteristicListBean.setCharacteristicValueName(selectedCharacteristic.getCharacteristicValueName());
selectedCharacteristicListBean.setQuantity(1);
selectedCharacteristicListBeans.add(selectedCharacteristicListBean);
});
buildConfigurationInputDTO.setSelectedCharacteristicList(selectedCharacteristicListBeans);
buildConfigurationInputDTO.setKeyValues(null);
Object buildConfiguration = integrateController.buildConfiguration(buildConfigurationInputDTO, null);
Map<String, Object> buildConfigurationMap = (Map<String, Object>) JSONObject.toJSON(buildConfiguration);
String configId = (String) buildConfigurationMap.get("configId");
superBomSkuInfo.setConfigId(configId);
//撞配之前调用前置验证
//构建前置验证数据结构
PostVerifyInputDTO postVerifyInputDTO = new PostVerifyInputDTO();
postVerifyInputDTO.setProductClassCode(((SuperBomSkuInfo) superBomInfo).getProductClassCode());
postVerifyInputDTO.setSuperBomCode(((SuperBomSkuInfo) superBomInfo).getSuperBomCode());
postVerifyInputDTO.setOperator("system");
postVerifyInputDTO.setSessionId(sessionId);
List<PostVerifyInputDTO.SelectedCharacteristicListBean> selectedCharacteristicLists = new ArrayList<>();
superBomSkuInfo.getCharacteristicList().forEach(selectedCharacteristic -> {
PostVerifyInputDTO.SelectedCharacteristicListBean selectedCharacteristicListBean = new PostVerifyInputDTO.SelectedCharacteristicListBean();
//根据 list里面的vcode 查询v信息和c信息 赋值到 生成配置的对象里
selectedCharacteristicListBean.setCharacteristicName(selectedCharacteristic.getCharacteristicName());
selectedCharacteristicListBean.setCharacteristicValueName(selectedCharacteristic.getCharacteristicValueName());
selectedCharacteristicListBean.setQuantity(1);
selectedCharacteristicLists.add(selectedCharacteristicListBean);
});
postVerifyInputDTO.setSelectedCharacteristicList(selectedCharacteristicLists);
Object preVerify = integrateController.preVerify(postVerifyInputDTO, null);
Map<String, Object> preVerifyMap = (Map<String, Object>) JSONObject.toJSON(preVerify);
if (preVerifyMap.get("result").equals(true)) {
//撞配 找PLM申请SKU
Object ob = GetSKUByConfigInfo(superBomSkuInfo, request,2);
boolean flag1 = ob instanceof GetProductOutDto;
if (flag1) {
Object o1 = JSONObject.toJSON(ob);
Map<String, Object> map1 = (Map<String, Object>) o1;
Integer code = (Integer) map1.get("code");
if (code.equals(200)) {
JSONObject data = (JSONObject) map1.get("data");
cpnList.setSkuCode((String) data.get("skuCode"));
cpnList.setSkuName((String) data.get("skuName"));
cpnList.setCode(code);
} else {
Object data = map1.get("data");
if (!ObjectUtils.isEmpty(data)) {
Object data2 = JSONObject.toJSON(data);
Map<String, Object> map2 = (Map<String, Object>) data2;
if (!ObjectUtils.isEmpty(map2)) {
cpnList.setSkuCode((String) map2.get("skuCode"));
cpnList.setSkuName((String) map2.get("skuName"));
cpnList.setPatern("CTO");
cpnList.setCode(200);
}
//带着配置调用生成配置接口 获取configid赋值到撞配里面
BuildConfigurationInputDTO buildConfigurationInputDTO = new BuildConfigurationInputDTO();
buildConfigurationInputDTO.setProductGroupCode(superBomSkuInfo.getProductClassCode());
buildConfigurationInputDTO.setProductClassCode(superBomSkuInfo.getProductClassCode());
buildConfigurationInputDTO.setMaterialCode(((SuperBomSkuInfo) superBomInfo).getSuperBomCode());
buildConfigurationInputDTO.setOperator("system");
buildConfigurationInputDTO.setSelectedComplete(true);
//构建初始化接口 获取sessionId
SelectorEntity selectorEntity = new SelectorEntity();
selectorEntity.setIsShow(1);
selectorEntity.setOperator("system");
selectorEntity.setSystem("ZG");
selectorEntity.setProductClassCode(((SuperBomSkuInfo) superBomInfo).getProductClassCode());
selectorEntity.setSuperBomCode(((SuperBomSkuInfo) superBomInfo).getSuperBomCode());
Object initializationData = integrateController.initializationData(selectorEntity);
Map<String, Object> initMap = (Map<String, Object>) JSONObject.toJSON(initializationData);
Map<String, Object> dataMap = (Map<String, Object>) initMap.get("data");
String sessionId = (String) dataMap.get("sessionId");
buildConfigurationInputDTO.setSessionId(sessionId);
List<BuildConfigurationInputDTO.SelectedCharacteristicListBean> selectedCharacteristicListBeans = new ArrayList<>();
//传入的pnlist
superBomSkuInfo.getCharacteristicList().forEach(selectedCharacteristic -> {
BuildConfigurationInputDTO.SelectedCharacteristicListBean selectedCharacteristicListBean = new BuildConfigurationInputDTO.SelectedCharacteristicListBean();
//根据 list里面的vcode 查询v信息和c信息 赋值到 生成配置的对象里
selectedCharacteristicListBean.setCharacteristicName(selectedCharacteristic.getCharacteristicName());
selectedCharacteristicListBean.setCharacteristicValueName(selectedCharacteristic.getCharacteristicValueName());
selectedCharacteristicListBean.setQuantity(1);
selectedCharacteristicListBeans.add(selectedCharacteristicListBean);
});
buildConfigurationInputDTO.setSelectedCharacteristicList(selectedCharacteristicListBeans);
buildConfigurationInputDTO.setKeyValues(null);
Object buildConfiguration = integrateController.buildConfiguration(buildConfigurationInputDTO, null);
Map<String, Object> buildConfigurationMap = (Map<String, Object>) JSONObject.toJSON(buildConfiguration);
String configId = (String) buildConfigurationMap.get("configId");
superBomSkuInfo.setConfigId(configId);
//撞配之前调用前置验证
//构建前置验证数据结构
PostVerifyInputDTO postVerifyInputDTO = new PostVerifyInputDTO();
postVerifyInputDTO.setProductClassCode(((SuperBomSkuInfo) superBomInfo).getProductClassCode());
postVerifyInputDTO.setSuperBomCode(((SuperBomSkuInfo) superBomInfo).getSuperBomCode());
postVerifyInputDTO.setOperator("system");
postVerifyInputDTO.setSessionId(sessionId);
List<PostVerifyInputDTO.SelectedCharacteristicListBean> selectedCharacteristicLists = new ArrayList<>();
superBomSkuInfo.getCharacteristicList().forEach(selectedCharacteristic -> {
PostVerifyInputDTO.SelectedCharacteristicListBean selectedCharacteristicListBean = new PostVerifyInputDTO.SelectedCharacteristicListBean();
//根据 list里面的vcode 查询v信息和c信息 赋值到 生成配置的对象里
selectedCharacteristicListBean.setCharacteristicName(selectedCharacteristic.getCharacteristicName());
selectedCharacteristicListBean.setCharacteristicValueName(selectedCharacteristic.getCharacteristicValueName());
selectedCharacteristicListBean.setQuantity(1);
selectedCharacteristicLists.add(selectedCharacteristicListBean);
});
postVerifyInputDTO.setSelectedCharacteristicList(selectedCharacteristicLists);
Object preVerify = integrateController.preVerify(postVerifyInputDTO, null);
Map<String, Object> preVerifyMap = (Map<String, Object>) JSONObject.toJSON(preVerify);
if (preVerifyMap.get("result").equals(true)) {
//撞配 找PLM申请SKU
Object ob = GetSKUByConfigInfo(superBomSkuInfo, request, 2);
boolean flag1 = ob instanceof GetProductOutDto;
if (flag1) {
Object o1 = JSONObject.toJSON(ob);
Map<String, Object> map1 = (Map<String, Object>) o1;
Integer code = (Integer) map1.get("code");
if (code.equals(200)) {
JSONObject data = (JSONObject) map1.get("data");
cpnList.setSkuCode((String) data.get("skuCode"));
cpnList.setSkuName((String) data.get("skuName"));
cpnList.setCode(code);
} else {
cpnList.setMsg((String) map1.get("msg"));
cpnList.setCode(500);
}
Object data = map1.get("data");
if (!ObjectUtils.isEmpty(data)) {
Object data2 = JSONObject.toJSON(data);
Map<String, Object> map2 = (Map<String, Object>) data2;
if (!ObjectUtils.isEmpty(map2)) {
cpnList.setSkuCode((String) map2.get("skuCode"));
cpnList.setSkuName((String) map2.get("skuName"));
cpnList.setPatern("CTO");
cpnList.setCode(200);
}
} else {
cpnList.setMsg((String) map1.get("msg"));
cpnList.setCode(500);
}
}
}
} else {
cpnList.setCode(500);
cpnList.setMsg("配置结果违反约束冲突" + (String) preVerifyMap.get("message"));
}
} else {
cpnList.setCode(500);
cpnList.setMsg("配置结果违反约束冲突" + (String) preVerifyMap.get("message"));
}
} else {
if (!ObjectUtils.isEmpty(configurableBom)) {
if (!ObjectUtils.isEmpty(configurableBom.getConfigId())) {
//查询出superBom下所有isH3C的数据
List<Characteristic> characteristicH3CList = characteristicMapper.getCharacteristicH3CList(configurableBom.getSuperBomCode());
List<String> h3cCodeList = new ArrayList<>();
for (Characteristic characteristic : characteristicH3CList) {
if (characteristic.getIsH3C().equals(1)) {
h3cCodeList.add(characteristic.getCharacteristicName());
}
}
}
}else{
if (!ObjectUtils.isEmpty(configurableBom)) {
if (!ObjectUtils.isEmpty(configurableBom.getConfigId())) {
//查询出superBom下所有isH3C的数据
List<Characteristic> characteristicH3CList = characteristicMapper.getCharacteristicH3CList(configurableBom.getSuperBomCode());
List<String> h3cCodeList = new ArrayList<>();
for (Characteristic characteristic : characteristicH3CList) {
if (characteristic.getIsH3C().equals(1)) {
h3cCodeList.add(characteristic.getCharacteristicName());
//验证H3CVCODE 是否存在
for (String name : h3cCodeList) {
cpnList.setMsg("CPQ数据验证失败,失败原因:" + name + "特征不能为空!");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
break;
}
}
//验证H3CVCODE 是否存在
for (String name : h3cCodeList) {
cpnList.setMsg("CPQ数据验证失败,失败原因:" + name + "特征不能为空!");
} else {
//没有configid
cpnList.setMsg(configurableBom.getSuperBomCode() + "没有维护默认值");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
break;
continue;
}
} else {
//没有configid
cpnList.setMsg(configurableBom.getSuperBomCode() + "没有维护默认值");
//没有superbom
cpnList.setMsg("H3CPN没有维护对照关系");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
continue;
}
} else {
//没有superbom
cpnList.setMsg("H3CPN没有维护对照关系");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
continue;
}
}
}
}
characteristicMapper.saveApplyOpera(configSkuInfo.toString(), request.getHeader("UserCode"), "H3C-撞配");
} else {
List<GetSKUByH3CConfigInfo.H3CPNList> h3CPNList = configSkuInfo.getH3CPNList();
h3CPNList.forEach(item -> {
item.setCode(getProductOutDto.getCode());
item.setMsg(getProductOutDto.getMsg());
});
return configSkuInfo;
}
characteristicMapper.saveApplyOpera(configSkuInfo.toString(),request.getHeader("UserCode"),"H3C-撞配");
return configSkuInfo;
}
......@@ -1339,32 +1374,39 @@ public class IntegrateServiceImpl implements IntegrateService {
* @return java.lang.Object
**/
public Object getConfigInfo(GetConfigurationInputDTO getConfigurationInputDTO) {
if (CollectionUtils.isEmpty(getConfigurationInputDTO.getConfigIds())) {
if (!StringUtils.isEmpty(getConfigurationInputDTO.getSkuCode())) {
String configId = superBomSkuInfoMapper.getConfigId(getConfigurationInputDTO.getSkuCode());
List<String> configIds = new ArrayList<>();
configIds.add(configId);
getConfigurationInputDTO.setConfigIds(configIds);
} else {
return "请输入skuCode/ConfigId";
GetProductOutDto getProductOutDto = checkToken(getConfigurationInputDTO.getToken());
if (getProductOutDto.getCode().equals(200)) {
if (CollectionUtils.isEmpty(getConfigurationInputDTO.getConfigIds())) {
if (!StringUtils.isEmpty(getConfigurationInputDTO.getSkuCode())) {
String configId = superBomSkuInfoMapper.getConfigId(getConfigurationInputDTO.getSkuCode());
List<String> configIds = new ArrayList<>();
configIds.add(configId);
getConfigurationInputDTO.setConfigIds(configIds);
} else {
return "请输入skuCode/ConfigId";
}
}
}
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader();
getConfigurationInputDTO.setOperator("system");
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(getConfigurationInputDTO), headers);
ResponseEntity<String> responseEntity = restTemplate.exchange(selectorUrl+"/configurations", HttpMethod.POST, requestEntity, String.class);
JSONObject object = JSONObject.parseObject(responseEntity.getBody());
if (!ObjectUtils.isEmpty(object)) {
Object data = object.get("data");
if (!ObjectUtils.isEmpty(data)) {
List list = (List) data;
Map<String, Object> map = (Map<String, Object>) list.get(0);
getSuperBomInfoByConfigId(map);
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader();
getConfigurationInputDTO.setOperator("system");
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(getConfigurationInputDTO), headers);
ResponseEntity<String> responseEntity = restTemplate.exchange(selectorUrl+"/configurations", HttpMethod.POST, requestEntity, String.class);
JSONObject object = JSONObject.parseObject(responseEntity.getBody());
if (!ObjectUtils.isEmpty(object)) {
Object data = object.get("data");
if (!ObjectUtils.isEmpty(data)) {
List list = (List) data;
Map<String, Object> map = (Map<String, Object>) list.get(0);
getSuperBomInfoByConfigId(map);
}
}
return object.get("data");
} else {
return getProductOutDto;
}
return object.get("data");
}
@Override
......
......@@ -22,6 +22,7 @@ import org.apache.poi.openxml4j.util.ZipSecureFile;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
......@@ -53,6 +54,8 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
private SuperBomPriceCalculateMapper superBomPriceCalculateMapper;
@Resource
private BasicsPriceInfoMapper basicsPriceInfoMapper;
@Autowired
private IntegrateServiceImpl integrateService;
/**
......@@ -63,94 +66,99 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
*/
@Override
public Object getPriceByConfigInfo(SuperBomEntity superBomEntity) {
// 1、获取cto价格信息
SuperBomPriceInfoEntity superBomPriceInfoEntity = new SuperBomPriceInfoEntity();
GetProductOutDto result = new GetProductOutDto();
// 计算后的成本信息
String bomCodeTemp = superBomEntity.getSuperBomCode();
List<Characteristics> selectedCharacteristicList = superBomEntity.getCharacteristicList();
// 查询各级别价格系数以及定价方法是标准成本还是市场定价
BasicsPriceInfoEntity basicsPriceInfoEntity = basicsPriceInfoMapper.queryBasicsPriceInfo(superBomEntity);
if (ObjectUtils.isEmpty(basicsPriceInfoEntity)) {
superBomEntity.setSuperBomCode(null);
basicsPriceInfoEntity = basicsPriceInfoMapper.queryBasicsPriceInfo(superBomEntity);
GetProductOutDto getProductOutDto = integrateService.checkToken(superBomEntity.getToken());
if (getProductOutDto.getCode().equals(200)) {
// 1、获取cto价格信息
SuperBomPriceInfoEntity superBomPriceInfoEntity = new SuperBomPriceInfoEntity();
GetProductOutDto result = new GetProductOutDto();
// 计算后的成本信息
String bomCodeTemp = superBomEntity.getSuperBomCode();
List<Characteristics> selectedCharacteristicList = superBomEntity.getCharacteristicList();
// 查询各级别价格系数以及定价方法是标准成本还是市场定价
BasicsPriceInfoEntity basicsPriceInfoEntity = basicsPriceInfoMapper.queryBasicsPriceInfo(superBomEntity);
if (ObjectUtils.isEmpty(basicsPriceInfoEntity)) {
result.setMsg("请维护价格系数");
result.setCode(500);
return result;
superBomEntity.setSuperBomCode(null);
basicsPriceInfoEntity = basicsPriceInfoMapper.queryBasicsPriceInfo(superBomEntity);
if (ObjectUtils.isEmpty(basicsPriceInfoEntity)) {
result.setMsg("请维护价格系数");
result.setCode(500);
return result;
}
}
}
if (!ObjectUtils.isEmpty(basicsPriceInfoEntity)) {
// 成本定价法 使用标准成本价*各级别系数计算
if ("0".equals(basicsPriceInfoEntity.getPriceType())) {
BasicsPriceInfoEntity finalBasicsPriceInfoEntity = basicsPriceInfoEntity;
for (Characteristics characteristics : selectedCharacteristicList) {
superBomEntity.setSuperBomCode(bomCodeTemp);
SuperBomPriceInfoEntity characteristicBomPriceInfo = getSuperBomPriceInfoEntity(superBomEntity, superBomPriceInfoEntity, characteristics);
if (ObjectUtils.isEmpty(characteristicBomPriceInfo)) {
result.setMsg("请维护价格系数");
result.setCode(500);
return result;
}
if (!ObjectUtils.isEmpty(basicsPriceInfoEntity)) {
// 成本定价法 使用标准成本价*各级别系数计算
if ("0".equals(basicsPriceInfoEntity.getPriceType())) {
BasicsPriceInfoEntity finalBasicsPriceInfoEntity = basicsPriceInfoEntity;
for (Characteristics characteristics : selectedCharacteristicList) {
superBomEntity.setSuperBomCode(bomCodeTemp);
SuperBomPriceInfoEntity characteristicBomPriceInfo = getSuperBomPriceInfoEntity(superBomEntity, superBomPriceInfoEntity, characteristics);
if (ObjectUtils.isEmpty(characteristicBomPriceInfo)) {
result.setMsg("请维护价格系数");
result.setCode(500);
return result;
}
/*
一级价格调整价
*/
characteristics.setLeve1Price(characteristicBomPriceInfo.getLeve1Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getLeve0Price().multiply(finalBasicsPriceInfoEntity.getLeve1Ratio()) : characteristicBomPriceInfo.getLeve1Price());
superBomPriceInfoEntity.setLeve1Price(superBomPriceInfoEntity.getLeve1Price().add(characteristics.getLeve1Price()));
characteristics.setLeve1Price(characteristicBomPriceInfo.getLeve1Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getLeve0Price().multiply(finalBasicsPriceInfoEntity.getLeve1Ratio()) : characteristicBomPriceInfo.getLeve1Price());
superBomPriceInfoEntity.setLeve1Price(superBomPriceInfoEntity.getLeve1Price().add(characteristics.getLeve1Price()));
/*
二级价格调整价
*/
characteristics.setLeve2Price(characteristicBomPriceInfo.getLeve2Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getLeve0Price().multiply(finalBasicsPriceInfoEntity.getLeve2Ratio()) : characteristicBomPriceInfo.getLeve2Price());
superBomPriceInfoEntity.setLeve2Price(superBomPriceInfoEntity.getLeve2Price().add(characteristics.getLeve2Price()));
characteristics.setLeve2Price(characteristicBomPriceInfo.getLeve2Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getLeve0Price().multiply(finalBasicsPriceInfoEntity.getLeve2Ratio()) : characteristicBomPriceInfo.getLeve2Price());
superBomPriceInfoEntity.setLeve2Price(superBomPriceInfoEntity.getLeve2Price().add(characteristics.getLeve2Price()));
/*
三级价格调整价
*/
characteristics.setLeve3Price(characteristicBomPriceInfo.getLeve3Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getLeve0Price().multiply(finalBasicsPriceInfoEntity.getLeve3Ratio()) : characteristicBomPriceInfo.getLeve3Price());
superBomPriceInfoEntity.setLeve3Price(superBomPriceInfoEntity.getLeve3Price().add(characteristics.getLeve3Price()));
characteristics.setLeve3Price(characteristicBomPriceInfo.getLeve3Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getLeve0Price().multiply(finalBasicsPriceInfoEntity.getLeve3Ratio()) : characteristicBomPriceInfo.getLeve3Price());
superBomPriceInfoEntity.setLeve3Price(superBomPriceInfoEntity.getLeve3Price().add(characteristics.getLeve3Price()));
/*
四级价格调整价
*/
characteristics.setLeve4Price(characteristicBomPriceInfo.getLeve4Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getLeve0Price().multiply(finalBasicsPriceInfoEntity.getLeve4Ratio()) : characteristicBomPriceInfo.getLeve4Price());
superBomPriceInfoEntity.setLeve4Price(superBomPriceInfoEntity.getLeve4Price().add(characteristics.getLeve4Price()));
}
} else {
// 市场定价法 使用代理价*各级别系数计算
BasicsPriceInfoEntity finalBasicsPriceInfoEntity1 = basicsPriceInfoEntity;
for (Characteristics characteristics : selectedCharacteristicList) {
superBomEntity.setSuperBomCode(bomCodeTemp);
// 3、查询特征值价格信息
SuperBomPriceInfoEntity characteristicBomPriceInfo = getSuperBomPriceInfoEntity(superBomEntity, superBomPriceInfoEntity, characteristics);
if (ObjectUtils.isEmpty(characteristicBomPriceInfo)) {
result.setMsg("请维护价格系数");
result.setCode(500);
return result;
characteristics.setLeve4Price(characteristicBomPriceInfo.getLeve4Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getLeve0Price().multiply(finalBasicsPriceInfoEntity.getLeve4Ratio()) : characteristicBomPriceInfo.getLeve4Price());
superBomPriceInfoEntity.setLeve4Price(superBomPriceInfoEntity.getLeve4Price().add(characteristics.getLeve4Price()));
}
} else {
// 市场定价法 使用代理价*各级别系数计算
BasicsPriceInfoEntity finalBasicsPriceInfoEntity1 = basicsPriceInfoEntity;
for (Characteristics characteristics : selectedCharacteristicList) {
superBomEntity.setSuperBomCode(bomCodeTemp);
// 3、查询特征值价格信息
SuperBomPriceInfoEntity characteristicBomPriceInfo = getSuperBomPriceInfoEntity(superBomEntity, superBomPriceInfoEntity, characteristics);
if (ObjectUtils.isEmpty(characteristicBomPriceInfo)) {
result.setMsg("请维护价格系数");
result.setCode(500);
return result;
}
/*
一级价格调整价
*/
characteristics.setLeve1Price(characteristicBomPriceInfo.getLeve1Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getAgentPrice().multiply(finalBasicsPriceInfoEntity1.getLeve1Ratio()) : characteristicBomPriceInfo.getLeve1Price());
superBomPriceInfoEntity.setLeve1Price(superBomPriceInfoEntity.getLeve1Price().add(characteristics.getLeve1Price()));
characteristics.setLeve1Price(characteristicBomPriceInfo.getLeve1Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getAgentPrice().multiply(finalBasicsPriceInfoEntity1.getLeve1Ratio()) : characteristicBomPriceInfo.getLeve1Price());
superBomPriceInfoEntity.setLeve1Price(superBomPriceInfoEntity.getLeve1Price().add(characteristics.getLeve1Price()));
/*
二级价格调整价
*/
characteristics.setLeve2Price(characteristicBomPriceInfo.getLeve2Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getAgentPrice().multiply(finalBasicsPriceInfoEntity1.getLeve2Ratio()) : characteristicBomPriceInfo.getLeve2Price());
superBomPriceInfoEntity.setLeve2Price(superBomPriceInfoEntity.getLeve2Price().add(characteristics.getLeve2Price()));
characteristics.setLeve2Price(characteristicBomPriceInfo.getLeve2Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getAgentPrice().multiply(finalBasicsPriceInfoEntity1.getLeve2Ratio()) : characteristicBomPriceInfo.getLeve2Price());
superBomPriceInfoEntity.setLeve2Price(superBomPriceInfoEntity.getLeve2Price().add(characteristics.getLeve2Price()));
/*
三级价格调整价
*/
characteristics.setLeve3Price(characteristicBomPriceInfo.getLeve3Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getAgentPrice().multiply(finalBasicsPriceInfoEntity1.getLeve3Ratio()) : characteristicBomPriceInfo.getLeve3Price());
superBomPriceInfoEntity.setLeve3Price(superBomPriceInfoEntity.getLeve3Price().add(characteristics.getLeve3Price()));
characteristics.setLeve3Price(characteristicBomPriceInfo.getLeve3Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getAgentPrice().multiply(finalBasicsPriceInfoEntity1.getLeve3Ratio()) : characteristicBomPriceInfo.getLeve3Price());
superBomPriceInfoEntity.setLeve3Price(superBomPriceInfoEntity.getLeve3Price().add(characteristics.getLeve3Price()));
/*
四级价格调整价
*/
characteristics.setLeve4Price(characteristicBomPriceInfo.getLeve4Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getAgentPrice().multiply(finalBasicsPriceInfoEntity1.getLeve4Ratio()) : characteristicBomPriceInfo.getLeve4Price());
superBomPriceInfoEntity.setLeve4Price(superBomPriceInfoEntity.getLeve4Price().add(characteristics.getLeve4Price()));
characteristics.setLeve4Price(characteristicBomPriceInfo.getLeve4Price().equals(BigDecimal.ZERO) ? characteristicBomPriceInfo.getAgentPrice().multiply(finalBasicsPriceInfoEntity1.getLeve4Ratio()) : characteristicBomPriceInfo.getLeve4Price());
superBomPriceInfoEntity.setLeve4Price(superBomPriceInfoEntity.getLeve4Price().add(characteristics.getLeve4Price()));
}
}
}
}
superBomPriceInfoEntity.setSelectedCharacteristicList(selectedCharacteristicList);
return superBomPriceInfoEntity;
superBomPriceInfoEntity.setSelectedCharacteristicList(selectedCharacteristicList);
return superBomPriceInfoEntity;
} else {
return getProductOutDto;
}
}
/**
......
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