Quellcode durchsuchen

通报模型配置

abai vor 1 Tag
Ursprung
Commit
9ec453d7ca

+ 104 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/controller/BjNotifyModelConfigController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.business.controller;
+
+import com.ruoyi.business.domain.bo.BjNotifyModelConfigBo;
+import com.ruoyi.business.service.IBjNotifyModelConfigService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.RequiredArgsConstructor;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.text.ParseException;
+import java.util.List;
+
+/**
+ * 通报模型配置查询
+ * 前端访问路由地址为:/business/notifyModelConfig
+ *
+ * @author libai
+ * @date 2025-11-03
+ */
+@Tag(name = "通报模型配置查询")
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/notifyModelConfig")
+public class BjNotifyModelConfigController extends BaseController {
+
+    @Resource
+    private IBjNotifyModelConfigService bjNotifyModelConfigService;
+
+    /**
+     * 通报模型配置查询列表
+     */
+    @Operation(summary = "查询通报模型配置查询列表")
+//    @SaCheckPermission("business:notifyModelConfig:list")
+    @GetMapping("/list")
+    public TableDataInfo list(BjNotifyModelConfigBo bo) {
+        return getDataTable(bjNotifyModelConfigService.queryPageList(bo));
+    }
+
+    /**
+     * 获取通报模型配置查询详细信息
+     *
+     * @param notifyModelConfigId 主键
+     */
+    @Operation(summary = "获取通报模型配置查询详细信息")
+//    @SaCheckPermission("business:notifyModelConfig:query")
+    @GetMapping("/{notifyModelConfigId}")
+    public AjaxResult getInfo(@PathVariable("notifyModelConfigId") String notifyModelConfigId) {
+        return success(bjNotifyModelConfigService.queryById(notifyModelConfigId));
+    }
+
+    /**
+     * 根据模型名称获取通报模型配置查询详细信息
+     */
+    @Operation(summary = "根据模型名称获取通报模型配置查询详细信息")
+//    @SaCheckPermission("business:notifyModelConfig:query")
+    @PostMapping("/getInfoByModelName")
+    public AjaxResult getInfoByModelName(@RequestBody BjNotifyModelConfigBo bo) {
+        return success(bjNotifyModelConfigService.queryByModelName(bo));
+    }
+
+    /**
+     * 新增通报模型配置
+     */
+    @Operation(summary = "新增通报模型配置")
+//    @RequiresPermissions("business:notifyModelConfig:add")
+    @Log(title = "通报模型配置", businessType = BusinessType.INSERT)
+    @PostMapping()
+    public AjaxResult add(@RequestBody BjNotifyModelConfigBo bo) throws ParseException {
+        return toAjax(bjNotifyModelConfigService.insertByBo(bo));
+    }
+
+    /**
+     * 修改通报模型配置
+     */
+    @Operation(summary = "修改通报模型配置")
+//    @RequiresPermissions("business:notifyModelConfig:edit")
+    @Log(title = "通报模型配置", businessType = BusinessType.UPDATE)
+    @PutMapping()
+    public AjaxResult edit(@RequestBody BjNotifyModelConfigBo bo) throws ParseException {
+        return toAjax(bjNotifyModelConfigService.updateByBo(bo));
+    }
+
+    /**
+     * 删除通报模型配置
+     *
+     * @param notifyModelConfigId 主键串
+     */
+    @Operation(summary = "删除通报模型配置")
+//    @RequiresPermissions("business:notifyModelConfig:remove")
+    @Log(title = "通报模型配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{notifyModelConfigId}")
+    public AjaxResult remove(@PathVariable("notifyModelConfigId") String[] notifyModelConfigId) {
+        return toAjax(bjNotifyModelConfigService.deleteWithValidByIds(List.of(notifyModelConfigId), true));
+    }
+
+}

+ 206 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/BjNotifyModelConfig.java

