Browse Source

内部报验检验员派单

wangming 1 year ago
parent
commit
685cc021af

+ 6 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxInsideInspectionServiceImpl.java

@@ -1382,6 +1382,12 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
         //只有站长主任副主任有改派功能
         //如果角色中存在站长或者主任
         boolean match = inOper.getOperUser().getRoleDos().stream().anyMatch(item -> "role095".equals(item.getCode()) || "role080".equals(item.getCode()));
+
+        //非站长主任,只能自己派单给自己
+        if(!match && inOper.getOperUser().getId().equals(dto.getSupervisionId())) {
+            match = true;
+        }
+
         if(!match) {
             return "单据号:".concat(inOper.getInspection().getInspectioncode()).concat("操作权限不足,不能派单或改派");
         }