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
f6eecf8e
Commit
f6eecf8e
authored
Aug 27, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):历史平台登记添加原证原表引出的,使用登记详情编辑问题
parent
f77bd1ef
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
172 additions
and
7 deletions
+172
-7
JgVehicleInformationVo.java
...in/amos/boot/module/jg/api/vo/JgVehicleInformationVo.java
+7
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+6
-6
JgVehicleInformationMapper.xml
.../src/main/resources/mapper/JgVehicleInformationMapper.xml
+1
-1
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+11
-0
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+2
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+15
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+130
-0
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+0
-0
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/vo/JgVehicleInformationVo.java
View file @
f6eecf8e
...
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -246,5 +247,11 @@ public class JgVehicleInformationVo implements Serializable {
@ApiModelProperty
(
value
=
"电话"
)
private
String
phone
;
@ApiModelProperty
(
value
=
"历史设备-原使用登记表附件"
)
private
List
<?>
oldUseRegistrationTable
;
@ApiModelProperty
(
value
=
"历史设备-原使用登记证附件"
)
private
List
<?>
oldUseRegistrationCertificate
;
private
CompanyBo
companyInfo
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
f6eecf8e
...
...
@@ -102,15 +102,15 @@
<if
test=
"dto.useUnitCode != null and dto.useUnitCode != ''"
>
and ur.use_unit_credit_code = #{dto.useUnitCode}
</if>
<if
test=
"roleIds != null and dto.dataType == 'supervision'"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
instance_status like concat('%',#{role},'%')
</foreach
>
</if
>
<!-- <if test="roleIds != null and dto.dataType == 'supervision'">--
>
<!-- <foreach collection='roleIds' item='role' open='and (' close=')' separator='or'>--
>
<!-- instance_status like concat('%',#{role},'%')-->
<!-- </foreach>--
>
<!-- </if>--
>
<if
test=
"dto.dataType == 'supervision' "
>
AND (ur.receive_company_code = #{dto.receiveCompanyCode} or ur.transfer_to_user_ids LIKE concat ('%',
#{dto.currentUserId}, '%'))
AND ur.
instance_id
<![CDATA[<>]]>
'
'
AND ur.
status
<![CDATA[<>]]>
'使用单位待提交
'
</if>
<if
test=
"dto.dataType == 'company' "
>
AND (ur.use_unit_credit_code = #{dto.unitCode} or ur.transfer_to_user_ids LIKE concat ('%',
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgVehicleInformationMapper.xml
View file @
f6eecf8e
...
...
@@ -37,7 +37,7 @@
</if>
<if
test=
"dto.dataType == 'supervision' "
>
and tjvi.receive_company_code = #{dto.useUnitCreditCode}
AND tjvi.
instance_id
<![CDATA[<>]]>
'
'
AND tjvi.
status
<![CDATA[<>]]>
'使用单位待提交
'
</if>
<if
test=
"dto.dataType == 'company' "
>
and tjvi.use_unit_credit_code = #{dto.useUnitCreditCode}
...
...
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 @
f6eecf8e
...
...
@@ -305,6 +305,17 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
commonService
.
invokeBusinessType
(
map
));
}
/**
* 历史平台登记业务使用登记单编辑公共入口
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateHistory"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"历史平台登记业务使用登记单编辑公共入口"
,
notes
=
"历史平台登记业务使用登记单编辑公共入口"
)
public
ResponseModel
<
Object
>
updateHistory
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
updateHistory
(
map
));
}
/**
* 根据公司id获取公司下人员
*/
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
f6eecf8e
...
...
@@ -69,6 +69,8 @@ public interface ICommonService {
Object
invokeBusinessType
(
Map
<
String
,
Object
>
obj
);
Object
updateHistory
(
Map
<
String
,
Object
>
obj
);
Object
getCompanyUser
(
Long
companyId
);
Object
transfer
(
Map
<
String
,
Object
>
obj
);
...
...
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/CommonServiceImpl.java
View file @
f6eecf8e
...
...
@@ -1264,6 +1264,21 @@ public class CommonServiceImpl implements ICommonService {
}
}
@Override
public
Object
updateHistory
(
Map
<
String
,
Object
>
map
)
{
String
historyEquType
=
(
String
)
map
.
get
(
HISTORY_EQU_TYPE
);
JSONObject
jsonObject
=
new
JSONObject
(
map
);
switch
(
historyEquType
)
{
case
"unit"
:
// return jgUseRegistrationServiceImpl.handleUnitHistoryEquip(jsonObject);
return
null
;
case
"vehicle"
:
return
jgVehicleInformationService
.
updateHistoryByVehicle
(
jsonObject
);
default
:
return
jgUseRegistrationServiceImpl
.
updateHistoryBySet
(
jsonObject
);
}
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
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 @
f6eecf8e
...
...
@@ -3085,4 +3085,133 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
map
;
}
/**
* 历史登记设备编辑接口
* @param map 入参
* @return
*/
public
List
<
Map
<
String
,
Object
>>
updateHistoryBySet
(
JSONObject
map
)
{
try
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
String
record
=
String
.
valueOf
(
map
.
get
(
"equipId"
));
// 使用登记信息
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
jgUseRegistration
.
setRegDate
(
new
Date
());
jgUseRegistration
.
setCreateDate
(
new
Date
());
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
otherLambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
otherLambda
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
);
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
// 其他附件
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"otherAccessories"
)))
{
jgUseRegistration
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
}
if
(
map
.
containsKey
(
"receiveOrgCode"
))
{
// 接收单位信息
String
[]
splitMaintenanceUnitCode
=
String
.
valueOf
(
map
.
getString
(
"receiveOrgCode"
)).
split
(
"_"
);
jgUseRegistration
.
setReceiveCompanyCode
(
splitMaintenanceUnitCode
[
0
]);
jgUseRegistration
.
setReceiveOrgName
(
splitMaintenanceUnitCode
[
1
]);
jgUseRegistration
.
setReceiveCompanyOrgCode
(
commonService
.
getOneCompany
(
jgUseRegistration
.
getReceiveCompanyCode
()).
getOrgCode
());
}
// 安全管理员
if
(
map
.
containsKey
(
"safetyManager"
))
{
String
[]
data
=
String
.
valueOf
(
map
.
getString
(
"safetyManager"
)).
split
(
"_"
);
map
.
put
(
"safetyManagerId"
,
data
[
0
]);
map
.
put
(
"safetyManagerName"
,
data
[
1
]);
}
// 使用单位提交
jgUseRegistration
.
setUseUnitName
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyName
().
split
(
"_"
)[
1
]
:
company
.
getCompanyName
());
jgUseRegistration
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
jgUseRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
jgUseRegistration
.
setCreateUserName
(
reginParams
.
getUserModel
().
getUserName
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
jgUseRegistration
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
}
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"
)));
}
// 使用地点
// 市
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"CITY"
);
// 区
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGION"
);
// 街道
List
<
LinkedHashMap
>
street
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"STREET"
);
jgUseRegistration
.
setUseAddress
(
"陕西省"
);
// 城市
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"city"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
city
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"city"
))))
{
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
item
.
get
(
"regionName"
));
}
});
}
// 区县
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"county"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"county"
))))
{
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
item
.
get
(
"regionName"
));
}
});
}
// 街道
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"factoryUseSiteStreet"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
street
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"factoryUseSiteStreet"
))))
{
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
item
.
get
(
"regionName"
));
}
});
}
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
map
.
get
(
"address"
));
jgUseRegistration
.
setAuditPassDate
(
new
Date
());
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
// 历史设备登记生成的 编辑时更新使用登记证管理表
updateRegistrationManage
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
// 更新使用信息表中的附件信息
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgUseInfo
>().
lambda
();
lambda
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
);
IdxBizJgUseInfo
useInfo
=
new
IdxBizJgUseInfo
();
useInfo
.
setOldUseRegistrationTable
(
JSON
.
toJSONString
(
map
.
get
(
"oldUseRegistrationTable"
)));
useInfo
.
setOldUseRegistrationCertificate
(
JSON
.
toJSONString
(
map
.
get
(
"oldUseRegistrationCertificate"
)));
useInfoMapper
.
update
(
useInfo
,
lambda
);
// 更新检验检测信息【一对多,暂时只取最新一条数据】
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
record
);
if
(
ObjectUtils
.
isEmpty
(
inspectionDetectionInfo
.
getSequenceNbr
()))
{
inspectionDetectionInfo
.
setRecord
((
String
)
map
.
get
(
"equipId"
));
}
inspectionDetectionInfo
.
setInspectOrgCode
(
String
.
valueOf
(
map
.
get
(
"inspectOrgCode"
)));
inspectionDetectionInfo
.
setInspectOrgName
(
String
.
valueOf
(
map
.
get
(
"inspectOrgName"
)));
inspectionDetectionInfo
.
setInspectConclusion
(
String
.
valueOf
(
map
.
get
(
"inspectConclusion"
)));
inspectionDetectionInfo
.
setInspectType
(
String
.
valueOf
(
map
.
get
(
"inspectType"
)));
inspectionDetectionInfo
.
setInspectDate
(
DateUtil
.
parse
(
String
.
valueOf
(
map
.
get
(
"inspectDate"
)),
"yyyy-MM-dd"
));
inspectionDetectionInfo
.
setInspectStaff
(
String
.
valueOf
(
map
.
get
(
"inspectStaff"
)));
inspectionDetectionInfo
.
setNextInspectDate
(
DateUtil
.
parse
(
String
.
valueOf
(
map
.
get
(
"nextInspectDate"
)),
"yyyy-MM-dd"
));
inspectionDetectionInfo
.
setInspectReport
(
JSONObject
.
toJSONString
(
map
.
get
(
"inspectReport"
)));
iIdxBizJgInspectionDetectionInfoService
.
saveOrUpdateData
(
inspectionDetectionInfo
);
// 暂存历史表
updateHistory
(
map
,
record
,
String
.
valueOf
(
jgUseRegistration
.
getSequenceNbr
()),
jgUseRegistration
.
getSupervisoryCode
());
return
this
.
baseMapper
.
getDetailById
(
jgUseRegistration
.
getSequenceNbr
());
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
throw
e
;
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
throw
new
BadRequest
(
"保存失败!"
);
}
finally
{
FlowingEquipRedisContext
.
clean
();
}
}
}
\ No newline at end of file
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/JgVehicleInformationServiceImpl.java
View file @
f6eecf8e
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