From eaad51f91c020d570ab4c24af31062023462b992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=84=E9=94=90=E6=B3=A2?= <10549902+zhuangruibo@user.noreply.gitee.com> Date: Fri, 22 May 2026 19:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A7=E6=B3=95=E7=AB=AF-=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../013-计划任务表设计.sql | 8 +- .../AppEnfCpSettingController.java | 40 +++- .../enforcement/AppEnfLoginController.java | 4 +- .../supervision/EfcodeCpPlanController.java | 6 - .../service/IEfcodeCpSettingService.java | 68 ++++++ .../impl/EfcodeCpSettingServiceImpl.java | 52 +++++ .../src/api/enforcement/plan.js | 19 ++ .../src/http/http.js | 2 +- .../enforcement/my/plan/cp_plan_edit.vue | 210 +++++++++++++++++- 9 files changed, 391 insertions(+), 18 deletions(-) diff --git a/script/sql/zfjd-refactoring-v1/013-计划任务表设计.sql b/script/sql/zfjd-refactoring-v1/013-计划任务表设计.sql index 95621ee9..5823760c 100644 --- a/script/sql/zfjd-refactoring-v1/013-计划任务表设计.sql +++ b/script/sql/zfjd-refactoring-v1/013-计划任务表设计.sql @@ -180,8 +180,8 @@ CREATE TABLE `efcode_cp_setting` /*初始化数据*/ INSERT INTO `efcode_cp_setting` (`id`, `setting_name`, `setting_value`, `remark`, `create_by`, `create_dept`) -VALUES ('CP_SETTING_SUBMIT_DEADLINE', '下阶段计划提交最晚时间', '26', '每月几号前需提交下阶段计划<=', 'admin', NULL), - ('CP_SETTING_AUTO_MATCH_START', '系统自动推荐匹配开始时间', '26', '系统自动推荐匹配的开始时间(号)>=', 'admin', +VALUES ('CP_SETTING_SUBMIT_DEADLINE', '下阶段计划提交最晚时间', '26', '每月几号前需提交下阶段计划<=', '0', NULL), + ('CP_SETTING_AUTO_MATCH_START', '系统自动推荐匹配开始时间', '26', '系统自动推荐匹配的开始时间(号)>=', '0', NULL), - ('CP_SETTING_MANUAL_MATCH_DAYS', '手工匹配距计划开始天数', '3', '手工匹配距离计划开始的天数>=', 'admin', NULL), - ('CP_MAX_UNION_UNIT', '单次联合单位最大数量', '3', '单次联合单位最大数量>=2', 'admin', NULL); + ('CP_SETTING_MANUAL_MATCH_DAYS', '手工匹配距计划开始天数', '3', '手工匹配距离计划开始的天数>=', '0', NULL), + ('CP_MAX_UNION_UNIT', '单次联合单位最大数量', '3', '单次联合单位最大数量>=2', '0', NULL); diff --git a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnfCpSettingController.java b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnfCpSettingController.java index e715eac6..2314752e 100644 --- a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnfCpSettingController.java +++ b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnfCpSettingController.java @@ -2,8 +2,11 @@ package com.zdxt.enforcementcode.controller.app.enforcement; import com.zdxt.enforcementcode.controller.web.supervision.EfcodeCpSettingController; import com.zdxt.enforcementcode.service.IEfcodeCpSettingService; +import org.dromara.common.core.domain.R; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * 行政执法检查计划-设置 @@ -16,7 +19,42 @@ import org.springframework.web.bind.annotation.*; @RequestMapping("/app-enf/cpSetting") public class AppEnfCpSettingController extends EfcodeCpSettingController { + private final IEfcodeCpSettingService efcodeCpSettingService; + public AppEnfCpSettingController(IEfcodeCpSettingService efcodeCpSettingService) { super(efcodeCpSettingService); + this.efcodeCpSettingService = efcodeCpSettingService; + } + + /** + * 获取下阶段计划提交最晚时间(每月几号前需提交下阶段计划<=) + */ + @GetMapping("/submitDeadline") + public R getSubmitDeadline() { + return R.ok(efcodeCpSettingService.getSubmitDeadline()); + } + + /** + * 获取系统自动推荐匹配开始时间(号) + */ + @GetMapping("/autoMatchStart") + public R getAutoMatchStart() { + return R.ok(efcodeCpSettingService.getAutoMatchStart()); + } + + /** + * 获取手工匹配距计划开始天数 + */ + @GetMapping("/manualMatchDays") + public R getManualMatchDays() { + return R.ok(efcodeCpSettingService.getManualMatchDays()); + } + + /** + * 获取单次联合单位最大数量 + */ + @GetMapping("/maxUnionUnit") + public R getMaxUnionUnit() { + return R.ok(efcodeCpSettingService.getMaxUnionUnit()); } } diff --git a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnfLoginController.java b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnfLoginController.java index 5e670ee5..4dba0fd4 100644 --- a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnfLoginController.java +++ b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnfLoginController.java @@ -81,7 +81,7 @@ public class AppEnfLoginController extends LoginController { // 7. 构建LoginUser并生成SaToken String token = doSaTokenLogin(user.getUserId(), user.getUserName(), user.getNickName(), - user.getDeptId(), "enforcement_user", "enforcement_app", "f0535c2a32ab4d0496ab9a699b2a7d36"); + user.getDeptId(), "app_user", "enforcement_app", "f0535c2a32ab4d0496ab9a699b2a7d36"); // 验证关键组织信息不能为空 @@ -115,7 +115,7 @@ public class AppEnfLoginController extends LoginController { data.put("organName", srzOrgan.getName()); data.put("bureauUnitId", bureauDept.getDeptId()); - data.put("bureauUnitName", bureauDept.getDeptId()); + data.put("bureauUnitName", bureauDept.getDeptName()); return R.ok(data); } diff --git a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/EfcodeCpPlanController.java b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/EfcodeCpPlanController.java index ce796392..859f62fb 100644 --- a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/EfcodeCpPlanController.java +++ b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/EfcodeCpPlanController.java @@ -42,7 +42,6 @@ public class EfcodeCpPlanController extends BaseController { /** * 查询行政执法检查计划-计划列表 */ - @SaCheckPermission("enforcementcode:cpPlan:list") @GetMapping("/list") public TableDataInfo list(EfcodeCpPlanBo bo, PageQuery pageQuery) { return efcodeCpPlanService.queryPageList(bo, pageQuery); @@ -51,7 +50,6 @@ public class EfcodeCpPlanController extends BaseController { /** * 导出行政执法检查计划-计划列表 */ - @SaCheckPermission("enforcementcode:cpPlan:export") @Log(title = "行政执法检查计划-计划", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(EfcodeCpPlanBo bo, HttpServletResponse response) { @@ -64,7 +62,6 @@ public class EfcodeCpPlanController extends BaseController { * * @param id 主键 */ - @SaCheckPermission("enforcementcode:cpPlan:query") @GetMapping("/{id}") public R getInfo(@NotNull(message = "主键不能为空") @PathVariable String id) { @@ -74,7 +71,6 @@ public class EfcodeCpPlanController extends BaseController { /** * 新增行政执法检查计划-计划 */ - @SaCheckPermission("enforcementcode:cpPlan:add") @Log(title = "行政执法检查计划-计划", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping() @@ -85,7 +81,6 @@ public class EfcodeCpPlanController extends BaseController { /** * 修改行政执法检查计划-计划 */ - @SaCheckPermission("enforcementcode:cpPlan:edit") @Log(title = "行政执法检查计划-计划", businessType = BusinessType.UPDATE) @RepeatSubmit() @PutMapping() @@ -98,7 +93,6 @@ public class EfcodeCpPlanController extends BaseController { * * @param ids 主键串 */ - @SaCheckPermission("enforcementcode:cpPlan:remove") @Log(title = "行政执法检查计划-计划", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public R remove(@NotEmpty(message = "主键不能为空") diff --git a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IEfcodeCpSettingService.java b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IEfcodeCpSettingService.java index dd02c120..8911fe99 100644 --- a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IEfcodeCpSettingService.java +++ b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IEfcodeCpSettingService.java @@ -16,6 +16,46 @@ import java.util.List; */ public interface IEfcodeCpSettingService { + /** + * 设置项主键:下阶段计划提交最晚时间(每月几号前需提交下阶段计划<=) + */ + String SETTING_ID_SUBMIT_DEADLINE = "CP_SETTING_SUBMIT_DEADLINE"; + + /** + * 设置项主键:系统自动推荐匹配开始时间(号)>= + */ + String SETTING_ID_AUTO_MATCH_START = "CP_SETTING_AUTO_MATCH_START"; + + /** + * 设置项主键:手工匹配距离计划开始天数>= + */ + String SETTING_ID_MANUAL_MATCH_DAYS = "CP_SETTING_MANUAL_MATCH_DAYS"; + + /** + * 设置项主键:单次联合单位最大数量>=2 + */ + String SETTING_ID_MAX_UNION_UNIT = "CP_MAX_UNION_UNIT"; + + /** + * 默认值:下阶段计划提交最晚时间 + */ + int DEFAULT_SUBMIT_DEADLINE = 26; + + /** + * 默认值:系统自动推荐匹配开始时间(号) + */ + int DEFAULT_AUTO_MATCH_START = 26; + + /** + * 默认值:手工匹配距计划开始天数 + */ + int DEFAULT_MANUAL_MATCH_DAYS = 3; + + /** + * 默认值:单次联合单位最大数量 + */ + int DEFAULT_MAX_UNION_UNIT = 3; + /** * 查询行政执法检查计划-设置 * @@ -24,6 +64,34 @@ public interface IEfcodeCpSettingService { */ EfcodeCpSettingVo queryById(String id); + /** + * 获取下阶段计划提交最晚时间(每月几号前需提交下阶段计划<=) + * + * @return 数值,未配置或无法解析时返回默认值 {@link #DEFAULT_SUBMIT_DEADLINE} + */ + Integer getSubmitDeadline(); + + /** + * 获取系统自动推荐匹配开始时间(号) + * + * @return 数值,未配置或无法解析时返回默认值 {@link #DEFAULT_AUTO_MATCH_START} + */ + Integer getAutoMatchStart(); + + /** + * 获取手工匹配距计划开始天数 + * + * @return 数值,未配置或无法解析时返回默认值 {@link #DEFAULT_MANUAL_MATCH_DAYS} + */ + Integer getManualMatchDays(); + + /** + * 获取单次联合单位最大数量 + * + * @return 数值,未配置或无法解析时返回默认值 {@link #DEFAULT_MAX_UNION_UNIT} + */ + Integer getMaxUnionUnit(); + /** * 分页查询行政执法检查计划-设置列表 * diff --git a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EfcodeCpSettingServiceImpl.java b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EfcodeCpSettingServiceImpl.java index 6e0f46eb..909a2d87 100644 --- a/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EfcodeCpSettingServiceImpl.java +++ b/zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EfcodeCpSettingServiceImpl.java @@ -44,6 +44,58 @@ public class EfcodeCpSettingServiceImpl implements IEfcodeCpSettingService { return baseMapper.selectVoById(id); } + /** + * 获取下阶段计划提交最晚时间(每月几号前需提交下阶段计划<=) + */ + @Override + public Integer getSubmitDeadline() { + return getIntSetting(SETTING_ID_SUBMIT_DEADLINE, DEFAULT_SUBMIT_DEADLINE); + } + + /** + * 获取系统自动推荐匹配开始时间(号) + */ + @Override + public Integer getAutoMatchStart() { + return getIntSetting(SETTING_ID_AUTO_MATCH_START, DEFAULT_AUTO_MATCH_START); + } + + /** + * 获取手工匹配距计划开始天数 + */ + @Override + public Integer getManualMatchDays() { + return getIntSetting(SETTING_ID_MANUAL_MATCH_DAYS, DEFAULT_MANUAL_MATCH_DAYS); + } + + /** + * 获取单次联合单位最大数量 + */ + @Override + public Integer getMaxUnionUnit() { + return getIntSetting(SETTING_ID_MAX_UNION_UNIT, DEFAULT_MAX_UNION_UNIT); + } + + /** + * 根据设置主键获取整型配置值,不存在或解析失败时返回默认值 + * + * @param settingId 设置主键 + * @param defaultValue 默认值 + * @return 配置值 + */ + private Integer getIntSetting(String settingId, int defaultValue) { + EfcodeCpSettingVo vo = baseMapper.selectVoById(settingId); + if (vo == null || StringUtils.isBlank(vo.getSettingValue())) { + return defaultValue; + } + try { + return Integer.parseInt(vo.getSettingValue().trim()); + } catch (NumberFormatException e) { + log.warn("设置项[{}]的值[{}]无法解析为整数,返回默认值[{}]", settingId, vo.getSettingValue(), defaultValue); + return defaultValue; + } + } + /** * 分页查询行政执法检查计划-设置列表 * diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/plan.js b/zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/plan.js index ac2327fc..5d80c291 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/plan.js +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/plan.js @@ -20,3 +20,22 @@ export const editPlan = (params, success, error) => _put(planBaseUrl, params, su export const deletePlan = (ids, success, error) => _delete(planBaseUrl + "/" + ids, {}, success, error); // endregion + +// region 计划-设置接口 + +const settingBaseUrl = "/app-enf/cpSetting"; + +// 下阶段计划提交最晚时间(每月几号前需提交下阶段计划<=) +export const getSubmitDeadline = (success, error) => _get(settingBaseUrl + "/submitDeadline", {}, success, error); + +// endregion + +// region 企业检索接口 + +const enterpriseSearchBaseUrl = "/enforcementcode/enterpriseSearch"; + +// 按企业名称联合检索(>=3字符) +export const searchUnionByEnterpriseName = (enterpriseName, success, error) => + _get(enterpriseSearchBaseUrl + "/searchUnionByEnterpriseName", { enterpriseName }, success, error); + +// endregion diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/http/http.js b/zdxt-web-client/zdxt-efcode-enforcement-app/src/http/http.js index 63eec60e..91cc18f0 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/http/http.js +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/http/http.js @@ -22,7 +22,7 @@ http.interceptors.request.use( if (token) { config.headers['Authorization'] = 'Bearer ' + token; } - config.headers['clientid'] = 'enterprise'; + config.headers['clientid'] = 'f0535c2a32ab4d0496ab9a699b2a7d36'; return config }, err => { diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue index 7fbb3cd3..baa08861 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue @@ -12,7 +12,7 @@ + +
+
+  检索中... +
+ +
@@ -152,6 +173,7 @@ v-model="datePickerValue" title="选择计划时间" :min-date="minDate" + :max-date="maxDate" @confirm="onDateConfirm" @cancel="showDatePicker = false" /> @@ -162,16 +184,50 @@