Commit 5cd6f2e6 authored by 廖旭伟's avatar 廖旭伟

证照申请修改后删除历史数据;营业执照数据对接接口修改;营业执照多模板处理逻辑修改

parent 713f01fe
...@@ -227,6 +227,8 @@ public class CertificateApi extends BaseJsonBodyController { ...@@ -227,6 +227,8 @@ public class CertificateApi extends BaseJsonBodyController {
printWaitQueueVO.setCatalogId(printWaitQueueEntity.getCatalogId()); printWaitQueueVO.setCatalogId(printWaitQueueEntity.getCatalogId());
printWaitQueueVO.setCatalogCode(printWaitQueueEntity.getCatalogCode()); printWaitQueueVO.setCatalogCode(printWaitQueueEntity.getCatalogCode());
printWaitQueueVO.setCatalogName(printWaitQueueEntity.getCatalogName()); printWaitQueueVO.setCatalogName(printWaitQueueEntity.getCatalogName());
printWaitQueueVO.setTemplateId(printWaitQueueEntity.getTemplateId());
printWaitQueueVO.setTemplateName(printWaitQueueEntity.getTemplateName());
printWaitQueueVO.setWaitQueueId(printWaitQueueEntity.getId()); printWaitQueueVO.setWaitQueueId(printWaitQueueEntity.getId());
printWaitQueueVO.setCertificateCode(printWaitQueueEntity.getCertificateCode()); printWaitQueueVO.setCertificateCode(printWaitQueueEntity.getCertificateCode());
printWaitQueueVO.setCertificateName(printWaitQueueEntity.getCertificateName()); printWaitQueueVO.setCertificateName(printWaitQueueEntity.getCertificateName());
......
...@@ -18,6 +18,14 @@ public class PrintWaitQueueVO { ...@@ -18,6 +18,14 @@ public class PrintWaitQueueVO {
* 目录名称 * 目录名称
*/ */
private String catalogName; private String catalogName;
/**
* 证照目录模板ID
*/
private Long templateId;
/**
* 证照模板名称
*/
private String templateName;
/** /**
* 证照名称 * 证照名称
*/ */
......
package com.mortals.xhx.module.business.service.impl; package com.mortals.xhx.module.business.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.code.ExcuteStatus; import com.mortals.framework.common.code.ExcuteStatus;
...@@ -15,9 +16,15 @@ import com.mortals.xhx.base.system.task.model.TaskQuery; ...@@ -15,9 +16,15 @@ import com.mortals.xhx.base.system.task.model.TaskQuery;
import com.mortals.xhx.common.code.HolderIdType; import com.mortals.xhx.common.code.HolderIdType;
import com.mortals.xhx.common.code.HolderType; import com.mortals.xhx.common.code.HolderType;
import com.mortals.xhx.module.certificate.model.CertificateCatalogEntity; import com.mortals.xhx.module.certificate.model.CertificateCatalogEntity;
import com.mortals.xhx.module.certificate.model.CertificateCatalogQuery;
import com.mortals.xhx.module.certificate.model.CertificateCatalogTemplateEntity;
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.record.service.ApplyLogService; import com.mortals.xhx.module.record.service.ApplyLogService;
import org.apache.commons.collections4.CollectionUtils;
import org.checkerframework.checker.units.qual.C;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -43,36 +50,34 @@ import java.util.concurrent.Executors; ...@@ -43,36 +50,34 @@ import java.util.concurrent.Executors;
@Service("businessLicenseService") @Service("businessLicenseService")
public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<BusinessLicenseDao, BusinessLicenseEntity, Long> implements BusinessLicenseService { public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<BusinessLicenseDao, BusinessLicenseEntity, Long> implements BusinessLicenseService {
/** 营业执照目录(内资公司)id*/
@Value("${catalog.business.nzgs:1}")
private long nzgs;
/** 营业执照目录(内资分公司)id*/
@Value("${catalog.business.nzgs:2}")
private long nzgfs;
/** 营业执照目录(个人)id*/
@Value("${catalog.business.personal:3}")
private long personal;
/** 营业执照目录(有限责任公司)id*/
@Value("${catalog.business.liabilityCompany:4}")
private long liabilityCompany;
/** 营业执照目录(股份有限公司)id*/
@Value("${catalog.business.stockCompany:5}")
private long stockCompany;
@Autowired @Autowired
private ApplyLogService applyLogService; private ApplyLogService applyLogService;
@Autowired
private CertificateCatalogService certificateCatalogService;
@Autowired
private CertificateCatalogTemplateService certificateCatalogTemplateService;
@Override @Override
public void apiSave(BusinessLicenseEntity businessLicenseEntity) { public void apiSave(BusinessLicenseEntity businessLicenseEntity) {
businessLicenseEntity.setCreateTime(new Date()); businessLicenseEntity.setCreateTime(new Date());
businessLicenseEntity.setStatus(0);
this.save(businessLicenseEntity); this.save(businessLicenseEntity);
} }
@Override @Override
public void doConversion(BusinessLicenseEntity businessLicenseEntity) { public void doConversion(BusinessLicenseEntity businessLicenseEntity) {
CertificateCatalogEntity catalogEntity = certificateCatalogService.selectOne(new CertificateCatalogQuery().catalogName("营业执照"));
if(catalogEntity==null){
throw new AppException("当前系统没有设置营业执照目录");
}
CertificateCatalogTemplateQuery templateQuery = new CertificateCatalogTemplateQuery();
templateQuery.setCatalogId(catalogEntity.getId());
templateQuery.setTemplateName("%"+businessLicenseEntity.getComposingForm()+"%");
List<CertificateCatalogTemplateEntity> templateEntityList = certificateCatalogTemplateService.find(templateQuery);
if(CollectionUtils.isEmpty(templateEntityList)){
throw new AppException("当前系统没有["+businessLicenseEntity.getComposingForm()+"]营业执照模板");
}
for(CertificateCatalogTemplateEntity templateEntity:templateEntityList){
ApplyLogPdu applyLogPdu = new ApplyLogPdu(); ApplyLogPdu applyLogPdu = new ApplyLogPdu();
Date date = DateUtils.StrToDateTime(businessLicenseEntity.getStartDate(),"yyyy-MM-dd"); Date date = DateUtils.StrToDateTime(businessLicenseEntity.getStartDate(),"yyyy-MM-dd");
if(date==null){ if(date==null){
...@@ -83,255 +88,113 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business ...@@ -83,255 +88,113 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business
applyLogPdu.setIssueTime(date); applyLogPdu.setIssueTime(date);
applyLogPdu.setPickerName(businessLicenseEntity.getProprietorName()); applyLogPdu.setPickerName(businessLicenseEntity.getProprietorName());
applyLogPdu.setPickerIDCardNo(businessLicenseEntity.getCredentialsCode()); applyLogPdu.setPickerIDCardNo(businessLicenseEntity.getCredentialsCode());
applyLogPdu.setHolderType(HolderType.PERSON.getValue());
applyLogPdu.setHolderIdType(HolderIdType.ID_CARD.getValue()); applyLogPdu.setHolderIdType(HolderIdType.ID_CARD.getValue());
applyLogPdu.setHolderName(businessLicenseEntity.getProprietorName()); applyLogPdu.setHolderName(businessLicenseEntity.getProprietorName());
applyLogPdu.setHolderIDCardNo(businessLicenseEntity.getCredentialsCode()); applyLogPdu.setHolderIDCardNo(businessLicenseEntity.getCredentialsCode());
applyLogPdu.setEnterpriseName(businessLicenseEntity.getTypeSizeName()); applyLogPdu.setEnterpriseName(businessLicenseEntity.getTypeSizeName());
applyLogPdu.setPrivateID("https://www.gsxt.gov.cn"); applyLogPdu.setPrivateID("https://www.gsxt.gov.cn");
String catalogType = ""; if(businessLicenseEntity.getSiteId()!=null) {
if(businessLicenseEntity.getComposingForm().indexOf("内资公司")>0){ applyLogPdu.setSiteId(businessLicenseEntity.getSiteId());
applyLogPdu.setCatalogId(nzgs); }else {
catalogType = "nzgs"; applyLogPdu.setSiteId(catalogEntity.getSiteId());
applyLogPdu.setCertificateCode(businessLicenseEntity.getCredentialsCode());
applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName());
applyLogPdu.setHolderType(HolderType.PERSON.getValue());
}else if(businessLicenseEntity.getComposingForm().indexOf("内资分公司")>0){
applyLogPdu.setCatalogId(nzgfs);
catalogType = "nzgfs";
applyLogPdu.setCertificateCode(businessLicenseEntity.getCredentialsCode());
applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName());
applyLogPdu.setHolderType(HolderType.PERSON.getValue());
}else if(businessLicenseEntity.getComposingForm().indexOf("个人经营")>0){
applyLogPdu.setCatalogId(personal);
catalogType = "personal";
applyLogPdu.setCertificateCode(businessLicenseEntity.getCredentialsCode());
applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName());
applyLogPdu.setHolderType(HolderType.PERSON.getValue());
}else if(businessLicenseEntity.getComposingForm().indexOf("有限责任公司")>0){
applyLogPdu.setCatalogId(liabilityCompany);
catalogType = "liabilityCompany";
applyLogPdu.setCertificateCode(businessLicenseEntity.getCredentialsCode());
applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName());
applyLogPdu.setHolderType(HolderType.LEGAL.getValue());
//TODO
}else if(businessLicenseEntity.getComposingForm().indexOf("股份公司")>0){
applyLogPdu.setCatalogId(stockCompany);
catalogType = "stockCompany";
applyLogPdu.setCertificateCode(businessLicenseEntity.getCredentialsCode());
applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName());
applyLogPdu.setHolderType(HolderType.LEGAL.getValue());
//TODO
} }
if(businessLicenseEntity.getDyZb()==1) { applyLogPdu.setCatalogId(catalogEntity.getId());
applyLogPdu.setTemplateId(templateEntity.getId());
applyLogPdu.setCertificateCode(businessLicenseEntity.getCredentialsCode());
//applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName());
switch (catalogType){ JSONObject formContent = new JSONObject();
case "nzgs": JSONObject formTemplate = JSONObject.parseObject(templateEntity.getFormContent());
applyLogPdu.setFormContent(nzgsJson(businessLicenseEntity, 1)); JSONArray formList = formTemplate.getJSONArray("list");
break; for (int j = 0; j < formList.size(); j++) {
case "nzfgs": JSONObject jsonObject = formList.getJSONObject(j);
applyLogPdu.setFormContent(nzfgsJson(businessLicenseEntity, 1)); String key = jsonObject.getString("id");
break; if(key.indexOf("统一社会信用代码")>0){
case "personal": formContent.put(key,businessLicenseEntity.getBusinessLicense());
applyLogPdu.setFormContent(personalJson(businessLicenseEntity, 1));
break;
case "liabilityCompany":
applyLogPdu.setFormContent(liabilityCompanyJson(businessLicenseEntity, 1));
break;
case "stockCompany":
applyLogPdu.setFormContent(stockCompanyJson(businessLicenseEntity, 1));
break;
default:
applyLogPdu.setFormContent(personalJson(businessLicenseEntity, 1));
} }
applyLogPdu.setCertificateName(applyLogPdu.getCertificateName()+"【营业执照正本】"); if(key.indexOf("名称")>0){
formContent.put(key,businessLicenseEntity.getTypeSizeName());
} }
applyLogService.apiSaveApplyLog(applyLogPdu); if(key.indexOf("类型")>0){
if(businessLicenseEntity.getDyFb()==1){ formContent.put(key,businessLicenseEntity.getComposingForm());
applyLogPdu.setFormContent(personalJson(businessLicenseEntity,2));
applyLogPdu.setCertificateName(applyLogPdu.getCertificateName()+"【营业执照副本】");
} }
applyLogService.apiSaveApplyLog(applyLogPdu); if(key.indexOf("经营者")>0){
formContent.put(key,businessLicenseEntity.getProprietorName());
} }
if(key.indexOf("法定代表人")>0){
private Map<String,String> dateFromt(String dateStr){ formContent.put(key,businessLicenseEntity.getProprietorName());
Map<String,String> dateMap = new HashMap<>();
Date date = DateUtils.StrToDateTime(dateStr,"yyyy-MM-dd");
if(date==null){
date = DateUtils.StrToDateTime(dateStr,"yyyy年MM月dd日");
}else {
date = new Date();
} }
if(date!=null){ if(key.indexOf("负责人")>0){
Calendar calendar = Calendar.getInstance(); formContent.put(key,businessLicenseEntity.getProprietorName());
calendar.setTime(date);
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH)+1;
int day = calendar.get(Calendar.DAY_OF_MONTH);
dateMap.put("year",String.valueOf(year));
dateMap.put("month",String.valueOf(month));
dateMap.put("day",String.valueOf(day));
} }
return dateMap; if(key.indexOf("经营范围")>0){
formContent.put(key,businessLicenseEntity.getManageRange());
} }
if(key.indexOf("注册资本")>0){
/** formContent.put(key,businessLicenseEntity.getRegisteredCapital());
* 营业执照个体
* @param businessLicenseEntity
* @param qrCodeType 1正本二维码 2副本二维码
* @return
*/
private String personalJson(BusinessLicenseEntity businessLicenseEntity,int qrCodeType){
JSONObject formContent = new JSONObject();
formContent.put("i_1_执照编码",businessLicenseEntity.getBusinessLicense());
formContent.put("i_2_单位名称",businessLicenseEntity.getTypeSizeName());
formContent.put("i_3_单位类型","个体工商户");
formContent.put("i_4_经营者名称",businessLicenseEntity.getProprietorName());
formContent.put("i_5_组成形式",businessLicenseEntity.getComposingForm());
String zcrq = businessLicenseEntity.getStartDate();
if(StringUtils.isNotEmpty(businessLicenseEntity.getEndDate())){
zcrq=zcrq+" 至 "+businessLicenseEntity.getEndDate();
}else {
zcrq=zcrq+" 至 长期";
} }
formContent.put("i_6_注册日期",zcrq); if(key.indexOf("组成形式")>0){
formContent.put("i_7_经营场所",businessLicenseEntity.getManageLocation()); formContent.put(key,businessLicenseEntity.getComposingForm());
formContent.put("i_8_登记机关","某某某市场监督管理局");
formContent.put("i_9_年",dateFromt(businessLicenseEntity.getStartDate()).get("year"));
formContent.put("i_10_月",dateFromt(businessLicenseEntity.getStartDate()).get("month"));
formContent.put("i_11_日",dateFromt(businessLicenseEntity.getStartDate()).get("day"));
formContent.put("t_1_经营范围",businessLicenseEntity.getManageRange());
if(qrCodeType==1) {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeOriginalBase64());
}else {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeDuplicateBase64());
} }
return formContent.toJSONString(); if(key.indexOf("注册日期")>0){
formContent.put(key,businessLicenseEntity.getStartDate());
} }
if(key.indexOf("成立日期")>0){
/*** formContent.put(key,businessLicenseEntity.getStartDate());
* 内资公司
* @param businessLicenseEntity
* @param qrCodeType
* @return
*/
private String nzgsJson(BusinessLicenseEntity businessLicenseEntity,int qrCodeType){
JSONObject formContent = new JSONObject();
formContent.put("i_1_信用代码",businessLicenseEntity.getBusinessLicense());
formContent.put("i_2_单位名称",businessLicenseEntity.getTypeSizeName());
formContent.put("i_3_单位类型",businessLicenseEntity.getComposingForm());
formContent.put("i_4_法定代表人",businessLicenseEntity.getProprietorName());
formContent.put("i_10_注册资本",businessLicenseEntity.getRegisteredCapital());
String zcrq = businessLicenseEntity.getStartDate();
formContent.put("i_5_成立日期",zcrq);
formContent.put("i_6_住所",businessLicenseEntity.getManageLocation());
//formContent.put("i_8_登记机关","某某某市场监督管理局");
formContent.put("i_7_年",dateFromt(businessLicenseEntity.getStartDate()).get("year"));
formContent.put("i_8_月",dateFromt(businessLicenseEntity.getStartDate()).get("month"));
formContent.put("i_9_日",dateFromt(businessLicenseEntity.getStartDate()).get("day"));
formContent.put("t_1_经营范围",businessLicenseEntity.getManageRange());
if(qrCodeType==1) {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeOriginalBase64());
}else {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeDuplicateBase64());
} }
return formContent.toJSONString(); if(key.indexOf("经营场所")>0){
formContent.put(key,businessLicenseEntity.getManageLocation());
}
if(key.indexOf("住所")>0){
formContent.put(key,businessLicenseEntity.getManageLocation());
} }
/***
* 内资分公司
* @param businessLicenseEntity
* @param qrCodeType
* @return
*/
private String nzfgsJson(BusinessLicenseEntity businessLicenseEntity,int qrCodeType){
JSONObject formContent = new JSONObject();
formContent.put("i_1_信用代码",businessLicenseEntity.getBusinessLicense());
formContent.put("i_2_单位名称",businessLicenseEntity.getTypeSizeName());
formContent.put("i_3_单位类型",businessLicenseEntity.getComposingForm());
formContent.put("i_4_负责人",businessLicenseEntity.getProprietorName());
String zcrq = businessLicenseEntity.getStartDate(); String zcrq = businessLicenseEntity.getStartDate();
formContent.put("i_5_成立日期",zcrq); if(key.indexOf("年")>0){
formContent.put("i_6_经营场所",businessLicenseEntity.getManageLocation()); formContent.put(key,dateFromt(zcrq).get("year"));
//formContent.put("i_8_登记机关","某某某市场监督管理局"); }
formContent.put("i_7_年",dateFromt(businessLicenseEntity.getStartDate()).get("year")); if(key.indexOf("月")>0){
formContent.put("i_8_月",dateFromt(businessLicenseEntity.getStartDate()).get("month")); formContent.put(key,dateFromt(zcrq).get("month"));
formContent.put("i_9_日",dateFromt(businessLicenseEntity.getStartDate()).get("day"));
formContent.put("t_1_经营范围",businessLicenseEntity.getManageRange());
if(qrCodeType==1) {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeOriginalBase64());
}else {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeDuplicateBase64());
} }
return formContent.toJSONString(); if(key.indexOf("日")>0){
formContent.put(key,dateFromt(zcrq).get("day"));
} }
/**
* 营业执照(有限责任公司)
* @param businessLicenseEntity
* @param qrCodeType 1正本二维码 2副本二维码
* @return
*/
private String liabilityCompanyJson(BusinessLicenseEntity businessLicenseEntity,int qrCodeType){
JSONObject formContent = new JSONObject();
formContent.put("i_1_执照编码",businessLicenseEntity.getBusinessLicense());
formContent.put("i_2_单位名称",businessLicenseEntity.getTypeSizeName());
formContent.put("i_3_单位类型","有限责任公司");
formContent.put("i_4_法定代表人",businessLicenseEntity.getProprietorName());
formContent.put("i_5_组成形式",businessLicenseEntity.getComposingForm());
String zcrq = businessLicenseEntity.getStartDate();
if(StringUtils.isNotEmpty(businessLicenseEntity.getEndDate())){
zcrq=zcrq+" 至 "+businessLicenseEntity.getEndDate();
}else {
zcrq=zcrq+" 至 长期";
} }
formContent.put("i_6_注册日期",zcrq); if(templateEntity.getTemplateType()==2) {
formContent.put("i_7_经营场所",businessLicenseEntity.getManageLocation()); //正本
formContent.put("i_8_登记机关","某某某市场监督管理局");
formContent.put("i_9_年",dateFromt(businessLicenseEntity.getStartDate()).get("year"));
formContent.put("i_10_月",dateFromt(businessLicenseEntity.getStartDate()).get("month"));
formContent.put("i_11_日",dateFromt(businessLicenseEntity.getStartDate()).get("day"));
formContent.put("t_1_经营范围",businessLicenseEntity.getManageRange());
if(qrCodeType==1) {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeOriginalBase64()); formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeOriginalBase64());
}else { }else {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeDuplicateBase64()); formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeDuplicateBase64());
} }
return formContent.toJSONString(); if(log.isDebugEnabled()){
log.debug("证照转化表单json:"+formContent.toJSONString());
}
applyLogPdu.setFormContent(formContent.toJSONString());
applyLogPdu.setCertificateName(templateEntity.getTemplateName());
applyLogService.apiSaveApplyLog(applyLogPdu);
}
} }
/** private Map<String,String> dateFromt(String dateStr){
* 营业执照(股份有限公司) Map<String,String> dateMap = new HashMap<>();
* @param businessLicenseEntity Date date = DateUtils.StrToDateTime(dateStr,"yyyy-MM-dd");
* @param qrCodeType 1正本二维码 2副本二维码 if(date==null){
* @return date = DateUtils.StrToDateTime(dateStr,"yyyy年MM月dd日");
*/
private String stockCompanyJson(BusinessLicenseEntity businessLicenseEntity,int qrCodeType){
JSONObject formContent = new JSONObject();
formContent.put("i_1_执照编码",businessLicenseEntity.getBusinessLicense());
formContent.put("i_2_单位名称",businessLicenseEntity.getTypeSizeName());
formContent.put("i_3_单位类型","个体工商户");
formContent.put("i_4_经营者名称",businessLicenseEntity.getProprietorName());
formContent.put("i_5_组成形式",businessLicenseEntity.getComposingForm());
String zcrq = businessLicenseEntity.getStartDate();
if(StringUtils.isNotEmpty(businessLicenseEntity.getEndDate())){
zcrq=zcrq+" 至 "+businessLicenseEntity.getEndDate();
}else { }else {
zcrq=zcrq+" 至 长期"; date = new Date();
} }
formContent.put("i_6_注册日期",zcrq); if(date!=null){
formContent.put("i_7_经营场所",businessLicenseEntity.getManageLocation()); Calendar calendar = Calendar.getInstance();
formContent.put("i_8_登记机关","某某某市场监督管理局"); calendar.setTime(date);
formContent.put("i_9_年",dateFromt(businessLicenseEntity.getStartDate()).get("year")); int year = calendar.get(Calendar.YEAR);
formContent.put("i_10_月",dateFromt(businessLicenseEntity.getStartDate()).get("month")); int month = calendar.get(Calendar.MONTH)+1;
formContent.put("i_11_日",dateFromt(businessLicenseEntity.getStartDate()).get("day")); int day = calendar.get(Calendar.DAY_OF_MONTH);
formContent.put("t_1_经营范围",businessLicenseEntity.getManageRange()); dateMap.put("year",String.valueOf(year));
if(qrCodeType==1) { dateMap.put("month",String.valueOf(month));
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeOriginalBase64()); dateMap.put("day",String.valueOf(day));
}else {
formContent.put("@image_1_二维码", businessLicenseEntity.getQrCodeDuplicateBase64());
} }
return formContent.toJSONString(); return dateMap;
} }
} }
\ No newline at end of file
...@@ -61,7 +61,7 @@ public class BusinessLicenseController extends BaseCRUDJsonBodyMappingController ...@@ -61,7 +61,7 @@ public class BusinessLicenseController extends BaseCRUDJsonBodyMappingController
String busiDesc = "API接口存入营业执照信息"; String busiDesc = "API接口存入营业执照信息";
int code = 200; int code = 200;
try { try {
service.apiSave(businessLicense); service.doConversion(businessLicense);
model.put("message_info", "成功"); model.put("message_info", "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】"); this.recordSysLog(this.request, busiDesc + " 【成功】");
}catch (Exception e){ }catch (Exception e){
......
...@@ -28,9 +28,7 @@ import com.mortals.xhx.module.certificate.service.CertificateCatalogService; ...@@ -28,9 +28,7 @@ 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.certificate.service.CertificateClassifyService; import com.mortals.xhx.module.certificate.service.CertificateClassifyService;
import com.mortals.xhx.module.record.dao.RecordDao; import com.mortals.xhx.module.record.dao.RecordDao;
import com.mortals.xhx.module.record.model.ApplyLogQuery; import com.mortals.xhx.module.record.model.*;
import com.mortals.xhx.module.record.model.DocTemplateVO;
import com.mortals.xhx.module.record.model.RecordEntity;
import com.mortals.xhx.module.record.service.PrintWaitQueueService; import com.mortals.xhx.module.record.service.PrintWaitQueueService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.http.entity.ContentType; import org.apache.http.entity.ContentType;
...@@ -43,7 +41,6 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; ...@@ -43,7 +41,6 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.xhx.module.record.dao.ApplyLogDao; import com.mortals.xhx.module.record.dao.ApplyLogDao;
import com.mortals.xhx.module.record.model.ApplyLogEntity;
import com.mortals.xhx.module.record.service.ApplyLogService; import com.mortals.xhx.module.record.service.ApplyLogService;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -103,7 +100,7 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap ...@@ -103,7 +100,7 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
orConditionList.add(condition2); orConditionList.add(condition2);
query.setOrConditionList(orConditionList); query.setOrConditionList(orConditionList);
} }
query.setRecordStatus(YesNoEnum.NO.getValue()); query.setRecordStatus(YesNoEnum.NO.getValue()); //已归档的不显示
return query; return query;
} }
...@@ -268,6 +265,9 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap ...@@ -268,6 +265,9 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
updata.setRecordStatus(YesNoEnum.YES.getValue()); updata.setRecordStatus(YesNoEnum.YES.getValue());
updata.setUpdateTime(new Date()); updata.setUpdateTime(new Date());
dao.update(updata); dao.update(updata);
PrintWaitQueueEntity condition = new PrintWaitQueueEntity();
condition.setApplyId(oldId);
printWaitQueueService.remove(condition,context);
} }
printWaitQueueService.creatWaitQueueByApply(applyLogEntity, GenerateStatus.ORIGINAL.getValue(),context); printWaitQueueService.creatWaitQueueByApply(applyLogEntity, GenerateStatus.ORIGINAL.getValue(),context);
} }
...@@ -537,6 +537,7 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap ...@@ -537,6 +537,7 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
throw new AppException("目录模板ID不正确"); throw new AppException("目录模板ID不正确");
} }
ApplyLogEntity entity = new ApplyLogEntity(); ApplyLogEntity entity = new ApplyLogEntity();
entity.setSiteId(pdu.getSiteId());
entity.setCatalogId(catalog.getId()); entity.setCatalogId(catalog.getId());
entity.setCatalogCode(catalog.getCatalogCode()); entity.setCatalogCode(catalog.getCatalogCode());
entity.setCatalogName(catalog.getCatalogName()); entity.setCatalogName(catalog.getCatalogName());
......
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