Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
one-certificate-system
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
赵啸非
one-certificate-system
Commits
6abd8ed6
Commit
6abd8ed6
authored
Aug 07, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/first' into first
parents
a8e3a10d
00ea90b8
Changes
20
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
6650 additions
and
4807 deletions
+6650
-4807
one-certificate-manager/doc/一业一证表结构.docx
one-certificate-manager/doc/一业一证表结构.docx
+0
-0
one-certificate-manager/src/main/java/com/mortals/xhx/base/system/upload/web/UploadController.java
.../mortals/xhx/base/system/upload/web/UploadController.java
+2
-1
one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/vo/CertificateIndustryVo.java
...hx/module/certificate/model/vo/CertificateIndustryVo.java
+4
-1
one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/service/impl/CertificateIndustryServiceImpl.java
...tificate/service/impl/CertificateIndustryServiceImpl.java
+8
-0
one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/web/CertificateIndustryController.java
...module/certificate/web/CertificateIndustryController.java
+62
-0
one-certificate-manager/src/main/java/com/mortals/xhx/module/child/web/ChildLicenseController.java
.../mortals/xhx/module/child/web/ChildLicenseController.java
+7
-1
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/dao/ibatis/ApplyLogDaoImpl.java
...mortals/xhx/module/record/dao/ibatis/ApplyLogDaoImpl.java
+19
-1
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/ApplyLogEntity.java
...a/com/mortals/xhx/module/record/model/ApplyLogEntity.java
+116
-106
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/ApplyLogQuery.java
...va/com/mortals/xhx/module/record/model/ApplyLogQuery.java
+1367
-1255
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/RetainLogEntity.java
.../com/mortals/xhx/module/record/model/RetainLogEntity.java
+121
-70
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/RetainLogQuery.java
...a/com/mortals/xhx/module/record/model/RetainLogQuery.java
+1740
-854
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/vo/RetainLogVo.java
...a/com/mortals/xhx/module/record/model/vo/RetainLogVo.java
+2
-0
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/ApplyLogServiceImpl.java
...s/xhx/module/record/service/impl/ApplyLogServiceImpl.java
+22
-6
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/PrintWaitQueueServiceImpl.java
...module/record/service/impl/PrintWaitQueueServiceImpl.java
+36
-12
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/RetainLogServiceImpl.java
.../xhx/module/record/service/impl/RetainLogServiceImpl.java
+48
-0
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/web/ApplyLogController.java
...com/mortals/xhx/module/record/web/ApplyLogController.java
+7
-0
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/web/PrintLogController.java
...com/mortals/xhx/module/record/web/PrintLogController.java
+8
-0
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/web/RetainLogController.java
...om/mortals/xhx/module/record/web/RetainLogController.java
+7
-0
one-certificate-manager/src/main/resources/sqlmap/module/record/ApplyLogMapper.xml
...rc/main/resources/sqlmap/module/record/ApplyLogMapper.xml
+1575
-1495
one-certificate-manager/src/main/resources/sqlmap/module/record/RetainLogMapper.xml
...c/main/resources/sqlmap/module/record/RetainLogMapper.xml
+1499
-1005
No files found.
one-certificate-manager/doc/一业一证表结构.docx
View file @
6abd8ed6
No preview for this file type
one-certificate-manager/src/main/java/com/mortals/xhx/base/system/upload/web/UploadController.java
View file @
6abd8ed6
package
com.mortals.xhx.base.system.upload.web
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -60,6 +61,7 @@ public class UploadController extends BaseController {
String
jsonStr
=
""
;
try
{
String
filePath
=
uploadService
.
saveFileUpload
(
file
,
prePath
,
getCurUser
());
filePath
=
StrUtil
.
prependIfMissing
(
filePath
,
"/"
);
model
.
put
(
"url"
,
filePath
);
model
.
put
(
"fileName"
,
file
.
getOriginalFilename
());
model
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
...
...
@@ -122,5 +124,4 @@ public class UploadController extends BaseController {
}
}
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/vo/CertificateIndustryVo.java
View file @
6abd8ed6
package
com.mortals.xhx.module.certificate.model.vo
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.certificate.model.CertificateIndustryEntity
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -9,6 +11,7 @@ import java.util.List;
* @author zxfei
* @date 2022-10-14
*/
@Data
public
class
CertificateIndustryVo
extends
BaseEntityLong
{
List
<
CertificateIndustryEntity
>
children
;
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/service/impl/CertificateIndustryServiceImpl.java
View file @
6abd8ed6
...
...
@@ -36,4 +36,12 @@ public class CertificateIndustryServiceImpl extends AbstractCRUDServiceImpl<Cert
throw
new
AppException
(
"行业名称重复"
);
}
}
@Override
protected
void
saveBefore
(
CertificateIndustryEntity
entity
,
Context
context
)
throws
AppException
{
super
.
saveBefore
(
entity
,
context
);
if
(
entity
.
getParentId
()==
null
){
entity
.
setParentId
(-
1
l
);
}
}
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/web/CertificateIndustryController.java
View file @
6abd8ed6
package
com.mortals.xhx.module.certificate.web
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.annotation.DataPermission
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.module.certificate.model.CertificateIndustryEntity
;
import
com.mortals.xhx.module.certificate.service.CertificateIndustryService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
/**
*
* 行业目录
...
...
@@ -40,4 +52,54 @@ public class CertificateIndustryController extends BaseCRUDJsonBodyMappingContro
public
Rest
<
Object
>
list
(
CertificateIndustryEntity
query
)
{
return
super
.
list
(
query
);
}
@PostMapping
({
"treeList"
})
@UnAuth
public
Rest
<
Object
>
treeList
(
@RequestBody
CertificateIndustryEntity
query
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"查询"
+
this
.
getModuleDesc
();
int
code
;
try
{
List
<
CertificateIndustryEntity
>
result
=
this
.
getService
().
find
(
query
,
context
);
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
List
<
CertificateIndustryEntity
>
collect
=
result
.
stream
().
filter
(
t
->
t
.
getParentId
()
==
-
1
).
map
(
m
->
{
m
.
setChildren
(
getChildren
(
m
,
result
));
return
m
;
}
).
collect
(
Collectors
.
toList
());
model
.
put
(
"data"
,
collect
);
}
else
{
model
.
put
(
"data"
,
result
);
}
code
=
this
.
doListAfter
(
query
,
(
Map
)
model
,
context
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
this
.
init
(
model
,
context
);
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setDict
(
model
.
get
(
"dict"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
private
static
List
<
CertificateIndustryEntity
>
getChildren
(
CertificateIndustryEntity
root
,
List
<
CertificateIndustryEntity
>
all
)
{
List
<
CertificateIndustryEntity
>
children
=
all
.
stream
().
filter
(
t
->
{
return
Objects
.
equals
(
t
.
getParentId
(),
root
.
getId
());
}).
map
(
m
->
{
m
.
setChildren
(
getChildren
(
m
,
all
));
return
m
;
}
).
collect
(
Collectors
.
toList
());
return
children
;
}
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/module/child/web/ChildLicenseController.java
View file @
6abd8ed6
...
...
@@ -5,6 +5,8 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.annotation.DataPermission
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.module.certificate.model.CertificateDocumentQuery
;
import
com.mortals.xhx.module.certificate.service.CertificateDocumentService
;
import
com.mortals.xhx.module.device.model.DeviceEntity
;
...
...
@@ -33,6 +35,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
import
static
java
.
util
.
stream
.
Collectors
.
toMap
;
import
com.mortals.xhx.common.code.*
;
...
...
@@ -49,6 +52,8 @@ public class ChildLicenseController extends BaseCRUDJsonBodyMappingController<Ch
@Autowired
private
CertificateDocumentService
certificateDocumentService
;
@Autowired
private
UserService
userService
;
public
ChildLicenseController
()
{
super
.
setModuleDesc
(
"行业许可子证"
);
...
...
@@ -62,6 +67,7 @@ public class ChildLicenseController extends BaseCRUDJsonBodyMappingController<Ch
this
.
addDict
(
model
,
"deleted"
,
DeletedEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"documentId"
,
certificateDocumentService
.
find
(
new
CertificateDocumentQuery
())
.
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getDocumentName
(),
(
o
,
n
)
->
n
)));
this
.
addDict
(
model
,
"createUserId"
,
userService
.
find
(
new
UserQuery
()).
stream
().
collect
(
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getRealName
(),
(
o
,
n
)
->
n
)));
super
.
init
(
model
,
context
);
}
...
...
@@ -80,7 +86,7 @@ public class ChildLicenseController extends BaseCRUDJsonBodyMappingController<Ch
query
.
setDeptId
(
deptId
);
}
}
query
.
setChildStatus
(
ChildStatusEnum
.
启用
.
getValue
());
super
.
doListBefore
(
query
,
model
,
context
);
}
...
...
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/dao/ibatis/ApplyLogDaoImpl.java
View file @
6abd8ed6
package
com.mortals.xhx.module.record.dao.ibatis
;
import
com.mortals.framework.util.EntityUtil
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.record.dao.ApplyLogDao
;
import
com.mortals.xhx.module.record.model.ApplyLogEntity
;
import
java.util.Date
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 证照申请DaoImpl DAO接口
*
...
...
@@ -16,6 +21,19 @@ import java.util.List;
@Repository
(
"applyLogDao"
)
public
class
ApplyLogDaoImpl
extends
BaseCRUDDaoMybatis
<
ApplyLogEntity
,
Long
>
implements
ApplyLogDao
{
@Override
public
int
update
(
ApplyLogEntity
entity
)
{
Map
<
String
,
Object
>
data
=
new
HashMap
();
EntityUtil
.
entityToMap
(
entity
,
data
);
Map
condition
=
new
HashMap
();
condition
.
put
(
this
.
getPrimaryKeyLabel
(),
entity
.
getId
());
if
(
entity
.
getValidityStart
()==
null
){
data
.
put
(
"validityStart"
,
null
);
}
if
(
entity
.
getValidityEnd
()==
null
){
data
.
put
(
"validityEnd"
,
null
);
}
return
this
.
update
((
Map
)
data
,
(
Map
)
condition
);
}
}
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/ApplyLogEntity.java
View file @
6abd8ed6
...
...
@@ -11,11 +11,11 @@ import com.mortals.framework.model.BaseEntityLong;
import
com.mortals.xhx.module.record.model.vo.ApplyLogVo
;
import
lombok.Data
;
/**
* 证照申请实体对象
*
* @author zxfei
* @date 2024-07-28
*/
* 证照申请实体对象
*
* @author zxfei
* @date 2024-07-31
*/
@Data
public
class
ApplyLogEntity
extends
ApplyLogVo
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -152,6 +152,14 @@ public class ApplyLogEntity extends ApplyLogVo {
* 制证机关
*/
private
String
authority
;
/**
* 附件名称
*/
private
String
annexName
;
/**
* 附件地址
*/
private
String
annexUrl
;
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
...
...
@@ -202,5 +210,7 @@ public class ApplyLogEntity extends ApplyLogVo {
this
.
businessPlace
=
""
;
this
.
licenseProject
=
""
;
this
.
authority
=
""
;
this
.
annexName
=
""
;
this
.
annexUrl
=
""
;
}
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/ApplyLogQuery.java
View file @
6abd8ed6
...
...
@@ -4,11 +4,11 @@ import java.util.Date;
import
java.util.List
;
import
com.mortals.xhx.module.record.model.ApplyLogEntity
;
/**
* 证照申请查询对象
*
* @author zxfei
* @date 2024-07-28
*/
* 证照申请查询对象
*
* @author zxfei
* @date 2024-07-31
*/
public
class
ApplyLogQuery
extends
ApplyLogEntity
{
/** 开始 序号,主键,自增长 */
private
Long
idStart
;
...
...
@@ -315,6 +315,16 @@ public class ApplyLogQuery extends ApplyLogEntity {
/** 制证机关排除列表 */
private
List
<
String
>
authorityNotList
;
/** 附件名称 */
private
List
<
String
>
annexNameList
;
/** 附件名称排除列表 */
private
List
<
String
>
annexNameNotList
;
/** 附件地址 */
private
List
<
String
>
annexUrlList
;
/** 附件地址排除列表 */
private
List
<
String
>
annexUrlNotList
;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private
List
<
ApplyLogQuery
>
orConditionList
;
...
...
@@ -2078,6 +2088,70 @@ public class ApplyLogQuery extends ApplyLogEntity {
this
.
authorityNotList
=
authorityNotList
;
}
/**
* 获取 附件名称
* @return annexNameList
*/
public
List
<
String
>
getAnnexNameList
(){
return
this
.
annexNameList
;
}
/**
* 设置 附件名称
* @param annexNameList
*/
public
void
setAnnexNameList
(
List
<
String
>
annexNameList
){
this
.
annexNameList
=
annexNameList
;
}
/**
* 获取 附件名称
* @return annexNameNotList
*/
public
List
<
String
>
getAnnexNameNotList
(){
return
this
.
annexNameNotList
;
}
/**
* 设置 附件名称
* @param annexNameNotList
*/
public
void
setAnnexNameNotList
(
List
<
String
>
annexNameNotList
){
this
.
annexNameNotList
=
annexNameNotList
;
}
/**
* 获取 附件地址
* @return annexUrlList
*/
public
List
<
String
>
getAnnexUrlList
(){
return
this
.
annexUrlList
;
}
/**
* 设置 附件地址
* @param annexUrlList
*/
public
void
setAnnexUrlList
(
List
<
String
>
annexUrlList
){
this
.
annexUrlList
=
annexUrlList
;
}
/**
* 获取 附件地址
* @return annexUrlNotList
*/
public
List
<
String
>
getAnnexUrlNotList
(){
return
this
.
annexUrlNotList
;
}
/**
* 设置 附件地址
* @param annexUrlNotList
*/
public
void
setAnnexUrlNotList
(
List
<
String
>
annexUrlNotList
){
this
.
annexUrlNotList
=
annexUrlNotList
;
}
/**
* 设置 序号,主键,自增长
* @param id
...
...
@@ -3095,6 +3169,44 @@ public class ApplyLogQuery extends ApplyLogEntity {
return
this
;
}
/**
* 设置 附件名称
* @param annexName
*/
public
ApplyLogQuery
annexName
(
String
annexName
){
setAnnexName
(
annexName
);
return
this
;
}
/**
* 设置 附件名称
* @param annexNameList
*/
public
ApplyLogQuery
annexNameList
(
List
<
String
>
annexNameList
){
this
.
annexNameList
=
annexNameList
;
return
this
;
}
/**
* 设置 附件地址
* @param annexUrl
*/
public
ApplyLogQuery
annexUrl
(
String
annexUrl
){
setAnnexUrl
(
annexUrl
);
return
this
;
}
/**
* 设置 附件地址
* @param annexUrlList
*/
public
ApplyLogQuery
annexUrlList
(
List
<
String
>
annexUrlList
){
this
.
annexUrlList
=
annexUrlList
;
return
this
;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
...
...
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/RetainLogEntity.java
View file @
6abd8ed6
package
com.mortals.xhx.module.record.model
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.ArrayList
;
import
java.math.BigDecimal
;
...
...
@@ -10,11 +11,11 @@ import com.mortals.framework.model.BaseEntityLong;
import
com.mortals.xhx.module.record.model.vo.RetainLogVo
;
import
lombok.Data
;
/**
* 证照持有实体对象
*
* @author zxfei
* @date 2024-07-28
*/
* 证照持有实体对象
*
* @author zxfei
* @date 2024-08-01
*/
@Data
public
class
RetainLogEntity
extends
RetainLogVo
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -103,6 +104,46 @@ public class RetainLogEntity extends RetainLogVo {
* 制证机关
*/
private
String
authority
;
/**
* 颁发时间
*/
private
Date
issueTime
;
/**
* 附件名称
*/
private
String
annexName
;
/**
* 附件地址
*/
private
String
annexUrl
;
/**
* 有效期起始
*/
private
Date
validityStart
;
/**
* 有效期截止
*/
private
Date
validityEnd
;
/**
* 持有者类型,1:自然人,2:法人,3:自然人法人
*/
private
Integer
holderType
;
/**
* 持有者证件类型,1:身份证,2:组织机构代码等
*/
private
Integer
holderIdType
;
/**
* 专网ID
*/
private
String
privateID
;
/**
* 申请ID
*/
private
Long
applyId
;
/**
* 打印次数
*/
private
Integer
total
;
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
...
...
@@ -141,5 +182,15 @@ public class RetainLogEntity extends RetainLogVo {
this
.
businessPlace
=
""
;
this
.
licenseProject
=
""
;
this
.
authority
=
""
;
this
.
issueTime
=
null
;
this
.
annexName
=
""
;
this
.
annexUrl
=
""
;
this
.
validityStart
=
null
;
this
.
validityEnd
=
null
;
this
.
holderType
=
1
;
this
.
holderIdType
=
1
;
this
.
privateID
=
""
;
this
.
applyId
=
null
;
this
.
total
=
1
;
}
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/RetainLogQuery.java
View file @
6abd8ed6
This diff is collapsed.
Click to expand it.
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/model/vo/RetainLogVo.java
View file @
6abd8ed6
...
...
@@ -17,4 +17,6 @@ import java.util.List;
public
class
RetainLogVo
extends
BaseEntityLong
{
/** 查询条件 */
private
String
query
;
/** 子证联报状态 已联报数/子证总数 */
private
String
processStatus
;
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/ApplyLogServiceImpl.java
View file @
6abd8ed6
...
...
@@ -29,6 +29,7 @@ import com.mortals.xhx.module.certificate.pdu.ApplyLogPdu;
import
com.mortals.xhx.module.certificate.service.CertificateCatalogService
;
import
com.mortals.xhx.module.certificate.service.CertificateClassifyService
;
import
com.mortals.xhx.module.certificate.service.CertificateDocumentService
;
import
com.mortals.xhx.module.certificate.service.CertificateIndustryService
;
import
com.mortals.xhx.module.child.model.ChildLicenseEntity
;
import
com.mortals.xhx.module.child.model.ChildLicenseQuery
;
import
com.mortals.xhx.module.child.service.ChildLicenseService
;
...
...
@@ -89,6 +90,8 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
private
UserService
userService
;
@Autowired
private
ChildLicenseService
childLicenseService
;
@Autowired
private
CertificateIndustryService
certificateIndustryService
;
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
...
...
@@ -184,10 +187,18 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
// if(StringUtils.isEmpty(entity.getAuthority())){
// throw new AppException("制证机关不能为空");
// }
if
(
StringUtils
.
isEmpty
(
entity
.
getSocialCode
())){
entity
.
setSocialCode
(
DateUtils
.
getCurrDateTime
(
"yyyyMMddHHmmss"
)+
RandomUtil
.
randomNumbers
(
4
));
if
(
entity
.
getId
()==
null
)
{
if
(
StringUtils
.
isEmpty
(
entity
.
getSocialCode
()))
{
entity
.
setSocialCode
(
DateUtils
.
getCurrDateTime
(
"yyyyMMddHHmmss"
)
+
RandomUtil
.
randomNumbers
(
4
));
//throw new AppException("统一社会信用代码不能为空");
}
ApplyLogEntity
temp
=
this
.
selectOne
(
new
ApplyLogQuery
().
socialCode
(
entity
.
getSocialCode
()).
recordStatus
(
YesNoEnum
.
NO
.
getValue
()));
if
(
temp
!=
null
)
{
throw
new
AppException
(
"统一社会信用代码重复"
);
}
}
else
{
entity
.
setSocialCode
(
null
);
}
// if(StringUtils.isEmpty(entity.getLicenseProject())){
// throw new AppException("许可项目不能为空");
// }
...
...
@@ -216,9 +227,12 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
// formContentJson.put("i_14_制证机关",applyLogEntity.getAuthority());
formContentJson
.
put
(
"@qrcode_1_二维码"
,
applyLogEntity
.
getSocialCode
());
if
(
CollectionUtils
.
isNotEmpty
(
applyLogEntity
.
getChildCertificate
())){
int
index
=
1
;
for
(
int
i
=
0
;
i
<
applyLogEntity
.
getChildCertificate
().
size
();
i
++){
int
index
=
i
+
1
;
formContentJson
.
put
(
"i_"
+
index
+
"_子证"
,
applyLogEntity
.
getChildCertificate
().
get
(
i
).
getShortName
());
if
(
applyLogEntity
.
getChildCertificate
().
get
(
i
).
getStatus
()==
1
)
{
formContentJson
.
put
(
"i_"
+
index
+
"_子证"
,
applyLogEntity
.
getChildCertificate
().
get
(
i
).
getShortName
());
index
++;
}
}
}
applyLogEntity
.
setFormContent
(
formContentJson
.
toJSONString
());
...
...
@@ -235,6 +249,8 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
applyLogEntity
.
setCatalogCode
(
catalog
.
getCatalogCode
());
applyLogEntity
.
setCatalogName
(
catalog
.
getCatalogName
());
applyLogEntity
.
setFormTemplate
(
catalog
.
getFormContent
());
CertificateIndustryEntity
industryEntity
=
certificateIndustryService
.
get
(
catalog
.
getIndustryId
());
applyLogEntity
.
setIndustryName
(
industryEntity
==
null
?
""
:
industryEntity
.
getIndustryName
());
DocTemplateVO
docTemplate
=
new
DocTemplateVO
(
catalog
.
getTemplateFileUrl
(),
applyLogEntity
.
getFormContent
());
try
{
String
rootPath
=
this
.
filePath
.
endsWith
(
"/"
)
?
this
.
filePath
:
this
.
filePath
+
"/"
;
...
...
@@ -430,7 +446,7 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
log
.
info
(
"Image path: "
+
imagepath
);
try
{
PictureRenderData
pictureRenderData
=
Pictures
.
ofStream
(
new
FileInputStream
(
imagepath
),
PictureType
.
JPEG
)
.
size
(
1
0
0
,
120
).
create
();
.
size
(
1
2
0
,
120
).
create
();
addMap
.
put
(
StrUtil
.
removePrefixIgnoreCase
(
entry
.
getKey
(),
"@"
),
pictureRenderData
);
//entry.setValue(pictureRenderData);
}
catch
(
FileNotFoundException
e
)
{
...
...
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/PrintWaitQueueServiceImpl.java
View file @
6abd8ed6
...
...
@@ -19,7 +19,9 @@ import com.mortals.xhx.module.record.dao.PrintLogDao;
import
com.mortals.xhx.module.record.dao.PrintWaitQueueDao
;
import
com.mortals.xhx.module.record.dao.RetainLogDao
;
import
com.mortals.xhx.module.record.model.*
;
import
com.mortals.xhx.module.record.service.ApplyLogService
;
import
com.mortals.xhx.module.record.service.PrintWaitQueueService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -58,6 +60,8 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait
private
CertificateClassifyService
certificateClassifyService
;
@Autowired
private
ParamService
paramService
;
@Autowired
private
ApplyLogService
applyLogService
;
@Override
protected
void
findAfter
(
PrintWaitQueueEntity
entity
,
Context
context
,
List
<
PrintWaitQueueEntity
>
list
)
throws
AppException
{
...
...
@@ -153,17 +157,10 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait
}
private
void
doPrintSuccess
(
PrintWaitQueueEntity
waitQueueEntity
){
RetainLogEntity
retainLogEntity
=
new
RetainLogEntity
();
Date
now
=
new
Date
();
BeanUtils
.
copyProperties
(
waitQueueEntity
,
retainLogEntity
,
BeanUtil
.
getNullPropertyNames
(
waitQueueEntity
));
retainLogEntity
.
setId
(
null
);
retainLogEntity
.
setUpdateUserId
(
null
);
retainLogEntity
.
setUpdateTime
(
null
);
retainLogEntity
.
setCertificateStatus
(
CertificateStatus
.
NORMAL
.
getValue
());
ApplyLogEntity
applyLogEntity
=
applyLogService
.
get
(
waitQueueEntity
.
getApplyId
());
Date
now
=
new
Date
();
retainLogEntity
.
setCreateUserId
(
waitQueueEntity
.
getCreateUserId
());
retainLogEntity
.
setCreateTime
(
now
);
PrintLogEntity
printLogEntity
=
new
PrintLogEntity
();
BeanUtils
.
copyProperties
(
waitQueueEntity
,
printLogEntity
,
BeanUtil
.
getNullPropertyNames
(
waitQueueEntity
));
...
...
@@ -175,7 +172,28 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait
printLogEntity
.
setCreateTime
(
now
);
printLogEntity
.
setPrintStatus
(
PrintStatus
.
SUCCESS
.
getValue
());
printLogEntity
.
setStatusRemark
(
PrintStatus
.
SUCCESS
.
getDesc
());
RetainLogEntity
retainLogquery
=
new
RetainLogEntity
();
retainLogquery
.
setApplyId
(
waitQueueEntity
.
getApplyId
());
List
<
RetainLogEntity
>
tempRetainLogList
=
retainLogDao
.
getList
(
retainLogquery
);
if
(
CollectionUtils
.
isNotEmpty
(
tempRetainLogList
)){
RetainLogQuery
updateRetainLog
=
new
RetainLogQuery
();
updateRetainLog
.
setUpdateTime
(
now
);
updateRetainLog
.
setId
(
tempRetainLogList
.
get
(
0
).
getId
());
updateRetainLog
.
setTotalIncrement
(
1
);
retainLogDao
.
update
(
updateRetainLog
);
}
else
{
RetainLogEntity
retainLogEntity
=
new
RetainLogEntity
();
BeanUtils
.
copyProperties
(
applyLogEntity
,
retainLogEntity
,
BeanUtil
.
getNullPropertyNames
(
applyLogEntity
));
retainLogEntity
.
setId
(
null
);
retainLogEntity
.
setUpdateUserId
(
null
);
retainLogEntity
.
setUpdateTime
(
null
);
retainLogEntity
.
setCertificateStatus
(
CertificateStatus
.
NORMAL
.
getValue
());
retainLogEntity
.
setCreateUserId
(
waitQueueEntity
.
getCreateUserId
());
retainLogEntity
.
setCreateTime
(
now
);
retainLogDao
.
insert
(
retainLogEntity
);
}
printLogDao
.
insert
(
printLogEntity
);
CertificateCatalogEntity
catalogEntity
=
certificateCatalogService
.
get
(
waitQueueEntity
.
getCatalogId
());
CertificateClassifyQuery
query
=
new
CertificateClassifyQuery
();
...
...
@@ -183,7 +201,13 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait
query
.
setTotalIncrement
(
1
);
query
.
setUpdateTime
(
now
);
certificateClassifyService
.
update
(
query
);
ApplyLogEntity
updateApply
=
new
ApplyLogEntity
();
updateApply
.
setId
(
applyLogEntity
.
getId
());
updateApply
.
setCertificateCode
(
applyLogEntity
.
getCertificateCode
());
updateApply
.
setEnterpriseName
(
applyLogEntity
.
getEnterpriseName
());
updateApply
.
setCatalogId
(
applyLogEntity
.
getCatalogId
());
updateApply
.
setRecordStatus
(
YesNoEnum
.
YES
.
getValue
());
updateApply
.
setUpdateTime
(
new
Date
());
applyLogService
.
update
(
updateApply
);
}
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/RetainLogServiceImpl.java
View file @
6abd8ed6
...
...
@@ -4,12 +4,22 @@ 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.ProcessStatusEnum
;
import
com.mortals.xhx.common.code.StatusEnum
;
import
com.mortals.xhx.common.utils.StringUtils
;
import
com.mortals.xhx.module.certificate.model.CertificateDocumentEntity
;
import
com.mortals.xhx.module.certificate.model.vo.CertificateDocumentPdu
;
import
com.mortals.xhx.module.child.model.ChildLicenseEntity
;
import
com.mortals.xhx.module.child.model.ChildLicenseQuery
;
import
com.mortals.xhx.module.child.service.ChildLicenseService
;
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.RetainLogService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
...
...
@@ -25,6 +35,9 @@ import java.util.List;
@Service
(
"retainLogService"
)
public
class
RetainLogServiceImpl
extends
AbstractCRUDServiceImpl
<
RetainLogDao
,
RetainLogEntity
,
Long
>
implements
RetainLogService
{
@Autowired
private
ChildLicenseService
childLicenseService
;
@Override
protected
RetainLogEntity
findBefore
(
RetainLogEntity
entity
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
RetainLogQuery
query
=
new
RetainLogQuery
();
...
...
@@ -44,4 +57,39 @@ public class RetainLogServiceImpl extends AbstractCRUDServiceImpl<RetainLogDao,
return
query
;
}
@Override
protected
void
findAfter
(
RetainLogEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
RetainLogEntity
>
list
)
throws
AppException
{
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
for
(
RetainLogEntity
entity:
list
){
List
<
ChildLicenseEntity
>
childLicenseList
=
childLicenseService
.
find
(
new
ChildLicenseQuery
().
applyId
(
entity
.
getApplyId
()));
// if(CollectionUtils.isEmpty(childLicenseList)){
// entity.setProcessStatus("0/0");
// }else {
// Map<Integer, List<ChildLicenseEntity>> group = childLicenseList.stream().collect(Collectors.groupingBy(x -> x.getProcessStatus()));
// int pCount = CollectionUtils.isEmpty(group.get(1)) ? 0 : group.get(1).size();
// entity.setProcessStatus(pCount + "/" + childLicenseList.size());
// }
int
childSum
=
0
;
int
pCount
=
0
;
List
<
CertificateDocumentPdu
>
documentEntityList
=
new
ArrayList
<>();
for
(
ChildLicenseEntity
item:
childLicenseList
){
CertificateDocumentEntity
documentEntity
=
new
CertificateDocumentEntity
();
BeanUtils
.
copyProperties
(
item
,
documentEntity
);
documentEntity
.
setId
(
item
.
getDocumentId
());
documentEntity
.
setStatus
(
StatusEnum
.
DISABLE
.
getValue
());
if
(
item
.
getChildStatus
()==
StatusEnum
.
ENABLE
.
getValue
()){
documentEntity
.
setStatus
(
StatusEnum
.
ENABLE
.
getValue
());
childSum
++;
if
(
item
.
getProcessStatus
()==
ProcessStatusEnum
.
已处理
.
getValue
().
intValue
()){
pCount
++;
}
}
CertificateDocumentPdu
pdu
=
new
CertificateDocumentPdu
();
BeanUtils
.
copyProperties
(
documentEntity
,
pdu
);
documentEntityList
.
add
(
pdu
);
}
entity
.
setProcessStatus
(
pCount
+
"/"
+
childSum
);
}
}
}
}
\ No newline at end of file
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/web/ApplyLogController.java
View file @
6abd8ed6
...
...
@@ -9,6 +9,8 @@ import com.mortals.framework.utils.poi.ExcelUtil;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.upload.service.UploadService
;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.utils.ImportExcelUtil
;
import
com.mortals.xhx.common.utils.ReadExcelPictureUtil
;
...
...
@@ -39,6 +41,8 @@ import com.alibaba.fastjson.JSONObject;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
import
static
java
.
util
.
stream
.
Collectors
.
toMap
;
/**
*
* 证照申请
...
...
@@ -55,6 +59,8 @@ public class ApplyLogController extends BaseCRUDJsonBodyMappingController<ApplyL
@Autowired
private
CertificateDocumentService
certificateDocumentService
;
@Autowired
private
UserService
userService
;
public
ApplyLogController
(){
super
.
setModuleDesc
(
"证照申请"
);
...
...
@@ -66,6 +72,7 @@ public class ApplyLogController extends BaseCRUDJsonBodyMappingController<ApplyL
this
.
addDict
(
model
,
"holderType"
,
IBaseEnum
.
getEnumMap
(
HolderType
.
class
));
this
.
addDict
(
model
,
"holderIdType"
,
IBaseEnum
.
getEnumMap
(
HolderIdType
.
class
));
this
.
addDict
(
model
,
"generateStatus"
,
IBaseEnum
.
getEnumMap
(
GenerateStatus
.
class
));
this
.
addDict
(
model
,
"createUserId"
,
userService
.
find
(
new
UserQuery
()).
stream
().
collect
(
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getRealName
(),
(
o
,
n
)
->
n
)));
super
.
init
(
model
,
context
);
}
...
...
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/web/PrintLogController.java
View file @
6abd8ed6
...
...
@@ -4,6 +4,8 @@ import com.mortals.framework.common.IBaseEnum;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.common.code.PrintStatus
;
import
com.mortals.xhx.common.code.StatusEnum
;
import
com.mortals.xhx.module.record.model.PrintLogEntity
;
...
...
@@ -13,6 +15,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
import
static
java
.
util
.
stream
.
Collectors
.
toMap
;
/**
*
* 证照打印记录
...
...
@@ -26,6 +31,8 @@ public class PrintLogController extends BaseCRUDJsonBodyMappingController<PrintL
@Autowired
private
ParamService
paramService
;
@Autowired
private
UserService
userService
;
public
PrintLogController
(){
super
.
setModuleDesc
(
"证照打印记录"
);
...
...
@@ -35,6 +42,7 @@ public class PrintLogController extends BaseCRUDJsonBodyMappingController<PrintL
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"status"
,
IBaseEnum
.
getEnumMap
(
StatusEnum
.
class
));
this
.
addDict
(
model
,
"printStatus"
,
IBaseEnum
.
getEnumMap
(
PrintStatus
.
class
));
this
.
addDict
(
model
,
"createUserId"
,
userService
.
find
(
new
UserQuery
()).
stream
().
collect
(
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getRealName
(),
(
o
,
n
)
->
n
)));
super
.
init
(
model
,
context
);
}
...
...
one-certificate-manager/src/main/java/com/mortals/xhx/module/record/web/RetainLogController.java
View file @
6abd8ed6
...
...
@@ -2,6 +2,8 @@ package com.mortals.xhx.module.record.web;
import
com.mortals.framework.common.IBaseEnum
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.common.code.CertificateStatus
;
import
com.mortals.xhx.common.code.StatusEnum
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -25,6 +27,8 @@ import java.util.Arrays;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
import
static
java
.
util
.
stream
.
Collectors
.
toMap
;
/**
*
* 证照持有
...
...
@@ -38,6 +42,8 @@ public class RetainLogController extends BaseCRUDJsonBodyMappingController<Retai
@Autowired
private
ParamService
paramService
;
@Autowired
private
UserService
userService
;
public
RetainLogController
(){
super
.
setModuleDesc
(
"证照持有"
);
...
...
@@ -47,6 +53,7 @@ public class RetainLogController extends BaseCRUDJsonBodyMappingController<Retai
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"status"
,
IBaseEnum
.
getEnumMap
(
StatusEnum
.
class
));
this
.
addDict
(
model
,
"certificateStatus"
,
IBaseEnum
.
getEnumMap
(
CertificateStatus
.
class
));
this
.
addDict
(
model
,
"createUserId"
,
userService
.
find
(
new
UserQuery
()).
stream
().
collect
(
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getRealName
(),
(
o
,
n
)
->
n
)));
super
.
init
(
model
,
context
);
}
...
...
one-certificate-manager/src/main/resources/sqlmap/module/record/ApplyLogMapper.xml
View file @
6abd8ed6
This diff is collapsed.
Click to expand it.
one-certificate-manager/src/main/resources/sqlmap/module/record/RetainLogMapper.xml
View file @
6abd8ed6
This diff is collapsed.
Click to expand it.
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