Commit d6f5202f by zhaoxiaolei

修改撞配

parent 9580042c
......@@ -79,7 +79,7 @@ public interface CharacteristicMapper extends IBaseMapper<Characteristic>, Inser
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);
......
......@@ -5,6 +5,7 @@ import cn.com.uitech.authorization.pojo.entity.SuperBomSkuConfigInfo;
import cn.com.uitech.authorization.pojo.entity.SuperBomSkuInfo;
import org.apache.ibatis.annotations.Mapper;
import java.util.ArrayList;
import java.util.List;
@Mapper
......@@ -22,7 +23,12 @@ public interface SuperBomSkuInfoMapper extends IBaseMapper<SuperBomSkuInfo> {
SuperBomSkuInfo querySkuOne(String configId);
SuperBomSkuInfo getSkuInfo(SuperBomSkuInfo returnSkuInfo);
List<SuperBomSkuInfo> getSkuInfo(SuperBomSkuInfo returnSkuInfo);
String getConfigId(String skuCode);
SuperBomSkuInfo getSkuInfoByConfigId(String configId);
ArrayList<SuperBomSkuConfigInfo> getConfigInfos(String configId);
}
......@@ -31,6 +31,7 @@ public class ApplySkuCodeResultDto implements Serializable {
private String description;
private String configId;
private String msg;
private String user;
}
private String msg;
private Integer code;
......
......@@ -51,7 +51,8 @@ public class CtoBomRequestParamDto extends BasePageDto implements Serializable{
private String type;
@ApiModelProperty(name = "productClassCode",value = "产品组",dataType ="String")
private String productClassCode;
@ApiModelProperty(name = "brand",value = "品牌",dataType ="String")
private String brand;
private List<String> superBomCodes;
......
......@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Accessors(chain = true)
......@@ -159,6 +160,6 @@ public class SuperBomSkuInfo extends BasePageDto implements Serializable {
@Column(name = "id")
private String id;
private List<SuperBomSkuConfigInfo> characteristicList;
private ArrayList<SuperBomSkuConfigInfo> characteristicList;
}
\ No newline at end of file
......@@ -139,7 +139,7 @@
select * from super_bom_info a
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 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 id="getCharacteristicInfoByName" resultType="cn.com.uitech.authorization.pojo.entity.Characteristic">
......@@ -167,9 +167,6 @@
<if test="politicalMiningId != null and politicalMiningId!=''">
and b.political_mining_id = #{politicalMiningId}
</if>
<if test="configId != null and configId!=''">
and b.config_id = #{configId}
</if>
</where>
......@@ -183,7 +180,9 @@
sncode = #{snCode},
description = #{description},
product_type =#{productType},
product_small_type =#{productSmallType}
product_small_type =#{productSmallType},
apply_user = #{user},
apply_time = now()
where config_id = #{configId}
</update>
......
......@@ -310,7 +310,7 @@
<select id="getCharacteristicValueInfoByCode"
resultType="cn.com.uitech.authorization.pojo.entity.CharacteristicValue">
select * from super_characteristic_value_info
where characteristic_value_name = #{h3cVCode}
where h3c_c_value = #{h3cVCode}
and super_bom_code = #{h3cPn}
<!--and political_mining_id = #{param3}
and patern = #{param4}-->
......
......@@ -13,6 +13,9 @@
<if test="superBomCode!=null and superBomCode!=''">
super_bom_code like CONCAT('%','${superBomCode}','%')
</if>
<if test="brand!=null and brand!=''">
and brand = #{brand}
</if>
<if test="superBomName!=null and superBomName!=''">
and super_bom_name like CONCAT('%','${superBomName}','%')
</if>
......@@ -109,6 +112,9 @@
<if test="superBomCode!=null and superBomCode!=''">
and CONCAT(super_bom_code,super_bom_name) like CONCAT('%','${superBomCode}','%')
</if>
<if test="brand!=null and brand!=''">
and brand=#{brand}
</if>
</where>
</select>
......
......@@ -140,7 +140,7 @@
<result property="skuCode" column="sku_code"/>
<result property="skuName" column="sku_name"/>
<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="skuCode" column="sku_code"/>
<result property="characteristicCode" column="characteristic_code"/>
......@@ -158,11 +158,33 @@
where a.config_id = #{configId}
</select>
<select id="getSkuInfo" resultMap="SuperBomSkuMap">
select *from super_bom_sku_info where super_bom_code = #{superBomCode} and config_id = #{configId}
<select id="getSkuInfo" resultType="cn.com.uitech.authorization.pojo.entity.SuperBomSkuInfo">
select *from super_bom_sku_info
where
super_bom_code = #{superBomCode}
and patern = #{patern}
and brand = #{brand}
and political_Mining_Id = #{politicalMiningId}
</select>
<select id="getConfigId" resultType="java.lang.String">
select config_id from super_bom_sku_info where sku_code = #{skuCode}
</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>
\ 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