| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 | package org.jeecg.modules.demo.hzz.shjsgc.lhgc.lhb.service.impl;import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;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.hzz.shjsgc.lhgc.lhb.geo.service.IRmLhbgeoService;import org.jeecg.modules.demo.hzz.shjsgc.lhgc.lhb.mapper.RmLhbqktjbMapper;import org.jeecg.modules.demo.hzz.shjsgc.lhgc.lhb.service.IRmLhbqktjbService;import org.jeecg.modules.demo.hzz.shjsgc.lhgc.ql.entity.RmQlqktjb;import org.jeecg.modules.demo.hzz.shjsgc.lhgc.ql.geo.entity.RmQlgeo;import org.jeecg.modules.demo.hzz.shjsgc.lhgc.sz.geo.service.IRmSzgeoService;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-18 * @Version: V1.0 */@Servicepublic class RmLhbqktjbServiceImpl extends ServiceImpl<RmLhbqktjbMapper, RmLhbqktjb> implements IRmLhbqktjbService {    @Autowired    private IRmLhbgeoService rmLhbgeoService;    @Autowired    private RmLhbqktjbMapper rmLhbqktjbMapper;    @Autowired    private org.jeecg.modules.demo.untils.zbzh zbzh;    @Override    public void GenaratelhbgcGeo() {        LambdaQueryWrapper<RmLhbqktjb> queryWrapper = new LambdaQueryWrapper<>();        queryWrapper.eq(RmLhbqktjb::getFlag, 0);        List<RmLhbqktjb> dataList = this.baseMapper.selectList(queryWrapper);        for (RmLhbqktjb rmLhbqktjb : dataList) {            String a = rmLhbqktjb.getJd();            String b = rmLhbqktjb.getWd();            if (a != null && b != null) {                Double jd = zbzh.tranformPos(a);                Double wd = zbzh.tranformPos(b);                if (jd > 180 && wd > 90) {                    rmLhbgeoService.addlhbgc("POINT(" + jd + " " + wd + ")", rmLhbqktjb.getId());                } else {                    rmLhbgeoService.addlhbgc2("POINT(" + jd + " " + wd + ")", rmLhbqktjb.getId());                }                rmLhbqktjb.setFlag(1);                this.updateById(rmLhbqktjb);            }        }    }    @Override    public void delete(String id) {        try {            LambdaQueryWrapper<RmLhbgeo> queryWrapper = new LambdaQueryWrapper<>();            queryWrapper.eq(RmLhbgeo::getLhbid, id);            Integer lhbgeoid = rmLhbgeoService.getOne(queryWrapper).getId();            rmLhbgeoService.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) {        rmLhbqktjbMapper.insertshxm(id, xzqh, xmmc, xmid, xmlx, gldw, zgbm, bz, geoinfo, sfwpgblxm, szhl, spzt);    }    @Override    public void deshxm(String xmid) {        rmLhbqktjbMapper.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) {        rmLhbqktjbMapper.updateshxm(xmmc, xzqh, gldw, zgbm, bz, geoinfo, sfwpgblxm, szhl, spzt, id);    }    @Override    public int deleteMany(String[] ids) {        return rmLhbqktjbMapper.deleteMany(ids);    }}
 |