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
41a31617
Commit
41a31617
authored
Jan 19, 2024
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用登记添加监管码生成逻辑
parent
9ec5067d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
15 deletions
+66
-15
JgUseRegistrationDto.java
...oin/amos/boot/module/jg/api/dto/JgUseRegistrationDto.java
+3
-0
JgUseRegistration.java
...oin/amos/boot/module/jg/api/entity/JgUseRegistration.java
+3
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+60
-15
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/JgUseRegistrationDto.java
View file @
41a31617
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
...
@@ -103,4 +104,6 @@ public class JgUseRegistrationDto extends BaseDto {
private
String
dataType
;
private
String
unitCode
;
private
String
isXixian
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgUseRegistration.java
View file @
41a31617
...
...
@@ -183,4 +183,7 @@ public class JgUseRegistration extends BaseEntity {
@TableField
(
value
=
"next_execute_user_ids"
)
private
String
nextExecuteUserIds
;
@TableField
(
value
=
"is_xixian"
)
private
String
isXixian
;
}
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/JgUseRegistrationServiceImpl.java
View file @
41a31617
...
...
@@ -26,19 +26,10 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgFactoryInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.OtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
...
...
@@ -74,7 +65,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
@Autowired
private
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
@Autowired
private
OtherInfoMapper
otherInfoMapper
;
private
IdxBizJg
OtherInfoMapper
otherInfoMapper
;
@Autowired
private
JgUseRegistrationEqMapper
jgRelationEquipMapper
;
@Autowired
...
...
@@ -129,6 +120,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
inspectionDetectionInfoMapper
.
update
(
inspectionDetectionInfo
,
inspectionLambda
);
// 更新设备使用登记证
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
useOrgCode
);
// 更新es
createCode
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
map
);
}
public
void
updateHistory
(
JSONObject
map
,
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
...
...
@@ -159,9 +152,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 使用登记信息
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
jgUseRegistration
.
setRegDate
(
new
Date
());
LambdaQueryWrapper
<
OtherInfo
>
otherLambda
=
new
QueryWrapper
<
OtherInfo
>().
lambda
();
otherLambda
.
eq
(
OtherInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
OtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
otherLambda
=
new
QueryWrapper
<
IdxBizJg
OtherInfo
>().
lambda
();
otherLambda
.
eq
(
IdxBizJg
OtherInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
IdxBizJg
OtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
jgUseRegistration
.
setUseUnitName
(
String
.
valueOf
(
map
.
get
(
"useUnitName"
)));
...
...
@@ -182,6 +175,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectOrgName"
)))
{
jgUseRegistration
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
}
// 是否西咸
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"isXixian"
))){
jgUseRegistration
.
setIsXixian
(
String
.
valueOf
(
map
.
get
(
"isXixian"
)));
}
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
...
...
@@ -648,4 +645,51 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
//调用生成使用登记证
commonService
.
generateCertificateReport
(
exportParamsMap
,
response
);
}
/**
* 生成监管码、96333码
*
* @param record
*/
public
void
createCode
(
String
record
,
JSONObject
dataMap
)
{
// 其他信息
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambdaOth
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
lambdaOth
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
);
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
lambdaOth
);
if
(
ObjectUtils
.
isEmpty
(
otherInfo
.
getCode96333
())
||
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
// 使用信息
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
record
);
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambda
);
// 注册信息
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
lambdaReg
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
lambdaReg
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
);
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoMapper
.
selectOne
(
lambdaReg
);
// 生成监管码、96333码
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
useInfo
.
getCity
());
map
.
put
(
"countyCode"
,
useInfo
.
getCounty
());
map
.
put
(
"equCategory"
,
registerInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
dataMap
.
get
(
"isXixian"
));
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
Map
<
String
,
Object
>
result
=
code
.
getResult
();
if
(!
ObjectUtils
.
isEmpty
(
result
))
{
otherInfo
.
setSupervisoryCode
(
String
.
valueOf
(
result
.
get
(
"superviseCode"
)));
otherInfo
.
setCode96333
(
ObjectUtils
.
isEmpty
(
result
.
get
(
"code96333"
))
?
null
:
String
.
valueOf
(
result
.
get
(
"code96333"
)));
otherInfo
.
setClaimStatus
(
"已认领"
);
otherInfoMapper
.
updateById
(
otherInfo
);
}
}
// 更新es
HashMap
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"SUPERVISORY_CODE"
,
otherInfo
.
getSupervisoryCode
());
param
.
put
(
"CODE96333"
,
otherInfo
.
getCode96333
());
param
.
put
(
"USE_UNIT_CREDIT_CODE"
,
dataMap
.
get
(
"useUnitCreditCode"
));
param
.
put
(
"USE_UNIT_NAME"
,
dataMap
.
get
(
"useUnitName"
));
param
.
put
(
"CITY"
,
dataMap
.
get
(
"city"
));
param
.
put
(
"COUNTY"
,
dataMap
.
get
(
"county"
));
objMap
.
put
(
record
,
param
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
}
}
\ 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