9c299519df1f38b03dbce30bd28778e26fda56c6.svn-base 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. package org.jeecg.modules.demo.hzz.shjsgc.lhgc.ql.service.impl;
  2. import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  3. import io.netty.util.internal.StringUtil;
  4. import org.jeecg.modules.demo.hzz.shjsgc.dfgc.mapper.RmDfgcMapper;
  5. import org.jeecg.modules.demo.hzz.shjsgc.lhgc.ql.entity.RmQlqktjb;
  6. import org.jeecg.modules.demo.hzz.shjsgc.lhgc.ql.geo.entity.RmQlgeo;
  7. import org.jeecg.modules.demo.hzz.shjsgc.lhgc.ql.geo.service.impl.RmQlgeoServiceImpl;
  8. import org.jeecg.modules.demo.hzz.shjsgc.lhgc.ql.mapper.RmQlqktjbMapper;
  9. import org.jeecg.modules.demo.hzz.shjsgc.lhgc.ql.service.IRmQlqktjbService;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.stereotype.Service;
  12. import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  13. import java.util.List;
  14. /**
  15. * @Description: 桥梁情况统计表
  16. * @Author: jeecg-boot
  17. * @Date: 2022-01-19
  18. * @Version: V1.0
  19. */
  20. @Service
  21. public class RmQlqktjbServiceImpl extends ServiceImpl<RmQlqktjbMapper, RmQlqktjb> implements IRmQlqktjbService {
  22. @Autowired
  23. private RmQlgeoServiceImpl rmQlgeoService;
  24. @Autowired
  25. private org.jeecg.modules.demo.untils.zbzh zbzh;
  26. @Autowired
  27. private RmQlqktjbMapper rmQlqktjbMapper;
  28. @Override
  29. public void GenarateQlgcGeo() {
  30. LambdaQueryWrapper<RmQlqktjb> queryWrapper = new LambdaQueryWrapper<>();
  31. queryWrapper.eq(RmQlqktjb::getFlag, 0);
  32. List<RmQlqktjb> dataList = this.baseMapper.selectList(queryWrapper);
  33. for (RmQlqktjb rmQlqktjb : dataList) {
  34. String a = rmQlqktjb.getJd();
  35. String b = rmQlqktjb.getWd();
  36. if (StringUtil.isNullOrEmpty(a) || StringUtil.isNullOrEmpty(b)) {
  37. continue;
  38. }
  39. Double jd = zbzh.tranformPos(a);
  40. Double wd = zbzh.tranformPos(b);
  41. if (jd > 180 && wd > 90) {
  42. rmQlgeoService.addqlgc("POINT(" + jd + " " + wd + ")", rmQlqktjb.getId());
  43. } else {
  44. rmQlgeoService.addqlgc2("POINT(" + jd + " " + wd + ")", rmQlqktjb.getId());
  45. }
  46. rmQlqktjb.setFlag(1);
  47. this.updateById(rmQlqktjb);
  48. }
  49. }
  50. @Override
  51. public void delete(String id) {
  52. try {
  53. LambdaQueryWrapper<RmQlgeo> queryWrapper = new LambdaQueryWrapper<>();
  54. queryWrapper.eq(RmQlgeo::getQlid, id);
  55. Integer qlgeoid = rmQlgeoService.getOne(queryWrapper).getId();
  56. rmQlgeoService.removeById(qlgeoid);
  57. } catch (Exception e) {
  58. }
  59. }
  60. @Override
  61. public void insertshxm(String id, String xzqh, String xmmc, String xmid, String xmlx, String gldw, String zgbm, String bz, String geoinfo, String sfwpgblxm, String szhl, String spzt) {
  62. rmQlqktjbMapper.insertshxm(id, xzqh, xmmc, xmid, xmlx, gldw, zgbm, bz, geoinfo, sfwpgblxm, szhl, spzt);
  63. }
  64. @Override
  65. public void deshxm(String id) {
  66. rmQlqktjbMapper.deshxm(id);
  67. }
  68. @Override
  69. public void updateshxm(String xmmc, String jszt, String gldw, String zgbm, String bz, String geoinfo, String sfwpgblxm, String szhl, String spzt, String id) {
  70. rmQlqktjbMapper.updateshxm(xmmc, jszt, gldw, zgbm, bz, geoinfo, sfwpgblxm, szhl, spzt, id);
  71. }
  72. @Override
  73. public int deleteMany(String[] ids) {
  74. return rmQlqktjbMapper.deleteMany(ids);
  75. }
  76. @Override
  77. public List<String> selectid(String[] id) {
  78. List<String> selectid = rmQlqktjbMapper.selectid(id);
  79. return selectid;
  80. }
  81. }