Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
certificate-print
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
certificate-print
Commits
5cd6f2e6
Commit
5cd6f2e6
authored
May 26, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
证照申请修改后删除历史数据;营业执照数据对接接口修改;营业执照多模板处理逻辑修改
parent
713f01fe
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
257 deletions
+131
-257
certificate-manager/src/main/java/com/mortals/xhx/module/api/CertificateApi.java
.../main/java/com/mortals/xhx/module/api/CertificateApi.java
+2
-0
certificate-manager/src/main/java/com/mortals/xhx/module/api/PrintWaitQueueVO.java
...ain/java/com/mortals/xhx/module/api/PrintWaitQueueVO.java
+8
-0
certificate-manager/src/main/java/com/mortals/xhx/module/business/service/impl/BusinessLicenseServiceImpl.java
...ule/business/service/impl/BusinessLicenseServiceImpl.java
+114
-251
certificate-manager/src/main/java/com/mortals/xhx/module/business/web/BusinessLicenseController.java
...ls/xhx/module/business/web/BusinessLicenseController.java
+1
-1
certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/ApplyLogServiceImpl.java
...s/xhx/module/record/service/impl/ApplyLogServiceImpl.java
+6
-5
No files found.
certificate-manager/src/main/java/com/mortals/xhx/module/api/CertificateApi.java
View file @
5cd6f2e6
...
@@ -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
());
...
...
certificate-manager/src/main/java/com/mortals/xhx/module/api/PrintWaitQueueVO.java
View file @
5cd6f2e6
...
@@ -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
;
/**
/**
* 证照名称
* 证照名称
*/
*/
...
...
certificate-manager/src/main/java/com/mortals/xhx/module/business/service/impl/BusinessLicenseServiceImpl.java
View file @
5cd6f2e6
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,114 +50,130 @@ import java.util.concurrent.Executors;
...
@@ -43,114 +50,130 @@ 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
)
{
ApplyLogPdu
applyLogPdu
=
new
ApplyLogPdu
();
CertificateCatalogEntity
catalogEntity
=
certificateCatalogService
.
selectOne
(
new
CertificateCatalogQuery
().
catalogName
(
"营业执照"
));
Date
date
=
DateUtils
.
StrToDateTime
(
businessLicenseEntity
.
getStartDate
(),
"yyyy-MM-dd"
);
if
(
catalogEntity
==
null
){
if
(
date
==
null
){
throw
new
AppException
(
"当前系统没有设置营业执照目录"
);
date
=
DateUtils
.
StrToDateTime
(
businessLicenseEntity
.
getStartDate
(),
"yyyy年MM月dd日"
);
}
else
{
date
=
new
Date
();
}
}
applyLogPdu
.
setIssueTime
(
date
);
CertificateCatalogTemplateQuery
templateQuery
=
new
CertificateCatalogTemplateQuery
();
applyLogPdu
.
setPickerName
(
businessLicenseEntity
.
getProprietorName
());
templateQuery
.
setCatalogId
(
catalogEntity
.
getId
());
applyLogPdu
.
setPickerIDCardNo
(
businessLicenseEntity
.
getCredentialsCode
());
templateQuery
.
setTemplateName
(
"%"
+
businessLicenseEntity
.
getComposingForm
()+
"%"
);
applyLogPdu
.
setHolderIdType
(
HolderIdType
.
ID_CARD
.
getValue
());
List
<
CertificateCatalogTemplateEntity
>
templateEntityList
=
certificateCatalogTemplateService
.
find
(
templateQuery
);
applyLogPdu
.
setHolderName
(
businessLicenseEntity
.
getProprietorName
());
if
(
CollectionUtils
.
isEmpty
(
templateEntityList
)){
applyLogPdu
.
setHolderIDCardNo
(
businessLicenseEntity
.
getCredentialsCode
());
throw
new
AppException
(
"当前系统没有["
+
businessLicenseEntity
.
getComposingForm
()+
"]营业执照模板"
);
applyLogPdu
.
setEnterpriseName
(
businessLicenseEntity
.
getTypeSizeName
());
}
applyLogPdu
.
setPrivateID
(
"https://www.gsxt.gov.cn"
);
for
(
CertificateCatalogTemplateEntity
templateEntity:
templateEntityList
){
String
catalogType
=
""
;
ApplyLogPdu
applyLogPdu
=
new
ApplyLogPdu
();
if
(
businessLicenseEntity
.
getComposingForm
().
indexOf
(
"内资公司"
)>
0
){
Date
date
=
DateUtils
.
StrToDateTime
(
businessLicenseEntity
.
getStartDate
(),
"yyyy-MM-dd"
);
applyLogPdu
.
setCatalogId
(
nzgs
);
if
(
date
==
null
){
catalogType
=
"nzgs"
;
date
=
DateUtils
.
StrToDateTime
(
businessLicenseEntity
.
getStartDate
(),
"yyyy年MM月dd日"
);
applyLogPdu
.
setCertificateCode
(
businessLicenseEntity
.
getCredentialsCode
());
}
else
{
applyLogPdu
.
setCertificateName
(
businessLicenseEntity
.
getTypeSizeName
());
date
=
new
Date
();
applyLogPdu
.
setHolderType
(
HolderType
.
PERSON
.
getValue
());
}
}
else
if
(
businessLicenseEntity
.
getComposingForm
().
indexOf
(
"内资分公司"
)>
0
){
applyLogPdu
.
setIssueTime
(
date
);
applyLogPdu
.
setCatalogId
(
nzgfs
);
applyLogPdu
.
setPickerName
(
businessLicenseEntity
.
getProprietorName
());
catalogType
=
"nzgfs"
;
applyLogPdu
.
setPickerIDCardNo
(
businessLicenseEntity
.
getCredentialsCode
());
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
());
applyLogPdu
.
setHolderType
(
HolderType
.
PERSON
.
getValue
());
}
else
if
(
businessLicenseEntity
.
getComposingForm
().
indexOf
(
"有限责任公司"
)>
0
){
applyLogPdu
.
setHolderIdType
(
HolderIdType
.
ID_CARD
.
getValue
());
applyLogPdu
.
setCatalogId
(
liabilityCompany
);
applyLogPdu
.
setHolderName
(
businessLicenseEntity
.
getProprietorName
());
catalogType
=
"liabilityCompany"
;
applyLogPdu
.
setHolderIDCardNo
(
businessLicenseEntity
.
getCredentialsCode
());
applyLogPdu
.
setCertificateCode
(
businessLicenseEntity
.
getCredentialsCode
());
applyLogPdu
.
setEnterpriseName
(
businessLicenseEntity
.
getTypeSizeName
());
applyLogPdu
.
setCertificateName
(
businessLicenseEntity
.
getTypeSizeName
());
applyLogPdu
.
setPrivateID
(
"https://www.gsxt.gov.cn"
);
applyLogPdu
.
setHolderType
(
HolderType
.
LEGAL
.
getValue
());
if
(
businessLicenseEntity
.
getSiteId
()!=
null
)
{
//TODO
applyLogPdu
.
setSiteId
(
businessLicenseEntity
.
getSiteId
());
}
else
if
(
businessLicenseEntity
.
getComposingForm
().
indexOf
(
"股份公司"
)>
0
){
}
else
{
applyLogPdu
.
setCatalogId
(
stockCompany
);
applyLogPdu
.
setSiteId
(
catalogEntity
.
getSiteId
());
catalogType
=
"stockCompany"
;
}
applyLogPdu
.
setCatalogId
(
catalogEntity
.
getId
());
applyLogPdu
.
setTemplateId
(
templateEntity
.
getId
());
applyLogPdu
.
setCertificateCode
(
businessLicenseEntity
.
getCredentialsCode
());
applyLogPdu
.
setCertificateCode
(
businessLicenseEntity
.
getCredentialsCode
());
applyLogPdu
.
setCertificateName
(
businessLicenseEntity
.
getTypeSizeName
());
//applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName());
applyLogPdu
.
setHolderType
(
HolderType
.
LEGAL
.
getValue
());
//TODO
JSONObject
formContent
=
new
JSONObject
();
}
JSONObject
formTemplate
=
JSONObject
.
parseObject
(
templateEntity
.
getFormContent
());
if
(
businessLicenseEntity
.
getDyZb
()==
1
)
{
JSONArray
formList
=
formTemplate
.
getJSONArray
(
"list"
);
for
(
int
j
=
0
;
j
<
formList
.
size
();
j
++)
{
JSONObject
jsonObject
=
formList
.
getJSONObject
(
j
);
String
key
=
jsonObject
.
getString
(
"id"
);
if
(
key
.
indexOf
(
"统一社会信用代码"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getBusinessLicense
());
}
if
(
key
.
indexOf
(
"名称"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getTypeSizeName
());
}
if
(
key
.
indexOf
(
"类型"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getComposingForm
());
}
if
(
key
.
indexOf
(
"经营者"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getProprietorName
());
}
if
(
key
.
indexOf
(
"法定代表人"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getProprietorName
());
}
if
(
key
.
indexOf
(
"负责人"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getProprietorName
());
}
if
(
key
.
indexOf
(
"经营范围"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getManageRange
());
}
if
(
key
.
indexOf
(
"注册资本"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getRegisteredCapital
());
}
if
(
key
.
indexOf
(
"组成形式"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getComposingForm
());
}
if
(
key
.
indexOf
(
"注册日期"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getStartDate
());
}
if
(
key
.
indexOf
(
"成立日期"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getStartDate
());
}
if
(
key
.
indexOf
(
"经营场所"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getManageLocation
());
}
if
(
key
.
indexOf
(
"住所"
)>
0
){
formContent
.
put
(
key
,
businessLicenseEntity
.
getManageLocation
());
}
String
zcrq
=
businessLicenseEntity
.
getStartDate
();
if
(
key
.
indexOf
(
"年"
)>
0
){
formContent
.
put
(
key
,
dateFromt
(
zcrq
).
get
(
"year"
));
}
if
(
key
.
indexOf
(
"月"
)>
0
){
formContent
.
put
(
key
,
dateFromt
(
zcrq
).
get
(
"month"
));
}
if
(
key
.
indexOf
(
"日"
)>
0
){
formContent
.
put
(
key
,
dateFromt
(
zcrq
).
get
(
"day"
));
}
switch
(
catalogType
){
case
"nzgs"
:
applyLogPdu
.
setFormContent
(
nzgsJson
(
businessLicenseEntity
,
1
));
break
;
case
"nzfgs"
:
applyLogPdu
.
setFormContent
(
nzfgsJson
(
businessLicenseEntity
,
1
));
break
;
case
"personal"
:
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
(
templateEntity
.
getTemplateType
()==
2
)
{
}
//正本
applyLogService
.
apiSaveApplyLog
(
applyLogPdu
);
formContent
.
put
(
"@image_1_二维码"
,
businessLicenseEntity
.
getQrCodeOriginalBase64
());
if
(
businessLicenseEntity
.
getDyFb
()==
1
){
}
else
{
applyLogPdu
.
setFormContent
(
personalJson
(
businessLicenseEntity
,
2
));
formContent
.
put
(
"@image_1_二维码"
,
businessLicenseEntity
.
getQrCodeDuplicateBase64
());
applyLogPdu
.
setCertificateName
(
applyLogPdu
.
getCertificateName
()+
"【营业执照副本】"
);
}
if
(
log
.
isDebugEnabled
()){
log
.
debug
(
"证照转化表单json:"
+
formContent
.
toJSONString
());
}
applyLogPdu
.
setFormContent
(
formContent
.
toJSONString
());
applyLogPdu
.
setCertificateName
(
templateEntity
.
getTemplateName
());
applyLogService
.
apiSaveApplyLog
(
applyLogPdu
);
}
}
applyLogService
.
apiSaveApplyLog
(
applyLogPdu
);
}
}
private
Map
<
String
,
String
>
dateFromt
(
String
dateStr
){
private
Map
<
String
,
String
>
dateFromt
(
String
dateStr
){
...
@@ -174,164 +197,4 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business
...
@@ -174,164 +197,4 @@ public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<Business
return
dateMap
;
return
dateMap
;
}
}
/**
* 营业执照个体
* @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
);
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
());
}
else
{
formContent
.
put
(
"@image_1_二维码"
,
businessLicenseEntity
.
getQrCodeDuplicateBase64
());
}
return
formContent
.
toJSONString
();
}
/***
* 内资公司
* @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
();
}
/***
* 内资分公司
* @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
();
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
();
}
/**
* 营业执照(有限责任公司)
* @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
);
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
());
}
else
{
formContent
.
put
(
"@image_1_二维码"
,
businessLicenseEntity
.
getQrCodeDuplicateBase64
());
}
return
formContent
.
toJSONString
();
}
/**
* 营业执照(股份有限公司)
* @param businessLicenseEntity
* @param qrCodeType 1正本二维码 2副本二维码
* @return
*/
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
{
zcrq
=
zcrq
+
" 至 长期"
;
}
formContent
.
put
(
"i_6_注册日期"
,
zcrq
);
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
());
}
else
{
formContent
.
put
(
"@image_1_二维码"
,
businessLicenseEntity
.
getQrCodeDuplicateBase64
());
}
return
formContent
.
toJSONString
();
}
}
}
\ No newline at end of file
certificate-manager/src/main/java/com/mortals/xhx/module/business/web/BusinessLicenseController.java
View file @
5cd6f2e6
...
@@ -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
){
...
...
certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/ApplyLogServiceImpl.java
View file @
5cd6f2e6
...
@@ -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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment