Commit 27774cdf authored by 廖旭伟's avatar 廖旭伟

bug修改

parent d5786e43
......@@ -700,7 +700,7 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
@Override
public ApplyLogEntity getBySocialCode(String socialCode) throws AppException {
ApplyLogEntity entity = this.selectOne(new ApplyLogQuery().socialCode(socialCode).recordStatus(YesNoEnum.NO.getValue()));
ApplyLogEntity entity = this.selectOne(new ApplyLogQuery().socialCode(socialCode));
if (entity != null) {
entity.setAnnexUrl("");
List<ChildLicenseEntity> childs = childLicenseService.find(new ChildLicenseQuery().applyId(entity.getId())
......
......@@ -4,6 +4,7 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.common.code.CertificateStatus;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.code.StatusEnum;
import com.mortals.xhx.common.utils.StringUtils;
......@@ -16,6 +17,7 @@ import com.mortals.xhx.module.record.dao.RetainLogDao;
import com.mortals.xhx.module.record.model.ApplyLogEntity;
import com.mortals.xhx.module.record.model.RetainLogEntity;
import com.mortals.xhx.module.record.model.RetainLogQuery;
import com.mortals.xhx.module.record.service.ApplyLogService;
import com.mortals.xhx.module.record.service.RetainLogService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
......@@ -23,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
......@@ -37,6 +40,8 @@ public class RetainLogServiceImpl extends AbstractCRUDServiceImpl<RetainLogDao,
@Autowired
private ChildLicenseService childLicenseService;
@Autowired
private ApplyLogService applyLogService;
@Override
protected RetainLogEntity findBefore(RetainLogEntity entity, PageInfo pageInfo, Context context) throws AppException {
......@@ -92,4 +97,18 @@ public class RetainLogServiceImpl extends AbstractCRUDServiceImpl<RetainLogDao,
}
}
}
@Override
protected void updateAfter(RetainLogEntity entity, Context context) throws AppException {
if(entity.getCertificateStatus()== CertificateStatus.CANCEL.getValue()){
ApplyLogEntity applyLogEntity = applyLogService.get(entity.getApplyId());
if(applyLogEntity!=null){
ApplyLogEntity update = new ApplyLogEntity();
update.setId(applyLogEntity.getId());
update.setSocialCode(applyLogEntity.getSocialCode()+"_zx");
update.setUpdateTime(new Date());
applyLogService.update(update);
}
}
}
}
\ No newline at end of file
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