Commit 2421380b authored by 王业雄's avatar 王业雄

资金产品编辑时期数回显

parent 4fe99f10
......@@ -166,28 +166,43 @@ public class FundProductServiceImpl implements IFundProductService {
basic.addAll(orther);
//3.基本信息和其他信息字段,对应的value
Map<Long,String> map = new HashMap<>();
//3.1解析基本规则10 <= age && age <= 50 && 10 <= amount && amount <= 20000 && term == 12 && ! include(not_permit_tels,tel)
//3.1解析基本规则10 <= age && age <= 50 && 10 <= amount && amount <= 20000 && (term == 12 || term == 10) && ! include(not_permit_tels,tel)
//获取资金产品存的value
String basicRule = one.getBasicRule();
//解析value
String[] split = basicRule.split("&&");
for (int i = 0 ; i<split.length;i++){
for (ProductRuleEntity productRuleEntity:basic){
for (String item : split) {
for (ProductRuleEntity productRuleEntity : basic) {
//在value中寻找对应的规则
if ("not_permit_tels".equals(productRuleEntity.getRuleVal())){
map.put(productRuleEntity.getId(),one.getTelRule());
if ("not_permit_tels".equals(productRuleEntity.getRuleVal())) {
map.put(productRuleEntity.getId(), one.getTelRule());
break;
}
if (split[i].contains(productRuleEntity.getRuleVal())){
//取出value中的值
String numeric = getNumeric(split[i]);
String s = map.get(productRuleEntity.getId());
if (StringUtils.isEmpty(s)){
map.put(productRuleEntity.getId(),numeric);
}else {
map.put(productRuleEntity.getId(),s.concat(",").concat(numeric));
if (item.contains(productRuleEntity.getRuleVal())) {
if ("term".equals(productRuleEntity.getRuleVal())) {
String[] splitTerm = item.split("\\|\\|");
for (String value : splitTerm) {
//取出value中的值
String numeric = getNumeric(value);
String s = map.get(productRuleEntity.getId());
if (StringUtils.isEmpty(s)) {
map.put(productRuleEntity.getId(), numeric);
} else {
map.put(productRuleEntity.getId(), s.concat(",").concat(numeric));
}
}
break;
} else {
//取出value中的值
String numeric = getNumeric(item);
String s = map.get(productRuleEntity.getId());
if (StringUtils.isEmpty(s)) {
map.put(productRuleEntity.getId(), numeric);
} else {
map.put(productRuleEntity.getId(), s.concat(",").concat(numeric));
}
break;
}
break;
}
}
}
......
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