@@ -0,0 +1,206 @@
+package com.ruoyi.business.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 通报模型配置对象 bj_notify_model_config
+ *
+ * @author libai
+ * @date 2025-11-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("bj_notify_model_config")
+public class BjNotifyModelConfig extends BaseEntity {
+
+    /**
+     * 通报模型配置ID
+     */
+    @TableId("notify_model_config_id")
+    private String notifyModelConfigId;
+
+    /**
+     * 模型名称
+     */
+    private String modelName;
+
+    /**
+     * 模型子名称
+     */
+    private String modelChildrenName;
+
+    /**
+     * 业务数据来源
+     */
+    private String businessSource;
+
+    /**
+     * 通报标准
+     */
+    private String notifyStandard;
+
+    /**
+     * 申请范围
+     */
+    private String applyRange;
+
+    /**
+     * 报给机构
+     */
+    private String reportOrganization;
+
+    /**
+     * 检查范围
+     */
+    private String checkRange;
+
+    /**
+     * 检查类型
+     */
+    private String checkType;
+
+    /**
+     * 检查状态
+     */
+    private String checkStatus;
+
+    /**
+     * 检查结论
+     */
+    private String checkResult;
+
+    /**
+     * 检查内容
+     */
+    private String checkContent;
+
+    /**
+     * 船舶种类
+     */
+    private String shipSort;
+
+    /**
+     * 始发港
+     */
+    private String startHarbor;
+
+    /**
+     * 目的港
+     */
+    private String endHarbor;
+
+    /**
+     * 进出港
+     */
+    private String inOutPort;
+
+    /**
+     * 滞留
+     */
+    private String retention;
+
+    /**
+     * 效验结果描述
+     */
+    private String checkResultDesc;
+
+    /**
+     * 现场监督检查日期
+     */
+    private String localeCheckDate;
+
+    /**
+     * 申请日期
+     */
+    private String applyDate;
+
+    /**
+     * 船舶登记状态
+     */
+    private String shipRegisterStatus;
+
+    /**
+     * 列入时间范围
+     */
+    private String addDateRange;
+
+    /**
+     * 处罚决定时间
+     */
+    private String decisionDateRange;
+
+    /**
+     * 审核状态
+     */
+    private String auditStatus;
+
+    /**
+     * 案件状态
+     */
+    private String caseStatus;
+
+    /**
+     * 水域类别
+     */
+    private String waterAreaType;
+
+    /**
+     * 海内河船
+     */
+    private String inlandShips;
+
+    /**
+     * 海上案号和案由
+     */
+    private String seaCaseNoReason;
+
+    /**
+     * 内河案号和案由
+     */
+    private String inlandCaseNoReason;
+
+    /**
+     * 违法信息
+     */
+    private String lawInfo;
+
+    /**
+     * 注销原因
+     */
+    private String deletionReason;
+
+    /**
+     * 缺陷
+     */
+    private String defect;
+
+    /**
+     * 备注
+     */
+    private String memo;
+
+    /**
+     * 处理意见
+     */
+    private String handlingSuggestion;
+
+    /**
+     * 业务规则识别
+     */
+    private String businessRuleIdentification;
+
+    /**
+     * 业务规则识别样例
+     */
+    private String businessRuleIdentificationExample;
+
+    /**
+     * 删除标志  0:未删除  1:已删除
+     */
+    private String delFlag;
+
+}

+ 199 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/BjNotifyModelConfigBo.java

@@ -0,0 +1,199 @@
+package com.ruoyi.business.domain.bo;
+
+import com.ruoyi.common.core.web.domain.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 通报模型配置对象 bj_notify_model_config
+ *
+ * @author libai
+ * @date 2025-11-03
+ */
+@Schema(description = "通报模型配置业务对象")
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class BjNotifyModelConfigBo extends BaseEntity {
+
+    /**
+     * 通报模型配置ID
+     */
+    private String notifyModelConfigId;
+
+    /**
+     * 模型名称
+     */
+    private String modelName;
+
+    /**
+     * 模型子名称
+     */
+    private String modelChildrenName;
+
+    /**
+     * 业务数据来源
+     */
+    private String businessSource;
+
+    /**
+     * 通报标准
+     */
+    private String notifyStandard;
+
+    /**
+     * 申请范围
+     */
+    private String applyRange;
+
+    /**
+     * 报给机构
+     */
+    private String reportOrganization;
+
+    /**
+     * 检查范围
+     */
+    private String checkRange;
+
+    /**
+     * 检查类型
+     */
+    private String checkType;
+
+    /**
+     * 检查状态
+     */
+    private String checkStatus;
+
+    /**
+     * 检查结论
+     */
+    private String checkResult;
+
+    /**
+     * 检查结论
+     */
+    private String checkContent;
+
+    /**
+     * 船舶种类
+     */
+    private String shipSort;
+
+    /**
+     * 始发港
+     */
+    private String startHarbor;
+
+    /**
+     * 目的港
+     */
+    private String endHarbor;
+
+    /**
+     * 进出港
+     */
+    private String inOutPort;
+
+    /**
+     * 滞留
+     */
+    private String retention;
+
+    /**
+     * 效验结果描述
+     */
+    private String checkResultDesc;
+
+    /**
+     * 现场监督检查日期
+     */
+    private String localeCheckDate;
+
+    /**
+     * 申请日期
+     */
+    private String applyDate;
+
+    /**
+     * 船舶登记状态
+     */
+    private String shipRegisterStatus;
+
+    /**
+     * 列入时间范围
+     */
+    private String addDateRange;
+
+    /**
+     * 处罚决定时间
+     */
+    private String decisionDateRange;
+
+    /**
+     * 审核状态
+     */
+    private String auditStatus;
+
+    /**
+     * 案件状态
+     */
+    private String caseStatus;
+
+    /**
+     * 水域类别
+     */
+    private String waterAreaType;
+
+    /**
+     * 海内河船
+     */
+    private String inlandShips;
+
+    /**
+     * 海上案号和案由
+     */
+    private String seaCaseNoReason;
+
+    /**
+     * 内河案号和案由
+     */
+    private String inlandCaseNoReason;
+
+    /**
+     * 违法信息
+     */
+    private String lawInfo;
+
+    /**
+     * 注销原因
+     */
+    private String deletionReason;
+
+    /**
+     * 缺陷
+     */
+    private String defect;
+
+    /**
+     * 备注
+     */
+    private String memo;
+
+    /**
+     * 处理意见
+     */
+    private String handlingSuggestion;
+
+    /**
+     * 业务规则识别
+     */
+    private String businessRuleIdentification;
+
+    /**
+     * 业务规则识别样例
+     */
+    private String businessRuleIdentificationExample;
+
+}

+ 197 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/BjNotifyModelConfigVo.java

@@ -0,0 +1,197 @@
+package com.ruoyi.business.domain.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 通报模型配置对象 bj_notify_model_config
+ *
+ * @author libai
+ * @date 2025-11-03
+ */
+@Schema(description = "通报模型配置业务对象")
+@Data
+public class BjNotifyModelConfigVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 通报模型配置ID
+     */
+    private String notifyModelConfigId;
+
+    /**
+     * 模型名称
+     */
+    private String modelName;
+
+    /**
+     * 业务数据来源
+     */
+    private String businessSource;
+
+    /**
+     * 通报标准
+     */
+    private String notifyStandard;
+
+    /**
+     * 申请范围
+     */
+    private String applyRange;
+
+    /**
+     * 报给机构
+     */
+    private String reportOrganization;
+
+    /**
+     * 检查范围
+     */
+    private String checkRange;
+
+    /**
+     * 检查类型
+     */
+    private String checkType;
+
+    /**
+     * 检查状态
+     */
+    private String checkStatus;
+
+    /**
+     * 检查结论
+     */
+    private String checkResult;
+
+    /**
+     * 检查结论
+     */
+    private String checkContent;
+
+    /**
+     * 船舶种类
+     */
+    private String shipSort;
+
+    /**
+     * 始发港
+     */
+    private String startHarbor;
+
+    /**
+     * 目的港
+     */
+    private String endHarbor;
+
+    /**
+     * 进出港
+     */
+    private String inOutPort;
+
+    /**
+     * 滞留
+     */
+    private String retention;
+
+    /**
+     * 效验结果描述
+     */
+    private String checkResultDesc;
+
+    /**
+     * 现场监督检查日期
+     */
+    private String localeCheckDate;
+
+    /**
+     * 申请日期
+     */
+    private String applyDate;
+
+    /**
+     * 船舶登记状态
+     */
+    private String shipRegisterStatus;
+
+    /**
+     * 列入时间范围
+     */
+    private String addDateRange;
+
+    /**
+     * 处罚决定时间
+     */
+    private String decisionDateRange;
+
+    /**
+     * 审核状态
+     */
+    private String auditStatus;
+
+    /**
+     * 案件状态
+     */
+    private String caseStatus;
+
+    /**
+     * 水域类别
+     */
+    private String waterAreaType;
+
+    /**
+     * 海内河船
+     */
+    private String inlandShips;
+
+    /**
+     * 海上案号和案由
+     */
+    private String seaCaseNoReason;
+
+    /**
+     * 内河案号和案由
+     */
+    private String inlandCaseNoReason;
+
+    /**
+     * 违法信息
+     */
+    private String lawInfo;
+
+    /**
+     * 注销原因
+     */
+    private String deletionReason;
+
+    /**
+     * 缺陷
+     */
+    private String defect;
+
+    /**
+     * 备注
+     */
+    private String memo;
+
+    /**
+     * 处理意见
+     */
+    private String handlingSuggestion;
+
+    /**
+     * 业务规则识别
+     */
+    private String businessRuleIdentification;
+
+    /**
+     * 业务规则识别样例
+     */
+    private String businessRuleIdentificationExample;
+
+}

+ 27 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/mapper/BjNotifyModelConfigMapper.java

@@ -0,0 +1,27 @@
+package com.ruoyi.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.business.domain.BjNotifyModelConfig;
+import com.ruoyi.business.domain.bo.BjNotifyModelConfigBo;
+import com.ruoyi.business.domain.vo.BjNotifyModelConfigVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 通报模型配置查询Mapper接口
+ *
+ * @author libai
+ * @date 2025-11-03
+ */
+public interface BjNotifyModelConfigMapper extends BaseMapper<BjNotifyModelConfig> {
+
+    /**
+     * 通报模型配置查询列表
+     *
+     * @param bo 请求参数
+     * @return 列表
+     */
+    List<BjNotifyModelConfigVo> queryNotifyModelConfigList(@Param("bo") BjNotifyModelConfigBo bo);
+
+}

+ 60 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/IBjNotifyModelConfigService.java

