New file |
| | |
| | | package com.dy.pipIrrGlobal.daoOp; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeInspect; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:07 |
| | | * @LastEditTime 2024-09-24 10:07 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface OpeInspectMapper extends BaseMapper<OpeInspect> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(OpeInspect record); |
| | | |
| | | int insertSelective(OpeInspect record); |
| | | |
| | | OpeInspect selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(OpeInspect record); |
| | | |
| | | int updateByPrimaryKey(OpeInspect record); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoOp; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeTrack; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:08 |
| | | * @LastEditTime 2024-09-24 10:08 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface OpeTrackMapper extends BaseMapper<OpeTrack> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(OpeTrack record); |
| | | |
| | | int insertSelective(OpeTrack record); |
| | | |
| | | OpeTrack selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(OpeTrack record); |
| | | |
| | | int updateByPrimaryKey(OpeTrack record); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoOp; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:07 |
| | | * @LastEditTime 2024-09-24 10:07 |
| | | * @Description |
| | | */ |
| | | /** |
| | | * 巡检表 |
| | | */ |
| | | |
| | | @TableName(value = "ope_inspect", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | public class OpeInspect implements BaseEntity { |
| | | public static final long serialVersionUID = 202409241013001L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 巡检员ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @NotNull(message = "巡检员ID不能为空") |
| | | private Long inspectorId; |
| | | |
| | | /** |
| | | * 开始巡检时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束巡检时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date stopTime; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoOp; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:08 |
| | | * @LastEditTime 2024-09-24 10:08 |
| | | * @Description |
| | | */ |
| | | /** |
| | | * 巡检轨迹表 |
| | | */ |
| | | |
| | | @TableName(value = "ope_track", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | public class OpeTrack implements BaseEntity { |
| | | public static final long serialVersionUID = 202409241013001L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 巡检ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @NotNull(message = "巡检ID不能为空") |
| | | private Long inspectId; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @NotNull(message = "经度不能为空") |
| | | private BigDecimal lng; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @NotNull(message = "纬度不能为空") |
| | | private BigDecimal lat; |
| | | |
| | | /** |
| | | * 打点时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date locateTime; |
| | | } |
| | |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | # url: jdbc:mysql://192.168.40.166:3306/pipIrr_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.130.130.233:3306/pipIrr_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://127.0.0.1:3306/pipIrr_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://8.130.130.233:3306/pipIrr_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://127.0.0.1:3306/pipIrr_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | |
| | | <user name="超级管理员" phone="admin" password="dyyjy" supperAdmin="1" /> |
| | | <payments> |
| | | <item1 name="现金"/> |
| | | <item2 name="微信支付"/> |
| | | <item3 name="支付宝支付"/> |
| | | <item4 name="银行转账"/> |
| | | <item2 name="POS机"/> |
| | | <item3 name="银行转账"/> |
| | | </payments> |
| | | <settings> |
| | | <item1 item_name="lng" item_value="101.89878161146011" remarks="经度"/> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoOp.OpeInspectMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table ope_inspect--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="inspector_id" jdbcType="BIGINT" property="inspectorId" /> |
| | | <result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> |
| | | <result column="stop_time" jdbcType="TIMESTAMP" property="stopTime" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, inspector_id, start_time, stop_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from ope_inspect |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from ope_inspect |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | insert into ope_inspect (id, inspector_id, start_time, |
| | | stop_time) |
| | | values (#{id,jdbcType=BIGINT}, #{inspectorId,jdbcType=BIGINT}, #{startTime,jdbcType=TIMESTAMP}, |
| | | #{stopTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | insert into ope_inspect |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="inspectorId != null"> |
| | | inspector_id, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | start_time, |
| | | </if> |
| | | <if test="stopTime != null"> |
| | | stop_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="inspectorId != null"> |
| | | #{inspectorId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | #{startTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="stopTime != null"> |
| | | #{stopTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | update ope_inspect |
| | | <set> |
| | | <if test="inspectorId != null"> |
| | | inspector_id = #{inspectorId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | start_time = #{startTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="stopTime != null"> |
| | | stop_time = #{stopTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | update ope_inspect |
| | | set inspector_id = #{inspectorId,jdbcType=BIGINT}, |
| | | start_time = #{startTime,jdbcType=TIMESTAMP}, |
| | | stop_time = #{stopTime,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoOp.OpeTrackMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table ope_track--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="inspect_id" jdbcType="BIGINT" property="inspectId" /> |
| | | <result column="lng" jdbcType="DECIMAL" property="lng" /> |
| | | <result column="lat" jdbcType="DECIMAL" property="lat" /> |
| | | <result column="locate_time" jdbcType="TIMESTAMP" property="locateTime" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, inspect_id, lng, lat, locate_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from ope_track |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from ope_track |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | insert into ope_track (id, inspect_id, lng, |
| | | lat, locate_time) |
| | | values (#{id,jdbcType=BIGINT}, #{inspectId,jdbcType=BIGINT}, #{lng,jdbcType=DECIMAL}, |
| | | #{lat,jdbcType=DECIMAL}, #{locateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | insert into ope_track |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="inspectId != null"> |
| | | inspect_id, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat, |
| | | </if> |
| | | <if test="locateTime != null"> |
| | | locate_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="inspectId != null"> |
| | | #{inspectId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | #{lng,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | #{lat,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="locateTime != null"> |
| | | #{locateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | update ope_track |
| | | <set> |
| | | <if test="inspectId != null"> |
| | | inspect_id = #{inspectId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng = #{lng,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat = #{lat,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="locateTime != null"> |
| | | locate_time = #{locateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | update ope_track |
| | | set inspect_id = #{inspectId,jdbcType=BIGINT}, |
| | | lng = #{lng,jdbcType=DECIMAL}, |
| | | lat = #{lat,jdbcType=DECIMAL}, |
| | | locate_time = #{locateTime,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | package com.dy.rtuMw.server.rtuData.dbSv; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.dy.common.util.NumUtil; |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerTrampMapper; |
| | |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void savePrConctrollerTramp(PrControllerTramp po){ |
| | | System.out.println("------------------------------********************--------------------"); |
| | | po.setOrgTag("DY"); |
| | | System.out.println(JSON.toJSONString(po)); |
| | | if(po.getOrgTag().trim().length() > 2) { |
| | | po.setOrgTag("DY"); |
| | | } |
| | | this.prControllerTrampMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | |
| | | package com.dy.rtuMw.server.rtuData.p206V1_0_0; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import com.dy.rtuMw.server.rtuData.TaskSurpport; |
| | | import com.dy.rtuMw.server.rtuData.dbSv.DbSv; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:21 |
| | | * @LastEditTime 2024-09-24 10:21 |
| | | * @Description |
| | | */ |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping(path="inspect") |
| | | public class InspectCtrl { |
| | | @Autowired |
| | | private InspectSv inspectSv; |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect; |
| | | |
| | | import com.dy.pipIrrGlobal.daoOp.OpeInspectMapper; |
| | | import com.dy.pipIrrGlobal.daoOp.OpeTrackMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:21 |
| | | * @LastEditTime 2024-09-24 10:21 |
| | | * @Description |
| | | */ |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class InspectSv { |
| | | @Autowired |
| | | private OpeInspectMapper opeInspectMapper; |
| | | |
| | | @Autowired |
| | | private OpeTrackMapper opeTrackMapper; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:32 |
| | | * @LastEditTime 2024-09-24 10:32 |
| | | * @Description 开始巡检打点对象 |
| | | */ |
| | | |
| | | @Data |
| | | public class StartPoint { |
| | | public static final long serialVersionUID = 202409241034001L; |
| | | |
| | | /** |
| | | * 巡检员ID |
| | | */ |
| | | private Long inspectorId; |
| | | |
| | | /** |
| | | * 开始巡检时间 |
| | | */ |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 打卡点 |
| | | */ |
| | | private TrackPoint trackPoint; |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:49 |
| | | * @LastEditTime 2024-09-24 10:49 |
| | | * @Description 结束巡检打点对象 |
| | | */ |
| | | |
| | | @Data |
| | | public class StopPoint { |
| | | public static final long serialVersionUID = 202409241053001L; |
| | | |
| | | /** |
| | | * 巡检ID |
| | | */ |
| | | private Long inspectId; |
| | | |
| | | /** |
| | | * 结束巡检时间 |
| | | */ |
| | | private Date stopTime; |
| | | |
| | | /** |
| | | * 打卡点 |
| | | */ |
| | | private TrackPoint trackPoint; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:44 |
| | | * @LastEditTime 2024-09-24 10:44 |
| | | * @Description 打点对象 |
| | | */ |
| | | |
| | | @Data |
| | | public class TrackPoint { |
| | | public static final long serialVersionUID = 202409241045001L; |
| | | |
| | | /** |
| | | * 打点精度 |
| | | */ |
| | | private BigDecimal lng; |
| | | |
| | | /** |
| | | * 打点纬度 |
| | | */ |
| | | private BigDecimal lat; |
| | | |
| | | /** |
| | | * 打点时间 |
| | | */ |
| | | private Date locateTime; |
| | | } |