取名优化

首页签出2023/07/24
wyb 2 years ago
parent 5a58744c8b
commit 38d6032c34

@ -32,7 +32,7 @@ public class FirstPageCheckoutConverter {
return null;
}
FirstPageCheckoutInDTO dto = new FirstPageCheckoutInDTO();
dto.setSyncType(firstPageCheckoutRequest.getSyncType());
dto.setSyncMethod(firstPageCheckoutRequest.getSyncMethod());
dto.setPatientInfo(firstPageCheckoutRequest.getPatientInfo());
dto.setSysId(firstPageCheckoutRequest.getSysId());
return dto;

@ -1,6 +1,6 @@
package com.docus.server.collection.dto;
import com.docus.server.collection.enums.SyncType;
import com.docus.server.collection.enums.FileSyncMethod;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -16,8 +16,8 @@ public class FirstPageCheckoutInDTO {
@ApiModelProperty("患者基础信息")
private PatientInfoDTO patientInfo;
@ApiModelProperty("同步类型ALL 或者 BY_SYS_ID")
private SyncType syncType;
@ApiModelProperty("同步文件方式ALL 或者 BY_SYS_ID")
private FileSyncMethod syncMethod;
@ApiModelProperty("系统id")
private List<String> sysId;

@ -1,6 +1,6 @@
package com.docus.server.collection.dto;
import com.sun.star.sync.SyncType;
import com.docus.server.collection.enums.FileSyncMethod;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -17,8 +17,8 @@ public class FirstPageCheckoutRequest {
@ApiModelProperty("患者基础信息")
private PatientInfoDTO patientInfo;
@ApiModelProperty("同步类型ALL 或者 BY_SYS_ID")
private SyncType syncType;
@ApiModelProperty("同步文件方式ALL 或者 BY_SYS_ID")
private FileSyncMethod syncMethod;
@ApiModelProperty("系统id")
private List<String> sysId;

@ -0,0 +1,17 @@
package com.docus.server.collection.enums;
/**
* id
*
* @author wyb
*/
public enum FileSyncMethod {
/**
*
*/
ALL,
/**
* id
*/
BY_SYS_ID
}

@ -1,12 +0,0 @@
package com.docus.server.collection.enums;
public enum SyncType{
/**
*
*/
ALL,
/**
* id
*/
BY_SYS_ID
}

@ -3,6 +3,7 @@ package com.docus.server.collection.validator.impl;
import com.docus.core.util.Func;
import com.docus.server.collection.dto.FirstPageCheckoutRequest;
import com.docus.server.collection.dto.PatientInfoDTO;
import com.docus.server.collection.enums.FileSyncMethod;
import com.docus.server.collection.util.DateTimeUtil;
import com.docus.server.collection.validator.RequestValidator;
import com.docus.server.collection.validator.ValidateResult;
@ -24,11 +25,11 @@ public class FirstPageCheckoutRequestValidator implements RequestValidator {
@Override
public ValidateResult validate() {
FirstPageCheckoutRequest request = this.request;
FirstPageCheckoutRequest.SyncType syncType = request.getSyncType();
FileSyncMethod syncType = request.getSyncMethod();
if (Objects.isNull(syncType)) {
return ValidateResult.failed("同步类型不能为空!");
return ValidateResult.failed("同步文件方式不能为空!");
}
if (syncType == FirstPageCheckoutRequest.SyncType.BY_SYS_ID && Func.isEmpty(request.getSysId())) {
if (syncType == FileSyncMethod.BY_SYS_ID && Func.isEmpty(request.getSysId())) {
return ValidateResult.failed("同步类型为BY_SYS_ID系统id不能为空");
}
PatientInfoDTO patientInfo = request.getPatientInfo();

Loading…
Cancel
Save