Commit 8405366c by zhaoxiaolei

修改初始化选配器 销售名称问题

parent 309244d6
...@@ -161,10 +161,11 @@ public class IntegrateController { ...@@ -161,10 +161,11 @@ public class IntegrateController {
List<Map<String,Object>> resultCharacteristicList = (List<Map<String, Object>>) map.get("characteristicList"); List<Map<String,Object>> resultCharacteristicList = (List<Map<String, Object>>) map.get("characteristicList");
// 根据英文名称查询中文名称 // 根据英文名称查询中文名称
resultCharacteristicList.forEach(resultCharacteristic->{ resultCharacteristicList.forEach(resultCharacteristic->{
resultCharacteristic.put("unisCName",superTableInfoMapper.findCNameByName((String) resultCharacteristic.get("name"),selectorEntity.getSuperBomCode())); Characteristic characteristic = superTableInfoMapper.findCNameByName((String) resultCharacteristic.get("name"), selectorEntity.getSuperBomCode());
resultCharacteristic.put("unisCName",characteristic.getUnisSalesCName());
List<Map<String,Object>> vList= (List<Map<String, Object>>) resultCharacteristic.get("values"); List<Map<String,Object>> vList= (List<Map<String, Object>>) resultCharacteristic.get("values");
vList.forEach(v->{ vList.forEach(v->{
v.put("unisVName",superTableInfoMapper.findVNameByName((String) v.get("name"))); v.put("unisVName",superTableInfoMapper.findVNameByName((String) v.get("name"),selectorEntity.getSuperBomCode(),characteristic.getCharacteristicCode()));
}); });
}); });
......
...@@ -3,6 +3,8 @@ package cn.com.uitech.authorization.mapper; ...@@ -3,6 +3,8 @@ package cn.com.uitech.authorization.mapper;
import cn.com.uitech.authorization.pojo.dto.ResultDto; import cn.com.uitech.authorization.pojo.dto.ResultDto;
import cn.com.uitech.authorization.pojo.dto.SuperTableInfoDto; import cn.com.uitech.authorization.pojo.dto.SuperTableInfoDto;
import cn.com.uitech.authorization.pojo.dto.SuperTableInfoLog; import cn.com.uitech.authorization.pojo.dto.SuperTableInfoLog;
import cn.com.uitech.authorization.pojo.entity.Characteristic;
import cn.com.uitech.authorization.pojo.entity.CharacteristicValue;
import cn.com.uitech.authorization.pojo.entity.SuperTableInfo; import cn.com.uitech.authorization.pojo.entity.SuperTableInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -30,7 +32,7 @@ public interface SuperTableInfoMapper extends IBaseMapper<SuperTableInfo>{ ...@@ -30,7 +32,7 @@ public interface SuperTableInfoMapper extends IBaseMapper<SuperTableInfo>{
List<String> findVName(@Param("tablenumber") String tablenumber, @Param("characteristiccode") String characteristiccode, @Param("groupNumber") String groupNumber); List<String> findVName(@Param("tablenumber") String tablenumber, @Param("characteristiccode") String characteristiccode, @Param("groupNumber") String groupNumber);
String findCNameByName(@Param("name") String name,String superBomCode); Characteristic findCNameByName(@Param("name") String name, String superBomCode);
String findVNameByName(@Param("name") String name); String findVNameByName(@Param("name") String name,@Param("superBomCode") String superBomCode,@Param("cCode") String cCode);
} }
...@@ -478,6 +478,65 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -478,6 +478,65 @@ public class IntegrateServiceImpl implements IntegrateService {
return result; return result;
} }
} else { } else {
//todo 0119 暂时关闭 撞配
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.setMsg(applySkuCodeResultDto.getMsg());
result.setCode(applySkuCodeResultDto.getCode());
return result;
}
/*
List<SuperBomSkuInfo> skuInfos = superBomSkuInfoMapper.getSkuInfo(superBomSkuInfo); List<SuperBomSkuInfo> skuInfos = superBomSkuInfoMapper.getSkuInfo(superBomSkuInfo);
Boolean flag = true; Boolean flag = true;
if (!CollectionUtils.isEmpty(skuInfos)) { if (!CollectionUtils.isEmpty(skuInfos)) {
...@@ -670,6 +729,7 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -670,6 +729,7 @@ public class IntegrateServiceImpl implements IntegrateService {
return result; return result;
} }
*/
} }
} else { } else {
......
...@@ -70,10 +70,10 @@ ...@@ -70,10 +70,10 @@
<select id="findVName" resultType="java.lang.String"> <select id="findVName" resultType="java.lang.String">
select distinct COALESCE(d.characteristic_value_name,'None') from super_table_item_info b left join super_characteristic_value_info d on b.characteristic_value_code = d.characteristic_value_code and b.super_bom_code=d.super_bom_code where b.table_number =#{tablenumber} and b.group_number = #{groupNumber} and b.characteristic_code = #{characteristiccode} select distinct COALESCE(d.characteristic_value_name,'None') from super_table_item_info b left join super_characteristic_value_info d on b.characteristic_value_code = d.characteristic_value_code and b.super_bom_code=d.super_bom_code where b.table_number =#{tablenumber} and b.group_number = #{groupNumber} and b.characteristic_code = #{characteristiccode}
</select> </select>
<select id="findCNameByName" resultType="java.lang.String"> <select id="findCNameByName" resultType="cn.com.uitech.authorization.pojo.entity.Characteristic">
select unis_sales_c_name from super_characteristic_info where characteristic_name = #{name} and super_bom_code = #{superBomCode} select * from super_characteristic_info where characteristic_name = #{name} and super_bom_code = #{superBomCode}
</select> </select>
<select id="findVNameByName" resultType="java.lang.String"> <select id="findVNameByName" resultType="java.lang.String">
select unis_sales_v_name from super_characteristic_value_info where characteristic_value_name = #{name} limit 1 select unis_sales_v_name from super_characteristic_value_info where characteristic_value_name = #{name} and super_bom_code = #{superBomCode} and characteristic_code = #{cCode}
</select> </select>
</mapper> </mapper>
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