Browse Source

岸线状态刷新

zoro 10 months ago
parent
commit
75f0c325ab

+ 5 - 1
src/main/java/com/ghjg/shoreline/Schedule/ShorelineSchedule.java

@@ -1,6 +1,7 @@
 package com.ghjg.shoreline.Schedule;
 
 import com.ghjg.shoreline.service.ShoreLineService;
+import com.ghjg.shoreline.service.ShorelineManageInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
@@ -11,9 +12,12 @@ import javax.annotation.PostConstruct;
 public class ShorelineSchedule {
     @Autowired
     private ShoreLineService shoreLineService;
+    @Autowired
+    private ShorelineManageInfoService shorelineManageInfoService;
     @Scheduled(cron = "0 0 1 * * ? ")
     //@PostConstruct
     public void shorelineUpdate(){
-        shoreLineService.updateAllThreeTable();
+        //shoreLineService.updateAllThreeTable();
+        shorelineManageInfoService.updateAllPassed();
     }
 }

+ 410 - 0
src/main/java/com/ghjg/shoreline/dto/ShorelineManageInfo.java

@@ -0,0 +1,410 @@
+package com.ghjg.shoreline.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 主要陆域水域设施
+ * @TableName SHORELINE_MANAGE_INFO
+ */
+@TableName(value ="ghjg_channel.SHORELINE_MANAGE_INFO")
+@Data
+public class ShorelineManageInfo implements Serializable {
+    /**
+     * 该表的主键
+     */
+    @TableId(value = "ID")
+    private String id;
+
+    /**
+     * 岸线证书编号
+     */
+    @TableField(value = "LINE_CODE")
+    private String lineCode;
+
+    /**
+     * 许可决定书号
+     */
+    @TableField(value = "EXEQUATUR_CODE")
+    private String exequaturCode;
+
+    /**
+     * 岸线使用期限类型
+     */
+    @TableField(value = "LINE_APPROVE_TYPE")
+    private String lineApproveType;
+
+    /**
+     * 港口岸线使用人(单位名称)
+     */
+    @TableField(value = "LINE_USER")
+    private String lineUser;
+
+    /**
+     * 企业经营办公地址
+     */
+    @TableField(value = "CONTACT_ADDRESS")
+    private String contactAddress;
+
+    /**
+     * 核准使用长度(米)
+     */
+    @TableField(value = "APPROVED_LENGTH")
+    private BigDecimal approvedLength;
+
+    /**
+     * 岸线使用功能
+     */
+    @TableField(value = "MAIN_USE")
+    private String mainUse;
+
+    /**
+     * 相邻上游用户
+     */
+    @TableField(value = "NEAR_UP_USER")
+    private String nearUpUser;
+
+    /**
+     * 相邻下游用户
+     */
+    @TableField(value = "NEAR_DOWN_USER")
+    private String nearDownUser;
+
+    /**
+     * 岸线使用批准机关
+     */
+    @TableField(value = "AUTHORITY_ORZ")
+    private String authorityOrz;
+
+    /**
+     * 核发日期
+     */
+    @TableField(value = "ISSUE_DATE")
+    private Date issueDate;
+
+    /**
+     * 使用有效期起
+     */
+    @TableField(value = "EFFECTIVE_START_DATE")
+    private Date effectiveStartDate;
+
+    /**
+     * 使用年限
+     */
+    @TableField(value = "EFFECTIVE_YEAR")
+    private String effectiveYear;
+
+    /**
+     * 
+     */
+    @TableField(value = "MAJOR_WATER_AREA_FACILITY")
+    private String majorWaterAreaFacility;
+
+    /**
+     * 说明
+     */
+    @TableField(value = "EXPLAIN")
+    private String explain;
+
+    /**
+     * 经度
+     */
+    @TableField(value = "LONGITUDE")
+    private String longitude;
+
+    /**
+     * 纬度
+     */
+    @TableField(value = "LATITUDE")
+    private String latitude;
+
+    /**
+     * 备注
+     */
+    @TableField(value = "REMARK")
+    private String remark;
+
+    /**
+     * 岸线地理位置所在行政区
+     */
+    @TableField(value = "BELONG_COUNTRY")
+    private String belongCountry;
+
+    /**
+     * 地理位置信息
+     */
+    @TableField(value = "LOCATION")
+    private String location;
+
+    /**
+     * 岸线审批市/区类型
+     */
+    @TableField(value = "LINE_TYPE")
+    private String lineType;
+
+    /**
+     * 更新时间
+     */
+    @TableField(value = "FBDATE")
+    private Date fbdate;
+
+    /**
+     * 是否提交 0 保存,1提交
+     */
+    @TableField(value = "IS_SUBMIT")
+    private Long isSubmit;
+
+    /**
+     * 是否有更新 0否,1是
+     */
+    @TableField(value = "IS_UPDATE")
+    private Long isUpdate;
+
+    /**
+     * 更新人
+     */
+    @TableField(value = "UPDATE_USER")
+    private String updateUser;
+
+    /**
+     * 使用有效期止
+     */
+    @TableField(value = "EFFECTIVE_END_DATE")
+    private Date effectiveEndDate;
+
+    /**
+     * 社会统一信用代码
+     */
+    @TableField(value = "CREDIT_CODE")
+    private String creditCode;
+
+    /**
+     * 法定代表人
+     */
+    @TableField(value = "FDDBR")
+    private String fddbr;
+
+    /**
+     * 注册地址
+     */
+    @TableField(value = "REGISTER_ADDRESS")
+    private String registerAddress;
+
+    /**
+     * 法定代表人联系电话
+     */
+    @TableField(value = "FD_PHONE")
+    private String fdPhone;
+
+    /**
+     * 联系人
+     */
+    @TableField(value = "CONTACT_PEOPLE")
+    private String contactPeople;
+
+    /**
+     * 联系人电话
+     */
+    @TableField(value = "CONTACT_PHONE")
+    private String contactPhone;
+
+    /**
+     * 所在航段/航道
+     */
+    @TableField(value = "BELONG_SHORE")
+    private String belongShore;
+
+    /**
+     * 岸别
+     */
+    @TableField(value = "SHORE_SEPARATION")
+    private String shoreSeparation;
+
+    /**
+     * 岸线用途
+     */
+    @TableField(value = "LINE_USAGE")
+    private String lineUsage;
+
+    /**
+     * 码头平面布置型式
+     */
+    @TableField(value = "WHARF_LAYOUT_TYPE")
+    private String wharfLayoutType;
+
+    /**
+     * 岸线性质
+     */
+    @TableField(value = "SHORELINE_PROPERTY")
+    private String shorelineProperty;
+
+    /**
+     * 泊位总数
+     */
+    @TableField(value = "BERTH_NUMBER")
+    private Long berthNumber;
+
+    /**
+     * 靠泊最大吨位
+     */
+    @TableField(value = "MAX_BERTH_TON")
+    private BigDecimal maxBerthTon;
+
+    /**
+     * 泊位总长度(米)
+     */
+    @TableField(value = "BERTH_LENGTH")
+    private BigDecimal berthLength;
+
+    /**
+     * 码头作业状态
+     */
+    @TableField(value = "DOCK_STATUS")
+    private String dockStatus;
+
+    /**
+     * 港口经营人单位名称
+     */
+    @TableField(value = "DOCK_OP_NAME")
+    private String dockOpName;
+
+    /**
+     * 港口经营人统一社会信用代码
+     */
+    @TableField(value = "DOCK_CREDIT_CODE")
+    private String dockCreditCode;
+
+    /**
+     * 港口经营许可证号
+     */
+    @TableField(value = "DOCK_CERTNUMBER")
+    private String dockCertnumber;
+
+    /**
+     * 该记录创建时间
+     */
+    @TableField(value = "C_DATE")
+    private Date cDate;
+
+    /**
+     * 该记录创建人
+     */
+    @TableField(value = "C_USER")
+    private String cUser;
+
+    /**
+     * 该记录更新时间
+     */
+    @TableField(value = "U_DATE")
+    private Date uDate;
+
+    /**
+     * 该记录更新人
+     */
+    @TableField(value = "U_USER")
+    private String uUser;
+
+    /**
+     * 按规定是否需要缴纳港口岸线使用费
+     */
+    @TableField(value = "NEED_PAY")
+    private Long needPay;
+
+    /**
+     * 经营证照有效期止
+     */
+    @TableField(value = "DOCK_EFFECT_END")
+    private Date dockEffectEnd;
+
+    /**
+     * 缴费单位名称
+     */
+    @TableField(value = "PAY_UNIT_NAME")
+    private String payUnitName;
+
+    /**
+     * 缴费单位统一社会信用代码
+     */
+    @TableField(value = "PAY_CREDIT_CODE")
+    private String payCreditCode;
+
+    /**
+     * 缴费单位账号
+     */
+    @TableField(value = "PAY_ACCOUNT")
+    private String payAccount;
+
+    /**
+     * 缴费单位开户行
+     */
+    @TableField(value = "PAY_BELONG_BANK")
+    private String payBelongBank;
+
+    /**
+     * 是否需要或提交缴费委托协议
+     */
+    @TableField(value = "NEED_PAY_COMMIT")
+    private Long needPayCommit;
+
+    /**
+     * 缴费周期
+     */
+    @TableField(value = "PAY_CYCLE")
+    private String payCycle;
+
+    /**
+     * 周期内应缴费金额(元)
+     */
+    @TableField(value = "PAY_COUNT")
+    private BigDecimal payCount;
+
+    /**
+     * 缴费单位电子票据接受电子邮箱
+     */
+    @TableField(value = "PAY_ACCEPT_MAIL")
+    private String payAcceptMail;
+
+    /**
+     * 缴费联系人
+     */
+    @TableField(value = "PAY_CONTACT")
+    private String payContact;
+
+    /**
+     * 联系手机和电话
+     */
+    @TableField(value = "PAY_PHONE")
+    private String payPhone;
+
+    /**
+     * 岸线使用管理事权分类
+     */
+    @TableField(value = "SHORELINE_MANAGE_TYPE")
+    private String shorelineManageType;
+
+    /**
+     * 岸线使用管理机构
+     */
+    @TableField(value = "SHORELINE_MANAGE_ORZ")
+    private String shorelineManageOrz;
+
+    /**
+     * 0 未删除
+     */
+    @TableField(value = "IS_DELETE")
+    private Long isDelete;
+
+    /**
+     * 0 正常 1 已注销 2 过期失效
+     */
+    @TableField(value = "LINE_STATUS")
+    private Long lineStatus;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 21 - 0
src/main/java/com/ghjg/shoreline/mapper/ShorelineManageInfoMapper.java

@@ -0,0 +1,21 @@
+package com.ghjg.shoreline.mapper;
+
+import com.ghjg.shoreline.dto.ShorelineManageInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+* @author csdl
+* @description 针对表【SHORELINE_MANAGE_INFO(主要陆域水域设施)】的数据库操作Mapper
+* @createDate 2024-05-31 13:39:14
+* @Entity com.ghjg.shoreline.dto.ShorelineManageInfo
+*/
+public interface ShorelineManageInfoMapper extends BaseMapper<ShorelineManageInfo> {
+
+    List<ShorelineManageInfo> getAllPassed();
+}
+
+
+
+

+ 14 - 0
src/main/java/com/ghjg/shoreline/service/ShorelineManageInfoService.java

@@ -0,0 +1,14 @@
+package com.ghjg.shoreline.service;
+
+import com.ghjg.shoreline.dto.ShorelineManageInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author csdl
+* @description 针对表【SHORELINE_MANAGE_INFO(主要陆域水域设施)】的数据库操作Service
+* @createDate 2024-05-31 13:39:14
+*/
+public interface ShorelineManageInfoService extends IService<ShorelineManageInfo> {
+
+    void updateAllPassed();
+}

+ 47 - 0
src/main/java/com/ghjg/shoreline/service/impl/ShorelineManageInfoServiceImpl.java

@@ -0,0 +1,47 @@
+package com.ghjg.shoreline.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ghjg.shoreline.dto.ShorelineManageInfo;
+import com.ghjg.shoreline.service.ShorelineManageInfoService;
+import com.ghjg.shoreline.mapper.ShorelineManageInfoMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author csdl
+ * @description 针对表【SHORELINE_MANAGE_INFO(主要陆域水域设施)】的数据库操作Service实现
+ * @createDate 2024-05-31 13:39:14
+ */
+@Service
+@Slf4j
+public class ShorelineManageInfoServiceImpl extends ServiceImpl<ShorelineManageInfoMapper, ShorelineManageInfo>
+        implements ShorelineManageInfoService {
+
+    @Resource
+    private ShorelineManageInfoMapper shorelineManageInfoMapper;
+
+    @Override
+    public void updateAllPassed() {
+        List<ShorelineManageInfo> shorelineManageInfos = shorelineManageInfoMapper.getAllPassed();
+        if (shorelineManageInfos.isEmpty()){
+            log.info("Needn't update");
+        }else {
+            for (ShorelineManageInfo shorelineManageInfo : shorelineManageInfos) {
+                shorelineManageInfo.setLineStatus(2L);
+            }
+            boolean b = this.updateBatchById(shorelineManageInfos);
+            if (b){
+                log.info("success");
+            }else {
+                log.error("error");
+            }
+        }
+    }
+}
+
+
+
+

+ 104 - 0
src/main/resources/mapper/ShorelineManageInfoMapper.xml

@@ -0,0 +1,104 @@
+<?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.ghjg.shoreline.mapper.ShorelineManageInfoMapper">
+
+    <resultMap id="BaseResultMap" type="com.ghjg.shoreline.dto.ShorelineManageInfo">
+            <result property="id" column="ID" jdbcType="VARCHAR"/>
+            <result property="lineCode" column="LINE_CODE" jdbcType="VARCHAR"/>
+            <result property="exequaturCode" column="EXEQUATUR_CODE" jdbcType="VARCHAR"/>
+            <result property="lineApproveType" column="LINE_APPROVE_TYPE" jdbcType="VARCHAR"/>
+            <result property="lineUser" column="LINE_USER" jdbcType="VARCHAR"/>
+            <result property="contactAddress" column="CONTACT_ADDRESS" jdbcType="VARCHAR"/>
+            <result property="approvedLength" column="APPROVED_LENGTH" jdbcType="DECIMAL"/>
+            <result property="mainUse" column="MAIN_USE" jdbcType="VARCHAR"/>
+            <result property="nearUpUser" column="NEAR_UP_USER" jdbcType="VARCHAR"/>
+            <result property="nearDownUser" column="NEAR_DOWN_USER" jdbcType="VARCHAR"/>
+            <result property="authorityOrz" column="AUTHORITY_ORZ" jdbcType="VARCHAR"/>
+            <result property="issueDate" column="ISSUE_DATE" jdbcType="TIMESTAMP"/>
+            <result property="effectiveStartDate" column="EFFECTIVE_START_DATE" jdbcType="TIMESTAMP"/>
+            <result property="effectiveYear" column="EFFECTIVE_YEAR" jdbcType="VARCHAR"/>
+            <result property="majorWaterAreaFacility" column="MAJOR_WATER_AREA_FACILITY" jdbcType="VARCHAR"/>
+            <result property="explain" column="EXPLAIN" jdbcType="VARCHAR"/>
+            <result property="longitude" column="LONGITUDE" jdbcType="VARCHAR"/>
+            <result property="latitude" column="LATITUDE" jdbcType="VARCHAR"/>
+            <result property="remark" column="REMARK" jdbcType="VARCHAR"/>
+            <result property="belongCountry" column="BELONG_COUNTRY" jdbcType="VARCHAR"/>
+            <result property="location" column="LOCATION" jdbcType="VARCHAR"/>
+            <result property="lineType" column="LINE_TYPE" jdbcType="VARCHAR"/>
+            <result property="fbdate" column="FBDATE" jdbcType="TIMESTAMP"/>
+            <result property="isSubmit" column="IS_SUBMIT" jdbcType="DECIMAL"/>
+            <result property="isUpdate" column="IS_UPDATE" jdbcType="DECIMAL"/>
+            <result property="updateUser" column="UPDATE_USER" jdbcType="VARCHAR"/>
+            <result property="effectiveEndDate" column="EFFECTIVE_END_DATE" jdbcType="TIMESTAMP"/>
+            <result property="creditCode" column="CREDIT_CODE" jdbcType="VARCHAR"/>
+            <result property="fddbr" column="FDDBR" jdbcType="VARCHAR"/>
+            <result property="registerAddress" column="REGISTER_ADDRESS" jdbcType="VARCHAR"/>
+            <result property="fdPhone" column="FD_PHONE" jdbcType="VARCHAR"/>
+            <result property="contactPeople" column="CONTACT_PEOPLE" jdbcType="VARCHAR"/>
+            <result property="contactPhone" column="CONTACT_PHONE" jdbcType="VARCHAR"/>
+            <result property="belongShore" column="BELONG_SHORE" jdbcType="VARCHAR"/>
+            <result property="shoreSeparation" column="SHORE_SEPARATION" jdbcType="VARCHAR"/>
+            <result property="lineUsage" column="LINE_USAGE" jdbcType="VARCHAR"/>
+            <result property="wharfLayoutType" column="WHARF_LAYOUT_TYPE" jdbcType="VARCHAR"/>
+            <result property="shorelineProperty" column="SHORELINE_PROPERTY" jdbcType="VARCHAR"/>
+            <result property="berthNumber" column="BERTH_NUMBER" jdbcType="DECIMAL"/>
+            <result property="maxBerthTon" column="MAX_BERTH_TON" jdbcType="DECIMAL"/>
+            <result property="berthLength" column="BERTH_LENGTH" jdbcType="DECIMAL"/>
+            <result property="dockStatus" column="DOCK_STATUS" jdbcType="VARCHAR"/>
+            <result property="dockOpName" column="DOCK_OP_NAME" jdbcType="VARCHAR"/>
+            <result property="dockCreditCode" column="DOCK_CREDIT_CODE" jdbcType="VARCHAR"/>
+            <result property="dockCertnumber" column="DOCK_CERTNUMBER" jdbcType="VARCHAR"/>
+            <result property="cDate" column="C_DATE" jdbcType="TIMESTAMP"/>
+            <result property="cUser" column="C_USER" jdbcType="VARCHAR"/>
+            <result property="uDate" column="U_DATE" jdbcType="TIMESTAMP"/>
+            <result property="uUser" column="U_USER" jdbcType="VARCHAR"/>
+            <result property="needPay" column="NEED_PAY" jdbcType="DECIMAL"/>
+            <result property="dockEffectEnd" column="DOCK_EFFECT_END" jdbcType="TIMESTAMP"/>
+            <result property="payUnitName" column="PAY_UNIT_NAME" jdbcType="VARCHAR"/>
+            <result property="payCreditCode" column="PAY_CREDIT_CODE" jdbcType="VARCHAR"/>
+            <result property="payAccount" column="PAY_ACCOUNT" jdbcType="VARCHAR"/>
+            <result property="payBelongBank" column="PAY_BELONG_BANK" jdbcType="VARCHAR"/>
+            <result property="needPayCommit" column="NEED_PAY_COMMIT" jdbcType="DECIMAL"/>
+            <result property="payCycle" column="PAY_CYCLE" jdbcType="VARCHAR"/>
+            <result property="payCount" column="PAY_COUNT" jdbcType="DECIMAL"/>
+            <result property="payAcceptMail" column="PAY_ACCEPT_MAIL" jdbcType="VARCHAR"/>
+            <result property="payContact" column="PAY_CONTACT" jdbcType="VARCHAR"/>
+            <result property="payPhone" column="PAY_PHONE" jdbcType="VARCHAR"/>
+            <result property="shorelineManageType" column="SHORELINE_MANAGE_TYPE" jdbcType="VARCHAR"/>
+            <result property="shorelineManageOrz" column="SHORELINE_MANAGE_ORZ" jdbcType="VARCHAR"/>
+            <result property="isDelete" column="IS_DELETE" jdbcType="DECIMAL"/>
+            <result property="lineStatus" column="LINE_STATUS" jdbcType="DECIMAL"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        ID,LINE_CODE,EXEQUATUR_CODE,
+        LINE_APPROVE_TYPE,LINE_USER,CONTACT_ADDRESS,
+        APPROVED_LENGTH,MAIN_USE,NEAR_UP_USER,
+        NEAR_DOWN_USER,AUTHORITY_ORZ,ISSUE_DATE,
+        EFFECTIVE_START_DATE,EFFECTIVE_YEAR,MAJOR_WATER_AREA_FACILITY,
+        EXPLAIN,LONGITUDE,LATITUDE,
+        REMARK,BELONG_COUNTRY,LOCATION,
+        LINE_TYPE,FBDATE,IS_SUBMIT,
+        IS_UPDATE,UPDATE_USER,EFFECTIVE_END_DATE,
+        CREDIT_CODE,FDDBR,REGISTER_ADDRESS,
+        FD_PHONE,CONTACT_PEOPLE,CONTACT_PHONE,
+        BELONG_SHORE,SHORE_SEPARATION,LINE_USAGE,
+        WHARF_LAYOUT_TYPE,SHORELINE_PROPERTY,BERTH_NUMBER,
+        MAX_BERTH_TON,BERTH_LENGTH,DOCK_STATUS,
+        DOCK_OP_NAME,DOCK_CREDIT_CODE,DOCK_CERTNUMBER,
+        C_DATE,C_USER,U_DATE,
+        U_USER,NEED_PAY,DOCK_EFFECT_END,
+        PAY_UNIT_NAME,PAY_CREDIT_CODE,PAY_ACCOUNT,
+        PAY_BELONG_BANK,NEED_PAY_COMMIT,PAY_CYCLE,
+        PAY_COUNT,PAY_ACCEPT_MAIL,PAY_CONTACT,
+        PAY_PHONE,SHORELINE_MANAGE_TYPE,SHORELINE_MANAGE_ORZ,
+        IS_DELETE,LINE_STATUS
+    </sql>
+    <select id="getAllPassed" resultType="com.ghjg.shoreline.dto.ShorelineManageInfo">
+        select * from ghjg_channel.shoreline_manage_INFO
+        where EFFECTIVE_END_DATE &lt;= sysdate
+    </select>
+
+</mapper>