Parcourir la source

处罚整改数据相关接口开发

jichaobo il y a 2 ans
Parent
commit
5be1812b04

+ 1 - 1
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/MybatisGeneratorUtils.java

@@ -71,7 +71,7 @@ public class MybatisGeneratorUtils {
         // strategy.setTablePrefix("t_"); // 表名前缀
         strategy.setEntityLombokModel(true); //使用lombok
         //修改自己想要生成的表
-        strategy.setInclude("dem_enforce_report_label");  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
+        strategy.setInclude("dem_law_situation");  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
         mpg.setStrategy(strategy);
 
         // 关闭默认 xml 生成,调整生成 至 根目录

+ 71 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/DemLawSituationController.java

@@ -0,0 +1,71 @@
+package com.usky.fire.controller.web;
+
+
+import com.usky.common.core.bean.ApiResult;
+import com.usky.common.core.bean.CommonPage;
+import com.usky.common.log.annotation.Log;
+import com.usky.common.log.enums.BusinessType;
+import com.usky.fire.domain.DemLawSituation;
+import com.usky.fire.service.DemLawSituationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ * 行政处罚情况表 前端控制器
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-09-27
+ */
+@RestController
+@RequestMapping("/demLawSituation")
+public class DemLawSituationController {
+
+    @Autowired
+    private DemLawSituationService demLawSituationService;
+
+    /**
+     * 处罚整改数据-列表查询
+     *
+     * @param punishedPerson      被处罚人
+     * @param legalRepresentative 行政相对人类别
+     * @param id                  主键ID
+     * @param pageNum             当前页
+     * @param pageSize            每页条数
+     * @return
+     */
+    @GetMapping("lawSituationList")
+    public ApiResult<CommonPage<Object>> lawSituationList(@RequestParam(value = "punishedPerson", required = false) String punishedPerson,
+                                                          @RequestParam(value = "legalRepresentative", required = false) String legalRepresentative,
+                                                          @RequestParam(value = "id", required = false, defaultValue = "0") Integer id,
+                                                          @RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
+                                                          @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
+        return ApiResult.success(demLawSituationService.lawSituationList(punishedPerson, legalRepresentative, id, pageNum, pageSize));
+    }
+
+    /**
+     * 处罚整改数据-修改
+     *
+     * @param demLawSituation
+     */
+    @Log(title = "处罚整改数据-修改", businessType = BusinessType.UPDATE)
+    @PutMapping("updateLawSituation")
+    public ApiResult<Void> updateLawSituation(@RequestBody DemLawSituation demLawSituation) {
+        demLawSituationService.updateLawSituation(demLawSituation);
+        return ApiResult.success();
+    }
+
+    /**
+     * 处罚整改数据-删除
+     *
+     * @param id 主键ID
+     */
+    @Log(title = "处罚整改数据-删除", businessType = BusinessType.DELETE)
+    @DeleteMapping("delLawSituation")
+    public ApiResult<Void> delLawSituation(@RequestParam(value = "id") Integer id) {
+        demLawSituationService.delLawSituation(id);
+        return ApiResult.success();
+    }
+}
+

+ 205 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/DemLawSituation.java

@@ -0,0 +1,205 @@
+package com.usky.fire.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import java.time.LocalDate;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 行政处罚情况表
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-09-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class DemLawSituation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 被处罚人简介
+     */
+    private String punishedPerson;
+
+    /**
+     * 行政相对人名称
+     */
+    private String counterpartName;
+
+    /**
+     * 行政相对人类别
+     */
+    private String counterpartType;
+
+    /**
+     * 行政相对人代码_1 (统一社会信用代码)
+     */
+    private String socialCreditCode;
+
+    /**
+     * 行政相对人代码_2 (工商注册号)
+     */
+    private String registrationNumber;
+
+    /**
+     * 行政相对人代码_3 (组织机构代码)
+     */
+    private String organizationCode;
+
+    /**
+     * 行政相对人代码_4 (税务登记号)
+     */
+    private String taxRegistrationNumber;
+
+    /**
+     * 行政相对人代码_5 (事业单位证书号)
+     */
+    private String companyCertificateNumber;
+
+    /**
+     * 行政相对人代码_6 (社会组织登记证号)
+     */
+    private String organizationRegistrationNumber;
+
+    /**
+     * 法定代表人
+     */
+    private String legalRepresentative;
+
+    /**
+     * 法定代表人证件类型
+     */
+    private String representativeDocumentType;
+
+    /**
+     * 法定代表人证件号码
+     */
+    private String representativeDocumentNumber;
+
+    /**
+     * 证件类型
+     */
+    private String documentType;
+
+    /**
+     * 证件号码
+     */
+    private String documentNumber;
+
+    /**
+     * 行政处罚决定书文号
+     */
+    private String punishmentDecisionNumber;
+
+    /**
+     * 违法事实内容
+     */
+    private String illegalFactsContent;
+
+    /**
+     * 违法行为类型
+     */
+    private String illegalActsType;
+
+    /**
+     * 违法事实
+     */
+    private String illegalFacts;
+
+    /**
+     * 处罚依据
+     */
+    private String punishmentBasis;
+
+    /**
+     * 处罚类别
+     */
+    private String punishmentType;
+
+    /**
+     * 处罚内容
+     */
+    private String punishmentContent;
+
+    /**
+     * 罚款金额
+     */
+    private String penaltyAmount;
+
+    /**
+     * 没收违法所得、没收非法财物的金额
+     */
+    private String illegalIncome;
+
+    /**
+     * 暂扣或吊销证照名称及编号
+     */
+    private String revocationLicense;
+
+    /**
+     * 处罚决定日期
+     */
+    private LocalDateTime punishmentDecisionTime;
+
+    /**
+     * 处罚有效期
+     */
+    private LocalDate punishmentValidityDate;
+
+    /**
+     * 公示截止期
+     */
+    private LocalDate publicityDeadline;
+
+    /**
+     * 处罚机关
+     */
+    private String punishmentAuthority;
+
+    /**
+     * 处罚机关统一社会信用代码
+     */
+    private String authorityCreditCode;
+
+    /**
+     * 数据来源单位
+     */
+    private String dataSourceCompany;
+
+    /**
+     * 数据来源单位统一社会信用代码
+     */
+    private String companyCreditCode;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 信息事项
+     */
+    private String informationMatters;
+
+    /**
+     * unionKey
+     */
+    private String unionKey;
+
+    /**
+     * 使能标识 (0:正常 1:删除)
+     */
+    private Integer enable;
+}

+ 16 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/mapper/DemLawSituationMapper.java

@@ -0,0 +1,16 @@
+package com.usky.fire.mapper;
+
+import com.usky.fire.domain.DemLawSituation;
+import com.usky.common.mybatis.core.CrudMapper;
+
+/**
+ * <p>
+ * 行政处罚情况表 Mapper 接口
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-09-27
+ */
+public interface DemLawSituationMapper extends CrudMapper<DemLawSituation> {
+
+}

+ 42 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/DemLawSituationService.java

@@ -0,0 +1,42 @@
+package com.usky.fire.service;
+
+import com.usky.common.core.bean.CommonPage;
+import com.usky.common.mybatis.core.CrudService;
+import com.usky.fire.domain.DemLawSituation;
+
+/**
+ * <p>
+ * 行政处罚情况表 服务类
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-09-27
+ */
+public interface DemLawSituationService extends CrudService<DemLawSituation> {
+
+    /**
+     * 处罚整改数据-列表查询
+     *
+     * @param punishedPerson      被处罚人
+     * @param legalRepresentative 行政相对人类别
+     * @param id                  主键ID
+     * @param pageNum             当前页
+     * @param pageSize            每页条数
+     * @return
+     */
+    CommonPage<Object> lawSituationList(String punishedPerson, String legalRepresentative, Integer id, Integer pageNum, Integer pageSize);
+
+    /**
+     * 罚整改数据-修改
+     *
+     * @param demLawSituation
+     */
+    void updateLawSituation(DemLawSituation demLawSituation);
+
+    /**
+     * 罚整改数据-删除
+     *
+     * @param id 主键ID
+     */
+    void delLawSituation(Integer id);
+}

+ 82 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/DemLawSituationServiceImpl.java

