mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 02:08:15 +08:00
应用服务审核优化
This commit is contained in:
parent
40d179fc9a
commit
5e7d11092c
@ -49,16 +49,16 @@ public class IscAppService implements Serializable {
|
||||
*/
|
||||
private String enabled;
|
||||
|
||||
/**
|
||||
* 申请类型(0申请 1续期)
|
||||
*/
|
||||
private String applyType;
|
||||
|
||||
/**
|
||||
* 审核状态(0待审核 1审核通过 2驳回)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
private String auditMind;
|
||||
|
||||
/**
|
||||
* 虚拟地址
|
||||
*/
|
||||
|
||||
@ -93,6 +93,12 @@ public class IscAppServiceBo extends BaseEntity {
|
||||
@NotNull(message = "续期时长不能为空", groups = { AddGroup.class })
|
||||
private Integer renewalDuration;
|
||||
|
||||
/**
|
||||
* 申请类型(0申请 1续期)
|
||||
*/
|
||||
@NotBlank(message = "申请类型必填")
|
||||
private String applyType;
|
||||
|
||||
|
||||
/**
|
||||
* 分页大小
|
||||
|
||||
@ -82,6 +82,12 @@ public class IscAppServiceVo {
|
||||
@ApiModelProperty("审核状态(0待审核 1审核通过 2驳回)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditMind;
|
||||
|
||||
/**
|
||||
* 虚拟地址
|
||||
*/
|
||||
|
||||
@ -159,6 +159,7 @@ public class IscAppServiceApplyServiceImpl extends ServicePlusImpl<IscAppService
|
||||
IscAppService updateData = null;
|
||||
if(IscConstants.AUDIT_PASS.equals(bo.getStatus())) {
|
||||
updateData = genAuditPassData(apply, appService, bo.getStatus());
|
||||
updateData.setAuditMind(bo.getRemark());
|
||||
}else{
|
||||
//如果 应用服务 状态为不通过 时需要同步状态
|
||||
updateData = genAuditRejectData(appService, bo);
|
||||
@ -243,6 +244,7 @@ public class IscAppServiceApplyServiceImpl extends ServicePlusImpl<IscAppService
|
||||
if(!IscConstants.AUDIT_PASS.equals(appService.getStatus())) {
|
||||
IscAppService updateData = new IscAppService().setAppServiceId(appService.getAppServiceId());
|
||||
updateData.setStatus(bo.getStatus());
|
||||
updateData.setAuditMind(bo.getRemark());
|
||||
return updateData;
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -105,7 +105,6 @@ public class IscAppServiceServiceImpl extends ServicePlusImpl<IscAppServiceMappe
|
||||
IscAppService add = BeanUtil.toBean(bo, IscAppService.class);
|
||||
validEntityBeforeSave(add);
|
||||
add.setStatus(IscConstants.AUDIT_WAIT);
|
||||
add.setApplyType(IscConstants.APPLY_TYPE_APPLY);
|
||||
add.setUserId(SecurityUtils.getUserId());
|
||||
boolean result = save(add);
|
||||
addApplyRecord(bo, IscConstants.APPLY_TYPE_APPLY, add.getAppServiceId());
|
||||
@ -120,12 +119,22 @@ public class IscAppServiceServiceImpl extends ServicePlusImpl<IscAppServiceMappe
|
||||
IscAppService update = new IscAppService().setAppServiceId(bo.getAppServiceId());
|
||||
validEntityBeforeSave(update);
|
||||
boolean result = true;
|
||||
if(!IscConstants.AUDIT_PASS.equals(appService.getStatus())) {
|
||||
update.setStatus(IscConstants.AUDIT_WAIT);
|
||||
boolean changeStatus = !IscConstants.AUDIT_PASS.equals(appService.getStatus());
|
||||
boolean changeRemark = !IscConstants.APPLY_TYPE_RENEWAL.equals(bo.getApplyType());
|
||||
if (changeStatus || changeRemark)
|
||||
{
|
||||
if (changeStatus)
|
||||
{
|
||||
update.setStatus(IscConstants.AUDIT_WAIT);
|
||||
}
|
||||
if (changeRemark)
|
||||
{
|
||||
update.setRemark(bo.getRemark());
|
||||
}
|
||||
result = updateById(update);
|
||||
}
|
||||
String applyType = Objects.nonNull(bo.getRenewalDuration()) ? IscConstants.APPLY_TYPE_RENEWAL :
|
||||
IscConstants.APPLY_TYPE_MODIFY;
|
||||
String applyType = IscConstants.APPLY_TYPE_RENEWAL.equals(bo.getApplyType())
|
||||
? IscConstants.APPLY_TYPE_RENEWAL : IscConstants.APPLY_TYPE_MODIFY;
|
||||
addApplyRecord(bo, applyType, bo.getAppServiceId());
|
||||
return result;
|
||||
}
|
||||
@ -189,8 +198,8 @@ public class IscAppServiceServiceImpl extends ServicePlusImpl<IscAppServiceMappe
|
||||
entity.setRemark(appService.getRemark());
|
||||
switch (applyType) {
|
||||
case IscConstants.APPLY_TYPE_APPLY:
|
||||
entity.setRenewalDuration(appService.getRenewalDuration());
|
||||
case IscConstants.APPLY_TYPE_MODIFY:
|
||||
entity.setRenewalDuration(appService.getRenewalDuration());
|
||||
entity.setQuotaDays(appService.getQuotaDays());
|
||||
entity.setQuotaHours(appService.getQuotaHours());
|
||||
entity.setQuotaMinutes(appService.getQuotaMinutes());
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
<result property="applicationId" column="application_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="enabled" column="enabled"/>
|
||||
<result property="applyType" column="apply_type"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="auditMind" column="audit_mind"/>
|
||||
<result property="virtualAddr" column="virtual_addr"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="quotaDays" column="quota_days"/>
|
||||
@ -23,6 +23,7 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
@ -184,7 +184,7 @@
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请时长" prop="renewalDuration" v-if="this.applyType === 0 || this.applyType === 1">
|
||||
<el-form-item label="申请时长" prop="renewalDuration" v-if="!(this.form.status == 1 && this.applyType == 2)">
|
||||
<el-select v-model="form.renewalDuration" placeholder="请选择申请时长" clearable size="small">
|
||||
<el-option key="1" label="1(月)" value="1"/>
|
||||
<el-option key="3" label="3(月)" value="3"/>
|
||||
@ -233,6 +233,10 @@
|
||||
<dict-tag :options="statusOptions" :value="this.form.status"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" v-if="this.form.status == 2">
|
||||
<el-col :span="6" class="col-title">审核意见</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.auditMind}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">启用状态</el-col>
|
||||
<el-col :span="18" class="col-content">
|
||||
@ -467,6 +471,7 @@ export default {
|
||||
getAppservice(appServiceId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.form.remark = undefined;
|
||||
this.form.status = this.form.status.split(",");
|
||||
this.open = true;
|
||||
this.title = "应用服务续期";
|
||||
@ -506,6 +511,7 @@ export default {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
this.form.applyType = this.applyType;
|
||||
this.form.status = this.form.status.join(",");
|
||||
if (this.form.appServiceId != null) {
|
||||
updateAppservice(this.form).then(response => {
|
||||
|
||||
@ -11,7 +11,6 @@ CREATE TABLE `isc_app_service` (
|
||||
`application_id` bigint NULL DEFAULT NULL COMMENT '应用ID',
|
||||
`user_id` bigint NULL DEFAULT NULL COMMENT '用户ID',
|
||||
`enabled` char(1) NOT NULL COMMENT '启用状态(0启用 1停用)',
|
||||
`apply_type` char(1) DEFAULT NULL COMMENT '申请类型(0申请 1续期)',
|
||||
`status` char(1) DEFAULT NULL COMMENT '审核状态(0待审核 1审核通过 2驳回)',
|
||||
`virtual_addr` varchar(255) DEFAULT NULL COMMENT '虚拟地址',
|
||||
`end_time` datetime(0) NULL DEFAULT NULL COMMENT '到期时间',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user