警情代码调试

develop
fengchunyu 9 months ago
parent de41501855
commit 0112dcd450

@ -3,6 +3,9 @@ package com.ssf.mysqloracletest.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ssf.mysqloracletest.domain.JcjJjxxViewMysql; import com.ssf.mysqloracletest.domain.JcjJjxxViewMysql;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper @Mapper
public interface JcjJxxViewMysqlMapper extends BaseMapper<JcjJjxxViewMysql> { public interface JcjJxxViewMysqlMapper extends BaseMapper<JcjJjxxViewMysql> {
@ -16,5 +19,9 @@ public interface JcjJxxViewMysqlMapper extends BaseMapper<JcjJjxxViewMysql> {
public int countJjxx(); public int countJjxx();
public JcjJjxxViewMysql selectloaction(JcjJjxxViewMysql bean); @Select(" select * " +
" from jcj_jjxx_view " +
" where JDZB BETWEEN #{LEFTTOPLONGITUDE} AND #{RIGHTBOTTOMLONGITUDE} " +
" AND WDZB BETWEEN #{RIGHTBOTTOMLATITUDE} AND #{LEFTTOPLATITUDE}")
public List<JcjJjxxViewMysql> selectloaction(JcjJjxxViewMysql bean);
} }

@ -3,6 +3,8 @@ package com.ssf.mysqloracletest.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ssf.mysqloracletest.domain.JcjJjxxViewMysql; import com.ssf.mysqloracletest.domain.JcjJjxxViewMysql;
import java.util.List;
/** /**
* @author 10503 * @author 10503
* @description jcj_jjxx_viewService * @description jcj_jjxx_viewService
@ -19,6 +21,6 @@ public interface JcjJjxxViewMysqlService extends IService<JcjJjxxViewMysql>{
public int countJjxx(); public int countJjxx();
public JcjJjxxViewMysql selectloaction(JcjJjxxViewMysql bean); public List<JcjJjxxViewMysql> selectloaction(JcjJjxxViewMysql bean);
} }

@ -9,6 +9,8 @@ import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/** /**
* @author 10503 * @author 10503
* @description jcj_jjxx_viewService * @description jcj_jjxx_viewService
@ -47,7 +49,7 @@ public class JcjJjxxViewMysqlServiceImpl extends ServiceImpl<JcjJxxViewMysqlMapp
} }
@Override @Override
public JcjJjxxViewMysql selectloaction(JcjJjxxViewMysql bean) { public List<JcjJjxxViewMysql> selectloaction(JcjJjxxViewMysql bean) {
return jcxxMapper.selectloaction(bean); return jcxxMapper.selectloaction(bean);
} }

@ -83,55 +83,56 @@ public class AlarmInfoTask {
jjxxViewMysqlCp.setRIGHTBOTTOMLONGITUDE("120.439581"); jjxxViewMysqlCp.setRIGHTBOTTOMLONGITUDE("120.439581");
jjxxViewMysqlCp.setRIGHTBOTTOMLATITUDE("33.823756"); jjxxViewMysqlCp.setRIGHTBOTTOMLATITUDE("33.823756");
jjxxViewMysqlCp.setLEFTTOPLATITUDE("33.833082"); jjxxViewMysqlCp.setLEFTTOPLATITUDE("33.833082");
JcjJjxxViewMysql selectloaction = jjxxViewMysqlService.selectloaction(jjxxViewMysqlCp); List<JcjJjxxViewMysql> selectloaction = jjxxViewMysqlService.selectloaction(jjxxViewMysqlCp);
System.out.println();
try { try {
BeanUtils.copyProperties(bean, selectloaction); // BeanUtils.copyProperties(bean, selectloaction);
JcjJjxxViewMysql jwd = jjxxViewMysqlService.selectJcjJxxByJJBH(selectloaction.getJJBH()); // JcjJjxxViewMysql jwd = jjxxViewMysqlService.selectJcjJxxByJJBH(selectloaction.getJJBH());
MetaAlarmInfo alarmInfo = new MetaAlarmInfo(); // MetaAlarmInfo alarmInfo = new MetaAlarmInfo();
//设置目标字段的值 // //设置目标字段的值
//alarm_code<-----JJBH 接警编号 // //alarm_code<-----JJBH 接警编号
alarmInfo.setAlarmCode(selectloaction.getJJBH()); // alarmInfo.setAlarmCode(selectloaction.getJJBH());
//police_receiver_name<-----JJRXM接警人姓名 // //police_receiver_name<-----JJRXM接警人姓名
alarmInfo.setPoliceReceiverName(selectloaction.getJJRXM()); // alarmInfo.setPoliceReceiverName(selectloaction.getJJRXM());
//alarm_response_time<-----JJRQSJ接警日期时间 // //alarm_response_time<-----JJRQSJ接警日期时间
alarmInfo.setAlarmResponseTime(selectloaction.getJJRQSJ()); // alarmInfo.setAlarmResponseTime(selectloaction.getJJRQSJ());
//alarm_response_content<-----BJNR接警报警内容 // //alarm_response_content<-----BJNR接警报警内容
alarmInfo.setAlarmResponseContent(selectloaction.getBJNR()); // alarmInfo.setAlarmResponseContent(selectloaction.getBJNR());
//informant_name<-----BJR接警报警人 // //informant_name<-----BJR接警报警人
alarmInfo.setInformantName(selectloaction.getBJR()); // alarmInfo.setInformantName(selectloaction.getBJR());
//informant_time<-----BJDHSJ接警报警时间 // //informant_time<-----BJDHSJ接警报警时间
alarmInfo.setInformantTime(selectloaction.getBJDHSJ()); // alarmInfo.setInformantTime(selectloaction.getBJDHSJ());
//informant_phone<-----LXDH接警报警人联系电话 // //informant_phone<-----LXDH接警报警人联系电话
alarmInfo.setInformantPhone(selectloaction.getLXDH()); // alarmInfo.setInformantPhone(selectloaction.getLXDH());
//alarm_response_type<-----BJLXMC报警类型名称 // //alarm_response_type<-----BJLXMC报警类型名称
alarmInfo.setAlarmResponseTypeName(selectloaction.getBJLXMC()); // alarmInfo.setAlarmResponseTypeName(selectloaction.getBJLXMC());
//alarm_address<-----SFDD接警事发地址 // //alarm_address<-----SFDD接警事发地址
alarmInfo.setAlarmAddress(selectloaction.getSFDD()); // alarmInfo.setAlarmAddress(selectloaction.getSFDD());
//alarm_response_unit<-----JJDWMC接警单位名称 // //alarm_response_unit<-----JJDWMC接警单位名称
alarmInfo.setAlarmResponseUnit(selectloaction.getJJDWMC()); // alarmInfo.setAlarmResponseUnit(selectloaction.getJJDWMC());
//
if (jwd.getGIS_Y() != null) { // if (jwd.getGIS_Y() != null) {
//latitude(纬度)<-----WDZB纬度坐标 // //latitude(纬度)<-----WDZB纬度坐标
alarmInfo.setLatitude(NumKit.checkBigDecimal(jwd.getGIS_Y())); // alarmInfo.setLatitude(NumKit.checkBigDecimal(jwd.getGIS_Y()));
} // }
//
if (jwd.getGIS_X() != null) { // if (jwd.getGIS_X() != null) {
//longitude(经度)<-----JDZB经度坐标 // //longitude(经度)<-----JDZB经度坐标
alarmInfo.setLongitude(NumKit.checkBigDecimal(jwd.getGIS_X())); // alarmInfo.setLongitude(NumKit.checkBigDecimal(jwd.getGIS_X()));
} // }
//
boolean b = alarmInfoService.save(alarmInfo); // boolean b = alarmInfoService.save(alarmInfo);
//
if (b) { // if (b) {
selectloaction.setSTATUS("1"); // selectloaction.setSTATUS("1");
jjxxViewMysqlService.updateJjxxByJJBH(selectloaction); // jjxxViewMysqlService.updateJjxxByJJBH(selectloaction);
logger.info("状态修改为1"); // logger.info("状态修改为1");
} // }
} catch (Exception e) { } catch (Exception e) {
logger.info(StringKit.getTrace(e)); // logger.info(StringKit.getTrace(e));
selectloaction.setSTATUS("2"); // selectloaction.setSTATUS("2");
jjxxViewMysqlService.updateJjxxByJJBH(selectloaction); // jjxxViewMysqlService.updateJjxxByJJBH(selectloaction);
logger.info("状态修改为2"); // logger.info("状态修改为2");
} }
} }
} }

@ -579,11 +579,11 @@
limit 1 limit 1
</select> </select>
<select id="selectloaction" parameterMap="map" resultMap="BaseResultMap"> <select id="selectloaction" parameterType="com.ssf.mysqloracletest.domain.JcjJjxxViewMysql" resultMap="BaseResultMap">
select * select *
from jcj_jjxx_view from jcj_jjxx_view
where JDZB BETWEEN #{leftTopLongitude} AND #{rightBottomLongitude} where JDZB BETWEEN #{LEFTTOPLONGITUDE} AND #{RIGHTBOTTOMLONGITUDE}
AND WDZB BETWEEN #{rightBottomLatitude} AND #{leftTopLatitude}; AND WDZB BETWEEN #{RIGHTBOTTOMLATITUDE} AND #{LEFTTOPLATITUDE}
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save