示例#1
0
        public void ExecutePublicCs(List <System.Windows.Point> polygon)
        {
            //获取公共场所总数
            List <PolyCountInfo> csCount = polyService.GetCountInfoByPoly("公共场所", "派出所", polygon);

            Console.Out.WriteLine("开始写入公共场所数据: ");
            foreach (PolyCountInfo ci in csCount)
            {
                List <PolyListInfo> csList = polyService.GetPageListInfoByPoly("公共场所", ci.Name, "派出所", polygon, 1, Convert.ToInt32(ci.Count));

                foreach (PolyListInfo listInfo in csList)
                {
                    CSDetail csDetail = gridService.GetCSDetail(listInfo.ID, ci.Name);

                    BeyonDBParameter param1 = new BeyonDBParameter("csid", BeyonDBType.VarChar);
                    param1.Value = listInfo.ID == null ? string.Empty : listInfo.ID;
                    BeyonDBParameter param2 = new BeyonDBParameter("csmc", BeyonDBType.VarChar);
                    param2.Value = listInfo.Name == null ? string.Empty : listInfo.Name;
                    BeyonDBParameter param3 = new BeyonDBParameter("cstype", BeyonDBType.VarChar);
                    param3.Value = ci.Name == null ? string.Empty : ci.Name;
                    BeyonDBParameter param4 = new BeyonDBParameter("jd", BeyonDBType.VarChar);
                    param4.Value = listInfo.JD == null ? 0 : listInfo.JD;
                    BeyonDBParameter param5 = new BeyonDBParameter("wd", BeyonDBType.VarChar);
                    param5.Value = listInfo.WD == null ? 0 : listInfo.WD;
                    BeyonDBParameter param6 = new BeyonDBParameter("dw", BeyonDBType.VarChar);
                    param6.Value = csDetail.GXDWMC == null ? string.Empty : csDetail.GXDWMC;
                    BeyonDBParameter param7 = new BeyonDBParameter("dz", BeyonDBType.VarChar);
                    param7.Value = csDetail.DZ == null ? string.Empty : csDetail.DZ;
                    dbOper.ExecuteScalar("insert into cs_ggcs (csid, csmc, cstype, jd, wd, gxdwmc, dz) values(?, ?, ?, ?, ?, ?, ?)", new BeyonDBParameter[] { param1, param2, param3, param4, param5, param6, param7 });
                }
            }
            Console.Out.WriteLine("完成公共场所数据写入.");
        }
