diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java index 78f29143..c8d3512b 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java @@ -161,15 +161,15 @@ public class DlTicketWaresServiceImpl extends ServiceImpl() // 工单子项总数量增加上配件的数量 - .setSql("count = count" + respVO.getWares().size()) + .setSql("count = count + " + respVO.getWares().size()) // 工单配件总价 - .setSql("part_price = part_price" + reduce) + .setSql("part_price = part_price + " + reduce) // 工单总价 - .setSql("total_price = total_price" + reduce) + .setSql("total_price = total_price + " + reduce) // 参考成本 - .setSql("cost = cost" + reduce) + .setSql("cost = cost + " + reduce) // 参考毛利 - .setSql("profit = profit" + reduce) + .setSql("profit = profit + " + reduce) // 领料状态 .set(DlRepairTickets::getPartStatus, "02") .eq(DlRepairTickets::getId, respVO.getTicketId()) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java index 91f5d426..3b84c7a8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.system.controller.admin.permission; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission.PermissionAssignRoleDataScopeReqVO; import cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission.PermissionAssignRoleMenuReqVO; import cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission.PermissionAssignUserRoleReqVO; @@ -79,4 +80,16 @@ public class PermissionController { return success(true); } + /** + * 用来判断角色 + * + * @author 小李 + * @date 9:47 2024/10/16 + * @param code 角色标识 + **/ + @Operation(summary = "判断是否是对应的角色") + @GetMapping("/checkRole") + public CommonResult checkRole(@RequestParam("code") String code) { + return success(permissionService.hasAnyRoles(SecurityFrameworkUtils.getLoginUserId(), code)); + } }