@@ -0,0 +1,82 @@
+package com.usky.fire.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.usky.common.core.bean.CommonPage;
+import com.usky.common.mybatis.core.AbstractCrudService;
+import com.usky.fire.domain.DemLawSituation;
+import com.usky.fire.mapper.DemLawSituationMapper;
+import com.usky.fire.service.DemLawSituationService;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 行政处罚情况表 服务实现类
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-09-27
+ */
+@Service
+public class DemLawSituationServiceImpl extends AbstractCrudService<DemLawSituationMapper, DemLawSituation> implements DemLawSituationService {
+
+    @Override
+    public CommonPage<Object> lawSituationList(String punishedPerson, String legalRepresentative, Integer id, Integer pageNum, Integer pageSize) {
+        List<Object> list = new ArrayList<>();
+        IPage<DemLawSituation> page = new Page<>(pageNum, pageSize);
+        LambdaQueryWrapper<DemLawSituation> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.select(DemLawSituation::getId, DemLawSituation::getPunishedPerson, DemLawSituation::getCounterpartType,
+                DemLawSituation::getLegalRepresentative, DemLawSituation::getDocumentType, DemLawSituation::getDocumentNumber,
+                DemLawSituation::getPunishmentDecisionNumber, DemLawSituation::getPunishmentBasis, DemLawSituation::getPunishmentType,
+                DemLawSituation::getPunishmentContent, DemLawSituation::getPenaltyAmount, DemLawSituation::getPunishmentDecisionTime,
+                DemLawSituation::getPunishmentValidityDate, DemLawSituation::getPublicityDeadline, DemLawSituation::getPunishmentAuthority)
+                .eq(DemLawSituation::getEnable, 0)
+                .eq(id != null & id != 0, DemLawSituation::getId, id)
+                .like(StringUtils.isNotBlank(punishedPerson), DemLawSituation::getPunishedPerson, punishedPerson)
+                .like(StringUtils.isNotBlank(legalRepresentative), DemLawSituation::getLegalRepresentative, legalRepresentative)
+                .orderByDesc(DemLawSituation::getId);
+        page = this.page(page, queryWrapper);
+        for (int i = 0; i < page.getRecords().size(); i++) {
+            Map<String, Object> map = new HashMap<>();
+            map.put("id", page.getRecords().get(i).getId());
+            map.put("punishedPerson", page.getRecords().get(i).getPunishedPerson());
+            map.put("counterpartType", page.getRecords().get(i).getCounterpartType());
+            map.put("legalRepresentative", page.getRecords().get(i).getLegalRepresentative());
+            map.put("documentType", page.getRecords().get(i).getDocumentType());
+            map.put("documentNumber", page.getRecords().get(i).getDocumentNumber());
+            map.put("punishmentDecisionNumber", page.getRecords().get(i).getPunishmentDecisionNumber());
+            map.put("punishmentBasis", page.getRecords().get(i).getPunishmentBasis());
+            map.put("punishmentType", page.getRecords().get(i).getPunishmentType());
+            map.put("punishmentContent", page.getRecords().get(i).getPunishmentContent());
+            map.put("penaltyAmount", page.getRecords().get(i).getPenaltyAmount());
+            map.put("punishmentDecisionTime", page.getRecords().get(i).getPunishmentDecisionTime());
+            map.put("punishmentValidityDate", page.getRecords().get(i).getPunishmentValidityDate());
+            map.put("publicityDeadline", page.getRecords().get(i).getPublicityDeadline());
+            map.put("punishmentAuthority", page.getRecords().get(i).getPunishmentAuthority());
+            list.add(map);
+        }
+        return new CommonPage<>(list, page.getTotal(), pageSize, pageNum);
+    }
+
+    @Override
+    public void updateLawSituation(DemLawSituation demLawSituation) {
+        this.updateById(demLawSituation);
+    }
+
+    @Override
+    public void delLawSituation(Integer id) {
+        DemLawSituation demLawSituation = new DemLawSituation();
+        demLawSituation.setId(id);
+        demLawSituation.setEnable(1);
+        this.updateById(demLawSituation);
+    }
+
+}

+ 45 - 0
service-fire/service-fire-biz/src/main/resources/mapper/fire/DemLawSituationMapper.xml

@@ -0,0 +1,45 @@
+<?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.usky.fire.mapper.DemLawSituationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.fire.domain.DemLawSituation">
+        <id column="id" property="id" />
+        <result column="punished_person" property="punishedPerson" />
+        <result column="counterpart_name" property="counterpartName" />
+        <result column="counterpart_type" property="counterpartType" />
+        <result column="social_credit_code" property="socialCreditCode" />
+        <result column="registration_number" property="registrationNumber" />
+        <result column="organization_code" property="organizationCode" />
+        <result column="tax_registration_number" property="taxRegistrationNumber" />
+        <result column="company_certificate_number" property="companyCertificateNumber" />
+        <result column="organization_registration_number" property="organizationRegistrationNumber" />
+        <result column="legal_representative" property="legalRepresentative" />
+        <result column="representative_document_type" property="representativeDocumentType" />
+        <result column="representative_document_number" property="representativeDocumentNumber" />
+        <result column="document_type" property="documentType" />
+        <result column="document_number" property="documentNumber" />
+        <result column="punishment_decision_number" property="punishmentDecisionNumber" />
+        <result column="illegal_facts_content" property="illegalFactsContent" />
+        <result column="illegal_acts_type" property="illegalActsType" />
+        <result column="illegal_facts" property="illegalFacts" />
+        <result column="punishment_basis" property="punishmentBasis" />
+        <result column="punishment_type" property="punishmentType" />
+        <result column="punishment_content" property="punishmentContent" />
+        <result column="penalty_amount" property="penaltyAmount" />
+        <result column="illegal_income" property="illegalIncome" />
+        <result column="revocation_license" property="revocationLicense" />
+        <result column="punishment_decision_time" property="punishmentDecisionTime" />
+        <result column="punishment_validity_date" property="punishmentValidityDate" />
+        <result column="publicity_deadline" property="publicityDeadline" />
+        <result column="punishment_authority" property="punishmentAuthority" />
+        <result column="authority_credit_code" property="authorityCreditCode" />
+        <result column="data_source_company" property="dataSourceCompany" />
+        <result column="company_credit_code" property="companyCreditCode" />
+        <result column="remarks" property="remarks" />
+        <result column="information_matters" property="informationMatters" />
+        <result column="union_key" property="unionKey" />
+        <result column="enable" property="enable" />
+    </resultMap>
+
+</mapper>