getDefault获取证照信息修改逻辑

This commit is contained in:
guohb
2024-05-08 14:40:10 +08:00
parent baf2e86c7f
commit a2e999444a
2 changed files with 14 additions and 22 deletions

View File

@@ -91,19 +91,16 @@ public class SubmitLicenseResponse {
@ApiModelProperty("流程记录")
private List<ShopAuditInfoVO> processRecords;
public static SubmitLicenseResponse from(GetStoreInfoByCodeResponse storeInfoCode){
if (Objects.isNull(storeInfoCode)){
return null;
public static SubmitLicenseResponse from(GetStoreInfoByCodeResponse storeInfoCode,
SubmitLicenseResponse submitLicenseResponse){
if (Objects.isNull(submitLicenseResponse)){
submitLicenseResponse = new SubmitLicenseResponse();
}
GetStoreInfoByCodeResponse.InnerData data = storeInfoCode.getData();
GetStoreInfoByCodeResponse.StoreDocument storeDocument = data.getStoreDocument();
GetStoreInfoByCodeResponse.StoreDocument storeDocument = storeInfoCode.getData().getStoreDocument();
boolean storeBusinessValidPeriod = storeDocument.getStoreBusinessValidPeriod().equals("9");
SubmitLicenseResponse submitLicenseResponse = new SubmitLicenseResponse();
submitLicenseResponse.setId(null);
submitLicenseResponse.setShopId(null);
submitLicenseResponse.setLicenseType(LicenseTypeEnum.matchName(storeDocument.getStoreBusinessType()).getCode());
submitLicenseResponse.setLicenseLegalPerson(storeDocument.getStoreDirector());
submitLicenseResponse.setIssueTime(DateUtil.parseTime(storeDocument.getStoreBusinessDate()));
submitLicenseResponse.setIssueTime(DateUtil.parseDate(storeDocument.getStoreBusinessDate()));
submitLicenseResponse.setLicenseAddress(storeDocument.getStoreBusinessAdd());
submitLicenseResponse.setValidity(storeBusinessValidPeriod ? null : DateUtil.parseTime(storeDocument.getStoreBusinessValidPeriod()));
submitLicenseResponse.setOperator(storeDocument.getStoreDirector());
@@ -111,18 +108,14 @@ public class SubmitLicenseResponse {
submitLicenseResponse.setMainBusiness(storeDocument.getStoreFoodLicenseMainBusiness());
submitLicenseResponse.setBusinessProject(storeDocument.getStoreFoodLicenseBusinessScope());
submitLicenseResponse.setRemark(storeDocument.getStoreRemark());
submitLicenseResponse.setRemarkUrl(null);
submitLicenseResponse.setSubmitStatus(null);
submitLicenseResponse.setLicenseUrl(storeDocument.getStoreBusinessImg());
submitLicenseResponse.setLicenseName(storeDocument.getStoreBusinessName());
submitLicenseResponse.setSocialCreditCode(storeDocument.getStoreBusinessNumber());
submitLicenseResponse.setIdCardAndLicense1(null);
submitLicenseResponse.setIdCardAndLicense2(null);
submitLicenseResponse.setFoodLicenseUrl(storeDocument.getStoreFoodLicenseImg());
submitLicenseResponse.setBusinessPremises(storeDocument.getStoreFoodLicenseBusinessAddress());
submitLicenseResponse.setFoodLicenseCode(storeDocument.getStoreFoodLicense());
submitLicenseResponse.setFoodLicenseStartTime(DateUtil.parseTime(storeDocument.getStoreFoodLicenseBeginDate()));
submitLicenseResponse.setFoodLicenseEndTime(DateUtil.parseTime(storeDocument.getStoreFoodLicenseEndDate()));
submitLicenseResponse.setFoodLicenseStartTime(DateUtil.parseDate(storeDocument.getStoreFoodLicenseBeginDate()));
submitLicenseResponse.setFoodLicenseEndTime(DateUtil.parseDate(storeDocument.getStoreFoodLicenseEndDate()));
return submitLicenseResponse;
}