@@ -0,0 +1,60 @@
+package com.ruoyi.business.service;
+
+import com.ruoyi.business.domain.bo.BjNotifyModelConfigBo;
+import com.ruoyi.business.domain.vo.BjNotifyModelConfigVo;
+
+import java.text.ParseException;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 通报模型配置信息查询Service接口
+ *
+ * @author libai
+ * @date 2025-10-28
+ */
+public interface IBjNotifyModelConfigService {
+
+    /**
+     * 查询通报模型配置信息查询
+     *
+     * @param id 主键
+     * @return 通报模型配置信息查询
+     */
+    BjNotifyModelConfigVo queryById(String id);
+
+    /**
+     * 分页查询通报模型配置信息查询列表
+     *
+     * @param bo 查询条件
+     * @return 通报模型配置信息查询分页列表
+     */
+    List<BjNotifyModelConfigVo> queryPageList(BjNotifyModelConfigBo bo);
+
+    /**
+     * 新增通报模型配置
+     *
+     * @param bo 通报模型配置
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(BjNotifyModelConfigBo bo) throws ParseException;
+
+    /**
+     * 修改通报模型配置
+     *
+     * @param bo 通报模型配置
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(BjNotifyModelConfigBo bo) throws ParseException;
+
+    /**
+     * 校验并批量删除通报模型配置信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid);
+
+    BjNotifyModelConfigVo queryByModelName(BjNotifyModelConfigBo bo);
+}

+ 130 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/BjNotifyModelConfigServiceImpl.java

@@ -0,0 +1,130 @@
+package com.ruoyi.business.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.IdUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.business.domain.BjNotifyModelConfig;
+import com.ruoyi.business.domain.bo.BjNotifyModelConfigBo;
+import com.ruoyi.business.domain.vo.BjNotifyModelConfigVo;
+import com.ruoyi.business.mapper.BjNotifyModelConfigMapper;
+import com.ruoyi.business.service.IBjNotifyModelConfigService;
+import com.ruoyi.common.core.exception.ServiceException;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.text.ParseException;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 通报模型配置信息查询Service业务层处理
+ *
+ * @author libai
+ * @date 2025-10-28
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class BjNotifyModelConfigServiceImpl implements IBjNotifyModelConfigService {
+
+    @Resource
+    private BjNotifyModelConfigMapper baseMapper;
+
+    /**
+     * 查询通报模型配置信息查询
+     *
+     * @param id 主键
+     * @return 通报模型配置信息查询
+     */
+    @Override
+    public BjNotifyModelConfigVo queryById(String id) {
+        BjNotifyModelConfig notifyModelConfig = baseMapper.selectById(id);
+        return BeanUtil.copyProperties(notifyModelConfig, BjNotifyModelConfigVo.class);
+    }
+
+    /**
+     * 分页查询通报模型配置信息查询列表
+     *
+     * @param bo 查询条件
+     * @return 通报模型配置信息查询分页列表
+     */
+    @Override
+    public List<BjNotifyModelConfigVo> queryPageList(BjNotifyModelConfigBo bo) {
+        return baseMapper.queryNotifyModelConfigList(bo);
+    }
+
+    /**
+     * 新增通报模型配置
+     *
+     * @param bo 通报模型配置
+     * @return 是否新增成功
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean insertByBo(BjNotifyModelConfigBo bo) throws ParseException {
+        BjNotifyModelConfig add = BeanUtil.copyProperties(bo, BjNotifyModelConfig.class);
+        String notifyModelConfigId = IdUtil.simpleUUID();
+        if (add != null) {
+            add.setNotifyModelConfigId(notifyModelConfigId);
+        }
+        validEntityBeforeSave(add);
+        return baseMapper.insert(add) > 0;
+    }
+
+    /**
+     * 修改通报模型配置
+     *
+     * @param bo 通报模型配置
+     * @return 是否修改成功
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean updateByBo(BjNotifyModelConfigBo bo) throws ParseException {
+        BjNotifyModelConfig update = BeanUtil.copyProperties(bo, BjNotifyModelConfig.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(BjNotifyModelConfig entity) {
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除通报模型配置信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) {
+        if (isValid) {
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteBatchIds(ids) > 0;
+    }
+
+    @Override
+    public BjNotifyModelConfigVo queryByModelName(BjNotifyModelConfigBo bo) {
+        if (StringUtils.isBlank(bo.getModelName()) && StringUtils.isBlank(bo.getModelChildrenName())) {
+            throw new ServiceException("模型名称和模型子名称不能为空");
+        }
+        List<BjNotifyModelConfig> notifyModelConfigList = baseMapper.selectList(Wrappers.<BjNotifyModelConfig>lambdaQuery()
+                .eq(BjNotifyModelConfig::getModelName, bo.getModelName())
+                .eq(BjNotifyModelConfig::getModelChildrenName, bo.getModelChildrenName()));
+        if (CollectionUtils.isNotEmpty(notifyModelConfigList)) {
+            return BeanUtil.copyProperties(notifyModelConfigList.get(0), BjNotifyModelConfigVo.class);
+        }
+        return new BjNotifyModelConfigVo();
+    }
+
+}