Commit 7cf16019 by guojuxing

Merge remote-tracking branch 'origin/developer' into developer

parents 1cfe52b4 1ac83e15
package com.gic.enterprise.constant;
/**
*
* @Description:
* @author zhiwj
* @date 2019-10-28 19:30
*/
public enum DownloadReportSearchTypeEnum {
DATA_CONTENT(1, "数据源", "data_content"),
FIL_NAME(2, "文件名称", "file_name"),
APPLY_USER_NAME(3, "操作人", "apply_user_name"),
;
private Integer code;
private String msg;
private String searchName;
DownloadReportSearchTypeEnum(Integer code, String msg, String searchName) {
this.code = code;
this.msg = msg;
this.searchName = searchName;
}
public Integer getCode() {
return code;
}
public String getMsg() {
return msg;
}
public String getSearchName() {
return searchName;
}
public static String parseSearchType(Integer code) {
for (DownloadReportSearchTypeEnum searchType : values()) {
if (searchType.code.equals(code)) {
return searchType.searchName;
}
}
return null;
}
}
......@@ -28,11 +28,11 @@ public class DownloadReportQO extends PageQO {
@Max(value = 5, message = "不存在该状态", groups = SelectValidView.class)
private Integer downloadReportStatus;
@Min(value = 1, message = "不存在该查询项", groups = SelectValidView.class)
@Max(value = 3, message = "不存在该查询项", groups = SelectValidView.class)
private Integer searchType;
// @Max(value = 3, message = "不存在该查询项", groups = SelectValidView.class)
// private Integer searchType;
private String searchValue;
private String searchName;
// private String searchName;
private Integer auditResult;
private Date auditExpireTime;
private Boolean hasDownloadUrl;
......@@ -79,14 +79,6 @@ public class DownloadReportQO extends PageQO {
this.downloadReportStatus = downloadReportStatus;
}
public Integer getSearchType() {
return searchType;
}
public void setSearchType(Integer searchType) {
this.searchType = searchType;
}
public String getSearchValue() {
return searchValue;
}
......@@ -95,14 +87,6 @@ public class DownloadReportQO extends PageQO {
this.searchValue = searchValue;
}
public String getSearchName() {
return searchName;
}
public void setSearchName(String searchName) {
this.searchName = searchName;
}
public Integer getAuditResult() {
return auditResult;
}
......
......@@ -3,7 +3,6 @@ package com.gic.enterprise.service.impl;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.GlobalInfo;
import com.gic.enterprise.constant.DataSecurityAuditEnum;
import com.gic.enterprise.constant.DownloadReportSearchTypeEnum;
import com.gic.enterprise.dao.mapper.TabDownloadReportMapper;
import com.gic.enterprise.dto.DownloadReportDTO;
import com.gic.enterprise.entity.TabDownloadReport;
......@@ -57,9 +56,9 @@ public class DownloadReportServiceImpl implements DownloadReportService {
// OVER_TIME(3, "超时"),
// BUILD(4, "生成中"),
// GENERATED(5, "已生成")
if (downloadReportQO.getSearchType() != null) {
downloadReportQO.setSearchName(DownloadReportSearchTypeEnum.parseSearchType(downloadReportQO.getSearchType()));
}
// if (downloadReportQO.getSearchType() != null) {
// downloadReportQO.setSearchName(DownloadReportSearchTypeEnum.parseSearchType(downloadReportQO.getSearchType()));
// }
if (downloadReportQO.getDownloadReportStatus() != null) {
switch (downloadReportQO.getDownloadReportStatus()) {
case 0:
......
......@@ -336,18 +336,18 @@
<if test="auditResult != null ">
and audit_result = #{auditResult}
</if>
<if test="searchName != null and searchName != '' and searchValue != null and searchValue != '' ">
and ${searchName} like concat('%', #{searchValue} ,'%')
<if test="searchValue != null and searchValue != '' ">
and (data_content like concat('%', #{searchValue} ,'%') or file_name like concat('%', #{searchValue} ,'%') or apply_user_name like concat('%', #{searchValue} ,'%') )
</if>
<if test="auditExpireTime != null ">
and audit_expire_time &lt; #{auditExpireTime}
</if>
<if test="hasDownloadUrl != null ">
<if test="hasDownloadUrl">
and has_download_url is not null
and download_url is not null
</if>
<if test="!hasDownloadUrl">
and has_download_url is null
and download_url is null
</if>
</if>
<if test="projectCode != null and projectCode != '' ">
......
......@@ -8,9 +8,11 @@ import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.download.utils.log.LogUtils;
import com.gic.enterprise.ano.IgnoreLogin;
import com.gic.enterprise.dto.AuditLogDTO;
import com.gic.enterprise.dto.ProjectItemDTO;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.qo.AuditLogQO;
import com.gic.enterprise.service.AuditLogApiService;
import com.gic.enterprise.service.ProjectItemApiService;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.enterprise.utils.UserDetailUtils;
import org.apache.commons.lang.StringUtils;
......@@ -32,6 +34,8 @@ public class AuditLogController {
private AuditLogApiService auditLogApiService;
@Autowired
private AuditorApiService auditorApiService;
@Autowired
private ProjectItemApiService projectItemApiService;
@RequestMapping("/audit")
@IgnoreLogin
......@@ -87,4 +91,10 @@ public class AuditLogController {
return ResultControllerUtils.commonResult(serviceResponse);
}
@RequestMapping("/project-item-info")
public RestResponse projectItemInfo(String projectItemCode) {
ServiceResponse<ProjectItemDTO> serviceResponse = this.projectItemApiService.getByProjectItemCode(projectItemCode);
return ResultControllerUtils.commonResult(serviceResponse);
}
}
......@@ -109,4 +109,6 @@
<dubbo:reference interface="com.gic.member.config.api.service.ServiceConfigApiService" id="serviceConfigApiService" timeout="6000"/>
<dubbo:reference interface="com.gic.open.api.service.market.MarketUserApiService" id="marketUserApiService" timeout="6000" />
</beans>
\ No newline at end of file
<dubbo:reference interface="com.gic.enterprise.service.ProjectItemApiService" id="projectItemApiService" timeout="6000"/>
</beans>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment