@@ -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("操作权限不足,不能派单或改派");
}