fix: 调整排序,校验

dev
huangfeng 1 year ago
parent ead518375b
commit 9b2d1ad921

@ -63,7 +63,7 @@ public class DataServiceImpl implements DataService {
List<ColumnModel> result = new ArrayList<>(); List<ColumnModel> result = new ArrayList<>();
String sql = "SELECT COLUMN_NAME name, COLUMN_COMMENT comment FROM information_schema.columns WHERE TABLE_NAME='" String sql = "SELECT COLUMN_NAME name, COLUMN_COMMENT comment FROM information_schema.columns WHERE TABLE_NAME='"
+ tableName + "' AND TABLE_SCHEMA='" + schema + "'"; + tableName + "' AND TABLE_SCHEMA='" + schema + "' ORDER BY comment,name";
List<ColumnModel> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ColumnModel.class)); List<ColumnModel> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ColumnModel.class));
for (ColumnModel item : list) { for (ColumnModel item : list) {
String col = item.getName(); String col = item.getName();

@ -114,11 +114,11 @@ public class ParamBindServiceImpl implements ParamBindService {
if (StringUtils.isBlank(att.getColName())) { if (StringUtils.isBlank(att.getColName())) {
msgList.add(att.getDoName() + "该属性还未配置绑定字段"); msgList.add(att.getDoName() + "该属性还未配置绑定字段");
} else { } else {
String paramindex = param + "$" + att.getParam(); // String paramindex = param + "$" + att.getParam();
Optional<Rptparamindex> optionalRpt = rptparamindexRepository.findById(paramindex); // Optional<Rptparamindex> optionalRpt = rptparamindexRepository.findById(paramindex);
if (!optionalRpt.isPresent()) { // if (!optionalRpt.isPresent()) {
throw new Exception("未找到该Rptparamindex对象参引=" + paramindex); // throw new Exception("未找到该Rptparamindex对象参引=" + paramindex);
} // }
} }
} }

@ -65,11 +65,19 @@ public class IcdXmlUtil {
JsonNode lnNode = mapLN.get(lnClass + lnInst); JsonNode lnNode = mapLN.get(lnClass + lnInst);
String lnType = lnNode.get("lnType").asText(); String lnType = lnNode.get("lnType").asText();
String lnDesc = lnNode.get("desc").asText(); JsonNode nodeLnDesc = lnNode.get("desc");
String lnDesc = null;
if (nodeLnDesc != null) {
lnDesc = nodeLnDesc.asText();
}
JsonNode nodeLNodeType = mapLNodeType.get(lnType); JsonNode nodeLNodeType = mapLNodeType.get(lnType);
JsonNode nodeDO = findLNodeType_DO_Node(nodeLNodeType, doName); JsonNode nodeDO = findLNodeType_DO_Node(nodeLNodeType, doName);
String doType = nodeDO.get("type").asText(); String doType = nodeDO.get("type").asText();
String doDesc = nodeDO.get("desc").asText(); JsonNode nodeDoDesc = nodeDO.get("desc");
String doDesc = null;
if (nodeDoDesc != null) {
doDesc = nodeDoDesc.asText();
}
JsonNode nodeDOType = mapDOType.get(doType); JsonNode nodeDOType = mapDOType.get(doType);
String lastname = findLastname(nodeDOType, fc, mapDAType); String lastname = findLastname(nodeDOType, fc, mapDAType);

Loading…
Cancel
Save