1
13693261870
2022-11-12 789027cd17a31a439efeef8ba1ef61705ba43edc
1
已添加2个文件
已修改8个文件
60 ■■■■■ 文件已修改
Community.DAL/QueryDAL.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Community.Serve/App_Data/Community.db 补丁 | 查看 | 原始文档 | blame | 历史
Community.Serve/App_Data/CommunityAll.db 补丁 | 查看 | 原始文档 | blame | 历史
Community.Serve/Global.asax.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Community.Serve/Web.config 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaCode/BsTemplate/GeoMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaCode/BsTemplate/Mapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaCode/FrmMyBatisPlus.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaCode/FrmSys.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaCode/JavaCode.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Community.DAL/QueryDAL.cs
@@ -34,16 +34,9 @@
        public static DataTable QueryBuildingById(int id)
        {
            try
            {
                string sql = string.Format(_queryBuilding, id);
                return SQLiteHelper.GetDataTable(sql, null);
            }
            catch
            {
                return null;
            }
        }
        public static DataTable QueryHouse(string name, string unit, string num)
Community.Serve/App_Data/Community.db
Binary files differ
Community.Serve/App_Data/CommunityAll.db
Binary files differ
Community.Serve/Global.asax.cs
@@ -7,6 +7,7 @@
using System.Web;
using System.Web.Http;
using System.Web.Routing;
using System.Configuration;
namespace Community.Serve
{
@@ -14,7 +15,8 @@
    {
        protected void Application_Start()
        {
            SQLiteHelper.DB = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "bin\\App_Data\\Community.db");
            //SQLiteHelper.DB = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "bin\\App_Data\\Community.db");
            SQLiteHelper.DB = ConfigurationManager.AppSettings["db"];
            GlobalConfiguration.Configure(WebApiConfig.Register);
        }
Community.Serve/Web.config
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<configuration>
  <appSettings/>
  <appSettings>
    <add key="db" value="E:\terrait\CommunityServe\Community.Serve\App_Data\Community.db"/>
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5.2"/>
    <httpRuntime/>
JavaCode/BsTemplate/GeoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
package {mapperNS};
import {entityNS}.{entityName};
import com.lf.server.mapper.all.GeomBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
 * {bak}
 * @author WWW
 */
@Mapper
@Repository
public interface {mapperName} extends GeomBaseMapper<{entityName}> {
}
JavaCode/BsTemplate/Mapper.java
@@ -14,5 +14,4 @@
@Mapper
@Repository
public interface {mapperName} extends BaseMapper<{entityName}> {
{wkt}
}
JavaCode/FrmMyBatisPlus.cs
@@ -34,7 +34,6 @@
        }
        #endregion
        #region æŸ¥è¯¢è¡¨ç»“构:135502,69701  29257,20582
        private void btnReadTab_Click(object sender, EventArgs e)
        {
@@ -192,23 +191,13 @@
            string bak = string.IsNullOrWhiteSpace(tabs[0].desc) ? shortName : tabs[0].desc.Replace("表", "");
            string wkt = this.HasGeom(tabs) ?
                    "    /**\r\n" +
                    "     * æ ¹æ®ID查询WKT\r\n" +
                    "     *\r\n" +
                    "     * @param gid\r\n" +
                    "     * @return\r\n" +
                    "     */\r\n" +
                    "    @Select(\"select st_astext(geom) geom from " + tabName + " where gid = #{gid}\")\r\n" +
                    "    String selectWktById(@Param(\"gid\") Integer gid);" : "";
            string xml = File.ReadAllText(Path.Combine(baseDir, "BsTemplate\\Mapper.java"));
            string javaFile = this.HasGeom(tabs) ? "GeoMapper.java" : "Mapper.java";
            string xml = File.ReadAllText(Path.Combine(baseDir, "BsTemplate\\" + javaFile));
            xml = xml
                .Replace("{mapperNS}", mapperNS)
                .Replace("{mapperName}", mapperName)
                .Replace("{entityNS}", entityNS)
                .Replace("{entityName}", entityName)
                .Replace("{wkt}", wkt)
                .Replace("{bak}", bak);
            string fileName = shortName + "Mapper.java";
@@ -243,7 +232,10 @@
            {
                string type = GetJavaType(ti);
                if (ti.col == "gid") sb.Append("\r\n    @TableId(type = IdType.AUTO)");
                if (ti.col == "geom") sb.Append("\r\n    @TableField(select = false)");
                if (ti.col == "geom" || ti.col == "shape_leng" || ti.col == "shape_area")
                {
                    sb.Append("\r\n    @TableField(select = false)");
                }
                if (ti.col == "class")
                {
                    sb.Append("\r\n    @TableField(value = \"class\")");
@@ -307,7 +299,8 @@
                    str += strs[i];
                    continue;
                }
                str += ToUpperFirst(strs[i]);
                str += strs[i].Length == 1 ? strs[i] : ToUpperFirst(strs[i]);
            }
            return str;
JavaCode/FrmSys.cs
@@ -548,7 +548,8 @@
            string queryCol = colType + " " + colName;
            //string where = isString ? "\r\n        " + colName + " = \"%\" + (StringHelper.isNull(" + colName + ") ? \"\" : " + colName + ".trim()) + \"%\";\r\n" : "";
            string where = colType == "String" ? "\r\n        " + colName + " = StringHelper.isNull(" + colName + ") ? null : \"%\" + " + colName + ".trim() + \"%\";\r\n" : "";
            //string where = colType == "String" ? "\r\n        " + colName + " = StringHelper.isNull(" + colName + ") ? null : \"%\" + " + colName + ".trim() + \"%\";\r\n" : "";
            string where = colType == "String" ? "\r\n        " + colName + " = StringHelper.getLikeStr(" + colName + ");\r\n" : "";
            string xml = File.ReadAllText(Path.Combine(baseDir, "SysTemplate\\Service.java"));
            xml = xml
JavaCode/JavaCode.csproj
@@ -118,6 +118,9 @@
    <EmbeddedResource Include="BsTemplate\Mapper.java">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </EmbeddedResource>
    <EmbeddedResource Include="BsTemplate\GeoMapper.java">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </EmbeddedResource>
    <Content Include="DLL\Mono.Security.dll" />
    <Content Include="DLL\Npgsql.dll" />
    <Content Include="SysTemplate\pg.sql" />