Browse Source

定时同步数据任务 定时开启

master
PoffyZhang 10 months ago
parent
commit
061fd51df3
4 changed files with 493 additions and 2 deletions
  1. +11
    -2
      kqapi/src/main/java/com/ningdatech/kqapi/common/helper/basic/AbstractMatterCacheHelper.java
  2. +16
    -0
      kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/DscSxAdsShareItemQltQlsxCommonIDVKqController.java
  3. +419
    -0
      kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/entity/dto/DscSxAdsShareItemQltQlsxCommonIDVKqDTO.java
  4. +47
    -0
      kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/QlManage.java

+ 11
- 2
kqapi/src/main/java/com/ningdatech/kqapi/common/helper/basic/AbstractMatterCacheHelper.java View File

@@ -12,6 +12,7 @@ import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate;
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService;
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;

@@ -47,14 +48,22 @@ public abstract class AbstractMatterCacheHelper implements InitializingBean {
.list(Wrappers.lambdaQuery(DscSxAdsShareItemQltQlsxCommonIDVKq.class)
.select(DscSxAdsShareItemQltQlsxCommonIDVKq::getRowguid,DscSxAdsShareItemQltQlsxCommonIDVKq::getQlName,
DscSxAdsShareItemQltQlsxCommonIDVKq::getWebapplyurl)
.isNotNull(DscSxAdsShareItemQltQlsxCommonIDVKq::getWebapplyurl));
.isNotNull(DscSxAdsShareItemQltQlsxCommonIDVKq::getWebapplyurl)
.orderByDesc(DscSxAdsShareItemQltQlsxCommonIDVKq::getUpdateDate));
if (allMatters.isEmpty()) {
log.warn("事项数据未初始化");
return Boolean.FALSE;
}
allMatters.forEach(m -> {
MatterKey key = MatterKey.of(m.getQlName(),m.getWebapplyurl());
mattersUrlCache.put(m.getQlName(),m.getWebapplyurl());
if(!mattersUrlCache.asMap().containsKey(m.getQlName())){
mattersUrlCache.put(m.getQlName(),m.getWebapplyurl());
}else{
String url = mattersUrlCache.get(m.getQlName());
if(StringUtils.isNotBlank(url) && !url.equals(m.getWebapplyurl())){
return;
}
}
if(mattersDupCache.asMap().containsKey(key)){
NdKqZzsfwMattersDeduplicate dup = mattersDupCache.get(key);
dup.setCountNum(dup.getCountNum() + 1);


+ 16
- 0
kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/DscSxAdsShareItemQltQlsxCommonIDVKqController.java View File

@@ -1,12 +1,21 @@
package com.ningdatech.kqapi.zzsfw.controller;

import com.ningdatech.kqapi.zzsfw.entity.dto.DscSxAdsShareItemQltQlsxCommonIDVKqDTO;
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq;
import com.ningdatech.kqapi.zzsfw.entity.vo.TreeVO;
import com.ningdatech.kqapi.zzsfw.manage.QlManage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
* <p>
* 省回流_政务服务_数据共享_事项基本信息表 前端控制器
@@ -23,4 +32,11 @@ import org.springframework.web.bind.annotation.RestController;
@RequiredArgsConstructor
public class DscSxAdsShareItemQltQlsxCommonIDVKqController {

private final QlManage qlManage;

@ApiOperation(value = "获取政务事项数据列表", notes = "获取政务事项数据列表")
@GetMapping("/search")
public List<DscSxAdsShareItemQltQlsxCommonIDVKq> search(@ModelAttribute DscSxAdsShareItemQltQlsxCommonIDVKqDTO dto) {
return qlManage.search(dto);
}
}

+ 419
- 0
kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/entity/dto/DscSxAdsShareItemQltQlsxCommonIDVKqDTO.java View File

@@ -0,0 +1,419 @@
package com.ningdatech.kqapi.zzsfw.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* <p>
* 省回流_政务服务_数据共享_事项基本信息表
* </p>
*
* @author ZPF
* @since 2023-10-25
*/
@Data
@ApiModel(value = "DscSxAdsShareItemQltQlsxCommonIDVKqDTO", description = "省回流_政务服务_数据共享_事项基本信息表")
public class DscSxAdsShareItemQltQlsxCommonIDVKqDTO implements Serializable {

private static final long serialVersionUID = 1L;

@ApiModelProperty("事项唯一标识")
private String rowguid;

@ApiModelProperty("写入同步时间")
private LocalDateTime updateDate;

@ApiModelProperty("事项更新类型")
private String updateType;

@ApiModelProperty("事项类型")
private String qlKind;

@ApiModelProperty("主项编码")
private String qlMainitemId;

@ApiModelProperty("子项编码")
private String qlSubitemId;

@ApiModelProperty("事权层级")
private String shiquancj;

@ApiModelProperty("行政区划代码")
private String belongxiaqucode;

@ApiModelProperty("实施机关组织机构代码(主管部门组织机构代码)")
private String qlDepOrgcdoe;

@ApiModelProperty("权力来源")
private String itemsource;

@ApiModelProperty("版本号")
private String versionNumber;

@ApiModelProperty("事项入库时间")
private LocalDateTime versionDate;

@ApiModelProperty("事项状态生效时间")
private LocalDateTime qlEffectTime;

@ApiModelProperty("事项内部编码")
private String qlInnerCode;

@ApiModelProperty("事项名称")
private String qlName;

@ApiModelProperty("事项状态")
private String qlState;

@ApiModelProperty("法定依据(审批依据;实施依据)")
private String lawbasis;

@ApiModelProperty("法定期限")
private Long anticipateDay;

@ApiModelProperty("法定期限单位")
private String anticipateType;

@ApiModelProperty("承诺期限")
private Long promiseDay;

@ApiModelProperty("办事者到办事现场次数")
private Long applyerminCount;

@ApiModelProperty("是否列为国家、省、市、县级行政审批制度改革试点")
private String isPilot;

@ApiModelProperty("实施机关(主管部门名称)")
private String qlDep;

@ApiModelProperty("实施或牵头的处(科)室名称")
private String leadDept;

@ApiModelProperty("办件类型")
private String bjtype;

@ApiModelProperty("本级审批性质")
private String benjispxz;

@ApiModelProperty("办理频率")
private String handleFrequency;

@ApiModelProperty("行政相对人性质(适用对象(行政相对人性质);服务相对人性质)")
private String xingzhenxdrxz;

@ApiModelProperty("审批条件(申请条件;受理条件)")
private String applyCondition;

@ApiModelProperty("办件结果文件名称(审批结果)")
private String banjianFinishfiles;

@ApiModelProperty("咨询电话")
private String linkTel;

@ApiModelProperty("监督投诉电话")
private String superviseTel;

@ApiModelProperty("电脑端网上办理地址")
private String webapplyurl;

@ApiModelProperty("网上咨询网址")
private String webconsulturl;

@ApiModelProperty("是否收费")
private String chargeFlag;

@ApiModelProperty("收费依据")
private String chargeBasis;

@ApiModelProperty("法人关注点")
private String rightclassQiyezt;

@ApiModelProperty("面向法人的对象分类")
private String rightclassQiyedx;

@ApiModelProperty("个人关注点")
private String rightclassGerensx;

@ApiModelProperty("面向个人的对象分类")
private String rightclassGerendx;

@ApiModelProperty("内部流程信息")
private String inFlowInfo;

@ApiModelProperty("业务申报材料")
private String materialInfo;

@ApiModelProperty("材料情形说明")
private String materialCaseInfo;

@ApiModelProperty("收费项目")
private String chargeitemInfo;

@ApiModelProperty("常见问题解答")
private String qaInfo;

@ApiModelProperty("受理地点信息")
private String acceptAddressInfo;

@ApiModelProperty("交换标识")
private String syncSign;

@ApiModelProperty("交换时间")
private LocalDateTime syncDate;

@ApiModelProperty("交换错误描述")
private String syncErrorDesc;

@ApiModelProperty("部门组织机构代码")
private String ouorgcode;

@ApiModelProperty("部门编码")
private String ouguid;

@ApiModelProperty("法人登录地址(电脑端法人认证地址)")
private String farenurl;

@ApiModelProperty("电脑端个人认证标识")
private String gerenflag;

@ApiModelProperty("是否统建系统(是否使用统一网上申报)")
private String isTongjian;

@ApiModelProperty("事项编码")
private String qlFullId;

@ApiModelProperty("委托下放")
private String entrust;

@ApiModelProperty("委托下放说明")
private String entrustdes;

@ApiModelProperty("最少上门次数说明")
private String applyerminCountDesc;

@ApiModelProperty("事项所属业务类型")
private String outypecode;

@ApiModelProperty("对外公布办理程序描述")
private String outFlowDesc;

@ApiModelProperty("办结类型")
private String banjianFinishtype;

@ApiModelProperty("是否允许特别程序申请")
private String isSpecialpro;

@ApiModelProperty("删除数据标识")
private String state2;

@ApiModelProperty("不适宜开展网上申报")
private String nosuitApply;

@ApiModelProperty("是否接入统一办件库")
private String isUnifydo;

@ApiModelProperty("是否是上级主管部门统建系统")
private String isUpunify;

@ApiModelProperty("权力属性")
private String qlAtt;

@ApiModelProperty("备注")
private String baknote;

@ApiModelProperty("星级服务(网上办理业务模式)")
private String webapplymode;

@ApiModelProperty("权力来源方式")
private String itemsourcetype;

@ApiModelProperty("是否可以适用处罚简易程序")
private String isSimplepunish;

@ApiModelProperty("是否涉及征收(税)费减免的审批")
private String isLevywaiver;

@ApiModelProperty("征收标准")
private String feebasis;

@ApiModelProperty("自由裁量")
private String factInfo;

@ApiModelProperty("涉密或敏感")
private String isCs;

@ApiModelProperty("未接入统一办件库其他原因说明")
private String unifydodes;

@ApiModelProperty("极少业务")
private String isVlb;

@ApiModelProperty("nounify_do")
private String nounifyDo;

@ApiModelProperty("乡镇延伸事项的部门源事项")
private String qlInnerCodeItem;

@ApiModelProperty("是否投资(bak1)")
private String isTouzip;

@ApiModelProperty("行业主题分类")
private String hangyeclasstype;

@ApiModelProperty("其他行政权力子类型")
private String qlSubKind;

@ApiModelProperty("移动端网上办理地址")
private String appwebapplyurl;

@ApiModelProperty("移动端网上预约地址")
private String appappointmenturl;

@ApiModelProperty("电脑端网上预约地址")
private String appointmenturl;

@ApiModelProperty("是否网上预约")
private String isWebappointment;

@ApiModelProperty("网上预约时段")
private String webappointmentperiod;

@ApiModelProperty("主要内容")
private String maincontext;

@ApiModelProperty("共同实施单位")
private String doDept;

@ApiModelProperty("相关附件")
private String relatedguid;

@ApiModelProperty("相关附件信息")
private String related;

@ApiModelProperty("是否提供快递送达")
private String isExpress;

@ApiModelProperty("公共服务事项子类型")
private String serviceSubKind;

@ApiModelProperty("是否列入最多跑一次事项清单")
private String ispyc;

@ApiModelProperty("联办事项")
private String lbsx;

@ApiModelProperty("外部流程图")
private String outFlowUrl;

@ApiModelProperty("受理机构")
private String acpInstitution;

@ApiModelProperty("决定机构")
private String decInstitution;

@ApiModelProperty("涉及的内容(公共服务:主要内容)")
private String contentInvolve;

@ApiModelProperty("适用对象说明")
private String applicableObject;

@ApiModelProperty("行政相对人权利和义务")
private String xingzhenxdrxy;

@ApiModelProperty("有无数量限制")
private String countLimit;

@ApiModelProperty("数量限制情况说明")
private String countNote;

@ApiModelProperty("禁止性要求")
private String banRequirement;

@ApiModelProperty("事项审查类型")
private String shixiangsctype;

@ApiModelProperty("事项审查类型说明")
private String shixiangsclx;

@ApiModelProperty("申请方式")
private String applyType;

@ApiModelProperty("联系电话")
private String applyTypeTel;

@ApiModelProperty("邮箱")
private String applyTypeMail;

@ApiModelProperty("传真")
private String applyTypeFax;

@ApiModelProperty("办理方式")
private String handleType;

@ApiModelProperty("手机端法人认证地址")
private String mbfarenadd;

@ApiModelProperty("手机端个人认证标识")
private String mbgerenflag;

@ApiModelProperty("时限说明")
private String destime;

@ApiModelProperty("送达方式")
private String serviceMode;

@ApiModelProperty("送达时限")
private String serviceDay;

@ApiModelProperty("其他")
private String ununifydoOther;

@ApiModelProperty("是否自有")
private String ishasownflow;

@ApiModelProperty("分区")
private String dt;

@ApiModelProperty("所属地市")
private String dscCity;

@ApiModelProperty("所需区/县")
private String dscAdmRegion;

@ApiModelProperty("数源单位代码")
private String dscSydepCode;

@ApiModelProperty("数源单位")
private String dscSydepName;

@ApiModelProperty("数据所属系统名称")
private String dscSydepSys;

@ApiModelProperty("数源单位表名")
private String dscSydepTblname;

@ApiModelProperty("唯一自增序列号")
private String dscBizRecordId;

@ApiModelProperty("I插入U更新D删除")
private String dscBizOperation;

@ApiModelProperty("源表数据同步时间")
private LocalDateTime dscBizTimestamp;

@ApiModelProperty("数据来源表名(清洗库或基础库表名)")
private String dscDatasrTblname;

@ApiModelProperty("业务主键MD5值(清洗增加)")
private String dscHashUnique;

@ApiModelProperty("清洗时间(清洗增加)")
private String dscCleanTimestamp;

@ApiModelProperty("地市仓数据入库时间")
private LocalDateTime dscDwRksj;
}

+ 47
- 0
kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/QlManage.java View File

@@ -0,0 +1,47 @@
package com.ningdatech.kqapi.zzsfw.manage;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.kqapi.zzsfw.constants.ZzsfwMenuConstant;
import com.ningdatech.kqapi.zzsfw.entity.dto.DscSxAdsShareItemQltQlsxCommonIDVKqDTO;
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMattersDeduplicateDTO;
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMenuDTO;
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq;
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate;
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu;
import com.ningdatech.kqapi.zzsfw.entity.vo.MatterTopVO;
import com.ningdatech.kqapi.zzsfw.entity.vo.TreeVO;
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService;
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService;
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import java.util.*;
import java.util.stream.Collectors;

/**
* @Classname MatterManage
* @Description
* @Date 2023/10/25 14:55
* @Author PoffyZhang
*/
@Component
@Slf4j
@RequiredArgsConstructor
public class QlManage {

private final IDscSxAdsShareItemQltQlsxCommonIDVKqService kqService;

public List<DscSxAdsShareItemQltQlsxCommonIDVKq> search(DscSxAdsShareItemQltQlsxCommonIDVKqDTO dto) {
List<DscSxAdsShareItemQltQlsxCommonIDVKq> list = kqService.list(Wrappers.lambdaQuery(DscSxAdsShareItemQltQlsxCommonIDVKq.class)
.eq(StringUtils.isNotBlank(dto.getRowguid()), DscSxAdsShareItemQltQlsxCommonIDVKq::getRowguid, dto.getRowguid())
.eq(StringUtils.isNotBlank(dto.getQlName()), DscSxAdsShareItemQltQlsxCommonIDVKq::getQlName, dto.getQlName())
.eq(StringUtils.isNotBlank(dto.getWebapplyurl()), DscSxAdsShareItemQltQlsxCommonIDVKq::getWebapplyurl, dto.getWebapplyurl())
);
return list;
}
}

Loading…
Cancel
Save