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
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 {
...
@@ -126,6 +126,9 @@ public class JgCertificateReplenishDto extends BaseDto {
private
String
dataType
;
private
String
dataType
;
private
List
<
Map
<
String
,
Object
>>
equLists
;
private
List
<
Map
<
String
,
Object
>>
equLists
;
@ApiModelProperty
(
"使用登记证补证申请表URL"
)
private
String
applicationFormFileUrl
;
@ApiModelProperty
(
"设备使用地址"
)
@ApiModelProperty
(
"设备使用地址"
)
private
String
equUseAddress
;
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 {
...
@@ -237,6 +237,12 @@ public class JgCertificateReplenish extends BaseEntity {
@TableField
(
"equ_use_address"
)
@TableField
(
"equ_use_address"
)
private
String
equUseAddress
;
private
String
equUseAddress
;
/**
* 使用登记证补证申请表URL
*/
@TableField
(
"application_form_file_url"
)
private
String
applicationFormFileUrl
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
processAdvice
;
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;
...
@@ -13,7 +13,7 @@ import java.util.Map;
*/
*/
public
interface
IJgCertificateReplenishService
{
public
interface
IJgCertificateReplenishService
{
Map
<
String
,
Object
>
getCertReplenishFormUrl
(
JSONObject
map
);
Map
<
String
,
Object
>
getCertReplenishFormUrl
(
JSONObject
map
,
String
applyNo
);
void
getCertReplenishFormStream
(
JSONObject
jsonObject
,
HttpServletResponse
response
);
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
...
@@ -47,6 +47,8 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -47,6 +47,8 @@ import javax.servlet.http.HttpServletResponse;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgCertificateReplenishServiceImpl
.
FORM_DATA
;
/**
/**
* 监管公共Api
* 监管公共Api
*
*
...
@@ -197,6 +199,7 @@ public class CommonController extends BaseController {
...
@@ -197,6 +199,7 @@ public class CommonController extends BaseController {
/**
/**
* 设备管道品种
* 设备管道品种
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -207,7 +210,6 @@ public class CommonController extends BaseController {
...
@@ -207,7 +210,6 @@ public class CommonController extends BaseController {
}
}
/**
/**
* 设备分类
* 设备分类
*
*
...
@@ -237,6 +239,7 @@ public class CommonController extends BaseController {
...
@@ -237,6 +239,7 @@ public class CommonController extends BaseController {
/**
/**
* 根据设备种类code获取设备类别
* 根据设备种类code获取设备类别
*
* @param type 1,设备种类 2,设备类别 3,设备品种
* @param type 1,设备种类 2,设备类别 3,设备品种
* @return
* @return
*/
*/
...
@@ -550,15 +553,15 @@ public class CommonController extends BaseController {
...
@@ -550,15 +553,15 @@ public class CommonController extends BaseController {
List
<
DictionarieValueModel
>
resultObj
=
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
).
getResult
();
List
<
DictionarieValueModel
>
resultObj
=
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
).
getResult
();
List
<
Map
<
String
,
Object
>>
result
=
resultObj
.
stream
().
filter
(
Objects:
:
nonNull
)
List
<
Map
<
String
,
Object
>>
result
=
resultObj
.
stream
().
filter
(
Objects:
:
nonNull
)
.
map
(
obj
->
BeanUtil
.
beanToMap
(
obj
)).
collect
(
Collectors
.
toList
());
.
map
(
obj
->
BeanUtil
.
beanToMap
(
obj
)).
collect
(
Collectors
.
toList
());
if
(
bizType
.
equals
(
"DJ_CSJ"
)){
if
(
bizType
.
equals
(
"DJ_CSJ"
))
{
result
.
forEach
(
e
->
{
result
.
forEach
(
e
->
{
if
(
e
.
getOrDefault
(
"dictDataKey"
,
""
).
equals
(
"2000"
))
{
if
(
e
.
getOrDefault
(
"dictDataKey"
,
""
).
equals
(
"2000"
))
{
e
.
put
(
"tips"
,
"变更前需先进行委托检验,在办理变更登记时上传委托检验报告!"
);
e
.
put
(
"tips"
,
"变更前需先进行委托检验,在办理变更登记时上传委托检验报告!"
);
}
else
{
}
else
{
e
.
put
(
"tips"
,
"变更前需先进行安全评估,评估结果为改造或重大维修,需办理改造或维修告知,进行监督检验后,再进行变更登记;评估结果为一般维修,需办理定期检验,再进行变更登记!"
);
e
.
put
(
"tips"
,
"变更前需先进行安全评估,评估结果为改造或重大维修,需办理改造或维修告知,进行监督检验后,再进行变更登记;评估结果为一般维修,需办理定期检验,再进行变更登记!"
);
}
}
});
});
}
}
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
...
@@ -570,13 +573,13 @@ public class CommonController extends BaseController {
...
@@ -570,13 +573,13 @@ public class CommonController extends BaseController {
public
ResponseModel
<
List
<
DictionarieValueModel
>>
equCategoryList
(
@RequestParam
(
value
=
"type"
)
String
bizType
,
public
ResponseModel
<
List
<
DictionarieValueModel
>>
equCategoryList
(
@RequestParam
(
value
=
"type"
)
String
bizType
,
@RequestParam
(
value
=
"businessScenarios"
)
String
businessScenarios
,
@RequestParam
(
value
=
"businessScenarios"
)
String
businessScenarios
,
@PathVariable
String
categoryCode
)
{
@PathVariable
String
categoryCode
)
{
if
(
"DJ_CSJ"
.
equals
(
bizType
))
{
//
超设计年限变更和使用变更共用压力容器字典
if
(
"DJ_CSJ"
.
equals
(
bizType
))
{
//
超设计年限变更和使用变更共用压力容器字典
bizType
=
"DJ_SY"
;
bizType
=
"DJ_SY"
;
}
}
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_{categoryCode},如BF_YZ_1000==》移装注销-锅炉
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_{categoryCode},如BF_YZ_1000==》移装注销-锅炉
String
dictCode
=
String
.
format
(
"%s_%s"
,
bizType
,
categoryCode
);
String
dictCode
=
String
.
format
(
"%s_%s"
,
bizType
,
categoryCode
);
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
).
getResult
();
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
).
getResult
();
//使用登记bizType(DJ_SY) + 压力容器categoryCode(2000) + 按照场景选择businessScenarios(1) => 只展示固定式压力容器(2100)
//
使用登记bizType(DJ_SY) + 压力容器categoryCode(2000) + 按照场景选择businessScenarios(1) => 只展示固定式压力容器(2100)
boolean
isFlag
=
"DJ_SY"
.
equals
(
bizType
)
&&
"2000"
.
equals
(
categoryCode
)
&&
"1"
.
equals
(
businessScenarios
);
boolean
isFlag
=
"DJ_SY"
.
equals
(
bizType
)
&&
"2000"
.
equals
(
categoryCode
)
&&
"1"
.
equals
(
businessScenarios
);
List
<
DictionarieValueModel
>
collect
=
result
.
stream
()
List
<
DictionarieValueModel
>
collect
=
result
.
stream
()
.
filter
(
x
->
!
isFlag
||
x
.
getDictDataKey
().
equals
(
"2100"
)).
collect
(
Collectors
.
toList
());
.
filter
(
x
->
!
isFlag
||
x
.
getDictDataKey
().
equals
(
"2100"
)).
collect
(
Collectors
.
toList
());
...
@@ -592,10 +595,10 @@ public class CommonController extends BaseController {
...
@@ -592,10 +595,10 @@ public class CommonController extends BaseController {
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_{categoryCode},如BF_YZ_1000==》移装注销-锅炉
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_{categoryCode},如BF_YZ_1000==》移装注销-锅炉
String
dictCode
=
String
.
format
(
"%s_%s"
,
bizType
,
code
);
String
dictCode
=
String
.
format
(
"%s_%s"
,
bizType
,
code
);
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
).
getResult
();
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
).
getResult
();
//使用登记bizType(DJ_SY) + 压力容器categoryCode(2000) + 按照场景选择businessScenarios(1) => 只展示固定式压力容器(2100)
//
使用登记bizType(DJ_SY) + 压力容器categoryCode(2000) + 按照场景选择businessScenarios(1) => 只展示固定式压力容器(2100)
// boolean isFlag = "DJ_SY".equals(bizType) && "2000".equals(code) && "1".equals(businessScenarios);
// boolean isFlag = "DJ_SY".equals(bizType) && "2000".equals(code) && "1".equals(businessScenarios);
// List<DictionarieValueModel> collect = result.stream()
// List<DictionarieValueModel> collect = result.stream()
// .filter(x -> !isFlag || x.getDictDataKey().equals("2100")).collect(Collectors.toList());
// .filter(x -> !isFlag || x.getDictDataKey().equals("2100")).collect(Collectors.toList());
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
...
@@ -768,7 +771,7 @@ public class CommonController extends BaseController {
...
@@ -768,7 +771,7 @@ public class CommonController extends BaseController {
@GetMapping
(
value
=
"/checkFactoryNumUniquenessForVehicleCylinder"
)
@GetMapping
(
value
=
"/checkFactoryNumUniquenessForVehicleCylinder"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)"
,
notes
=
"车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)"
,
notes
=
"车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)"
)
public
Integer
checkFactoryNumUniquenessForVehicleCylinder
(
@RequestParam
(
"factoryNum"
)
String
factoryNum
)
{
public
Integer
checkFactoryNumUniquenessForVehicleCylinder
(
@RequestParam
(
"factoryNum"
)
String
factoryNum
)
{
return
commonService
.
checkFactoryNumUniquenessForVehicleCylinder
(
factoryNum
,
null
);
return
commonService
.
checkFactoryNumUniquenessForVehicleCylinder
(
factoryNum
,
null
);
}
}
/**
/**
...
@@ -788,45 +791,46 @@ public class CommonController extends BaseController {
...
@@ -788,45 +791,46 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"使用登记表生成"
,
notes
=
"使用登记表生成"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"使用登记表生成"
,
notes
=
"使用登记表生成"
)
@PostMapping
(
value
=
"/getRegistrationFormUrl"
)
@PostMapping
(
value
=
"/getRegistrationFormUrl"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getRegistrationFormUrl
(
@RequestBody
JSONObject
map
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getRegistrationFormUrl
(
@RequestBody
JSONObject
map
)
{
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"formData"
)));
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"formData"
)));
String
manageType
=
String
.
valueOf
(
map
.
get
(
"manageType"
));
String
manageType
=
String
.
valueOf
(
map
.
get
(
"manageType"
));
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
formData
.
put
(
"userName"
,
selectedOrgInfo
.
getUserModel
().
getRealName
());
formData
.
put
(
"userName"
,
selectedOrgInfo
.
getUserModel
().
getRealName
());
return
ResponseHelper
.
buildResponse
(
commonService
.
getRegistrationFormUrl
(
manageType
,
formData
));
return
ResponseHelper
.
buildResponse
(
commonService
.
getRegistrationFormUrl
(
manageType
,
formData
));
}
}
/**
/**
* 使用登记证变更证明
* 使用登记证变更证明
*
* @param map 参数
* @param map 参数
* @return 变更证明url
* @return 变更证明url
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"使用登记变更证明生成"
,
notes
=
"使用登记变更证明生成"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"使用登记变更证明生成"
,
notes
=
"使用登记变更证明生成"
)
@PostMapping
(
value
=
"/getRegistrationChangeCertificateUrl"
)
@PostMapping
(
value
=
"/getRegistrationChangeCertificateUrl"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getRegistrationChangeCertificateUrl
(
@RequestBody
JSONObject
map
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getRegistrationChangeCertificateUrl
(
@RequestBody
JSONObject
map
)
{
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"formData"
)));
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"formData"
)));
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
formData
.
put
(
"userName"
,
selectedOrgInfo
.
getUserModel
().
getRealName
());
formData
.
put
(
"userName"
,
selectedOrgInfo
.
getUserModel
().
getRealName
());
return
ResponseHelper
.
buildResponse
(
commonService
.
getRegistrationChangeCertificateUrl
(
formData
));
return
ResponseHelper
.
buildResponse
(
commonService
.
getRegistrationChangeCertificateUrl
(
formData
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"pdf流生成"
,
notes
=
"pdf流生成"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"pdf流生成"
,
notes
=
"pdf流生成"
)
@PostMapping
(
value
=
"/getRegistrationFormStream"
)
@PostMapping
(
value
=
"/getRegistrationFormStream"
)
public
void
getRegistrationFormStream
(
@RequestBody
JSONObject
map
,
HttpServletResponse
response
)
{
public
void
getRegistrationFormStream
(
@RequestBody
JSONObject
map
,
HttpServletResponse
response
)
{
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"formData"
)));
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"formData"
)));
String
manageType
=
String
.
valueOf
(
map
.
get
(
"manageType"
));
String
manageType
=
String
.
valueOf
(
map
.
get
(
"manageType"
));
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
formData
.
put
(
"userName"
,
selectedOrgInfo
.
getUserModel
().
getRealName
());
formData
.
put
(
"userName"
,
selectedOrgInfo
.
getUserModel
().
getRealName
());
commonService
.
getRegistrationFormStream
(
formData
,
manageType
,
response
);
commonService
.
getRegistrationFormStream
(
formData
,
manageType
,
response
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补证申请表生成"
,
notes
=
"补证申请表生成"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补证申请表生成"
,
notes
=
"补证申请表生成"
)
@PostMapping
(
value
=
"/getCertReplenishFormUrl"
)
@PostMapping
(
value
=
"/getCertReplenishFormUrl"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getCertReplenishFormUrl
(
@RequestBody
JSONObject
jsonObject
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getCertReplenishFormUrl
(
@RequestBody
JSONObject
jsonObject
)
{
return
ResponseHelper
.
buildResponse
(
iJgCertificateReplenishService
.
getCertReplenishFormUrl
(
jsonObject
));
return
ResponseHelper
.
buildResponse
(
iJgCertificateReplenishService
.
getCertReplenishFormUrl
(
jsonObject
.
getJSONObject
(
FORM_DATA
),
null
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -842,7 +846,7 @@ public class CommonController extends BaseController {
...
@@ -842,7 +846,7 @@ public class CommonController extends BaseController {
public
ResponseModel
<
Map
<
String
,
Object
>>
getRegistrationOrCertReplenishFormUrl
(
@RequestBody
JSONObject
jsonObject
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getRegistrationOrCertReplenishFormUrl
(
@RequestBody
JSONObject
jsonObject
)
{
String
formBusinessType
=
Objects
.
toString
(
jsonObject
.
get
(
"formBusinessType"
));
String
formBusinessType
=
Objects
.
toString
(
jsonObject
.
get
(
"formBusinessType"
));
if
(
ApplicationFormTypeEnum
.
BZDJ
.
getBusinessCode
().
equals
(
formBusinessType
))
{
if
(
ApplicationFormTypeEnum
.
BZDJ
.
getBusinessCode
().
equals
(
formBusinessType
))
{
return
ResponseHelper
.
buildResponse
(
iJgCertificateReplenishService
.
getCertReplenishFormUrl
(
jsonObject
));
return
ResponseHelper
.
buildResponse
(
iJgCertificateReplenishService
.
getCertReplenishFormUrl
(
jsonObject
.
getJSONObject
(
FORM_DATA
),
null
));
}
}
if
(
ApplicationFormTypeEnum
.
SYDJ
.
getBusinessCode
().
equals
(
formBusinessType
))
{
if
(
ApplicationFormTypeEnum
.
SYDJ
.
getBusinessCode
().
equals
(
formBusinessType
))
{
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jsonObject
.
get
(
"formData"
)));
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jsonObject
.
get
(
"formData"
)));
...
...
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
...
@@ -101,7 +101,10 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
public
static
final
String
PROCESS_ADVICE
=
"processAdvice"
;
public
static
final
String
PROCESS_ADVICE
=
"processAdvice"
;
public
static
final
String
IS_COMPANY
=
"isCompany"
;
public
static
final
String
IS_COMPANY
=
"isCompany"
;
public
static
final
String
APPLY_STATUS
=
"applyStatus"
;
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
>
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
static
final
String
EQUIP_TRANSFER_PROCESS_KEY
=
"certReplenish"
;
private
final
Map
<
String
,
Function
<
JSONObject
,
Object
>>
actionMap
=
new
HashMap
<>();
private
final
Map
<
String
,
Function
<
JSONObject
,
Object
>>
actionMap
=
new
HashMap
<>();
/**
/**
...
@@ -187,6 +190,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -187,6 +190,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
updateTaskModel
(
certRep
);
updateTaskModel
(
certRep
);
createTaskModel
(
certRep
,
processTaskDTO
,
nextUserIds
);
createTaskModel
(
certRep
,
processTaskDTO
,
nextUserIds
);
}
}
certRep
.
setApplicationFormFileUrl
(
Objects
.
toString
(
this
.
getCertReplenishFormUrl
(
jsonObject
,
certRep
.
getApplyNo
()).
get
(
APPLICATION_FORM_FILE_URL
)));
this
.
updateById
(
certRep
);
this
.
updateById
(
certRep
);
this
.
updateCertRepEqs
(
jsonObject
);
this
.
updateCertRepEqs
(
jsonObject
);
return
certRep
;
return
certRep
;
...
@@ -241,6 +245,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -241,6 +245,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
public
Object
updateNotsubmit
(
JSONObject
jsonObject
)
{
public
Object
updateNotsubmit
(
JSONObject
jsonObject
)
{
JgCertificateReplenish
certRep
=
this
.
buildUpdateCertRep
(
jsonObject
,
FlowStatusEnum
.
TO_BE_SUBMITTED
);
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
.
updateById
(
certRep
);
this
.
updateCertRepEqs
(
jsonObject
);
this
.
updateCertRepEqs
(
jsonObject
);
return
certRep
;
return
certRep
;
...
@@ -258,8 +263,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -258,8 +263,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
String
[]
safetyManager
=
Objects
.
toString
(
jsonObject
.
get
(
SAFETY_MANAGER_ID
)).
split
(
"_"
);
String
[]
safetyManager
=
Objects
.
toString
(
jsonObject
.
get
(
SAFETY_MANAGER_ID
)).
split
(
"_"
);
this
.
setEquClassification
(
certRep
);
this
.
setEquClassification
(
certRep
);
certRep
.
setApplyStatus
(
Objects
.
toString
(
flowStatusEnum
.
getCode
()));
certRep
.
setApplyStatus
(
Objects
.
toString
(
flowStatusEnum
.
getCode
()));
certRep
.
setApplicationFormFile
(
JSONObject
.
toJSONString
(
jsonObject
.
get
(
APPLICATION_FORM_FILE
)));
Optional
.
ofNullable
(
jsonObject
.
get
(
APPLICATION_FORM_FILE
)).
ifPresent
(
x
->
certRep
.
setApplicationFormFile
(
JSONObject
.
toJSONString
(
x
)));
certRep
.
setOtherAccessories
(!
ValidationUtil
.
isEmpty
(
jsonObject
.
get
(
OTHER_ACCESSORIES
))
?
JSONObject
.
toJSONString
(
jsonObject
.
get
(
OTHER_ACCESSORIES
))
:
null
);
Optional
.
ofNullable
(
jsonObject
.
get
(
OTHER_ACCESSORIES
)).
ifPresent
(
x
->
certRep
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
x
))
);
certRep
.
setSafetyManagerName
(
safetyManager
[
1
]);
certRep
.
setSafetyManagerName
(
safetyManager
[
1
]);
return
certRep
;
return
certRep
;
}
}
...
@@ -342,9 +347,10 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -342,9 +347,10 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
Long
sequenceNbr
=
sequence
.
nextId
();
Long
sequenceNbr
=
sequence
.
nextId
();
JSONArray
equLists
=
jsonObj
.
getJSONArray
(
EQU_LISTS
);
JSONArray
equLists
=
jsonObj
.
getJSONArray
(
EQU_LISTS
);
this
.
saveCertRepEqs
(
sequenceNbr
,
equLists
);
this
.
saveCertRepEqs
(
sequenceNbr
,
equLists
);
JgCertificateReplenish
certificateReplenish
=
this
.
buildCertRep
(
sequenceNbr
,
jsonObj
,
new
WorkflowResultDto
());
JgCertificateReplenish
certRep
=
this
.
buildCertRep
(
sequenceNbr
,
jsonObj
,
new
WorkflowResultDto
());
this
.
save
(
certificateReplenish
);
certRep
.
setApplicationFormFileUrl
(
Objects
.
toString
(
this
.
getCertReplenishFormUrl
(
jsonObj
,
certRep
.
getApplyNo
()).
get
(
APPLICATION_FORM_FILE_URL
)));
return
certificateReplenish
;
this
.
save
(
certRep
);
return
certRep
;
}
}
public
void
saveOrUpdateHisDataBatch
(
JSONObject
jsonObj
,
String
sequenceNbr
)
{
public
void
saveOrUpdateHisDataBatch
(
JSONObject
jsonObj
,
String
sequenceNbr
)
{
...
@@ -377,8 +383,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -377,8 +383,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
certRep
.
setReceiveOrgName
(
receiveOrg
[
1
]);
certRep
.
setReceiveOrgName
(
receiveOrg
[
1
]);
certRep
.
setUseUnitCode
(
getSelectedOrgInfo
().
getCompany
().
getCompanyCode
());
certRep
.
setUseUnitCode
(
getSelectedOrgInfo
().
getCompany
().
getCompanyCode
());
certRep
.
setUseUnitName
(
getSelectedOrgInfo
().
getCompany
().
getCompanyName
());
certRep
.
setUseUnitName
(
getSelectedOrgInfo
().
getCompany
().
getCompanyName
());
certRep
.
setApplicationFormFile
(
JSONObject
.
toJSONString
(
jsonObj
.
get
(
APPLICATION_FORM_FILE
)));
Optional
.
ofNullable
(
jsonObj
.
get
(
APPLICATION_FORM_FILE
)).
ifPresent
(
x
->
certRep
.
setApplicationFormFile
(
JSONObject
.
toJSONString
(
x
)));
certRep
.
setOtherAccessories
(!
ValidationUtil
.
isEmpty
(
jsonObj
.
get
(
OTHER_ACCESSORIES
))
?
JSONObject
.
toJSONString
(
jsonObj
.
get
(
OTHER_ACCESSORIES
))
:
null
);
Optional
.
ofNullable
(
jsonObj
.
get
(
OTHER_ACCESSORIES
)).
ifPresent
(
x
->
certRep
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
x
))
);
certRep
.
setSafetyManagerName
(
safetyManager
[
1
]);
certRep
.
setSafetyManagerName
(
safetyManager
[
1
]);
certRep
.
setIsDelete
(
Boolean
.
FALSE
);
certRep
.
setIsDelete
(
Boolean
.
FALSE
);
certRep
.
setCreateDate
(
date
);
certRep
.
setCreateDate
(
date
);
...
@@ -423,6 +429,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -423,6 +429,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
commonService
.
saveExecuteFlowData2Redis
(
workflowResultDto
.
getInstanceId
(),
buildInstanceRuntimeData
(
certRep
));
commonService
.
saveExecuteFlowData2Redis
(
workflowResultDto
.
getInstanceId
(),
buildInstanceRuntimeData
(
certRep
));
// 代办
// 代办
this
.
buildTask
(
certRep
,
workflowResultList
);
this
.
buildTask
(
certRep
,
workflowResultList
);
certRep
.
setApplicationFormFileUrl
(
Objects
.
toString
(
this
.
getCertReplenishFormUrl
(
jsonObj
,
certRep
.
getApplyNo
()).
get
(
APPLICATION_FORM_FILE_URL
)));
this
.
save
(
certRep
);
this
.
save
(
certRep
);
this
.
saveCertRepEqs
(
certRep
.
getSequenceNbr
(),
jsonObj
.
getJSONArray
(
EQU_LISTS
));
this
.
saveCertRepEqs
(
certRep
.
getSequenceNbr
(),
jsonObj
.
getJSONArray
(
EQU_LISTS
));
return
certRep
;
return
certRep
;
...
@@ -624,20 +631,20 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -624,20 +631,20 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
* @return
* @return
*/
*/
@Override
@Override
public
Map
<
String
,
Object
>
getCertReplenishFormUrl
(
JSONObject
jsonObject
)
{
public
Map
<
String
,
Object
>
getCertReplenishFormUrl
(
JSONObject
jsonObject
,
String
applyNo
)
{
// 生成申请编号
if
(
StringUtils
.
isEmpty
(
applyNo
))
{
String
applyNo
=
""
;
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
BZDJ
.
getCode
(),
1
)
;
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
BZDJ
.
getCode
(),
1
);
if
(!
listResponseModel
.
getResult
().
isEmpty
())
{
if
(!
listResponseModel
.
getResult
().
isEmpty
())
{
applyNo
=
listResponseModel
.
getResult
().
get
(
0
);
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
wordPath
=
"CertificateReplenish.ftl"
;
String
fileName
=
"使用登记证补证申请表_"
;
String
fileName
=
"使用登记证补证申请表_"
;
File
pdfFile
=
null
;
File
pdfFile
=
null
;
try
{
try
{
pdfFile
=
commonService
.
wordToPdf
(
fileName
,
wordPath
,
formData
);
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
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
finally
{
}
finally
{
...
@@ -658,7 +665,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -658,7 +665,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
*/
*/
@Override
@Override
public
void
getCertReplenishFormStream
(
JSONObject
jsonObject
,
HttpServletResponse
response
)
{
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
wordPath
=
"CertificateReplenish.ftl"
;
String
fileName
=
"使用登记证补证申请表_"
;
String
fileName
=
"使用登记证补证申请表_"
;
File
pdfFile
;
File
pdfFile
;
...
@@ -689,7 +697,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -689,7 +697,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
result
.
put
(
"useUnitName"
,
jsonObject
.
getString
(
"useUnitName"
));
result
.
put
(
"useUnitName"
,
jsonObject
.
getString
(
"useUnitName"
));
result
.
put
(
"equUseAddress"
,
jsonObject
.
getString
(
"equUseAddress"
));
result
.
put
(
"equUseAddress"
,
jsonObject
.
getString
(
"equUseAddress"
));
result
.
put
(
"applicationReason"
,
jsonObject
.
getString
(
"applicationReason"
));
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
(
"safetyManagerName"
,
jsonObject
.
getString
(
"safetyManagerId"
).
split
(
"_"
)[
1
]);
result
.
put
(
"safetyManagerPhone"
,
jsonObject
.
getString
(
"safetyManagerPhone"
));
result
.
put
(
"safetyManagerPhone"
,
jsonObject
.
getString
(
"safetyManagerPhone"
));
JSONArray
equListsAfterAssembly
=
new
JSONArray
();
JSONArray
equListsAfterAssembly
=
new
JSONArray
();
...
@@ -824,6 +832,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -824,6 +832,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
JSONObject
jsonObject
=
commonService
.
queryHistoryData
(
sequenceNbr
);
JSONObject
jsonObject
=
commonService
.
queryHistoryData
(
sequenceNbr
);
jsonObject
.
put
(
IS_COMPANY
,
isCompany
);
jsonObject
.
put
(
IS_COMPANY
,
isCompany
);
jsonObject
.
put
(
APPLY_STATUS
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
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
;
return
jsonObject
;
}
else
{
}
else
{
ObjectMapper
mapper
=
new
ObjectMapper
();
ObjectMapper
mapper
=
new
ObjectMapper
();
...
@@ -834,6 +844,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -834,6 +844,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
JSONObject
jsonObject
=
commonService
.
queryHistoryData
(
sequenceNbr
);
JSONObject
jsonObject
=
commonService
.
queryHistoryData
(
sequenceNbr
);
result
.
put
(
SAFETY_MANAGER_ID
,
jsonObject
.
get
(
SAFETY_MANAGER_ID
));
result
.
put
(
SAFETY_MANAGER_ID
,
jsonObject
.
get
(
SAFETY_MANAGER_ID
));
result
.
put
(
IS_COMPANY
,
isCompany
);
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
;
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