87 changed files with 3978 additions and 578 deletions
@ -0,0 +1,28 @@ |
|||
package com.zdxt.enforcementnos.common; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/21 |
|||
*/ |
|||
@Data |
|||
public class LawEnforcer { |
|||
|
|||
@Schema(description = "执法人员id") |
|||
@NotNull(message = "执法人员id不能为空") |
|||
private Long lawEnforcerId; |
|||
|
|||
@Schema(description = "执法人员名称") |
|||
@NotEmpty(message = "执法人员名称不能为空") |
|||
private String lawEnforcerName; |
|||
|
|||
@Schema(description = "执法人员手机号") |
|||
private String lawEnforcerPhone; |
|||
|
|||
@Schema(description = "执法人员证件号") |
|||
private String lawEnforcerIdCard; |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package com.zdxt.enforcementnos.common; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/27 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskCommentItem { |
|||
|
|||
private String id; |
|||
|
|||
private String name; |
|||
|
|||
private Integer sortOrder; |
|||
|
|||
private Integer score; |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.zdxt.enforcementnos.common; |
|||
|
|||
import jakarta.validation.constraints.Max; |
|||
import jakarta.validation.constraints.Min; |
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
@Data |
|||
public class PageParam implements Serializable { |
|||
|
|||
private static final Integer PAGE_NO = 1; |
|||
private static final Integer PAGE_SIZE = 10; |
|||
|
|||
|
|||
@NotNull(message = "页码不能为空") |
|||
@Min(value = 1, message = "页码最小值为 1") |
|||
private Integer pageNo = PAGE_NO; |
|||
|
|||
|
|||
@NotNull(message = "每页条数不能为空") |
|||
@Min(value = 1, message = "每页条数最小值为 1") |
|||
@Max(value = 200, message = "每页条数最大值为 200") |
|||
private Integer pageSize = PAGE_SIZE; |
|||
|
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
package com.zdxt.enforcementnos.common; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/21 |
|||
*/ |
|||
@Data |
|||
public class TaskProclamation { |
|||
|
|||
@Schema(description = "文件名") |
|||
@NotEmpty(message = "文件名不能为空") |
|||
private String fileName; |
|||
|
|||
@Schema(description = "文件路径") |
|||
@NotEmpty(message = "文件路径不能为空") |
|||
private String filePath; |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.zdxt.enforcementnos.common.commonenum; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Getter; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/25 |
|||
*/ |
|||
@Getter |
|||
@AllArgsConstructor |
|||
public enum CheckResultEnum { |
|||
|
|||
COMPLETED(0, "已完成"), |
|||
PENDING_VERIFICATION(1, "转为待核实处置案件"), |
|||
RETURNED_FOR_CORRECTION(2, "退回企业补正材料"); |
|||
|
|||
private final Integer code; |
|||
private final String description; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
package com.zdxt.enforcementnos.common.commonenum; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Getter; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/21 |
|||
*/ |
|||
@Getter |
|||
@AllArgsConstructor |
|||
public enum NosLawEnforcementTaskStatusEnum { |
|||
|
|||
ENTERPRISE_PROCESSING(1, "企业处理中", "待处理"), |
|||
RETURNED_FOR_CORRECTION(2, "退回企业补正", "待修改"), |
|||
PENDING_REVIEW(3, "待审核", "待审核"), |
|||
COMPLETED(4, "已办结", "已办结"), |
|||
COMPLETED_OVERDUE(5, "已办结(超期)", "超期"), |
|||
PENDING_ON_SITE_DISPOSAL(6, "待现场处置", "待现场处置"); |
|||
|
|||
private final Integer code; |
|||
|
|||
/** |
|||
* 执法端任务状态名称 |
|||
*/ |
|||
private final String description; |
|||
|
|||
/** |
|||
* 企业端任务状态名称 |
|||
*/ |
|||
private final String entDescription; |
|||
|
|||
public static String getDescriptionByCode(Integer code) { |
|||
for (NosLawEnforcementTaskStatusEnum value : values()) { |
|||
if (value.code.equals(code)) { |
|||
return value.description; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public static String getEntDescriptionByCode(Integer code) { |
|||
for (NosLawEnforcementTaskStatusEnum value : values()) { |
|||
if (value.code.equals(code)) { |
|||
return value.entDescription; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
package com.zdxt.enforcementnos.common.commonenum; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Getter; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/25 |
|||
*/ |
|||
@Getter |
|||
@AllArgsConstructor |
|||
public enum NosLawEnforcementTaskTypeEnum { |
|||
|
|||
ADMIN_INSPECTION(1, "行政检查"), |
|||
MATERIAL_FILING(2, "材料备案"), |
|||
MATERIAL_VERIFICATION(3, "材料验证"), |
|||
PENDING_VERIFICATION_CASE(4, "待核实案件"), |
|||
PATROL(5, "巡查"); |
|||
|
|||
private final Integer code; |
|||
|
|||
private final String name; |
|||
|
|||
|
|||
// 查询传入的code是否存在
|
|||
public static NosLawEnforcementTaskTypeEnum getByCode(Integer code) { |
|||
for (NosLawEnforcementTaskTypeEnum value : values()) { |
|||
if (value.code.equals(code)) { |
|||
return value; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public static String getNameByCode(Integer code) { |
|||
for (NosLawEnforcementTaskTypeEnum value : values()) { |
|||
if (value.code.equals(code)) { |
|||
return value.name; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
package com.zdxt.enforcementnos.common.commonenum; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Getter; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Getter |
|||
@AllArgsConstructor |
|||
public enum NosTaskCommentStatusEnum { |
|||
|
|||
NOT_COMMENT(0, "未评价"), |
|||
COMMENTED(1, "已评价"); |
|||
|
|||
private final Integer code; |
|||
|
|||
private final String message; |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
package com.zdxt.enforcementnos.common.commonenum; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Getter; |
|||
|
|||
/** |
|||
* |
|||
* @author msy |
|||
* @Date: 2026/5/25 |
|||
*/ |
|||
@Getter |
|||
@AllArgsConstructor |
|||
public enum PlatformTypeEnums { |
|||
|
|||
SUPERVISION(1, "监督端"), |
|||
ENFORCEMENT(2, "执法端"), |
|||
ENTERPRISE(3, "企业端"); |
|||
|
|||
private final Integer key; |
|||
|
|||
private final String value; |
|||
|
|||
public static String getValueByKey(Integer key) { |
|||
if (key == null) { |
|||
return ""; |
|||
} |
|||
PlatformTypeEnums[] enums = PlatformTypeEnums.values(); |
|||
for (PlatformTypeEnums platformType : enums) { |
|||
if (platformType.getKey().equals(key)) { |
|||
return platformType.getValue(); |
|||
} |
|||
} |
|||
return ""; |
|||
} |
|||
} |
|||
@ -1,99 +0,0 @@ |
|||
package com.zdxt.enforcementnos.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import lombok.RequiredArgsConstructor; |
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import jakarta.validation.constraints.*; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|||
import org.dromara.common.log.annotation.Log; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.log.enums.BusinessType; |
|||
import org.dromara.common.excel.utils.ExcelUtil; |
|||
import com.zdxt.enforcementnos.domain.vo.TestEnfDemoVo; |
|||
import com.zdxt.enforcementnos.domain.bo.TestEnfDemoBo; |
|||
import com.zdxt.enforcementnos.service.ITestEnfDemoService; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* enf测试单 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-19 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/enforcementcode/enfDemo") |
|||
public class TestEnfDemoController extends BaseController { |
|||
|
|||
private final ITestEnfDemoService testEnfDemoService; |
|||
|
|||
/** |
|||
* 查询enf测试单列表 |
|||
*/ |
|||
@GetMapping("/list") |
|||
public TableDataInfo<TestEnfDemoVo> list(TestEnfDemoBo bo, PageQuery pageQuery) { |
|||
return testEnfDemoService.queryPageList(bo, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 导出enf测试单列表 |
|||
*/ |
|||
@Log(title = "enf测试单", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(TestEnfDemoBo bo, HttpServletResponse response) { |
|||
List<TestEnfDemoVo> list = testEnfDemoService.queryList(bo); |
|||
ExcelUtil.exportExcel(list, "enf测试单", TestEnfDemoVo.class, response); |
|||
} |
|||
|
|||
/** |
|||
* 获取enf测试单详细信息 |
|||
* |
|||
* @param id 主键 |
|||
*/ |
|||
@GetMapping("/{id}") |
|||
public R<TestEnfDemoVo> getInfo(@NotNull(message = "主键不能为空") |
|||
@PathVariable Long id) { |
|||
return R.ok(testEnfDemoService.queryById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增enf测试单 |
|||
*/ |
|||
@Log(title = "enf测试单", businessType = BusinessType.INSERT) |
|||
@RepeatSubmit() |
|||
@PostMapping() |
|||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TestEnfDemoBo bo) { |
|||
return toAjax(testEnfDemoService.insertByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 修改enf测试单 |
|||
*/ |
|||
@Log(title = "enf测试单", businessType = BusinessType.UPDATE) |
|||
@RepeatSubmit() |
|||
@PutMapping() |
|||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestEnfDemoBo bo) { |
|||
return toAjax(testEnfDemoService.updateByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 删除enf测试单 |
|||
* |
|||
* @param ids 主键串 |
|||
*/ |
|||
@Log(title = "enf测试单", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
|||
@PathVariable Long[] ids) { |
|||
return toAjax(testEnfDemoService.deleteWithValidByIds(List.of(ids), true)); |
|||
} |
|||
} |
|||
@ -0,0 +1,39 @@ |
|||
package com.zdxt.enforcementnos.controller.app.enforcement; |
|||
|
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementFilingDetailVO; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementFilingService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import jakarta.annotation.Resource; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/8 |
|||
*/ |
|||
@Tag(name = "执法端 - 非现场执法备案") |
|||
@Validated |
|||
@RestController |
|||
@RequestMapping("/enf-app/nos-law-enforcement-filing") |
|||
public class EnfNosLawEnforcementFilingController { |
|||
|
|||
@Resource |
|||
private NosLawEnforcementFilingService nosLawEnforcementFilingService; |
|||
|
|||
|
|||
/** |
|||
* 获取当前用户所属执法单位备案 |
|||
* @return 备案详情 |
|||
*/ |
|||
@Operation(summary = "获取当前用户所属执法单位备案") |
|||
@Parameter(name = "id", description = "备案id", required = true) |
|||
@GetMapping("/detail") |
|||
public R<NosLawEnforcementFilingDetailVO> getFiling() { |
|||
return R.ok(nosLawEnforcementFilingService.getFiling()); |
|||
} |
|||
} |
|||
@ -0,0 +1,112 @@ |
|||
package com.zdxt.enforcementnos.controller.app.enforcement; |
|||
|
|||
|
|||
import com.zdxt.enforcementnos.common.PageParam; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementTaskApproveBO; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementTaskPageBO; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementTaskSaveBO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementCommentTaskPageVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskDetailVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskPageVO; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import jakarta.annotation.Resource; |
|||
import jakarta.validation.Valid; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
/** |
|||
* 执法端非现场执法任务控制器 |
|||
* @author msy |
|||
* @Date: 2026/5/22 |
|||
*/ |
|||
@Tag(name = "执法端 - 非现场执法任务") |
|||
@Validated |
|||
@RestController |
|||
@RequestMapping("/app-enf/nos-law-enforcement-task") |
|||
public class EnfNosLawEnforcementTaskController { |
|||
|
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskService nosLawEnforcementTaskService; |
|||
|
|||
|
|||
/** |
|||
* 分页查询非现场执法任务 |
|||
* @param bo 查询参数 |
|||
* @return 分页结果 |
|||
*/ |
|||
@Operation(summary = "分页查询非现场执法任务") |
|||
@PostMapping("/page") |
|||
public TableDataInfo<NosLawEnforcementTaskPageVO> queryPageTask(@RequestBody @Valid NosLawEnforcementTaskPageBO bo) { |
|||
return nosLawEnforcementTaskService.queryPageTask(bo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 新增非现场执法任务 |
|||
* @param bo 新增参数 |
|||
* @return 任务id |
|||
*/ |
|||
@Operation(summary = "新增非现场执法任务") |
|||
@PostMapping("/add") |
|||
public R<String> addTask(@RequestBody @Valid NosLawEnforcementTaskSaveBO bo) { |
|||
return R.ok(nosLawEnforcementTaskService.addTask(bo)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 获取非现场执法任务详情 |
|||
* @param taskId 任务id |
|||
* @return 任务详情 |
|||
*/ |
|||
@Operation(summary = "获取非现场执法任务详情") |
|||
@Parameter(name = "taskId", description = "任务id", required = true) |
|||
@GetMapping("/detail") |
|||
public R<NosLawEnforcementTaskDetailVO> getTaskDetail(@RequestParam String taskId) { |
|||
return R.ok(nosLawEnforcementTaskService.getTaskDetail(taskId)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 审核非现场执法任务 |
|||
* @param bo 审核参数 |
|||
* @return 是否成功 |
|||
*/ |
|||
@Operation(summary = "审核非现场执法任务") |
|||
@PostMapping("/approve") |
|||
public R<Boolean> approveTask(@RequestBody @Valid NosLawEnforcementTaskApproveBO bo) { |
|||
return R.ok(nosLawEnforcementTaskService.approveTask(bo)); |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 办结待核实案件 |
|||
* @param taskId 任务id |
|||
* @return 是否成功 |
|||
*/ |
|||
@Operation(summary = "办结待核实案件") |
|||
@Parameter(name = "taskId", description = "任务id", required = true) |
|||
@GetMapping("/complete/verification-task") |
|||
public R<Boolean> completeVerificationTask(@RequestParam("taskId") String taskId) { |
|||
return R.ok(nosLawEnforcementTaskService.completeVerificationTask(taskId)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 查询已评价的任务 |
|||
* @param pageParam 分页参数 |
|||
* @return 分页结果 |
|||
*/ |
|||
@Operation(summary = "查询已评价的任务") |
|||
@PostMapping("/has-comment/page") |
|||
public TableDataInfo<NosLawEnforcementCommentTaskPageVO> pageHasCommentTask(@RequestBody @Valid PageParam pageParam) { |
|||
return nosLawEnforcementTaskService.pageHasCommentTask(pageParam); |
|||
} |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
package com.zdxt.enforcementnos.controller.app.enforcement; |
|||
|
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskSourceVO; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskSourceService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import jakarta.annotation.Resource; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/27 |
|||
*/ |
|||
@Tag(name = "执法端 - 非现场执法任务任务来源") |
|||
@Validated |
|||
@RestController |
|||
@RequestMapping("/app-enf/task-source") |
|||
public class NosLawEnforcementTaskSourceController { |
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskSourceService nosLawEnforcementTaskSourceService; |
|||
|
|||
|
|||
/** |
|||
* 查询非现场执法项目任务来源列表 |
|||
* @return 任务来源列表 |
|||
*/ |
|||
@Operation(summary = "查询非现场执法项目任务来源列表") |
|||
@PostMapping("/list") |
|||
public R<List<NosLawEnforcementTaskSourceVO>> querySourceList() { |
|||
return R.ok(nosLawEnforcementTaskSourceService.querySourceList()); |
|||
} |
|||
|
|||
} |
|||
@ -1,4 +0,0 @@ |
|||
package com.zdxt.enforcementnos.controller.app.enforcement; |
|||
|
|||
public class c1 { |
|||
} |
|||
@ -0,0 +1,101 @@ |
|||
package com.zdxt.enforcementnos.controller.app.enterprise; |
|||
|
|||
|
|||
import com.zdxt.enforcementnos.common.PageParam; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementTaskCommentBO; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementTaskPageBO; |
|||
import com.zdxt.enforcementnos.domain.bo.SubmitNosLawEnforcementTaskItemBO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskByCommentStatusPageVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskDetailVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskPageVO; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import jakarta.annotation.Resource; |
|||
import jakarta.validation.Valid; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
/** |
|||
* 企业端非现场执法任务控制器 |
|||
* @author msy |
|||
* @Date: 2026/5/22 |
|||
*/ |
|||
@Tag(name = "企业端 - 非现场执法任务") |
|||
@Validated |
|||
@RestController |
|||
@RequestMapping("/app-ent/nos-law-enforcement-task") |
|||
public class EntNosLawEnforcementTaskController { |
|||
|
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskService nosLawEnforcementTaskService; |
|||
|
|||
|
|||
/** |
|||
* 企业端分页查询非现场执法任务 |
|||
* @param bo 查询参数 |
|||
* @return 分页结果 |
|||
*/ |
|||
@Operation(summary = "分页查询非现场执法任务") |
|||
@PostMapping("/page") |
|||
public TableDataInfo<NosLawEnforcementTaskPageVO> queryPageTask(@RequestBody @Valid NosLawEnforcementTaskPageBO bo) { |
|||
return nosLawEnforcementTaskService.queryPageTask(bo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 获取非现场执法任务详情 |
|||
* @param taskId 任务id |
|||
* @return 任务详情 |
|||
*/ |
|||
@Operation(summary = "获取非现场执法任务详情") |
|||
@Parameter(name = "taskId", description = "任务id", required = true) |
|||
@GetMapping("/detail") |
|||
public R<NosLawEnforcementTaskDetailVO> getTaskDetail(@RequestParam String taskId) { |
|||
return R.ok(nosLawEnforcementTaskService.getTaskDetail(taskId)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 提交非现场执法任务检查材料 |
|||
* @param bo 检查项 |
|||
* @return 提交结果 |
|||
*/ |
|||
@Operation(summary = "企业端提交非现场执法任务检查材料") |
|||
@PostMapping("/submit") |
|||
public R<Boolean> submitMaterials(@RequestBody @Valid SubmitNosLawEnforcementTaskItemBO bo) { |
|||
return R.ok(nosLawEnforcementTaskService.submitMaterials(bo)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 企业端评价任务 |
|||
* @param bo 评价参数 |
|||
* @return 评价结果 |
|||
*/ |
|||
@Operation(summary = "企业端评价任务") |
|||
@PostMapping("/comment") |
|||
public R<Boolean> commentTask(@RequestBody @Valid NosLawEnforcementTaskCommentBO bo) { |
|||
return R.ok(nosLawEnforcementTaskService.commentTask(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 根据评价状态查询当前企业任务 |
|||
* @param commentStatus 评价状态 |
|||
* @param pageParam 分页参数 |
|||
* @return 分页结果 |
|||
*/ |
|||
@Operation(summary = "根据评价状态查询当前企业任务") |
|||
@Parameter(name = "commentStatus", description = "评价状态(0-待评价,1-已评价)", required = true) |
|||
@GetMapping("/query/by-comment-status") |
|||
public TableDataInfo<NosLawEnforcementTaskByCommentStatusPageVO> queryByCommentStatus( |
|||
@RequestParam Integer commentStatus, |
|||
PageParam pageParam) { |
|||
return nosLawEnforcementTaskService.queryByCommentStatus(commentStatus, pageParam); |
|||
} |
|||
} |
|||
@ -0,0 +1,53 @@ |
|||
package com.zdxt.enforcementnos.controller.app.enterprise; |
|||
|
|||
import com.zdxt.enforcementnos.common.PageParam; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskMsgPageVO; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskMsgService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import jakarta.annotation.Resource; |
|||
import jakarta.validation.Valid; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* 企业端非现场执法任务消息控制器 |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Tag(name = "企业端 - 非现场执法任务消息") |
|||
@Validated |
|||
@RestController |
|||
@RequestMapping("/app-ent/nos-law-enforcement-task/msg") |
|||
public class EntNosLawEnforcementTaskMsgController { |
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskMsgService taskMsgService; |
|||
|
|||
|
|||
/** |
|||
* 分页查询非现场执法任务未读消息 |
|||
* @param pageParam 分页参数 |
|||
* @return TableDataInfo<NosLawEnforcementTaskMsgPageVO> |
|||
*/ |
|||
@Operation(summary = "分页查询非现场执法任务未读消息") |
|||
@PostMapping("/un-read/page") |
|||
public TableDataInfo<NosLawEnforcementTaskMsgPageVO> unReadTaskMsgPage(@RequestBody @Valid PageParam pageParam) { |
|||
return taskMsgService.unReadTaskMsgPage(pageParam); |
|||
} |
|||
|
|||
/** |
|||
* 查询未读消息数量 |
|||
* @return R<Integer> |
|||
*/ |
|||
@Operation(summary = "查询未读消息数量") |
|||
@PostMapping("/un-read/count") |
|||
public R<Integer> unReadTaskMsgCount() { |
|||
return R.ok(taskMsgService.unReadTaskMsgCount()); |
|||
} |
|||
} |
|||
@ -1,4 +0,0 @@ |
|||
package com.zdxt.enforcementnos.controller.app.enterprise; |
|||
|
|||
public class c1 { |
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
package com.zdxt.enforcementnos.controller.web.supervision; |
|||
|
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementFilingBo; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementFilingPageBO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementFilingDetailVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementFilingPageVO; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementFilingService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import jakarta.annotation.Resource; |
|||
import jakarta.validation.Valid; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/28 |
|||
*/ |
|||
@Tag(name = "监督端 - 非现场执法备案") |
|||
@Validated |
|||
@RestController |
|||
@RequestMapping("/web-sup/nos-law-enforcement-filing") |
|||
public class SupNosLawEnforcementFilingController { |
|||
|
|||
|
|||
@Resource |
|||
private NosLawEnforcementFilingService nosLawEnforcementFilingService; |
|||
|
|||
|
|||
/** |
|||
* 分页查询非现场执法备案 |
|||
* @param bo 查询参数 |
|||
* @return 分页结果 |
|||
*/ |
|||
@Operation(summary = "分页查询非现场执法备案") |
|||
@PostMapping("/page") |
|||
public TableDataInfo<NosLawEnforcementFilingPageVO> queryPageFiling(@RequestBody @Valid NosLawEnforcementFilingPageBO bo) { |
|||
return nosLawEnforcementFilingService.queryPageTask(bo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 获取非现场执法备案详情 |
|||
* @param id 备案id |
|||
* @return 备案详情 |
|||
*/ |
|||
@Operation(summary = "获取非现场执法备案详情") |
|||
@Parameter(name = "id", description = "备案id", required = true) |
|||
@GetMapping("/detail") |
|||
public R<NosLawEnforcementFilingDetailVO> getFilingDetail(@RequestParam String id) { |
|||
return R.ok(nosLawEnforcementFilingService.getFilingDetail(id)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 新增/编辑非现场执法备案 |
|||
* @param bo 参数 |
|||
* @return 结果 |
|||
*/ |
|||
@Operation(summary = "新增/编辑非现场执法备案") |
|||
@PostMapping("/save-or-edit") |
|||
public R<Boolean> saveOrEdit(@RequestBody @Valid NosLawEnforcementFilingBo bo) { |
|||
return R.ok(nosLawEnforcementFilingService.saveOrEdit(bo)); |
|||
} |
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
package com.zdxt.enforcementnos.controller.web.supervision; |
|||
|
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementTaskPageBO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskDetailVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskPageVO; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import jakarta.annotation.Resource; |
|||
import jakarta.validation.Valid; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/28 |
|||
*/ |
|||
@Tag(name = "监督端 - 非现场执法任务") |
|||
@Validated |
|||
@RestController |
|||
@RequestMapping("/web-sup/nos-law-enforcement-task") |
|||
public class SupNosLawEnforcementTaskController { |
|||
|
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskService nosLawEnforcementTaskService; |
|||
|
|||
|
|||
/** |
|||
* 分页查询非现场执法任务 |
|||
* @param bo 查询参数 |
|||
* @return 分页结果 |
|||
*/ |
|||
@Operation(summary = "分页查询非现场执法任务") |
|||
@PostMapping("/page") |
|||
public TableDataInfo<NosLawEnforcementTaskPageVO> queryPageTask(@RequestBody @Valid NosLawEnforcementTaskPageBO bo) { |
|||
return nosLawEnforcementTaskService.queryPageTask(bo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 获取非现场执法任务详情 |
|||
* @param taskId 任务id |
|||
* @return 任务详情 |
|||
*/ |
|||
@Operation(summary = "获取非现场执法任务详情") |
|||
@Parameter(name = "taskId", description = "任务id", required = true) |
|||
@GetMapping("/detail") |
|||
public R<NosLawEnforcementTaskDetailVO> getTaskDetail(@RequestParam String taskId) { |
|||
return R.ok(nosLawEnforcementTaskService.getTaskDetail(taskId)); |
|||
} |
|||
} |
|||
@ -1,4 +0,0 @@ |
|||
package com.zdxt.enforcementnos.controller.web.supervision; |
|||
|
|||
public class c1 { |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
|||
import com.zdxt.enforcementnos.common.LawEnforcer; |
|||
import lombok.Data; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 非现场执法评价消息表 |
|||
* @author msy |
|||
* @TableName nos_law_enforcement_comment_msg |
|||
*/ |
|||
@TableName(value ="nos_law_enforcement_comment_msg", autoResultMap = true) |
|||
@Data |
|||
public class NosLawEnforcementCommentMsg extends BaseEntity { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId(type = IdType.ASSIGN_ID) |
|||
private String id; |
|||
|
|||
/** |
|||
* 任务id |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 任务类别(1-行政检查、2-材料备案、3-材料验证、4-待核实案件) |
|||
*/ |
|||
private Integer taskType; |
|||
|
|||
/** |
|||
* 企业id |
|||
*/ |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String lawEnforcementAgencyId; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 执法人员 |
|||
*/ |
|||
@TableField(typeHandler = JacksonTypeHandler.class) |
|||
private List<LawEnforcer> lawEnforcer; |
|||
|
|||
/** |
|||
* 评价状态 |
|||
*/ |
|||
private Integer commentStatus; |
|||
|
|||
/** |
|||
* 评价时间 |
|||
*/ |
|||
private Date commentTime; |
|||
|
|||
/** |
|||
* 办结时间 |
|||
*/ |
|||
private Date checkTime; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否,1-是 |
|||
*/ |
|||
@TableLogic(delval = "1", value = "0") |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位id |
|||
*/ |
|||
private String organId; |
|||
} |
|||
@ -0,0 +1,64 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 非现场执法备案表 |
|||
* @author msy |
|||
*/ |
|||
@TableName(value ="nos_law_enforcement_filing") |
|||
@Data |
|||
public class NosLawEnforcementFiling extends BaseEntity { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId(type = IdType.ASSIGN_ID) |
|||
private String id; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String lawEnforcementAgencyId; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 法制材料 |
|||
*/ |
|||
private String legalMaterials; |
|||
|
|||
/** |
|||
* 技术材料 |
|||
*/ |
|||
private String technicalMaterials; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否,1-是 |
|||
*/ |
|||
@TableLogic(delval = "1", value = "0") |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位id |
|||
*/ |
|||
private String organId; |
|||
} |
|||
@ -0,0 +1,153 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
|||
import com.zdxt.enforcementnos.common.TaskProclamation; |
|||
import lombok.Data; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 非现场执法任务表 |
|||
* @author msy |
|||
*/ |
|||
@TableName(value ="nos_law_enforcement_task", autoResultMap = true) |
|||
@Data |
|||
public class NosLawEnforcementTask extends BaseEntity { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId(type = IdType.ASSIGN_ID) |
|||
private String id; |
|||
|
|||
/** |
|||
* 公告 |
|||
*/ |
|||
@TableField(typeHandler = JacksonTypeHandler.class) |
|||
private List<TaskProclamation> proclamation; |
|||
|
|||
/** |
|||
* 任务编号 |
|||
*/ |
|||
private String taskNo; |
|||
|
|||
/** |
|||
* 任务来源id |
|||
*/ |
|||
private String taskSourceId; |
|||
|
|||
/** |
|||
* 任务来源名称 |
|||
*/ |
|||
private String taskSourceName; |
|||
|
|||
/** |
|||
* 企业id |
|||
*/ |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 统一社会信用代码 |
|||
*/ |
|||
private String usciCode; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String lawEnforcementAgencyId; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 待核实处置案件原类别id |
|||
*/ |
|||
private Integer taskOriginalTypeId; |
|||
|
|||
/** |
|||
* 类别id |
|||
*/ |
|||
private Integer taskTypeId; |
|||
|
|||
/** |
|||
* 执法事项 |
|||
*/ |
|||
private String lawEnforcementMatters; |
|||
|
|||
/** |
|||
* 执法依据 |
|||
*/ |
|||
@TableField(typeHandler = JacksonTypeHandler.class) |
|||
private List<String> legalBasis; |
|||
|
|||
/** |
|||
* 截止日期 |
|||
*/ |
|||
private Date deadline; |
|||
|
|||
/** |
|||
* 企业处理时间 |
|||
*/ |
|||
private Date enterpriseHandleTime; |
|||
|
|||
/** |
|||
* 检查结果(0-已完成,1-转为待核实处置案件,2-退回企业补正材料) |
|||
*/ |
|||
private Integer checkResult; |
|||
|
|||
/** |
|||
* 检查时间 |
|||
*/ |
|||
private Date checkTime; |
|||
|
|||
/** |
|||
* 任务状态 |
|||
*/ |
|||
private Integer taskStatus; |
|||
|
|||
/** |
|||
* 过期通知(0-未发送,1-已发送) |
|||
*/ |
|||
private Integer expirationNotice; |
|||
|
|||
/** |
|||
* 是否评价(0-未评价,1-已评价) |
|||
*/ |
|||
private Integer isEvaluation; |
|||
|
|||
/** |
|||
* 评价时间 |
|||
*/ |
|||
private Date commentTime; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否,1-是 |
|||
*/ |
|||
@TableLogic(delval = "1", value = "0") |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位id |
|||
*/ |
|||
private String organId; |
|||
} |
|||
@ -0,0 +1,60 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/5 |
|||
*/ |
|||
@TableName(value ="nos_law_enforcement_task_comment") |
|||
@Data |
|||
public class NosLawEnforcementTaskComment extends BaseEntity { |
|||
|
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId(type = IdType.ASSIGN_ID) |
|||
private String id; |
|||
|
|||
/** |
|||
* 非现场执法任务id |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 满意度(0-满意,1-一般,2-不满意) |
|||
*/ |
|||
private Integer satisfaction; |
|||
|
|||
/** |
|||
* 原因 |
|||
*/ |
|||
private String reason; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否,1-是 |
|||
*/ |
|||
@TableLogic(delval = "1", value = "0") |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位id |
|||
*/ |
|||
private String organId; |
|||
} |
|||
@ -0,0 +1,70 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
|||
import lombok.Data; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 非现场执法任务项 |
|||
* @TableName nos_law_enforcement_task_item |
|||
*/ |
|||
@TableName(value ="nos_law_enforcement_task_item", autoResultMap = true) |
|||
@Data |
|||
public class NosLawEnforcementTaskItem extends BaseEntity { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId(type = IdType.ASSIGN_ID) |
|||
private String id; |
|||
|
|||
/** |
|||
* 非现场执法任务id |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 检查项名称 |
|||
*/ |
|||
private String itemName; |
|||
|
|||
/** |
|||
* 检查项值 |
|||
*/ |
|||
@TableField(typeHandler = JacksonTypeHandler.class) |
|||
private List<String> itemValue; |
|||
|
|||
/** |
|||
* 是否通过(0-有异议,1-通过) |
|||
*/ |
|||
private Integer pass; |
|||
|
|||
/** |
|||
* 异议原因 |
|||
*/ |
|||
private String reason; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否,1-是 |
|||
*/ |
|||
@TableLogic(delval = "1", value = "0") |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位id |
|||
*/ |
|||
private String organId; |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 非现场执法任务关联执法人员表 |
|||
* @TableName nos_law_enforcement_task_law_enforcer_relation |
|||
*/ |
|||
@TableName(value ="nos_law_enforcement_task_law_enforcer_relation") |
|||
@Data |
|||
public class NosLawEnforcementTaskLawEnforcerRelation extends BaseEntity { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId(type = IdType.ASSIGN_ID) |
|||
private String id; |
|||
|
|||
/** |
|||
* 非现场执法任务id |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 执法人员id |
|||
*/ |
|||
private Long lawEnforcerId; |
|||
|
|||
/** |
|||
* 执法人员名称 |
|||
*/ |
|||
private String lawEnforcerName; |
|||
|
|||
/** |
|||
* 执法人员手机号 |
|||
*/ |
|||
private String lawEnforcerPhone; |
|||
|
|||
/** |
|||
* 执法人员证件号 |
|||
*/ |
|||
private String lawEnforcerIdCard; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否,1-是 |
|||
*/ |
|||
@TableLogic(delval = "1", value = "0") |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位id |
|||
*/ |
|||
private String organId; |
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 非现场执法任务消息表 |
|||
* @author msy |
|||
* @TableName nos_law_enforcement_task_msg |
|||
*/ |
|||
@TableName(value ="nos_law_enforcement_task_msg") |
|||
@Data |
|||
public class NosLawEnforcementTaskMsg extends BaseEntity { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId(type = IdType.ASSIGN_ID) |
|||
private String id; |
|||
|
|||
/** |
|||
* 任务id |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 任务类别(1-行政检查、2-材料备案、3-材料验证、4-待核实案件) |
|||
*/ |
|||
private Integer taskType; |
|||
|
|||
/** |
|||
* 消息标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 企业id |
|||
*/ |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String lawEnforcementAgencyId; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 截止时间 |
|||
*/ |
|||
private Date deadline; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否,1-是 |
|||
*/ |
|||
@TableLogic(delval = "1", value = "0") |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位id |
|||
*/ |
|||
private String organId; |
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 非现场执法任务来源 |
|||
* @author msy |
|||
* @TableName nos_law_enforcement_task_source |
|||
*/ |
|||
@TableName(value ="nos_law_enforcement_task_source") |
|||
@Data |
|||
public class NosLawEnforcementTaskSource extends BaseEntity { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId(type = IdType.ASSIGN_ID) |
|||
private String id; |
|||
|
|||
/** |
|||
* 任务来源名称 |
|||
*/ |
|||
private String sourceName; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否,1-是 |
|||
*/ |
|||
@TableLogic(delval = "1", value = "0") |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位id |
|||
*/ |
|||
private String organId; |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@TableName(value ="sys_message_view_log") |
|||
@Data |
|||
public class SysMessageViewLog extends BaseEntity { |
|||
|
|||
@TableId(type = IdType.ASSIGN_ID) |
|||
private String id; |
|||
|
|||
private String sourceId; |
|||
|
|||
private Integer platformType; |
|||
|
|||
private Integer sourceType; |
|||
|
|||
private String companyId; |
|||
|
|||
private String creditCode; |
|||
|
|||
private String bureauDeptId; |
|||
|
|||
private String organId; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否,1-是 |
|||
*/ |
|||
@TableLogic(delval = "1", value = "0") |
|||
private Integer isDelete; |
|||
|
|||
private String remark; |
|||
} |
|||
@ -1,83 +0,0 @@ |
|||
package com.zdxt.enforcementnos.domain; |
|||
|
|||
import org.dromara.common.tenant.core.TenantEntity; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.io.Serial; |
|||
|
|||
/** |
|||
* enf测试单对象 test_enf_demo |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@TableName("test_enf_demo") |
|||
public class TestEnfDemo extends TenantEntity { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
@TableId(value = "id") |
|||
private Long id; |
|||
|
|||
/** |
|||
* 文本 |
|||
*/ |
|||
private String enfText; |
|||
|
|||
/** |
|||
* 长文本 |
|||
*/ |
|||
private String enfContent; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private Long deptId; |
|||
|
|||
/** |
|||
* 用户id |
|||
*/ |
|||
private Long userId; |
|||
|
|||
/** |
|||
* 排序号 |
|||
*/ |
|||
private Long orderNum; |
|||
|
|||
/** |
|||
* key键 |
|||
*/ |
|||
private String testKey; |
|||
|
|||
/** |
|||
* 值 |
|||
*/ |
|||
private String value; |
|||
|
|||
/** |
|||
* 版本 |
|||
*/ |
|||
@Version |
|||
private Long version; |
|||
|
|||
/** |
|||
* 执法部门ID |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
@TableLogic |
|||
private Long delFlag; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/8 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementFilingBo { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@Schema(description = "id", example = "1") |
|||
private String id; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
@NotEmpty(message = "执法单位id不能为空") |
|||
@Schema(description = "执法单位id", example = "1") |
|||
private String lawEnforcementAgencyId; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@NotEmpty(message = "执法单位名称不能为空") |
|||
@Schema(description = "执法单位名称", example = "1") |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 法制材料 |
|||
*/ |
|||
@NotEmpty(message = "法制材料不能为空") |
|||
@Schema(description = "法制材料", example = "http://a.jpg") |
|||
private String legalMaterials; |
|||
|
|||
/** |
|||
* 技术材料 |
|||
*/ |
|||
@NotEmpty(message = "技术材料不能为空") |
|||
@Schema(description = "技术材料", example = "http://a.jpg") |
|||
private String technicalMaterials; |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import com.zdxt.enforcementnos.common.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/8 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementFilingPageBO extends PageParam { |
|||
|
|||
@Schema(description = "开始时间", example = "2026-05-28 00:00:00") |
|||
private Date startTime; |
|||
|
|||
@Schema(description = "结束时间", example = "2026-05-28 23:59:59") |
|||
private Date endTime; |
|||
|
|||
@Schema(description = "执法单位名称", example = "1") |
|||
private String lawEnforcementAgency; |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/25 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskApproveBO { |
|||
|
|||
@NotEmpty(message = "任务id不能为空") |
|||
@Schema(description = "任务id", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String taskId; |
|||
|
|||
@NotEmpty(message = "检查项列表不能为空") |
|||
@Schema(description = "检查项列表", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private List<NosLawEnforcementTaskItemApproveBO> itemList; |
|||
|
|||
@NotNull(message = "检查结果不能为空") |
|||
@Schema(description = "检查结果", example = "0", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private Integer checkResult; |
|||
|
|||
@Schema(description = "补正时限(检查结果为:退回企业补正材料时必传)", example = "2026-05-25", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private Date deadline; |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/27 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskCommentBO { |
|||
|
|||
@Schema(description = "任务id", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "任务id不能为空") |
|||
private String taskId; |
|||
|
|||
@NotNull(message = "满意度不能为空") |
|||
@Schema(description = "满意度(0-满意,1-一般,2-不满意)", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private Integer satisfaction; |
|||
|
|||
@Schema(description = "不满意原因", example = "不满意") |
|||
private String reason; |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/27 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskCommentItemBO { |
|||
|
|||
@Schema(description = "评价项id", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "评价项id不能为空") |
|||
private String id; |
|||
|
|||
@Schema(description = "评价项分数", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "评价项分数不能为空") |
|||
private Integer score; |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/25 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskItemApproveBO { |
|||
|
|||
@NotEmpty(message = "检查项id不能为空") |
|||
@Schema(description = "检查项id", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String itemId; |
|||
|
|||
@NotEmpty(message = "是否通过不能为空") |
|||
@Schema(description = "是否通过", example = "true", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private Boolean pass; |
|||
|
|||
@Schema(description = "不通过原因", example = "无") |
|||
private String reason; |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import jakarta.validation.constraints.Size; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/22 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskItemBO { |
|||
|
|||
/** |
|||
* 检查项id |
|||
*/ |
|||
@Schema(description = "检查项id", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "检查项id不能为空") |
|||
private String id; |
|||
|
|||
/** |
|||
* 检查项值 |
|||
*/ |
|||
@Schema(description = "检查项值", example = "['http://a.jpg']", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@Size(min = 1, max = 30, message = "提交的检查项文件最少上传1个,最多不能超过30个") |
|||
private List<String> itemValue; |
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
|
|||
import com.zdxt.enforcementnos.common.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/21 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskPageBO extends PageParam { |
|||
|
|||
/** |
|||
* 任务状态 |
|||
*/ |
|||
@Schema(description = "任务状态", example = "1") |
|||
private Integer taskStatus; |
|||
|
|||
/** |
|||
* 类别id |
|||
*/ |
|||
@Schema(description = "类别id", example = "1") |
|||
private Integer taskTypeId; |
|||
|
|||
/** |
|||
* 关键字搜索 |
|||
*/ |
|||
@Schema(description = "关键字搜索(任务编号、企业名称/执法单位名称)", example = "1") |
|||
private String keywords; |
|||
|
|||
@Schema(description = "任务开始时间", example = "2026-05-28") |
|||
private String startTime; |
|||
|
|||
@Schema(description = "任务截止时间", example = "2026-05-31") |
|||
private String endTime; |
|||
|
|||
@Schema(description = "执法单位名称", example = "深圳市税务局") |
|||
private String lawEnforcementAgency; |
|||
|
|||
@Schema(description = "执法人员名称", example = "1") |
|||
private String lawEnforcerName; |
|||
|
|||
@Schema(description = "企业名称", example = "深圳市xxx公司") |
|||
private String enterpriseName; |
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
|||
import com.zdxt.enforcementnos.common.LawEnforcer; |
|||
import com.zdxt.enforcementnos.common.TaskProclamation; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/22 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskSaveBO { |
|||
|
|||
/** |
|||
* 公告附件 |
|||
*/ |
|||
@Schema(description = "公告附件", example = "[]") |
|||
private List<TaskProclamation> proclamation; |
|||
|
|||
/** |
|||
* 任务来源id |
|||
*/ |
|||
@Schema(description = "任务来源id", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "任务来源不能为空") |
|||
private String taskSourceId; |
|||
|
|||
/** |
|||
* 企业id |
|||
*/ |
|||
@Schema(description = "企业id", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "企业id不能为空") |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
@Schema(description = "企业名称", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "企业名称不能为空") |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 统一社会信用代码 |
|||
*/ |
|||
@Schema(description = "统一社会信用代码", example = "1") |
|||
private String usciCode; |
|||
|
|||
/** |
|||
* 执法人员 |
|||
*/ |
|||
@Schema(description = "执法人员", example = "[]", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "执法人员不能为空") |
|||
private List<LawEnforcer> lawEnforcer; |
|||
|
|||
/** |
|||
* 类别id |
|||
*/ |
|||
@Schema(description = "类别id", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "类别不能为空") |
|||
private Integer taskTypeId; |
|||
|
|||
/** |
|||
* 执法事项 |
|||
*/ |
|||
@Schema(description = "执法事项", example = "1") |
|||
private String lawEnforcementMatters; |
|||
|
|||
/** |
|||
* 检查项名称 |
|||
*/ |
|||
@Schema(description = "检查项名称", example = "[]", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "检查项不能为空") |
|||
private List<String> checkItemList; |
|||
|
|||
/** |
|||
* 执法依据 |
|||
*/ |
|||
@Schema(description = "执法依据", example = "[]", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "执法依据不能为空") |
|||
@TableField(typeHandler = JacksonTypeHandler.class) |
|||
private List<String> legalBasis; |
|||
|
|||
/** |
|||
* 截止日期 |
|||
*/ |
|||
@Schema(description = "截止日期", example = "2026-05-22", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "截止日期不能为空") |
|||
private Date deadline; |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotEmpty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/22 |
|||
*/ |
|||
@Data |
|||
public class SubmitNosLawEnforcementTaskItemBO { |
|||
|
|||
/** |
|||
* 任务id |
|||
*/ |
|||
@Schema(description = "任务id", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "任务id不能为空") |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 任务检查项 |
|||
*/ |
|||
@Schema(description = "任务检查项", example = "[]", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "任务检查项不能为空") |
|||
private List<NosLawEnforcementTaskItemBO> taskItemList; |
|||
} |
|||
@ -1,70 +0,0 @@ |
|||
package com.zdxt.enforcementnos.domain.bo; |
|||
|
|||
import com.zdxt.enforcementnos.domain.TestEnfDemo; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
/** |
|||
* enf测试单业务对象 test_enf_demo |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@AutoMapper(target = TestEnfDemo.class, reverseConvertGenerate = false) |
|||
public class TestEnfDemoBo extends BaseEntity { |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
@NotNull(message = "主键不能为空", groups = { EditGroup.class }) |
|||
private Long id; |
|||
|
|||
/** |
|||
* 文本 |
|||
*/ |
|||
private String enfText; |
|||
|
|||
/** |
|||
* 长文本 |
|||
*/ |
|||
private String enfContent; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private Long deptId; |
|||
|
|||
/** |
|||
* 用户id |
|||
*/ |
|||
private Long userId; |
|||
|
|||
/** |
|||
* 排序号 |
|||
*/ |
|||
private Long orderNum; |
|||
|
|||
/** |
|||
* key键 |
|||
*/ |
|||
private String testKey; |
|||
|
|||
/** |
|||
* 值 |
|||
*/ |
|||
private String value; |
|||
|
|||
/** |
|||
* 执法部门ID |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import com.zdxt.enforcementnos.common.LawEnforcer; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/4 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementCommentTaskPageVO { |
|||
|
|||
@Schema(description = "任务id", example = "1") |
|||
private String id; |
|||
|
|||
@Schema(description = "标题", example = "标题") |
|||
private String title; |
|||
|
|||
@Schema(description = "企业名称", example = "企业名称") |
|||
private String enterpriseName; |
|||
|
|||
@Schema(description = "状态(0-未评价,1-已评价)", example = "1") |
|||
private Integer commentStatus; |
|||
|
|||
@Schema(description = "评论时间", example = "2026-06-04") |
|||
private Date commentTime; |
|||
|
|||
@Schema(description = "执法开始时间", example = "2026-06-04 09:00:00") |
|||
private Date startTime; |
|||
|
|||
@Schema(description = "执法结束时间", example = "2026-06-04 10:00:00") |
|||
private Date endTime; |
|||
|
|||
@Schema(description = "执法人员") |
|||
private List<LawEnforcer> lawEnforcer; |
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/8 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementFilingDetailVO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@Schema(description = "id", example = "1") |
|||
private String id; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
@Schema(description = "执法单位id", example = "1") |
|||
private String lawEnforcementAgencyId; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@Schema(description = "执法单位名称", example = "1") |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 法制材料 |
|||
*/ |
|||
@Schema(description = "法制材料", example = "http://a.jpg") |
|||
private String legalMaterials; |
|||
|
|||
/** |
|||
* 技术材料 |
|||
*/ |
|||
@Schema(description = "技术材料", example = "http://a.jpg") |
|||
private String technicalMaterials; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
@Schema(description = "创建时间", example = "2026-06-08 00:00:00") |
|||
private Date createTime; |
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/8 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementFilingPageVO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@Schema(description = "id", example = "1") |
|||
private String id; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
@Schema(description = "执法单位id", example = "1") |
|||
private String lawEnforcementAgencyId; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@Schema(description = "执法单位名称", example = "1") |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 法制材料 |
|||
*/ |
|||
@Schema(description = "法制材料", example = "http://a.jpg") |
|||
private String legalMaterials; |
|||
|
|||
/** |
|||
* 技术材料 |
|||
*/ |
|||
@Schema(description = "技术材料", example = "http://a.jpg") |
|||
private String technicalMaterials; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
@Schema(description = "创建时间", example = "2026-06-08 00:00:00") |
|||
private Date createTime; |
|||
|
|||
} |
|||
@ -0,0 +1,82 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import com.zdxt.enforcementnos.common.LawEnforcer; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskByCommentStatusPageVO { |
|||
|
|||
/** |
|||
* 任务id |
|||
*/ |
|||
@Schema(description = "任务id") |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 任务类别(1-行政检查、2-材料备案、3-材料验证、4-待核实案件) |
|||
*/ |
|||
@Schema(description = "任务类别(1-行政检查、2-材料备案、3-材料验证、4-待核实案件)") |
|||
private Integer taskType; |
|||
|
|||
/** |
|||
* 任务类别名称 |
|||
*/ |
|||
@Schema(description = "任务类别名称") |
|||
private String taskTypeName; |
|||
|
|||
/** |
|||
* 企业id |
|||
*/ |
|||
@Schema(description = "企业id") |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
@Schema(description = "企业名称") |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 执法单位id |
|||
*/ |
|||
@Schema(description = "执法单位id") |
|||
private String lawEnforcementAgencyId; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@Schema(description = "执法单位名称") |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 执法人员 |
|||
*/ |
|||
@Schema(description = "执法人员") |
|||
private List<LawEnforcer> lawEnforcer; |
|||
|
|||
/** |
|||
* 评价状态 |
|||
*/ |
|||
@Schema(description = "评价状态(0-待评价,1-已评价)") |
|||
private Integer commentStatus; |
|||
|
|||
/** |
|||
* 评价时间 |
|||
*/ |
|||
@Schema(description = "评价时间") |
|||
private Date commentTime; |
|||
|
|||
/** |
|||
* 办结时间 |
|||
*/ |
|||
@Schema(description = "办结时间") |
|||
private Date checkTime; |
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/27 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskCommentItemVO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@Schema(description = "id", example = "1") |
|||
private String id; |
|||
|
|||
/** |
|||
* 评价项名称 |
|||
*/ |
|||
@Schema(description = "评价项名称", example = "1") |
|||
private String commentItemName; |
|||
|
|||
/** |
|||
* 最小分数 |
|||
*/ |
|||
@Schema(description = "最小分数", example = "1") |
|||
private Integer minScore; |
|||
|
|||
/** |
|||
* 最大分数 |
|||
*/ |
|||
@Schema(description = "最大分数", example = "5") |
|||
private Integer maxScore; |
|||
|
|||
/** |
|||
* 展示顺序 |
|||
*/ |
|||
@Schema(description = "展示顺序", example = "1") |
|||
private Integer sortOrder; |
|||
|
|||
/** |
|||
* 是否启用(0-不启用,1-启用) |
|||
*/ |
|||
@Schema(description = "是否启用(0-不启用,1-启用)", example = "1") |
|||
private Integer active; |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
|
|||
import com.zdxt.enforcementnos.common.LawEnforcer; |
|||
import com.zdxt.enforcementnos.common.TaskProclamation; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskItem; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/21 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskDetailVO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@Schema(description = "任务id", example = "1") |
|||
private String id; |
|||
|
|||
/** |
|||
* 公告 |
|||
*/ |
|||
@Schema(description = "公告", example = "1") |
|||
private List<TaskProclamation> proclamation; |
|||
|
|||
/** |
|||
* 任务编号 |
|||
*/ |
|||
@Schema(description = "任务编号", example = "1") |
|||
private String taskNo; |
|||
|
|||
/** |
|||
* 任务来源名称 |
|||
*/ |
|||
@Schema(description = "任务来源名称", example = "1") |
|||
private String taskSourceName; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
@Schema(description = "企业名称", example = "1") |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 统一社会信用代码 |
|||
*/ |
|||
@Schema(description = "统一社会信用代码", example = "1") |
|||
private String usciCode; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@Schema(description = "执法单位名称", example = "1") |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 执法人员 |
|||
*/ |
|||
@Schema(description = "执法人员", example = "1") |
|||
private List<LawEnforcer> lawEnforcer; |
|||
|
|||
/** |
|||
* 类别名称 |
|||
*/ |
|||
@Schema(description = "类别名称", example = "1") |
|||
private String taskTypeName; |
|||
|
|||
/** |
|||
* 执法事项 |
|||
*/ |
|||
@Schema(description = "执法事项", example = "1") |
|||
private String lawEnforcementMatters; |
|||
|
|||
/** |
|||
* 执法依据 |
|||
*/ |
|||
@Schema(description = "执法依据", example = "1") |
|||
private List<String> legalBasis; |
|||
|
|||
/** |
|||
* 截止日期 |
|||
*/ |
|||
@Schema(description = "截止日期", example = "1") |
|||
private Date deadline; |
|||
|
|||
/** |
|||
* 检查结果(0-已完成,1-转为待核实处置案件,2-退回企业补正材料) |
|||
*/ |
|||
@Schema(description = "检查结果", example = "1") |
|||
private Integer checkResult; |
|||
|
|||
/** |
|||
* 检查时间 |
|||
*/ |
|||
@Schema(description = "检查时间", example = "1") |
|||
private Date checkTime; |
|||
|
|||
/** |
|||
* 任务状态 |
|||
*/ |
|||
@Schema(description = "任务状态", example = "1") |
|||
private Integer taskStatus; |
|||
|
|||
/** |
|||
* 任务状态名称 |
|||
*/ |
|||
@Schema(description = "任务状态名称", example = "1") |
|||
private String taskStatusName; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
@Schema(description = "创建时间", example = "1") |
|||
private Date createTime; |
|||
|
|||
/** |
|||
* 企业处理时间 |
|||
*/ |
|||
@Schema(description = "企业处理时间", example = "1") |
|||
private Date enterpriseHandleTime; |
|||
|
|||
/** |
|||
* 检查项 |
|||
*/ |
|||
@Schema(description = "检查项", example = "1") |
|||
private List<NosLawEnforcementTaskItem> taskItemList; |
|||
|
|||
/** |
|||
* 待核实处置案件原类别id |
|||
*/ |
|||
@Schema(description = "待核实处置案件原类别id", example = "1") |
|||
private Integer taskOriginalTypeId; |
|||
|
|||
/** |
|||
* 待核实处置案件原类别名称 |
|||
*/ |
|||
@Schema(description = "待核实处置案件原类别名称", example = "1") |
|||
private String taskOriginalTypeName; |
|||
|
|||
/** |
|||
* 是否评价(0-未评价,1-已评价) |
|||
*/ |
|||
@Schema(description = "是否评价(0-未评价,1-已评价)", example = "1") |
|||
private Integer isEvaluation; |
|||
|
|||
/** |
|||
* 满意度(0-满意,1-一般,2-不满意) |
|||
*/ |
|||
@Schema(description = "满意度(0-满意,1-一般,2-不满意)", example = "1") |
|||
private Integer satisfaction; |
|||
|
|||
/** |
|||
* 评价原因 |
|||
*/ |
|||
@Schema(description = "评价原因", example = "1") |
|||
private String commentReason; |
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskMsgPageVO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@Schema(description = "id") |
|||
private String id; |
|||
|
|||
/** |
|||
* 任务id |
|||
*/ |
|||
@Schema(description = "任务id") |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 消息标题 |
|||
*/ |
|||
@Schema(description = "消息标题") |
|||
private String title; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
@Schema(description = "企业名称") |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@Schema(description = "执法单位名称") |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 截止时间 |
|||
*/ |
|||
@Schema(description = "截止时间") |
|||
private Date deadline; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
@Schema(description = "创建时间") |
|||
private Date createTime; |
|||
} |
|||
@ -0,0 +1,100 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import com.zdxt.enforcementnos.common.LawEnforcer; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/21 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskPageVO { |
|||
|
|||
/** |
|||
* 任务id |
|||
*/ |
|||
@Schema(description = "任务id", example = "1") |
|||
private String id; |
|||
|
|||
/** |
|||
* 任务编号 |
|||
*/ |
|||
@Schema(description = "任务编号", example = "1") |
|||
private String taskNo; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
@Schema(description = "企业名称", example = "1") |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@Schema(description = "执法单位名称", example = "1") |
|||
private String lawEnforcementAgency; |
|||
|
|||
/** |
|||
* 截止日期 |
|||
*/ |
|||
@Schema(description = "截止日期", example = "1") |
|||
private Date deadline; |
|||
|
|||
/** |
|||
* 任务状态 |
|||
*/ |
|||
@Schema(description = "任务状态", example = "1") |
|||
private Integer taskStatus; |
|||
|
|||
/** |
|||
* 任务状态名称 |
|||
*/ |
|||
@Schema(description = "任务状态名称", example = "1") |
|||
private String taskStatusName; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
@Schema(description = "创建时间", example = "1") |
|||
private Date createTime; |
|||
|
|||
/** |
|||
* 待核实处置案件原类别id |
|||
*/ |
|||
@Schema(description = "待核实处置案件原类别id", example = "1") |
|||
private Integer taskOriginalTypeId; |
|||
|
|||
/** |
|||
* 待核实处置案件原类别名称 |
|||
*/ |
|||
@Schema(description = "待核实处置案件原类别名称", example = "1") |
|||
private String taskOriginalTypeName; |
|||
|
|||
/** |
|||
* 类别id |
|||
*/ |
|||
@Schema(description = "类别id", example = "1") |
|||
private Integer taskTypeId; |
|||
|
|||
/** |
|||
* 类别名称 |
|||
*/ |
|||
@Schema(description = "类别名称", example = "1") |
|||
private String taskTypeName; |
|||
|
|||
/** |
|||
* 执法人员 |
|||
*/ |
|||
@Schema(description = "执法人员", example = "[]") |
|||
private List<LawEnforcer> lawEnforcer; |
|||
|
|||
/** |
|||
* 企业处理时间 |
|||
*/ |
|||
@Schema(description = "企业处理时间", example = "2026-05-20 10:23:10") |
|||
private Date enterpriseHandleTime; |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/27 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskSourceVO { |
|||
|
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@Schema(description = "来源id") |
|||
private String id; |
|||
|
|||
/** |
|||
* 任务来源名称 |
|||
*/ |
|||
@Schema(description = "任务来源名称") |
|||
private String sourceName; |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/5/27 |
|||
*/ |
|||
@Data |
|||
public class NosLawEnforcementTaskTypeVO { |
|||
|
|||
@Schema(description = "类别id", example = "1") |
|||
private Integer id; |
|||
|
|||
@Schema(description = "类别名称", example = "1") |
|||
private String name; |
|||
} |
|||
@ -1,86 +0,0 @@ |
|||
package com.zdxt.enforcementnos.domain.vo; |
|||
|
|||
import com.zdxt.enforcementnos.domain.TestEnfDemo; |
|||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
|||
import cn.idev.excel.annotation.ExcelProperty; |
|||
import org.dromara.common.excel.annotation.ExcelDictFormat; |
|||
import org.dromara.common.excel.convert.ExcelDictConvert; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
|
|||
/** |
|||
* enf测试单视图对象 test_enf_demo |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-19 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
@AutoMapper(target = TestEnfDemo.class) |
|||
public class TestEnfDemoVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
@ExcelProperty(value = "主键") |
|||
private Long id; |
|||
|
|||
/** |
|||
* 文本 |
|||
*/ |
|||
@ExcelProperty(value = "文本") |
|||
private String enfText; |
|||
|
|||
/** |
|||
* 长文本 |
|||
*/ |
|||
@ExcelProperty(value = "长文本") |
|||
private String enfContent; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
@ExcelProperty(value = "部门id") |
|||
private Long deptId; |
|||
|
|||
/** |
|||
* 用户id |
|||
*/ |
|||
@ExcelProperty(value = "用户id") |
|||
private Long userId; |
|||
|
|||
/** |
|||
* 排序号 |
|||
*/ |
|||
@ExcelProperty(value = "排序号") |
|||
private Long orderNum; |
|||
|
|||
/** |
|||
* key键 |
|||
*/ |
|||
@ExcelProperty(value = "key键") |
|||
private String testKey; |
|||
|
|||
/** |
|||
* 值 |
|||
*/ |
|||
@ExcelProperty(value = "值") |
|||
private String value; |
|||
|
|||
/** |
|||
* 执法部门ID |
|||
*/ |
|||
@ExcelProperty(value = "执法部门ID") |
|||
private String bureauDeptId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementCommentMsg; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Mapper |
|||
public interface NosLawEnforcementCommentMsgMapper extends BaseMapper<NosLawEnforcementCommentMsg> { |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementFiling; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/8 |
|||
*/ |
|||
@Mapper |
|||
public interface NosLawEnforcementFilingMapper extends BaseMapper<NosLawEnforcementFiling> { |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskComment; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/5 |
|||
*/ |
|||
@Mapper |
|||
public interface NosLawEnforcementTaskCommentMapper extends BaseMapper<NosLawEnforcementTaskComment> { |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskItem; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
@Mapper |
|||
public interface NosLawEnforcementTaskItemMapper extends BaseMapper<NosLawEnforcementTaskItem> { |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,17 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskLawEnforcerRelation; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
@Mapper |
|||
public interface NosLawEnforcementTaskLawEnforcerRelationMapper extends BaseMapper<NosLawEnforcementTaskLawEnforcerRelation> { |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,27 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTask; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementTaskPageBO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementCommentTaskPageVO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
@Mapper |
|||
public interface NosLawEnforcementTaskMapper extends BaseMapper<NosLawEnforcementTask> { |
|||
|
|||
Page<NosLawEnforcementCommentTaskPageVO> pageHasCommentTask(Page<NosLawEnforcementCommentTaskPageVO> page, |
|||
@Param("userId") Long userId); |
|||
|
|||
Page<NosLawEnforcementTask> selectTaskPage(Page<NosLawEnforcementTask> page, |
|||
@Param("bo") NosLawEnforcementTaskPageBO bo, @Param("platformType") Integer platformType, |
|||
@Param("userId") Long userId, @Param("enterpriseId") String enterpriseId); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,20 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskMsg; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskMsgPageVO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Mapper |
|||
public interface NosLawEnforcementTaskMsgMapper extends BaseMapper<NosLawEnforcementTaskMsg> { |
|||
Page<NosLawEnforcementTaskMsgPageVO> unReadTaskMsgPage(Page<NosLawEnforcementTaskMsgPageVO> page, |
|||
@Param("userId") Long userId, @Param("enterpriseId") String enterpriseId); |
|||
|
|||
Integer unReadTaskMsgCount(@Param("userId") Long userId, @Param("enterpriseId") String enterpriseId); |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskSource; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
@Mapper |
|||
public interface NosLawEnforcementTaskSourceMapper extends BaseMapper<NosLawEnforcementTaskSource> { |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,13 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.zdxt.enforcementnos.domain.SysMessageViewLog; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Mapper |
|||
public interface SysMessageViewLogMapper extends BaseMapper<SysMessageViewLog> { |
|||
} |
|||
@ -1,15 +0,0 @@ |
|||
package com.zdxt.enforcementnos.mapper; |
|||
|
|||
import com.zdxt.enforcementnos.domain.TestEnfDemo; |
|||
import com.zdxt.enforcementnos.domain.vo.TestEnfDemoVo; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
/** |
|||
* enf测试单Mapper接口 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-19 |
|||
*/ |
|||
public interface TestEnfDemoMapper extends BaseMapperPlus<TestEnfDemo, TestEnfDemoVo> { |
|||
|
|||
} |
|||
@ -0,0 +1,52 @@ |
|||
package com.zdxt.enforcementnos.quartz; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|||
import com.zdxt.enforcementnos.common.commonenum.NosLawEnforcementTaskStatusEnum; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTask; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskService; |
|||
import jakarta.annotation.Resource; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.jetbrains.annotations.NotNull; |
|||
import org.quartz.JobExecutionContext; |
|||
import org.springframework.scheduling.quartz.QuartzJobBean; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.Arrays; |
|||
|
|||
/** |
|||
* 非现场执法任务定时过期 |
|||
* @author msy |
|||
* @Date: 2026/5/27 |
|||
*/ |
|||
@Component |
|||
@Slf4j |
|||
public class NosLawEnforcementTaskExpiredJob extends QuartzJobBean { |
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskService taskService; |
|||
|
|||
|
|||
@Override |
|||
protected void executeInternal(@NotNull JobExecutionContext context) { |
|||
this.execute(); |
|||
} |
|||
|
|||
/** |
|||
* 每天0点执行 |
|||
* cron: 0 0 0 * * ? |
|||
*/ |
|||
public void execute() { |
|||
// 更新过期的任务状态
|
|||
LambdaUpdateWrapper<NosLawEnforcementTask> updateWrapper = new LambdaUpdateWrapper<>(); |
|||
updateWrapper |
|||
.set(NosLawEnforcementTask::getTaskStatus, NosLawEnforcementTaskStatusEnum.COMPLETED_OVERDUE.getCode()) |
|||
.lt(NosLawEnforcementTask::getDeadline, DateUtil.today()) |
|||
.notIn(NosLawEnforcementTask::getTaskStatus, |
|||
Arrays.asList( |
|||
NosLawEnforcementTaskStatusEnum.COMPLETED.getCode(), |
|||
NosLawEnforcementTaskStatusEnum.COMPLETED_OVERDUE.getCode()), |
|||
NosLawEnforcementTaskStatusEnum.PENDING_ON_SITE_DISPOSAL.getCode()); |
|||
taskService.update(updateWrapper); |
|||
} |
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
package com.zdxt.enforcementnos.quartz; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.zdxt.enforcementnos.common.commonenum.NosLawEnforcementTaskStatusEnum; |
|||
import com.zdxt.enforcementnos.common.commonenum.NosLawEnforcementTaskTypeEnum; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTask; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskMsg; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskMsgService; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskService; |
|||
import jakarta.annotation.Resource; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.jetbrains.annotations.NotNull; |
|||
import org.quartz.JobExecutionContext; |
|||
import org.springframework.scheduling.quartz.QuartzJobBean; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Arrays; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 非现场执法任务即将过期消息通知定时任务 |
|||
* @author msy |
|||
* @Date: 2026/5/28 |
|||
*/ |
|||
@Component |
|||
@Slf4j |
|||
public class NosLawEnforcementTaskExpiringSoonJob extends QuartzJobBean { |
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskService taskService; |
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskMsgService taskMsgService; |
|||
|
|||
|
|||
|
|||
@Override |
|||
protected void executeInternal(@NotNull JobExecutionContext context) { |
|||
this.execute(); |
|||
} |
|||
|
|||
/** |
|||
* 每天凌晨0点30分执行 |
|||
* cron: 0 30 0 * * ? |
|||
*/ |
|||
public void execute() { |
|||
// 计算24小时后的时间点
|
|||
Date now = new Date(); |
|||
Date twentyFourHoursLater = DateUtil.offsetHour(now, 24); |
|||
|
|||
// 查询距离截止日期还剩一天(小于24小时),且未发送过消息通知的任务
|
|||
List<NosLawEnforcementTask> expiringSoonTasks = taskService.list( |
|||
new LambdaQueryWrapper<NosLawEnforcementTask>() |
|||
.le(NosLawEnforcementTask::getDeadline, twentyFourHoursLater) |
|||
.gt(NosLawEnforcementTask::getDeadline, now) |
|||
.eq(NosLawEnforcementTask::getExpirationNotice, 0) |
|||
.notIn(NosLawEnforcementTask::getTaskStatus, |
|||
Arrays.asList( |
|||
NosLawEnforcementTaskStatusEnum.COMPLETED.getCode(), |
|||
NosLawEnforcementTaskStatusEnum.COMPLETED_OVERDUE.getCode(), |
|||
NosLawEnforcementTaskStatusEnum.PENDING_ON_SITE_DISPOSAL.getCode())) |
|||
); |
|||
|
|||
if (CollUtil.isEmpty(expiringSoonTasks)) { |
|||
log.info("没有即将过期的任务"); |
|||
return; |
|||
} |
|||
|
|||
log.info("查询到{}个即将过期的任务,开始发送通知", expiringSoonTasks.size()); |
|||
|
|||
List<NosLawEnforcementTaskMsg> addMsgList = new ArrayList<>(); |
|||
// 遍历即将过期的任务,发送通知
|
|||
for (NosLawEnforcementTask task : expiringSoonTasks) { |
|||
try { |
|||
// 发送任务即将过期的消息通知
|
|||
String title = NosLawEnforcementTaskTypeEnum.getNameByCode(task.getTaskTypeId()) + "通知(距截止日期1天)"; |
|||
NosLawEnforcementTaskMsg taskMsg = new NosLawEnforcementTaskMsg(); |
|||
taskMsg.setTaskId(task.getId()); |
|||
taskMsg.setTitle(title); |
|||
taskMsg.setTaskType(task.getTaskTypeId()); |
|||
taskMsg.setEnterpriseId(task.getEnterpriseId()); |
|||
taskMsg.setEnterpriseName(task.getEnterpriseName()); |
|||
taskMsg.setLawEnforcementAgencyId(task.getLawEnforcementAgencyId()); |
|||
taskMsg.setLawEnforcementAgency(task.getLawEnforcementAgency()); |
|||
taskMsg.setDeadline(task.getDeadline()); |
|||
addMsgList.add(taskMsg); |
|||
|
|||
task.setExpirationNotice(1); |
|||
log.info("任务ID:{},任务编号:{},截止日期:{},距离过期还有不到24小时", |
|||
task.getId(), task.getTaskNo(), task.getDeadline()); |
|||
} catch (Exception e) { |
|||
log.error("发送任务即将过期通知失败,任务ID:{}", task.getId(), e); |
|||
} |
|||
} |
|||
taskMsgService.saveBatch(addMsgList); |
|||
taskService.updateBatchById(expiringSoonTasks); |
|||
} |
|||
} |
|||
@ -1,68 +0,0 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.zdxt.enforcementnos.domain.vo.TestEnfDemoVo; |
|||
import com.zdxt.enforcementnos.domain.bo.TestEnfDemoBo; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* enf测试单Service接口 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-19 |
|||
*/ |
|||
public interface ITestEnfDemoService { |
|||
|
|||
/** |
|||
* 查询enf测试单 |
|||
* |
|||
* @param id 主键 |
|||
* @return enf测试单 |
|||
*/ |
|||
TestEnfDemoVo queryById(Long id); |
|||
|
|||
/** |
|||
* 分页查询enf测试单列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return enf测试单分页列表 |
|||
*/ |
|||
TableDataInfo<TestEnfDemoVo> queryPageList(TestEnfDemoBo bo, PageQuery pageQuery); |
|||
|
|||
/** |
|||
* 查询符合条件的enf测试单列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return enf测试单列表 |
|||
*/ |
|||
List<TestEnfDemoVo> queryList(TestEnfDemoBo bo); |
|||
|
|||
/** |
|||
* 新增enf测试单 |
|||
* |
|||
* @param bo enf测试单 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
Boolean insertByBo(TestEnfDemoBo bo); |
|||
|
|||
/** |
|||
* 修改enf测试单 |
|||
* |
|||
* @param bo enf测试单 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
Boolean updateByBo(TestEnfDemoBo bo); |
|||
|
|||
/** |
|||
* 校验并批量删除enf测试单信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementCommentMsg; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
public interface NosLawEnforcementCommentMsgService extends IService<NosLawEnforcementCommentMsg> { |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementFiling; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementFilingBo; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementFilingPageBO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementFilingDetailVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementFilingPageVO; |
|||
import jakarta.validation.Valid; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/8 |
|||
*/ |
|||
public interface NosLawEnforcementFilingService extends IService<NosLawEnforcementFiling> { |
|||
TableDataInfo<NosLawEnforcementFilingPageVO> queryPageTask(@Valid NosLawEnforcementFilingPageBO bo); |
|||
|
|||
NosLawEnforcementFilingDetailVO getFilingDetail(String id); |
|||
|
|||
Boolean saveOrEdit(@Valid NosLawEnforcementFilingBo bo); |
|||
|
|||
NosLawEnforcementFilingDetailVO getFiling(); |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskComment; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
public interface NosLawEnforcementTaskCommentService extends IService<NosLawEnforcementTaskComment> { |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskItem; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
public interface NosLawEnforcementTaskItemService extends IService<NosLawEnforcementTaskItem> { |
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskLawEnforcerRelation; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
public interface NosLawEnforcementTaskLawEnforcerRelationService extends IService<NosLawEnforcementTaskLawEnforcerRelation> { |
|||
|
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.zdxt.enforcementnos.common.PageParam; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskMsg; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskMsgPageVO; |
|||
import jakarta.validation.Valid; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
public interface NosLawEnforcementTaskMsgService extends IService<NosLawEnforcementTaskMsg> { |
|||
TableDataInfo<NosLawEnforcementTaskMsgPageVO> unReadTaskMsgPage(@Valid PageParam pageParam); |
|||
|
|||
Integer unReadTaskMsgCount(); |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.zdxt.enforcementnos.common.PageParam; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTask; |
|||
import com.zdxt.enforcementnos.domain.bo.*; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementCommentTaskPageVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskByCommentStatusPageVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskDetailVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskPageVO; |
|||
import jakarta.validation.Valid; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
public interface NosLawEnforcementTaskService extends IService<NosLawEnforcementTask> { |
|||
|
|||
TableDataInfo<NosLawEnforcementTaskPageVO> queryPageTask(@Valid NosLawEnforcementTaskPageBO bo); |
|||
|
|||
String addTask(@Valid NosLawEnforcementTaskSaveBO bo); |
|||
|
|||
NosLawEnforcementTaskDetailVO getTaskDetail(String taskId); |
|||
|
|||
Boolean submitMaterials(@Valid SubmitNosLawEnforcementTaskItemBO bo); |
|||
|
|||
Boolean approveTask(@Valid NosLawEnforcementTaskApproveBO bo); |
|||
|
|||
Boolean commentTask(@Valid NosLawEnforcementTaskCommentBO bo); |
|||
|
|||
Boolean completeVerificationTask(String taskId); |
|||
|
|||
TableDataInfo<NosLawEnforcementTaskByCommentStatusPageVO> queryByCommentStatus(Integer commentStatus, PageParam pageParam); |
|||
|
|||
TableDataInfo<NosLawEnforcementCommentTaskPageVO> pageHasCommentTask(@Valid PageParam pageParam); |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskSource; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskSourceVO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
public interface NosLawEnforcementTaskSourceService extends IService<NosLawEnforcementTaskSource> { |
|||
|
|||
List<NosLawEnforcementTaskSourceVO> querySourceList(); |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
package com.zdxt.enforcementnos.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.zdxt.enforcementnos.domain.SysMessageViewLog; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
public interface SysMessageViewLogService extends IService<SysMessageViewLog> { |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementCommentMsg; |
|||
import com.zdxt.enforcementnos.mapper.NosLawEnforcementCommentMsgMapper; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementCommentMsgService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Service |
|||
public class NosLawEnforcementCommentMsgServiceImpl extends ServiceImpl<NosLawEnforcementCommentMsgMapper, NosLawEnforcementCommentMsg> |
|||
implements NosLawEnforcementCommentMsgService { |
|||
|
|||
} |
|||
@ -0,0 +1,121 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.zdxt.enforcementcode.common.util.DataFilterUtil; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementFiling; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementFilingBo; |
|||
import com.zdxt.enforcementnos.domain.bo.NosLawEnforcementFilingPageBO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementFilingDetailVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementFilingPageVO; |
|||
import com.zdxt.enforcementnos.mapper.NosLawEnforcementFilingMapper; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementFilingService; |
|||
import org.dromara.common.core.exception.ServiceException; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.satoken.utils.LoginHelper; |
|||
import org.dromara.system.domain.vo.SysDeptVo; |
|||
import org.springframework.beans.BeanUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/8 |
|||
*/ |
|||
@Service |
|||
public class NosLawEnforcementFilingServiceImpl extends ServiceImpl<NosLawEnforcementFilingMapper, NosLawEnforcementFiling> |
|||
implements NosLawEnforcementFilingService { |
|||
|
|||
|
|||
|
|||
@Override |
|||
public TableDataInfo<NosLawEnforcementFilingPageVO> queryPageTask(NosLawEnforcementFilingPageBO bo) { |
|||
LambdaQueryWrapper<NosLawEnforcementFiling> queryWrapper = new LambdaQueryWrapper<>(); |
|||
queryWrapper |
|||
.like(StrUtil.isNotBlank(bo.getLawEnforcementAgency()), NosLawEnforcementFiling::getLawEnforcementAgency, bo.getLawEnforcementAgency()) |
|||
.ge(bo.getStartTime() != null, NosLawEnforcementFiling::getCreateTime, bo.getStartTime()) |
|||
.le(bo.getEndTime() != null, NosLawEnforcementFiling::getCreateTime, bo.getEndTime()) |
|||
.orderByDesc(NosLawEnforcementFiling::getCreateTime); |
|||
Page<NosLawEnforcementFiling> page = this.page(new Page<>(bo.getPageNo(), bo.getPageSize()), queryWrapper); |
|||
|
|||
List<NosLawEnforcementFilingPageVO> resultRecord = new ArrayList<>(); |
|||
for(NosLawEnforcementFiling nosLawEnforcementFiling : page.getRecords()) { |
|||
NosLawEnforcementFilingPageVO vo = new NosLawEnforcementFilingPageVO(); |
|||
BeanUtils.copyProperties(nosLawEnforcementFiling, vo); |
|||
resultRecord.add(vo); |
|||
} |
|||
|
|||
Page<NosLawEnforcementFilingPageVO> pageResult = new Page<>(); |
|||
pageResult.setCurrent(page.getCurrent()); |
|||
pageResult.setSize(page.getSize()); |
|||
pageResult.setTotal(page.getTotal()); |
|||
pageResult.setRecords(resultRecord); |
|||
return TableDataInfo.build(pageResult); |
|||
} |
|||
|
|||
@Override |
|||
public NosLawEnforcementFilingDetailVO getFilingDetail(String id) { |
|||
NosLawEnforcementFiling filing = this.getById(id); |
|||
if(filing == null) { |
|||
throw new ServiceException("备案不存在"); |
|||
} |
|||
NosLawEnforcementFilingDetailVO detailVO = new NosLawEnforcementFilingDetailVO(); |
|||
BeanUtils.copyProperties(filing, detailVO); |
|||
return detailVO; |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Boolean saveOrEdit(NosLawEnforcementFilingBo bo) { |
|||
if(bo.getId() == null) { |
|||
// 新增
|
|||
|
|||
// 先查询该执法单位是否已有备案数据
|
|||
LambdaQueryWrapper<NosLawEnforcementFiling> queryWrapper = new LambdaQueryWrapper<>(); |
|||
queryWrapper |
|||
.eq(NosLawEnforcementFiling::getLawEnforcementAgencyId, bo.getLawEnforcementAgencyId()); |
|||
long count = this.count(queryWrapper); |
|||
if(count > 0) { |
|||
throw new ServiceException("该执法单位已存在备案"); |
|||
} |
|||
|
|||
NosLawEnforcementFiling filing = new NosLawEnforcementFiling(); |
|||
BeanUtils.copyProperties(bo, filing); |
|||
filing.setId(null); |
|||
return this.save(filing); |
|||
} else { |
|||
// 修改
|
|||
NosLawEnforcementFiling filing = this.getById(bo.getId()); |
|||
if(filing == null) { |
|||
throw new ServiceException("备案不存在"); |
|||
} |
|||
filing.setLegalMaterials(bo.getLegalMaterials()); |
|||
filing.setTechnicalMaterials(bo.getTechnicalMaterials()); |
|||
return this.updateById(filing); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public NosLawEnforcementFilingDetailVO getFiling() { |
|||
// 当前执法人员所在的执法单位
|
|||
SysDeptVo userBureauDept = DataFilterUtil.getUserBureauDept(LoginHelper.getUserId()); |
|||
if(userBureauDept == null) { |
|||
throw new ServiceException("当前用户没有所属执法单位"); |
|||
} |
|||
LambdaQueryWrapper<NosLawEnforcementFiling> queryWrapper = new LambdaQueryWrapper<>(); |
|||
queryWrapper |
|||
.eq(NosLawEnforcementFiling::getLawEnforcementAgencyId, userBureauDept.getDeptId()); |
|||
NosLawEnforcementFiling filing = this.getOne(queryWrapper); |
|||
if(filing == null) { |
|||
return null; |
|||
} |
|||
NosLawEnforcementFilingDetailVO detailVO = new NosLawEnforcementFilingDetailVO(); |
|||
BeanUtils.copyProperties(filing, detailVO); |
|||
return detailVO; |
|||
} |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskComment; |
|||
import com.zdxt.enforcementnos.mapper.NosLawEnforcementTaskCommentMapper; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskCommentService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/5 |
|||
*/ |
|||
@Service |
|||
public class NosLawEnforcementTaskCommentServiceImpl extends ServiceImpl<NosLawEnforcementTaskCommentMapper, NosLawEnforcementTaskComment> |
|||
implements NosLawEnforcementTaskCommentService { |
|||
|
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskItem; |
|||
import com.zdxt.enforcementnos.mapper.NosLawEnforcementTaskItemMapper; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskItemService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
@Service |
|||
public class NosLawEnforcementTaskItemServiceImpl extends ServiceImpl<NosLawEnforcementTaskItemMapper, NosLawEnforcementTaskItem> |
|||
implements NosLawEnforcementTaskItemService { |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,20 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskLawEnforcerRelation; |
|||
import com.zdxt.enforcementnos.mapper.NosLawEnforcementTaskLawEnforcerRelationMapper; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskLawEnforcerRelationService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
@Service |
|||
public class NosLawEnforcementTaskLawEnforcerRelationServiceImpl extends ServiceImpl<NosLawEnforcementTaskLawEnforcerRelationMapper, NosLawEnforcementTaskLawEnforcerRelation> |
|||
implements NosLawEnforcementTaskLawEnforcerRelationService { |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,56 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.zdxt.enforcementnos.common.PageParam; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskMsg; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskMsgPageVO; |
|||
import com.zdxt.enforcementnos.mapper.NosLawEnforcementTaskMsgMapper; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskMsgService; |
|||
import org.dromara.common.core.exception.ServiceException; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.satoken.utils.LoginHelper; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Service |
|||
public class NosLawEnforcementTaskMsgServiceImpl extends ServiceImpl<NosLawEnforcementTaskMsgMapper, NosLawEnforcementTaskMsg> |
|||
implements NosLawEnforcementTaskMsgService { |
|||
|
|||
|
|||
@Override |
|||
public TableDataInfo<NosLawEnforcementTaskMsgPageVO> unReadTaskMsgPage(PageParam pageParam) { |
|||
Long userId = LoginHelper.getUserId(); |
|||
if(userId == null) { |
|||
throw new ServiceException("当前用户未登录"); |
|||
} |
|||
String enterpriseId = LoginHelper.getDeptId(); |
|||
if(StrUtil.isBlank(enterpriseId)) { |
|||
throw new ServiceException("当前用户不是企业用户"); |
|||
} |
|||
|
|||
// 根据用户id和企业id,查询该用户的未读任务消息
|
|||
Page<NosLawEnforcementTaskMsgPageVO> pageResult = this.baseMapper.unReadTaskMsgPage(new Page<>(pageParam.getPageNo(), pageParam.getPageSize()), |
|||
userId, enterpriseId); |
|||
|
|||
return TableDataInfo.build(pageResult); |
|||
} |
|||
|
|||
@Override |
|||
public Integer unReadTaskMsgCount() { |
|||
Long userId = LoginHelper.getUserId(); |
|||
if(userId == null) { |
|||
throw new ServiceException("当前用户未登录"); |
|||
} |
|||
String enterpriseId = LoginHelper.getDeptId(); |
|||
if(StrUtil.isBlank(enterpriseId)) { |
|||
throw new ServiceException("当前用户不是企业用户"); |
|||
} |
|||
|
|||
return this.baseMapper.unReadTaskMsgCount(userId, enterpriseId); |
|||
} |
|||
} |
|||
@ -0,0 +1,638 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import cn.hutool.core.date.DateField; |
|||
import cn.hutool.core.date.DateTime; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.util.IdUtil; |
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.zdxt.enforcementcode.common.util.DataFilterUtil; |
|||
import com.zdxt.enforcementnos.common.LawEnforcer; |
|||
import com.zdxt.enforcementnos.common.PageParam; |
|||
import com.zdxt.enforcementnos.common.commonenum.*; |
|||
import com.zdxt.enforcementnos.domain.*; |
|||
import com.zdxt.enforcementnos.domain.bo.*; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementCommentTaskPageVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskByCommentStatusPageVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskDetailVO; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskPageVO; |
|||
import com.zdxt.enforcementnos.mapper.NosLawEnforcementTaskMapper; |
|||
import com.zdxt.enforcementnos.service.*; |
|||
import jakarta.annotation.Resource; |
|||
import org.dromara.common.core.exception.ServiceException; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.satoken.utils.LoginHelper; |
|||
import org.dromara.system.domain.vo.SysDeptVo; |
|||
import org.springframework.beans.BeanUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
import java.util.function.Function; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
@Service |
|||
public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcementTaskMapper, NosLawEnforcementTask> |
|||
implements NosLawEnforcementTaskService { |
|||
|
|||
|
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskItemService taskItemService; |
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskSourceService taskSourceService; |
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskLawEnforcerRelationService relationService; |
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskCommentService taskCommentService; |
|||
|
|||
@Resource |
|||
private NosLawEnforcementTaskMsgService taskMsgService; |
|||
|
|||
@Resource |
|||
private NosLawEnforcementCommentMsgService commentMsgService; |
|||
|
|||
|
|||
|
|||
@Override |
|||
public TableDataInfo<NosLawEnforcementTaskPageVO> queryPageTask(NosLawEnforcementTaskPageBO bo) { |
|||
Integer platformType = LoginHelper.getPlatformType(); |
|||
Long userId = LoginHelper.getUserId(); |
|||
// 企业端获取当前用户所在的企业
|
|||
String enterpriseId = LoginHelper.getDeptId(); |
|||
|
|||
Page<NosLawEnforcementTask> page = this.baseMapper.selectTaskPage(new Page<>(bo.getPageNo(), bo.getPageSize()), |
|||
bo, platformType, userId, enterpriseId); |
|||
|
|||
if (page.getRecords().isEmpty()) { |
|||
return TableDataInfo.build(new Page<>(bo.getPageNo(), bo.getPageSize())); |
|||
} |
|||
|
|||
// 批量查询执法人员(一次性查询所有任务关联)
|
|||
List<String> taskIdList = page.getRecords().stream().map(NosLawEnforcementTask::getId).toList(); |
|||
Map<String, List<NosLawEnforcementTaskLawEnforcerRelation>> taskUserMap = relationService.list( |
|||
new LambdaQueryWrapper<NosLawEnforcementTaskLawEnforcerRelation>() |
|||
.in(NosLawEnforcementTaskLawEnforcerRelation::getTaskId, taskIdList) |
|||
).stream().collect(Collectors.groupingBy(NosLawEnforcementTaskLawEnforcerRelation::getTaskId)); |
|||
|
|||
// 预定义状态转换函数
|
|||
Function<Integer, String> statusConverter; |
|||
if (PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType)) { |
|||
statusConverter = NosLawEnforcementTaskStatusEnum::getDescriptionByCode; |
|||
} else if (PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType)) { |
|||
statusConverter = NosLawEnforcementTaskStatusEnum::getEntDescriptionByCode; |
|||
} else { |
|||
statusConverter = NosLawEnforcementTaskStatusEnum::getDescriptionByCode; |
|||
} |
|||
|
|||
List<NosLawEnforcementTaskPageVO> voList = page.getRecords().stream() |
|||
.map(task -> { |
|||
NosLawEnforcementTaskPageVO vo = new NosLawEnforcementTaskPageVO(); |
|||
BeanUtils.copyProperties(task, vo); |
|||
vo.setTaskStatusName(statusConverter.apply(task.getTaskStatus())); |
|||
vo.setTaskTypeName(NosLawEnforcementTaskTypeEnum.getNameByCode(task.getTaskTypeId())); |
|||
vo.setTaskOriginalTypeName(NosLawEnforcementTaskTypeEnum.getNameByCode(task.getTaskOriginalTypeId())); |
|||
|
|||
List<NosLawEnforcementTaskLawEnforcerRelation> relations = taskUserMap.get(task.getId()); |
|||
if (relations != null) { |
|||
vo.setLawEnforcer(relations.stream() |
|||
.map(t -> { |
|||
LawEnforcer user = new LawEnforcer(); |
|||
user.setLawEnforcerId(t.getLawEnforcerId()); |
|||
user.setLawEnforcerName(t.getLawEnforcerName()); |
|||
user.setLawEnforcerPhone(t.getLawEnforcerPhone()); |
|||
user.setLawEnforcerIdCard(t.getLawEnforcerIdCard()); |
|||
return user; |
|||
}).toList()); |
|||
} |
|||
return vo; |
|||
}) |
|||
.collect(Collectors.toList()); |
|||
|
|||
Page<NosLawEnforcementTaskPageVO> pageResult = new Page<>(bo.getPageNo(), bo.getPageSize()); |
|||
pageResult.setRecords(voList); |
|||
pageResult.setTotal(page.getTotal()); |
|||
|
|||
return TableDataInfo.build(pageResult); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public String addTask(NosLawEnforcementTaskSaveBO bo) { |
|||
Integer platformType = LoginHelper.getPlatformType(); |
|||
// 当前执法人员所在的执法单位
|
|||
SysDeptVo userBureauDept = DataFilterUtil.getUserBureauDept(LoginHelper.getUserId()); |
|||
|
|||
if(!PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType) || userBureauDept == null) { |
|||
throw new ServiceException("当前用户不属于执法端用户,无法创建任务"); |
|||
} |
|||
|
|||
if(bo.getProclamation().size() > 5) { |
|||
throw new ServiceException("最多添加5个通知/公告附件"); |
|||
} |
|||
|
|||
if(bo.getCheckItemList().size() > 20) { |
|||
throw new ServiceException("最多添加20个检查项"); |
|||
} |
|||
|
|||
// 根据任务来源id查询任务来源
|
|||
NosLawEnforcementTaskSource taskSource = taskSourceService.getById(bo.getTaskSourceId()); |
|||
if(taskSource == null) { |
|||
throw new ServiceException("任务来源不存在"); |
|||
} |
|||
|
|||
// 根据类别id查询类别
|
|||
NosLawEnforcementTaskTypeEnum taskType = NosLawEnforcementTaskTypeEnum.getByCode(bo.getTaskTypeId()); |
|||
if(taskType == null) { |
|||
throw new ServiceException("任务类别不存在"); |
|||
} |
|||
|
|||
String taskNo = IdUtil.getSnowflake().nextIdStr(); |
|||
|
|||
NosLawEnforcementTask task = new NosLawEnforcementTask(); |
|||
BeanUtils.copyProperties(bo, task); |
|||
task.setTaskNo(taskNo); |
|||
task.setTaskSourceName(taskSource.getSourceName()); |
|||
task.setTaskStatus(NosLawEnforcementTaskStatusEnum.ENTERPRISE_PROCESSING.getCode()); |
|||
task.setLawEnforcementAgencyId(userBureauDept.getDeptId()); |
|||
task.setLawEnforcementAgency(userBureauDept.getDeptName()); |
|||
|
|||
DateTime endedOfDay = DateUtil.endOfDay(bo.getDeadline()); |
|||
// 需要截断到秒,防止因为毫秒,导致数据库存储的时间进位到第二天凌晨
|
|||
endedOfDay = DateUtil.truncate(endedOfDay, DateField.SECOND); |
|||
|
|||
task.setDeadline(endedOfDay); |
|||
this.save(task); |
|||
|
|||
// 新增任务检查项
|
|||
List<NosLawEnforcementTaskItem> taskItemList = new ArrayList<>(); |
|||
for(String checkItem : bo.getCheckItemList()) { |
|||
NosLawEnforcementTaskItem taskItem = new NosLawEnforcementTaskItem(); |
|||
taskItem.setTaskId(task.getId()); |
|||
taskItem.setItemName(checkItem); |
|||
taskItemList.add(taskItem); |
|||
} |
|||
taskItemService.saveBatch(taskItemList); |
|||
|
|||
// 新增执法人员和任务的关联关系
|
|||
List<NosLawEnforcementTaskLawEnforcerRelation> relationList = new ArrayList<>(); |
|||
for (LawEnforcer lawEnforcer : bo.getLawEnforcer()) { |
|||
NosLawEnforcementTaskLawEnforcerRelation relation = new NosLawEnforcementTaskLawEnforcerRelation(); |
|||
relation.setTaskId(task.getId()); |
|||
relation.setLawEnforcerId(lawEnforcer.getLawEnforcerId()); |
|||
relation.setLawEnforcerName(lawEnforcer.getLawEnforcerName()); |
|||
relation.setLawEnforcerPhone(lawEnforcer.getLawEnforcerPhone()); |
|||
relation.setLawEnforcerIdCard(lawEnforcer.getLawEnforcerIdCard()); |
|||
relationList.add(relation); |
|||
} |
|||
relationService.saveBatch(relationList); |
|||
|
|||
// 新增一条任务消息
|
|||
String title = taskType.getName() + "通知"; |
|||
NosLawEnforcementTaskMsg taskMsg = new NosLawEnforcementTaskMsg(); |
|||
taskMsg.setTaskId(task.getId()); |
|||
taskMsg.setTitle(title); |
|||
taskMsg.setTaskType(taskType.getCode()); |
|||
taskMsg.setEnterpriseId(task.getEnterpriseId()); |
|||
taskMsg.setEnterpriseName(task.getEnterpriseName()); |
|||
taskMsg.setLawEnforcementAgencyId(task.getLawEnforcementAgencyId()); |
|||
taskMsg.setLawEnforcementAgency(task.getLawEnforcementAgency()); |
|||
taskMsg.setDeadline(task.getDeadline()); |
|||
taskMsgService.save(taskMsg); |
|||
|
|||
return task.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public NosLawEnforcementTaskDetailVO getTaskDetail(String taskId) { |
|||
// 获取当前登录用户
|
|||
Long userId = LoginHelper.getUserId(); |
|||
Integer platformType = LoginHelper.getPlatformType(); |
|||
|
|||
NosLawEnforcementTask task; |
|||
if(PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType)) { |
|||
// 企业端,只能查看自己企业的任务
|
|||
// 获取当前登录用户企业id
|
|||
String enterpriseId = LoginHelper.getDeptId(); |
|||
LambdaQueryWrapper<NosLawEnforcementTask> taskQueryWrapper = new LambdaQueryWrapper<>(); |
|||
taskQueryWrapper |
|||
.eq(NosLawEnforcementTask::getEnterpriseId, enterpriseId) |
|||
.eq(NosLawEnforcementTask::getId, taskId); |
|||
task = this.getOne(taskQueryWrapper); |
|||
|
|||
} else if (PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType)) { |
|||
// 执法端,只能查看自己执法的任务
|
|||
LambdaQueryWrapper<NosLawEnforcementTaskLawEnforcerRelation> queryWrapper = new LambdaQueryWrapper<>(); |
|||
queryWrapper |
|||
.eq(NosLawEnforcementTaskLawEnforcerRelation::getLawEnforcerId, userId) |
|||
.eq(NosLawEnforcementTaskLawEnforcerRelation::getTaskId, taskId); |
|||
|
|||
NosLawEnforcementTaskLawEnforcerRelation relation = relationService.getOne(queryWrapper); |
|||
if(relation == null) { |
|||
throw new ServiceException("当前用户不是该任务下的执法人员,无权查看任务详情"); |
|||
} |
|||
task = this.getById(taskId); |
|||
} else { |
|||
task = this.getById(taskId); |
|||
} |
|||
|
|||
if(task == null) { |
|||
throw new ServiceException("任务不存在"); |
|||
} |
|||
|
|||
NosLawEnforcementTaskDetailVO vo = new NosLawEnforcementTaskDetailVO(); |
|||
BeanUtils.copyProperties(task, vo); |
|||
vo.setTaskTypeName(NosLawEnforcementTaskTypeEnum.getNameByCode(task.getTaskTypeId())); |
|||
vo.setTaskOriginalTypeName(NosLawEnforcementTaskTypeEnum.getNameByCode(task.getTaskOriginalTypeId())); |
|||
|
|||
if(PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType)) { |
|||
// 执法端
|
|||
vo.setTaskStatusName(NosLawEnforcementTaskStatusEnum.getDescriptionByCode(task.getTaskStatus())); |
|||
} else if (PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType)) { |
|||
// 企业端
|
|||
vo.setTaskStatusName(NosLawEnforcementTaskStatusEnum.getEntDescriptionByCode(task.getTaskStatus())); |
|||
} else { |
|||
// 监督端
|
|||
vo.setTaskStatusName(NosLawEnforcementTaskStatusEnum.getDescriptionByCode(task.getTaskStatus())); |
|||
} |
|||
|
|||
// 查询任务检查项
|
|||
LambdaQueryWrapper<NosLawEnforcementTaskItem> taskItemQuery = new LambdaQueryWrapper<>(); |
|||
taskItemQuery |
|||
.eq(NosLawEnforcementTaskItem::getTaskId, task.getId()); |
|||
List<NosLawEnforcementTaskItem> itemList = taskItemService.list(taskItemQuery); |
|||
vo.setTaskItemList(itemList); |
|||
|
|||
// 查询执法人员
|
|||
LambdaQueryWrapper<NosLawEnforcementTaskLawEnforcerRelation> relationQuery = new LambdaQueryWrapper<>(); |
|||
relationQuery |
|||
.eq(NosLawEnforcementTaskLawEnforcerRelation::getTaskId, task.getId()); |
|||
List<NosLawEnforcementTaskLawEnforcerRelation> relationList = relationService.list(relationQuery); |
|||
if(!relationList.isEmpty()) { |
|||
List<LawEnforcer> lawEnforcer = relationList.stream().map(item -> { |
|||
LawEnforcer user = new LawEnforcer(); |
|||
user.setLawEnforcerId(item.getLawEnforcerId()); |
|||
user.setLawEnforcerName(item.getLawEnforcerName()); |
|||
user.setLawEnforcerPhone(item.getLawEnforcerPhone()); |
|||
user.setLawEnforcerIdCard(item.getLawEnforcerIdCard()); |
|||
return user; |
|||
}).collect(Collectors.toList()); |
|||
vo.setLawEnforcer(lawEnforcer); |
|||
} |
|||
|
|||
// 查询评价信息
|
|||
if(NosTaskCommentStatusEnum.COMMENTED.getCode().equals(task.getIsEvaluation())) { |
|||
LambdaQueryWrapper<NosLawEnforcementTaskComment> queryWrapper = new LambdaQueryWrapper<>(); |
|||
queryWrapper.eq(NosLawEnforcementTaskComment::getTaskId, taskId); |
|||
NosLawEnforcementTaskComment comment = taskCommentService.getOne(queryWrapper); |
|||
if(comment != null) { |
|||
vo.setSatisfaction(comment.getSatisfaction()); |
|||
vo.setCommentReason(comment.getReason()); |
|||
} |
|||
} |
|||
|
|||
return vo; |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Boolean submitMaterials(SubmitNosLawEnforcementTaskItemBO bo) { |
|||
// 获取当前登录用户
|
|||
Long userId = LoginHelper.getUserId(); |
|||
if(userId == null) { |
|||
throw new ServiceException("当前用户未登录"); |
|||
} |
|||
|
|||
// 获取当前登录用户企业id
|
|||
String enterpriseId = LoginHelper.getDeptId(); |
|||
if(StrUtil.isBlank(enterpriseId)) { |
|||
throw new ServiceException("当前用户不是企业用户"); |
|||
} |
|||
|
|||
// 查询当前企业是否存在该任务(状态为待处理或待修改)
|
|||
LambdaQueryWrapper<NosLawEnforcementTask> taskQueryWrapper = new LambdaQueryWrapper<>(); |
|||
taskQueryWrapper |
|||
.in(NosLawEnforcementTask::getTaskStatus, |
|||
Arrays.asList(NosLawEnforcementTaskStatusEnum.ENTERPRISE_PROCESSING.getCode(), |
|||
NosLawEnforcementTaskStatusEnum.RETURNED_FOR_CORRECTION.getCode())) |
|||
.eq(NosLawEnforcementTask::getEnterpriseId, enterpriseId) |
|||
.eq(NosLawEnforcementTask::getId, bo.getTaskId()); |
|||
NosLawEnforcementTask task = this.getOne(taskQueryWrapper); |
|||
|
|||
if(task == null) { |
|||
throw new ServiceException("任务不存在"); |
|||
} |
|||
|
|||
Date today = new Date(); |
|||
|
|||
// 判断提交时间是否在任务期限内
|
|||
if(task.getDeadline().before(today)) { |
|||
throw new ServiceException("任务已过期,无法提交材料"); |
|||
} |
|||
|
|||
// 查询任务检查项
|
|||
LambdaQueryWrapper<NosLawEnforcementTaskItem> taskItemQuery = new LambdaQueryWrapper<>(); |
|||
taskItemQuery |
|||
.eq(NosLawEnforcementTaskItem::getTaskId, task.getId()); |
|||
List<NosLawEnforcementTaskItem> itemList = taskItemService.list(taskItemQuery); |
|||
if(itemList.isEmpty()) { |
|||
throw new ServiceException("该任务不存在检查项"); |
|||
} |
|||
|
|||
// 任务项id和提交的材料构造成map
|
|||
Map<String, List<String>> itemMap = bo.getTaskItemList().stream() |
|||
.collect(Collectors |
|||
.toMap(NosLawEnforcementTaskItemBO::getId, NosLawEnforcementTaskItemBO::getItemValue)); |
|||
|
|||
// 每一项都必须提交材料,否则抛异常,不允许提交成功
|
|||
for(NosLawEnforcementTaskItem item : itemList) { |
|||
List<String> itemValues = itemMap.get(item.getId()); |
|||
if(itemValues == null || itemValues.isEmpty()) { |
|||
throw new ServiceException("请提交所有检查项的的材料"); |
|||
} |
|||
item.setItemValue(itemValues); |
|||
} |
|||
boolean b = taskItemService.updateBatchById(itemList); |
|||
if(!b) { |
|||
throw new ServiceException("系统异常,提交失败"); |
|||
} |
|||
|
|||
// 更新任务状态为待审核
|
|||
task.setTaskStatus(NosLawEnforcementTaskStatusEnum.PENDING_REVIEW.getCode()); |
|||
task.setEnterpriseHandleTime(today); |
|||
boolean update = this.updateById(task); |
|||
if(!update) { |
|||
throw new ServiceException("系统异常,更新任务状态失败"); |
|||
} |
|||
|
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Boolean approveTask(NosLawEnforcementTaskApproveBO bo) { |
|||
Integer platformType = LoginHelper.getPlatformType(); |
|||
if(!PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType)) { |
|||
throw new ServiceException("当前用户不是执法端用户,无法对任务进行审核"); |
|||
} |
|||
|
|||
NosLawEnforcementTask task = this.getById(bo.getTaskId()); |
|||
if(task == null) { |
|||
throw new ServiceException("任务不存在"); |
|||
} |
|||
|
|||
if(!NosLawEnforcementTaskStatusEnum.PENDING_REVIEW.getCode().equals(task.getTaskStatus())) { |
|||
throw new ServiceException("任务状态不是【待审核】状态"); |
|||
} |
|||
|
|||
LambdaQueryWrapper<NosLawEnforcementTaskItem> taskItemQuery = new LambdaQueryWrapper<>(); |
|||
taskItemQuery |
|||
.eq(NosLawEnforcementTaskItem::getTaskId, task.getId()); |
|||
List<NosLawEnforcementTaskItem> itemList = taskItemService.list(taskItemQuery); |
|||
if(itemList.isEmpty()) { |
|||
throw new ServiceException("该任务不存在检查项"); |
|||
} |
|||
|
|||
List<NosLawEnforcementTaskItemApproveBO> boItemList = bo.getItemList(); |
|||
Map<String, NosLawEnforcementTaskItemApproveBO> taskItemApproveMap = boItemList.stream() |
|||
.collect(Collectors |
|||
.toMap(NosLawEnforcementTaskItemApproveBO::getItemId, Function.identity())); |
|||
|
|||
boolean allPass = true; |
|||
for(NosLawEnforcementTaskItem item : itemList) { |
|||
NosLawEnforcementTaskItemApproveBO approveBO = taskItemApproveMap.get(item.getId()); |
|||
if(approveBO == null) { |
|||
throw new ServiceException("请提交所有检查项的审核结果"); |
|||
} |
|||
if(approveBO.getPass()) { |
|||
item.setPass(1); |
|||
} else { |
|||
item.setPass(0); |
|||
item.setReason(approveBO.getReason()); |
|||
allPass = false; |
|||
} |
|||
} |
|||
taskItemService.updateBatchById(itemList); |
|||
|
|||
task.setCheckTime(new Date()); |
|||
if(allPass) { |
|||
task.setTaskStatus(NosLawEnforcementTaskStatusEnum.COMPLETED.getCode()); |
|||
task.setCheckResult(CheckResultEnum.COMPLETED.getCode()); |
|||
|
|||
} else { |
|||
if(CheckResultEnum.PENDING_VERIFICATION.getCode().equals(bo.getCheckResult())) { |
|||
task.setCheckResult(CheckResultEnum.PENDING_VERIFICATION.getCode()); |
|||
task.setTaskStatus(NosLawEnforcementTaskStatusEnum.PENDING_ON_SITE_DISPOSAL.getCode()); |
|||
// 设置原类型
|
|||
task.setTaskOriginalTypeId(task.getTaskTypeId()); |
|||
// 转为待核实案件
|
|||
task.setTaskTypeId(NosLawEnforcementTaskTypeEnum.PENDING_VERIFICATION_CASE.getCode()); |
|||
} else if (CheckResultEnum.RETURNED_FOR_CORRECTION.getCode().equals(bo.getCheckResult())) { |
|||
task.setCheckResult(CheckResultEnum.RETURNED_FOR_CORRECTION.getCode()); |
|||
task.setTaskStatus(NosLawEnforcementTaskStatusEnum.RETURNED_FOR_CORRECTION.getCode()); |
|||
|
|||
DateTime endedOfDay = DateUtil.endOfDay(bo.getDeadline()); |
|||
// 需要截断到秒,防止因为毫秒,导致数据库存储的时间进位到第二天凌晨
|
|||
endedOfDay = DateUtil.truncate(endedOfDay, DateField.SECOND); |
|||
|
|||
task.setDeadline(endedOfDay); |
|||
} else { |
|||
throw new ServiceException("请选择正确的检查结果"); |
|||
} |
|||
} |
|||
return updateById(task); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Boolean commentTask(NosLawEnforcementTaskCommentBO bo) { |
|||
Integer platformType = LoginHelper.getPlatformType(); |
|||
if(!PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType)) { |
|||
throw new ServiceException("当前用户不是企业端用户,无法评价任务"); |
|||
} |
|||
|
|||
Date now = new Date(); |
|||
|
|||
String entId = LoginHelper.getDeptId(); |
|||
LambdaQueryWrapper<NosLawEnforcementTask> queryWrapper = new LambdaQueryWrapper<>(); |
|||
queryWrapper |
|||
.eq(NosLawEnforcementTask::getId, bo.getTaskId()) |
|||
.eq(NosLawEnforcementTask::getEnterpriseId, entId) |
|||
.eq(NosLawEnforcementTask::getTaskStatus, NosLawEnforcementTaskStatusEnum.COMPLETED.getCode()); |
|||
NosLawEnforcementTask task = this.getOne(queryWrapper); |
|||
|
|||
if(task == null) { |
|||
throw new ServiceException("任务未办结/当前用户无权评价"); |
|||
} |
|||
|
|||
// 标记为已评价
|
|||
task.setIsEvaluation(NosTaskCommentStatusEnum.COMMENTED.getCode()); |
|||
task.setCommentTime(now); |
|||
|
|||
// 新增评价
|
|||
NosLawEnforcementTaskComment comment = new NosLawEnforcementTaskComment(); |
|||
comment.setTaskId(bo.getTaskId()); |
|||
comment.setSatisfaction(bo.getSatisfaction()); |
|||
comment.setReason(bo.getReason()); |
|||
taskCommentService.save(comment); |
|||
|
|||
// 发送一个评价的消息
|
|||
// 查询该任务的执法人员
|
|||
LambdaQueryWrapper<NosLawEnforcementTaskLawEnforcerRelation> relationQuery = new LambdaQueryWrapper<>(); |
|||
relationQuery |
|||
.eq(NosLawEnforcementTaskLawEnforcerRelation::getTaskId, task.getId()); |
|||
List<NosLawEnforcementTaskLawEnforcerRelation> relationList = relationService.list(relationQuery); |
|||
|
|||
// 发送已评价的消息
|
|||
NosLawEnforcementCommentMsg commentMsg = new NosLawEnforcementCommentMsg(); |
|||
commentMsg.setTaskId(task.getId()); |
|||
commentMsg.setTaskType(task.getTaskTypeId()); |
|||
commentMsg.setEnterpriseId(task.getEnterpriseId()); |
|||
commentMsg.setEnterpriseName(task.getEnterpriseName()); |
|||
commentMsg.setLawEnforcementAgencyId(task.getLawEnforcementAgencyId()); |
|||
commentMsg.setLawEnforcementAgency(task.getLawEnforcementAgency()); |
|||
if(!relationList.isEmpty()) { |
|||
List<LawEnforcer> lawEnforcer = relationList.stream().map(item -> { |
|||
LawEnforcer user = new LawEnforcer(); |
|||
user.setLawEnforcerId(item.getLawEnforcerId()); |
|||
user.setLawEnforcerName(item.getLawEnforcerName()); |
|||
user.setLawEnforcerPhone(item.getLawEnforcerPhone()); |
|||
user.setLawEnforcerIdCard(item.getLawEnforcerIdCard()); |
|||
return user; |
|||
}).toList(); |
|||
commentMsg.setLawEnforcer(lawEnforcer); |
|||
} |
|||
commentMsg.setCommentStatus(NosTaskCommentStatusEnum.COMMENTED.getCode()); |
|||
commentMsg.setCheckTime(task.getCheckTime()); |
|||
commentMsg.setCommentTime(now); |
|||
commentMsgService.save(commentMsg); |
|||
|
|||
return updateById(task); |
|||
} |
|||
|
|||
@Override |
|||
public Boolean completeVerificationTask(String taskId) { |
|||
|
|||
NosLawEnforcementTask task = this.getById(taskId); |
|||
if(task == null) { |
|||
throw new ServiceException("该任务不存在"); |
|||
} |
|||
if(!NosLawEnforcementTaskTypeEnum.PENDING_VERIFICATION_CASE.getCode().equals(task.getTaskTypeId())) { |
|||
throw new ServiceException("该任务不是待核实案件"); |
|||
} |
|||
if(!NosLawEnforcementTaskStatusEnum.PENDING_ON_SITE_DISPOSAL.getCode().equals(task.getTaskStatus())) { |
|||
throw new ServiceException("该任务状态不是待现场处置状态"); |
|||
} |
|||
task.setTaskStatus(NosLawEnforcementTaskStatusEnum.COMPLETED.getCode()); |
|||
return this.updateById(task); |
|||
} |
|||
|
|||
@Override |
|||
public TableDataInfo<NosLawEnforcementTaskByCommentStatusPageVO> queryByCommentStatus(Integer commentStatus, PageParam pageParam) { |
|||
|
|||
String enterpriseId = LoginHelper.getDeptId(); |
|||
if(StrUtil.isBlank(enterpriseId)) { |
|||
throw new ServiceException("当前用户不是企业用户"); |
|||
} |
|||
|
|||
LambdaQueryWrapper<NosLawEnforcementTask> queryWrapper = new LambdaQueryWrapper<>(); |
|||
queryWrapper |
|||
.eq(NosLawEnforcementTask::getEnterpriseId, enterpriseId) |
|||
.eq(NosLawEnforcementTask::getTaskStatus, NosLawEnforcementTaskStatusEnum.COMPLETED.getCode()) |
|||
.eq(NosLawEnforcementTask::getIsEvaluation, commentStatus) |
|||
.orderByDesc(NosLawEnforcementTask::getCreateTime); |
|||
|
|||
Page<NosLawEnforcementTask> page = this.page(new Page<>(pageParam.getPageNo(), pageParam.getPageSize()), queryWrapper); |
|||
|
|||
if(page.getRecords().isEmpty()) { |
|||
return TableDataInfo.build(); |
|||
} |
|||
|
|||
List<String> taskIdList = page.getRecords().stream().map(NosLawEnforcementTask::getId).toList(); |
|||
|
|||
// 查询任务的执法人员
|
|||
LambdaQueryWrapper<NosLawEnforcementTaskLawEnforcerRelation> relationQuery = new LambdaQueryWrapper<>(); |
|||
relationQuery |
|||
.in(NosLawEnforcementTaskLawEnforcerRelation::getTaskId, taskIdList); |
|||
List<NosLawEnforcementTaskLawEnforcerRelation> relationList = relationService.list(relationQuery); |
|||
Map<String, List<NosLawEnforcementTaskLawEnforcerRelation>> taskUserMap = relationList.stream() |
|||
.collect(Collectors |
|||
.groupingBy(NosLawEnforcementTaskLawEnforcerRelation::getTaskId)); |
|||
|
|||
List<NosLawEnforcementTaskByCommentStatusPageVO> list = page.getRecords().stream() |
|||
.map(item -> { |
|||
NosLawEnforcementTaskByCommentStatusPageVO vo = new NosLawEnforcementTaskByCommentStatusPageVO(); |
|||
BeanUtils.copyProperties(item, vo); |
|||
vo.setTaskId(item.getId()); |
|||
vo.setTaskTypeName(NosLawEnforcementTaskTypeEnum.getNameByCode(item.getTaskTypeId())); |
|||
vo.setTaskType(item.getTaskTypeId()); |
|||
vo.setCommentStatus(commentStatus); |
|||
List<NosLawEnforcementTaskLawEnforcerRelation> relations = taskUserMap.get(item.getId()); |
|||
if(relations != null && !relations.isEmpty()) { |
|||
vo.setLawEnforcer(relations.stream().map(t -> { |
|||
LawEnforcer user = new LawEnforcer(); |
|||
user.setLawEnforcerId(t.getLawEnforcerId()); |
|||
user.setLawEnforcerName(t.getLawEnforcerName()); |
|||
user.setLawEnforcerPhone(t.getLawEnforcerPhone()); |
|||
user.setLawEnforcerIdCard(t.getLawEnforcerIdCard()); |
|||
return user; |
|||
}).toList()); |
|||
} |
|||
|
|||
return vo; |
|||
}).toList(); |
|||
return TableDataInfo.build(list); |
|||
} |
|||
|
|||
@Override |
|||
public TableDataInfo<NosLawEnforcementCommentTaskPageVO> pageHasCommentTask(PageParam pageParam) { |
|||
Long userId = LoginHelper.getUserId(); |
|||
if(userId == null) { |
|||
throw new ServiceException("当前用户未登录"); |
|||
} |
|||
Page<NosLawEnforcementCommentTaskPageVO> page = new Page<>(pageParam.getPageNo(), pageParam.getPageSize()); |
|||
page = this.baseMapper.pageHasCommentTask(page, userId); |
|||
|
|||
List<String> taskIdList = page.getRecords().stream().map(NosLawEnforcementCommentTaskPageVO::getId).toList(); |
|||
|
|||
// 查询任务的执法人员
|
|||
LambdaQueryWrapper<NosLawEnforcementTaskLawEnforcerRelation> relationQuery = new LambdaQueryWrapper<>(); |
|||
relationQuery |
|||
.in(NosLawEnforcementTaskLawEnforcerRelation::getTaskId, taskIdList); |
|||
List<NosLawEnforcementTaskLawEnforcerRelation> relationList = relationService.list(relationQuery); |
|||
Map<String, List<NosLawEnforcementTaskLawEnforcerRelation>> taskUserMap = relationList.stream() |
|||
.collect(Collectors |
|||
.groupingBy(NosLawEnforcementTaskLawEnforcerRelation::getTaskId)); |
|||
|
|||
for (NosLawEnforcementCommentTaskPageVO record : page.getRecords()) { |
|||
List<NosLawEnforcementTaskLawEnforcerRelation> relations = taskUserMap.get(record.getId()); |
|||
if(relations != null && !relations.isEmpty()) { |
|||
List<LawEnforcer> lawEnforcer = relations.stream().map(item -> { |
|||
LawEnforcer user = new LawEnforcer(); |
|||
user.setLawEnforcerId(item.getLawEnforcerId()); |
|||
user.setLawEnforcerName(item.getLawEnforcerName()); |
|||
user.setLawEnforcerPhone(item.getLawEnforcerPhone()); |
|||
user.setLawEnforcerIdCard(item.getLawEnforcerIdCard()); |
|||
return user; |
|||
}).toList(); |
|||
record.setLawEnforcer(lawEnforcer); |
|||
} |
|||
record.setTitle(record.getEnterpriseName() + "季度检查"); |
|||
// 只查询已评论的任务,所以固定评论状态为已评论
|
|||
record.setCommentStatus(NosTaskCommentStatusEnum.COMMENTED.getCode()); |
|||
} |
|||
return TableDataInfo.build(page); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,38 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.zdxt.enforcementnos.domain.NosLawEnforcementTaskSource; |
|||
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskSourceVO; |
|||
import com.zdxt.enforcementnos.mapper.NosLawEnforcementTaskSourceMapper; |
|||
import com.zdxt.enforcementnos.service.NosLawEnforcementTaskSourceService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* @author msy |
|||
*/ |
|||
@Service |
|||
public class NosLawEnforcementTaskSourceServiceImpl extends ServiceImpl<NosLawEnforcementTaskSourceMapper, NosLawEnforcementTaskSource> |
|||
implements NosLawEnforcementTaskSourceService { |
|||
|
|||
|
|||
|
|||
|
|||
@Override |
|||
public List<NosLawEnforcementTaskSourceVO> querySourceList() { |
|||
List<NosLawEnforcementTaskSource> list = this.list(); |
|||
|
|||
return list.stream().map(item -> { |
|||
NosLawEnforcementTaskSourceVO vo = new NosLawEnforcementTaskSourceVO(); |
|||
vo.setId(item.getId()); |
|||
vo.setSourceName(item.getSourceName()); |
|||
return vo; |
|||
}).collect(Collectors.toList()); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,16 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.zdxt.enforcementnos.domain.SysMessageViewLog; |
|||
import com.zdxt.enforcementnos.mapper.SysMessageViewLogMapper; |
|||
import com.zdxt.enforcementnos.service.SysMessageViewLogService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author msy |
|||
* @Date: 2026/6/3 |
|||
*/ |
|||
@Service |
|||
public class SysMessageViewLogServiceImpl extends ServiceImpl<SysMessageViewLogMapper, SysMessageViewLog> |
|||
implements SysMessageViewLogService { |
|||
} |
|||
@ -1,139 +0,0 @@ |
|||
package com.zdxt.enforcementnos.service.impl; |
|||
|
|||
import org.dromara.common.core.utils.MapstructUtils; |
|||
import org.dromara.common.core.utils.StringUtils; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.zdxt.enforcementnos.domain.bo.TestEnfDemoBo; |
|||
import com.zdxt.enforcementnos.domain.vo.TestEnfDemoVo; |
|||
import com.zdxt.enforcementnos.domain.TestEnfDemo; |
|||
import com.zdxt.enforcementnos.mapper.TestEnfDemoMapper; |
|||
import com.zdxt.enforcementnos.service.ITestEnfDemoService; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Collection; |
|||
|
|||
/** |
|||
* enf测试单Service业务层处理 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-19 |
|||
*/ |
|||
@Slf4j |
|||
@RequiredArgsConstructor |
|||
@Service |
|||
public class TestEnfDemoServiceImpl implements ITestEnfDemoService { |
|||
|
|||
private final TestEnfDemoMapper baseMapper; |
|||
|
|||
/** |
|||
* 查询enf测试单 |
|||
* |
|||
* @param id 主键 |
|||
* @return enf测试单 |
|||
*/ |
|||
@Override |
|||
public TestEnfDemoVo queryById(Long id){ |
|||
return baseMapper.selectVoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 分页查询enf测试单列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return enf测试单分页列表 |
|||
*/ |
|||
@Override |
|||
public TableDataInfo<TestEnfDemoVo> queryPageList(TestEnfDemoBo bo, PageQuery pageQuery) { |
|||
LambdaQueryWrapper<TestEnfDemo> lqw = buildQueryWrapper(bo); |
|||
Page<TestEnfDemoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|||
return TableDataInfo.build(result); |
|||
} |
|||
|
|||
/** |
|||
* 查询符合条件的enf测试单列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return enf测试单列表 |
|||
*/ |
|||
@Override |
|||
public List<TestEnfDemoVo> queryList(TestEnfDemoBo bo) { |
|||
LambdaQueryWrapper<TestEnfDemo> lqw = buildQueryWrapper(bo); |
|||
return baseMapper.selectVoList(lqw); |
|||
} |
|||
|
|||
private LambdaQueryWrapper<TestEnfDemo> buildQueryWrapper(TestEnfDemoBo bo) { |
|||
Map<String, Object> params = bo.getParams(); |
|||
LambdaQueryWrapper<TestEnfDemo> lqw = Wrappers.lambdaQuery(); |
|||
lqw.orderByAsc(TestEnfDemo::getId); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getEnfText()), TestEnfDemo::getEnfText, bo.getEnfText()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getEnfContent()), TestEnfDemo::getEnfContent, bo.getEnfContent()); |
|||
lqw.eq(bo.getDeptId() != null, TestEnfDemo::getDeptId, bo.getDeptId()); |
|||
lqw.eq(bo.getUserId() != null, TestEnfDemo::getUserId, bo.getUserId()); |
|||
lqw.eq(bo.getOrderNum() != null, TestEnfDemo::getOrderNum, bo.getOrderNum()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getTestKey()), TestEnfDemo::getTestKey, bo.getTestKey()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getValue()), TestEnfDemo::getValue, bo.getValue()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getBureauDeptId()), TestEnfDemo::getBureauDeptId, bo.getBureauDeptId()); |
|||
return lqw; |
|||
} |
|||
|
|||
/** |
|||
* 新增enf测试单 |
|||
* |
|||
* @param bo enf测试单 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
@Override |
|||
public Boolean insertByBo(TestEnfDemoBo bo) { |
|||
TestEnfDemo add = MapstructUtils.convert(bo, TestEnfDemo.class); |
|||
validEntityBeforeSave(add); |
|||
boolean flag = baseMapper.insert(add) > 0; |
|||
if (flag) { |
|||
bo.setId(add.getId()); |
|||
} |
|||
return flag; |
|||
} |
|||
|
|||
/** |
|||
* 修改enf测试单 |
|||
* |
|||
* @param bo enf测试单 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
@Override |
|||
public Boolean updateByBo(TestEnfDemoBo bo) { |
|||
TestEnfDemo update = MapstructUtils.convert(bo, TestEnfDemo.class); |
|||
validEntityBeforeSave(update); |
|||
return baseMapper.updateById(update) > 0; |
|||
} |
|||
|
|||
/** |
|||
* 保存前的数据校验 |
|||
*/ |
|||
private void validEntityBeforeSave(TestEnfDemo entity){ |
|||
//TODO 做一些数据校验,如唯一约束
|
|||
} |
|||
|
|||
/** |
|||
* 校验并批量删除enf测试单信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
@Override |
|||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { |
|||
if(isValid){ |
|||
//TODO 做一些业务上的校验,判断是否需要校验
|
|||
} |
|||
return baseMapper.deleteByIds(ids) > 0; |
|||
} |
|||
} |
|||
@ -0,0 +1,89 @@ |
|||
<?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.zdxt.enforcementnos.mapper.NosLawEnforcementTaskMapper"> |
|||
|
|||
<select id="selectTaskPage" resultType="com.zdxt.enforcementnos.domain.NosLawEnforcementTask"> |
|||
SELECT |
|||
* |
|||
FROM nos_law_enforcement_task t |
|||
WHERE t.is_delete = '0' |
|||
<!-- 基础条件(所有端共有) --> |
|||
<if test="bo.taskStatus != null"> |
|||
AND t.task_status = #{bo.taskStatus} |
|||
</if> |
|||
<if test="bo.taskTypeId != null"> |
|||
AND t.task_type_id = #{bo.taskTypeId} |
|||
</if> |
|||
|
|||
<!-- 企业端 --> |
|||
<if test="platformType == 3"> |
|||
AND t.enterprise_id = #{enterpriseId} |
|||
<if test="bo.keywords != null and bo.keywords != ''"> |
|||
AND (t.task_no LIKE CONCAT('%', #{bo.keywords}, '%') |
|||
OR t.law_enforcement_agency LIKE CONCAT('%', #{bo.keywords}, '%')) |
|||
</if> |
|||
</if> |
|||
|
|||
<!-- 执法端 --> |
|||
<if test="platformType == 2"> |
|||
AND EXISTS ( |
|||
SELECT 1 FROM nos_law_enforcement_task_law_enforcer_relation r |
|||
WHERE r.task_id = t.id |
|||
AND r.law_enforcer_id = #{userId} |
|||
AND r.is_delete = '0' |
|||
) |
|||
<if test="bo.keywords != null and bo.keywords != ''"> |
|||
AND (t.task_no LIKE CONCAT('%', #{bo.keywords}, '%') |
|||
OR t.enterprise_name LIKE CONCAT('%', #{bo.keywords}, '%')) |
|||
</if> |
|||
</if> |
|||
|
|||
<!-- 监督端 --> |
|||
<if test="platformType != 2 and platformType != 3"> |
|||
<if test="bo.lawEnforcerName != null and bo.lawEnforcerName != ''"> |
|||
AND EXISTS ( |
|||
SELECT 1 FROM nos_law_enforcement_task_law_enforcer_relation r |
|||
WHERE r.task_id = t.id |
|||
AND r.law_enforcer_name = #{bo.lawEnforcerName} |
|||
AND r.is_delete = '0' |
|||
) |
|||
</if> |
|||
<if test="bo.lawEnforcementAgency != null and bo.lawEnforcementAgency != ''"> |
|||
AND t.law_enforcement_agency LIKE CONCAT('%', #{bo.lawEnforcementAgency}, '%') |
|||
</if> |
|||
<if test="bo.enterpriseName != null and bo.enterpriseName != ''"> |
|||
AND t.enterprise_name LIKE CONCAT('%', #{bo.enterpriseName}, '%') |
|||
</if> |
|||
<if test="bo.startTime != null"> |
|||
AND t.create_time >= #{bo.startTime} |
|||
</if> |
|||
<if test="bo.endTime != null"> |
|||
AND t.deadline <= #{bo.endTime} |
|||
</if> |
|||
</if> |
|||
|
|||
ORDER BY t.create_time DESC |
|||
</select> |
|||
|
|||
|
|||
|
|||
<select id="pageHasCommentTask" resultType="com.zdxt.enforcementnos.domain.vo.NosLawEnforcementCommentTaskPageVO"> |
|||
SELECT |
|||
t.id, |
|||
t.enterprise_name AS enterpriseName, |
|||
t.comment_time AS commentTime, |
|||
t.create_time AS startTime, |
|||
t.check_time AS endTime |
|||
FROM |
|||
nos_law_enforcement_task t |
|||
INNER JOIN |
|||
nos_law_enforcement_task_law_enforcer_relation r ON t.id = r.task_id |
|||
WHERE |
|||
t.is_delete = '0' |
|||
AND r.is_delete = '0' |
|||
AND t.comment_time IS NOT NULL |
|||
AND r.law_enforcer_id = #{userId} |
|||
ORDER BY |
|||
t.create_time DESC |
|||
</select> |
|||
</mapper> |
|||
@ -0,0 +1,51 @@ |
|||
<?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.zdxt.enforcementnos.mapper.NosLawEnforcementTaskMsgMapper"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<select id="unReadTaskMsgPage" resultType="com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskMsgPageVO"> |
|||
SELECT |
|||
msg.id, |
|||
msg.task_id AS taskId, |
|||
msg.task_type AS taskType, |
|||
msg.title, |
|||
msg.enterprise_id AS enterpriseId, |
|||
msg.enterprise_name AS enterpriseName, |
|||
msg.law_enforcement_agency_id AS lawEnforcementAgencyId, |
|||
msg.law_enforcement_agency AS lawEnforcementAgency, |
|||
msg.deadline, |
|||
msg.create_time AS createTime |
|||
FROM nos_law_enforcement_task_msg msg |
|||
WHERE msg.is_delete = '0' |
|||
AND msg.enterprise_id = #{enterpriseId} |
|||
AND NOT EXISTS ( |
|||
SELECT 1 |
|||
FROM sys_message_view_log log |
|||
WHERE log.source_id = msg.id |
|||
AND log.create_by = #{userId} |
|||
AND log.is_delete = 0 |
|||
AND log.platform_type = 3 |
|||
) |
|||
ORDER BY msg.create_time DESC |
|||
</select> |
|||
|
|||
|
|||
<select id="unReadTaskMsgCount" resultType="java.lang.Integer"> |
|||
SELECT |
|||
count(*) |
|||
FROM nos_law_enforcement_task_msg msg |
|||
WHERE msg.is_delete = '0' |
|||
AND msg.enterprise_id = #{enterpriseId} |
|||
AND NOT EXISTS ( |
|||
SELECT 1 |
|||
FROM sys_message_view_log log |
|||
WHERE log.source_id = msg.id |
|||
AND log.create_by = #{userId} |
|||
AND log.is_delete = 0 |
|||
AND log.platform_type = 3 |
|||
) |
|||
</select> |
|||
</mapper> |
|||
@ -1,6 +0,0 @@ |
|||
<?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.zdxt.enforcementnos.mapper.TestEnfDemoMapper"> |
|||
</mapper> |
|||
Loading…
Reference in new issue