| | |
| | | return R.status(jurisdictionService.removeDept(ids)); |
| | | } |
| | | |
| | | // public static void main(String[] args) { |
| | | // String a="115.869069,28.674754,115.869831,28.677050,115.873817,28.682865,115.874326,28.683390,115.874825,28.682811,115.875120,28.683138,115.875249,28.684066,115.876510,28.688159,115.876729,28.688631,115.878768,28.691845,115.878885,28.692057,115.880119,28.693950,115.886497,28.699937,115.887323,28.700522,115.890145,28.701734,115.894233,28.704473,115.899220,28.707495,115.900238,28.706362,115.900955,28.707227,115.902597,28.708461,115.903712,28.709901,115.906123,28.711585,115.907924,28.712977,115.909190,28.714361,115.909088,28.714517,115.909292,28.714882,115.910343,28.715580,115.910851,28.715751,115.911534,28.716170,115.913326,28.716835,115.915245,28.718036,115.915772,28.718380,115.916517,28.718736,115.917004,28.718964,115.916875,28.719286,115.917192,28.719420,115.917449,28.719087,115.918560,28.719592,115.921360,28.720462,115.923161,28.720989,115.923705,28.721209,115.926127,28.722169,115.928798,28.722919,115.927730,28.721763,115.928199,28.720312,115.928054,28.718902,115.926536,28.719003,115.926691,28.720012,115.926364,28.719985,115.925951,28.719926,115.925956,28.719738,115.926042,28.719626,115.926018,28.719112,115.926155,28.719091,115.926096,28.717314,115.926423,28.716740,115.925736,28.715822,115.925602,28.715881,115.926171,28.716622,115.925296,28.716616,115.925339,28.718349,115.924358,28.718354,115.924358,28.719738,115.924969,28.719733,115.924980,28.720564,115.925978,28.720554,115.926015,28.720961,115.926766,28.720956,115.926750,28.720323,115.928199,28.720312,115.927730,28.721763,115.926127,28.722169,115.923705,28.721209,115.923057,28.717146,115.922134,28.716846,115.917462,28.716886,115.917960,28.713420,115.916925,28.713131,115.916761,28.714254,115.916035,28.713233,115.914640,28.712605,115.913889,28.712777,115.915277,28.709667,115.916719,28.710654,115.917277,28.709490,115.918900,28.710254,115.919308,28.710618,115.922225,28.712507,115.923059,28.713050,115.923857,28.713544,115.924757,28.714220,115.926602,28.716387,115.927443,28.711016,115.926946,28.708822,115.926924,28.707654,115.925508,28.705164,115.924757,28.703491,115.923293,28.703067,115.923305,28.703332,115.922773,28.702946,115.922440,28.702539,115.921860,28.701130,115.919843,28.698620,115.920616,28.697869,115.921199,28.697920,115.921527,28.697456,115.921646,28.696946,115.921248,28.696652,115.921646,28.696946,115.920895,28.696782,115.920079,28.697332,115.919564,28.698362,115.918101,28.697303,115.918814,28.696589,115.919910,28.694836,115.921485,28.695112,115.922772,28.695112,115.923824,28.695483,115.923845,28.695895,115.924467,28.696624,115.925090,28.696689,115.925669,28.696860,115.925948,28.696538,115.925936,28.696002,115.925556,28.695665,115.924532,28.695938,115.924274,28.695530,115.925261,28.694940,115.925572,28.693702,115.925385,28.692829,115.922558,28.690530,115.922057,28.688684,115.921430,28.687514,115.922799,28.677375,115.915031,28.677235,115.914887,28.677414,115.900717,28.677284,115.900611,28.675572,115.900043,28.675129,115.898549,28.675353,115.898429,28.678685,115.896610,28.678669,115.893939,28.678142,115.891090,28.678731,115.886779,28.678705,115.879884,28.678396,115.872357,28.676395,115.870437,28.675215,115.870164,28.675191,115.869069,28.674754;115.904626,28.718526,115.898135,28.717697,115.896912,28.717654,115.896161,28.716924,115.894359,28.716173,115.891741,28.715913,115.891336,28.716859,115.890586,28.717513,115.888597,28.718220,115.890550,28.722125,115.893071,28.723834,115.893286,28.724885,115.893758,28.725679,115.892308,28.728358,115.892200,28.729366,115.892823,28.731233,115.892587,28.732435,115.893703,28.736254,115.894523,28.736936,115.894196,28.737928,115.894947,28.738507,115.895290,28.739172,115.894754,28.740009,115.895757,28.741088,115.895641,28.751729,115.899735,28.757263,115.906960,28.762506,115.909876,28.762945,115.912557,28.763256,115.917821,28.764145,115.918476,28.763801,115.919055,28.762889,115.920965,28.763340,115.923737,28.765032,115.926758,28.766866,115.934129,28.770500,115.939493,28.773118,115.946317,28.773483,115.950201,28.775393,115.951424,28.776337,115.955286,28.777775,115.956874,28.780049,115.959556,28.781637,115.966272,28.784598,115.968332,28.783697,1115.969255,28.785328,115.969405,28.787259,115.970757,28.788675,115.975199,28.789533,115.977173,28.788718,115.978552,28.788606,115.979941,28.785113,115.975392,28.783783,115.970650,28.781122,115.970650,28.780714,115.968997,28.778611,115.966938,28.776916,115.957652,28.770013,115.951460,28.765599,115.950179,28.764299,115.948082,28.763371,115.946169,28.762001,115.942283,28.759345,115.941145,28.757913,115.940534,28.757457,115.941891,28.756427,115.934338,28.748589,115.932911,28.750382,115.931747,28.748592,115.929129,28.745846,115.928915,28.745052,115.923994,28.738108,115.919838,28.731844,115.917419,28.730005,115.918572,28.729173,115.913465,28.724474,115.912462,28.725005,115.911899,28.723851,115.909528,28.721558,115.905347,28.718833,115.904626,28.718526"; |
| | | // a=a.replaceAll(",28"," 28"); |
| | | // System.out.printf(a); |
| | | // } |
| | | |
| | | |
| | | @PostMapping("/Test") |
| | | public void Test() { |
| | | List<Map<String, Object>> test = jurisdictionService.Test(); |
| | | for (int i = 0; i < test.size(); i++) { |
| | | //名称 |
| | | String wgmc = test.get(i).get("wgmc").toString(); |
| | | //空间信息 |
| | | String wgbj = test.get(i).get("wgbj").toString(); |
| | | wgbj = wgbj.replaceAll(",28", " 28"); |
| | | wgbj = wgbj.replaceAll(",29", " 29"); |
| | | wgbj = wgbj.replaceAll(";", ","); |
| | | //wgbj = wgbj.replaceAll(",115", ", 115"); |
| | | //wgbj = wgbj.replaceAll(",116", ", 116"); |
| | | String context = "'POLYGON((" + wgbj + "))'"; |
| | | jurisdictionService.update(context, wgmc); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/isOnArea") |
| | | public R isOnArea(String jd, String wd) { |
| | | return R.data(jurisdictionService.isOnArea(jd, wd)); |
| | | |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<String> getDeptNames(Long[] ids); |
| | | |
| | | List<Map<String, Object>> Test(); |
| | | void update(String space,String deptname); |
| | | List<Map<String, Object>> isOnArea(String jd,String wd); |
| | | } |
| | |
| | | |
| | | <select id="lazyList" resultMap="deptVOResultMap"> |
| | | SELECT |
| | | dept.* , |
| | | ( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | dept.* , |
| | | ( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | sys_jurisdiction |
| | | WHERE |
| | | parent_id = dept.id and is_deleted = 0 |
| | | ) AS "has_children" |
| | | WHERE |
| | | parent_id = dept.id and is_deleted = 0 |
| | | ) AS "has_children" |
| | | FROM |
| | | sys_jurisdiction dept |
| | | WHERE dept.is_deleted = 0 |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="lazyTree" resultMap="treeNodeResultMap" > |
| | | SELECT |
| | | dept.id, |
| | | dept.parent_id, |
| | | dept.dept_name AS title, |
| | | dept.id AS "value", |
| | | dept.id AS "key", |
| | | ( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | sys_jurisdiction |
| | | WHERE |
| | | parent_id = dept.id and is_deleted = 0 |
| | | ) AS "has_children" |
| | | FROM |
| | | sys_jurisdiction dept |
| | | WHERE dept.is_deleted = 0 |
| | | <if test="param1!=null and param1!=''"> |
| | | and dept.tenant_id = #{param1} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="lazyTrees" resultMap="treeNodeResultMap" > |
| | | <select id="lazyTree" resultMap="treeNodeResultMap"> |
| | | SELECT |
| | | dept.id, |
| | | dept.parent_id, |
| | |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | sys_jurisdiction |
| | | sys_jurisdiction |
| | | WHERE |
| | | parent_id = dept.id and is_deleted = 0 |
| | | ) AS "has_children" |
| | | FROM |
| | | sys_jurisdiction dept |
| | | sys_jurisdiction dept |
| | | WHERE dept.is_deleted = 0 |
| | | <if test="param1!=null and param1!=''"> |
| | | and dept.tenant_id = #{param1} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="lazyTrees" resultMap="treeNodeResultMap"> |
| | | SELECT dept.id, |
| | | dept.parent_id, |
| | | dept.dept_name AS title, |
| | | dept.id AS "value", |
| | | dept.id AS "key", |
| | | ( |
| | | SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM sys_jurisdiction |
| | | WHERE parent_id = dept.id |
| | | and is_deleted = 0 |
| | | ) AS "has_children" |
| | | FROM sys_jurisdiction dept |
| | | WHERE dept.is_deleted = 0 |
| | | </select> |
| | | |
| | | <select id="Test" resultType="java.util.HashMap"> |
| | | SELECT wgmc, wgbj |
| | | FROM nb_wgxx |
| | | WHERE wgbj is NOT NULL |
| | | and wglx = 'W3' |
| | | </select> |
| | | |
| | | |
| | | <update id="update"> |
| | | update sys_jurisdiction |
| | | set space=ST_GeomFromText(${space}) |
| | | where dept_name = #{deptname} |
| | | </update> |
| | | |
| | | |
| | | <!-- <!–判断打卡点是否在电子围栏内–>--> |
| | | <!-- <select id="isOnArea" resultType="java.util.HashMap">--> |
| | | <!-- select id,dept_name from sys_jurisdiction--> |
| | | <!-- where--> |
| | | <!-- MBRWithin(ST_GeomFromText('POINT(${jd} ${wd})'),space)--> |
| | | <!-- </select>--> |
| | | <!--判断打卡点是否在电子围栏内--> |
| | | <select id="isOnArea" resultType="java.util.HashMap"> |
| | | select id, dept_name |
| | | from sys_jurisdiction |
| | | where MBRWithin(ST_GeomFromText('POINT(${jd} ${wd})'), space) LIMIT 0,1; |
| | | </select> |
| | | </mapper> |
| | |
| | | * @return |
| | | */ |
| | | boolean submit(Jurisdiction jurisdiction); |
| | | List<Map<String, Object>> Test(); |
| | | void update(String space,String deptname); |
| | | List<Map<String, Object>> isOnArea(String jd,String wd); |
| | | } |
| | |
| | | return saveOrUpdate(dept); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> Test() { |
| | | return baseMapper.Test(); |
| | | } |
| | | |
| | | @Override |
| | | public void update(String space, String deptname) { |
| | | baseMapper.update(space, deptname); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> isOnArea(String jd, String wd) { |
| | | return baseMapper.isOnArea(jd, wd); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | private String stype; |
| | | |
| | | /** |
| | | * 地址 |
| | | * 居住地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 工作地点 |
| | | */ |
| | | private String workaddress; |
| | | /** |
| | | * 工作辖区 |
| | | */ |
| | | private String workjurisdiction; |
| | | |
| | | } |
| | |
| | | user.setPhone(zc.getPhone()); |
| | | user.setDeptId(zc.getDeptid()); |
| | | user.setRoleId(zc.getParentId()); |
| | | user.setWorkaddress(zc.getWorkaddress()); |
| | | user.setWorkjurisdiction(zc.getWorkjurisdiction()); |
| | | user.setJurisdiction(zc.getJurisdiction()); |
| | | user.setExamination_type("0"); |
| | | user.setExamination_mx("正常"); |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 账号 |
| | | */ |
| | | @ApiModelProperty(value = "账号") |
| | | private String username; |
| | | * 账号 |
| | | */ |
| | | @ApiModelProperty(value = "账号") |
| | | private String username; |
| | | /** |
| | | * 密码 |
| | | */ |
| | | @ApiModelProperty(value = "密码") |
| | | private String password; |
| | | * 密码 |
| | | */ |
| | | @ApiModelProperty(value = "密码") |
| | | private String password; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @ApiModelProperty(value = "姓名") |
| | | private String sname; |
| | | * 姓名 |
| | | */ |
| | | @ApiModelProperty(value = "姓名") |
| | | private String sname; |
| | | /** |
| | | * 性别 |
| | | */ |
| | | @ApiModelProperty(value = "性别") |
| | | private String sex; |
| | | * 性别 |
| | | */ |
| | | @ApiModelProperty(value = "性别") |
| | | private String sex; |
| | | /** |
| | | * 手机号码 |
| | | */ |
| | | @ApiModelProperty(value = "手机号码") |
| | | private String phone; |
| | | * 手机号码 |
| | | */ |
| | | @ApiModelProperty(value = "手机号码") |
| | | private String phone; |
| | | |
| | | /** |
| | | * 注册时间 |
| | |
| | | @ApiModelProperty(value = "角色id") |
| | | private String parentId; |
| | | /** |
| | | * 辖区id |
| | | * 居住地辖区id |
| | | */ |
| | | @ApiModelProperty(value = "辖区id") |
| | | private String jurisdiction; |
| | |
| | | /** |
| | | * 审查时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("audit_time") |
| | | private Date auditTime; |
| | | |
| | | /** |
| | | * 居住地地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 工作地点 |
| | | */ |
| | | private String workaddress; |
| | | /** |
| | | * 工作辖区 |
| | | */ |
| | | private String workjurisdiction; |
| | | |
| | | } |