Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
8fa79fab
Commit
8fa79fab
authored
Mar 25, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补证登记相关
parent
9c4edd9e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
45 deletions
+70
-45
JgCertificateReplenishDto.java
...mos/boot/module/jg/api/dto/JgCertificateReplenishDto.java
+3
-0
JgCertificateReplenish.java
...mos/boot/module/jg/api/entity/JgCertificateReplenish.java
+6
-0
IJgCertificateReplenishService.java
...module/jg/api/service/IJgCertificateReplenishService.java
+1
-1
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+31
-27
JgCertificateReplenishServiceImpl.java
...g/biz/service/impl/JgCertificateReplenishServiceImpl.java
+29
-17
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgCertificateReplenishDto.java
View file @
8fa79fab
...
...
@@ -126,6 +126,9 @@ public class JgCertificateReplenishDto extends BaseDto {
private
String
dataType
;
private
List
<
Map
<
String
,
Object
>>
equLists
;
@ApiModelProperty
(
"使用登记证补证申请表URL"
)
private
String
applicationFormFileUrl
;
@ApiModelProperty
(
"设备使用地址"
)
private
String
equUseAddress
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgCertificateReplenish.java
View file @
8fa79fab
...
...
@@ -237,6 +237,12 @@ public class JgCertificateReplenish extends BaseEntity {
@TableField
(
"equ_use_address"
)
private
String
equUseAddress
;
/**
* 使用登记证补证申请表URL
*/
@TableField
(
"application_form_file_url"
)
private
String
applicationFormFileUrl
;
@TableField
(
exist
=
false
)
private
String
processAdvice
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgCertificateReplenishService.java
View file @
8fa79fab
...
...
@@ -13,7 +13,7 @@ import java.util.Map;
*/
public
interface
IJgCertificateReplenishService
{
Map
<
String
,
Object
>
getCertReplenishFormUrl
(
JSONObject
map
);
Map
<
String
,
Object
>
getCertReplenishFormUrl
(
JSONObject
map
,
String
applyNo
);
void
getCertReplenishFormStream
(
JSONObject
jsonObject
,
HttpServletResponse
response
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
8fa79fab
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgCertificateReplenishServiceImpl.java
View file @
8fa79fab
...
...
@@ -101,7 +101,10 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
public
static
final
String
PROCESS_ADVICE
=
"processAdvice"
;
public
static
final
String
IS_COMPANY
=
"isCompany"
;
public
static
final
String
APPLY_STATUS
=
"applyStatus"
;
public
static
final
String
APPLY_NO
=
"applyNo"
;
public
static
final
String
APPLICATION_FORM_FILE_URL
=
"applicationFormFileUrl"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"6610"
,
"6614"
,
"6615"
,
"6617"
,
"6616"
);
private
final
List
<
String
>
ATTACHMENT_FIELD
=
Arrays
.
asList
(
APPLICATION_FORM_FILE
,
OTHER_ACCESSORIES
);
private
static
final
String
EQUIP_TRANSFER_PROCESS_KEY
=
"certReplenish"
;
private
final
Map
<
String
,
Function
<
JSONObject
,
Object
>>
actionMap
=
new
HashMap
<>();
/**
...
...
@@ -187,6 +190,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
updateTaskModel
(
certRep
);
createTaskModel
(
certRep
,
processTaskDTO
,
nextUserIds
);
}
certRep
.
setApplicationFormFileUrl
(
Objects
.
toString
(
this
.
getCertReplenishFormUrl
(
jsonObject
,
certRep
.
getApplyNo
()).
get
(
APPLICATION_FORM_FILE_URL
)));
this
.
updateById
(
certRep
);
this
.
updateCertRepEqs
(
jsonObject
);
return
certRep
;
...
...
@@ -241,6 +245,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
public
Object
updateNotsubmit
(
JSONObject
jsonObject
)
{
JgCertificateReplenish
certRep
=
this
.
buildUpdateCertRep
(
jsonObject
,
FlowStatusEnum
.
TO_BE_SUBMITTED
);
certRep
.
setApplicationFormFileUrl
(
Objects
.
toString
(
this
.
getCertReplenishFormUrl
(
jsonObject
,
certRep
.
getApplyNo
()).
get
(
APPLICATION_FORM_FILE_URL
)));
this
.
updateById
(
certRep
);
this
.
updateCertRepEqs
(
jsonObject
);
return
certRep
;
...
...
@@ -258,8 +263,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
String
[]
safetyManager
=
Objects
.
toString
(
jsonObject
.
get
(
SAFETY_MANAGER_ID
)).
split
(
"_"
);
this
.
setEquClassification
(
certRep
);
certRep
.
setApplyStatus
(
Objects
.
toString
(
flowStatusEnum
.
getCode
()));
certRep
.
setApplicationFormFile
(
JSONObject
.
toJSONString
(
jsonObject
.
get
(
APPLICATION_FORM_FILE
)));
certRep
.
setOtherAccessories
(!
ValidationUtil
.
isEmpty
(
jsonObject
.
get
(
OTHER_ACCESSORIES
))
?
JSONObject
.
toJSONString
(
jsonObject
.
get
(
OTHER_ACCESSORIES
))
:
null
);
Optional
.
ofNullable
(
jsonObject
.
get
(
APPLICATION_FORM_FILE
)).
ifPresent
(
x
->
certRep
.
setApplicationFormFile
(
JSONObject
.
toJSONString
(
x
)));
Optional
.
ofNullable
(
jsonObject
.
get
(
OTHER_ACCESSORIES
)).
ifPresent
(
x
->
certRep
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
x
))
);
certRep
.
setSafetyManagerName
(
safetyManager
[
1
]);
return
certRep
;
}
...
...
@@ -342,9 +347,10 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
Long
sequenceNbr
=
sequence
.
nextId
();
JSONArray
equLists
=
jsonObj
.
getJSONArray
(
EQU_LISTS
);
this
.
saveCertRepEqs
(
sequenceNbr
,
equLists
);
JgCertificateReplenish
certificateReplenish
=
this
.
buildCertRep
(
sequenceNbr
,
jsonObj
,
new
WorkflowResultDto
());
this
.
save
(
certificateReplenish
);
return
certificateReplenish
;
JgCertificateReplenish
certRep
=
this
.
buildCertRep
(
sequenceNbr
,
jsonObj
,
new
WorkflowResultDto
());
certRep
.
setApplicationFormFileUrl
(
Objects
.
toString
(
this
.
getCertReplenishFormUrl
(
jsonObj
,
certRep
.
getApplyNo
()).
get
(
APPLICATION_FORM_FILE_URL
)));
this
.
save
(
certRep
);
return
certRep
;
}
public
void
saveOrUpdateHisDataBatch
(
JSONObject
jsonObj
,
String
sequenceNbr
)
{
...
...
@@ -377,8 +383,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
certRep
.
setReceiveOrgName
(
receiveOrg
[
1
]);
certRep
.
setUseUnitCode
(
getSelectedOrgInfo
().
getCompany
().
getCompanyCode
());
certRep
.
setUseUnitName
(
getSelectedOrgInfo
().
getCompany
().
getCompanyName
());
certRep
.
setApplicationFormFile
(
JSONObject
.
toJSONString
(
jsonObj
.
get
(
APPLICATION_FORM_FILE
)));
certRep
.
setOtherAccessories
(!
ValidationUtil
.
isEmpty
(
jsonObj
.
get
(
OTHER_ACCESSORIES
))
?
JSONObject
.
toJSONString
(
jsonObj
.
get
(
OTHER_ACCESSORIES
))
:
null
);
Optional
.
ofNullable
(
jsonObj
.
get
(
APPLICATION_FORM_FILE
)).
ifPresent
(
x
->
certRep
.
setApplicationFormFile
(
JSONObject
.
toJSONString
(
x
)));
Optional
.
ofNullable
(
jsonObj
.
get
(
OTHER_ACCESSORIES
)).
ifPresent
(
x
->
certRep
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
x
))
);
certRep
.
setSafetyManagerName
(
safetyManager
[
1
]);
certRep
.
setIsDelete
(
Boolean
.
FALSE
);
certRep
.
setCreateDate
(
date
);
...
...
@@ -423,6 +429,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
commonService
.
saveExecuteFlowData2Redis
(
workflowResultDto
.
getInstanceId
(),
buildInstanceRuntimeData
(
certRep
));
// 代办
this
.
buildTask
(
certRep
,
workflowResultList
);
certRep
.
setApplicationFormFileUrl
(
Objects
.
toString
(
this
.
getCertReplenishFormUrl
(
jsonObj
,
certRep
.
getApplyNo
()).
get
(
APPLICATION_FORM_FILE_URL
)));
this
.
save
(
certRep
);
this
.
saveCertRepEqs
(
certRep
.
getSequenceNbr
(),
jsonObj
.
getJSONArray
(
EQU_LISTS
));
return
certRep
;
...
...
@@ -624,20 +631,20 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
* @return
*/
@Override
public
Map
<
String
,
Object
>
getCertReplenishFormUrl
(
JSONObject
jsonObject
)
{
// 生成申请编号
String
applyNo
=
""
;
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
BZDJ
.
getCode
(),
1
);
if
(!
listResponseModel
.
getResult
().
isEmpty
())
{
applyNo
=
listResponseModel
.
getResult
().
get
(
0
);
public
Map
<
String
,
Object
>
getCertReplenishFormUrl
(
JSONObject
jsonObject
,
String
applyNo
)
{
if
(
StringUtils
.
isEmpty
(
applyNo
))
{
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
BZDJ
.
getCode
(),
1
)
;
if
(!
listResponseModel
.
getResult
().
isEmpty
())
{
applyNo
=
listResponseModel
.
getResult
().
get
(
0
);
}
}
JSONObject
formData
=
this
.
writeCertReplenishFormData
(
jsonObject
.
getJSONObject
(
FORM_DATA
)
,
applyNo
);
JSONObject
formData
=
this
.
writeCertReplenishFormData
(
jsonObject
,
applyNo
);
String
wordPath
=
"CertificateReplenish.ftl"
;
String
fileName
=
"使用登记证补证申请表_"
;
File
pdfFile
=
null
;
try
{
pdfFile
=
commonService
.
wordToPdf
(
fileName
,
wordPath
,
formData
);
return
MapBuilder
.<
String
,
Object
>
create
().
put
(
"certReplenishFormUrl"
,
commonService
.
uploadFile
(
pdfFile
,
"certificateReplenishFiles"
)).
put
(
"applyNo"
,
applyNo
).
build
();
return
MapBuilder
.<
String
,
Object
>
create
().
put
(
APPLICATION_FORM_FILE_URL
,
commonService
.
uploadFile
(
pdfFile
,
"certificateReplenishFiles"
)).
put
(
"applyNo"
,
applyNo
).
build
();
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
finally
{
...
...
@@ -658,7 +665,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
*/
@Override
public
void
getCertReplenishFormStream
(
JSONObject
jsonObject
,
HttpServletResponse
response
)
{
JSONObject
formData
=
this
.
writeCertReplenishFormData
(
jsonObject
,
""
);
JSONObject
jsonObj
=
jsonObject
.
getJSONObject
(
FORM_DATA
);
JSONObject
formData
=
this
.
writeCertReplenishFormData
(
jsonObj
,
jsonObj
.
getString
(
APPLY_NO
));
String
wordPath
=
"CertificateReplenish.ftl"
;
String
fileName
=
"使用登记证补证申请表_"
;
File
pdfFile
;
...
...
@@ -689,7 +697,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
result
.
put
(
"useUnitName"
,
jsonObject
.
getString
(
"useUnitName"
));
result
.
put
(
"equUseAddress"
,
jsonObject
.
getString
(
"equUseAddress"
));
result
.
put
(
"applicationReason"
,
jsonObject
.
getString
(
"applicationReason"
));
result
.
put
(
"lossDamageTime"
,
jsonObject
.
getString
(
"lossDamageTime"
));
result
.
put
(
"lossDamageTime"
,
jsonObject
.
getString
(
"lossDamageTime"
)
.
substring
(
0
,
10
)
);
result
.
put
(
"safetyManagerName"
,
jsonObject
.
getString
(
"safetyManagerId"
).
split
(
"_"
)[
1
]);
result
.
put
(
"safetyManagerPhone"
,
jsonObject
.
getString
(
"safetyManagerPhone"
));
JSONArray
equListsAfterAssembly
=
new
JSONArray
();
...
...
@@ -824,6 +832,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
JSONObject
jsonObject
=
commonService
.
queryHistoryData
(
sequenceNbr
);
jsonObject
.
put
(
IS_COMPANY
,
isCompany
);
jsonObject
.
put
(
APPLY_STATUS
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
ATTACHMENT_FIELD
.
forEach
(
item
->
jsonObject
.
put
(
item
,
JSONObject
.
parse
(
jsonObject
.
getString
(
item
))));
jsonObject
.
put
(
APPLICATION_FORM_FILE_URL
,
certRep
.
getApplicationFormFileUrl
());
return
jsonObject
;
}
else
{
ObjectMapper
mapper
=
new
ObjectMapper
();
...
...
@@ -834,6 +844,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
JSONObject
jsonObject
=
commonService
.
queryHistoryData
(
sequenceNbr
);
result
.
put
(
SAFETY_MANAGER_ID
,
jsonObject
.
get
(
SAFETY_MANAGER_ID
));
result
.
put
(
IS_COMPANY
,
isCompany
);
ATTACHMENT_FIELD
.
forEach
(
item
->
result
.
put
(
item
,
JSONObject
.
parse
(
jsonObject
.
getString
(
item
))));
result
.
put
(
APPLICATION_FORM_FILE_URL
,
certRep
.
getApplicationFormFileUrl
());
return
result
;
}
}
...
...
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