| | |
| | | " <button class=\"btn-white btn btn-xs\" v-on:click=\"_openEdit"+toUpperCaseFirstOne(data.getString("templateCode"))+"Model("+data.getString("templateCode")+")\">修改</button>\n" + |
| | | " </div>\n" + |
| | | " <div class=\"btn-group\">\n" + |
| | | " <button class=\"btn-white btn btn-xs\" v-on:click=\"_openDel"+toUpperCaseFirstOne(data.getString("templateCode"))+"Model("+data.getString("templateCode")+")\">删除</button>\n" + |
| | | " <button class=\"btn-white btn btn-xs\" v-on:click=\"_openDelete"+toUpperCaseFirstOne(data.getString("templateCode"))+"Model("+data.getString("templateCode")+")\">删除</button>\n" + |
| | | " </div></td>\n"); |
| | | |
| | | fileContext = fileContext.replace("@@columnsCnCode@@", thSb.toString()) |
| | |
| | | fileContext = super.replaceTemplateContext(fileContext, data); |
| | | |
| | | String writePath = this.getClass().getResource("/").getPath() |
| | | +"out/web/smo/"+data.getString("templateCode")+"/List"+toUpperCaseFirstOne(data.getString("templateCode"))+"sSMOImpl.java"; |
| | | +"out/web/smo/"+data.getString("templateCode")+"/impl/List"+toUpperCaseFirstOne(data.getString("templateCode"))+"sSMOImpl.java"; |
| | | System.out.printf("writePath: " + writePath); |
| | | writeFile(writePath, |
| | | fileContext); |
| | |
| | | JSONArray columns = data.getJSONArray("columns"); |
| | | String variable = ""; |
| | | String variableGetSet = ""; |
| | | |
| | | variable += "private String " + data.getString("templateKey") + ";\n"; |
| | | |
| | | variableGetSet += "public String get" + toUpperCaseFirstOne(data.getString("templateKey")) + "() {\n" |
| | | + " return " + data.getString("templateKey") + ";\n" |
| | | + " }\n"; |
| | | variableGetSet += "public void set" + toUpperCaseFirstOne(data.getString("templateKey")) + "(String " + data.getString("templateKey") + ") {\n" |
| | | + " this." + data.getString("templateKey") + " = " + data.getString("templateKey") + ";\n" |
| | | + " }\n"; |
| | | |
| | | for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) { |
| | | JSONObject column = columns.getJSONObject(columnIndex); |
| | | String key = column.getString("code"); |