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
d2cdffbd
Commit
d2cdffbd
authored
Jul 28, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加目录字段
parent
1e23e744
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
10 deletions
+39
-10
one-certificate-manager/db/add_db.sql
one-certificate-manager/db/add_db.sql
+1
-0
one-certificate-manager/src/main/java/com/mortals/xhx/module/child/web/ChildLicenseController.java
.../mortals/xhx/module/child/web/ChildLicenseController.java
+38
-10
No files found.
one-certificate-manager/db/add_db.sql
View file @
d2cdffbd
...
@@ -48,3 +48,4 @@ CREATE TABLE `mortals_xhx_child_license` (
...
@@ -48,3 +48,4 @@ CREATE TABLE `mortals_xhx_child_license` (
KEY
`deptId`
(
`deptId`
)
USING
BTREE
KEY
`deptId`
(
`deptId`
)
USING
BTREE
)
ENGINE
=
InnoDB
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'行业许可子证'
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'行业许可子证'
ROW_FORMAT
=
Dynamic
;
ALTER
TABLE
mortals_xhx_child_license
ADD
COLUMN
`resolutionValue`
varchar
(
64
)
DEFAULT
''
COMMENT
'设备分辨率'
AFTER
resolution
;
one-certificate-manager/src/main/java/com/mortals/xhx/module/child/web/ChildLicenseController.java
View file @
d2cdffbd
...
@@ -7,6 +7,7 @@ import com.mortals.xhx.annotation.DataPermission;
...
@@ -7,6 +7,7 @@ import com.mortals.xhx.annotation.DataPermission;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.module.certificate.model.CertificateDocumentQuery
;
import
com.mortals.xhx.module.certificate.model.CertificateDocumentQuery
;
import
com.mortals.xhx.module.certificate.service.CertificateDocumentService
;
import
com.mortals.xhx.module.certificate.service.CertificateDocumentService
;
import
com.mortals.xhx.module.device.model.DeviceEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -22,15 +23,11 @@ import com.mortals.xhx.module.child.service.ChildLicenseService;
...
@@ -22,15 +23,11 @@ import com.mortals.xhx.module.child.service.ChildLicenseService;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.Arrays
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -48,8 +45,6 @@ import com.mortals.xhx.common.code.*;
...
@@ -48,8 +45,6 @@ import com.mortals.xhx.common.code.*;
@RequestMapping
(
"child/license"
)
@RequestMapping
(
"child/license"
)
public
class
ChildLicenseController
extends
BaseCRUDJsonBodyMappingController
<
ChildLicenseService
,
ChildLicenseEntity
,
Long
>
{
public
class
ChildLicenseController
extends
BaseCRUDJsonBodyMappingController
<
ChildLicenseService
,
ChildLicenseEntity
,
Long
>
{
@Autowired
private
ParamService
paramService
;
@Autowired
@Autowired
private
CertificateDocumentService
certificateDocumentService
;
private
CertificateDocumentService
certificateDocumentService
;
...
@@ -63,8 +58,8 @@ public class ChildLicenseController extends BaseCRUDJsonBodyMappingController<Ch
...
@@ -63,8 +58,8 @@ public class ChildLicenseController extends BaseCRUDJsonBodyMappingController<Ch
this
.
addDict
(
model
,
"legalPersonName"
,
LegalPersonNameEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"legalPersonName"
,
LegalPersonNameEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"processStatus"
,
ProcessStatusEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"processStatus"
,
ProcessStatusEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"documentId"
,
certificateDocumentService
.
find
(
new
CertificateDocumentQuery
())
this
.
addDict
(
model
,
"documentId"
,
certificateDocumentService
.
find
(
new
CertificateDocumentQuery
())
.
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
(),
y
->
y
.
getDocumentName
(),(
o
,
n
)->
n
)));
.
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
(),
y
->
y
.
getDocumentName
(),
(
o
,
n
)
->
n
)));
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
...
@@ -78,11 +73,44 @@ public class ChildLicenseController extends BaseCRUDJsonBodyMappingController<Ch
...
@@ -78,11 +73,44 @@ public class ChildLicenseController extends BaseCRUDJsonBodyMappingController<Ch
@Override
@Override
protected
void
doListAfter
(
ChildLicenseEntity
query
,
List
<
ChildLicenseEntity
>
list
,
Context
context
)
throws
AppException
{
protected
void
doListAfter
(
ChildLicenseEntity
query
,
List
<
ChildLicenseEntity
>
list
,
Context
context
)
throws
AppException
{
list
.
forEach
(
item
->
{
list
.
forEach
(
item
->
{
item
.
setFormContent
(
""
);
item
.
setFormContent
(
""
);
item
.
setFormStyleContent
(
""
);
item
.
setFormStyleContent
(
""
);
});
});
super
.
doListAfter
(
query
,
list
,
context
);
super
.
doListAfter
(
query
,
list
,
context
);
}
}
/**
* 子证联报
*/
@PostMapping
(
value
=
"report"
)
public
String
report
(
@RequestBody
ChildLicenseEntity
childLicenseEntity
)
{
JSONObject
jsonObject
=
new
JSONObject
();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
String
busiDesc
=
this
.
getModuleDesc
()
+
"联报"
;
try
{
if
(
childLicenseEntity
.
newEntity
())
throw
new
AppException
(
"Id不能为空!"
);
ChildLicenseEntity
sourceEntity
=
this
.
service
.
get
(
childLicenseEntity
.
getId
());
if
(
ProcessStatusEnum
.
已处理
.
getValue
()
==
sourceEntity
.
getProcessStatus
())
throw
new
AppException
(
"当前子证已经联报"
);
childLicenseEntity
.
setReportUserId
(
this
.
getContextUserId
(
getContext
()));
childLicenseEntity
.
setReportUserName
(
this
.
getContext
().
getUser
().
getRealName
());
childLicenseEntity
.
setReportTime
(
new
Date
());
childLicenseEntity
.
setProcessStatus
(
ProcessStatusEnum
.
已处理
.
getValue
());
this
.
service
.
update
(
childLicenseEntity
,
getContext
());
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
jsonObject
.
put
(
KEY_RESULT_DATA
,
model
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
}
catch
(
Exception
e
)
{
log
.
error
(
"子证联报异常"
,
e
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
jsonObject
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
}
return
jsonObject
.
toJSONString
();
}
}
}
\ No newline at end of file
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