Commit 500af89e authored by 廖旭伟's avatar 廖旭伟

bug修改

parent 24388060
...@@ -22,6 +22,8 @@ import com.mortals.xhx.module.certificate.model.CertificateCatalogTemplateQuery; ...@@ -22,6 +22,8 @@ import com.mortals.xhx.module.certificate.model.CertificateCatalogTemplateQuery;
import com.mortals.xhx.module.certificate.pdu.ApplyLogPdu; import com.mortals.xhx.module.certificate.pdu.ApplyLogPdu;
import com.mortals.xhx.module.certificate.service.CertificateCatalogService; import com.mortals.xhx.module.certificate.service.CertificateCatalogService;
import com.mortals.xhx.module.certificate.service.CertificateCatalogTemplateService; import com.mortals.xhx.module.certificate.service.CertificateCatalogTemplateService;
import com.mortals.xhx.module.record.model.ApplyLogEntity;
import com.mortals.xhx.module.record.model.ApplyLogQuery;
import com.mortals.xhx.module.record.service.ApplyLogService; import com.mortals.xhx.module.record.service.ApplyLogService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.checkerframework.checker.units.qual.C; import org.checkerframework.checker.units.qual.C;
...@@ -66,6 +68,13 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business ...@@ -66,6 +68,13 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business
@Override @Override
public void doConversion(BusinessLicenseEntity businessLicenseEntity) { public void doConversion(BusinessLicenseEntity businessLicenseEntity) {
if(StringUtils.isEmpty(businessLicenseEntity.getBusinessLicense())){
throw new AppException("执照编码businessLicense不能为空");
}
List<ApplyLogEntity> applyLogEntities = applyLogService.find(new ApplyLogQuery().certificateCode(businessLicenseEntity.getBusinessLicense()));
if(CollectionUtils.isNotEmpty(applyLogEntities)){
throw new AppException("执照编码"+businessLicenseEntity.getBusinessLicense()+"已生成过文件,请勿重复生成");
}
CertificateCatalogEntity catalogEntity = certificateCatalogService.selectOne(new CertificateCatalogQuery().catalogName("营业执照")); CertificateCatalogEntity catalogEntity = certificateCatalogService.selectOne(new CertificateCatalogQuery().catalogName("营业执照"));
if(catalogEntity==null){ if(catalogEntity==null){
throw new AppException("当前系统没有设置营业执照目录"); throw new AppException("当前系统没有设置营业执照目录");
...@@ -101,7 +110,7 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business ...@@ -101,7 +110,7 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business
} }
applyLogPdu.setCatalogId(catalogEntity.getId()); applyLogPdu.setCatalogId(catalogEntity.getId());
applyLogPdu.setTemplateId(templateEntity.getId()); applyLogPdu.setTemplateId(templateEntity.getId());
applyLogPdu.setCertificateCode(businessLicenseEntity.getCredentialsCode()); applyLogPdu.setCertificateCode(businessLicenseEntity.getBusinessLicense());
//applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName()); //applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName());
JSONObject formContent = new JSONObject(); JSONObject formContent = new JSONObject();
...@@ -163,9 +172,9 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business ...@@ -163,9 +172,9 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business
} }
if(templateEntity.getTemplateType()==2) { if(templateEntity.getTemplateType()==2) {
//正本 //正本
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeOriginalBase64()); formContent.put("@image_1_二维码", baseurlPhotos(businessLicenseEntity.getQrCodeOriginalBase64()));
}else { }else {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeDuplicateBase64()); formContent.put("@image_1_二维码", baseurlPhotos(businessLicenseEntity.getQrCodeDuplicateBase64()));
} }
if(log.isDebugEnabled()){ if(log.isDebugEnabled()){
log.debug("证照转化表单json:"+formContent.toJSONString()); log.debug("证照转化表单json:"+formContent.toJSONString());
......
...@@ -84,6 +84,15 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap ...@@ -84,6 +84,15 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
@Autowired @Autowired
private CertificateClassifyService certificateClassifyService; private CertificateClassifyService certificateClassifyService;
@Override
protected void removeAfter(Long[] ids, Context context,int result) throws AppException {
for (Long id:ids){
PrintWaitQueueEntity condition = new PrintWaitQueueEntity();
condition.setApplyId(id);
printWaitQueueService.remove(condition,context);
}
}
@Override @Override
protected ApplyLogEntity findBefore(ApplyLogEntity entity, PageInfo pageInfo, Context context) throws AppException { protected ApplyLogEntity findBefore(ApplyLogEntity entity, PageInfo pageInfo, Context context) throws AppException {
ApplyLogQuery query = new ApplyLogQuery(); ApplyLogQuery query = new ApplyLogQuery();
......
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