Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 751ae06b
authored
Oct 26, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开发 1.12.0 版本 优化工单列表校验车架号重复接口
1 parent
b7f2f30b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletions
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
src/main/java/cn/com/glsx/admin/modules/service/WorkOrderService.java
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
View file @
751ae06
...
@@ -367,4 +367,13 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
...
@@ -367,4 +367,13 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
int
updateSettleFlagById
(
@Param
(
"id"
)
Long
id
,
@Param
(
"settleFlag"
)
Integer
settleFlag
);
int
updateSettleFlagById
(
@Param
(
"id"
)
Long
id
,
@Param
(
"settleFlag"
)
Integer
settleFlag
);
int
countByUserId
(
@Param
(
"userId"
)
Long
userId
);
int
countByUserId
(
@Param
(
"userId"
)
Long
userId
);
/**
* 查询租户节点下面是否存在存在相同的车辆
*
* @param vin 车架号
* @param tenantId 租户ID
* @return
*/
List
<
Vehicle
>
getVehicleListByVinAndTenantId
(
@Param
(
"vin"
)
String
vin
,
@Param
(
"tenantId"
)
Long
tenantId
);
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/admin/modules/service/WorkOrderService.java
View file @
751ae06
...
@@ -739,7 +739,14 @@ public class WorkOrderService extends AbstractCommonService {
...
@@ -739,7 +739,14 @@ public class WorkOrderService extends AbstractCommonService {
* @return
* @return
*/
*/
public
Boolean
verifyDuplicateVim
(
String
vin
)
{
public
Boolean
verifyDuplicateVim
(
String
vin
)
{
List
<
Vehicle
>
vehicleList
=
vehicleMapper
.
getVehicleListByVinWithAuth
(
vin
);
// 获取当前账号的租户Id
Long
tenantId
=
null
;
boolean
superAdmin
=
ShieldContextHolder
.
isSuperAdmin
();
if
(!
superAdmin
)
{
tenantId
=
ShieldContextHolder
.
getTenantId
();
}
List
<
Vehicle
>
vehicleList
=
vehicleMapper
.
getVehicleListByVinAndTenantId
(
vin
,
tenantId
);
log
.
info
(
"vehicleList==="
+
JSONUtil
.
toJsonStr
(
vehicleList
));
log
.
info
(
"vehicleList==="
+
JSONUtil
.
toJsonStr
(
vehicleList
));
return
CollectionUtil
.
isNotEmpty
(
vehicleList
);
return
CollectionUtil
.
isNotEmpty
(
vehicleList
);
}
}
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
751ae06
...
@@ -1418,4 +1418,16 @@
...
@@ -1418,4 +1418,16 @@
where id = #{id}
where id = #{id}
</update>
</update>
<select
id=
"getVehicleListByVinAndTenantId"
resultMap=
"BaseResultMap"
>
select tv.*
from t_vehicle tv
left join t_user tu on tu.id = tv.created_by
where tv.vin = #{vin}
and tv.del_flag = 0
<if
test=
"tenantId != null"
>
and tu.tenant_id = #{tenantId}
</if>
and tu.del_flag = 0
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment