Browse Source

Merge remote-tracking branch 'origin/dev_issue_audit' into dev_temp

dev_shibei_match
yinzuomei 5 years ago
parent
commit
d2904296e5
  1. 14
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java
  2. 33
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java
  3. 2
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml
  4. 18
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationHistoryDao.xml

14
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java

@ -98,4 +98,18 @@ public interface IssueConstant {
String AUDIT_SWITCH_NAME = "议题发布前经网格员审核";
String GRID = "grid";
/**
* 审核状态:待审核
*/
String UNDER_AUDITING="under_auditing";
/**
* 审核状态:通过
*/
String APPROVED="approved";
/**
* 审核状态:驳回
*/
String REJECTED="rejected";
}

33
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java

@ -2,6 +2,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.IssueConstant;
import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.dto.form.IssueApplicationIdFormDTO;
import com.epmet.dto.result.ApplicationHistoryResDTO;
@ -33,15 +34,41 @@ public class IssueAuditController {
/**
* @param formDTO
* @author yinzuomei
* @description 待审核|| 已驳回 列表
* @description 待审核列表
* @Date 2020/11/18 17:28
**/
@PostMapping("underauditinglist")
public Result<List<IssueApplicationResDTO>> queryUnderAuditingList(@RequestBody IssueAppQueryFormDTO formDTO) {
formDTO.setApplyStatus(IssueConstant.UNDER_AUDITING);
ValidatorUtils.validateEntity(formDTO,IssueAppQueryFormDTO.Required.class,IssueAppQueryFormDTO.GovFormDTO.class);
return new Result<List<IssueApplicationResDTO>>().ok(issueApplicationService.listIssueApp(formDTO));
}
/**
* @param formDTO
* @author yinzuomei
* @description 已驳回 列表
* @Date 2020/11/18 17:28
**/
@PostMapping("applicationlist")
public Result<List<IssueApplicationResDTO>> queryIssueAppliationList(@RequestBody IssueAppQueryFormDTO formDTO) {
@PostMapping("rejectedlist")
public Result<List<IssueApplicationResDTO>> queryRejectedList(@RequestBody IssueAppQueryFormDTO formDTO) {
formDTO.setApplyStatus(IssueConstant.REJECTED);
ValidatorUtils.validateEntity(formDTO,IssueAppQueryFormDTO.Required.class,IssueAppQueryFormDTO.GovFormDTO.class);
return new Result<List<IssueApplicationResDTO>>().ok(issueApplicationService.listIssueApp(formDTO));
}
/**
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.IssueApplicationResDTO>>
* @param formDTO
* @author yinzuomei
* @description 通用查询列表接口对其他服务开放
* @Date 2020/11/19 13:30
**/
@PostMapping("applicationlist")
public Result<List<IssueApplicationResDTO>> queryIssueAppliationList(@RequestBody IssueAppQueryFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO,IssueAppQueryFormDTO.Required.class);
return new Result<List<IssueApplicationResDTO>>().ok(issueApplicationService.listIssueApp(formDTO));
}
/**
* @param formDTO

2
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml

@ -20,7 +20,7 @@
SELECT
ia.id AS issueApplicationId,
ia.ISSUE_TITLE,
unix_timestamp( ia.UPDATED_TIME ) AS latestTime
unix_timestamp( ia.UPDATED_TIME ) AS latestTime,
ia.SUGGESTION,
ia.APPLY_STATUS
FROM

18
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationHistoryDao.xml

@ -5,18 +5,18 @@
<!-- 根据issue_application.id查询审核历史 -->
<select id="selectListByIssueApplicationId" resultType="com.epmet.dto.result.ApplicationHistoryResDTO">
SELECT
iah.ID as historyId,
iah.ACTION_TYPE,
unix_timestamp( iah.CREATED_TIME ) AS operateTime,
iah.REASON,
iah.STAFF_NAME
iah.ID as historyId,
iah.ACTION_TYPE,
unix_timestamp( iah.CREATED_TIME ) AS operateTime,
IFNULL(iah.REASON,'')AS REASON,
IFNULL(iah.STAFF_NAME,'')as STAFF_NAME
FROM
issue_application_history iah
issue_application_history iah
WHERE
iah.DEL_FLAG = '0'
AND iah.ISSUE_APPLICATION_ID = #{issueApplicationId}
iah.DEL_FLAG = '0'
AND iah.ISSUE_APPLICATION_ID = #{issueApplicationId}
ORDER BY
iah.CREATED_TIME DESC
iah.CREATED_TIME DESC
</select>
</mapper>
Loading…
Cancel
Save