示例#2
0
        public void Execute(List <System.Windows.Point> polygon)
        {
            //获取警员总数
            List <PolyCountInfo> jlCount = polyService.GetCountInfoByPoly("勤务信息", "派出所", polygon);

            foreach (PolyCountInfo ci in jlCount)
            {
                if (ci.Name.Equals("警员"))
                {
                    List <PolyListInfo> jlList = polyService.GetPageListInfoByPoly("勤务信息", ci.Name, "派出所", polygon, 1, Convert.ToInt32(ci.Count));

                    foreach (PolyListInfo listInfo in jlList)
                    {
                        //获取警员详细信息
                        PoliceManDetail pmDetail = gridService.GetPoliceManDetail(listInfo.ID);  //todo 目前无法访问 指挥调度平台

                        //todo
                        BeyonDBParameter param1 = new BeyonDBParameter("ajid", BeyonDBType.VarChar);
                        param1.Value = listInfo.ID == null ? string.Empty : listInfo.ID;
                        BeyonDBParameter param2 = new BeyonDBParameter("ajmc", BeyonDBType.VarChar);
                        param2.Value = listInfo.Name == null ? string.Empty : listInfo.Name;
                        BeyonDBParameter param3 = new BeyonDBParameter("ajtype", BeyonDBType.VarChar);
                        param3.Value = ci.Name == null ? string.Empty : ci.Name;

                        //插入警员信息到警员表 policeman
                        dbOper.ExecuteScalar("insert into policeman (ajid, ajmc, ajtype) values(?, ?, ?)", new BeyonDBParameter[] { param1, param2, param3 });
                    }
                }
            }
        }
        public void Execute(List <System.Windows.Point> polygon)
        {
            //获取案件总数
            List <PolyCountInfo> jsCount = polyService.GetCountInfoByPoly("监所管理", "派出所", polygon);

            foreach (PolyCountInfo js in jsCount)
            {
                List <PolyListInfo> jsList = polyService.GetListInfoByPoly("监所管理", js.Name, "派出所", polygon);

                foreach (PolyListInfo listInfo in jsList)
                {
                    //获取监所详细信息
                    string jscode = listInfo.ID.Split(new char[] { '|' })[0];
                    if (jscode.Equals(string.Empty))
                    {
                        continue;
                    }

                    JSDetail jsDetail = polyService.GetJSDetailByPoly(jscode);

                    BeyonDBParameter param1 = new BeyonDBParameter("jscode", BeyonDBType.VarChar);
                    param1.Value = jscode;
                    BeyonDBParameter param2 = new BeyonDBParameter("jsmc", BeyonDBType.VarChar);
                    param2.Value = listInfo.Name == null ? string.Empty : listInfo.Name;
                    BeyonDBParameter param3 = new BeyonDBParameter("gajgxz", BeyonDBType.VarChar);
                    param3.Value = jsDetail.GAJGXZ == null ? string.Empty : jsDetail.GAJGXZ;
                    BeyonDBParameter param4 = new BeyonDBParameter("dwld_xm", BeyonDBType.VarChar);
                    param4.Value = jsDetail.DWLD_XM == null ? string.Empty : jsDetail.DWLD_XM;
                    BeyonDBParameter param5 = new BeyonDBParameter("dwld_lxdh", BeyonDBType.VarChar);
                    param5.Value = jsDetail.DWLD_LXDH == null ? string.Empty : jsDetail.DWLD_LXDH;
                    BeyonDBParameter param6 = new BeyonDBParameter("rs", BeyonDBType.VarChar);
                    param6.Value = jsDetail.RS == null ? string.Empty : jsDetail.RS;
                    BeyonDBParameter param7 = new BeyonDBParameter("jd", BeyonDBType.VarChar);
                    param7.Value = listInfo.JD == null ? 0 : listInfo.JD;
                    BeyonDBParameter param8 = new BeyonDBParameter("wd", BeyonDBType.VarChar);
                    param8.Value = listInfo.WD == null ? 0 : listInfo.WD;
                    BeyonDBParameter param9 = new BeyonDBParameter("zp", BeyonDBType.VarChar);
                    param9.Value = jsDetail.zp == null ? string.Empty : jsDetail.zp;
                    BeyonDBParameter param10 = new BeyonDBParameter("jstype", BeyonDBType.VarChar);
                    param10.Value = js.Name == null ? string.Empty : js.Name;

                    //此处应先清空案件表,再插入。因这里原始.net api事务不好处理,请先手工清空表.
                    dbOper.ExecuteScalar("insert into prison (jscode, jsmc, gajgxz, dwld_xm, dwld_lxdh, rs, jd, wd, zp, jstype) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new BeyonDBParameter[] { param1, param2, param3, param4, param5, param6, param7, param8, param9, param10 });

                    ////获取监所内服刑人员,并写入监所人员表
                    //List<JSPerson> jpList =  polyService.GetJSPersonListByPoly(js.Name, listInfo.ID);

                    //foreach(JSPerson jp in jpList)
                    //{
                    //    JSPersonDetail jpDetail = polyService.GetJSPersonDetailByPoly(jp.JBXXBH, js.Name);

                    //    //写入监所服刑人员信息
                    //    dbOper.ExecuteScalar("insert into anjian (ajid, ajmc, ajtype) values(?, ?, ?)", new BeyonDBParameter[] { param1, param2, param3 });

                    //}
                }
            }
        }
        public void Execute(List <System.Windows.Point> polygon)
        {
            //获取案件总数
            List <PolyCountInfo> ajCount = polyService.GetCountInfoByPoly("案件管理", "派出所", polygon);

            foreach (PolyCountInfo ci in ajCount)
            {
                List <PolyListInfo> ajList = polyService.GetPageListInfoByPoly("案件管理", ci.Name, "派出所", polygon, 1, Convert.ToInt32(ci.Count));
                //List<PolyListInfo> ajList = polyService.GetListInfoByPoly("案件管理", ci.Name, "派出所", polygon);

                foreach (PolyListInfo listInfo in ajList)
                {
                    BeyonDBParameter param1 = new BeyonDBParameter("ajid", BeyonDBType.VarChar);
                    param1.Value = listInfo.ID == null ? string.Empty : listInfo.ID;
                    BeyonDBParameter param2 = new BeyonDBParameter("ajmc", BeyonDBType.VarChar);
                    param2.Value = listInfo.Name == null ? string.Empty : listInfo.Name;
                    BeyonDBParameter param3 = new BeyonDBParameter("ajtype", BeyonDBType.VarChar);
                    param3.Value = ci.Name == null ? string.Empty : ci.Name;

                    //此处应先清空案件表,再插入。因这里原始.net api事务不好处理,请先手工清空表.
                    dbOper.ExecuteScalar("insert into anjian (ajid, ajmc, ajtype) values(?, ?, ?)", new BeyonDBParameter[] { param1, param2, param3 });
                }
            }
        }