|
|
|
@ -2,14 +2,22 @@ package com.zdxt.enforcementcode.controller.app.enterprise; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaIgnore; |
|
|
|
import com.zdxt.enforcementcode.domain.bo.EfcodeCpNoticeBo; |
|
|
|
import com.zdxt.enforcementcode.domain.bo.EfcodeCpNoticeMessageBo; |
|
|
|
import com.zdxt.enforcementcode.domain.bo.EnforcementLawNoticeListBo; |
|
|
|
import com.zdxt.enforcementcode.domain.vo.EfcodeCpNoticeMessageVo; |
|
|
|
import com.zdxt.enforcementcode.domain.vo.EfcodeCpNoticeVo; |
|
|
|
import com.zdxt.enforcementcode.domain.vo.EnforcementLawNoticeListVo; |
|
|
|
import com.zdxt.enforcementcode.domain.vo.EnforcementLawNoticeVo; |
|
|
|
import com.zdxt.enforcementcode.service.IEfcodeCpNoticeMessageService; |
|
|
|
import com.zdxt.enforcementcode.service.IEfcodeCpNoticeService; |
|
|
|
import com.zdxt.enforcementcode.service.IEnforcementLawNoticeService; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import jakarta.servlet.http.HttpServletResponse; |
|
|
|
import jakarta.validation.constraints.*; |
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|
|
|
@ -37,7 +45,8 @@ import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
|
public class AppEnforcementLawNoticeController extends BaseController { |
|
|
|
|
|
|
|
private final IEnforcementLawNoticeService enforcementLawNoticeService; |
|
|
|
|
|
|
|
private final IEfcodeCpNoticeService efcodeCpNoticeService; |
|
|
|
private final IEfcodeCpNoticeMessageService efcodeCpNoticeMessageService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询行政执法预告列表 |
|
|
|
@ -109,4 +118,49 @@ public class AppEnforcementLawNoticeController extends BaseController { |
|
|
|
@PathVariable String[] ids) { |
|
|
|
return toAjax(enforcementLawNoticeService.deleteWithValidByIds(List.of(ids), true)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 查询当前企业的预告列表 |
|
|
|
* 通过status区分tab:0=草稿, 1=待执法(已发布), 3=历史(已执行) |
|
|
|
*/ |
|
|
|
@SaIgnore |
|
|
|
@GetMapping("/myList") |
|
|
|
public TableDataInfo<EfcodeCpNoticeVo> myList(EfcodeCpNoticeBo bo, PageQuery pageQuery) { |
|
|
|
return efcodeCpNoticeService.entQueryMyPageList(bo, pageQuery); |
|
|
|
} |
|
|
|
|
|
|
|
// =================== 留言相关 ===================
|
|
|
|
|
|
|
|
/** |
|
|
|
* 查询某个预告的留言列表 |
|
|
|
*/ |
|
|
|
@GetMapping("/message/list") |
|
|
|
public R<List<EfcodeCpNoticeMessageVo>> messageList(@RequestParam String noticeId) { |
|
|
|
EfcodeCpNoticeMessageBo bo = new EfcodeCpNoticeMessageBo(); |
|
|
|
bo.setNoticeId(noticeId); |
|
|
|
bo.setIsDelete(0L); |
|
|
|
List<EfcodeCpNoticeMessageVo> list = efcodeCpNoticeMessageService.queryList(bo); |
|
|
|
// 从预告中获取执法部门名称填充到消息中
|
|
|
|
EfcodeCpNoticeVo notice = efcodeCpNoticeService.queryById(noticeId); |
|
|
|
if (notice != null && StringUtils.isNotBlank(notice.getBureauDeptName())) { |
|
|
|
for (EfcodeCpNoticeMessageVo msg : list) { |
|
|
|
if (msg.getMsgFrom() != null && msg.getMsgFrom() == 0L) { |
|
|
|
msg.setBureauDeptName(notice.getBureauDeptName()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return R.ok(list); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 新增留言 |
|
|
|
*/ |
|
|
|
@SaIgnore |
|
|
|
@PostMapping("/message") |
|
|
|
public R<Void> addMessage(@RequestBody EfcodeCpNoticeMessageBo bo) { |
|
|
|
|
|
|
|
efcodeCpNoticeMessageService.insertByBo(bo); |
|
|
|
return R.ok(); |
|
|
|
} |
|
|
|
} |
|
|
|
|