perf: 调整icdconfig属性字段的拆分和合并处理

dev
huangfeng 8 months ago
parent 29234aa17b
commit b9a9e2259c

@ -61,7 +61,7 @@ public class IcdConfigType {
@Transient @Transient
private List<IcdConfigTypeInst> instList; private List<IcdConfigTypeInst> instList;
public void addAtt(String doName, String desc, String param, String inst) { public void addAtt(String doName, String fc, String lastName, String desc, String inst) {
if (attMap == null) { if (attMap == null) {
attMap = new LinkedHashMap<>(); attMap = new LinkedHashMap<>();
} }
@ -69,8 +69,9 @@ public class IcdConfigType {
if (item == null) { if (item == null) {
item = IcdConfigTypeAtt.builder() item = IcdConfigTypeAtt.builder()
.doName(doName) .doName(doName)
.fc(fc)
.lastName(lastName)
.description(desc) .description(desc)
.param(param)
.build(); .build();
attMap.put(doName, item); attMap.put(doName, item);
} }

@ -37,9 +37,13 @@ public class IcdConfigTypeAtt {
@Column(name = "do_name") @Column(name = "do_name")
private String doName; private String doName;
@ApiModelProperty(name = "参数") @ApiModelProperty(name = "fc")
@Column(name = "param") @Column(name = "fc")
private String param; private String fc;
@ApiModelProperty(name = "lastName")
@Column(name = "last_name")
private String lastName;
@ApiModelProperty(name = "备注") @ApiModelProperty(name = "备注")
@Column(name = "description") @Column(name = "description")
@ -76,4 +80,8 @@ public class IcdConfigTypeAtt {
return instList.contains(inst); return instList.contains(inst);
} }
public String getParam() {
return fc + "$" + doName + "$" + lastName;
}
} }

@ -161,7 +161,7 @@ public class ParamBindServiceImpl implements ParamBindService {
List<IcdConfigTypeAtt> attList = attRepository.findByIcdConfigTypeId(type.getId()); List<IcdConfigTypeAtt> attList = attRepository.findByIcdConfigTypeId(type.getId());
List<String> msgList = new ArrayList<>(); List<String> msgList = new ArrayList<>();
for (IcdConfigTypeAtt att : attList) { for (IcdConfigTypeAtt att : attList) {
if (StringUtils.isBlank(att.getColName()) && att.containInst(inst.getInst()) && att.getParam().startsWith("MX")) { if (StringUtils.isBlank(att.getColName()) && att.containInst(inst.getInst()) && att.getFc().equalsIgnoreCase("MX")) {
msgList.add(att.getDoName() + "该属性还未配置绑定字段"); msgList.add(att.getDoName() + "该属性还未配置绑定字段");
} else { } else {
// String paramindex = param + "$" + att.getParam(); // String paramindex = param + "$" + att.getParam();

@ -123,9 +123,8 @@ public class IcdXmlUtil {
.build(); .build();
configMap.put(key, config); configMap.put(key, config);
} }
String param = fc + "$" + doName + "$" + lastname;
config.addInst(lnInst); config.addInst(lnInst);
config.addAtt(doName, doDesc, param, lnInst); config.addAtt(doName, fc, lastname, doDesc, lnInst);
} else if ("ST".equals(fc)) { } else if ("ST".equals(fc)) {
IcdConfigType config = configMap.get(key); IcdConfigType config = configMap.get(key);
if (config == null) { if (config == null) {
@ -138,7 +137,7 @@ public class IcdXmlUtil {
} }
String param = fc + "$" + doName + "$" + lastname; String param = fc + "$" + doName + "$" + lastname;
config.addInst(lnInst); config.addInst(lnInst);
config.addAtt(doName, doDesc, param, lnInst); config.addAtt(doName, fc, lastname, doDesc, lnInst);
} }
} }
} }

Loading…
Cancel
Save