Commit 55fdeb8c by guojuxing

审批加备注字段

parent fce674a7
......@@ -108,6 +108,11 @@ public class AuditLogDTO implements Serializable {
*/
private Integer auditType;
/**
* 申请备注
*/
private String remark;
private Date auditExpireTime;
private String enterpriseName;
private String position;
......@@ -307,6 +312,15 @@ public class AuditLogDTO implements Serializable {
return applyUserPhone;
}
public String getRemark() {
return remark;
}
public AuditLogDTO setRemark(String remark) {
this.remark = remark;
return this;
}
@Override
public String toString() {
return "AuditLogDTO{" +
......@@ -328,6 +342,7 @@ public class AuditLogDTO implements Serializable {
", extraInfo='" + extraInfo + '\'' +
", auditReason='" + auditReason + '\'' +
", auditType=" + auditType +
", remark='" + remark + '\'' +
", auditExpireTime=" + auditExpireTime +
", enterpriseName='" + enterpriseName + '\'' +
", position='" + position + '\'' +
......
......@@ -60,6 +60,14 @@ public interface DownloadReportApiService {
ServiceResponse<Void> applyDownloadReport(Integer downloadReportId);
/**
* 申请下载
* @param downloadReportId
* @param remark 申请备注
* @return
*/
ServiceResponse<Void> applyDownloadReport(Integer downloadReportId, String remark);
/**
* 获取下载日志详情
* @Title: getDownloadReport
* @Description:
......
......@@ -105,6 +105,11 @@ public class TabAuditLog {
*/
private Date auditExpireTime;
/**
* 申请备注
*/
private String remark;
public Integer getAuditLogId() {
return auditLogId;
}
......@@ -256,4 +261,13 @@ public class TabAuditLog {
public void setAuditExpireTime(Date auditExpireTime) {
this.auditExpireTime = auditExpireTime;
}
public String getRemark() {
return remark;
}
public TabAuditLog setRemark(String remark) {
this.remark = remark;
return this;
}
}
\ No newline at end of file
......@@ -129,6 +129,15 @@ public class DownloadReportApiServiceImpl implements DownloadReportApiService {
@Override
public ServiceResponse<Void> applyDownloadReport(Integer downloadReportId) {
return applyDownloadReportCommon(downloadReportId, null);
}
@Override
public ServiceResponse<Void> applyDownloadReport(Integer downloadReportId, String remark) {
return applyDownloadReportCommon(downloadReportId, remark);
}
private ServiceResponse<Void> applyDownloadReportCommon(Integer downloadReportId, String remark) {
TabDownloadReport downloadReport = this.downloadReportService.getById(downloadReportId);
if (downloadReport == null) {
return EnterpriseServiceResponse.failure(ErrorCode.NOTEXISTS);
......@@ -148,6 +157,7 @@ public class DownloadReportApiServiceImpl implements DownloadReportApiService {
jsonObject.put("downloadReportId", downloadReportId);
auditLogDTO.setExtraInfo(jsonObject.toJSONString());
auditLogDTO.setAuditType(AuditTypeEnum.DOWNLOAD_REPORT.getCode());
auditLogDTO.setRemark(remark);
return auditLogApiService.apply(auditLogDTO);
}
......
......@@ -161,6 +161,7 @@ public class RiskModeApiServiceImpl implements RiskModeApiService {
map.put("riskModeId", riskModeId);
auditLogDTO.setExtraInfo(JSON.toJSONString(map));
auditLogDTO.setAuditType(AuditTypeEnum.RISK_MODE.getCode());
auditLogDTO.setRemark(applyReason);
ServiceResponse<Void> serviceResponse = auditLogApiService.apply(auditLogDTO);
return serviceResponse;
}
......
......@@ -21,11 +21,12 @@
<result column="audit_reason" jdbcType="VARCHAR" property="auditReason" />
<result column="audit_type" jdbcType="INTEGER" property="auditType" />
<result column="audit_expire_time" jdbcType="TIMESTAMP" property="auditExpireTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
audit_log_id, enterprise_id, apply_user_id, apply_user_name, apply_time, project_item_id,
project_item_name, auditor_id, auditor_name, auditor_phone, audit_time, audit_result,
delete_flag, create_time, update_time, extra_info, audit_reason, audit_type, audit_expire_time
delete_flag, create_time, update_time, extra_info, audit_reason, audit_type, audit_expire_time, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -41,14 +42,14 @@
auditor_phone, audit_time, audit_result,
delete_flag, create_time, update_time,
extra_info, audit_reason, audit_type,
audit_expire_time)
audit_expire_time, remark)
values (#{auditLogId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{applyUserId,jdbcType=INTEGER},
#{applyUserName,jdbcType=VARCHAR}, #{applyTime,jdbcType=TIMESTAMP}, #{projectItemId,jdbcType=INTEGER},
#{projectItemName,jdbcType=VARCHAR}, #{auditorId,jdbcType=INTEGER}, #{auditorName,jdbcType=VARCHAR},
#{auditorPhone,jdbcType=VARCHAR}, #{auditTime,jdbcType=TIMESTAMP}, #{auditResult,jdbcType=INTEGER},
#{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{extraInfo,jdbcType=VARCHAR}, #{auditReason,jdbcType=VARCHAR}, #{auditType,jdbcType=INTEGER},
#{auditExpireTime,jdbcType=TIMESTAMP})
#{auditExpireTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAuditLog">
<selectKey keyProperty="auditLogId" order="AFTER" resultType="java.lang.Integer">
......@@ -113,6 +114,9 @@
<if test="auditExpireTime != null">
audit_expire_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditLogId != null">
......@@ -172,6 +176,9 @@
<if test="auditExpireTime != null">
#{auditExpireTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAuditLog">
......@@ -231,6 +238,9 @@
<if test="auditExpireTime != null">
audit_expire_time = #{auditExpireTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where audit_log_id = #{auditLogId,jdbcType=INTEGER}
</update>
......@@ -253,7 +263,8 @@
extra_info = #{extraInfo,jdbcType=VARCHAR},
audit_reason = #{auditReason,jdbcType=VARCHAR},
audit_type = #{auditType,jdbcType=INTEGER},
audit_expire_time = #{auditExpireTime,jdbcType=TIMESTAMP}
audit_expire_time = #{auditExpireTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
where audit_log_id = #{auditLogId,jdbcType=INTEGER}
</update>
<select id="getLastWaitAuditByApplyUser" resultMap="BaseResultMap">
......
......@@ -51,8 +51,8 @@ public class DownloadReportController {
}
@RequestMapping("/apply-download-report")
public RestResponse applyDownloadReport(Integer downloadReportId) {
ServiceResponse<Void> serviceResponse = this.downloadReportApiService.applyDownloadReport(downloadReportId);
public RestResponse applyDownloadReport(Integer downloadReportId, String remark) {
ServiceResponse<Void> serviceResponse = this.downloadReportApiService.applyDownloadReport(downloadReportId, remark);
ServiceResponse<DownloadReportDTO> downloadReport = this.downloadReportApiService.getDownloadReport(downloadReportId);
if (serviceResponse.isSuccess()) {
LogUtils.createLog("下载报表", downloadReport.getResult().getFileName());
......
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