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());
}
} }
; ;
......
...@@ -133,6 +133,10 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -133,6 +133,10 @@ public class IntegrateServiceImpl implements IntegrateService {
result.setMsg("请检查数据格式"); result.setMsg("请检查数据格式");
return result; return result;
} }
//清空缓存
String superBomCode = saveSuperBomInputDto.getScuxItemNumber();
ConfigurableBom cto = ctoBomMapper.getCto(superBomCode);
cleanRedisData(superBomCode, cto.getProductClassCode());
} }
result.setCode(ApiResult.SUCCESS.getCode()); result.setCode(ApiResult.SUCCESS.getCode());
result.setMsg("数据集成完成,成功条数:" + flag); result.setMsg("数据集成完成,成功条数:" + flag);
...@@ -179,6 +183,10 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -179,6 +183,10 @@ public class IntegrateServiceImpl implements IntegrateService {
characteristicMapper.saveBom(characteristic); characteristicMapper.saveBom(characteristic);
} }
} }
//清空缓存
String superBomCode = saveSuperCharacterInputDtos.get(0).getSuperNumber();
ConfigurableBom cto = ctoBomMapper.getCto(superBomCode);
cleanRedisData(superBomCode, cto.getProductClassCode());
} }
} catch (Exception e) { } catch (Exception e) {
new BusinessException(ApiResult.INTERNAL_SERVER_ERROR.getMsg()); new BusinessException(ApiResult.INTERNAL_SERVER_ERROR.getMsg());
...@@ -238,6 +246,10 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -238,6 +246,10 @@ public class IntegrateServiceImpl implements IntegrateService {
flag++; flag++;
} }
} }
//清空缓存
String superBomCode = saveSuperCharacterValueInputDtos.get(0).getSuperNumber();
ConfigurableBom cto = ctoBomMapper.getCto(superBomCode);
cleanRedisData(superBomCode, cto.getProductClassCode());
result.setMsg("table数据集成成功,成功条数:" + flag); result.setMsg("table数据集成成功,成功条数:" + flag);
result.setCode(ApiResult.SUCCESS.getCode()); result.setCode(ApiResult.SUCCESS.getCode());
return result; return result;
...@@ -264,6 +276,9 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -264,6 +276,9 @@ public class IntegrateServiceImpl implements IntegrateService {
for (SaveTableInputDto saveTableInputDto : saveTableInputDtos) { for (SaveTableInputDto saveTableInputDto : saveTableInputDtos) {
List<String> superBomCodeList = saveTableInputDto.getSuperBomCode(); List<String> superBomCodeList = saveTableInputDto.getSuperBomCode();
for (String superBomCode : superBomCodeList) { for (String superBomCode : superBomCodeList) {
//清空缓存
ConfigurableBom cto = ctoBomMapper.getCto(superBomCode);
cleanRedisData(superBomCode, cto.getProductClassCode());
SuperTableInfo superTableInfo = new SuperTableInfo(); SuperTableInfo superTableInfo = new SuperTableInfo();
superTableInfo.setId(sequence.nextId()); superTableInfo.setId(sequence.nextId());
superTableInfo.setSuperBomCode(superBomCode); superTableInfo.setSuperBomCode(superBomCode);
...@@ -378,8 +393,8 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -378,8 +393,8 @@ public class IntegrateServiceImpl implements IntegrateService {
* @Param [v] * @Param [v]
* @return java.lang.String * @return java.lang.String
**/ **/
public String getName(Object v) { public String getName(String v,String superBomCode) {
return characteristicValueMapper.getName(v); return characteristicValueMapper.getName(v,superBomCode);
} }
@Override @Override
...@@ -478,65 +493,6 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -478,65 +493,6 @@ 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)) {
...@@ -729,7 +685,6 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -729,7 +685,6 @@ public class IntegrateServiceImpl implements IntegrateService {
return result; return result;
} }
*/
} }
} else { } else {
...@@ -960,6 +915,12 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -960,6 +915,12 @@ public class IntegrateServiceImpl implements IntegrateService {
userInfoMapper.saveUserOperationLog(log); userInfoMapper.saveUserOperationLog(log);
} }
@Override
public void cleanRedisData(String superBomCode, String productClassCode) {
redisHelper.del(RedisKey.getVariantTableKey("ZG", productClassCode, superBomCode));
}
/** /**
* @Author 赵晓雷 * @Author 赵晓雷
...@@ -1246,6 +1207,7 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -1246,6 +1207,7 @@ public class IntegrateServiceImpl implements IntegrateService {
List<String> configIds = new ArrayList<>(); List<String> configIds = new ArrayList<>();
configIds.add(configurableBom.getConfigId()); configIds.add(configurableBom.getConfigId());
getConfigurationInputDTO.setConfigIds(configIds); getConfigurationInputDTO.setConfigIds(configIds);
getConfigurationInputDTO.setToken(configSkuInfo.getToken());
//调用生成配置接口 //调用生成配置接口
Object getConfigData = getConfigInfo(getConfigurationInputDTO); Object getConfigData = getConfigInfo(getConfigurationInputDTO);
Object o = JSONObject.toJSON(getConfigData); Object o = JSONObject.toJSON(getConfigData);
...@@ -1426,6 +1388,244 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -1426,6 +1388,244 @@ public class IntegrateServiceImpl implements IntegrateService {
} }
@Override @Override
public Object newGetSKUByH3CConfigInfo(GetSKUByH3CConfigInfo configSkuInfo, HttpServletRequest request) {
GetProductOutDto getProductOutDto = checkToken(configSkuInfo.getToken());
if (getProductOutDto.getCode().equals(200)) {
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) {
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 {
//没有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);
getConfigurationInputDTO.setToken(configSkuInfo.getToken());
//调用生成配置接口
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)) {
continue;
} else {
cpnList.setCode(500);
cpnList.setMsg("配置结果违反约束冲突" + 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());
}
}
//验证H3CVCODE 是否存在
for (String name : h3cCodeList) {
cpnList.setMsg("CPQ数据验证失败,失败原因:" + name + "特征不能为空!");
cpnList.setCode(ApiResult.INTERNAL_SERVER_ERROR.getCode());
break;
}
} else {
//没有configid
cpnList.setMsg(configurableBom.getSuperBomCode() + "没有维护默认值");
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-撞配-NEW");
} else {
List<GetSKUByH3CConfigInfo.H3CPNList> h3CPNList = configSkuInfo.getH3CPNList();
h3CPNList.forEach(item -> {
item.setCode(getProductOutDto.getCode());
item.setMsg(getProductOutDto.getMsg());
});
return configSkuInfo;
}
return configSkuInfo;
}
@Override
/** /**
* @Author 赵晓雷 * @Author 赵晓雷
* @Description 根据configid获取配置 * @Description 根据configid获取配置
......
...@@ -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