123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- package org.jeecg.modules.demo.hzz.shjsgc.lhgc.gx.service.impl;
- import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
- import org.jeecg.modules.demo.hzz.shjsgc.lhgc.gx.entity.RmGxqktjb;
- import org.jeecg.modules.demo.hzz.shjsgc.lhgc.gx.geo.entity.RmGxgeo;
- import org.jeecg.modules.demo.hzz.shjsgc.lhgc.gx.geo.service.IRmGxgeoService;
- import org.jeecg.modules.demo.hzz.shjsgc.lhgc.gx.mapper.RmGxqktjbMapper;
- import org.jeecg.modules.demo.hzz.shjsgc.lhgc.gx.service.IRmGxqktjbService;
- import org.jeecg.modules.demo.hzz.shjsgc.lhgc.lhb.entity.RmLhbqktjb;
- import org.jeecg.modules.demo.hzz.shjsgc.lhgc.lhb.geo.entity.RmLhbgeo;
- import org.jeecg.modules.demo.untils.zbzh;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
- import java.util.List;
- /**
- * @Description: 管线情况统计表
- * @Author: jeecg-boot
- * @Date: 2022-01-19
- * @Version: V1.0
- */
- @Service
- public class RmGxqktjbServiceImpl extends ServiceImpl<RmGxqktjbMapper, RmGxqktjb> implements IRmGxqktjbService {
- @Autowired private IRmGxgeoService rmGxgeoService;
- @Autowired private org.jeecg.modules.demo.untils.zbzh zbzh;
- @Autowired private RmGxqktjbMapper rmGxqktjbMapper;
- @Override
- public void GenarategxgcGeo() {
- LambdaQueryWrapper<RmGxqktjb> queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(RmGxqktjb::getFlag,0);
- List<RmGxqktjb> dataList = this.baseMapper.selectList(queryWrapper);
- for(RmGxqktjb rmGxqktjb : dataList){
- String a = rmGxqktjb.getJd();
- String b = rmGxqktjb.getWd();
- if(a!=null&&b!=null){
- Double jd = zbzh.tranformPos(a);
- Double wd = zbzh.tranformPos(b);
- if(jd>180&&wd>90){
- rmGxgeoService.addgxgc("POINT("+jd+" "+wd+")",rmGxqktjb.getId());
- } else{
- rmGxgeoService.addgxgc2("POINT("+jd+" "+wd+")",rmGxqktjb.getId());
- }
- rmGxqktjb.setFlag(1);
- this.updateById(rmGxqktjb);
- }}
- }
- @Override
- public void delete(String id) {
- try{
- LambdaQueryWrapper<RmGxgeo> queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(RmGxgeo::getGxid,id);
- Integer lhbgeoid=rmGxgeoService.getOne(queryWrapper).getId();
- rmGxgeoService.removeById(lhbgeoid);
- }catch ( Exception e){
- }
- }
- @Override
- 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) {
- rmGxqktjbMapper.insertshxm(id, xzqh, xmmc, xmid, xmlx, gldw, zgbm, bz,geoinfo,sfwpgblxm,szhl,spzt);
- }
- @Override
- public void deshxm(String xmid) {
- rmGxqktjbMapper.deshxm(xmid);
- }
- @Override
- public void updateshxm(String xmmc, String xzqh, String gldw, String zgbm, String bz,String geoinfo,String sfwpgblxm,String szhl,String spzt, String id) {
- rmGxqktjbMapper.updateshxm(xmmc, xzqh, gldw, zgbm, bz,geoinfo,sfwpgblxm,szhl, spzt,id);
- }
- @Override
- public int deleteMany(String[] ids) {
- return rmGxqktjbMapper.deleteMany(ids);
- }
- }
|