Commit 603c665e by zhaoxiaolei

增加修改特征/特征值后清空缓存功能

parent 8405366c
...@@ -35,7 +35,7 @@ import java.util.List; ...@@ -35,7 +35,7 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/characteristic") @RequestMapping("/characteristic")
@Api(tags = {"Characteristic 特征管理"}) @Api(tags = {"Characteristic 特征管理"})
//@ApiIgnore @ApiIgnore
public class CharacteristicController { public class CharacteristicController {
......
...@@ -66,7 +66,7 @@ public class IntegrateController { ...@@ -66,7 +66,7 @@ public class IntegrateController {
@PostMapping("/SetSuperTableInfo") @PostMapping("/SetSuperTableInfo")
@ApiOperation(value = "集成OD约束关系", notes = "SetSuperTableInfo", httpMethod = "POST") @ApiOperation(value = "集成OD约束关系", notes = "SetSuperTableInfo", httpMethod = "POST")
public CrmResponseEntity<?> SetSuperTableInfo(@RequestBody List<SaveTableInputDto> saveTableInputDtos) { public CrmResponseEntity<?> setSuperTableInfo(@RequestBody List<SaveTableInputDto> saveTableInputDtos) {
return ResultGenerator.genSuccessResult(integrateService.SetSuperTableInfo(saveTableInputDtos)); return ResultGenerator.genSuccessResult(integrateService.SetSuperTableInfo(saveTableInputDtos));
} }
...@@ -226,7 +226,7 @@ public class IntegrateController { ...@@ -226,7 +226,7 @@ public class IntegrateController {
HttpHeaders headers = getHttpHeader(); HttpHeaders headers = getHttpHeader();
preVerifyInputDTO.setProductGroupCode(preVerifyInputDTO.getProductClassCode()); preVerifyInputDTO.setProductGroupCode(preVerifyInputDTO.getProductClassCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(preVerifyInputDTO), headers); HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(preVerifyInputDTO), headers);
ResponseEntity<String> responseEntity = restTemplate.exchange("http://127.0.0.1:8080/api/v1/selector/preVerify", HttpMethod.POST, requestEntity, String.class); ResponseEntity<String> responseEntity = restTemplate.exchange(selectorUrl+"/preVerify", HttpMethod.POST, requestEntity, String.class);
JSONObject object = JSONObject.parseObject(responseEntity.getBody()); JSONObject object = JSONObject.parseObject(responseEntity.getBody());
PreVerifyOutputDTO preVerifyOutputDTO = JSON.toJavaObject((JSON) object.get("data"), PreVerifyOutputDTO.class); PreVerifyOutputDTO preVerifyOutputDTO = JSON.toJavaObject((JSON) object.get("data"), PreVerifyOutputDTO.class);
...@@ -241,7 +241,7 @@ public class IntegrateController { ...@@ -241,7 +241,7 @@ public class IntegrateController {
activeValue.setCharacteristicName(characteristic.getCharacteristicName()); activeValue.setCharacteristicName(characteristic.getCharacteristicName());
List<String> values2 = activeValue.getValues(); List<String> values2 = activeValue.getValues();
for (int i = 0; i < values2.size(); i++) { for (int i = 0; i < values2.size(); i++) {
String name = integrateService.getName(values2.get(i)); String name = integrateService.getName(values2.get(i),preVerifyInputDTO.getMaterialCode());
values2.add(name); values2.add(name);
values2.remove(i); values2.remove(i);
} }
...@@ -262,7 +262,7 @@ public class IntegrateController { ...@@ -262,7 +262,7 @@ public class IntegrateController {
postVerifyInputDTO.setProductGroupCode(postVerifyInputDTO.getProductClassCode()); postVerifyInputDTO.setProductGroupCode(postVerifyInputDTO.getProductClassCode());
postVerifyInputDTO.setMaterialCode(postVerifyInputDTO.getSuperBomCode()); postVerifyInputDTO.setMaterialCode(postVerifyInputDTO.getSuperBomCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(postVerifyInputDTO), headers); HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(postVerifyInputDTO), headers);
ResponseEntity<String> responseEntity = restTemplate.exchange("http://127.0.0.1:8080/api/v1/selector/postVerify", HttpMethod.POST, requestEntity, String.class); ResponseEntity<String> responseEntity = restTemplate.exchange(selectorUrl+"/postVerify", HttpMethod.POST, requestEntity, String.class);
JSONObject object = JSONObject.parseObject(responseEntity.getBody()); JSONObject object = JSONObject.parseObject(responseEntity.getBody());
return object.get("data"); return object.get("data");
} }
...@@ -304,27 +304,32 @@ public class IntegrateController { ...@@ -304,27 +304,32 @@ public class IntegrateController {
} }
@PostMapping("/GetConfigBySUKINFO") @PostMapping("/GetConfigBySUKINFO")
@ApiOperation(value = "SKU配置接口CRM", notes = "GetConfigBySUKINFO", httpMethod = "POST") @ApiOperation(value = "CRM-SKU配置接口", notes = "GetConfigBySUKINFO", httpMethod = "POST")
public CrmResponseEntity<?> GetConfigBySUKINFO(@RequestBody SuperBomSkuInfo superBomSkuInfo,HttpServletRequest request){ public CrmResponseEntity<?> getConfigBySUKINFO(@RequestBody SuperBomSkuInfo superBomSkuInfo,HttpServletRequest request){
superBomSkuInfo.setApplyUser(request.getHeader("UserCode")); superBomSkuInfo.setApplyUser(request.getHeader("UserCode"));
return ResultGenerator.genSuccessResult(integrateService.GetConfigBySUKINFO(superBomSkuInfo,request)); return ResultGenerator.genSuccessResult(integrateService.GetConfigBySUKINFO(superBomSkuInfo,request));
} }
@PostMapping("/GetSKUByConfigInfo") @PostMapping("/GetSKUByConfigInfo")
@ApiOperation(value = "撞配", notes = "GetSKUByConfigInfo", httpMethod = "POST") @ApiOperation(value = "撞配", notes = "GetSKUByConfigInfo", httpMethod = "POST")
public CrmResponseEntity<?> GetSKUByConfigInfo(@RequestBody SuperBomSkuInfo superBomSkuInfo,HttpServletRequest request){ public CrmResponseEntity<?> getSKUByConfigInfo(@RequestBody SuperBomSkuInfo superBomSkuInfo,HttpServletRequest request){
superBomSkuInfo.setApplyUser(request.getHeader("UserCode")); superBomSkuInfo.setApplyUser(request.getHeader("UserCode"));
return ResultGenerator.genSuccessResult(integrateService.GetSKUByConfigInfo(superBomSkuInfo,request,0)); return ResultGenerator.genSuccessResult(integrateService.GetSKUByConfigInfo(superBomSkuInfo,request,0));
} }
@PostMapping("/GetSKUByH3CConfigInfo") @PostMapping("/GetSKUByH3CConfigInfo")
@ApiOperation(value = "SKU配置接口H3C", notes = "GetSKUByH3CConfigInfo", httpMethod = "POST") @ApiOperation(value = "H3C-SKU配置接口", notes = "GetSKUByH3CConfigInfo", httpMethod = "POST")
public CrmResponseEntity<?> GetSKUByH3CConfigInfo(@RequestBody GetSKUByH3CConfigInfo configSkuInfo,HttpServletRequest request){ public CrmResponseEntity<?> getSKUByH3CConfigInfo(@RequestBody GetSKUByH3CConfigInfo configSkuInfo,HttpServletRequest request){
return ResultGenerator.genSuccessResult(integrateService.GetSKUByH3CConfigInfo(configSkuInfo,request)); return ResultGenerator.genSuccessResult(integrateService.GetSKUByH3CConfigInfo(configSkuInfo,request));
} }
@PostMapping("/newGetSKUByH3CConfigInfo")
@ApiOperation(value = "H3C-新SKU配置接口", notes = "GetSKUByH3CConfigInfo", httpMethod = "POST")
public CrmResponseEntity<?> newGetSKUByH3CConfigInfo(@RequestBody GetSKUByH3CConfigInfo configSkuInfo,HttpServletRequest request){
return ResultGenerator.genSuccessResult(integrateService.newGetSKUByH3CConfigInfo(configSkuInfo,request));
}
@PostMapping("/saveSukInfo") @PostMapping("/saveSukInfo")
@ApiOperation(value = "保存Sku信息CPQ", notes = "applySukCode", httpMethod = "POST") @ApiOperation(value = "CPQ-保存Sku信息", notes = "applySukCode", httpMethod = "POST")
public CrmResponseEntity<?> saveSukInfo(@RequestBody SuperBomSkuInfo superBomSkuInfo,HttpServletRequest request){ public CrmResponseEntity<?> saveSukInfo(@RequestBody SuperBomSkuInfo superBomSkuInfo,HttpServletRequest request){
superBomSkuInfo.setApplyUser(request.getHeader("UserCode")); superBomSkuInfo.setApplyUser(request.getHeader("UserCode"));
return ResultGenerator.genSuccessResult(integrateService.saveSukInfo(superBomSkuInfo,request)); return ResultGenerator.genSuccessResult(integrateService.saveSukInfo(superBomSkuInfo,request));
......
...@@ -28,7 +28,7 @@ import java.util.Map; ...@@ -28,7 +28,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("/superBom") @RequestMapping("/superBom")
@Api(tags = {"部件产品价格系数维护"}) @Api(tags = {"部件产品价格系数维护"})
//@ApiIgnore @ApiIgnore
public class SuperBomPriceCalculateController { public class SuperBomPriceCalculateController {
@Resource @Resource
......
...@@ -95,7 +95,7 @@ public interface CharacteristicValueMapper extends IBaseMapper<CharacteristicVal ...@@ -95,7 +95,7 @@ public interface CharacteristicValueMapper extends IBaseMapper<CharacteristicVal
CharacteristicValue findByCharacteristicValueName(String characteristicName,String characteristicValueName,String superBomCode); CharacteristicValue findByCharacteristicValueName(String characteristicName,String characteristicValueName,String superBomCode);
String getName(Object v); String getName(String v,String superBomCode);
String getVNameByCode(String characteristicValueCode,String characteristicCode); String getVNameByCode(String characteristicValueCode,String characteristicCode);
......
...@@ -23,14 +23,14 @@ public interface StandardModelManageMapper extends IBaseMapper<Characteristic>{ ...@@ -23,14 +23,14 @@ public interface StandardModelManageMapper extends IBaseMapper<Characteristic>{
List<Characteristic> getStandardModel(StandardModelManageDto standardModelManageDto); List<Characteristic> getStandardModel(StandardModelManageDto standardModelManageDto);
/** /**
* 修改特征的默认值为0 * 修改特征的默认值为0
* @param characteristi * @param
* @return 行数 * @return 行数
*/ */
void updateDefaultValueZero(@Param("list") List<String> characteristi,@Param("superBomCode") String superBomCode); void updateDefaultValueZero(@Param("superBomCode") String superBomCode);
/** /**
* 修改特征的默认值为1 * 修改特征的默认值为1
* @param characteristiValue * @param characteristiValue
* @return 行数 * @return 行数
*/ */
......
...@@ -24,12 +24,14 @@ public interface IntegrateService { ...@@ -24,12 +24,14 @@ public interface IntegrateService {
CharacteristicValue findByCharacteristicValueName(String characteristicName,String characteristicValueName,String superBomCode); CharacteristicValue findByCharacteristicValueName(String characteristicName,String characteristicValueName,String superBomCode);
String getName(Object v); String getName(String v,String superBomCode);
Object getSuperBomInfoByConfigId(Map<String, Object> map); Object getSuperBomInfoByConfigId(Map<String, Object> map);
Object GetSKUByH3CConfigInfo(GetSKUByH3CConfigInfo configSkuInfo,HttpServletRequest request); Object GetSKUByH3CConfigInfo(GetSKUByH3CConfigInfo configSkuInfo,HttpServletRequest request);
Object newGetSKUByH3CConfigInfo(GetSKUByH3CConfigInfo configSkuInfo,HttpServletRequest request);
Object getConfigInfo(GetConfigurationInputDTO getConfigurationInputDTO); Object getConfigInfo(GetConfigurationInputDTO getConfigurationInputDTO);
Object saveSukInfo(SuperBomSkuInfo superBomSkuInfo,HttpServletRequest request); Object saveSukInfo(SuperBomSkuInfo superBomSkuInfo,HttpServletRequest request);
...@@ -53,4 +55,6 @@ public interface IntegrateService { ...@@ -53,4 +55,6 @@ public interface IntegrateService {
Object ldapAuth(UserInfo userinfo); Object ldapAuth(UserInfo userinfo);
void saveUserOperationLog(HttpServletRequest request, UserOperationLog log); void saveUserOperationLog(HttpServletRequest request, UserOperationLog log);
void cleanRedisData(String superBomCode,String productClassCode);
} }
...@@ -2,16 +2,17 @@ package cn.com.uitech.authorization.service.impl; ...@@ -2,16 +2,17 @@ package cn.com.uitech.authorization.service.impl;
import cn.com.uitech.authorization.exception.BizException; import cn.com.uitech.authorization.exception.BizException;
import cn.com.uitech.authorization.mapper.CharacteristicMapper; import cn.com.uitech.authorization.mapper.CharacteristicMapper;
import cn.com.uitech.authorization.mapper.CtoBomMapper;
import cn.com.uitech.authorization.mapper.SuperBomPriceCalculateMapper; import cn.com.uitech.authorization.mapper.SuperBomPriceCalculateMapper;
import cn.com.uitech.authorization.pojo.dto.CharacteristicExportDto; import cn.com.uitech.authorization.pojo.dto.CharacteristicExportDto;
import cn.com.uitech.authorization.pojo.dto.CharacteristicLogOpera; import cn.com.uitech.authorization.pojo.dto.CharacteristicLogOpera;
import cn.com.uitech.authorization.pojo.dto.CharacteristicRequestParamDto; import cn.com.uitech.authorization.pojo.dto.CharacteristicRequestParamDto;
import cn.com.uitech.authorization.pojo.dto.GetProductOutDto; import cn.com.uitech.authorization.pojo.dto.GetProductOutDto;
import cn.com.uitech.authorization.pojo.entity.Characteristic; import cn.com.uitech.authorization.pojo.entity.Characteristic;
import cn.com.uitech.authorization.pojo.entity.ConfigurableBom;
import cn.com.uitech.authorization.service.CharacteristicService; import cn.com.uitech.authorization.service.CharacteristicService;
import cn.com.uitech.authorization.service.CtoBomService; import cn.com.uitech.authorization.service.IntegrateService;
import cn.com.uitech.authorization.utils.ApiResult; import cn.com.uitech.authorization.utils.ApiResult;
import cn.com.uitech.authorization.utils.DateUitl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
...@@ -38,7 +39,10 @@ import java.io.IOException; ...@@ -38,7 +39,10 @@ import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.ParseException; import java.text.ParseException;
import java.util.*; import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/** /**
* @author yangkuo * @author yangkuo
...@@ -55,7 +59,10 @@ public class CharacteristicServiceImpl implements CharacteristicService { ...@@ -55,7 +59,10 @@ public class CharacteristicServiceImpl implements CharacteristicService {
private SuperBomPriceCalculateMapper superBomPriceCalculateMapper; private SuperBomPriceCalculateMapper superBomPriceCalculateMapper;
@Autowired @Autowired
private CtoBomService ctoBomService; private IntegrateService integrateService;
@Autowired
private CtoBomMapper ctoBomMapper;
/** /**
* 分页查询特征列表 * 分页查询特征列表
...@@ -84,6 +91,10 @@ public class CharacteristicServiceImpl implements CharacteristicService { ...@@ -84,6 +91,10 @@ public class CharacteristicServiceImpl implements CharacteristicService {
logOpera.setOpera("/characteristic/update"); logOpera.setOpera("/characteristic/update");
characteristicMapper.saveLogOpera(logOpera); characteristicMapper.saveLogOpera(logOpera);
requestParamDto.setUpdateUser(request.getHeader("UserCode")); requestParamDto.setUpdateUser(request.getHeader("UserCode"));
//清空缓存
String superBomCode = requestParamDto.getSuperBomCode();
ConfigurableBom cto = ctoBomMapper.getCto(superBomCode);
integrateService.cleanRedisData(superBomCode,cto.getProductClassCode());
return characteristicMapper.updateCharacteristic(requestParamDto); return characteristicMapper.updateCharacteristic(requestParamDto);
} }
...@@ -381,6 +392,12 @@ public class CharacteristicServiceImpl implements CharacteristicService { ...@@ -381,6 +392,12 @@ public class CharacteristicServiceImpl implements CharacteristicService {
info.setUpdateUser(request.getHeader("UserCode")); info.setUpdateUser(request.getHeader("UserCode"));
characteristicMapper.updateCharacteristicInfo(info); characteristicMapper.updateCharacteristicInfo(info);
} }
if(!CollectionUtils.isEmpty(updateList)){
//清空缓存
String superBomCode = updateList.get(0).getSuperBomCode();
ConfigurableBom cto = ctoBomMapper.getCto(superBomCode);
integrateService.cleanRedisData(superBomCode,cto.getProductClassCode());
}
} }
/** /**
......
...@@ -2,11 +2,14 @@ package cn.com.uitech.authorization.service.impl; ...@@ -2,11 +2,14 @@ package cn.com.uitech.authorization.service.impl;
import cn.com.uitech.authorization.exception.BizException; import cn.com.uitech.authorization.exception.BizException;
import cn.com.uitech.authorization.mapper.CharacteristicValueMapper; import cn.com.uitech.authorization.mapper.CharacteristicValueMapper;
import cn.com.uitech.authorization.mapper.CtoBomMapper;
import cn.com.uitech.authorization.mapper.SuperBomPriceCalculateMapper; import cn.com.uitech.authorization.mapper.SuperBomPriceCalculateMapper;
import cn.com.uitech.authorization.pojo.dto.*; import cn.com.uitech.authorization.pojo.dto.*;
import cn.com.uitech.authorization.pojo.entity.CharacteristicValue; import cn.com.uitech.authorization.pojo.entity.CharacteristicValue;
import cn.com.uitech.authorization.pojo.entity.ConfigurableBom;
import cn.com.uitech.authorization.pojo.entity.OdRelation; import cn.com.uitech.authorization.pojo.entity.OdRelation;
import cn.com.uitech.authorization.service.CharacteristicValueService; import cn.com.uitech.authorization.service.CharacteristicValueService;
import cn.com.uitech.authorization.service.IntegrateService;
import cn.com.uitech.authorization.utils.ApiResult; import cn.com.uitech.authorization.utils.ApiResult;
import cn.com.uitech.authorization.utils.DateUitl; import cn.com.uitech.authorization.utils.DateUitl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
...@@ -72,6 +75,13 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic ...@@ -72,6 +75,13 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
private String plmUrlH; private String plmUrlH;
@Autowired
private IntegrateService integrateService;
@Autowired
private CtoBomMapper ctoBomMapper;
/** /**
* 分页查询特征值数据 * 分页查询特征值数据
* *
...@@ -110,6 +120,7 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic ...@@ -110,6 +120,7 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
@Override @Override
public Integer batchModifyBomStatus(CharacteristicValueRequestParamDto dto,HttpServletRequest request) { public Integer batchModifyBomStatus(CharacteristicValueRequestParamDto dto,HttpServletRequest request) {
List<Map<String, String>> characteristicValueCodes = dto.getCharacteristicValueCodes(); List<Map<String, String>> characteristicValueCodes = dto.getCharacteristicValueCodes();
List<String> superBomCodes = new ArrayList<String>();
characteristicValueCodes.forEach(item->{ characteristicValueCodes.forEach(item->{
CharacteristicValue characteristicValue = characteristicValueMapper.getVByCode(item.get("characteristicValueCode"), item.get("superBomCode")); CharacteristicValue characteristicValue = characteristicValueMapper.getVByCode(item.get("characteristicValueCode"), item.get("superBomCode"));
CharacteristicValueLogOpera logOpera = new CharacteristicValueLogOpera(); CharacteristicValueLogOpera logOpera = new CharacteristicValueLogOpera();
...@@ -119,7 +130,16 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic ...@@ -119,7 +130,16 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
characteristicValueMapper.saveLogOpera(logOpera); characteristicValueMapper.saveLogOpera(logOpera);
dto.setUpdateUser(request.getHeader("UserCode")); dto.setUpdateUser(request.getHeader("UserCode"));
characteristicValueMapper.batchModifyBomStatus(item.get("characteristicValueCode"), item.get("superBomCode"),dto.getIsState(),request.getHeader("UserCode")); characteristicValueMapper.batchModifyBomStatus(item.get("characteristicValueCode"), item.get("superBomCode"),dto.getIsState(),request.getHeader("UserCode"));
superBomCodes.remove(item.get("characteristicValueCode")+"--"+item.get("superBomCode"));
superBomCodes.add(item.get("characteristicValueCode")+"--"+item.get("superBomCode"));
});
if(!CollectionUtils.isEmpty(superBomCodes)){
superBomCodes.forEach(item->{
//清空缓存
String[] split = item.split("--");
integrateService.cleanRedisData(split[0],split[1]);
}); });
}
return null; return null;
} }
...@@ -179,6 +199,10 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic ...@@ -179,6 +199,10 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
logOpera.setOpera("/characteristicValue/editCharacteristicValue"); logOpera.setOpera("/characteristicValue/editCharacteristicValue");
characteristicValueMapper.saveLogOpera(logOpera); characteristicValueMapper.saveLogOpera(logOpera);
dto.setUpdateUser(request.getHeader("UserCode")); dto.setUpdateUser(request.getHeader("UserCode"));
//清空缓存
String superBomCode = dto.getSuperBomCode();
ConfigurableBom cto = ctoBomMapper.getCto(superBomCode);
integrateService.cleanRedisData(superBomCode,cto.getProductClassCode());
return characteristicValueMapper.editCharacteristicValue(dto); return characteristicValueMapper.editCharacteristicValue(dto);
} }
} }
...@@ -524,6 +548,12 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic ...@@ -524,6 +548,12 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
v.setUpdateUser(request.getHeader("UserCode")); v.setUpdateUser(request.getHeader("UserCode"));
characteristicValueMapper.updateCharacteristicValue(v); characteristicValueMapper.updateCharacteristicValue(v);
} }
if(!CollectionUtils.isEmpty(updateList)){
//清空缓存
String superBomCode = updateList.get(0).getSuperBomCode();
ConfigurableBom cto = ctoBomMapper.getCto(superBomCode);
integrateService.cleanRedisData(superBomCode,cto.getProductClassCode());
}
} }
; ;
......
...@@ -88,8 +88,8 @@ public class StandardModelManageServiceImpl implements StandardModelManageServic ...@@ -88,8 +88,8 @@ public class StandardModelManageServiceImpl implements StandardModelManageServic
}else { }else {
throw new BizException(ApiResult.API_REQ_DATA_IS_FAIL); throw new BizException(ApiResult.API_REQ_DATA_IS_FAIL);
} }
//根据特征编码把下面所有的特征值更行成0非默认 //根据superBom把下面所有的特征值更行成0非默认
standardModelManageMapper.updateDefaultValueZero(characteristi,dto.getSuperBomCode()); standardModelManageMapper.updateDefaultValueZero(dto.getSuperBomCode());
//根据特征值编码把特征值更新为1 默认选中 //根据特征值编码把特征值更新为1 默认选中
standardModelManageMapper.updateDefaultValueOne(characteristiValue,dto.getSuperBomCode()); standardModelManageMapper.updateDefaultValueOne(characteristiValue,dto.getSuperBomCode());
//更新cto的configId //更新cto的configId
......
...@@ -311,9 +311,8 @@ ...@@ -311,9 +311,8 @@
select characteristic_value_name select characteristic_value_name
from super_table_item_info a from super_table_item_info a
left join super_characteristic_value_info b left join super_characteristic_value_info b
on a.characteristic_value_code = b.characteristic_value_code on a.characteristic_value_code = b.characteristic_value_code and b.super_bom_code = a.super_bom_code
where b.characteristic_value_code = #{v} where b.characteristic_value_name = #{v} and b.super_bom_code = #{superBomCode}
group by b.characteristic_value_name
</select> </select>
<select id="getVNameByCode" resultType="java.lang.String"> <select id="getVNameByCode" resultType="java.lang.String">
...@@ -356,7 +355,10 @@ ...@@ -356,7 +355,10 @@
h3c_Deliver_Code = #{h3cDeliverCode}, h3c_Deliver_Code = #{h3cDeliverCode},
update_time = now(), update_time = now(),
update_user = #{updateUser} update_user = #{updateUser}
where super_bom_code = #{superBomCode} and characteristic_Code = #{characteristicCode} and characteristic_Value_Code = #{characteristicValueCode} where
super_bom_code = #{superBomCode}
and characteristic_Code = #{characteristicCode}
and characteristic_Value_Code = #{characteristicValueCode}
</update> </update>
<insert id="saveLogOpera"> <insert id="saveLogOpera">
......
...@@ -45,17 +45,11 @@ ...@@ -45,17 +45,11 @@
</update> </update>
<!--根据特征值编码把所有特征值更新为默认1--> <!--根据特征值编码把所有特征值更新为默认0-->
<update id="updateDefaultValueZero" > <update id="updateDefaultValueZero" >
UPDATE super_characteristic_info UPDATE super_characteristic_value_info
SET is_Show=1 SET is_base=0
<where> <where>
<if test="list!=null and list.size()>0">
and characteristic_Code in
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="superBomCode !=null and superBomCode !='' "> <if test="superBomCode !=null and superBomCode !='' ">
and super_bom_code = #{superBomCode} and super_bom_code = #{superBomCode}
</if> </if>
......
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