Commit d6f5202f by zhaoxiaolei

修改撞配

parent 9580042c
...@@ -79,7 +79,7 @@ public interface CharacteristicMapper extends IBaseMapper<Characteristic>, Inser ...@@ -79,7 +79,7 @@ public interface CharacteristicMapper extends IBaseMapper<Characteristic>, Inser
Characteristic getCharacteristicInfoByName(String cName,String superBomCode); Characteristic getCharacteristicInfoByName(String cName,String superBomCode);
SuperBomSkuConfigInfo checkConfig(String characteristicCode, String characteristicValueName,String superBomCode,String patern,String politicalMiningId,String configId, String characteristicValueCode); SuperBomSkuConfigInfo checkConfig(String characteristicCode, String characteristicValueName,String superBomCode,String patern,String politicalMiningId, String characteristicValueCode);
void updateSuperBomSkuInfo(ApplySkuCodeResultDto.data applySkuCodeResultDto); void updateSuperBomSkuInfo(ApplySkuCodeResultDto.data applySkuCodeResultDto);
......
...@@ -5,6 +5,7 @@ import cn.com.uitech.authorization.pojo.entity.SuperBomSkuConfigInfo; ...@@ -5,6 +5,7 @@ import cn.com.uitech.authorization.pojo.entity.SuperBomSkuConfigInfo;
import cn.com.uitech.authorization.pojo.entity.SuperBomSkuInfo; import cn.com.uitech.authorization.pojo.entity.SuperBomSkuInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Mapper @Mapper
...@@ -22,7 +23,12 @@ public interface SuperBomSkuInfoMapper extends IBaseMapper<SuperBomSkuInfo> { ...@@ -22,7 +23,12 @@ public interface SuperBomSkuInfoMapper extends IBaseMapper<SuperBomSkuInfo> {
SuperBomSkuInfo querySkuOne(String configId); SuperBomSkuInfo querySkuOne(String configId);
SuperBomSkuInfo getSkuInfo(SuperBomSkuInfo returnSkuInfo); List<SuperBomSkuInfo> getSkuInfo(SuperBomSkuInfo returnSkuInfo);
String getConfigId(String skuCode); String getConfigId(String skuCode);
SuperBomSkuInfo getSkuInfoByConfigId(String configId);
ArrayList<SuperBomSkuConfigInfo> getConfigInfos(String configId);
} }
...@@ -31,6 +31,7 @@ public class ApplySkuCodeResultDto implements Serializable { ...@@ -31,6 +31,7 @@ public class ApplySkuCodeResultDto implements Serializable {
private String description; private String description;
private String configId; private String configId;
private String msg; private String msg;
private String user;
} }
private String msg; private String msg;
private Integer code; private Integer code;
......
...@@ -51,7 +51,8 @@ public class CtoBomRequestParamDto extends BasePageDto implements Serializable{ ...@@ -51,7 +51,8 @@ public class CtoBomRequestParamDto extends BasePageDto implements Serializable{
private String type; private String type;
@ApiModelProperty(name = "productClassCode",value = "产品组",dataType ="String") @ApiModelProperty(name = "productClassCode",value = "产品组",dataType ="String")
private String productClassCode; private String productClassCode;
@ApiModelProperty(name = "brand",value = "品牌",dataType ="String")
private String brand;
private List<String> superBomCodes; private List<String> superBomCodes;
......
...@@ -10,6 +10,7 @@ import lombok.experimental.Accessors; ...@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Table; import javax.persistence.Table;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Accessors(chain = true) @Accessors(chain = true)
...@@ -159,6 +160,6 @@ public class SuperBomSkuInfo extends BasePageDto implements Serializable { ...@@ -159,6 +160,6 @@ public class SuperBomSkuInfo extends BasePageDto implements Serializable {
@Column(name = "id") @Column(name = "id")
private String id; private String id;
private List<SuperBomSkuConfigInfo> characteristicList; private ArrayList<SuperBomSkuConfigInfo> characteristicList;
} }
\ No newline at end of file
...@@ -35,6 +35,8 @@ import javax.annotation.Resource; ...@@ -35,6 +35,8 @@ import javax.annotation.Resource;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.*; import java.util.*;
import static java.util.stream.Collectors.toList;
@Service @Service
@Transactional @Transactional
...@@ -350,21 +352,42 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -350,21 +352,42 @@ public class IntegrateServiceImpl implements IntegrateService {
public Object GetSKUByConfigInfo(SuperBomSkuInfo superBomSkuInfo) { public Object GetSKUByConfigInfo(SuperBomSkuInfo superBomSkuInfo) {
GetProductOutDto result = new GetProductOutDto(); GetProductOutDto result = new GetProductOutDto();
if (!ObjectUtils.isEmpty(superBomSkuInfo)) { if (!ObjectUtils.isEmpty(superBomSkuInfo)) {
if (!CollectionUtils.isEmpty(superBomSkuInfo.getCharacteristicList())) { //根据 政采 模式 品牌 superbom 查询sku主信息
List<SuperBomSkuConfigInfo> characteristicList = superBomSkuInfo.getCharacteristicList(); List<SuperBomSkuInfo> skuInfos = superBomSkuInfoMapper.getSkuInfo(superBomSkuInfo);
Boolean flag = true; Boolean flag = false;
for (SuperBomSkuConfigInfo superBomSkuConfigInfo : characteristicList) { if (!CollectionUtils.isEmpty(skuInfos)) {
SuperBomSkuConfigInfo skuConfigInfo = characteristicMapper.checkConfig(superBomSkuConfigInfo.getCharacteristicCode(), superBomSkuConfigInfo.getCharacteristicValueName(), superBomSkuInfo.getSuperBomCode(), superBomSkuInfo.getPatern(), superBomSkuInfo.getPoliticalMiningId(), superBomSkuInfo.getConfigId(), superBomSkuConfigInfo.getCharacteristicValueCode()); for (SuperBomSkuInfo skuInfo : skuInfos) {
if (ObjectUtils.isEmpty(skuConfigInfo)) { //对比查出来的skuConfig信息是否完全一样
//撞配不通过 保存SKU信息 调用申请SKU接口 applySkuCode ArrayList<SuperBomSkuConfigInfo> items = superBomSkuInfoMapper.getConfigInfos(skuInfo.getConfigId());
SuperBomSkuConfigInfo config = new SuperBomSkuConfigInfo(); ArrayList<SuperBomSkuConfigInfo> params = new ArrayList<>(superBomSkuInfo.getCharacteristicList());
BeanUtils.copyProperties(superBomSkuConfigInfo, config); boolean equals = params.toString().equals(items.toString());
config.setId(sequence.nextId()); //装配成功 返回 sku信息
superBomSkuInfoMapper.saveSkuConfig(config); if (equals) {
flag = false; SuperBomSkuInfo getSkuByConfigId = superBomSkuInfoMapper.getSkuInfoByConfigId(skuInfo.getConfigId());
superBomSkuInfo.setSkuCode(getSkuByConfigId.getSkuCode());
superBomSkuInfo.setSkuName(getSkuByConfigId.getSkuName());
result.setMsg("配置已存在,请勿重复申请");
result.setCode(500);
result.setData(superBomSkuInfo);
return result;
} else {
flag = true;
} }
} }
if (flag.equals(false)) { }
//撞配不通过 保存SKU信息&config信息 调用申请SKU接口 applySkuCode
if (flag.equals(true)) {
superBomSkuInfo.setId(sequence.nextId());
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数据返回 //调用PLM申请sku号 返回后修改sku数据返回
ApplySkuCodeResultDto applySkuCodeResultDto = applySkuCode(superBomSkuInfo); ApplySkuCodeResultDto applySkuCodeResultDto = applySkuCode(superBomSkuInfo);
if (applySkuCodeResultDto.getCode().equals(200)) { if (applySkuCodeResultDto.getCode().equals(200)) {
...@@ -372,22 +395,34 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -372,22 +395,34 @@ public class IntegrateServiceImpl implements IntegrateService {
ApplySkuCodeResultDto.data data = applySkuCodeResultDto.getData(); ApplySkuCodeResultDto.data data = applySkuCodeResultDto.getData();
data.setConfigId(superBomSkuInfo.getConfigId()); data.setConfigId(superBomSkuInfo.getConfigId());
data.setMsg("已回号"); data.setMsg("已回号");
data.setUser(SecurityService.getPrincipal().getCode());
characteristicMapper.updateSuperBomSkuInfo(data); characteristicMapper.updateSuperBomSkuInfo(data);
superBomSkuInfo.setSkuCode(data.getSkuCode()); superBomSkuInfo.setSkuCode(data.getSkuCode());
superBomSkuInfo.setSkuName(data.getSkuName()); superBomSkuInfo.setSkuName(data.getSkuName());
result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
result.setData(superBomSkuInfo);
return result;
} else { } else {
superBomSkuInfo.setDescription("调用PLM申请回号失败"); result.setCode(applySkuCodeResultDto.getCode());
characteristicMapper.updateSuperBomSku(superBomSkuInfo); result.setMsg("调用PLM申请回号失败");
result.setData(applySkuCodeResultDto);
return result;
} }
} else { } else {
result.setMsg(applySkuCodeResultDto.getMsg()); result.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode()); result.setCode(applySkuCodeResultDto.getCode());
return result; return result;
} }
} } else {
result.setMsg("配置已存在,请勿重复申请");
result.setCode(500);
result.setData(superBomSkuInfo);
return result;
} }
} }
return superBomSkuInfo; return result;
} }
@Override @Override
...@@ -397,18 +432,22 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -397,18 +432,22 @@ public class IntegrateServiceImpl implements IntegrateService {
GetProductOutDto result = new GetProductOutDto(); GetProductOutDto result = new GetProductOutDto();
Object ob = GetSKUByConfigInfo(superBomSkuInfo); Object ob = GetSKUByConfigInfo(superBomSkuInfo);
boolean flag = ob instanceof SuperBomSkuInfo; boolean flag = ob instanceof GetProductOutDto;
if(flag){ if(flag){
returnSkuInfo = (SuperBomSkuInfo)ob; Map<String, Object> map = (Map<String, Object>) ob;
SuperBomSkuInfo getSkuInfo = superBomSkuInfoMapper.getSkuInfo(returnSkuInfo); Integer code = (Integer) map.get("code");
if(ObjectUtils.isEmpty(getSkuInfo)){ if (code.equals(200)) {
result.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode()); SuperBomSkuInfo data = (SuperBomSkuInfo) map.get("data");
result.setMsg("该配置不存在"); List<SuperBomSkuInfo> getSkuInfo = superBomSkuInfoMapper.getSkuInfo(data);
return result; if(ObjectUtils.isEmpty(getSkuInfo)){
result.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
result.setMsg("该配置不存在");
return result;
}
} }
superBomSkuInfo.setSkuCode(getSkuInfo.getSkuCode()); //superBomSkuInfo.setSkuCode(getSkuInfo.getSkuCode());
superBomSkuInfo.setSkuName(getSkuInfo.getSkuName()); //superBomSkuInfo.setSkuName(getSkuInfo.getSkuName());
return superBomSkuInfo; return ob;
}else{ }else{
GetProductOutDto ss = (GetProductOutDto)ob; GetProductOutDto ss = (GetProductOutDto)ob;
result.setCode(ss.getCode()); result.setCode(ss.getCode());
...@@ -524,7 +563,7 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -524,7 +563,7 @@ public class IntegrateServiceImpl implements IntegrateService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
dto.setMsg(e.getMessage()); dto.setMsg("调用PLM申请回号报错:" + e.getMessage());
dto.setCode(500); dto.setCode(500);
return dto; return dto;
} }
...@@ -549,7 +588,6 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -549,7 +588,6 @@ public class IntegrateServiceImpl implements IntegrateService {
configurableBom = characteristicMapper.getSuperBomInfo(Long.valueOf(config)); configurableBom = characteristicMapper.getSuperBomInfo(Long.valueOf(config));
} }
//根据特征值名称获取物料的信息 //根据特征值名称获取物料的信息
Map<String, Object> supBomInfoMap = new HashMap<>();
ConfigurableBomDto dto = new ConfigurableBomDto(); ConfigurableBomDto dto = new ConfigurableBomDto();
dto.setSuperBomCode(configurableBom.getSuperBomCode()); dto.setSuperBomCode(configurableBom.getSuperBomCode());
dto.setSuperBomName(configurableBom.getSuperBomName()); dto.setSuperBomName(configurableBom.getSuperBomName());
...@@ -663,10 +701,10 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -663,10 +701,10 @@ public class IntegrateServiceImpl implements IntegrateService {
} }
//没有下架 撞配 封装 撞配信息 //没有下架 撞配 封装 撞配信息
SuperBomSkuInfo superBomSkuInfo = new SuperBomSkuInfo(); SuperBomSkuInfo superBomSkuInfo = new SuperBomSkuInfo();
List<SuperBomSkuConfigInfo> configs = new ArrayList<>(); ArrayList<SuperBomSkuConfigInfo> configs = new ArrayList<>();
superBomSkuInfo.setSuperBomCode(cpnList.getH3cPn()); superBomSkuInfo.setSuperBomCode(cpnList.getH3cPn());
superBomSkuInfo.setConfigId(cpnList.getConfigId()); superBomSkuInfo.setConfigId(cpnList.getConfigId());
superBomSkuInfo = superBomSkuInfoMapper.getSkuInfo(superBomSkuInfo); superBomSkuInfo = (SuperBomSkuInfo) superBomSkuInfoMapper.getSkuInfo(superBomSkuInfo);
for (GetSKUByH3CConfigInfo.KeyValues keyValues : selectedCharacteristicList) { for (GetSKUByH3CConfigInfo.KeyValues keyValues : selectedCharacteristicList) {
SuperBomSkuConfigInfo superBomSkuConfigInfo = superBomSkuInfoMapper.getConfigInfoList(cpnList.getConfigId(), keyValues.getH3cVCode()); SuperBomSkuConfigInfo superBomSkuConfigInfo = superBomSkuInfoMapper.getConfigInfoList(cpnList.getConfigId(), keyValues.getH3cVCode());
configs.add(superBomSkuConfigInfo); configs.add(superBomSkuConfigInfo);
...@@ -683,10 +721,13 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -683,10 +721,13 @@ public class IntegrateServiceImpl implements IntegrateService {
cpnList.setMsg(skuInfo.getMsg()); cpnList.setMsg(skuInfo.getMsg());
cpnList.setSkuCode(data.getSkuCode()); cpnList.setSkuCode(data.getSkuCode());
cpnList.setSkuName(data.getSkuName()); cpnList.setSkuName(data.getSkuName());
data.setUser(SecurityService.getPrincipal().getCode());
characteristicMapper.updateSuperBomSkuInfo(data); characteristicMapper.updateSuperBomSkuInfo(data);
} else { } else {
superBomSkuInfo.setDescription("调用PLM申请回号失败"); result.setCode(skuInfo.getCode());
characteristicMapper.updateSuperBomSku(superBomSkuInfo); result.setMsg("调用PLM申请回号失败");
result.setData(skuInfo);
return result;
} }
} else { } else {
result.setMsg(skuInfo.getMsg()); result.setMsg(skuInfo.getMsg());
...@@ -732,43 +773,21 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -732,43 +773,21 @@ public class IntegrateServiceImpl implements IntegrateService {
@Override @Override
public Object saveSukInfo(SuperBomSkuInfo superBomSkuInfo) { public Object saveSukInfo(SuperBomSkuInfo superBomSkuInfo) {
GetProductOutDto result = new GetProductOutDto(); GetProductOutDto result = new GetProductOutDto();
try { Object ob = GetSKUByConfigInfo(superBomSkuInfo);
List<SuperBomSkuConfigInfo> characteristicList = superBomSkuInfo.getCharacteristicList(); boolean flag = ob instanceof GetProductOutDto;
for (SuperBomSkuConfigInfo superBomSkuConfigInfo : characteristicList) { if(flag) {
SuperBomSkuConfigInfo skuConfigInfo = characteristicMapper.checkConfig(superBomSkuConfigInfo.getCharacteristicCode(), superBomSkuConfigInfo.getCharacteristicValueName(), superBomSkuInfo.getSuperBomCode(), superBomSkuInfo.getPatern(), superBomSkuInfo.getPoliticalMiningId(), superBomSkuInfo.getConfigId(), superBomSkuConfigInfo.getCharacteristicValueCode()); Object o = JSONObject.toJSON(ob);
if (ObjectUtils.isEmpty(skuConfigInfo)) { Map<String, Object> map = (Map<String, Object>) o;
//撞配不通过 保存SKU信息 调用申请SKU接口 applySkuCode Integer code = (Integer) map.get("code");
SuperBomSkuConfigInfo config = new SuperBomSkuConfigInfo(); if (code.equals(200)) {
BeanUtils.copyProperties(superBomSkuConfigInfo, config); SuperBomSkuInfo data = (SuperBomSkuInfo) map.get("data");
config.setId(sequence.nextId()); result.setCode(200);
config.setConfigId(superBomSkuInfo.getConfigId()); result.setData(data);
superBomSkuInfoMapper.saveSkuConfig(config); }else{
} result.setCode(code);
} result.setMsg((String) map.get("msg"));
superBomSkuInfo.setId(sequence.nextId()); result.setData(map.get("data"));
superBomSkuInfoMapper.saveSkuInfo(superBomSkuInfo);
//保存完成后申请SKU 调用PLM申请SKU编号
ApplySkuCodeResultDto applySkuCodeResultDto = applySkuCode(superBomSkuInfo);
//根据 ConfigId 修改 产品小型号 产品型号 SkuCode 69码
if (applySkuCodeResultDto.getCode().equals(200)) {
ApplySkuCodeResultDto.data data = applySkuCodeResultDto.getData();
data.setConfigId(superBomSkuInfo.getConfigId());
data.setMsg("已回号");
characteristicMapper.updateSuperBomSkuInfo(data);
result.setCode(applySkuCodeResultDto.getCode());
result.setMsg(applySkuCodeResultDto.getMsg());
} else {
result.setCode(applySkuCodeResultDto.getCode());
result.setMsg("调用PLM申请回号失败");
result.setData(applySkuCodeResultDto);
return result;
} }
} catch (Exception e) {
result.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
result.setMsg(ApiResult.INTERNAL_SERVER_ERROR.getMsg());
result.setData(e.getMessage());
return result;
} }
return result; return result;
} }
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
select * from super_bom_info a select * from super_bom_info a
left join configuration_basis b on a.super_bom_code = b.material_code left join configuration_basis b on a.super_bom_code = b.material_code
LEFT JOIN super_bom_sku_info c ON A.super_bom_code = c.super_bom_code and cast(b.config_id as varchar) = c.config_id LEFT JOIN super_bom_sku_info c ON A.super_bom_code = c.super_bom_code and cast(b.config_id as varchar) = c.config_id
left join a_productclasscode d on a.product_class_code = d.product_class_code where b.config_id = #{configId} left join a_productclasscode d on a.product_class_code = d.product_class_code where b.config_id = #{configId} limit 1
</select> </select>
<select id="getCharacteristicInfoByName" resultType="cn.com.uitech.authorization.pojo.entity.Characteristic"> <select id="getCharacteristicInfoByName" resultType="cn.com.uitech.authorization.pojo.entity.Characteristic">
...@@ -167,9 +167,6 @@ ...@@ -167,9 +167,6 @@
<if test="politicalMiningId != null and politicalMiningId!=''"> <if test="politicalMiningId != null and politicalMiningId!=''">
and b.political_mining_id = #{politicalMiningId} and b.political_mining_id = #{politicalMiningId}
</if> </if>
<if test="configId != null and configId!=''">
and b.config_id = #{configId}
</if>
</where> </where>
...@@ -183,7 +180,9 @@ ...@@ -183,7 +180,9 @@
sncode = #{snCode}, sncode = #{snCode},
description = #{description}, description = #{description},
product_type =#{productType}, product_type =#{productType},
product_small_type =#{productSmallType} product_small_type =#{productSmallType},
apply_user = #{user},
apply_time = now()
where config_id = #{configId} where config_id = #{configId}
</update> </update>
......
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
<select id="getCharacteristicValueInfoByCode" <select id="getCharacteristicValueInfoByCode"
resultType="cn.com.uitech.authorization.pojo.entity.CharacteristicValue"> resultType="cn.com.uitech.authorization.pojo.entity.CharacteristicValue">
select * from super_characteristic_value_info select * from super_characteristic_value_info
where characteristic_value_name = #{h3cVCode} where h3c_c_value = #{h3cVCode}
and super_bom_code = #{h3cPn} and super_bom_code = #{h3cPn}
<!--and political_mining_id = #{param3} <!--and political_mining_id = #{param3}
and patern = #{param4}--> and patern = #{param4}-->
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
<if test="superBomCode!=null and superBomCode!=''"> <if test="superBomCode!=null and superBomCode!=''">
super_bom_code like CONCAT('%','${superBomCode}','%') super_bom_code like CONCAT('%','${superBomCode}','%')
</if> </if>
<if test="brand!=null and brand!=''">
and brand = #{brand}
</if>
<if test="superBomName!=null and superBomName!=''"> <if test="superBomName!=null and superBomName!=''">
and super_bom_name like CONCAT('%','${superBomName}','%') and super_bom_name like CONCAT('%','${superBomName}','%')
</if> </if>
...@@ -109,6 +112,9 @@ ...@@ -109,6 +112,9 @@
<if test="superBomCode!=null and superBomCode!=''"> <if test="superBomCode!=null and superBomCode!=''">
and CONCAT(super_bom_code,super_bom_name) like CONCAT('%','${superBomCode}','%') and CONCAT(super_bom_code,super_bom_name) like CONCAT('%','${superBomCode}','%')
</if> </if>
<if test="brand!=null and brand!=''">
and brand=#{brand}
</if>
</where> </where>
</select> </select>
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<result property="skuCode" column="sku_code"/> <result property="skuCode" column="sku_code"/>
<result property="skuName" column="sku_name"/> <result property="skuName" column="sku_name"/>
<collection property="characteristicList" ofType="cn.com.uitech.authorization.pojo.entity.SuperBomSkuConfigInfo"> <collection property="characteristicList" ofType="cn.com.uitech.authorization.pojo.entity.SuperBomSkuConfigInfo">
<id property="id" column="id"/> <!--<id property="id" column="id"/>-->
<result property="configId" column="config_id"/> <result property="configId" column="config_id"/>
<result property="skuCode" column="sku_code"/> <result property="skuCode" column="sku_code"/>
<result property="characteristicCode" column="characteristic_code"/> <result property="characteristicCode" column="characteristic_code"/>
...@@ -158,11 +158,33 @@ ...@@ -158,11 +158,33 @@
where a.config_id = #{configId} where a.config_id = #{configId}
</select> </select>
<select id="getSkuInfo" resultMap="SuperBomSkuMap"> <select id="getSkuInfo" resultType="cn.com.uitech.authorization.pojo.entity.SuperBomSkuInfo">
select *from super_bom_sku_info where super_bom_code = #{superBomCode} and config_id = #{configId} select *from super_bom_sku_info
where
super_bom_code = #{superBomCode}
and patern = #{patern}
and brand = #{brand}
and political_Mining_Id = #{politicalMiningId}
</select> </select>
<select id="getConfigId" resultType="java.lang.String"> <select id="getConfigId" resultType="java.lang.String">
select config_id from super_bom_sku_info where sku_code = #{skuCode} select config_id from super_bom_sku_info where sku_code = #{skuCode}
</select> </select>
<select id="getSkuInfoByConfigId" resultMap="SuperBomSkuMap">
select * from super_bom_sku_info where config_id = #{configId}
</select>
<select id="getConfigInfos" resultType="cn.com.uitech.authorization.pojo.entity.SuperBomSkuConfigInfo">
select
characteristic_Code,
characteristic_Name,
unis_Sales_C_Name,
h3c_C_Code,
characteristic_Value_Code,
characteristic_Value_Name,
unis_Sales_V_Name,
h3c_v_Value
from super_bom_sku_config_info where config_id = #{configId}
</select>
</mapper> </mapper>
\ 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